# Concrete Explanation of Phase Margin

1. ## Concrete Explanation of Phase Margin

I have read numerous posts on this site and others around the meaning and interpretation of phase margin. This is something I didn't question much in school, but I find myself now wanting a better understanding. Most explanations of phase margin seem to revolve around two arguments:

1) When the open loop gain Aβ has a real value of -1, then the closed loop transfer function A / (1 + Aβ) is infinity!

2) Feedback becomes positive at -180 degrees phase shift, and so any open loop gain greater than 0db at anywhere greater than -180 degrees phase shift causes instability.

My question is this: is it ONLY the special #1 case (EXACTLY -1 for a value of Aβ that causes infinite gain) that causes instability, or is it the more general #2 case? Let me rephrase another way: if I was able to implement an Aβ network that exhibited a constant phase delay across all frequencies of -200 degrees, then would I see closed loop instability assuming the magnitude of Aβ is much greater than 0db?

Bonus: what about positive angles? Can I think of +10 degrees on a bode plot the same as -350 degrees? If so, if I my Aβ has a constant phase shift of +10 then does that mean my closed loop would be unstable?

I'm anxious for some wisdom from the group :)

•

2. ## Re: Concrete Explanation of Phase Margin

Hi circuitdude,
just for clarification and in order to avoid misunderstandings:
The given expression of the closed-lop function indicates that the sign inversion (due to negative feedback) is already included.
In this case, the product beta*A is not the loop gain. It is a common agreement that the term "loop gain" includes the "-" sign.

Now - the stability criterion requires that for a loop gain phase of -360 deg (identical to 0 deg) the loop gain magnitude must be already blow 0 dB.
(identical to -180 deg for the product beta*A).

That means: Your case 1.) is identical to the oscillation condition and case 2.) is the condition for instability.
To your last question: yes, a phase of +10 deg is identical to -350 deg.
Further questions?

3. ## Re: Concrete Explanation of Phase Margin

circuitdude,

The stability criterion was specified by Nyquist: that, for stability, the Nyquist plot of the loop gain must not encircle the point (–1,0) in a clockwise direction; every clockwise encirclement of the (–1,0) point corresponds to a RHP pole. If the loop gain instead intersects (–1,0) then this corresponds to a resonant peaking in the closed loop response (i.e., a "marginally stable" system rather than unstable).

I typed up an explanation, but it was really long and kinda confusing so I decided to leave it out of this post. You can find explanations online and in textbooks. Just know that the loop gain making a clockwise encirclement of (–1, 0) indicates an unstable system. Drawing a unit circle around the origin serves as a handy guide in giving a sense of when the loop gain has unity magnitude.

From this we see that argument #2 is technically incorrect. It's easy to imagine a Nyquist plot which doesn't encircle the point (–1, 0) (i.e., it dips inside the unit circle at 180°) but which grows back outside the unit circle at phases greater than 180°. Such a system would be stable, as long as it doesn't encircle (–1, 0) on its second pass (540°) or its third pass (900°), etc. In other words, the true test for instability is to see if the magnitude is greater than unity at the exact same time that the phase is inverted. And I don't mean "close to inverted;" I mean perfectly inverted. A system with two integrations, such as a PLL, can be made stable despite having large gain at low frequencies, with a phase lag of nearly 180°.

Now, assuming you already have a stable system, there are several ways to see how close to instability it is. Phase margin is a pretty popular one. Argument #1 relies on this—that as T approaches –1, the response blows to infinity. On the Nyquist plot, the closeness to instability can be seen by finding the closest point along the graph to (–1, 0) and measuring that distance—that's often called the "stability margin." Remembering that the closed loop will have a transfer function scaled by 1/(1+T), we see that the frequency at which T is closest to –1 is the frequency at which the closed loop response will exhibit the greatest peaking. It's easy to imagine a Nyquist plot which shows good phase margin, but yet poor stability margin. It is for this reason that users of the phase margin metric would be wise to also have a look at gain margin too before declaring a system stable with good margin.

It is apparent that phase margin and gain margin are not the true metrics for stability; the stability margin is. Although it is possible to imagine a system which has good phase and gain margin yet poor stability margin, the vast majority of systems don't exhibit this strange behavior. For this reason, phase and gain margin are still popular and useful. Just don't assume that good gain margin will yield good phase margin, or vice versa.

Phase and gain margin are popular because they can be more readily understood than stability margin, because it's easy to see how component variations would cause changes in phase and gain margin, and because they are performed on plots that show frequency (having frequency information is quite helpful).

You can also evaluate a system's stability by closing the loop, giving it an excitation, and probing for peaking. In the frequency domain, a high Q would indicate poor stability, as is indicated in the time domain if the system rings for multiple cycles before settling down. In fact, for most systems the truest measure of stability is a series of closed-loop, time-domain transient tests because they can uncover instabilities caused by nonlinearity as well.

4. ## Re: Concrete Explanation of Phase Margin

Hello ZekeR,

Quote: "Nyquist plot of the loop gain must not encircle the point (–1,0) "

As I have mentioned already, to avoid misunderstandings it is necessary to be exact.
What is the thing called "loop gain"? It is the gain of the open loop including the sign inversion!
The reason is simple: In many cases there is no differential input allowing identification of the inverting input node.

Therefore the correct formulation of the criterion is:
* The Nyquist plot of the product (beta*A) must not encircle the point (-1,0), or
* The Nyquist plot of the loop gain must not encircle the point (+1,0).

More than that, (Quote): "If the loop gain instead intersects (+1,0), " the circuit is NOT "marginally stable" , but at the limit of stability, which is identical to the condition of oscillation.
"Marginally stable" means something else.

But, in general, I agree with you that the most rigorous formulation of the stability criterion is based on the Nyquist plot.
However, in many cases - in particular for opamps with feedback - a simpler formulation/measurement is possible based on the BODE plot (as indicated by circuitdude).

LvW

2 members found this post helpful.

•

5. ## Re: Concrete Explanation of Phase Margin

Thank you both very much for the detailed responses. They certainly help -- especially the realization that the point where the real part of Aβ = -1 is the criteria for oscillation, while greater angles at >0db result in instability. This is my first post to this community and I'm really excited to find a group of like-minded engineers.

I am familiar with the nyquist criterion and nyquist plots. However, my real goal through this post is to not simply understand how do predict instability, but to also understand why it is happening in an intuitive way. Said another way, I'm still searching for a better answer to why instability occurs than "because I drew a line on a plot and it circled this point..."

After some thinking, I'll take a stab at what's going on in the time domain. If I look at only a single input frequency to my closed loop control system, then the Aβ network has a certain phase delay and gain for that frequency. Let's assume the gain is >>0db so we can focus on the phase delay part. Taking very tiny time steps around the loop, if my Aβ phase contribution is -170 degrees (ok, -350 degrees around the entire loop) and the t0 feedback signal is 0V, then the first feedback signal produced is Vin |Aβ| at -170 degrees. My first error signal is then a vector subtraction of Vin and the feedback signal, which will be somewhere close to but not exactly +170 degrees (say 168 degrees). Around the loop the next time, the -170 degree delay caused by Aβ will put the feedback signal at somewhere just under 0 degrees (say -2 degrees). The result of the vector subtraction now produces an error signal of somewhere around +1 degrees. During the entire process, subsequent error vectors get shorter as a result of the negative feedback.

If I continue on with this, we can see a pattern of oscillating but damped phase that will eventually settle to zero as the error is reduced. I assume that if I do the same for a phase of >-180 degrees (>-360 around the entire loop), then we'll see growing error vectors with similarly varying phase angles depending on the Aβ network phase delay.

I'm aware that taking these tiny time steps is attempting to make a continuous process discrete, but I think that an understanding of what's going on in the time domain is what I'm looking for.

•

6. ## Re: Concrete Explanation of Phase Margin

Circuitdude, I appreciate your desire to understand what`s going on in the time domain. However, for my opinion it is somewhat "problematic" - as mentioned by you - to make such a process in a closed loop "time discrete".

To me it seems to be more simple to start at the point of oscillation:
* If the loop gain is "+1" (which means real with 0 deg phase shift) it is clear that the circuit produces its own output signal with the correct amplitude and phase. Thus, we have oscillations.
* For 0 deg phase shift and a loop gain magnitude larger than 0 dB, we have increasing oscillations until the amplitude is limited by any non-linear device (e. g. power rail). As you probably know, this effect causes the necessity to provide an amplitude-limiting part or a sepate AGC loop if a sinusoidal signal is desired.
* If the loop gain is below unity for 0 deg phase shift, we have decaying oscillations.
* For all frequencies with a loop phase other than 360 deg (resp. 0 deg) no self-excitement is possible, however, the closed loop transfer function may exhibit some peaking (step response with ringing).

For your understanding: negative feedback is necessary for dc to have a stable bias point. But each negative feedback will turn into positive feedback for higher frequencies (and if the system order is larger than 2, which is always the case for real systems). But this will cause no problems if the loop gain magnitude is already small enough (for these large frequencies).

LvW

2 members found this post helpful.

7. ## Re: Concrete Explanation of Phase Margin

I appreciate your time; I'll stew on this for a while and reply with any additional questions or insights.

Thanks again.

8. ## Re: Concrete Explanation of Phase Margin

LvW,

"What is the thing called "loop gain"? It is the gain of the open loop including the sign inversion!" - Fair enough; the way I was taught, loop gain was defined not to include the sign inversion since negative feedback was assumed. Including the sign inversion as you suggest would permit systems with positive feedback to be analyzed more naturally.

"More than that, (Quote): "If the loop gain instead intersects (+1,0), " the circuit is NOT "marginally stable" , but at the limit of stability, which is identical to the condition of oscillation." - You know what, I agree with you here. "Marginally stable" is the term they used in school to describe an oscillating system, but it's actually a very bad description. It would be better to say such a system is "undamped," and reserve "marginally stable" for systems that are actually stable but with poor margin. Unfortunately, it seems these terms were invented and popularized by academia, who don't understand the need for margins in engineering; as you can see, the Wikipedia for marginal stability defines it the way I learned in school. The terms were probably invented by mathematicians.

circuitdude,

"However, my real goal through this post is to not simply understand how do predict instability, but to also understand why it is happening in an intuitive way." - Sorry, I thought your intent was to see which of the conditions for stability that you had seen offered before was actually correct, and that required a Nyquist based explanation.

LvW's explanation with bullet points is remarkably good.

I think the best time-domain explanation I can offer for the moment is this: imagine you're flying an airplane and you're trying to land. When you push down on the stick, the plane starts to nose down but there's a delay. If you didn't realize the effects of this delay, you might push down too hard trying to nose down. After some time, the plane would nose down—and it would overshoot the desired amount, nosing down even more. If you overreacted to this (which you probably would, since you're going to crash), you'd pull up. The plane wouldn't start correcting immediately, so you'd pull up harder and harder. Finally, when the plane pulled up, it would overshoot again and the process would repeat. You'd overreact to the excessive nose-up, since you don't want to stall (and a stall would cause you to crash). Basically, this instability is caused by overreacting—having too much gain when the delays of the system would conspire to make your reaction reinforce the oscillation. To illustrate, you can actually find videos on Youtube of PIO—pilot induced oscillation =).

To correct for this, you can decrease the magnitude of your reaction. This slows down the effect of your response, but ensures you don't respond strongly in a way that will destabilize the system. Alternatively, you can introduce a zero—your high speed response could be based not on the current nose position, but on where it is going to be. In other words, you'd be reacting to the nose position's derivative. This gives you the extra phase needed for stability at high reaction speeds.

9. ## Re: Concrete Explanation of Phase Margin

Originally Posted by ZekeR
....the way I was taught, loop gain was defined not to include the sign inversion since negative feedback was assumed.
Considering how loop gain is to be measured or simulated - it is clear that it must include the sign inversion. Otherwise, the well-known oscillation condition (loop gain=1) would not apply.
This is also in accordance with the definitions to be found in (relevant) textbooks.

Originally Posted by ZekeR
. "Marginally stable" is the term they used in school to describe an oscillating system, but it's actually a very bad description. It would be better to say such a system is "undamped," and reserve "marginally stable" for systems that are actually stable but with poor margin.
There is a clear definition of "marginal stability" (also called "conditionally stable"): It is a stable closed-loop system that becomes unstable in case the loop gain is REDUCED. This is in contrast to all classical systems which become unstable if the loop gain is increased above a certain limit. In this context, I suggest not to rely too much on Wikipedia information.

Originally Posted by ZekeR
I think the best time-domain explanation I can offer for the moment is this: imagine you're flying an airplane and you're trying to land. When you push down on the stick, the plane starts to nose down but there's a delay. If you didn't realize the effects of this delay, you might push down too hard trying to nose down. After some time, the plane would nose down—and it would overshoot the desired amount, nosing down even more. If you overreacted to this (which you probably would, since you're going to crash), you'd pull up. The plane wouldn't start correcting immediately, so you'd pull up harder and harder. Finally, when the plane pulled up, it would overshoot again and the process would repeat. You'd overreact to the excessive nose-up, since you don't want to stall (and a stall would cause you to crash). Basically, this instability is caused by overreacting—having too much gain when the delays of the system would conspire to make your reaction reinforce the oscillation. To illustrate, you can actually find videos on Youtube of PIO—pilot induced oscillation =).
Yes - this is a good example that demonstrates that an unwanted or unexpected time delay (in the frequency domain equivalent to additional phase shift) does decrease the stability margin and - in the worst case - can cause instability (in your case: crash).

Regards
LvW

10. ## Re: Concrete Explanation of Phase Margin

Thanks once again for the help. I wanted to post back my final understanding both so that you can correct me if I'm wrong and to help others that might run across this post.

The key to my confusion was the concept of marginal stability noted above. At this point, I understand that:

- A closed loop system has poles wherever AB = -1, meaning the magnitude is 1 and the phase shift -180 degrees (total loop phase shift 360 degrees)
- If the magnitude is exactly 1 at this -180 degree angle, then the transfer function clearly balloons to infinity and the system is unstable (the system will never make progress reducing the error
- If the magnitude is lower than 1, then the closed loop system is stable as the error will reduce over time
- If the magnitude is higher than 1, then the system is conditionally stable where reduced gain (for example running into a power rail) could cause instability. So it's best not to attempt this.

I find it interesting that I have dealt with the concept of phase margin dozens of times, but never really understood this well until now. For anyone looking for additional information, this Wikipedia article on the Barkhausen stability criterion is a good start. This detailed paper on the meaning of the Laplace transform is also excellent.

•

11. ## Re: Concrete Explanation of Phase Margin

Originally Posted by LvW
There is a clear definition of "marginal stability" (also called "conditionally stable"): It is a stable closed-loop system that becomes unstable in case the loop gain is REDUCED. This is in contrast to all classical systems which become unstable if the loop gain is increased above a certain limit. In this context, I suggest not to rely too much on Wikipedia information.
According to my Signal Processing & Linear Systems book (Lathi, Oxford University Press, 1998), page 149:

Originally Posted by Lathi
To summarize:

1. An LTIC system is asymptotically stable if, and only if, all the characteristic roots are in the LHP. The roots may be simple (unrepeated) or repeated.

2. An LTIC system is unstable if, and only if, either one or both of the following conditions exist: (i) at least one root is in the RHP, (ii) there are repeated roots on the imaginary axis.

3. An LTIC system is marginally stable if, and only if, there are no roots in the RHP, and there are some unrepeated roots on the imaginary axis.
This is from the perspective of somebody who is effectively a mathematician. From our perspective as engineers though, we consider both conditions (2) and (3) unstable. I would prefer if "marginal stability" applied to systems that were actually "asymptotically stable," but with poor engineering margin. In this context, I would argue that the use of the term "marginal stability" should not be restricted to conditionally stable systems, but rather any system that could go unstable with a minor change in system parameters.

Originally Posted by circuitdude
- If the magnitude is higher than 1, then the system is conditionally stable where reduced gain (for example running into a power rail) could cause instability. So it's best not to attempt this.
Having a magnitude >1 when total phase shift is 360 degrees is not marginally stable by either definition, but rather unstable in the classical sense--even with a minuscule input with bounded energy, the output will theoretically blow to infinite amplitude (because it feeds on itself). An undamped system, on the other hand, won't blow to infinite amplitude unless the input has infinite energy--specifically, at the correct excitation frequency. (Remember that infinite energy does not mean infinite amplitude; it can be fixed amplitude for infinite time).

12. ## Re: Concrete Explanation of Phase Margin

Hi ZekeR,

I agree with everything you have written down.
LvW

13. ## Re: Concrete Explanation of Phase Margin

Hey , what's should be differenciated , error term or main signal ? The output should be time domain signal in 1D monitor in this case. the system should have more than one loop circuit , the output will have more dimension, ND for good stability take care when the excident emerge.

--[[ ]]--