Hi, I am new in making audio / headphone amps, although starting playing with opamp+buffer structure a few months ago. Now I just want to get my foot wet in building discrete circuits. The first try was a failure without any calculation idea. After going through a few basic chapters Bob Cordell's book. I had following design, simulated in LTSpice. Although it's similar to the example circuits in the book now, I am still looking for some nice circuit block to make some difference. Actually, I found some really nice designs in this forum.
Circuit and simulation results are in attachments.
I have question. As in Bob's book, the IPS and VAS gain calculations are based on bipolar pair and degeneration in LTP. In my design, I just use jFET without degeneration resistor. How can I calculate the approx. gain of IPS and VAS?
Circuit and simulation results are in attachments.
I have question. As in Bob's book, the IPS and VAS gain calculations are based on bipolar pair and degeneration in LTP. In my design, I just use jFET without degeneration resistor. How can I calculate the approx. gain of IPS and VAS?
Attachments
IPSgain = total OLG - VASgain - OPSgain
OPSgain is almost 1.0 so IPSgain is roughly OLG-VASgain
It is possible in SPICE to get the Open Loop Gain
You can also measure the AC Voltage at the input and output of IPS
The difference is the gain
OPSgain is almost 1.0 so IPSgain is roughly OLG-VASgain
It is possible in SPICE to get the Open Loop Gain
You can also measure the AC Voltage at the input and output of IPS
The difference is the gain
Because the VAS gain depends almost entirely on the beta of Q5 (ignoring for the moment the miller capacitor which doesn't matter at DC), DC open-loop gain will be extremely high and any calculations could only be very approximate unless you made more measurements than would be practical in the real world, and then those measurements would be useless when another amp was built, because of semiconductor variations in practice. I may be wrong, but in any case the OLG may be so high as to be negligible.
If I were looking to improve this design as an opamp for general use with a variety of applications, here are the things I would look at in order of preference:
CMRR: The LTP current source, Q1, will vary depending on collector voltage. Good CMRR is essential to an opamp's function.
PSRR: Plenty of attention was paid to Q25 and Q27, the current sources for the diamond output stage. However, hardly any at all was paid to the more important sources, for the VAS and LTP (Q2 and Q1). If I were to construct the VAS/LTP sources with the same philosophy as the OPS source, I would replace R6 with a Jfet current source just like J5/R40. This would improve PSRR.
Distortion: Low distortion is also essential to the function of an opamp. Super-high open-loop gain will guarantee an accurately subtracted output. However it is easy to make an opamp like this. The trick is to get low distortion at higher frequencies. Since your opamp only has full open-loop gain (and thus error correcting ability) below about 100Hz, it's maximum precision will be only after 10mS when the circuit has settled. If the signal changes before this, it won't matter how much DC OLG (open-loop gain) you have. To lower distortion you must either increase OLG (by optimizing or lowering stability compensation) or redesign aspects of the circuit for lower distortion. It is often difficult to guess which part of the circuit produces the most distortion, and it is especially difficult to track while the feedback loop is engaged. In simulation you can bypass R10 with a very large capacitor (for instance 100F) and apply an input signal small enough not to clip the amp. Then you can track the signal distortion from the input stage down the signal path.
Stability: After all this, you must test the amplifier's stability into reactive loads. If the circuit is too unstable you must figure out why and fix it. Stability may be one of the hardest topics in amplifier design because you cannot simply memorize a set of rules; you must work out the phase, impedances and reactances in the circuit and this may take much time and effort to learn how to do properly. In general the performance ceiling (in terms of high-frequency performance) for most well-designed circuits is the stability compensation; you might even say that compensation is the Final Frontier of amplifier design (precision amp design anyways, for audio it's up to you).
These are my thoughts, others may have differing (and more appropriate) advice based on knowledge and experience.
- keantoken
If I were looking to improve this design as an opamp for general use with a variety of applications, here are the things I would look at in order of preference:
CMRR: The LTP current source, Q1, will vary depending on collector voltage. Good CMRR is essential to an opamp's function.
PSRR: Plenty of attention was paid to Q25 and Q27, the current sources for the diamond output stage. However, hardly any at all was paid to the more important sources, for the VAS and LTP (Q2 and Q1). If I were to construct the VAS/LTP sources with the same philosophy as the OPS source, I would replace R6 with a Jfet current source just like J5/R40. This would improve PSRR.
Distortion: Low distortion is also essential to the function of an opamp. Super-high open-loop gain will guarantee an accurately subtracted output. However it is easy to make an opamp like this. The trick is to get low distortion at higher frequencies. Since your opamp only has full open-loop gain (and thus error correcting ability) below about 100Hz, it's maximum precision will be only after 10mS when the circuit has settled. If the signal changes before this, it won't matter how much DC OLG (open-loop gain) you have. To lower distortion you must either increase OLG (by optimizing or lowering stability compensation) or redesign aspects of the circuit for lower distortion. It is often difficult to guess which part of the circuit produces the most distortion, and it is especially difficult to track while the feedback loop is engaged. In simulation you can bypass R10 with a very large capacitor (for instance 100F) and apply an input signal small enough not to clip the amp. Then you can track the signal distortion from the input stage down the signal path.
Stability: After all this, you must test the amplifier's stability into reactive loads. If the circuit is too unstable you must figure out why and fix it. Stability may be one of the hardest topics in amplifier design because you cannot simply memorize a set of rules; you must work out the phase, impedances and reactances in the circuit and this may take much time and effort to learn how to do properly. In general the performance ceiling (in terms of high-frequency performance) for most well-designed circuits is the stability compensation; you might even say that compensation is the Final Frontier of amplifier design (precision amp design anyways, for audio it's up to you).
These are my thoughts, others may have differing (and more appropriate) advice based on knowledge and experience.
- keantoken
Thank you, keantoken.
I think you are right. The current source of IPS and VAS was not designed in detail. I saw a lot of circuit using such simple CCS. So I thought maybe such design is good enough. I will find some document on current source to study.
For distortion, in my current circuit, I only use 1 compensation way. I know there are many other ways. I will try some combinations. Maybe it will help to improve bandwidth as well. Thank you for your advice of the way to simulation distortions.
For stability...... Nothing to say at all now. My previous failed build was stable in computer. But after I made it, it made me crazy...... I will give this one a try after making changes mentioned above and see how it's going.
I think you are right. The current source of IPS and VAS was not designed in detail. I saw a lot of circuit using such simple CCS. So I thought maybe such design is good enough. I will find some document on current source to study.
For distortion, in my current circuit, I only use 1 compensation way. I know there are many other ways. I will try some combinations. Maybe it will help to improve bandwidth as well. Thank you for your advice of the way to simulation distortions.
For stability...... Nothing to say at all now. My previous failed build was stable in computer. But after I made it, it made me crazy...... I will give this one a try after making changes mentioned above and see how it's going.
I will warn you about breadboards. I had a lot of trouble with these. I prefer p-p wiring because at least you KNOW it's connected. Plus the breadboard contacts have about 2cm contact area with the plastic breadboard frame, and as you know plastic is a good dielectric. I think these stray capacitances may mess with stability.
Most circuits here are intended for audio, and many designers follow their ears and use THD for quality control. So many of the circuits you will find here are not the type of precision amp that you seem to be interested in. You must test and verify the design choices made for yourself and determine which ones meet your application. Therefore it may help to first design an opamp with every bell and whistle you can find and then remove parts, to see which ones don't matter.
When speaking of distortion you talk about changing compensation. Personally I would try to make the circuit more linear by design before tweaking compensation to try and improve distortion specs. Compensation doesn't add any new distortion; it simply exhumes the distortion that was only buried by open-loop gain. If the amp is driven into class B, this will be mostly switching spikes at the VAS output (or input of the output stage). If you want to track down glitching and switching distortions, I recommend you plot "D(I(C9))" which will plot the derivative of the current through the miller cap. This will easily expose switching distortion in class B, and may also expose other distortions if they are severe enough. Using the D() function on other voltages and currents can be revealing too and very helpful in tracking sources of distortion.
One of the things you will encounter very often when trying to reduce distortion or improve a CCS is Early effect. Because of Early effect, a transistor operates as a high (say around 33kohms) nonlinear resistor depending on the collector voltage, and this resistor is between the collector and emitter. If it were purely resistive it would not be such a problem, but it is nonlinear which means it will inject distortion if you use a CCS with this problem in a sensitive part of the circuit, such as the LTP (and sometimes the VAS). Therefore I suggest you will save yourself a lot of time in trial-by-error approach if you take a detour and learn about Early effect by experimenting with the various CCS circuits posted here. Simply search for "best CCS" and you will find all you need.
The function of a CCS is to provide a constant current regardless of the voltage imposed on it. Therefore the proper method of testing one becomes clear. A CCS typically (with a few notable exceptions) has 3 necessary connections. The ground node, the supply node, and the output node. When sufficient supply current is given through the supply node, the CCS will regulate the current passing from the output to ground nodes. In order to set up a proper test in SPICE, the CCS should be connected to a voltage source with the output connected to the positive supply so it is functioning normally. A signal source is inserted between the positive supply and the output (usually the collector of a transistor). Since this is a voltage source it has no resistance (by virtue of SPICE - but don't count on such a luxury on Earth) and so should not interact with the reactance of the CCS. This voltage source will simulate the varying voltage. The test data is taken from the source current through this voltage source.
If you divide the test voltage by the current variation, you will find the effective resistance of the CCS. You will also notice this resistance changes with collector voltage, due to Early effect. If you perform an FFT on the current you will find distortion also varies with collector voltage.
Some of these things can be difficult in transient analysis, so use AC analysis. Now the DC operating points will be ignored and only the AC magnitude of the signals will be displayed. Ohm's law still applies so if you divide voltage by current again you will get a graph of resistance vs. frequency. Some sources have better HF performance than others, which is another dimension of CCS design (however you will see this applies to almost everything else you do when designing an amplifier). One thing to watch for is spikes/resonances in the MHz range. Some precision sources exhibit this, and it can totally ruin the stability of an otherwise well-tuned amp. Some can even oscillate. It is important to have a fast scope (say >20MHz) so oscillation can be detected, as small-signal components can oscillate at VHF, and this will ruin the performance of an otherwise excellent amp, and be misleading for someone intending to design one.
Experiment with the different CCS circuits here and when one rises above the rest, try to figure out why.
To see a transistor's Early specs more directly, in the datasheets there is a graph usually labeled "Ic vs. Vce" which will show most transistors perform best with at least about 2V Vce. PNP transistors generally have worse Early effect than equivalent NPN's.
The same logic that applies to the CCS also applies to distortion in a current mirror (I prefer the Widlar, because Early effect distortion tends to be far worse than Ib errors; at least Ib is mildly linear).
Don't take what I say too seriously. I learned everything I know just fooling around, and it is an effective mode of learning.
- keantoken
Most circuits here are intended for audio, and many designers follow their ears and use THD for quality control. So many of the circuits you will find here are not the type of precision amp that you seem to be interested in. You must test and verify the design choices made for yourself and determine which ones meet your application. Therefore it may help to first design an opamp with every bell and whistle you can find and then remove parts, to see which ones don't matter.
When speaking of distortion you talk about changing compensation. Personally I would try to make the circuit more linear by design before tweaking compensation to try and improve distortion specs. Compensation doesn't add any new distortion; it simply exhumes the distortion that was only buried by open-loop gain. If the amp is driven into class B, this will be mostly switching spikes at the VAS output (or input of the output stage). If you want to track down glitching and switching distortions, I recommend you plot "D(I(C9))" which will plot the derivative of the current through the miller cap. This will easily expose switching distortion in class B, and may also expose other distortions if they are severe enough. Using the D() function on other voltages and currents can be revealing too and very helpful in tracking sources of distortion.
One of the things you will encounter very often when trying to reduce distortion or improve a CCS is Early effect. Because of Early effect, a transistor operates as a high (say around 33kohms) nonlinear resistor depending on the collector voltage, and this resistor is between the collector and emitter. If it were purely resistive it would not be such a problem, but it is nonlinear which means it will inject distortion if you use a CCS with this problem in a sensitive part of the circuit, such as the LTP (and sometimes the VAS). Therefore I suggest you will save yourself a lot of time in trial-by-error approach if you take a detour and learn about Early effect by experimenting with the various CCS circuits posted here. Simply search for "best CCS" and you will find all you need.
The function of a CCS is to provide a constant current regardless of the voltage imposed on it. Therefore the proper method of testing one becomes clear. A CCS typically (with a few notable exceptions) has 3 necessary connections. The ground node, the supply node, and the output node. When sufficient supply current is given through the supply node, the CCS will regulate the current passing from the output to ground nodes. In order to set up a proper test in SPICE, the CCS should be connected to a voltage source with the output connected to the positive supply so it is functioning normally. A signal source is inserted between the positive supply and the output (usually the collector of a transistor). Since this is a voltage source it has no resistance (by virtue of SPICE - but don't count on such a luxury on Earth) and so should not interact with the reactance of the CCS. This voltage source will simulate the varying voltage. The test data is taken from the source current through this voltage source.
If you divide the test voltage by the current variation, you will find the effective resistance of the CCS. You will also notice this resistance changes with collector voltage, due to Early effect. If you perform an FFT on the current you will find distortion also varies with collector voltage.
Some of these things can be difficult in transient analysis, so use AC analysis. Now the DC operating points will be ignored and only the AC magnitude of the signals will be displayed. Ohm's law still applies so if you divide voltage by current again you will get a graph of resistance vs. frequency. Some sources have better HF performance than others, which is another dimension of CCS design (however you will see this applies to almost everything else you do when designing an amplifier). One thing to watch for is spikes/resonances in the MHz range. Some precision sources exhibit this, and it can totally ruin the stability of an otherwise well-tuned amp. Some can even oscillate. It is important to have a fast scope (say >20MHz) so oscillation can be detected, as small-signal components can oscillate at VHF, and this will ruin the performance of an otherwise excellent amp, and be misleading for someone intending to design one.
Experiment with the different CCS circuits here and when one rises above the rest, try to figure out why.
To see a transistor's Early specs more directly, in the datasheets there is a graph usually labeled "Ic vs. Vce" which will show most transistors perform best with at least about 2V Vce. PNP transistors generally have worse Early effect than equivalent NPN's.
The same logic that applies to the CCS also applies to distortion in a current mirror (I prefer the Widlar, because Early effect distortion tends to be far worse than Ib errors; at least Ib is mildly linear).
Don't take what I say too seriously. I learned everything I know just fooling around, and it is an effective mode of learning.
- keantoken
- Status
- Not open for further replies.