P (proportional): reacts to the present error. Bigger error ⇒ bigger push. Alone it
leaves steady-state error (offset) and can oscillate if too large.
I (integral): accumulates past error. It kills steady-state error because it keeps
pushing until the accumulated error is zero. But it adds phase lag ⇒ can destabilise.
D (derivative): predicts the future from the slope. It adds damping / phase lead,
reducing overshoot, but amplifies noise.
Approximate the step response by a delay L and slope. Model: G(s)≈Ts+1Ke−Ls.
Let R=K/T (max slope / step-height). Then:
Why these?L (dead time) governs how much phase lag you can tolerate; larger L ⇒ smaller
gain. The ratios 2L,0.5L mirror the closed-loop Tu ratios because Tu∼4L for such plants.
The integral term Ki/s boosts low-frequency gain (slope −20dB/dec, phase −90°).
The derivative term adds phase lead near ωc — you deliberately place the zero
of C(s)belowωc so its +90° phase counters plant lag and raises the phase margin.
What two numbers does closed-loop ZN measure, and how? (→ Ku: gain at sustained oscillation; Tu: its period.)
Why does integral action reduce phase margin? (→ adds −90° lag.)
Define phase margin and target range. (→ 180°+∠L(ωc); 30–60°.)
How does D action help loop shaping? (→ adds phase lead near ωc, raises PM, adds damping.)
Recall Feynman: explain to a 12-year-old
Imagine steering a toy car to a line on the floor. P: turn the wheel more the farther you
are from the line. I: if a wind keeps blowing you off, keep turning a little extra until you
finally sit on the line. D: if you're rushing at the line fast, ease off early so you don't
zoom past. Tuning is picking how strong each of these reactions is. Ziegler-Nichols is like:
"turn the P knob up until the car wobbles side to side forever, note how fast it wobbles, then
use that to set all three knobs." Loop shaping is: "draw a picture of how the car reacts to fast
vs slow wiggles, and adjust the knobs so slow mistakes get fixed strongly but fast jitter is
ignored."
PID tuning ka matlab hai teen knobs — Kp,Ki,Kd — ko aise set karna ki system fast bhi ho,
stable bhi rahe, aur overshoot zyada na kare. P present error dekhta hai, I past errors
ko jodta jaata hai (isliye steady-state offset khatam karta hai), aur D future ko predict
karta hai (slope se), damping deta hai. Dhyaan rakho: I zyada karoge to phase lag (−90°) aata
hai aur system oscillate karne lagta hai.
Ziegler-Nichols ek recipe hai. Ki aur Kd ko zero karke sirf Kp badhaao jab tak
output constant-amplitude oscillation dikhaye. Us gain ko Ku (ultimate gain) aur oscillation
ke period ko Tu bolo. Phir table se: Kp=0.6Ku, Ti=Tu/2, Td=Tu/8. Yeh seconds mein
starting point de deta hai, par yeh aggressive hota hai (~25% overshoot), to baad mein thoda
detune karna padta hai.
Loop shaping samajhdaari wala tareeka hai. Yahan hum open-loop L(s)=C(s)G(s) ka Bode plot
dekhte hain. Chahiye: low frequency pe high gain (accuracy ke liye), high frequency pe low gain
(noise reject karne ke liye), aur crossover ωc pe achha phase margin (30–60°)
taaki stable rahe. Integral term low-frequency gain badhaata hai, aur derivative term ωc
ke aas-paas phase lead deta hai jisse margin badhta hai. Matlab tum jaante ho kyun har knob
kya kar raha hai — yeh ZN se zyada control deta hai. Practical tip: Ki/Kp ko ωc se
kaafi neeche rakho, aur derivative ko measurement pe lagaao (error pe nahi) taaki "derivative
kick" na ho.