Chapter 17: Stability Margins and Classical Robustness Measures
Lesson 1: Gain Margin and Phase Margin Definitions
In this lesson we give rigorous frequency-domain definitions of gain margin and phase margin for unity-feedback linear control systems. Building on Bode and Nyquist plots from previous chapters, we interpret these margins as distances of the loop transfer function from the critical point \( -1 + j0 \), and show how to compute them analytically and with software tools commonly used in robotics and mechatronics.
1. Conceptual Overview of Stability Margins
Consider a unity-feedback single-input single-output (SISO) control system with plant \( P(s) \) and controller \( C(s) \). The loop transfer function is
\[ L(s) = C(s) P(s). \]
For reference tracking, the closed-loop transfer function is
\[ T(s) = \frac{L(s)}{1 + L(s)}, \quad \text{characteristic equation: } 1 + L(s) = 0. \]
The equation \( 1 + L(s) = 0 \) is equivalent to \( L(s) = -1 \). In the frequency domain we evaluate \( L(j\omega) \) and track how its Nyquist plot (or Bode magnitude/phase plots) passes near the critical point \( -1 + j0 \). The idea of stability margins is:
- Gain margin: how much the loop gain can be multiplied before the closed loop becomes unstable.
- Phase margin: how much additional phase lag can be introduced before the closed loop becomes unstable.
In robotics, these margins quantify how sensitive a joint-position or velocity servo is to modeling errors in inertia, damping, and actuator dynamics. A controller with larger positive margins better tolerates uncertainties and unmodeled delays.
flowchart TD
Pnode["Plant model P(s)"] --> Cnode["Controller C(s)"]
Cnode --> Lnode["Loop transfer L(s) = C(s) P(s)"]
Lnode --> Fnode["Frequency response L(jw)"]
Fnode --> Bnode["Bode / Nyquist plots"]
Bnode --> GMnode["Gain margin GM"]
Bnode --> PMnode["Phase margin PM"]
GMnode --> Rnode["Robustness to gain uncertainty"]
PMnode --> Rnode
2. Nyquist Geometry and the Critical Point
From Chapter 15 you know the Nyquist criterion: for a loop transfer function \( L(s) \) with \( P \) right-half-plane (RHP) poles, the number of unstable closed-loop poles is \( Z = N + P \), where \( N \) is the number of clockwise encirclements of \( -1 + j0 \) by the Nyquist plot of \( L(j\omega) \).
If the open-loop system is internally stable and proper, the Nyquist curve must not encircle \( -1 \) for the closed loop to remain stable. Intuitively, the distance from the Nyquist curve to \( -1 \) measures how much uncertainty in gain or phase can be tolerated before an encirclement appears.
Gain and phase margins are defined by perturbing \( L(s) \) with a real gain factor \( k > 0 \) and with additional phase lag, respectively:
\[ L_k(s) = k\,L(s), \quad L_{\Delta\phi}(j\omega) = L(j\omega)\,e^{-j\Delta\phi}. \]
The critical perturbation is the smallest \( k \) or additional phase lag \( \Delta\phi \) that causes the Nyquist plot of the perturbed loop to pass exactly through \( -1 \). These critical values define the margins.
3. Gain Margin: Rigorous Definition
Assume a unity-feedback loop with loop transfer \( L(s) \) and nominal scalar gain \( k_0 > 0 \):
\[ L_0(s) = k_0\,L(s). \]
Consider varying the scalar gain \( k \) and forming \( L_k(s) = k L(s) \). The closed loop is on the verge of instability when the Nyquist plot of \( L_k(j\omega) \) passes through \( -1 \). Since multiplying by \( k \) only scales the Nyquist curve radially, the crossing condition is
\[ \exists\,\omega_{pc} \text{ such that } \arg L(j\omega_{pc}) = -\pi \quad\text{and}\quad k\,|L(j\omega_{pc})| = 1. \]
Here \( \omega_{pc} \) is the phase crossover frequency, where the phase of \( L(j\omega) \) is \( -\pi \) (i.e. \( -180^\circ \)). The critical gain that puts the system on the stability boundary is
\[ k_{\text{crit}} = \frac{1}{|L(j\omega_{pc})|}. \]
The gain margin is the factor by which the nominal gain \( k_0 \) can be multiplied before reaching the boundary:
\[ G_m = \frac{k_{\text{crit}}}{k_0} = \frac{1}{k_0\,|L(j\omega_{pc})|}. \]
In decibels, the gain margin is
\[ G_{m,\mathrm{dB}} = 20 \log_{10} G_m. \]
In many robotics servo applications, a gain margin around \( 6\,\text{dB} \)–\( 12\,\text{dB} \) is commonly considered acceptable, balancing robustness with loop bandwidth.
4. Phase Margin: Rigorous Definition
Now fix the nominal loop transfer function \( L_0(s) = k_0 L(s) \) and consider adding a frequency-independent phase lag \( \Delta\phi \ge 0 \) (modeling delay or unmodeled dynamics) to obtain
\[ L_{\Delta\phi}(j\omega) = L_0(j\omega) e^{-j\Delta\phi}. \]
The Nyquist curve of \( L_{\Delta\phi}(j\omega) \) is the Nyquist curve of \( L_0(j\omega) \) rotated clockwise by \( \Delta\phi \). The closed loop reaches the stability boundary when this rotated curve passes through \( -1 \). This occurs at the gain crossover frequency \( \omega_{gc} \), defined by
\[ |L_0(j\omega_{gc})| = 1. \]
At \( \omega_{gc} \), the (unperturbed) phase is \( \arg L_0(j\omega_{gc}) \). The additional phase lag required to reach \( -\pi \) is
\[ \Delta\phi_{\text{crit}} = -\pi - \arg L_0(j\omega_{gc}). \]
The phase margin is defined as the available phase lead at unit loop gain:
\[ \phi_m = \pi + \arg L_0(j\omega_{gc}). \]
In degrees this is \( \phi_m = 180^\circ + \angle L_0(j\omega_{gc}) \). For typical motion-control servos, a phase margin in the range \( 40^\circ \)–\( 60^\circ \) yields a good compromise between transient overshoot and robustness.
5. Reading Margins from Bode Plots
For practical design, gain and phase margins are almost always read from Bode plots of \( L_0(j\omega) \):
-
Phase margin \(\phi_m\):
- On the magnitude plot, find \( \omega_{gc} \) where \( |L_0(j\omega_{gc})| = 1 \) (0 dB).
- Read the phase at this frequency: \( \angle L_0(j\omega_{gc}) \).
- Compute \( \phi_m = 180^\circ + \angle L_0(j\omega_{gc}) \).
-
Gain margin \(G_m\):
- On the phase plot, find \( \omega_{pc} \) where \( \angle L_0(j\omega_{pc}) = -180^\circ \), if it exists.
- Read the magnitude at this frequency: \( |L_0(j\omega_{pc})| \), usually in dB.
- Compute \( G_m = 1/|L_0(j\omega_{pc})| \), or in dB \( G_{m,\mathrm{dB}} = -\text{Mag}(\omega_{pc}) \) (negative of the magnitude in dB).
flowchart TD
S["Start with Bode of L(jw)"] --> GCF["Find w_gc: magnitude = 0 dB"]
GCF --> PHPM["Read phase at w_gc; \ncompute phi_m = 180 deg + phase"]
S --> PCF["Find w_pc: phase = -180 deg (if exists)"]
PCF --> GMN["Read magnitude at w_pc"]
GMN --> GMD["Compute GM = 1 / |L(j w_pc)| (or minus dB value)"]
If the phase never reaches \( -180^\circ \) (e.g. the phase approaches that value asymptotically), the gain margin is effectively infinite in the linear model. In real robotic systems, you must still account for neglected dynamics and nonlinearities.
6. Analytical Example: \( L(s) = K/(s(s+1)) \)
Consider the loop transfer function
\[ L(s) = \frac{K}{s(s+1)}. \]
This can model a position-controlled motor with inertia and viscous damping when only a proportional controller is used. Evaluate at \( s = j\omega \):
\[ L(j\omega) = \frac{K}{j\omega\,(1 + j\omega)}. \]
The magnitude and phase are
\[ |L(j\omega)| = \frac{K}{\omega \sqrt{1 + \omega^2}}, \quad \arg L(j\omega) = -\frac{\pi}{2} - \arctan(\omega). \]
Phase margin for \(K = 1\). The gain crossover frequency satisfies
\[ |L(j\omega_{gc})| = 1 \;\Rightarrow\; \frac{1}{\omega_{gc} \sqrt{1 + \omega_{gc}^2}} = 1. \]
Squaring both sides and letting \( x = \omega_{gc}^2 \) gives
\[ \frac{1}{x(1 + x)} = 1 \;\Rightarrow\; x(1+x) = 1 \;\Rightarrow\; x^2 + x - 1 = 0. \]
The positive root is
\[ x = \frac{-1 + \sqrt{1 + 4}}{2} = \frac{-1 + \sqrt{5}}{2} \approx 0.618, \quad \omega_{gc} = \sqrt{x} \approx 0.786\,\text{rad/s}. \]
The phase at \( \omega_{gc} \) is approximately
\[ \arg L(j\omega_{gc}) = -\frac{\pi}{2} - \arctan(\omega_{gc}) \approx -\frac{\pi}{2} - 0.67 \approx -2.24\,\text{rad} \approx -128^\circ. \]
Hence the phase margin is
\[ \phi_m = 180^\circ + (-128^\circ) \approx 52^\circ, \]
which is a reasonable margin for a lightly damped robotic joint.
Gain margin. The phase is \( -90^\circ - \arctan(\omega) \). It tends to \( -180^\circ \) as \( \omega \to \infty \) but never reaches it at a finite frequency. Thus there is no finite phase crossover frequency \( \omega_{pc} \), and the gain margin of the ideal linear model is infinite. In practice, unmodeled high-frequency poles will limit the true gain margin.
7. Python Implementation of Gain and Phase Margins
The python-control library is widely used for prototyping
controllers for robotics and mechatronic systems. Here we compute
margins for the loop \( L(s) = K/(s(s+1)) \) and sketch
how this integrates with a joint model from a robotics toolbox.
import numpy as np
import control # python-control, MATLAB-like control library
# Example: simple joint servo loop, L(s) = K/(s (s + 1))
K = 1.0
s = control.TransferFunction.s
P = 1 / (s * (s + 1))
C = K
L = C * P
# Compute gain margin, phase margin, and crossover frequencies
Gm, Pm, Wcg, Wcp = control.margin(L)
print("Gain margin (abs):", Gm)
print("Gain margin (dB) :", 20 * np.log10(Gm) if Gm not in (0, np.inf) else Gm)
print("Phase margin (deg):", Pm)
print("Gain crossover frequency (rad/s):", Wcg)
print("Phase crossover frequency (rad/s):", Wcp)
# Bode plot with margins highlighted
import matplotlib.pyplot as plt
control.margin(L)
plt.show()
# Robotics context: using a joint inertial model from a robotics toolbox
try:
from roboticstoolbox import DHRobot, RevoluteDH
# Very simple 1-DOF link (not a realistic full model)
link = RevoluteDH(a=0.0, d=0.0, alpha=0.0)
robot = DHRobot([link], name="single_joint")
# Suppose we linearize the joint dynamics around some configuration and speed
# and obtain an equivalent first/second-order plant P_joint(s).
# Here we just re-use P as a placeholder.
P_joint = P
L_joint = C * P_joint
Gm_j, Pm_j, Wcg_j, Wcp_j = control.margin(L_joint)
print("Joint servo phase margin (deg):", Pm_j)
except ImportError:
print("roboticstoolbox not installed; skipping robotics-specific example.")
In a robotics project, P would come from linearized
manipulator dynamics (e.g., via roboticstoolbox or symbolic
modeling), and margin would be used to verify that the
joint servo meets specified gain and phase margin requirements.
8. C++ Implementation Sketch for Gain and Phase Margins
In C++, low-level robotic controllers (e.g., in ROS control loops) are
often implemented with real-time code using libraries like
Eigen and frameworks such as ROS. Below is a minimal
example that approximates gain and phase margins for
\( L(s) = K/(s(s+1)) \) using the standard library.
#include <iostream>
#include <complex>
#include <vector>
#include <cmath>
using std::complex;
using std::vector;
complex<double> L_of_s(const complex<double>& s, double K) {
return K / (s * (s + 1.0));
}
int main() {
const double K = 1.0;
const double w_min = 1e-2;
const double w_max = 1e2;
const int N = 2000;
vector<double> w(N);
for (int i = 0; i < N; ++i) {
double alpha = static_cast<double>(i) / static_cast<double>(N - 1);
w[i] = w_min * std::pow(w_max / w_min, alpha); // log spacing
}
double w_gc = 0.0;
double w_pc = 0.0;
bool found_gc = false;
bool found_pc = false;
double prev_mag_db = 0.0;
double prev_phase_deg = 0.0;
bool first = true;
for (double wi : w) {
complex<double> s(0.0, wi);
complex<double> L = L_of_s(s, K);
double mag = std::abs(L);
double phase = std::atan2(std::imag(L), std::real(L)); // rad
double mag_db = 20.0 * std::log10(mag);
double phase_deg = phase * 180.0 / M_PI;
if (!first) {
// Find gain crossover (mag crosses 0 dB)
if ((prev_mag_db > 0.0 && mag_db <= 0.0) ||
(prev_mag_db < 0.0 && mag_db >= 0.0)) {
w_gc = wi;
found_gc = true;
}
// Find phase crossover (phase crosses -180 deg)
if ((prev_phase_deg > -180.0 && phase_deg <= -180.0) ||
(prev_phase_deg < -180.0 && phase_deg >= -180.0)) {
w_pc = wi;
found_pc = true;
}
}
prev_mag_db = mag_db;
prev_phase_deg = phase_deg;
first = false;
}
if (found_gc) {
complex<double> L_gc = L_of_s(complex<double>(0.0, w_gc), K);
double phase_deg_gc = std::atan2(std::imag(L_gc), std::real(L_gc)) * 180.0 / M_PI;
double phi_m = 180.0 + phase_deg_gc;
std::cout << "Phase margin (deg): " << phi_m << std::endl;
} else {
std::cout << "No gain crossover found (|L(jw)| never equals 1)." << std::endl;
}
if (found_pc) {
complex<double> L_pc = L_of_s(complex<double>(0.0, w_pc), K);
double mag = std::abs(L_pc);
double Gm = 1.0 / mag;
double Gm_db = 20.0 * std::log10(Gm);
std::cout << "Gain margin (abs): " << Gm << std::endl;
std::cout << "Gain margin (dB): " << Gm_db << std::endl;
} else {
std::cout << "No finite phase crossover (gain margin effectively infinite)." << std::endl;
}
// In a ROS-based robotic controller, L_of_s would be built from identified
// joint dynamics and scheduled gains, and the numerically computed margins
// would be checked during offline analysis.
return 0;
}
Robotic C++ frameworks such as ROS control typically wrap similar
computations inside analysis or tuning tools, using
Eigen or specialized dynamics libraries (e.g.,
pinocchio, orocos-kdl) to obtain the linear
plant \( P(s) \) for each joint.
9. Java and MATLAB/Simulink Implementations
9.1 Java Example (Using Apache Commons Math)
Java is widely used in educational robotics (e.g., FRC robots via
WPILib). Here is an illustrative Java snippet that uses
Apache Commons Math to evaluate
\( L(j\omega) \) and approximate the phase margin.
import org.apache.commons.math3.complex.Complex;
public class GainPhaseMargins {
public static Complex L(Complex s, double K) {
// L(s) = K / (s (s + 1))
return new Complex(K, 0.0).divide(s.multiply(s.add(new Complex(1.0, 0.0))));
}
public static void main(String[] args) {
double K = 1.0;
int N = 2000;
double wMin = 1e-2;
double wMax = 1e2;
double prevMagDb = 0.0;
double prevPhaseDeg = 0.0;
boolean first = true;
double wGc = 0.0;
boolean foundGc = false;
for (int i = 0; i < N; ++i) {
double alpha = (double) i / (double) (N - 1);
double w = wMin * Math.pow(wMax / wMin, alpha);
Complex s = new Complex(0.0, w);
Complex Lval = L(s, K);
double mag = Lval.abs();
double phaseDeg = Math.toDegrees(Math.atan2(Lval.getImaginary(), Lval.getReal()));
double magDb = 20.0 * Math.log10(mag);
if (!first) {
if ((prevMagDb > 0.0 && magDb <= 0.0) ||
(prevMagDb < 0.0 && magDb >= 0.0)) {
wGc = w;
foundGc = true;
break;
}
}
prevMagDb = magDb;
prevPhaseDeg = phaseDeg;
first = false;
}
if (foundGc) {
Complex sGc = new Complex(0.0, wGc);
Complex Lgc = L(sGc, K);
double phaseDegGc =
Math.toDegrees(Math.atan2(Lgc.getImaginary(), Lgc.getReal()));
double phiM = 180.0 + phaseDegGc;
System.out.println("Approximate phase margin (deg): " + phiM);
} else {
System.out.println("No gain crossover found.");
}
// In a WPILib robot project, similar computations can be done offline
// to verify that position or velocity PID loops have sufficient margins.
}
}
9.2 MATLAB/Simulink and Robotics System Toolbox
MATLAB provides built-in functions bode and
margin which integrate naturally with Robotics System
Toolbox models of manipulators and mobile robots.
% Simple loop: L(s) = K / (s (s + 1))
K = 1;
s = tf('s');
P = 1/(s*(s + 1));
C = K;
L = C*P;
% Compute classical gain and phase margins
[Gm, Pm, Wcg, Wcp] = margin(L);
fprintf('Gain margin (abs): %g\n', Gm);
fprintf('Gain margin (dB): %g\n', 20*log10(Gm));
fprintf('Phase margin (deg): %g\n', Pm);
figure;
margin(L); grid on;
title('Loop margins for L(s) = K/(s(s+1))');
% Robotics context: linearizing a joint from a rigid-body tree
% (requires Robotics System Toolbox)
% robot = importrobot('example.urdf');
% jointIdx = 1;
% [A,B,Cm,Dm] = linearize(robot, 'someConfig', 'someIO');
% P_joint = ss(A,B,Cm,Dm); % joint LTI model
% C_joint = pid(10, 1, 0.1); % example PID
% L_joint = C_joint*P_joint;
% margin(L_joint);
For Simulink models of controllers and robotic plants, you can linearize
the closed-loop system using linearize or
linmod, obtain the loop transfer function
\( L(s) \), and then call margin to
compute gain and phase margins directly from the Simulink model.
10. Wolfram Mathematica Implementation
Wolfram Mathematica can represent transfer functions symbolically and evaluate frequency response numerically. The following code constructs \( L(s) = K/(s(s+1)) \), plots its Bode diagram, and numerically estimates gain and phase margins.
(* Loop transfer function L(s) = K/(s (s + 1)) *)
K = 1.0;
s = ComplexExpand[I*w]; (* symbolic frequency variable is w *)
L[w_] := K/(I*w*(1 + I*w));
(* Bode magnitude/phase data on a logarithmic grid *)
wmin = 10^-2;
wmax = 10^2;
n = 1000;
wgrid = Table[wmin*(wmax/wmin)^((k - 1)/(n - 1)), {k, 1, n}];
mag = Abs[L[#]] & /@ wgrid;
phase = Arg[L[#]] & /@ wgrid;
magdB = 20*Log10[mag];
phaseDeg = 180.0*phase/Pi;
ListLogLinearPlot[
{
Transpose[{wgrid, magdB}],
Transpose[{wgrid, phaseDeg}]
},
PlotLegends -> {"Magnitude (dB)", "Phase (deg)"},
GridLines -> Automatic,
Frame -> True,
FrameLabel -> {"w (rad/s)", "Magnitude / Phase"},
ImageSize -> Large
]
(* Approximate gain crossover and phase margin *)
gainCrossings =
Select[Partition[Transpose[{wgrid, magdB}], 2, 1],
(#[[1, 2]] > 0 && #[[2, 2]] <= 0) ||
(#[[1, 2]] < 0 && #[[2, 2]] >= 0) &];
If[gainCrossings === {},
Print["No gain crossover found."],
wgc = gainCrossings[[1, 2, 1]];
phaseAtWgc = 180.0*Arg[L[wgc]]/Pi;
phiM = 180.0 + phaseAtWgc;
Print["Gain crossover frequency w_gc = ", wgc];
Print["Phase margin (deg) ~ ", phiM];
]
(* Similar logic can be used to search for phase crossover and compute GM. *)
For more complex robotic plants, Mathematica can import linearized models from other tools (e.g., via MATLAB or Modelica interfaces) and reuse the same Bode-based margin estimation.
11. Problems and Solutions
Problem 1 (Definitions from Bode Data). A unity-feedback loop has Bode data for its loop transfer \( L_0(j\omega) \) as follows:
- \( \omega = 1\,\text{rad/s} \): magnitude \( = 0\,\text{dB} \), phase \( = -135^\circ \).
- \( \omega = 10\,\text{rad/s} \): magnitude \( = -20\,\text{dB} \), phase \( = -210^\circ \).
(a) Estimate the phase margin. (b) Estimate the gain margin (in dB).
Solution:
(a) The gain crossover is at \( \omega_{gc} = 1\,\text{rad/s} \) because the magnitude is at 0 dB there. The phase at this frequency is \( -135^\circ \), so the phase margin is
\[ \phi_m = 180^\circ + (-135^\circ) = 45^\circ. \]
(b) The phase crossover occurs at approximately \( \omega_{pc} \approx 10\,\text{rad/s} \) where the phase is \( -210^\circ \) (below \( -180^\circ \)). At that frequency the magnitude is \( -20\,\text{dB} \), i.e. \( |L_0(j\omega_{pc})| = 0.1 \). Hence the gain margin is
\[ G_m = \frac{1}{0.1} = 10, \quad G_{m,\mathrm{dB}} = 20 \log_{10}(10) = 20\,\text{dB}. \]
Problem 2 (Phase Margin for L(s) = K/(s(s+1))). For the loop \( L(s) = K/(s(s+1)) \) with \( K = 1 \), derive the gain crossover frequency and compute the approximate phase margin using the analytic expressions introduced earlier.
Solution:
From Section 6, the gain crossover condition \( |L(j\omega)| = 1 \) leads to
\[ x^2 + x - 1 = 0 \quad\text{with}\quad x = \omega_{gc}^2. \]
The positive root is \( x = (-1 + \sqrt{5})/2 \approx 0.618 \), so \( \omega_{gc} = \sqrt{x} \approx 0.786\,\text{rad/s} \). The phase at this frequency is
\[ \arg L(j\omega_{gc}) = -90^\circ - \arctan(\omega_{gc}) \approx -90^\circ - 38^\circ \approx -128^\circ. \]
Thus the phase margin is
\[ \phi_m = 180^\circ + (-128^\circ) \approx 52^\circ. \]
Problem 3 (Infinite Gain Margin Interpretation). For the same loop \( L(s) = K/(s(s+1)) \), show that the phase never reaches exactly \( -180^\circ \), and explain why the linear model predicts infinite gain margin even though a real robotic system will still lose stability at some large gain.
Solution:
The phase is \( \arg L(j\omega) = -90^\circ - \arctan(\omega) \). Since \( \arctan(\omega) \in (0^\circ, 90^\circ) \) for all \( \omega > 0 \), we have
\[ -180^\circ < -90^\circ - \arctan(\omega) < -90^\circ \quad\text{for all}\quad \omega > 0. \]
As \( \omega \to \infty \), we have \( \arctan(\omega) \to 90^\circ \) and the phase tends to \( -180^\circ \) from above, but never attains this value at finite frequency. Hence there is no finite phase crossover frequency \( \omega_{pc} \), and the gain margin of the ideal second-order model is infinite.
Real robotic actuators, however, have additional high-frequency poles (flexibilities, sensor dynamics, time delays). These unmodeled dynamics can push the phase below \( -180^\circ \) at some finite frequency, creating a finite true gain margin. This illustrates why gain and phase margins must be interpreted with care: they are only as reliable as the model used to compute them.
Problem 4 (Qualitative Effect of Increasing Loop Gain). For a generic stable minimum-phase loop transfer function \( L(s) \), explain qualitatively how increasing the scalar gain \( k \) in \( L_k(s) = k L(s) \) affects:
- (a) the gain crossover frequency;
- (b) the phase margin.
Solution:
(a) Increasing \( k \) shifts the Bode magnitude plot upward by a constant amount (in dB). The condition \( |L_k(j\omega_{gc,k})| = 1 \) is satisfied at higher frequencies as \( k \) increases, because the curve intersects 0 dB at a larger \( \omega \). Thus the gain crossover frequency increases with gain.
(b) In minimum-phase systems, higher frequency tends to be associated with more negative phase. Therefore, evaluating the phase at the higher gain crossover frequency yields a more negative angle, so \( \phi_m = 180^\circ + \angle L_k(j\omega_{gc,k}) \) decreases as \( k \) increases. The loop becomes less robust to additional phase lag, and the closed-loop transient response becomes more oscillatory.
12. Summary
- Gain and phase margins quantify how close a unity-feedback loop is to violating the Nyquist stability criterion at the critical point \( -1 + j0 \).
- The gain margin is defined via the phase crossover frequency \( \omega_{pc} \) and measures allowable loop gain scaling before instability.
- The phase margin is defined via the gain crossover frequency \( \omega_{gc} \) and measures allowable additional phase lag before instability.
- Bode plots provide a convenient way to read \( G_m \) and \( \phi_m \) graphically; software tools in Python, C++, Java, MATLAB/Simulink, and Mathematica automate this computation for robotic control loops.
- Infinite margins in a low-order model usually indicate that unmodeled high-frequency dynamics will dominate the true robustness, especially in high-performance robotic systems.
13. References
- Nyquist, H. (1932). Regeneration theory. Bell System Technical Journal, 11(1), 126–147.
- Bode, H. W. (1945). Network analysis and feedback amplifier design. Van Nostrand, New York.
- Zames, G. (1966). On the input-output stability of time-varying nonlinear feedback systems, Part I: Conditions derived using concepts of loop gain, conicity, and positivity. IEEE Transactions on Automatic Control, 11(2), 228–238.
- Horowitz, I. M. (1963). Synthesis of feedback systems. Academic Press.
- Maciejowski, J. M. (1989). Multivariable feedback design. Addison-Wesley (chapters on classical margins and robust stability).
- Safonov, M. G., & Athans, M. (1977). Gain and phase margin for multiloop LQG regulators. IEEE Transactions on Automatic Control, 22(2), 173–179.