How to measure phase margin of an amplifier?
 User Name Stay logged in? Password
 Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read Search

 Solid State Talk all about solid state amplification.

 Please consider donating to help us continue to serve you. Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
 27th January 2009, 07:27 PM #1 ojg diyAudio Member   Join Date: May 2003 Location: Norway How to measure phase margin of an amplifier? Hi! How do you guys measure the phase margin of an amplifier? I don't want to make an amplifier that risk becoming unstable, and I don't want to overcompensate the amp with a too low dominant pole. Without access to a network analyzer, how do you do this? I found an article here that describes a method for measuring the phase margin of a power supply feedback loop, and I suppose this would for for an amplifier also. They are using a transformer to inject a signal, what type of transformer do you think would be suitable? I suppose a good indication of stability can be made by looking at the response to a small signal squarewave. If it rings it's phase margin is probably too low, right? But is this method accurate enough? Anyone here who can point me in the right direction? Regards, OJG
 27th January 2009, 07:34 PM #2 PMA   diyAudio Member     Join Date: Apr 2002 Location: Prague You should really measure the loopgain, with open loop. Depends on the circuit you have. In case it has a DC servo, it is often possible to measure with open FB loop and keep the DC points.
 29th January 2009, 01:32 PM #3 ojg diyAudio Member   Join Date: May 2003 Location: Norway Hi PMA, Yes it really is loop-gain that I am trying to measure and if one can make the amp work without feedback then that is probably the most accurate method. Problem is though that if the loopgain is high, say 80-100dB then even a tiny bit of noise on it's input will make it saturate. How can you avoid this? The amp that I want to measure does not have a DC servo, but I suppose I could rig one up just for the measurement. Brgds, OJG
 30th January 2009, 11:24 PM #4 djoffe   diyAudio Member   Join Date: Oct 2008 stability Injecting square waves and looking at ringing is an excellent technique. Injecting a small hf squarewave on top of a large low frequency sinewave is also very good, as it shows you stability at many operating currents. The network analyzer method of measuring the loop gain is a great one also. Any kind of transformer works fine, because you make A/R measurements in the network analyzer, which takes the xfmr characteristics out of the picture. Now, you might argue that if the transformer had a lot of leakage inductance, you could make the amp unstable. Easy way to deal with this is to put 50 Ohms (or less) across the transformer winding which goes in series with the feedback.
 18th January 2010, 01:21 PM #5 jackinnj   diyAudio Member     Join Date: Apr 2002 Location: Llanddewi Brefi, NJ Similar to the way that you measure the phase margin of a power supply -- I posted this link last week to a video from Frederick Dostal of National Semi -- http://www.diyaudio.com/forums/power...how-video.html Measure power-supply loop transfer | Test & Measurement World Measure power-supply loop transfer - 2008-09-01 06:00:00 | Test & Measurement World In a power supply you interrupt the voltage to the error amplifier. In an amp you measure the magnitude and timing between the input and output signals -- there are ways to do this without an oscilloscope -- this application note by intersil uses one of their specialty transistors, but you can just as easily use high speed comparators: http://www.intersil.com/data/an/AN9637.pdf -- there was also a "phase meter" in Audio Amateur decades ago which used run-of-the mill comparators -- Last edited by jackinnj; 18th January 2010 at 01:33 PM.
Bob Cordell
diyAudio Member

Join Date: Sep 2006
Quote:
 Originally Posted by ojg Hi! How do you guys measure the phase margin of an amplifier? I don't want to make an amplifier that risk becoming unstable, and I don't want to overcompensate the amp with a too low dominant pole. Without access to a network analyzer, how do you do this? I found an article here that describes a method for measuring the phase margin of a power supply feedback loop, and I suppose this would for for an amplifier also. They are using a transformer to inject a signal, what type of transformer do you think would be suitable? I suppose a good indication of stability can be made by looking at the response to a small signal squarewave. If it rings it's phase margin is probably too low, right? But is this method accurate enough? Anyone here who can point me in the right direction? Regards, OJG
Let's say that your exiating gain crossover frequency is fc. Let's also assume that your feedback network has a flat frequency response (e.g., no lead capacitor, etc.) Change the feedback network to increase closed loop gain by a factor of ten. Measure the input-output phase of the amplifier at fc. This measurement must be performed absent any input low-pass filtering on the amplifier. This I/O phase measurement at fc will get you fairly cloase to the amount of open-loop phase lag at fc. If you measure 90 degree lag at fc, your phase margin is about 90 degrees. If you measure 135 degree lag at fc, your phase margin is about 45 degrees.

Another test is as follows: Add a pole in the feedback loop at twice fc and decrease closed loop gain by 1 dB. If the amplifier does not oscillate, you have at least 22 degrees of phase margin. This of course is not enough. Next, put a pole in the feedback loop at fc and decrease closed loop gain by 3 dB from its design value. If the amplifier does not oscillate, you have at least 45 degrees of phase margin. This whole approach is based on how much lagging phase shift an additional pole adds to the feedback loop and by how much that pole decreases the loop gain. By reducing the closed loop gain setting, we are compensating for the decrease in loop gain at fc caused by the introduction of the pole, leaving only its lagging phase effect.

Cheers,
Bob

 18th January 2010, 07:36 PM #7 ojg diyAudio Member   Join Date: May 2003 Location: Norway Wow! Thank you both for replying to this old thread! This is exactly the kind of answer I was hoping for, a measurement method that works with just common tools such as scope and signal generator. Thanks again, OJG
diyAudio Member

Join Date: Jan 2002
Location: Earth
Quote:
 Originally Posted by ojg I suppose a good indication of stability can be made by looking at the response to a small signal squarewave. If it rings it's phase margin is probably too low, right? But is this method accurate enough?
The closed-loop response is the best approach to testing stability because the closed-loop behaviour cannot entirely be predicted from open-loop, especially as you have to modify the circuit to make it work in open-loop. After all, the point is not to achieve a particular phase margin (whose prescribed values presuppose an ideal 2nd order system) the point is to achieve a stable closed-loop behaviour. The textbook phase margin target is just a rule of thumb to help you get a reasonable closed-loop response. It can be instructive to look at the OL response to check it is what you expect, but don't rely upon it.

Phase margin is not the whole story when it comes to NFB amplifiers. The circuit can be unstable in ways that are not shown by a simple phase margin measurement. So it is worth really stressing the circuit to try to make it squeal.

Keep everything about the circuit unchanged if you can. If you remove the input filter this may change the stability. You don't need a transformer. You can inject a signal into the feedback at the subtractor input via a big resistor in series with a cap. You just need to give it a sharp kick and see how it reacts.

No one has mentioned loading. You need to make sure you have adequate phase margin into all realistic loads that your amp will drive. This typically means anything between say 1 ohm resistive and no load, and a selection of capacitive loads ranging from, say, 1nF to 10uF. This is a Krell style test.
But be careful because some NFB circuits are only marginally stable and can burst into full power oscillation at several MHz when faced with a capacitive load, even with no input signal. So you may blow your transistors up. To mitigate this, put high-power resistors in series with the psu connections to the output transistors, say 10-ohms. When you first attach caps to the output they will save your transistors if the amp goes mad. Short the safety resistors if it is ok and retest.

Also, a well-implemented NFB amp with no input connected should sound virtually silent even with your ear stuffed into the loudspeaker drivers. You should have no hum at all. The tweeter will have a very faint hiss. Once you connect a pre-amp or other input device you should expect an increase in hiss and maybe a little hum. But not the sort of hum you can hear from more than a foot away.

Good luck,
Brian
__________________
Everything matters.

Last edited by traderbam; 18th January 2010 at 10:28 PM.

syn08
diyAudio Member

Join Date: Aug 2005
Location: Toronto
Quote:
 Originally Posted by traderbam 1. The closed-loop response is the best approach to testing stability because the closed-loop behaviour cannot entirely be predicted from open-loop, especially as you have to modify the circuit to make it work in open-loop. 2. After all, the point is not to achieve a particular phase margin (whose prescribed values presuppose an ideal 2nd order system) the point is to achieve a stable closed-loop behaviour. 3. The textbook phase margin target is just a rule of thumb to help you get a reasonable closed-loop response. 4. It can be instructive to look at the OL response to check it is what you expect, but don't rely upon it. 5. Phase margin is not the whole story when it comes to NFB amplifiers. 6. The circuit can be unstable in ways that are not shown by a simple phase margin measurement. So it is worth really stressing the circuit to try to make it squeal. Keep everything about the circuit unchanged if you can. 7. If you remove the input filter this may change the stability. 8. You don't need a transformer. You can inject a signal into the feedback at the subtractor input via a big resistor in series with a cap. 9. You just need to give it a sharp kick and see how it reacts.
Wow Brian, this requires tons of explanations...

1. Short of loop breaking effects (that can always be minimized if you know what you are doing), why?

2. Why not?

3. Why? Would you suggest that a design with low measured phase margin has any chance to be unconditionally stable?

4. Why? We are talking about stability, isn't it?

5. And what's the rest of the story?

6. How is different from the phase margin issue? If an amp is unstable in capacitive loads, this will show in the phase margin as well.

7. How/why?

8. Indeed, you don't necessary need a transformer, but I don't understand your suggestion. Care to explain?

9. Huh?

My only extra comment is that measuring the phase using a scope is impossible to any useful degree of accuracy.

 18th January 2010, 11:10 PM #10 tomchr   diyAudio Member     Join Date: Feb 2009 Location: Calgary If we're isolating the debate to stability only, then implementing a circuit with a reasonable phase margin and gain margin should be the goal. With PM > 0 and GM < 0, the amp is stable. Most people would prefer some margin, though... However, if the debate is expanded to include amplifier closed-loop transient response, then PM does not tell the entire story. Most textbooks include calculations of the Q and overshoot as function of PM. Those equations are only valid for 2nd order systems. Most amps are higher order than this. An amp can have PM > 45 deg but a not-so-well behaved transient response. This is usually resulting from high frequency poles or - even worse - from right half-plane zeros. In many cases, I've found that amps may have excellent PM but marginal GM. These amps tend to show more HF ringing on transients than those with excellent PM and excellent GM. In the op-amps and voltage regulator circuits I've designed, I've usually aimed for a PM of at least 60 degrees (worst case). I use AC analysis as it tends to be one of the fastest simulation types. But I also look at the transient response. This exercise is then repeated in the lab once I get the circuit built. Having access to a network analyzer does have its advantages... ~Tom

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Site     Site Announcements     Forum Problems Amplifiers     Solid State     Pass Labs     Tubes / Valves     Chip Amps     Class D     Power Supplies     Headphone Systems Source & Line     Analogue Source     Analog Line Level     Digital Source     Digital Line Level     PC Based Loudspeakers     Multi-Way     Full Range     Subwoofers     Planars & Exotics Live Sound     PA Systems     Instruments and Amps Design & Build     Parts     Equipment & Tools     Construction Tips     Software Tools General Interest     Room Acoustics & Mods     Music     diyAudio.com Articles     Car Audio     Everything Else Member Areas     Introductions     The Lounge     Clubs & Events     In Memoriam The Moving Image Commercial Sector     Swap Meet     Group Buys     The diyAudio Store     Vendor Forums         Vendor's Bazaar         Sonic Craft         Apex Jr         Audio Sector         Acoustic Fun         Chipamp         DIY HiFi Supply         Elekit         Elektor         Mains Cables R Us         Parts Connexion         Planet 10 hifi         Quanghao Audio Design         Siliconray Online Electronics Store         Tubelab     Manufacturers         AKSA         Audio Poutine         Musicaltech         Holton Precision Audio         CSS         exaDevices         Feastrex         GedLee         Head 'n' HiFi - Walter         Heatsink USA         miniDSP         SITO Audio         Twin Audio         Twisted Pear         Wild Burro Audio

 Similar Threads Thread Thread Starter Forum Replies Last Post mclarenpingu Solid State 27 3rd March 2008 08:44 AM davidallancole Solid State 4 19th December 2007 06:18 AM pooge Solid State 47 14th July 2007 09:11 AM

 New To Site? Need Help?

All times are GMT. The time now is 12:15 PM.