Gain margin and phase margin

Defines gain and phase margin at the phase and gain crossover frequencies, computes them for typical loops, and links them to damping, gain limits and dead-time tolerance.

Drafted with Aria, reviewed by the AiCanCode.org team. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

A loop that is "stable" on paper can still ring badly or go unstable when a valve ages, a sensor lag grows or the process gain doubles at a new operating point. Gain margin and phase margin measure how far the loop is from instability, so they are the robustness numbers written into tuning specifications — typically a gain margin of at least 6 dB and a phase margin of 30° to 60°.

Key ideas

Crossover frequencies (for the open-loop G(jω)H(jω))

  • Gain crossover frequency ωgc: where |GH| = 1 (0 dB).
  • Phase crossover frequency ωpc: where ∠GH = −180°.

Gain margin (GM): the factor by which the loop gain can be multiplied before the closed loop reaches the edge of instability. Measured at ωpc. On the Nyquist plot, if the plot crosses the negative real axis at −a, then GM = 1/a. On the Bode plot it is the distance of the magnitude curve below 0 dB at ωpc.

Phase margin (PM): the extra phase lag that can be added at ωgc before instability. On the Nyquist plot, it is the angle from the negative real axis to the point where the plot crosses the unit circle. On the Bode plot it is the distance of the phase curve above −180° at ωgc.

Interpreting the signs (for minimum-phase, open-loop-stable systems): both margins positive ⇒ closed loop stable; either negative ⇒ unstable. GM = 0 dB and PM = 0° together mark marginal stability, with sustained oscillation at ωpc = ωgc. For open-loop unstable or conditionally stable systems the margins can mislead — use the Nyquist criterion.

Special values

  • If the phase never reaches −180° (e.g. first- and second-order type-0 or type-1 loops), GM = ∞.
  • If |GH| is always below 1, there is no gain crossover and PM is undefined (often taken as infinite).

Link to transient response: for a second-order-like loop, larger PM means more damping. A useful rule is ζ ≈ PM/100 (PM in degrees) for PM up to about 60°, so PM = 45° gives roughly 20–25 % overshoot. The gain crossover frequency sets speed: closed-loop bandwidth is usually between ωgc and 2ωgc.

Dead time eats phase margin: a delay Td adds −ωgc·Td rad at the crossover without changing |GH|, so the largest delay the loop tolerates is Td,max = PM (in rad)/ωgc. This is why process loops with transport lag are tuned conservatively.

Raising gain shifts the magnitude curve up: ωgc moves to a higher frequency where the phase is more negative, so PM falls, and GM (in dB) falls by exactly the dB added.

Formulas

  • ∠G(jωpc)H(jωpc) = −180° → ωpc.
  • GM = 1/|G(jωpc)H(jωpc)|; GM(dB) = −20·log10|G(jωpc)H(jωpc)|.
  • |G(jωgc)H(jωgc)| = 1 → ωgc.
  • PM = 180° + ∠G(jωgc)H(jωgc).
  • PM = tan⁻¹[2ζ / √(√(1 + 4ζ⁴) − 2ζ²)] — exact for the standard second-order loop ωn²/[s(s + 2ζωn)].
  • ζ ≈ PM/100 (approximate, PM in degrees, PM ≤ 60°).
  • Td,max = (PM × π/180)/ωgc — largest added dead time for stability.
  • K_max = K × GM — gain at which the loop becomes marginally stable.

Symbols: ω in rad/s; GM dimensionless (or dB); PM in degrees; Td in s; K loop gain.

Worked examples

Example 1 — both margins of a type-1 loop Given: unity feedback, G(s) = 50/[s(s + 1)(s + 10)].

  1. Phase crossover: −90° − tan⁻¹ω − tan⁻¹(ω/10) = −180° → ω × ω/10 = 1 → ωpc = √10 = 3.16 rad/s.
  2. |G(jωpc)| = 50/[3.162 × √11 × √110] = 50/110 = 0.455.
  3. GM = 1/0.455 = 2.2, i.e. 20·log10 2.2 = 6.85 dB.
  4. Gain crossover: solve ω·√(1 + ω²)·√(100 + ω²) = 50 → ωgc = 2.10 rad/s.
  5. Phase there: −90° − tan⁻¹(2.10) − tan⁻¹(0.210) = −90° − 64.6° − 11.9° = −166.4°.
  6. PM = 180° − 166.4° = 13.6°.

Result: GM = 2.2 (6.85 dB) at 3.16 rad/s; PM = 13.6° at 2.10 rad/s. The loop is stable but poorly damped (ζ ≈ 0.14); the gain could rise only to 50 × 2.2 = 110 before oscillation.

Example 2 — gain for a phase margin, and dead-time tolerance (GATE level) Given: unity feedback, G(s) = K/[s(s + 2)]. (a) Find K for PM = 45°. (b) Find the largest dead time that can be added before instability.

  1. PM = 45° means ∠G(jωgc) = −135°: −90° − tan⁻¹(ωgc/2) = −135° → tan⁻¹(ωgc/2) = 45° → ωgc = 2 rad/s.
  2. Magnitude condition: K/[ωgc·√(ωgc² + 4)] = 1 → K = 2 × √8 = 5.66.
  3. Dead time adds lag ωgc·Td without changing ωgc. Instability when ωgc·Td = 45° = 0.785 rad.
  4. Td,max = 0.785/2 = 0.393 s.

Result: K = 5.66 gives PM = 45° at 2 rad/s; the loop then tolerates up to 0.393 s of dead time.

Common mistakes

  • Computing PM as −180° − ∠GH or ∠GH + 180° with a sign slip; PM = 180° + ∠GH(jωgc), which is positive when the phase is above −180°.
  • Using a crossover frequency that is "given" without checking that |GH| = 1 there.
  • Expressing GM in degrees or PM in dB.
  • Assuming positive margins guarantee stability for open-loop unstable or conditionally stable systems.
  • Forgetting that GM in dB drops one-for-one when gain is added in dB, while PM changes non-linearly.
  • Converting PM to radians incorrectly in dead-time problems (multiply degrees by π/180).

For GATE IN

Expect numerical questions on GM (often in dB) and PM for type-1 third-order loops, the gain for a specified PM or GM, the maximum dead time a loop tolerates, and reading margins from given Bode or Nyquist data. Practise the ω1·ω2 = product of corner frequencies trick for phase crossover with two simple poles and an integrator, and quick dB conversions.

Quick check

  1. The magnitude at phase crossover is −10 dB. What is the GM?
  2. The phase at gain crossover is −150°. What is the PM?
  3. For 20/[s(s + 3)(s + 4)], where is the phase crossover?
  4. A loop has PM = 30° at ωgc = 5 rad/s. What dead time makes it marginally stable?

Answers: 1. +10 dB (a factor of 3.16); 2. 30°; 3. ω = √12 = 3.46 rad/s; 4. 0.524/5 = 0.105 s.

Try answering each one aloud before you open it.

  1. 1.What is gain margin in control systems?Concept

    Gain margin is a measure of the stability of a control system. It is defined as the amount by which the gain of the system can be increased before the system becomes unstable. It is usually expressed in decibels (dB). A positive gain margin indicates a stable system, while a negative gain margin indicates potential instability.

  2. 2.What is phase margin in control systems?Concept

    Phase margin is a measure of the stability of a control system. It is defined as the amount of additional phase lag at the gain crossover frequency required to bring the system to the verge of instability. It is usually expressed in degrees. A positive phase margin indicates a stable system, while a negative phase margin indicates potential instability.

  3. 3.Explain the significance of gain margin and phase margin in control systems.Concept

    Gain margin and phase margin are critical indicators of system stability. They provide insights into how much the system parameters can change before the system becomes unstable. A higher gain margin and phase margin indicate a more robust system that can tolerate greater variations in system parameters without becoming unstable. These margins help in designing controllers that ensure system stability under various operating conditions.

  4. 4.Why is it important to have a positive gain margin and phase margin?Application

    Having a positive gain margin and phase margin is important because it ensures that the control system is stable. A positive gain margin means that the system can tolerate an increase in gain without becoming unstable, while a positive phase margin means that the system can tolerate additional phase lag. These margins provide a buffer against modeling errors and parameter variations, ensuring reliable and predictable system performance.

  5. 5.What happens if the gain margin is negative?Application

    A negative gain margin in dB means the open-loop magnitude is already above 0 dB where the phase is −180°, i.e. the Nyquist plot passes to the left of −1. For a minimum-phase, open-loop-stable loop the closed loop is then unstable, and the gain must be reduced by at least that many dB to restore stability. (For conditionally stable or open-loop unstable systems the sign alone can mislead, so check with Nyquist.)

  6. 6.What happens if the phase margin is negative?Application

    A negative phase margin means the open-loop phase is already below −180° at the gain crossover frequency. For a minimum-phase, open-loop-stable loop the closed loop is unstable and its response grows in an oscillation near the crossover frequency. The fix is to lower the gain (moving crossover to a frequency with less lag) or add phase lead with a compensator.

  7. 7.How can gain margin and phase margin be determined from a Bode plot?Application

    Gain margin and phase margin can be determined from a Bode plot by analyzing the gain and phase crossover frequencies. The gain margin is found by measuring the gain at the phase crossover frequency (where the phase is -180 degrees) and calculating how much it can be increased to reach 0 dB. The phase margin is found by measuring the phase at the gain crossover frequency (where the gain is 0 dB) and calculating how much additional phase lag would bring the phase to -180 degrees.

  8. 8.Calculate the gain margin if the gain at the phase crossover frequency is -10 dB.Numerical

    To calculate the gain margin, convert the gain at the phase crossover frequency from dB to a linear scale. Gain margin (dB) = -(-10 dB) = 10 dB. This means the gain can be increased by 10 dB before the system becomes unstable.

  9. 9.Calculate the phase margin if the phase at the gain crossover frequency is -150 degrees.Numerical

    Phase margin is calculated as the difference between -180 degrees and the phase at the gain crossover frequency. Phase margin = -150 degrees - (-180 degrees) = 30 degrees. This indicates a phase margin of 30 degrees, suggesting the system is stable.

  10. 10.Explain how gain margin and phase margin affect the transient response of a control system.Application

    Gain margin and phase margin affect the transient response by influencing the system's damping and oscillatory behavior. A higher gain margin and phase margin generally lead to a more damped response with fewer oscillations, resulting in a smoother transient response. Conversely, lower margins can lead to underdamped responses with more oscillations, potentially causing overshoot and longer settling times.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?