Chapter 19: Lead, Lag, and Lead–Lag Compensation
Lesson 2: Phase Lag Compensator Structure and Effects
This lesson studies the mathematical structure and frequency-domain effects of phase lag compensators in linear feedback systems. We derive canonical forms, analyze magnitude and phase behavior, and relate lag compensation to steady-state error constants and stability margins. We also show how to realize lag compensators in continuous time and implement them in Python, C++, Java, MATLAB/Simulink, and Wolfram Mathematica, with remarks on robotic control libraries.
1. Conceptual Overview of Phase Lag Compensation
Consider a unity-feedback linear control system with open-loop transfer function \( L(s) = C(s) G(s) \), where \( G(s) \) is the plant model and \( C(s) \) is the controller. The closed-loop transfer function for the output is
\[ T(s) = \frac{Y(s)}{R(s)} = \frac{L(s)}{1 + L(s)}, \quad E(s) = \frac{R(s)}{1 + L(s)}. \]
A phase lag compensator is a stable, proper controller factor \( C_{\text{lag}}(s) \) that contributes negative phase (phase lag) over a band of frequencies while shaping the magnitude in such a way that low-frequency loop gain is effectively increased relative to the gain near the crossover frequency.
Typical design goals for lag compensation are:
- Improve steady-state accuracy (reduce steady-state error) by increasing loop gain near \( \omega \approx 0 \).
- Maintain (or only slightly degrade) stability margins by placing lag dynamics at low frequencies.
- Provide some high-frequency attenuation, which can help with sensor noise and unmodeled fast dynamics.
flowchart TD
A["Start: Unity-feedback system G(s)"] --> B["Specify steady-state error requirement \n(e.g. Kp, Kv)"]
B --> C["Check if increasing proportional \ngain alone violates stability margins"]
C -->|yes| D["Introduce lag factor C_lag(s) with \npole closer to origin than zero"]
C -->|no| E["Pure gain increase \nis sufficient"]
D --> F["Low-frequency loop \ngain effectively higher"]
F --> G["Steady-state \nerror reduced"]
D --> H["Small extra phase \nlag near crossover"]
H --> I["Check gain/phase margins; \niterate design if needed"]
In contrast to a phase lead compensator (Lesson 1), which mainly improves transient response and phase margin, a phase lag compensator is primarily a steady-state accuracy tool with relatively mild influence on transient dynamics when designed properly.
2. Canonical Transfer Function of a Phase Lag Compensator
A standard continuous-time phase lag compensator is a first-order transfer function of the form
\[ C_{\text{lag}}(s) = K_c \frac{\frac{s}{\omega_z} + 1}{\frac{s}{\omega_p} + 1}, \quad 0 < \omega_p < \omega_z, \]
where:
- \( K_c > 0 \) is a real gain.
- \( -\omega_z \) is the location of the zero.
- \( -\omega_p \) is the location of the pole.
- The inequality \( \omega_p < \omega_z \) means the pole is closer to the origin than the zero, which produces phase lag.
Evaluating at \( s = 0 \) gives the DC gain:
\[ C_{\text{lag}}(0) = K_c \frac{1}{1} = K_c. \]
As \( \omega \rightarrow \infty \), we obtain the high-frequency gain:
\[ \lim_{\omega \rightarrow \infty} \left| C_{\text{lag}}(j\omega) \right| = K_c \frac{\omega / \omega_z}{\omega / \omega_p} = K_c \frac{\omega_p}{\omega_z} < K_c. \]
Hence the compensator attenuates high frequencies relative to DC by the factor \( \omega_p / \omega_z \), while introducing phase lag in the transition band between \( \omega_p \) and \( \omega_z \).
It is often convenient to parameterize the frequency ratio \( \beta \) as
\[ \beta = \frac{\omega_z}{\omega_p} > 1, \quad C_{\text{lag}}(s) = K_c \frac{\frac{s}{\beta \omega_p} + 1}{\frac{s}{\omega_p} + 1}. \]
The single dimensionless quantity \( \beta \) controls the maximum amount of phase lag; as \( \beta \rightarrow 1 \), the compensator approaches a pure gain \( K_c \), while large \( \beta \) produces a strong phase-lag effect.
3. Frequency Response: Magnitude and Phase
The sinusoidal steady-state behavior of the lag compensator is obtained by substituting \( s = j\omega \):
\[ C_{\text{lag}}(j\omega) = K_c \frac{1 + j \frac{\omega}{\omega_z}}{1 + j \frac{\omega}{\omega_p}}. \]
3.1 Magnitude
The magnitude is
\[ \left| C_{\text{lag}}(j\omega) \right| = K_c \sqrt{ \frac{ 1 + \left( \frac{\omega}{\omega_z} \right)^2 }{ 1 + \left( \frac{\omega}{\omega_p} \right)^2 } }. \]
In limiting cases:
- As \( \omega \rightarrow 0 \): \( \left|C_{\text{lag}}(j\omega)\right| \approx K_c \).
- As \( \omega \rightarrow \infty \): \( \left|C_{\text{lag}}(j\omega)\right| \approx K_c \omega_p / \omega_z = K_c / \beta \).
Thus, if \( K_c \) is kept fixed, the lag network behaves like a low-pass shaping element with DC gain \( K_c \) and high-frequency gain \( K_c / \beta \).
3.2 Phase and Maximum Phase Lag
The phase of the lag compensator is
\[ \varphi_{\text{lag}}(\omega) = \arg\!\left( C_{\text{lag}}(j\omega) \right) = \arctan\!\left( \frac{\omega}{\omega_z} \right) - \arctan\!\left( \frac{\omega}{\omega_p} \right). \]
Because \( \omega_z > \omega_p \), we have \( \frac{\omega}{\omega_z} < \frac{\omega}{\omega_p} \) for all \( \omega > 0 \), and the arctangent function is strictly increasing. Hence:
\[ \arctan\!\left( \frac{\omega}{\omega_z} \right) < \arctan\!\left( \frac{\omega}{\omega_p} \right) \quad \Rightarrow \quad \varphi_{\text{lag}}(\omega) < 0, \]
i.e., the compensator always introduces negative phase.
The frequency at which the phase lag attains its most negative value can be found by solving \( \frac{d\varphi_{\text{lag}}}{d\omega} = 0 \). We compute:
\[ \frac{d\varphi_{\text{lag}}}{d\omega} = \frac{1}{\omega_z} \frac{1}{1 + \left( \frac{\omega}{\omega_z} \right)^2} - \frac{1}{\omega_p} \frac{1}{1 + \left( \frac{\omega}{\omega_p} \right)^2}. \]
Setting this derivative to zero gives
\[ \frac{\omega_p}{\omega_p^2 + \omega^2} = \frac{\omega_z}{\omega_z^2 + \omega^2}. \]
Clearing denominators and simplifying yields
\[ \omega_p(\omega_z^2 + \omega^2) = \omega_z(\omega_p^2 + \omega^2) \quad \Rightarrow \quad \omega^2 = \omega_p \omega_z. \]
Thus the phase lag is maximized at the geometric mean \( \omega_m = \sqrt{\omega_p \omega_z} \).
Introducing \( \beta = \omega_z / \omega_p > 1 \), at \( \omega = \omega_m \) we have \( \frac{\omega}{\omega_z} = \frac{1}{\sqrt{\beta}} \), \( \frac{\omega}{\omega_p} = \sqrt{\beta} \). The minimum phase is
\[ \varphi_{\min} = \arctan\!\left( \frac{1}{\sqrt{\beta}} \right) - \arctan\!\left( \sqrt{\beta} \right). \]
Using trigonometric identities (in particular, the tangent of a difference and the relationship between sine and tangent), one obtains the compact formula
\[ \sin\!\left( \left| \varphi_{\min} \right| \right) = \frac{\beta - 1}{\beta + 1}, \quad \varphi_{\min} < 0. \]
This shows that the maximum phase lag is determined solely by the ratio \( \beta \): larger \( \beta \) yields stronger phase lag, but also stronger magnitude shaping.
4. Effect on Steady-State Error and Static Error Constants
For a unity-feedback system with open-loop transfer function \( L(s) = C(s) G(s) \), classical steady-state error constants are defined (for appropriate system type) as:
\[ K_p = \lim_{s \rightarrow 0} L(s), \quad K_v = \lim_{s \rightarrow 0} s L(s), \quad K_a = \lim_{s \rightarrow 0} s^2 L(s). \]
Suppose the original controller is a pure gain \( K \) (or more general structure) and we augment it with a lag factor \( C_{\text{lag}}(s) \). The new open-loop function is
\[ L_{\text{new}}(s) = C_{\text{lag}}(s) G(s) = K_c \frac{\frac{s}{\omega_z} + 1}{\frac{s}{\omega_p} + 1} G(s). \]
Since \( \lim_{s \rightarrow 0} \frac{\frac{s}{\omega_z} + 1}{\frac{s}{\omega_p} + 1} = 1 \), the low-frequency behavior of the loop is scaled primarily by \( K_c \):
\[ K_{v,\text{new}} = \lim_{s \rightarrow 0} s L_{\text{new}}(s) = K_c \lim_{s \rightarrow 0} s G(s) = \frac{K_c}{K} K_v, \]
assuming that the original open-loop contained a gain \( K \) multiplying \( G(s) \). Thus the steady-state error to a ramp input, \( e_{\text{ss}} = 1 / K_v \) for a type-1 system, is approximately reduced by the factor \( K_c / K \).
The key role of the lag dynamics is that, by attenuating magnitude at higher frequencies (around or above the crossover region), we can increase \( K_c \) without strongly increasing the effective crossover frequency. In other words:
- The lag factor makes \( |C_{\text{lag}}(j\omega_c)| < K_c \) near the crossover.
- We can choose a higher \( K_c \) to meet steady-state error requirements while keeping the product \( |L(j\omega_c)| \approx 1 \).
This is the fundamental mechanism by which lag compensation trades a modest phase-margin reduction for improved steady-state accuracy.
5. Influence on Bode Plots and Stability Margins
The Bode magnitude and phase of the lag compensator have the following qualitative features:
- Below \( \omega_p \): magnitude is approximately constant at \( 20 \log_{10} K_c \), phase near \( 0^\circ \).
- Between \( \omega_p \) and \( \omega_z \): magnitude bends downward and phase becomes increasingly negative, reaching \( \varphi_{\min} \) at \( \omega_m = \sqrt{\omega_p \omega_z} \).
- Above \( \omega_z \): magnitude approaches a constant level \( 20 \log_{10} (K_c / \beta) \), phase returns toward \( 0^\circ \).
If the lag network is designed so that \( \omega_p \) and \( \omega_z \) lie well below the uncompensated crossover frequency, then the extra phase lag at the final crossover is relatively small, while the effective DC gain (through adjustment of \( K_c \)) can be substantially increased.
However, the additional phase lag is never zero, so lag compensation always reduces phase margin to some extent. A practical design constraint is to limit \( \left| \varphi_{\min} \right| \) to a value that preserves the desired phase margin (for example, lose at most \( 5^\circ \)–\( 10^\circ \) of phase margin).
6. Time-Domain Realization of a Lag Compensator
It is often useful to derive a differential-equation realization for implementation. Starting from
\[ C_{\text{lag}}(s) = K_c \frac{T s + 1}{\beta T s + 1}, \quad \beta = \frac{\omega_z}{\omega_p} > 1, \quad T = \frac{1}{\omega_z}, \]
and letting \( E(s) \) be the error and \( U(s) \) the controller output, we have
\[ U(s) = C_{\text{lag}}(s) E(s) \quad \Rightarrow \quad (\beta T s + 1) U(s) = K_c (T s + 1) E(s). \]
Taking inverse Laplace transforms (using linearity and the property \( s X(s) \leftrightarrow \frac{d x(t)}{dt} \) for zero initial conditions), yields
\[ \beta T \frac{d u(t)}{dt} + u(t) = K_c T \frac{d e(t)}{dt} + K_c e(t). \]
This first-order linear differential equation describes the lag compensator in the time domain. For digital implementations, derivatives are approximated by finite differences (e.g., backward Euler), leading to a discrete recursion suitable for real-time control software in robotic controllers and embedded systems.
7. Python Implementation of a Phase Lag Compensator
We consider a simple plant model, such as a linearized robotic joint
approximated by
\( G(s) = \frac{1}{s(s + 2)} \) (type-1 second-order).
We construct a lag compensator and analyze the Bode plot using the
python-control library. For robotic systems, packages like
roboticstoolbox can provide LTI approximations of joint
dynamics.
import numpy as np
import control as ct
# Example plant: simplified joint dynamics (type-1)
s = ct.TransferFunction.s
G = 1 / (s * (s + 2))
# Lag compensator parameters
Kc = 5.0
omega_p = 0.2 # rad/s
omega_z = 1.0 # rad/s, omega_z > omega_p
Clag = Kc * (s/omega_z + 1) / (s/omega_p + 1)
# Open-loop and closed-loop
L = Clag * G
T = ct.feedback(L, 1) # unity feedback
# Frequency response around crossover
omega = np.logspace(-2, 2, 400)
mag_L, phase_L, _ = ct.bode(L, omega, Plot=False)
# Steady-state constants (approximate)
# For type-1: Kv = lim_{s->0} s L(s) = slope of |L(jw)| at low w in log-log
Kv = ct.dcgain(ct.series(Clag, G * s)) # s*L(s) evaluated at s=0
print("Lag compensator:", Clag)
print("Approximate velocity constant Kv:", Kv)
# For robotics: linearized joint model via robotics toolbox (conceptual)
# import roboticstoolbox as rtb
# panda = rtb.models.DH.Panda()
# # Extract local linear model around a configuration and use similar lag design
This script constructs the lag compensator, forms the open-loop and closed-loop transfer functions, and computes an approximate velocity constant \( K_v \) using low-frequency gain. In a robotics setting, lag compensation can be used to improve tracking of slowly varying reference trajectories, such as joint angles in a manipulator arm.
8. C++ and Java Implementations for Embedded and Robotic Control
8.1 C++ Implementation (Using Eigen and ROS Context)
Using the time-domain realization \( \beta T \dot{u} + u = K_c T \dot{e} + K_c e \), a simple discrete-time approximation with sampling period \( h \) (backward Euler) gives:
\[ \dot{u}(t_k) \approx \frac{u_k - u_{k-1}}{h}, \quad \dot{e}(t_k) \approx \frac{e_k - e_{k-1}}{h}. \]
Solving for \( u_k \) yields
\[ u_k = a_1 u_{k-1} + b_0 e_k + b_1 e_{k-1}, \]
for appropriate coefficients \( a_1, b_0, b_1 \) obtained by discretization. The following C++ snippet shows this in an embedded ros-control style loop, with Eigen used for vector operations:
#include <iostream>
#include <Eigen/Dense>
// In a robotic context, this could be part of a ROS control loop:
// #include <ros/ros.h>
struct LagCompensator {
double Kc;
double beta;
double T;
double h; // sampling period
double a1;
double b0;
double b1;
double u_prev;
double e_prev;
LagCompensator(double Kc_, double beta_, double T_, double h_)
: Kc(Kc_), beta(beta_), T(T_), h(h_),
u_prev(0.0), e_prev(0.0)
{
// Backward Euler discretization of:
// beta T du/dt + u = Kc T de/dt + Kc e
// After algebra, one obtains:
double denom = beta * T / h + 1.0;
a1 = (beta * T / h) / denom;
b0 = (Kc * (T / h + 1.0)) / denom;
b1 = (-Kc * (T / h)) / denom;
}
double update(double e) {
double u = a1 * u_prev + b0 * e + b1 * e_prev;
u_prev = u;
e_prev = e;
return u;
}
};
int main() {
LagCompensator lag(5.0, 5.0, 1.0, 0.001); // Kc, beta, T, h
double e = 0.1; // example tracking error
for (int k = 0; k < 10; ++k) {
double u = lag.update(e);
std::cout << "k=" << k << " u=" << u << std::endl;
}
return 0;
}
In robotic arms controlled by ROS, this lag block can be placed in the joint torque or velocity control loop to improve low-speed tracking accuracy without sacrificing stability.
8.2 Java Implementation (Robot Control Context, e.g. WPILib)
Java-based robotic frameworks (such as WPILib for mobile robots) often implement controllers by updating control actions each cycle. The same discrete lag recursion can be implemented as a class:
public class LagCompensator {
private final double Kc;
private final double beta;
private final double T;
private final double h;
private final double a1;
private final double b0;
private final double b1;
private double uPrev = 0.0;
private double ePrev = 0.0;
public LagCompensator(double Kc, double beta, double T, double h) {
this.Kc = Kc;
this.beta = beta;
this.T = T;
this.h = h;
double denom = beta * T / h + 1.0;
this.a1 = (beta * T / h) / denom;
this.b0 = (Kc * (T / h + 1.0)) / denom;
this.b1 = (-Kc * (T / h)) / denom;
}
public double update(double error) {
double u = a1 * uPrev + b0 * error + b1 * ePrev;
uPrev = u;
ePrev = error;
return u;
}
}
// Example usage in a robot periodic loop (e.g., teleopPeriodic):
// LagCompensator lag = new LagCompensator(5.0, 5.0, 1.0, 0.02);
// double error = referencePosition - measuredPosition;
// double control = lag.update(error);
This structure can be used alongside other filters and controllers provided by robotics libraries, giving an explicit implementation of classical lag compensation in software.
9. MATLAB/Simulink and Wolfram Mathematica Implementations
9.1 MATLAB/Simulink (Control System Toolbox and Robotics System Toolbox)
In MATLAB, we can define the plant and lag compensator, compute Bode plots, and integrate with Simulink for simulation. For robotic systems, the Robotics System Toolbox can provide plant models for joints or mobile platforms.
% Plant: G(s) = 1 / (s (s + 2))
s = tf('s');
G = 1 / (s * (s + 2));
% Lag compensator parameters
Kc = 5;
omega_p = 0.2;
omega_z = 1.0;
Clag = Kc * (s/omega_z + 1) / (s/omega_p + 1);
L = series(Clag, G);
T = feedback(L, 1);
figure;
bode(L); grid on; title('Open-loop with phase lag compensator');
% Steady-state velocity constant Kv
sG = series(Clag, G * s); % s * L(s)
Kv = dcgain(sG);
disp(['Approximate Kv = ', num2str(Kv)]);
% Simulink note:
% In Simulink, use:
% - "Transfer Fcn" block for G(s)
% - "Transfer Fcn" block for Clag(s)
% - "Sum" block for feedback
% - Optional: "Robot" plant from Robotics System Toolbox linearization
9.2 Wolfram Mathematica Implementation
Mathematica offers symbolic and numeric operations on transfer functions.
(* Define plant and lag compensator *)
s = LaplaceTransformVariable;
G = 1/(s (s + 2));
Kc = 5.0;
omegaP = 0.2;
omegaZ = 1.0;
Clag = Kc (s/omegaZ + 1)/(s/omegaP + 1);
L = Clag G;
T = L/(1 + L);
(* Bode magnitude and phase plots *)
BodePlot[{G, L}, {s, 0.01, 100},
PlotLegends -> {"Plant G(s)", "With lag C_lag(s)"},
GridLines -> Automatic
]
(* Steady-state velocity constant Kv for type-1 system *)
Kv = Limit[s L, s -> 0]
Symbolic capabilities allow one to derive closed-form expressions for bandwidth, stability margins, and error constants for simple plants and compensators, which is particularly useful in theoretical control analysis.
10. Problems and Solutions
Problem 1 (Phase Lag Inequality): Let \( C_{\text{lag}}(s) = K_c \frac{\frac{s}{\omega_z} + 1}{\frac{s}{\omega_p} + 1} \) with \( 0 < \omega_p < \omega_z \). Show that the phase \( \varphi_{\text{lag}}(\omega) \) is strictly negative for all \( \omega > 0 \).
Solution:
The phase is
\[ \varphi_{\text{lag}}(\omega) = \arctan\!\left( \frac{\omega}{\omega_z} \right) - \arctan\!\left( \frac{\omega}{\omega_p} \right). \]
For \( \omega > 0 \) and \( 0 < \omega_p < \omega_z \), we have \( \frac{\omega}{\omega_z} < \frac{\omega}{\omega_p} \). Since \( \arctan(\cdot) \) is strictly increasing on \( (0,\infty) \),
\[ \arctan\!\left( \frac{\omega}{\omega_z} \right) < \arctan\!\left( \frac{\omega}{\omega_p} \right) \quad \Rightarrow \quad \varphi_{\text{lag}}(\omega) < 0. \]
Therefore, the compensator contributes negative phase at all nonzero frequencies.
Problem 2 (Maximum Phase Lag): For the same lag compensator, prove that the frequency \( \omega_m \) at which the phase lag is most negative is the geometric mean \( \omega_m = \sqrt{\omega_p \omega_z} \).
Solution:
Differentiate the phase with respect to \( \omega \) and set it to zero:
\[ \frac{d\varphi_{\text{lag}}}{d\omega} = \frac{1}{\omega_z} \frac{1}{1 + \left( \frac{\omega}{\omega_z} \right)^2} - \frac{1}{\omega_p} \frac{1}{1 + \left( \frac{\omega}{\omega_p} \right)^2} = 0. \]
Rearranging,
\[ \frac{\omega_p}{\omega_p^2 + \omega^2} = \frac{\omega_z}{\omega_z^2 + \omega^2}. \]
Cross-multiplying yields
\[ \omega_p(\omega_z^2 + \omega^2) = \omega_z(\omega_p^2 + \omega^2). \]
Expanding both sides and simplifying gives
\[ \omega_p \omega_z^2 + \omega_p \omega^2 = \omega_z \omega_p^2 + \omega_z \omega^2 \quad \Rightarrow \quad (\omega_p - \omega_z)\omega^2 = \omega_z \omega_p (\omega_p - \omega_z). \]
Since \( \omega_p \neq \omega_z \), we divide by \( \omega_p - \omega_z \) and obtain
\[ \omega^2 = \omega_p \omega_z \quad \Rightarrow \quad \omega_m = \sqrt{\omega_p \omega_z}. \]
This is the frequency of maximum phase lag.
Problem 3 (Effect on Velocity Error Constant): A type-1 plant has open-loop transfer function \( L_0(s) = K G(s) \) with velocity constant \( K_v = \lim_{s \rightarrow 0} s L_0(s) \). We introduce a lag compensator \( C_{\text{lag}}(s) \) with DC gain \( K_c \). Show that the new velocity constant is \( K_{v,\text{new}} = \frac{K_c}{K} K_v \).
Solution:
The new loop is \( L_{\text{new}}(s) = C_{\text{lag}}(s) G(s) \). Assuming the original gain \( K \) multiplies \( G(s) \), we have \( L_0(s) = K G(s) \). For the lag network, \( \lim_{s \rightarrow 0} C_{\text{lag}}(s) = K_c \). Then
\[ K_{v,\text{new}} = \lim_{s \rightarrow 0} s L_{\text{new}}(s) = \lim_{s \rightarrow 0} s C_{\text{lag}}(s) G(s) = K_c \lim_{s \rightarrow 0} s G(s). \]
On the other hand, \( K_v = \lim_{s \rightarrow 0} s L_0(s) = K \lim_{s \rightarrow 0} s G(s) \), so \( \lim_{s \rightarrow 0} s G(s) = K_v / K \). Substituting:
\[ K_{v,\text{new}} = K_c \frac{K_v}{K} = \frac{K_c}{K} K_v. \]
Therefore the velocity constant is scaled by the ratio \( K_c / K \), which represents the effective increase in low-frequency loop gain due to the lag network and gain adjustment.
Problem 4 (Time-Domain Realization): Starting from \( C_{\text{lag}}(s) = K_c \frac{T s + 1}{\beta T s + 1} \), derive the first-order differential equation relating the controller output \( u(t) \) and the error \( e(t) \).
Solution:
The relation \( U(s) = C_{\text{lag}}(s) E(s) \) implies
\[ U(s) = K_c \frac{T s + 1}{\beta T s + 1} E(s) \quad \Rightarrow \quad (\beta T s + 1) U(s) = K_c (T s + 1) E(s). \]
Expanding and taking inverse Laplace transforms (assuming zero initial conditions), we obtain
\[ \beta T \frac{d u(t)}{dt} + u(t) = K_c T \frac{d e(t)}{dt} + K_c e(t), \]
which is the desired time-domain realization.
Problem 5 (Qualitative Design Trade-Off): Suppose a unity-feedback plant has sufficient phase margin, but the steady-state error to a ramp input is too large. You are allowed to introduce a lag compensator and to increase the loop gain. Qualitatively sketch a design flow that respects a maximum allowed phase-margin loss of \( 10^\circ \).
Solution (flow):
flowchart TD
S["Specify ramp error requirement and max 10 deg phase-margin loss"] --> A["Compute current Kv and required scaling factor"]
A --> B["Choose beta from bound on max phase lag using sin(|phi_min|) = (beta-1)/(beta+1)"]
B --> C["Place omega_p and omega_z so that sqrt(omega_p * omega_z) lies well below plant crossover"]
C --> D["Adjust Kc so that new open-loop L(jw) has desired crossover"]
D --> E["Verify phase margin <= 10 deg loss and steady-state error requirement"]
E --> F["Iterate beta, frequencies, and Kc if necessary"]
This flow highlights the trade-off between improving steady-state error (via increased low-frequency gain) and limiting the additional phase lag introduced near the crossover frequency.
11. Summary
In this lesson we introduced the structure and effects of phase lag compensators in classical linear control. Starting from the canonical transfer function \( C_{\text{lag}}(s) = K_c \frac{\frac{s}{\omega_z} + 1}{\frac{s}{\omega_p} + 1} \) with \( \omega_p < \omega_z \), we derived expressions for magnitude and phase, demonstrated that the compensator always introduces negative phase, and identified the frequency \( \omega_m = \sqrt{\omega_p \omega_z} \) of maximum phase lag. We showed how lag compensation can effectively increase steady-state error constants by allowing an increase in low-frequency loop gain while modestly degrading phase margin.
We also derived a time-domain realization suitable for implementation, and presented implementations in Python, C++, Java, MATLAB/Simulink, and Mathematica, with remarks on their use in robotic control loops. In the next lessons, these structural insights will be used to carry out systematic Bode-based design of lag and lead–lag compensators to meet precise performance specifications.
12. References
- Bode, H. W. (1940). Relations between attenuation and phase in feedback amplifier design. Bell System Technical Journal, 19(3), 421–454.
- Evans, W. R. (1950). Graphical analysis of control systems. Transactions of the American Institute of Electrical Engineers, 69(1), 65–69.
- Horowitz, I. M. (1963). Synthesis of Feedback Systems. Academic Press.
- Kuo, B. C. (1963). Automatic Control Systems. Prentice Hall. (Chapters on lead and lag network design.)
- O’Reilly, J. (1983). Lead-lag compensation for continuous-time systems. International Journal of Control, 37(5), 937–961.
- Åström, K. J., & Hägglund, T. (1984). Automatic tuning of simple regulators with specifications on phase and amplitude margins. Automatica, 20(5), 645–651.
- Middleton, R. H., & Goodwin, G. C. (1986). Improved finite word length characteristics in digital control using delta operators. IEEE Transactions on Automatic Control, 31(11), 1015–1021.
- Oppenheim, A. V., & Wilsky, A. S. (1975). Signals and Systems. Prentice Hall. (Sections on first-order systems and frequency response.)
- 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.
- Desoer, C. A., & Vidyasagar, M. (1975). Feedback Systems: Input-Output Properties. Academic Press.