Forgot to mention: maybe you already know this but the rule of thumb is that for phase margin we aim at > 60º (theoretically a system can still be stable down to 45º but that's marginal) and for gain margin some say 6 dB, some 10 dB.
That would be for actual values in a real system. In simulation, since it doesn't take into account things like wiring / PCB trace parasitics and the fact that spice models aren't actual components, you should always leave a healthy margin above those figures, say 75º / 15 dB (that's what I aim for when designing / modding a circuit). Start roughly there, build / mod the circuit, check for oscillation and/or excessive overshoot (this being directly related to phase margin) and fine-tune till you're happy the circuit is stable under all possible operating conditions but not unnecessarily over-compensated.
That would be for actual values in a real system. In simulation, since it doesn't take into account things like wiring / PCB trace parasitics and the fact that spice models aren't actual components, you should always leave a healthy margin above those figures, say 75º / 15 dB (that's what I aim for when designing / modding a circuit). Start roughly there, build / mod the circuit, check for oscillation and/or excessive overshoot (this being directly related to phase margin) and fine-tune till you're happy the circuit is stable under all possible operating conditions but not unnecessarily over-compensated.
Hi sorry for the belated reply but i was at a friends house Thank you so much againIn that plot pane, click on "V(vo)/V(x)" at the top, this will show the cursor (a dotted line cross) in the middle of the graph and a small window will pop up showing you the reading of the graph at that point. Click anywhere on the vertical line (as you approach it the mouse cursor will change from a small cross to an arrow with a "1" next to it) and drag it right until the value in "Mag." reads 0 dB. The value you can read now in "Phase" is your phase margin.
Then you click again on the cursor vertical line and drag further right until "Phase" reaches 0º. The "Mag." value (ignoring the sign) is your gain margin. In this case it looks like you will have to simulate up to a much higher frequency to get there. Note that it's possible that the phase never reaches 0º, which means that, in principle, you could reduce the closed loop gain as much as you want without going into instability.
i have a very basic question Where can i find and explanation about what Phase and Gain margins are ? I am very ignorant in the field
The idea is to do the same with the schematic of a little and simple power amp circuit
I will be using headphones to select sources and line preamp stages
I guess an headphone amp design could provide at least 5 to 10 Vrms on medium to high impedance headphones
a that point to drive a power amp will be a child game
HI ! thank you so much again I did not know at all I even did not know about marginsForgot to mention: maybe you already know this but the rule of thumb is that for phase margin we aim at > 60º (theoretically a system can still be stable down to 45º but that's marginal) and for gain margin some say 6 dB, some 10 dB.
what i know now is that to play with feedback without knowing what to do could be devastating for the amps and even dangerous
I touched the heatsink and i left my fingerprints on it What a pain Lowering the gain can increase the pain
I am guessing now but i think that increasing the gain if the amp is open loop stable should be less critical ?
i guess that all amps are open loop stable ?
i will keep that in mind for sure At present i am on holiday with friends But starting from the next week i will try a circuit taken from the service manual of something i have at handThat would be for actual values in a real system. In simulation, since it doesn't take into account things like wiring / PCB trace parasitics and the fact that spice models aren't actual components, you should always leave a healthy margin above those figures, say 75º / 15 dB (that's what I aim for when designing / modding a circuit). Start roughly there, build / mod the circuit, check for oscillation and/or excessive overshoot (this being directly related to phase margin) and fine-tune till you're happy the circuit is stable under all possible operating conditions but not unnecessarily over-compensated.
I'm not so presumptuous as to think I can now build something from the scratch The only experience i have is the assembling of some power supply kits following instructions
If I remember correctly, the very famous Nelson Pass also dealt with the maintenance and repair of audio equipment as a young man.
An excellent gym for sure
The next step once you have tested a schematic would be to try to design a PCB. But that is a step that will take time
Thanks again and have a good summer
LTspice comes with two examples "loopgain.asc" and "loopgain2.asc". The second illustrates the relatively complicated "Tian" probe which has advantages but is little different in a typical audio application and is very complicated. So, I recommend you stick with a simple "probe" as Bonsai described. But I would not short the amplifier input because the input impedance does affect the feedback, although usually not much unless the amp is very close to instability.
Conceptually, a typical amp has a dominant pole that rolls off the loop gain at 6dB/octave until additional poles increase the phase shift. The phase shift from the dominant pole alone never exceeds 90 degrees so if that dominant pole manages to reduce the gain to unity before additional phase shift happens, then you have stable feedback, but too much phase shift and loop gain is positive feedback and therefore oscillation. Setting the feedback for less gain is more feedback, more loop gain, and therefor may be unstable. Many chip amps have a minimum gain because too much feedback will make them oscillate.
Conceptually, a typical amp has a dominant pole that rolls off the loop gain at 6dB/octave until additional poles increase the phase shift. The phase shift from the dominant pole alone never exceeds 90 degrees so if that dominant pole manages to reduce the gain to unity before additional phase shift happens, then you have stable feedback, but too much phase shift and loop gain is positive feedback and therefore oscillation. Setting the feedback for less gain is more feedback, more loop gain, and therefor may be unstable. Many chip amps have a minimum gain because too much feedback will make them oscillate.
Thanks for recommanding the Tian probe method. My way to work on stability.This is an excellent reference that gives a very good theoretical background of the subject and describes in detail the Tian probe method, what I've always used in LTSpice for stability analysis with good results: https://www.iceamplifiers.co.uk/articles/stability/stability.pdf
If you want to jump straight to this, it starts on page 56, "13. Using LTSpice to plot the open loop response". The circuit shown in fig. 28 is available in the included LTSpice Examples folder, located in C:\Users\[UserName]\AppData\Local\LTspice\examples\Educational
Once you've got the OPEN loop response ( gain, phase ) how do you proceed ?
Then, I personnaly use, dB gain and phase to draw the Nyquist diagram that shows me wether or not the closed loop system is stable.
Only then, when stable, I do know, from the Nyquist diagram: The phase margin, the gain margin, the dumping factor ( Lambda in Blake abacus ).
The stability.pdf says: LTSpice can give the Nyquist diagram....Really ? How to do this ? I did not find !
So far, i do this step manually, it would save me a lot of tedious work to have LTspice do it for me.
I found how to get a Nyquist diagram in LTSpice.
Once you have an AC analysis display showing amplitude phase over some frequency range:
Move the mouse cursor beyond the left of the display, then click, this pops a menu where you can select: Nyquist.
Posting to ask....made me remember, I knew how to do it.....long ago, but that was working about Linkwitz Riley filters.
Once you have an AC analysis display showing amplitude phase over some frequency range:
Move the mouse cursor beyond the left of the display, then click, this pops a menu where you can select: Nyquist.
Posting to ask....made me remember, I knew how to do it.....long ago, but that was working about Linkwitz Riley filters.
Last edited: