| name | control-systems |
| description | Control systems — Laplace transforms, transfer functions, block diagrams, PID tuning, Bode plots, Nyquist criterion, stability margins, state-space, root locus. |
| metadata | {"priority":8,"promptSignals":{"phrases":["control system","PID","transfer function","Bode plot","Nyquist","stability margin","state space","root locus","closed loop","gain margin"],"minScore":3}} |
Control Systems — Complete Skill
Laplace Transform
Common Pairs
| f(t) | F(s) |
|---|
| δ(t) unit impulse | 1 |
| u(t) unit step | 1/s |
| t (ramp) | 1/s² |
| e^(-at) | 1/(s+a) |
| sin(ωt) | ω/(s²+ω²) |
| cos(ωt) | s/(s²+ω²) |
| t·e^(-at) | 1/(s+a)² |
| e^(-at)sin(ωt) | ω/((s+a)²+ω²) |
Useful Theorems
Initial value: lim_{t→0} f(t) = lim_{s→∞} sF(s)
Final value: lim_{t→∞} f(t) = lim_{s→0} sF(s) [only if stable]
Differentiation: L{df/dt} = sF(s) - f(0⁻)
Integration: L{∫f dt} = F(s)/s
Transfer Function G(s)
G(s) = Y(s)/U(s) [output/input, zero initial conditions]
From ODE: m·ÿ + c·ẏ + k·y = F(t) → G(s) = 1/(ms²+cs+k)
Standard 2nd order form:
G(s) = ω_n² / (s² + 2ζω_n s + ω_n²)
ω_n = √(k/m), ζ = c/(2√(km))
Natural freq, damping from physical system
Poles: s = -ζω_n ± jω_n√(1-ζ²) (complex for ζ<1)
Zeros: values of s where G(s)=0
Block Diagram Algebra
Series: G_total = G₁ × G₂
Parallel: G_total = G₁ + G₂
Feedback loop: G_cl = G(s) / (1 + G(s)H(s))
where G(s) = forward path, H(s) = feedback path
Closed-loop standard form (unity feedback):
T(s) = G(s)/(1+G(s)) = C(s)/R(s)
Error: E(s) = R(s)/(1+G(s))
Steady-state error: e_ss = lim_{s→0} s × E(s)/s = lim_{s→0} 1/(1+G(s)) [step input]
System Type and Steady-State Error
Type number = number of pure integrators (1/s poles) in open-loop G(s)H(s)
| Input | Type 0 | Type 1 | Type 2 |
|---|
| Step | 1/(1+Kp) | 0 | 0 |
| Ramp | ∞ | 1/Kv | 0 |
| Parabola | ∞ | ∞ | 1/Ka |
Kp = lim_{s→0} G(s) (position constant)
Kv = lim_{s→0} s·G(s) (velocity constant)
Ka = lim_{s→0} s²·G(s) (acceleration constant)
PID Controller
G_c(s) = K_p + K_i/s + K_d·s = K_p(1 + 1/(T_i·s) + T_d·s)
K_p = proportional gain (faster response, reduces error but can cause overshoot)
K_i = integral gain (eliminates steady-state error, reduces stability margin)
K_d = derivative gain (predictive, reduces overshoot, amplifies noise)
T_i = K_p/K_i (integral time constant), T_d = K_d/K_p (derivative time)
Ideal PID: G_c(s) = K_p(1 + 1/T_i s + T_d s)
Filtered derivative: G_c(s) = K_p(1 + 1/T_i s + T_d s/(T_d s/N + 1)) (N=5-20, avoids noise amp)
Ziegler-Nichols Tuning (Ultimate Gain Method)
- Set K_i = K_d = 0; increase K_p until sustained oscillation → K_u, T_u
- PID: K_p = 0.6K_u, T_i = T_u/2, T_d = T_u/8
- PI: K_p = 0.45K_u, T_i = T_u/1.2
Gives ~25% overshoot — often too aggressive, use as starting point
Cohen-Coon Tuning (Process Reaction Curve)
Fit step response to FOPTD model: K, τ (time constant), θ (dead time)
PID: K_p = (τ/(K·θ))(1.33 + θ/4τ), T_i = θ(32 + 6θ/τ)/(13 + 8θ/τ), T_d = 4θ/(11 + 2θ/τ)
Bode Plot Analysis
G(jω) = |G(jω)| ∠G(jω): magnitude and phase vs. frequency (log scale)
Gain [dB] = 20 log₁₀|G(jω)|
Phase [deg] = ∠G(jω)
Building blocks:
Gain K: constant dB, 0° phase
Integrator 1/s: -20 dB/decade, -90° phase
First-order 1/(τs+1): -20 dB/decade above ω=1/τ, -90° phase (total)
Second-order 1/(s²/ω_n² + 2ζs/ω_n + 1): -40 dB/decade above ω_n, -180° phase total
Zero (τs+1): +20 dB/decade above ω=1/τ, +90° phase (total)
Asymptotic approximation: add contributions of each element
Stability (Bode Stability Criterion)
For open-loop G(jω)H(jω):
Gain Margin (GM):
GM = 1/|GH(jω_pc)| where ω_pc = phase crossover frequency (∠GH = -180°)
GM [dB] = -20 log₁₀|GH(jω_pc)|
Target: GM > 6 dB (robust: GM > 10 dB)
GM < 0: unstable
Phase Margin (PM):
PM = 180° + ∠GH(jω_gc) where ω_gc = gain crossover frequency (|GH| = 1)
Target: PM > 45° (robust: PM > 60°)
PM < 0: unstable
Bandwidth ω_BW: frequency where |T(jω)| = -3 dB (closed-loop bandwidth)
Speed of response: t_rise ≈ 1.8/ω_BW, t_settling ≈ 4/(ζω_n)
Nyquist Criterion
Plot G(jω)H(jω) in complex plane as ω: 0→∞
Count encirclements N of (-1+j0) point
Z = N + P (Z = closed-loop RHP poles, P = open-loop RHP poles)
For stability: Z = 0 → N = -P (N clockwise encirclements = P)
For minimum-phase system (P=0): N = 0 (no encirclement of -1) for stability
Root Locus
Plot closed-loop poles s as gain K varies 0→∞
Open-loop: G(s)H(s) = K × N(s)/D(s)
Closed-loop poles: 1 + G(s)H(s) = 0 → D(s) + K·N(s) = 0
Rules:
- Start (K=0): at open-loop poles
- End (K=∞): at open-loop zeros (or ∞ along asymptotes)
- Asymptote angles: (2k+1)×180°/(n-m) for k=0,1,...
- Asymptote centroid: σ_a = (Σpoles - Σzeros)/(n-m)
- Breakaway: d/ds[K(s)]=0
Design: add poles/zeros (lag/lead compensators) to shape root locus
State-Space Representation
ẋ = Ax + Bu
y = Cx + Du
A = system matrix [n×n], B = input matrix [n×m]
C = output matrix [p×n], D = feedthrough matrix [p×m]
Transfer function: G(s) = C(sI-A)⁻¹B + D
Stability: eigenvalues of A (= system poles) must have Re(λ_i) < 0
Controllability: C_matrix = [B, AB, A²B,..., A^(n-1)B]; rank = n → fully controllable
Observability: O_matrix = [C; CA; CA²;...; CA^(n-1)]; rank = n → fully observable
LQR (optimal control): minimize J = ∫(xᵀQx + uᵀRu)dt
Solve: Riccati equation AᵀP + PA - PBR⁻¹BᵀP + Q = 0 → K = R⁻¹BᵀP
Control law: u = -Kx
Common Control Architectures
Cascade control: inner (fast) + outer (slow) loops; inner loop acts like ideal actuator to outer
Feedforward: add known disturbance directly to control signal (before feedback)
Smith Predictor: for dead-time systems; predicts output ahead by θ (dead time)
IMC (Internal Model Control): robust, handles model uncertainty
Discrete-Time Control (Digital)
Z-transform: z = e^(sT_s), T_s = sampling period
Bilinear (Tustin): s = 2(z-1)/(T_s(z+1)) → maps s-domain design to z-domain
Sample rate: f_s ≥ 10-20× bandwidth (f_BW) for good performance
Nyquist: f_s > 2× f_BW (minimum)
Output
Provide: transfer function G(s), closed-loop poles, GM [dB], PM [°], bandwidth ω_BW [rad/s], PID gains (K_p, T_i, T_d), step response: overshoot [%], rise time [s], settling time [s], steady-state error.