18.2 PID Controller Tuning and Loop Stability
Key Takeaways
- A linear closed-loop control system is stable if and only if all roots of its characteristic equation 1 + G_OL(s) = 0 reside strictly in the open left half of the complex Laplace plane (Re(s) < 0).
- The Routh-Hurwitz criterion determines closed-loop stability algebraically without factoring polynomials: all coefficients in the characteristic equation must be positive, and there must be zero sign changes in the first column of the Routh array.
- Under frequency response analysis, the Bode stability criterion requires the open-loop amplitude ratio to be strictly less than unity at the phase crossover frequency omega_co (where phase angle is -180 deg); robust chemical process loops require Gain Margin GM >= 1.7 to 2.0 and Phase Margin PM >= 30 deg to 45 deg.
- Ziegler-Nichols closed-loop tuning determines the ultimate gain K_u and ultimate period P_u at sustained marginal oscillation: classic settings (PID: K_c = 0.60 * K_u, tau_I = P_u / 2, tau_D = P_u / 8) produce an aggressive quarter-amplitude decay ratio (DR = 0.25), whereas Tyreus-Luyben rules provide more conservative damping for chemical plants.
- For dead-time dominated processes (theta / tau_p > 0.5), Cohen-Coon and Internal Model Control (IMC) tuning correlations significantly outperform Ziegler-Nichols rules by incorporating the controllability ratio to avoid underdamped oscillatory instability.
18.2 PID Controller Tuning and Loop Stability
In chemical manufacturing, improper controller tuning leads to catastrophic consequences: unstable exothermic reactors can experience thermal runaway, distillation columns can flood or dump trays, and uncoordinated pressure loops can lift relief valves. Achieving robust stability requires an analytical understanding of how controller parameters ($K_c, \tau_I, \tau_D$) interact with process inertia and dead time.
On the NCEES PE Chemical Exam, stability analysis and tuning questions require finding the ultimate gain ($K_u$) and period ($P_u$), constructing Routh arrays, evaluating Gain Margin ($GM$) and Phase Margin ($PM$) on Bode plots, and applying Ziegler-Nichols, Cohen-Coon, and Internal Model Control (IMC) tuning rules.
1. Closed-Loop Stability & Pole Placement
The Characteristic Equation
The stability of any linear feedback control loop is dictated by the denominator of its closed-loop transfer function. Regardless of whether a setpoint change or load disturbance occurs, stability depends entirely on the roots of the characteristic equation:
Where $G_{OL}(s)$ is the total open-loop transfer function. The roots of this equation are the closed-loop poles ($s = p_i = \sigma_i + j \omega_i$):
- Stable System: All poles reside strictly in the open Left-Half Plane (LHP) of the complex $s$-plane: $\text{Re}(p_i) = \sigma_i < 0$ for all $i$. In the time domain, transient terms decay exponentially ($e^{\sigma_i t} \to 0$).
- Marginally Stable System: One or more non-repeated conjugate poles lie exactly on the imaginary axis ($\sigma_i = 0, \omega_i \neq 0$). The process exhibits sustained, constant-amplitude oscillations at frequency $\omega_{co}$.
- Unstable System: Any pole lies in the Right-Half Plane (RHP): $\text{Re}(p_i) = \sigma_i > 0$. The transient response grows exponentially ($e^{\sigma_i t} \to \infty$), resulting in physical saturation or equipment failure.
IMAGINARY AXIS (j*omega)
^
UNSTABLE REGION | STABLE REGION
(Roots Grow: e^+sigma*t) | (Roots Decay: e^-sigma*t)
| X p1 = -sigma + j*omega
|
-------------------------+-------------------------> REAL AXIS (sigma)
|
| X p2 = -sigma - j*omega
|
MARGINALLY STABLE (sigma = 0)
Continuous Cycling at omega_co
Dynamic Damping and Decay Ratio
For second-order closed-loop poles ($s^2 + 2 \zeta \omega_n s + \omega_n^2 = 0$ with $0 < \zeta < 1$):
- Damping Ratio ($\zeta$): Controls oscillation damping. Low $\zeta$ yields sharp oscillations.
- Decay Ratio ($DR$): The ratio of the amplitude of the second peak to that of the first peak: The classic quarter-amplitude decay ratio ($DR = 1/4 = 0.25$) corresponds to $\zeta \approx 0.36$. While historically popular for rapid recovery, it is considered too oscillatory for modern, tightly integrated chemical processes where $\zeta \approx 0.5 - 0.7$ ($DR \le 0.05$) is preferred.
2. Algebraic Stability: The Routh-Hurwitz Criterion
The Routh-Hurwitz criterion tests whether any roots of a polynomial characteristic equation have positive real parts without requiring numerical root finding.
Necessary Condition (Stodola's Rule)
All polynomial coefficients $a_n, a_{n-1}, \dots, a_0$ must be strictly non-zero and share the same mathematical sign (conventionally all positive, $a_i > 0$). If any coefficient is zero or negative, the system is automatically unstable.
Constructing the Routh Array
Arrange the polynomial coefficients into a Routh array:
| Polynomial Row | Column 1 | Column 2 | Column 3 |
|---|---|---|---|
| s^n | $a_n$ | $a_{n-2}$ | $a_{n-4}$ |
| s^(n-1) | $a_{n-1}$ | $a_{n-3}$ | $a_{n-5}$ |
| s^(n-2) | $b_1$ | $b_2$ | $b_3$ |
| s^(n-3) | $c_1$ | $c_2$ | $c_3$ |
| s^0 | $a_0$ | 0 | 0 |
Where the array elements are calculated via cross-multiplication:
Stability Theorem
The system is stable if and only if all elements in the first column of the Routh array are strictly positive ($a_n, a_{n-1}, b_1, c_1, \dots > 0$). The number of sign changes in the first column equals the number of unstable roots with positive real parts (in the RHP).
To find the ultimate controller gain $K_u$, set the row element containing $K_c$ to zero ($b_1 = 0$ or $c_1 = 0$). The auxiliary equation formed by the preceding row yields the sustained oscillation frequency $\omega_{co}$.
[!TIP] Handling Dead Time with Padé Approximations:
Because dead time $e^{-\theta s}$ is transcendental, Routh-Hurwitz cannot be applied directly. To use Routh-Hurwitz, approximate dead time using a first-order Padé approximation:
3. Frequency Response & Bode Stability Criteria
Frequency response evaluates loop behavior when subjected to sinusoidal inputs by substituting $s = j\omega$ into the open-loop transfer function: $G_{OL}(j\omega) = |G_{OL}(j\omega)| e^{j \phi(\omega)}$.
BODE PLOT: GAIN AND PHASE MARGIN DEFINITIONS
Log AR
^
1.0 +==================\============================ (0 dB Line)
| \ Gain Crossover (omega_g: AR = 1)
| \
| *-----------------+
| \ | Gain Margin (GM = 1 / AR_co)
| \ v
+------------------------*----------------------> Frequency (omega)
\ Phase Crossover (omega_co: phi = -180°)
Phase (deg) \
| \
-135°| \ +------+ Phase Margin
| \ | | (PM = 180° + phi_g)
-180°+------------------------------*--+------v------
| |
v v omega_co
Characteristic Frequencies
- Phase Crossover Frequency ($\omega_{co}$): The frequency where total open-loop phase lag reaches $-180^\circ$ ($-\pi\text{ radians}$):
- Gain Crossover Frequency ($\omega_g$): The frequency where open-loop amplitude ratio is exactly unity ($0\text{ dB}$):
The Bode Stability Criterion
A closed-loop system is stable if and only if the open-loop amplitude ratio is strictly less than 1.0 at the phase crossover frequency:
If $AR_{OL}(\omega_{co}) = 1.0$, the loop is marginally stable and oscillates continuously. If $AR_{OL}(\omega_{co}) > 1.0$, signals circulating around the loop grow with each cycle, causing severe instability.
Robustness Metrics: Gain Margin and Phase Margin
To safeguard against modeling errors and plant aging, chemical engineering loops are tuned to maintain strict stability margins:
Phase Angles for Elementary Dynamic Elements
- Dead Time ($e^{-\theta s}$): $AR = 1.0$, $\phi = -\theta \omega\text{ radians} = -\frac{180^\circ}{\pi} \theta \omega$. Introduces unbounded phase lag without gain attenuation, making dead time the primary limiter of loop performance!
- First-Order Lag ($1/(\tau s + 1)$): $AR = 1/\sqrt{1 + \omega^2 \tau^2}$, $\phi = -\arctan(\omega \tau)$.
- Pure Integrator ($1/s$): $AR = 1/\omega$, $\phi = -90^\circ$.
- Ideal Derivative ($s$): $AR = \omega$, $\phi = +90^\circ$.
4. Empirical Controller Tuning Methodologies
1. Ziegler-Nichols Closed-Loop (Ultimate Gain) Method
The Ziegler-Nichols (Z-N) closed-loop technique (also known as the continuous cycling method) is performed with the controller installed in automatic mode:
- Deactivate integral action (set $\tau_I \to \infty$, or reset rate $= 0$) and derivative action (set $\tau_D = 0$).
- Introduce a small setpoint disturbance.
- Incrementally increase controller gain $K_c$ until the process variable exhibits sustained, constant-amplitude oscillations.
- Record this critical gain as the Ultimate Gain ($K_u$) and measure the period of oscillation as the Ultimate Period ($P_u$):
| Controller Mode | Controller Gain $K_c$ | Integral Time $\tau_I$ | Derivative Time $\tau_D$ |
|---|---|---|---|
| P | $0.50 , K_u$ | — | — |
| PI | $0.45 , K_u$ | $P_u / 1.20$ | — |
| PID | $0.60 , K_u$ | $P_u / 2.00$ | $P_u / 8.00$ |
2. Tyreus-Luyben Tuning (Conservative Chemical Process Rules)
Ziegler-Nichols settings yield a quarter-amplitude decay ratio ($DR = 0.25$), which is often too aggressive for chemical reactors and distillation columns. The Tyreus-Luyben rules provide a more conservative, robust response:
- PI Control: $K_c = 0.31 , K_u$, $\tau_I = 2.20 , P_u$.
- PID Control: $K_c = 0.31 , K_u$, $\tau_I = 2.20 , P_u$, $\tau_D = P_u / 6.30$.
3. Open-Loop Step Testing: Ziegler-Nichols vs. Cohen-Coon
When closed-loop cycling is forbidden for safety reasons, the loop is decoupled to manual mode, and a step change in valve output $\Delta u$ is introduced to obtain the process reaction curve ($K_p, \tau_p, \theta$):
- If $\chi < 0.20$: Easy to control; standard Z-N open-loop rules work well.
- If $0.20 \le \chi \le 0.50$: Moderate difficulty.
- If $\chi > 0.50$: Dead-time dominated; classic Z-N tuning produces severe instability. Cohen-Coon or IMC rules must be applied.
| Tuning Method | Controller Mode | Controller Gain $K_c$ | Integral Time $\tau_I$ | Derivative Time $\tau_D$ |
|---|---|---|---|---|
| Z-N Open-Loop | P | $\frac{1}{K_p} \left( \frac{\tau_p}{\theta} \right)$ | — | — |
| PI | $\frac{0.90}{K_p} \left( \frac{\tau_p}{\theta} \right)$ | $3.33 , \theta$ | — | |
| PID | $\frac{1.20}{K_p} \left( \frac{\tau_p}{\theta} \right)$ | $2.00 , \theta$ | $0.50 , \theta$ | |
| Cohen-Coon | P | $\frac{1}{K_p} \left( \frac{\tau_p}{\theta} \right) \left[ 1 + \frac{\theta}{3 \tau_p} \right]$ | — | — |
| PI | $\frac{1}{K_p} \left( \frac{\tau_p}{\theta} \right) \left[ 0.90 + \frac{\theta}{12 \tau_p} \right]$ | $\theta \left[ \frac{30 + 3(\theta/\tau_p)}{9 + 20(\theta/\tau_p)} \right]$ | — | |
| PID | $\frac{1}{K_p} \left( \frac{\tau_p}{\theta} \right) \left[ \frac{16 \tau_p + 3 \theta}{12 \tau_p} \right]$ | $\theta \left[ \frac{32 + 6(\theta/\tau_p)}{13 + 8(\theta/\tau_p)} \right]$ | $\theta \left[ \frac{4}{11 + 2(\theta/\tau_p)} \right]$ |
4. Internal Model Control (IMC) Tuning
Internal Model Control parameterizes the controller in terms of the desired closed-loop time constant $\tau_c$ (a tuning knob where smaller $\tau_c$ gives faster response, while larger $\tau_c$ increases robustness):
Typically, set $\tau_c = \theta$ for moderate performance, or $\tau_c = 3 \theta$ for high robustness. IMC produces smooth, monotonic setpoint tracking with zero overshoot.
5. Summary Comparison Table: PID Tuning Strategies
| Method | Primary Test / Input | Basis & Philosophy | Pros | Cons / Traps |
|---|---|---|---|---|
| Z-N Closed-Loop | $K_u, P_u$ from continuous cycling. | Marginally stable loop ($AR=1, \phi=-180^\circ$). | Direct experimental measurement; no transfer function required. | Pushes plant to the brink of instability; quarter-decay is too oscillatory. |
| Tyreus-Luyben | $K_u, P_u$ from continuous cycling. | Damped chemical process response. | Prevents valve wear; minimal overshoot; conservative. | Slower disturbance settling times. |
| Z-N Open-Loop | $K_p, \tau_p, \theta$ from manual step test. | Reaction curve tangent slope ($S = K_p / \tau_p$). | Safe manual step test; simple calculation. | Fails completely when dead time is large ($\theta / \tau_p > 0.5$). |
| Cohen-Coon | $K_p, \tau_p, \theta$ from manual step test. | Quarter-decay with dead-time ratio compensation. | Excellent for moderate to high dead-time systems. | Formulae are complex; can still yield high overshoot. |
| IMC / Direct Synthesis | $K_p, \tau_p, \theta$ and user choice of $\tau_c$. | Process model inversion with low-pass filter. | Robust; non-oscillatory; intuitive single tuning knob ($\tau_c$). | Slow load disturbance rejection on lag-dominated processes if $\tau_c$ is too large. |
6. Comprehensive Worked Numerical Example
Problem Statement
A chemical reactor temperature control loop consists of three first-order non-interacting thermal capacitances in series, governed by the following open-loop transfer function ($G_v = 1.0, G_m = 1.0$):
- Routh-Hurwitz Stability: Formulate the closed-loop characteristic polynomial, construct the Routh array, and determine the range of controller gain $K_c$ for closed-loop stability.
- Ultimate Parameters: Evaluate the ultimate gain $K_u$, phase crossover frequency $\omega_{co}$, and ultimate period $P_u$.
- Bode Verification: Verify $\omega_{co}$ and $K_u$ using frequency response principles.
- PID Tuning Calculations: Calculate the controller settings ($K_c, \tau_I, \tau_D$) using classic Ziegler-Nichols closed-loop rules, and compare them with Tyreus-Luyben settings.
Step 1: Characteristic Polynomial & Routh Array
The closed-loop characteristic equation is $1 + G_{OL}(s) = 0$:
Expand the product of terms:
Adding the controller gain yields the characteristic polynomial:
Construct the Routh array:
| Polynomial Row | Element 1 | Element 2 |
|---|---|---|
| s^3 | 8 | 7 |
| s^2 | 14 | $1 + 2 K_c$ |
| s^1 | $b_1$ | 0 |
| s^0 | $1 + 2 K_c$ | 0 |
Compute $b_1$:
For stability, all elements in the first column must be strictly positive:
- $8 > 0$ and $14 > 0$ (satisfied)
- $b_1 > 0 \implies 90 - 16 K_c > 0 \implies 16 K_c < 90 \implies K_c < 5.625$
- $1 + 2 K_c > 0 \implies K_c > -0.500$
Thus, the range of controller gain for closed-loop stability is:
Step 2: Ultimate Gain and Period
The upper stability boundary defines the Ultimate Gain:
At $K_c = K_u = 5.625$, the $s^1$ row vanishes ($b_1 = 0$). Form the auxiliary equation from the $s^2$ row:
The phase crossover frequency is:
The ultimate period of oscillation is:
Step 3: Frequency Response (Bode) Verification
At phase crossover, the sum of individual phase angles must equal $-180^\circ$:
Substitute $\omega = 0.93541\text{ rad/min}$:
- $-\arctan(0.93541) = -43.09^\circ$
- $-\arctan(2 \times 0.93541) = -\arctan(1.8708) = -61.88^\circ$
- $-\arctan(4 \times 0.93541) = -\arctan(3.7416) = -75.03^\circ$
- $\sum \phi = -43.09^\circ - 61.88^\circ - 75.03^\circ = -180.00^\circ$ (Verified!)
Compute the amplitude ratio of the process at $\omega_{co}$:
At marginal stability, $|G_{OL}| = K_u |G_p| = 1.0$:
Step 4: PID Controller Settings Comparison
-
Classic Ziegler-Nichols Closed-Loop PID Settings:
-
Tyreus-Luyben Chemical Process Settings:
(Notice that Tyreus-Luyben slashes the controller gain by nearly 50% and increases integral time by over 400%, suppressing oscillations and providing superior gain and phase margins).
7. Critical PE Exam Traps & Pitfalls
[!WARNING] Trap 1: Confusing Ultimate Gain ($K_u$) with Process Gain ($K_p$)
Process gain $K_p$ is an inherent physical parameter of the equipment ($\Delta y_{ss} / \Delta u$). Ultimate gain $K_u$ is the controller gain setting that causes the closed loop to enter sustained, undamped oscillations at $\omega_{co}$. Never substitute $K_p$ into the Ziegler-Nichols closed-loop tuning formulas in place of $K_u$.
[!WARNING] Trap 2: Mixing Radians and Degrees in Dead-Time Phase Lag
The phase contribution of dead time is $\phi_{dead} = -\theta \omega$. This formula yields radians! When summing with arc-tangent terms in degrees, you must convert radians to degrees: $\phi_{dead} = -\theta \omega \times (180^\circ / \pi)$. Forgetting this conversion leads to gross errors in calculating $\omega_{co}$ and stability margins.
[!WARNING] Trap 3: Reset Rate vs. Integral Time Constant Units
Exam questions often quote integral action as either integral time $\tau_I$ (minutes per repeat) or reset rate $I$ (repeats per minute), where $I = 1 / \tau_I$. Entering $I$ where $\tau_I$ is expected in tuning formulas produces an inverted, destabilizing integral action.
[!WARNING] Trap 4: Miscalculating Phase Margin Sign
Phase margin is defined as $PM = 180^\circ + \phi_{OL}(\omega_g)$, where $\phi_{OL}(\omega_g)$ is inherently negative (e.g., $-145^\circ$). Therefore, $PM = 180^\circ + (-145^\circ) = +35^\circ$. A positive phase margin signifies stability; a negative phase margin indicates an unstable loop.
A third-order chemical reactor level system has the open-loop transfer function G_OL(s) = 4.0 * K_c / [(s + 1)(s + 2)(s + 3)]. Using the Routh-Hurwitz criterion, what is the maximum controller gain K_c,max to maintain closed-loop stability, and what is the oscillation frequency omega_co at this stability boundary?
A thermal process is characterized by the FOPDT transfer function G_p(s) = 2.5 * exp(-2.0 * s) / (5.0 * s + 1) (°C / %). A chemical engineer performs frequency response analysis to determine Ziegler-Nichols PI tuning settings. What are the phase crossover frequency omega_co, the ultimate gain K_u, and the resulting Ziegler-Nichols PI controller gain K_c and integral time tau_I?
An open-loop frequency response sweep is conducted on a chemical reactor temperature loop. At frequency omega_1 = 0.40 rad/min, the amplitude ratio is |G_OL| = 1.00 and phase angle is phi_1 = -135°. At frequency omega_2 = 0.85 rad/min, the phase angle is phi_2 = -180° and amplitude ratio is |G_OL| = 0.40. What are the Gain Margin (GM) and Phase Margin (PM), and does this loop satisfy standard chemical process robustness criteria?