Computing Library › Real Time Systems
Real Time Systems

Control Stability and Phase Margin

A feedback loop is stable only if it does not build up oscillations; phase and gain margins quantify how much delay or gain error it can survive.

The Central Concern

Stability is the property that a feedback loop settles rather than oscillates or diverges. It is the first requirement of any controller; performance is meaningless if the loop is unstable. Instability arises when feedback that is meant to correct error instead reinforces it, which happens when the loop's delay and gain conspire to turn negative feedback into positive feedback at some frequency.

Gain and Phase Around the Loop

Kronos motion — control room

Consider a disturbance at some frequency traveling around the loop. If, at the frequency where the loop's total phase lag reaches 180 degrees, the loop gain is still above one, the returning signal reinforces the original and grows: the loop is unstable. Stability analysis examines the loop gain as a function of frequency to check this condition.

Margins

Delay Eats Margin

Every source of delay adds phase lag that grows with frequency, directly consuming phase margin. Sensor-to-actuator latency, computation time, and the hold at the output all contribute. This is the mechanism that connects real-time timing to control theory: a slower or more variable loop has less phase margin and can tolerate less gain, so it must be detuned. A design must keep margin against the worst-case, not typical, loop delay the system can produce.

Designing for Robust Stability

Robust designs leave generous margins because the real plant differs from the model, gains drift with temperature and wear, and timing has a worst case. A common practice targets a comfortable phase margin, often several tens of degrees, so that ordinary variation cannot push the loop into oscillation. In safety-critical systems, adequate margin under all credible conditions is a requirement to be demonstrated, not a preference.