My First Amplifier Design

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
... A quick sim suggests that TPC is a distinct possibility...


With your hint, so I tried TPC again, and is able to gain some meaningful result this time, but I do have some questions:
  • I’m not quite sure what phase margin and gain margin I can consider safe, so I Google up a few articles about Nyquist Stability Criterion and surprisingly, some of them actually recommends a phase margin as low as 60 deg (to get a Butterworth like filter response) and a gain margin of 5-14 dB. That seems a bit too low, but I’m not sure.
  • I noticed that if I increase the OLG @20KHz by 30dB (hence 30dB more negative feedback @20K), the THD20K only reduces by 12dB. I’m wondering what THD improvement one could expect, per dB increase of negative feedback, and whether it’s also dependent on the topology.
BTW, those articles also state that phase margin and gain margin are only necessary condition for stability, but they’re actually not the sufficient condition – so one can never be sure until a prototype is built :confused:
 
[*]I’m not quite sure what phase margin and gain margin I can consider safe, so I Google up a few articles about Nyquist Stability Criterion and surprisingly, some of them actually recommends a phase margin as low as 60 deg (to get a Butterworth like filter response) and a gain margin of 5-14 dB. That seems a bit too low, but I’m not sure.

I think 60 and 10 dB is about the practical minimum.
I initially recommended as low as 6 dB but after I looked at some of Toni's real tests I have become more conservative.
But the point to watch out is that an amp can look wonderfully stable under ideal conditions (around 0 V with a perfect 8 ohm load) and become unstable as it nears the rails or with a realistic load.
So you will certainly need more than 60 & 10 dB under "normal" conditions to have adequate stability in reality.
Expect a well founded tirade from Ric Lee about the importance of full tests under different loads, mains power droop, worst case transistors etc.;)
There was also a bit of explanation in Paul's "Lunch Break" thread about my method to test some of this.

[*]I noticed that if I increase the OLG @20KHz by 30dB (hence 30dB more negative feedback @20K), the THD20K only reduces by 12dB. I’m wondering what THD improvement one could expect, per dB increase of negative feedback, and whether it’s also dependent on the topology.

How did you increase the OLG?
If you reduced the compensation on the inner loop to increase the OLG then that makes the inner loop less ideal and this means the distortion does not drop overall as much as you expect.

BTW, those articles also state that phase margin and gain margin are only necessary condition for stability, but they’re actually not the sufficient condition – so one can never be sure until a prototype is built :confused:

Theoretically the correct test is how close the Loop Gain passes to the so called "critical point" This is shown on a Nyquist plot (optional way to display in LTSpice).
This can also be shown on a Nichols plot (that LTSpice doesn't do, I want to fix that).
But practically any real Loop Gain plot will be sufficiently smooth that the amp will be stable if PM > 60 and GM > 10 dB.

Best wishes
David
 
Last edited:
I think 60 and 10 dB is about the practical minimum.
I initially recommended as low as 6 dB but after I looked at some of Toni's real tests I have become more conservative.
But the point to watch out is that an amp can look wonderfully stable under ideal conditions (around 0 V with a perfect 8 ohm load) and become unstable as it nears the rails or with a realistic load.
So you will certainly need more than 60 & 10 dB under "normal" conditions to have adequate stability in reality.
Expect a well founded tirade from Ric Lee about the importance of full tests under different loads, mains power droop, worst case transistors etc.;)
There was also a bit of explanation in Paul's "Lunch Break" thread about my method to test some of this.



How did you increase the OLG?
If you reduced the compensation on the inner loop to increase the OLG then that makes the inner loop less ideal and this means the distortion does not drop overall as much as you expect.



Theoretically the correct test is how close the Loop Gain passes to the so called "critical point" This is shown on a Nyquist plot (optional way to display in LTSpice).
This can also be shown on a Nichols plot (that LTSpice doesn't do, I want to fix that).
But practically any real Loop Gain plot will be sufficiently smooth that the amp will be stable if PM > 60 and GM > 10 dB.

Best wishes
David
If one has an amp on the bench and found a no overshoot condition when Open Loop Gain (OLG) and Closed Loop Gain (CLG) are fixed at their target values.
Can one adjust the CLG to determine, or estimate, the stability margins?
eg.
OLG ~90dB @ LF and falling to a 0dB level at around 1Mhz to 10MHz.
CLG set to +30dB.
Reset CLG to +15dB and one sees 5% overshoot on a 30kHz sqw.
Does that tell us anything about the stability margins?
Is there a simple way using a scope to "see" the margins built into the amp?
 
...Can one adjust the CLG to determine, or estimate, the stability...?
Reset CLG to +15dB and one sees 5% overshoot on a 30kHz sqw.
Is there a simple way ...to "see"...?

The overshoot, if any, with the CLG at it's nominal value already provides some information about the PM.
The literal way to test the GM would be to drop the CLG and when the amp oscillates then the reduction in Gain required was the GM.
A bit hard on the amp of course, so you could drop the gain only until some specified level of overshoot and that could provide an approximation, with a bit of calculation.
A Miller compensated amp would have quite a different GM from an amp with more advanced compensation even if their PM and stability were practically matched.
This may be useful to check the Bode Step of an advanced amp matches the simulation, but I have never actually tried it, will keep it in mind.

Best wishes
David
 
That seems to confirm that the gain margin can be estimated using the lowered CLG method.

About the phase margin.
for the "simple" compensated amp where Miller comp swamps other roll offs:
If no overshoot on the target CLG, and small overshoot on the lower CLG, one can "see" that phase margin exceeds 60°. Is that at the lower CLG or at the target CLG?

Can we estimate for this "simple" compensation, what the phase margins are at a lower CLG and at the target CLG from the size of the overshoot?

Still with the "simple" compensation, can there be hiding behind that miller loop, another loop that has a stability problem that won't be revealed by the lower CLG method?
 
Last edited:
Cwtmo1, regarding test dummy loads, there are so many way to form these... Large wire wound to bolt on types with fan cooling and added displays/ plenty of speaker connections...

Thanks Andrew, following amptech's reminder I bought the pair of heatsinks from online stores in China (they are defective products in anodizing so very cheap), a bit smaller than I would have liked but I plan to mount a PC cooling fan on each, then add several chassis mount type power resistor onto it to become the dummy load. I also plan to parallel a cap to it to simulate the reactive load, though I'm not very sure what value of C to use (is 100nF OK ?)
 

Attachments

  • Heatsink.jpg
    Heatsink.jpg
    227.1 KB · Views: 89
That seems to confirm...

Yes

for the "simple" compensated amp where Miller comp swamps other roll offs:
If no overshoot on the target CLG, and small overshoot on the lower CLG, one can "see" that phase margin exceeds 60°. Is that at the lower CLG or at the target CLG?

If the compensation is truly simple (first order) then the overshoot will not alter as the CLG is altered.
So it will be the same at either CLG.
Any variation in the overshoot is a measure of how far the compensation departs from simple.

Can we estimate for this "simple" compensation, what the phase margins are at a lower CLG and at the target CLG from the size of the overshoot?

The overshoot at a particular CLG tells you the PM at that CLG.
No overshoot is ~ 75.
9% overshoot is ~ 60.

Still with the "simple" compensation, can there be hiding behind that miller loop, another loop that has a stability problem that won't be revealed by the lower CLG method?

It's late here. More tomorrow.

Best wishes
David
 
Last edited:
If I have a fast enough signal generator (say, up to 25MHz), can I just increase the frequency until the signal inverts (180 deg out of phase), then calculate the GM by the reduction of signal magnitude.

No.
What you will see will be a function of the Closed loop response.
This is not the same as the Gain within the loop, called the "loop gain".
Unfortunate choice of words because they are easy to confuse.
Plus even some textbooks don't use them consistently, just to add to the confusion.
Rather than loop gain, I like to use the term "Return Ratio" because Bode was careful to define it very precisely, even for complicated, multiple interconnected loops.

Best wishes
David
 
...Still with the "simple" compensation, can there be ... another loop that has a stability problem that won't be revealed by the lower CLG method?

There are some stability problems that are mathematically possible but should not occur in a normal audio amp.
So the short answer is that I think practical stability problems should be visible in the closed loop response especially if you check with lower CLG too.
This is an empirical result rather than a proof but I understand it is also Bob Cordell's opinion and he has a fair bit of practical experience to back it up.
I have also discussed this with Ric Lee, whose experience includes professional development of amps.
I have started to understand this better and hope to have more definitive answers about what sort of peculiarities would invalidate the rule.

Best wishes
David
 
I’m not quite sure what phase margin and gain margin I can consider safe, so I Google up a few articles about Nyquist Stability Criterion and surprisingly, some of them actually recommends a phase margin as low as 60 deg (to get a Butterworth like filter response) and a gain margin of 5-14 dB. That seems a bit too low, but I’m not sure.
I explain the true significance of PM & GM in post #412 of tpc-vs-tmc-vs-pure-cherry

There's loadsa useful stuff on stabilty on this huge thread around that post. Only a bit of pseudo guru noise :D

PM, GM & Nyquist are also affected by loads. You need to look at what happens when you have different loads. For amps with the usual 10R + 100n Zobel and ?uH // 10R Thiele network, the nastiest loads for stability are NOT the >1uF that some pseudo gurus test with ... but plain 1n - 10n caps.

But PM, GM & Nyquist are linear measures of stability. They assume the transistor parameters don't change. Checking that no peaking takes place via Nyquist or Closed Loop frequency response isn't sufficient.

eg at higher currents, hfe & ft will drop .. especially with power devices. Self & Cordell discuss this. And the loop parameters certainly change on overload :eek:

You need to do .TRANS with all the wonky loads too, at various frequencies & levels and also see what happens when the amp overloads.

Some topologies, eg Blameless in most of my examples in the TPC vs TMC vs 'pure' Cherry thread, react badly under these conditions.[*] For these, it is sensible to get further away from (-1,0) ie more PM & GM.

You can probably get away with less if you use mj3281/1302 instead of 21194/21193 as there's less hfe drop with current.

So there isn't a simple single figure for good PM & GM. But if that's your ONLY measure of stability, you'd better make those margins AT LEAST as large as what Guru Zan recommends.

The bigger margins allow for
  • differences in individual transistor parameters
  • changes in parameters with current, thermal & signal history bla bla
  • wonky loads that you haven't simulated or tried in real life
  • parasitic inductances & capacitance from your layout which you haven't allowed for.
In my 1990's experience with commercial amps, wonky loads introduce more variation than transistor variations but take this with a very big pinch of salt. :)

I think you'd learn more by trying all the above WHICH YOU NEED TO DO IN REAL LIFE.


[*] That's not to say Blameless can't be used for good amps. Toni's amp is a refined Blameless with excellent performance. But note the effort required to ensure exemplary behaviour.
_____________________

practical stability problems should be visible in the closed loop response especially if you check with lower CLG too.
Checking stability by changing the loop gain used to be common in da valve days but is much less practical today.

Transistors are much more likely to object to a bit of oscillation than EL34s and release the Holy Smoke.

Also, all the 'advanced compensation schemes' are only conditionally stable.

Their Nyquist approaches the origin from the LHS ie Phase is about 180 (Loop Gain falls at 12dB/8ve) and then kinks, I mean a Bode Step avoids (-1,0) with nice PM & GM.

Changing Closed Loop Gain, expands or contracts the whole Nyquist curve and (-1, 0) may then fall on the wrong side.
 
Last edited:
Hi Ric
Did you read my earlier post;)

...Expect a well founded tirade from Ric Lee about the importance of full tests under different loads, mains power droop, worst case transistors etc.;)

...Transistors are much more likely to object to a bit of oscillation than EL34s and release the Holy Smoke.

I chose my words with care when I wrote that theoretically you could reduce the gain until the amp oscillated and that was the GM.

all the 'advanced compensation schemes' are only conditionally stable.

This is not true. I have discussed this recently and posted the loop plots of my development project to confirm it.

Best wishes
David
 
all the 'advanced compensation schemes' are only conditionally stable.

This is not true. I have discussed this recently and posted the loop plots of my development project to confirm it.

#24 middlebrook-gft-probe

As your Tz0() & Tz1() have phase just 10 degrees from 180 at 100kHz & 6MHz respectively, it is very likely the 'real life' amp will be only conditionally stable. :)

But I'm a very poor pedant so please take my remarks as simply a caveat to testing GM by changing the Closed Loop gain of a transistor amplifier ... as you would do with a valve amp. Unless you don't mind permanent loss of the Holy Smoke :eek:
 
...As your Tz0() & Tz1() have phase just 10 degrees from 180 at 100kHz & 6MHz respectively, it is very likely the 'real life' amp will be only conditionally stable.

At the respective minimum phase point I have about 60 dB of "inverse" GM on the outer loop and 40 dB on the inner.
This is an enormous GM, so it wouldn't matter in the least if the amp was indeed conditionally stable.
But the point is that conditional stability is not inherent to advanced compensation, one can choose to have it or not, and one can choose to what extent.
I somewhat arbitrarily decided to make the amp unconditionally stable, not least because it's simpler to explain.;)
The 90 PM at nominal conditions means I still have adequate PM as it comes close to the rails or with difficult loads.
But yes, I would be careful to use Gain reduction to test any transistor amp, still could be educational to look at overshoot as gain reduction approaches the GM.

Best wishes
David
 
Last edited:
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.