MEG 502 · Control Engineering
Our notes
2 min readThe PID controller
u(t) = K_p e + K_i ∫e dt + K_d de/dt, or C(s) = K_p + K_i/s + K_d s = K_p(1 + 1/(T_i s) + T_d s).
| Action | Effect |
|---|---|
| Proportional | faster response, smaller (but not zero) steady error; too much → oscillation |
| Integral | removes steady-state error for steps; adds lag, can cause overshoot and integrator windup |
| Derivative | adds damping and anticipation; amplifies noise (filtered in practice) |
PID controllers run most industrial loops (temperature, pressure, flow, level, motor speed).
Ziegler-Nichols tuning (ultimate gain method)
With I and D off, raise K_p until the loop just oscillates steadily: the ultimate gain K_u and ultimate period P_u. Then:
| Controller | K_p | T_i | T_d |
|---|---|---|---|
| P | 0.5K_u | ||
| PI | 0.45K_u | P_u/1.2 | |
| PID | 0.6K_u | P_u/2 | P_u/8 |
These give quick but oscillatory responses (about 25% decay ratio); fine-tune afterwards. The step-response (reaction curve) method uses the process's delay and time constant instead.
Worked example
For G(s) = 1 ÷ (s(s + 2)(s + 4)) with a proportional controller, the Routh array gave K_u = 48 and oscillation at 2.83 rad/s, so P_u = 2π ÷ 2.83 = 2.22 s.
- PID: K_p = 0.6 × 48 = 28.8; T_i = 2.22 ÷ 2 = 1.11 s; T_d = 2.22 ÷ 8 = 0.278 s.
- So K_i = K_p/T_i = 25.9 and K_d = K_p T_d = 8.0.
Lead compensator
C(s) = K(s + z) ÷ (s + p) with z < p (the zero nearer the origin). It adds phase lead near the crossover, increasing phase margin and speed (like a filtered PD). Maximum phase lead φ_m occurs at ω_m = √(zp), with sin φ_m = (p − z) ÷ (p + z).
Worked example: lead design check
Choose z = 2, p = 8: sin φ_m = 6/10 = 0.6, φ_m = 36.9° at ω_m = √16 = 4 rad/s. The compensator's gain rises by p/z = 4 (12 dB) from low to high frequency, so the gain crossover moves to a higher frequency; place ω_m at the new crossover.
Lag compensator
C(s) = K(s + z) ÷ (s + p) with p < z, both close to the origin (for example z = 0.1, p = 0.01). It raises low-frequency gain (here by 10 times), reducing steady-state error, with little effect on the transient response (like a filtered PI).
Lead-lag
Combines both: lead for transient response and margins, lag for steady-state accuracy.
Practical issues
Actuator saturation and integrator windup (use anti-windup: stop integrating when the actuator saturates), derivative kick on set-point changes (take the derivative of the measurement only), noise filtering, and sampling in digital controllers.
Exams usually ask
- Explain the effects of P, I and D actions; tune a PID controller by Ziegler-Nichols.
- Design or analyse lead and lag compensators.
Common mistake
Expecting proportional control alone to remove steady-state error in a type 0 system. Integral action is needed.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Read
-
PID controller
(opens en.wikipedia.org in a new tab)
Wikipedia, PID controller, CC BY-SA 4.0 · licence
-
Ziegler–Nichols method
(opens en.wikipedia.org in a new tab)
Wikipedia, Ziegler–Nichols method, CC BY-SA 4.0 · licence
-
NPTEL: Control Engineering (IIT Delhi, Prof. M. Gopal, whole course)
41 lectures: the control problem, dynamic response, models of industrial control devices, Routh stability, root locus, Nyquist and stability margins, frequency-response design. Video lectures, many hours in all: watch on Wi-Fi where you can.
(opens nptel.ac.in in a new tab)
NPTEL, NPTEL: Control Engineering (IIT Delhi, Prof. M. Gopal, whole course), CC BY-NC-SA 4.0 · licence
-
NPTEL: Control Engineering (IIT Madras and IIEST Shibpur, whole course)
12 weeks: modelling, block diagrams, time response, root locus design, frequency-domain design, state-space analysis and design. Video lectures, many hours in all: watch on Wi-Fi where you can.
(opens nptel.ac.in in a new tab)
NPTEL, NPTEL: Control Engineering (IIT Madras and IIEST Shibpur, whole course), CC BY-NC-SA 4.0 · licence
Watch
-
Best pick Introduction to Compensator
5 min · ≈ 23 MB · about ₦13
(opens youtube.com in a new tab)
-
What are Lead Lag Compensators? An Introduction.
11 min · ≈ 50 MB · about ₦28
(opens youtube.com in a new tab)
-
Lead and lag compensation using Bode diagrams
24 min · ≈ 108 MB · about ₦61
(opens youtube.com in a new tab)
-
Lead, lag, and PID compensator structures using bode plots |Using Bode Plots, Part 4
5 min · ≈ 23 MB · about ₦13
(opens youtube.com in a new tab)
-
Example: Design Lead-Lag Controller
29 min · ≈ 131 MB · about ₦74
(opens youtube.com in a new tab)
-
Lec-41 Compensator Design Using Frequency Response Plots
57 min · ≈ 257 MB · about ₦144
(opens youtube.com in a new tab)
We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.