# Why do I need phase margin if I know the transfer function?

What is the point of examining the phase margin (or gain margin) for a closed-loop system if I can just solve for the transfer function. The transfer function will give any poles and zeros, which can be used to know if your system is stable, the step response, etc.

In fact, the Q of a two-pole system can be solved in terms of phase-margin, and vice versa.

• The PM is a measure of relative stability and, thereby, a useful design specification. In the classroom, we often have detailed knowledge of the system TF; in practice, the system TF may not be known, or the system may be non-linear, which means that a TF does not exist.
– Chu
Jun 3, 2020 at 6:32

Why do I need phase margin if I know the transfer function?

But if all you have is a real device that may become unstable then a physical measurement may be all you can do. The physical measurement may also hint where the poles might be but for sure, the physical measurement will deliver phase margin or gain margin.

Well they are margins, as in a margin to (possibly) becoming unstable. Having the calculated transfer function being stable with a very small margin means that any change (or error) in your model or controller will mean that that stable transfer function will probably only be stable in your calculations.

Try reading about it in Chapter 10 of Feedback Systems: An Introduction for Scientists and Engineers, they answer your question on their first phrase

In practice it is not enough that a system is stable. There must also be some margins of stability that describe how far from instability the system is and its robustness to perturbations

• Thanks for your answer. I’ll read your link. If it is a tolerances thing, wouldn’t something like a Monte Carlo or sensitivity analysis be more meaningful? Are the phase and gain margins more of a rule of thumb? Jun 3, 2020 at 4:48
• MC is a way to test for varying parameter, but that would be overkill if you are expecting small variation on the model, in that case phase, gain and stability margins will do ok (and be way faster to calculate than a MC simulation). Not sure what you mean by sensitivity analysis, is it the same one used in optimization? Or are you talking about the sensitivity function?
– jDAQ
Jun 3, 2020 at 5:06

You're right in that the transfer function alone determines whether a closed loop system is stable or not. However, it turns out that as we approach instability (when the phase margin or gain margin gets close to 0), a lot of undesirable effects appear.

Consider the step response of a two pole system whose DC response is 1. Clearly the response approaches a constant DC voltage with time, but there is a transient portion towards the beginning. There is a time it takes for the system to reach the correct value (rise time). It is possible for the response to overshoot and have to come back down before settling on the final value (ringing). It turns out it is possible to relate these quantities such as rise time or overshoot to the phase margin and gain margin. These results imply (I haven't shown it here but I'm sure you can find something online)that if the margins are smaller then we get larger overshoots, more ringing, and more undesirable transient effects.

That's why it's not only important to know whether the system is stable, but also how close to stable it is. In addition, as jDAQ said, having larger margins gives you larger room for flexibility in the case of tolerances.