Chapter 15: Nyquist Criterion and Stability in the Frequency Domain
Lesson 5: Nyquist-Based Design Examples
This lesson applies the Nyquist stability criterion to concrete controller-design tasks. We focus on unity-feedback SISO loops where the open-loop transfer function is \( L(s) = C(s)G(s) \), and we design or verify controllers (proportional and PI) using Nyquist plots, including analytical derivations of critical gains and stability regions. We then implement these designs in Python, C++, Java, MATLAB/Simulink, and Wolfram Mathematica, with emphasis on robotics-related applications such as robot joint or actuator control.
1. Nyquist as a Design Tool
For a unity-feedback loop with plant \( G(s) \) and controller \( C(s) \), the closed-loop transfer function is \( T(s) = \dfrac{L(s)}{1+L(s)} \), where \( L(s) = C(s)G(s) \) is the loop transfer function. The closed-loop characteristic equation is \( 1 + L(s) = 0 \). Stability therefore depends only on the location of the zeros of \( 1 + L(s) \) in the complex plane.
The Nyquist criterion relates closed-loop stability to the Nyquist plot of \( L(s) \). Let \( P \) be the number of open-loop poles of \( L(s) \) in the right half-plane (RHP), and \( Z \) be the number of zeros of \( 1+L(s) \) in the RHP (i.e., unstable closed-loop poles). Let \( N \) be the number of clockwise encirclements of the critical point \(-1\) by the Nyquist plot of \( L(s) \) corresponding to the standard Nyquist contour. Then
\[ Z = N + P. \]
In most design examples in this chapter we assume a stable plant and a stable controller structure, so that \( P = 0 \). Then
\[ Z = N, \quad P = 0. \]
Thus, for a stable closed-loop system we require \( Z = 0 \), which is equivalent to demanding that the Nyquist plot of \( L(s) \) produce \( N = 0 \) encirclements of \(-1\). This converts a pole-location problem in the \( s \)-plane into a geometric condition on the Nyquist plot in the complex plane.
A key operation in design is scaling the loop gain. Suppose \( L(s) = K L_1(s) \), where \( K > 0 \) is a scalar gain and \( L_1(s) \) is a fixed “base” loop transfer function. Then the Nyquist plots satisfy
\[ L(j\omega) = K L_1(j\omega), \quad \omega \in \mathbb{R}. \]
Geometrically, the Nyquist plot of \( L(j\omega) \) is obtained by radially stretching or shrinking the Nyquist plot of \( L_1(j\omega) \) around the origin by factor \( K \). The critical value of \( K \) at which the Nyquist plot passes exactly through \(-1\) is called the critical gain; slightly smaller gains typically yield a stable closed loop with some stability margin.
To find the critical gain using Nyquist, one standard analytic strategy is:
- Compute \( L_1(j\omega) = C_0(j\omega)G(j\omega) \) for a base controller \( C_0(s) \) (often just \( 1 \)).
- Write \( L_1(j\omega) = a(\omega) + j b(\omega) \) with real functions \( a, b \).
- Impose the condition that \( L(j\omega) = K L_1(j\omega) = -1 \): \( K a(\omega) = -1 \) and \( K b(\omega) = 0 \).
- From \( K b(\omega) = 0 \) with \( K \neq 0 \), we obtain \( b(\omega_c) = 0 \) for some critical frequency \( \omega_c \).
- Substitute \( \omega_c \) into \( a(\omega) \) and solve \( K a(\omega_c) = -1 \) to obtain the critical gain \( K_{\text{crit}} \).
flowchart TD
A["Specify plant G(s) and controller structure C(s)"] --> B["Form loop L(s) = C(s) G(s)"]
B --> C["Factor out scalar gain: L(s) = K L1(s)"]
C --> D["Compute L1(jw) = a(w) + j b(w)"]
D --> E["Solve b(wc) = 0 for critical frequency wc"]
E --> F["Evaluate a(wc); set Kcrit = -1 / a(wc)"]
F --> G["Choose design gain K <= Kcrit to avoid encirclement of -1"]
In the following sections we apply this workflow to specific plants and controller structures relevant to robotic actuators and servo systems.
2. Example 1 — Proportional Gain Design for a Third-Order Plant
Consider a simplified linear model of a robot joint or servo axis, where gear dynamics, actuator and load inertia, and damping have been lumped into a third-order plant. After appropriate normalization, one obtains
\[ G(s) = \frac{1}{s(s+1)(s+3)}. \]
We consider unity feedback with a proportional controller \( C(s) = K \):
\[ L(s) = K G(s) = \frac{K}{s(s+1)(s+3)}. \]
The closed-loop characteristic equation is
\[ 1 + L(s) = 0 \quad \Rightarrow \quad s(s+1)(s+3) + K = 0. \]
Expanding the polynomial gives
\[ s(s+1)(s+3) = s(s^2 + 4s + 3) = s^3 + 4s^2 + 3s, \]
hence
\[ s^3 + 4s^2 + 3s + K = 0. \]
Using the Routh–Hurwitz criterion for a cubic polynomial \( s^3 + a_1 s^2 + a_2 s + a_3 \), asymptotic stability requires
\[ a_1 > 0, \quad a_3 > 0, \quad a_1 a_2 - a_3 > 0. \]
Here \( a_1 = 4 \), \( a_2 = 3 \), \( a_3 = K \), so the conditions become
\[ 4 > 0, \quad K > 0, \quad 4 \cdot 3 - K > 0 \quad \Rightarrow \quad 0 < K < 12. \]
Hence, based purely on time-domain stability criteria, the proportional gain must satisfy \( 0 < K < 12 \) to ensure that the robot joint’s linearized model is asymptotically stable.
We now show how to obtain the same critical gain \( K_{\text{crit}} = 12 \) using the Nyquist plot.
3. Example 1 — Critical Gain via Nyquist
We fix a base loop \( L_1(s) = G(s) \) (i.e., \( K = 1 \)) and then scale by \( K \). Substituting \( s = j\omega \), we obtain
\[ G(j\omega) = \frac{1}{j\omega (j\omega+1) (j\omega+3)}. \]
First compute the product \( (j\omega+1)(j\omega+3) \):
\[ (j\omega+1)(j\omega+3) = (j\omega)^2 + 4 j\omega + 3 = -\omega^2 + 4 j\omega + 3. \]
Then
\[ j\omega (j\omega+1)(j\omega+3) = j\omega(-\omega^2 + 4 j\omega + 3) = -4\omega^2 + j\omega(-\omega^2 + 3). \]
Therefore
\[ G(j\omega) = \frac{1}{-4\omega^2 + j\omega(-\omega^2+3)}. \]
Write the denominator as \( a + j b \), where \( a = -4\omega^2 \), \( b = \omega(-\omega^2+3) \). Then
\[ G(j\omega) = \frac{a - j b}{a^2 + b^2} = \frac{-4\omega^2 - j\omega(-\omega^2+3)} {16\omega^4 + \omega^2(\omega^2-3)^2}. \]
The denominator simplifies as
\[ 16\omega^4 + \omega^2(\omega^2-3)^2 = \omega^2(\omega^4 + 10\omega^2 + 9). \]
Thus the real and imaginary parts are
\[ \Re\{G(j\omega)\} = \frac{-4\omega^2}{\omega^2(\omega^4 + 10\omega^2 + 9)} = -\frac{4}{\omega^4 + 10\omega^2 + 9}, \]
\[ \Im\{G(j\omega)\} = \frac{-\omega(-\omega^2+3)}{\omega^2(\omega^4 + 10\omega^2 + 9)} = \frac{\omega^2 - 3}{\omega(\omega^4 + 10\omega^2 + 9)}. \]
The Nyquist plot crosses the negative real axis when the imaginary part vanishes:
\[ \Im\{G(j\omega_c)\} = 0 \quad \Rightarrow \quad \omega_c^2 - 3 = 0 \quad \Rightarrow \quad \omega_c = \sqrt{3}. \]
At that frequency, the real part is
\[ \Re\{G(j\omega_c)\} = -\frac{4}{\omega_c^4 + 10\omega_c^2 + 9} = -\frac{4}{9 + 10\cdot 3 + 9} = -\frac{4}{48} = -\frac{1}{12}. \]
For general gain \( K \), we have \( L(j\omega) = K G(j\omega) \). The Nyquist plot passes through the critical point \(-1\) when, for some \( \omega = \omega_c \),
\[ K \Re\{G(j\omega_c)\} = -1, \quad K \Im\{G(j\omega_c)\} = 0. \]
We already enforced the imaginary part condition by selecting \( \omega_c = \sqrt{3} \). Substituting the real part:
\[ K \left(-\frac{1}{12}\right) = -1 \quad \Rightarrow \quad K_{\text{crit}} = 12. \]
Hence, Nyquist analysis yields the same critical gain as Routh–Hurwitz. For any \( 0 < K < 12 \), the Nyquist plot of \( L(j\omega) \) does not encircle \(-1\), so \( N = 0 \) and \( Z = 0 \) (since \( P = 0 \)), which implies closed-loop stability. For \( K > 12 \), the Nyquist plot performs one clockwise encirclement of \(-1\), leading to \( N = -1 \), hence \( Z = -1 + 0 = -1 \), i.e., one RHP closed-loop pole, and instability.
In a robotics context, this means that aggressively increasing the proportional gain beyond \( 12 \) in this model will cause an oscillatory or divergent joint response, even though the plant itself is stable.
4. Example 2 — PI Design Region for a Second-Order Plant
For tracking a joint position with zero steady-state error, integral action is often required. Consider a simplified second-order plant, representing a motor plus load inertia with viscous friction:
\[ G_p(s) = \frac{1}{s(s+2)}. \]
We design a PI controller
\[ C_{\text{PI}}(s) = K_p + \frac{K_i}{s} = \frac{K_p s + K_i}{s}. \]
The loop transfer function is
\[ L(s) = C_{\text{PI}}(s) G_p(s) = \frac{K_p s + K_i}{s^2(s+2)}. \]
The closed-loop characteristic equation for unity feedback is
\[ 1 + L(s) = 0 \quad \Rightarrow \quad s^2(s+2) + K_p s + K_i = 0. \]
Expanding:
\[ s^2(s+2) = s^3 + 2s^2, \]
so the characteristic polynomial becomes
\[ s^3 + 2s^2 + K_p s + K_i = 0. \]
Again using the cubic Routh–Hurwitz conditions for \( s^3 + a_1 s^2 + a_2 s + a_3 \), we require
\[ a_1 > 0, \quad a_3 > 0, \quad a_1 a_2 - a_3 > 0. \]
Here \( a_1 = 2 \), \( a_2 = K_p \), \( a_3 = K_i \), so
\[ 2 > 0, \quad K_i > 0, \quad 2 K_p - K_i > 0. \]
Therefore, the PI gains must satisfy
\[ K_p > 0, \quad K_i > 0, \quad K_i < 2 K_p. \]
In the \( (K_p, K_i) \)-plane, the stable region is the open wedge above the axes but below the line \( K_i = 2K_p \). On the boundary \( K_i = 2K_p \), the closed-loop system has a root on the imaginary axis, and the Nyquist plot of \( L(j\omega) \) passes exactly through \(-1\). For gains strictly inside the region, the Nyquist contour does not encircle \(-1\), giving a stable closed loop.
flowchart TD
A["Specify PI structure: Kp, Ki"] --> B["Form L(s) = (Kp s + Ki) / (s^2 (s+2))"]
B --> C["Determine Routh region: Kp > 0, Ki > 0, Ki < 2 Kp"]
C --> D["For candidate (Kp, Ki), compute Nyquist of L(jw)"]
D --> E["Check: Nyquist avoids encirclements of -1"]
E --> F["Select gains well inside region for robustness"]
In practice, we might first find a pair \( (K_p, K_i) \) that yields acceptable time-domain behavior (e.g., rise time and overshoot), then use the Nyquist plot to verify that the closed-loop system maintains a safe distance from \(-1\), indicating robustness to modeling errors and unmodeled high-frequency robot dynamics.
5. Time Delay Margin Sketch via Nyquist
Many robotic actuators are controlled over networks or via digital hardware with transport delay. A pure time delay \( e^{-Ls} \) in the loop transfer function rotates the Nyquist plot by a frequency-dependent phase shift:
\[ L_d(s) = L(s) e^{-Ls} \quad \Rightarrow \quad L_d(j\omega) = L(j\omega) e^{-j\omega L}. \]
The magnitude is unchanged, but each point on the Nyquist plot is rotated by angle \( -\omega L \). If we know the frequency \( \omega_c \) at which the magnitude of \( L(j\omega) \) is unity, \( |L(j\omega_c)| = 1 \), then the largest admissible delay \( L_{\max} \) before the Nyquist plot passes through \(-1\) can be approximated by demanding that the total phase at \( \omega_c \) not reach \(-\pi\):
\[ \angle L(j\omega_c) - \omega_c L_{\max} = -\pi. \]
Solving for \( L_{\max} \) gives
\[ L_{\max} = \frac{\angle L(j\omega_c) + \pi}{\omega_c}. \]
For example, if at \( \omega_c \) we have \( |L(j\omega_c)| = 1 \) and \( \angle L(j\omega_c) = -\frac{2\pi}{3} \) (i.e., \(-120^\circ\)), then
\[ L_{\max} = \frac{-\frac{2\pi}{3} + \pi}{\omega_c} = \frac{\pi/3}{\omega_c} = \frac{1}{3}\frac{\pi}{\omega_c}. \]
This simple estimate is important when designing controllers for distributed robotic systems, where communication delays and sampling intervals must be kept small relative to the closed-loop bandwidth \( \omega_c \).
6. Python Implementation — Nyquist Design for the Third-Order Plant
Python, together with the python-control library, is widely
used in robotics research for prototyping controllers before deploying
them in frameworks such as ROS. The snippet below computes Nyquist plots
for the third-order plant and tests stability for different proportional
gains \( K \).
import numpy as np
import control as ctrl
import matplotlib.pyplot as plt
# Third-order plant: G(s) = 1 / (s (s + 1) (s + 3))
# Denominator: s^3 + 4 s^2 + 3 s
num = [1.0]
den = [1.0, 4.0, 3.0, 0.0]
G = ctrl.TransferFunction(num, den)
# Sampling of candidate gains
gains = [3.0, 9.0, 12.0]
fig, ax = plt.subplots()
for K in gains:
L = K * G
# Nyquist plot (python-control draws both positive and negative frequencies)
ctrl.nyquist_plot(L, omega_limits=(1e-2, 1e2), omega_num=400, ax=ax)
# Closed-loop transfer function T(s) = L(s) / (1 + L(s))
T = ctrl.feedback(L, 1)
poles = ctrl.pole(T)
print(f"K = {K}")
print("Closed-loop poles:", poles)
if np.all(np.real(poles) < 0.0):
print(" Stable closed loop\n")
else:
print(" Unstable closed loop\n")
# Mark the critical point -1 + j 0
ax.plot([-1.0], [0.0], "x")
ax.set_title("Nyquist plots for different gains K")
ax.set_xlabel("Real axis")
ax.set_ylabel("Imag axis")
ax.grid(True)
plt.show()
# In a robotics workflow, the chosen K would be used as the proportional gain
# of a joint controller (e.g., in a ros_control PID loop).
For gains \( K = 3 \) and \( K = 9 \), the closed-loop poles have negative real parts. At \( K \approx 12 \), the Nyquist plot approaches the critical point \(-1\), and the closed-loop poles move toward the imaginary axis, signaling a loss of robustness.
7. C++ Implementation — Nyquist Sampling for Embedded/ROS Controllers
In embedded and ROS-based robot control, C++ is often the language of
choice. Below we show how to numerically sample \( L(j\omega) \) for the
third-order plant using the C++ standard library
<complex>. The resulting data can be plotted with
tools such as gnuplot or embedded into diagnostic GUIs.
#include <iostream>
#include <complex>
#include <vector>
#include <cmath>
// Plant: G(s) = 1 / (s (s + 1) (s + 3))
std::complex<double> G_of_s(const std::complex<double> &s)
{
return 1.0 / (s * (s + 1.0) * (s + 3.0));
}
int main()
{
double K = 9.0; // test gain (< 12 for stability)
std::vector<std::complex<double> > nyquistPoints;
// Logarithmic frequency sweep
double w_min = 1e-2;
double w_max = 1e2;
int N = 400;
for (int k = 0; k < N; ++k)
{
double alpha = static_cast<double>(k) / (N - 1);
double w = w_min * std::pow(w_max / w_min, alpha);
std::complex<double> s(0.0, w); // j * w
std::complex<double> L = K * G_of_s(s);
nyquistPoints.push_back(L);
}
// Export points for plotting
for (const auto &z : nyquistPoints)
{
std::cout << z.real() << " " << z.imag() << "\n";
}
// In a ROS node, one might log the minimal distance of L(jw) to -1
// as a health metric for the joint controller.
return 0;
}
This computation can be integrated with robotics libraries such as
ros_control, where the gain \( K \) corresponds to a
proportional joint or velocity gain, and diagnostics can include
Nyquist-based stability margin estimates offline.
8. Java Implementation — Nyquist-Oriented Analysis for Java Robotics
Java is used in robotics environments such as WPILib for FRC robots. The
following code uses Apache Commons Math
(org.apache.commons.math3.complex.Complex) to evaluate \(
L(j\omega) \) for the third-order plant.
import org.apache.commons.math3.complex.Complex;
public class NyquistExample {
// G(s) = 1 / (s (s + 1) (s + 3))
static Complex G_of_s(Complex s) {
Complex term1 = s;
Complex term2 = s.add(1.0);
Complex term3 = s.add(3.0);
return Complex.ONE.divide(term1.multiply(term2).multiply(term3));
}
public static void main(String[] args) {
double K = 9.0; // proportional gain candidate
double wMin = 1e-2;
double wMax = 1e2;
int N = 400;
for (int k = 0; k < N; ++k) {
double alpha = (double) k / (double) (N - 1);
double w = wMin * Math.pow(wMax / wMin, alpha);
Complex s = new Complex(0.0, w); // j * w
Complex L = G_of_s(s).multiply(K);
System.out.printf("%f %f%n", L.getReal(), L.getImaginary());
}
// These (Re, Im) pairs can be plotted in a tool or used within
// robot code to verify that the Nyquist curve stays away from -1.
// In WPILib-based code, K would be the proportional gain of a
// joint PID controller.
}
}
Although Nyquist analysis is rarely computed in real time on embedded hardware, offline tools like this are valuable when designing and validating gains for Java-controlled robots.
9. MATLAB / Simulink Implementation — Classical Frequency-Domain Design
MATLAB and Simulink provide built-in functions for Nyquist plots and closed-loop analysis. This is standard in robotics and mechatronics labs, where actuator models are often represented as transfer functions or Simulink block diagrams.
% Third-order plant for a robot joint:
% G(s) = 1 / (s (s + 1) (s + 3))
s = tf('s');
G = 1 / (s * (s + 1) * (s + 3));
% Proportional controller K
K = 9;
L = K * G;
figure;
nyquist(L);
hold on;
plot(-1, 0, 'rx', 'MarkerSize', 10, 'LineWidth', 2);
grid on;
title('Nyquist plot for L(s) = K G(s)');
xlabel('Real axis');
ylabel('Imag axis');
% Closed-loop transfer function
T = feedback(L, 1);
poles_T = pole(T)
% Simulink model (optional) to simulate step response in a robot joint
% new_system('nyquist_robot_joint');
% open_system('nyquist_robot_joint');
% add_block('simulink/Continuous/Transfer Fcn', ...
% 'nyquist_robot_joint/Plant');
% set_param('nyquist_robot_joint/Plant', 'Numerator', '1', ...
% 'Denominator', '[1 4 3 0]');
% add_block('simulink/Sources/Step', 'nyquist_robot_joint/Step');
% add_block('simulink/Math Operations/Gain', ...
% 'nyquist_robot_joint/Proportional Gain');
% set_param('nyquist_robot_joint/Proportional Gain', 'Gain', num2str(K));
% add_block('simulink/Sinks/Scope', 'nyquist_robot_joint/Scope');
% % Connect blocks to form unity-feedback loop and simulate.
% In Robotics System Toolbox, one could connect this axis model to a
% multibody robot model and reuse the same Nyquist-based gain K.
The MATLAB/Simulink implementation is particularly convenient for exploring how the Nyquist curve and closed-loop poles move as \( K \) varies, and for testing the controller on more detailed robotic models.
10. Wolfram Mathematica Implementation — Symbolic and Numerical Nyquist
Wolfram Mathematica includes symbolic manipulation and control-system functions that make it easy to replicate the analytic derivations and plots for Nyquist-based design.
(* Define the Laplace variable and plant *)
s = LaplaceTransformVariable;
G[s_] := 1/(s (s + 1) (s + 3));
(* Critical gain from analytic derivation *)
Kcrit = 12;
(* Nyquist plot for K = 3, 9, 12 *)
Needs["ControlSystems`"];
Gtf = TransferFunctionModel[{1}, {1, 4, 3, 0}, s];
nyquistPlots = Table[
NyquistPlot[K * Gtf,
{s, I*10^-2, I*10^2},
PlotRange -> All,
PlotLegends -> Placed[{ToString[K]}, {0.1, 0.9}]
],
{K, {3, 9, 12}}
];
Show[nyquistPlots]
(* Closed-loop poles for each K *)
Table[
{
K,
ClosedLoopPoles[FeedbackConnect[K * Gtf, 1]]
},
{K, {3, 9, 12}}
]
Mathematica is useful when deriving symbolic expressions such as \( \Re\{G(j\omega)\} \) and \( \Im\{G(j\omega)\} \), or when exploring more complex compensator structures for high-precision robotic manipulators.
11. Problems and Solutions
Problem 1 (Critical Gain via Nyquist): For the plant \( G(s) = 1/(s(s+1)(s+3)) \) with proportional controller \( C(s) = K \), reproduce the derivation of the critical gain \( K_{\text{crit}} \) using Nyquist, i.e., by solving \( K G(j\omega_c) = -1 \) for some \( \omega_c \). Show that \( K_{\text{crit}} = 12 \).
Solution: As in Section 3, we compute \( G(j\omega) = a(\omega) + j b(\omega) \) and obtain
\[ a(\omega) = -\frac{4}{\omega^4 + 10\omega^2 + 9}, \quad b(\omega) = \frac{\omega^2 - 3}{\omega(\omega^4 + 10\omega^2 + 9)}. \]
The Nyquist plot crosses the negative real axis when \( b(\omega_c) = 0 \), which gives \( \omega_c^2 - 3 = 0 \) and hence \( \omega_c = \sqrt{3} \). Substituting into \( a(\omega) \):
\[ a(\omega_c) = -\frac{4}{\omega_c^4 + 10\omega_c^2 + 9} = -\frac{4}{9 + 10\cdot 3 + 9} = -\frac{1}{12}. \]
To have \( K G(j\omega_c) = -1 \), we require \( K a(\omega_c) = -1 \), so
\[ K \left(-\frac{1}{12}\right) = -1 \quad \Rightarrow \quad K_{\text{crit}} = 12. \]
For any \( 0 < K < 12 \) the Nyquist plot does not pass through \(-1\), and since the plant has no RHP poles, the closed-loop system is stable.
Problem 2 (Nyquist vs Routh for a Simpler Plant): Consider the plant \( G(s) = 1/(s(s+4)) \) and proportional controller \( C(s) = K \) in unity feedback. Determine the range of \( K \) for closed-loop stability using Routh–Hurwitz, and give a qualitative Nyquist interpretation.
Solution: The loop transfer function is \( L(s) = K/(s(s+4)) \), and the characteristic equation is
\[ 1 + \frac{K}{s(s+4)} = 0 \quad \Rightarrow \quad s(s+4) + K = 0 \quad \Rightarrow \quad s^2 + 4s + K = 0. \]
For \( s^2 + 4s + K \), Routh–Hurwitz requires \( 4 > 0 \) and \( K > 0 \). Thus the closed-loop system is stable for all
\[ K > 0. \]
Nyquist interpretation: The Nyquist plot of \( G(j\omega) \) for \( K = 1 \) lies entirely in a wedge whose angle is between \(-90^\circ\) and \(-180^\circ\), approaching the origin along a line with phase asymptotically \(-180^\circ\). Scaling by \( K > 0 \) moves the curve radially but never causes it to encircle \(-1\), since the set of angles occupied by the Nyquist curve never includes \(-180^\circ\) at a magnitude large enough to reach \(-1\). Thus the Nyquist criterion also predicts stability for all \( K > 0 \).
Problem 3 (PI Stability Region via Nyquist and Routh): For the plant \( G_p(s) = 1/(s(s+2)) \) with PI controller \( C_{\text{PI}}(s) = K_p + K_i/s \), derive the stability region in the \( (K_p, K_i) \)-plane using Routh–Hurwitz, and explain how this corresponds to Nyquist plots that avoid encirclements of \(-1\).
Solution: As in Section 4, the characteristic polynomial is
\[ s^3 + 2s^2 + K_p s + K_i = 0. \]
The coefficients are \( a_1 = 2 \), \( a_2 = K_p \), \( a_3 = K_i \). Routh–Hurwitz requires
\[ 2 > 0, \quad K_i > 0, \quad 2 K_p - K_i > 0. \]
Therefore,
\[ K_p > 0, \quad K_i > 0, \quad K_i < 2 K_p. \]
Nyquist viewpoint: For a given pair \( (K_p, K_i) \) on the boundary \( K_i = 2 K_p \), the characteristic polynomial has a root on the imaginary axis, so the Nyquist plot of \( L(j\omega) \) passes through \(-1\). For \( (K_p, K_i) \) strictly inside the region, the Nyquist plot deforms continuously away from \(-1\) without creating any encirclement, so the closed loop remains stable. Outside the region, the Nyquist plot must encircle \(-1\), corresponding to at least one RHP closed-loop pole.
Problem 4 (Delay Margin Estimate): Let \( L(s) = K G(s) \) be a stable loop transfer function with \( P = 0 \), and suppose that \( |L(j\omega_c)| = 1 \) at some crossover frequency \( \omega_c \) where the phase is \( \angle L(j\omega_c) = \phi_c \) (with \( \phi_c \in (-\pi, 0) \)). Derive the expression for the maximum delay \( L_{\max} \) such that the delayed loop \( L_d(s) = L(s) e^{-Ls} \) has its Nyquist plot just passing through \(-1\) at \( \omega_c \).
Solution: For the delayed loop
\[ L_d(j\omega) = L(j\omega) e^{-j\omega L}, \]
the magnitude is unchanged, but the phase at frequency \( \omega \) is
\[ \angle L_d(j\omega) = \angle L(j\omega) - \omega L. \]
At the crossover frequency \( \omega_c \), we have \( |L(j\omega_c)| = 1 \). The Nyquist plot passes exactly through \(-1\) when the magnitude is 1 and the phase is \(-\pi\). Therefore, we impose
\[ \angle L(j\omega_c) - \omega_c L_{\max} = -\pi. \]
Solving for \( L_{\max} \) gives
\[ L_{\max} = \frac{\angle L(j\omega_c) + \pi}{\omega_c} = \frac{\phi_c + \pi}{\omega_c}. \]
If \( \phi_c \) is already close to \(-\pi\), then \( L_{\max} \) is small, indicating little tolerance to delay. This illustrates a direct connection between the Nyquist plot and allowable network or computation latency in robotic control systems.
12. Summary
In this lesson we used the Nyquist criterion not only as a stability test but as a practical design tool. For a third-order plant \( G(s) = 1/(s(s+1)(s+3)) \), we analytically computed the critical proportional gain \( K_{\text{crit}} = 12 \) by finding where the Nyquist plot passes through \(-1\). For a second-order plant with a PI controller, we derived the stability region \( K_p > 0, K_i > 0, K_i < 2K_p \) and interpreted it geometrically in terms of Nyquist encirclements. We also sketched how time delays rotate the Nyquist plot and derived a delay-margin estimate. Finally, we implemented Nyquist-based analysis in Python, C++, Java, MATLAB/Simulink, and Wolfram Mathematica, making explicit connections to robotic actuators and control frameworks. These examples prepare us for more systematic frequency-domain design methods in later chapters.
13. References
- Nyquist, H. (1932). Regeneration theory. Bell System Technical Journal, 11(1), 126–147.
- Bode, H. W., & Shannon, C. E. (1950). A simplified derivation of linear least square smoothing and prediction theory. Proceedings of the IRE, 38(4), 417–425.
- Bode, H. W. (1945). Network Analysis and Feedback Amplifier Design. Van Nostrand.
- Black, H. S. (1934). Stabilized feedback amplifiers. Bell System Technical Journal, 13(1), 1–18.
- MacColl, L. A. (1945). Fundamental theory of servomechanisms. Bell System Technical Journal, 24(3), 427–490.
- Evans, W. R. (1948). Control system synthesis by root locus method. Transactions of the AIEE, 67(1), 547–551.
- Tsypkin, Ya. Z. (1958). On the stability of linear systems with time lag. Automatica i Telemekhanika, 19(8), 497–520.
- Truxal, J. G. (1955). Automatic Feedback Control System Synthesis. McGraw–Hill.
- Jury, E. I. (1964). Theory and Application of the z-Transform Method. Wiley.
- Zames, G. (1966). On the input-output stability of time-varying nonlinear feedback systems. IEEE Transactions on Automatic Control, 11(2), 228–238.