Exercises — PID control — proportional, integral, derivative terms
3.5.38 · D4· Physics › Guidance, Navigation & Control (GNC) › PID control — proportional, integral, derivative terms
Shuru karne se pehle, woh chaar quantities jo baar baar kaam aayengi (parent note se, yahan re-state ki gayi hain taaki yeh page akela bhi kaam kare):

Level 1 — Recognition
Problem 1.1
Har symptom ko us term se match karo jiska kaam hai use theek karna. (a) System bahut slowly react karta hai. (b) Settle karta hai lekin hamesha thoda off-target rehta hai. (c) Overshoot karta hai aur ring karta hai.
Recall Solution
Har term ki ek signature disease-and-cure hoti hai:
- (a) Bahut slow → ==== (Proportional) badhao. P present-error ka push hai; bada push matlab faster response.
- (b) Steady offset → ==== (Integral) badhao. Sirf integral ek persistent error ko yaad rakhta hai aur tab tak ramping karta rehta hai jab tak offset khatam na ho jaaye.
- (c) Overshoot / ringing → ==== (Derivative) badhao. D rate par react karta hai, target se aage nikalne se pehle brake lagata hai.
Jawab: (a) P, (b) I, (c) D.
Problem 1.2
Error signal likho aur usse evaluate karo jab aur ho.
Recall Solution
. Daalo: Sign negative hai, matlab hum target se overshoot kar gaye hain (hum us se upar hain). Controller ko us direction mein command karega jo ko wापas neeche kheenche.
Level 2 — Application
Problem 2.1
Ek reaction wheel satellite ki pitch ko par hold karta hai. Ek constant solar torque disturbance ke roop mein act karta hai (output units). Pure P with use karke, steady-state error nikalo.
Recall Solution
KYA chahiye: woh resting error jab sab kuch change karna band ho jaaye. KYUN yeh formula: rest par control output ko disturbance exactly cancel karna chahiye, warna kuch na kuch abhi bhi move kar raha hoga. Pure P ke saath sirf output hai, to equilibrium par Ek pure-P loop isse shrink kar sakta hai lekin kabhi zero nahi kar sakta — zero error zero output dega, aur phir kuch bhi torque se nahi ladega. Yahi woh steady-state error hai jisko khatam karne ke liye integral banaya gaya hai.
Problem 2.2
Same satellite, ab P + I. Steady state mein kya hai, aur integral output kis value par settle karta hai?
Recall Solution
KYA: resting error aur resting integral value nikalo. KYUN: integrator apna output rate se change karta hai. Poore system ke liye rukne ke liye, yeh rate zero honi chahiye: To sirf resting state mein zero error hota hai — integral quietly tab tak chadhta rehta hai jab tak ho na jaaye. Uski final value akele poori cancellation supply karni chahiye: P rest par kuch contribute nahi karta (kyunki ), to integrator akela disturbance ko rokta hai.
Problem 2.3
Continuous integral ko woh running sum mein convert karo jo ek flight computer use karta hai, s aur samples ke saath. Teen samples ke baad running integral value compute karo (rectangle rule).
Recall Solution
KYUN sum: computer sirf har par snapshots dekhta hai. Har snapshot ek patli rectangle of area contribute karta hai; integral total area hai, yani rectangles ka sum. Yeh wahi hai jo se multiply hoke banta hai. (Continuous view ke liye Laplace transforms & transfer functions dekho.)
Level 3 — Analysis
Problem 3.1 (ek discrete control update)
Diya gaya hai . Previous error , current error , aur is step se pehle stored integral . compute karo.
Recall Solution
Teen pieces banao, har ek apna sawaal answer karte hue. Integral (past): nayi rectangle add karo, phir scale karo. Proportional (present): abhi ke error par react karo. Derivative (future): backward difference estimate karta hai; error gir raha hai, to yeh negative hai — ek brake. Total: Interpretation: chahe error positive hai (abhi bhi target se neeche), error itni tezi se gir raha hai ki D dominate karta hai aur slight reversal command karta hai — yeh action mein anti-overshoot instinct hai.
Problem 3.2 (sign census — har case cover karo)
Har situation ke liye ka sign do (maano ) aur words mein batao D kya kar raha hai: (a) neeche se ki taraf rush kar raha hai; (b) overshoot kar gaya aur wapas neeche aa raha hai; (c) frozen hai (steady); (d) se door drift kar raha hai.
Recall Solution
D error ki rate, dekhta hai. Yaad raho , to agar badhta hai, girta hai.
- (a) target ki taraf upar ja raha hai ⇒ gir raha hai ⇒ ⇒ : brakes lagata hai approach ko overshoot se bachane ke liye.
- (b) overshoot ho gaya, ab neeche wapas aa raha hai ⇒ wapas 0 ki taraf badh raha hai ⇒ ⇒ : recovery mein help karta hai.
- (c) steady hai ⇒ ⇒ : D rest par kuch nahi kehta — isliye D akela kabhi steady offset fix nahi kar sakta.
- (d) door drift kar raha hai ⇒ badh raha hai ⇒ ka same sign hai se ⇒ correction ko reinforce karta hai: runaway se pehle hi ladta hai. Zero case (c) key insight hai: D steady state mein exactly kuch contribute nahi karta, isliye yeh offset na cause kar sakta hai na cure.
Level 4 — Synthesis
Problem 4.1 (diagnose aur prescribe karo)
Ek drone altitude loop teen test flights mein teen faults dikhata hai:
- Flight A: target tak pahunchta hai lekin ~4% neeche, hamesha.
- Flight B: fast, lekin 30% overshoot karta hai aur kaafi seconds tak ring karta hai.
- Flight C: heavy D add karne ke baad, motors buzz/chatter karte hain chahe still hovering ho.
Har ek ke liye, change karne wala term aur direction of change batao, aur mechanism explain karo.
Recall Solution
- Flight A — persistent offset. ==== badhao. Ek constant residual error matlab loop wahan rest karta hai jahan , jo nonzero hai sirf tab jab ho. Integral action add karne/badhane se resting condition force hoti hai, to accumulator offset ko zero tak ramp karta hai. (Yeh type elevation hai — integrator system type ko ek se badha deta hai.)
- Flight B — overshoot & ringing. ==== badhao. Ringing matlab approach under-damped hai. D par react karta hai, exactly tab command subtract karta hai jab error sabse tezi se collapse ho raha hota hai, initial response slow kiye bina damping add karta hai.
- Flight C — motor chatter. ==== kam karo aur/ya filter karo. Differentiation high-frequency sensor noise ko multiply karta hai: tiny fast wiggles ka slope bahut bada hota hai, to explode karta hai aur D violent, useless twitches command karta hai. Fix: chota plus low-pass filtered derivative.
Problem 4.2 (windup budget)
Ek actuator par saturate karta hai. Ek large maneuver ke dauran error s tak par baitha rehta hai jabki output already par pinned hai. ke saath, saturation ke dauran kitna extra integral output accumulate hota hai, aur yeh dangerous kyun hai?
Recall Solution
Saturation ke dauran, integrator error khata rehta hai chahe actuator kuch aur na kar sake. Constant par s mein: Yeh jo already tha uske upar store hota hai — ek phantom command jo actuator ne actually deliver nahi ki. Jab finally target tak pahunchta hai, integrator ko pehle saara unwind karna padta hai uske output ke girne se pehle, to target se kaafi door nikal jaata hai. Yahi integrator windup hai. Fix: anti-windup — integrator ko freeze (ya clamp) karo jab bhi actuator saturated ho, taaki koi phantom charge na bane. (Related tuning wisdom: Ziegler–Nichols tuning ko modest isliye rakhta hai.)
Level 5 — Mastery
Problem 5.1 (spec se design karo)
Tumhe ek slow thermal plant control karni hai. Requirements: (i) constant heat-loss disturbance ke under zero steady-state error; (ii) zyada se zyada mild overshoot; (iii) sensor noisy hai. ke saath ek working P controller se start karke, decide karo konse terms add karne hain, kis order mein, aur har choice ko requirements ke against justify karo. Phir steady-state integral output compute karo agar constant disturbance ho.
Recall Solution
Spec ke against term-by-term reason karo:
- Requirement (i) zero steady-state error ⇒ hume I zaroor add karna hai. Sirf integral resting condition deta hai. Is slow plant par windup se bachne ke liye modest rakhho.
- Requirement (ii) mild overshoot ⇒ damping ke liye ek chhota D add karo — lekin requirement (iii) noisy sensor matlab heavy D noise amplify karega, to chhota, filtered derivative use karo. Agar overshoot P+I ke saath already acceptable hai, to D skip bhi kar sakte ho (PI controller slow, noisy thermal systems par common hai).
- Baseline speed ke liye raho. To design hai PI (optionally ek filtered D), isliye choose kiya kyunki har requirement exactly ek term ke kaam se map karti hai.
Steady-state integral output: rest par , to P contribute karta hai aur D contribute karta hai. Integral ko isliye poori disturbance cancellation supply karni padti hai: Integrator ki stored value wahan settle hoti hai jo banaye; exact par depend karta hai, lekin output physics se fixed hai.
Problem 5.2 (poora command predict karo)
Ek satellite pitch loop use karta hai. Ek instant par: , previous error , stored integral (already updated), sample time . , , , aur total compute karo. Phir batao kaun sa term dominate karta hai aur physically kya matlab hai.
Recall Solution
Dominant term: D, aur strongly negative. Chahe abhi bhi positive error hai aur positive stored history hai, error bahut tezi se collapse ho raha hai ( per second), to derivative brakes jam deta hai — loop aggressively ek overshoot ko prevent kar raha hai. Yeh parent note se "pehle se un-turning shuru karo" wali instinct hai, quantified.
Recall Self-test checklist (click to reveal)
Kya tum, bina dekhe, ye kar sakte ho:
- state karo aur kyun sign matter karta hai (P1.2)?
- Pure P ke liye compute karo aur explain karo kyun I use zero karta hai (P2.1, 2.2)?
- Haath se ek discrete PID update run karo (P3.1, 5.2)?
- Char motion cases mein ka sign do frozen case including (P3.2)?
- Windup ko ek number se explain karo aur uska fix batao (P4.2)?
- Ek spec se PI/PID design karo aur resting integral output nikalo (P5.1)? Agar koi shaky lage, aage badhne se pehle woh problem dobara kholo.