Worked examples — PID control — proportional, integral, derivative terms
3.5.38 · D3· Physics › Guidance, Navigation & Control (GNC) › PID control — proportional, integral, derivative terms
Yeh page drill-ground hai. Parent note ne teeno terms banaye aur bataya ki kyun har ek exist karta hai. Yahan hum har woh case cover karenge jo ek PID problem mein aa sakta hai — har sign, har degenerate input, har limiting value, ek real-world word problem, aur ek exam trap. Pehle forecast cover karke har ek ko karo.
Pehli line se pehle, ek reminder plain words mein. Controller ek error dekhta hai — woh gap jo hamare chahne ki jagah (setpoint ) aur hum actually hain uske beech (process variable ) hoti hai. Hum us gap ko likhte hain
Agar toh hum target se neeche hain; agar toh humne overshoot kar liya hai; agar toh hum bilkul target par hain. Controller ko teen ingredients use karke command mein badalta hai — abhi error ki value (P), uska running total (I), aur uski slope (D):
Neeche sab kuch bas yahi ek line hai, har kone mein push ki gayi. Ek key fact jis par hum baar baar lean karenge: teeno terms simply add hote hain — yeh linear superposition hai, toh jab ek baar har term compute ho jaaye toh final command unka plain sum hai, aur har term ka contribution independently padhha ja sakta hai.
The scenario matrix
Har PID exercise inhi cells mein se kisi ek mein rehti hai. Neeche jo examples follow karte hain unhe cell(s) ke saath label kiya gaya hai jo woh cover karte hain, toh end tak koi bhi cell empty nahi rahegi.
| # | Case class | Kya tricky banata hai | Covered by |
|---|---|---|---|
| A | Error positive, falling (target ki taraf aa raha hai) | D term negative jaata hai — sign confusion | Ex 1, Ex 4 |
| B | Error negative (target overshoot ho gaya) | P aur I sign flip karte hain; "push back" karna padta hai | Ex 2 |
| C | Zero instantaneous error, lekin stored history hai | Sirf I bachta hai — prove karta hai ki I "yaad rakhta hai" | Ex 3 |
| D | Constant disturbance, pure P vs P+I | Steady-state offset vs | Ex 5 |
| E | Limiting values: , , | Har term apne extreme mein kya karta hai | Ex 6 |
| F | Degenerate: constant error (flat), ya noisy spike | D of a flat line ; D of a spike blow up karta hai | Ex 7 |
| G | Real-world word problem (drone altitude) | Physics ko translate karo → | Ex 8 |
| H | Exam twist: same error, opposite trend | Same , different → different | Ex 9 |
Worked examples
Discrete examples ke liye fixed gains jab tak aur na kaha jaaye:
Woh discrete law yaad karo jo actually flight computer par run karta hai:
Yahan error rectangles ka running sum hai — integral ka digital echo. Continuous view ke liye Laplace transforms & transfer functions dekho.
- Integral update. . Kyun? Hume sabse nayi error rectangle ko memory mein fold karna hoga use karne se pehle.
- P term. . Kyun? Present gap par react karo — hum abhi bhi target se neeche hain, toh upar push karo.
- I term. . Kyun? Accumulated history ek steady extra shove add karta hai.
- D term. . Kyun? Error ek step mein gira — ek steep negative slope. D isko padhta hai "hum tezi se aa rahe hain, braking shuru karo," toh woh neeche kheenchta hai.
- Sum. . Kyun? Linear superposition se command bas teeno contributions add karne se milta hai — koi interaction terms nahi.
Verify: Units sab output units mein, consistent. Sanity check: even though , fast approach () ne D ko dominate karaya, total ko negative flip kar diya — controller overshoot se pehle ease off karta hai. Yahi "future anticipate karna" ka matlab hai.
- Integral update. . Kyun? Negative error accumulator se subtract karta hai — integrator apna purana positive charge unwind karna shuru karta hai.
- P term. . Kyun? Negative error ka matlab hai "tum bahut upar ho," toh P neeche push karta hai. Sign automatically flip ho jaata hai.
- I term. . Kyun? Abhi bhi positive hai kyunki stored history abhi bhi positive hai, even though present error negative hai — memory reality se lag karti hai.
- D term. . Kyun? Error aur door gaya (), toh slope negative hai: D bhi neeche push karta hai, runaway se ladta hai.
- Sum. . Kyun? Phir se linear superposition — wheel ko bheje jaane wale single command ke liye teeno contributions add karo.
Verify: P aur D dono negative (dono keh rahe hain "wapas neeche aao"), jabki I abhi bhi apne backlog ki wajah se positive hai — yeh ek textbook picture hai ki kyun wound-up integrator ke saath overshoot recover karna slow hota hai. Total strongly negative hai: corrective push sahi direction mein point karta hai.
- Integral update. . Kyun? Zero error koi naya rectangle add nahi karta — memory hold karti hai.
- P term. . Kyun? P present value padhta hai, jo zero hai, toh abhi kuch contribute nahi karta.
- I term. . Kyun? Integrator ka stored charge unchanged hai, toh uska output zero present error ke baavjood survive karta hai — yahi memory in action hai.
- D term. . Kyun? Error change nahi ho raha, toh uski slope zero hai — D ke paas anticipate karne ke liye kuch nahi.
- Sum. . Kyun? Linear superposition: P aur D dono zero hone se, poora command exactly I term hai.
Verify: Yahi integral exist karne ki poori wajah hai. Zero instantaneous error ke saath command phir bhi hai — precisely woh force jo disturbance cancel karne ke liye chahiye jabki hold karo. Ek pure-P controller yahan output karta aur immediately drift ho jaata. Steady-state error and system type dekho.

dd-physics-3.5.38-d3-s01.png — error curve ka ek sample. Teen cheezein observe karo: yellow dot ki height () jo P term padhta hai, green shaded rectangle () jiska area I term accumulate karta hai, aur red dashed line jiska downhill steepness () D term padhta hai. Ek curve, teen features.
- P height padhta hai. Yellow dot ki height hai; . Kyun? P value ke proportional hai — literally vertical position.
- I shaded area padhta hai. Green rectangle ka area hai; old memory mein add hoke yeh ban jaata hai, toh . Kyun? Ek integral hai hi curve ke neeche area; running sum yeh patli rectangles stack karta hai.
- D slope padhta hai. Red line ki steepness hai; . Kyun? Derivative hai hi tangent ki slope — yahan ek downhill line, toh negative.
- Sum. . Kyun? Linear superposition: single command teen read-off features ko add karne se milta hai.
Verify: Same numbers as Example 1 (, ), ab compute karne ki jagah dekhe gaye. Height, area, slope — ek curve ki teen alag features.
- Pure-P equilibrium. Rest par, aur yeh ke barabar hona chahiye: Kyun? Agar wheel rest par hai toh command constant hai, aur us command ka ek hi source P term hai.
- Shrink hoga lekin khatam nahi hoga. tak double karne par milta hai — aadha hua lekin phir bhi nonzero. Kyun? Zero error zero output dega, aur phir kuch bhi cancel nahi karega. P yeh kabhi nahi jeet sakta.
- Integral add karo. Integrator ki state maan ta hai, aur uska output hai. Steady state mein output ka change rukna chahiye, yaani , jo force karta hai. Kyun? Woh akela resting state jahan memory grow karna band kare exact zero error hai — integrator tab tak ramp karta hai jab tak woh akela supply na kar de.
Verify: : , . Gain double karke error aadha karna law confirm karta hai. I ke saath, exactly. Inhe gains choose karne ke liye Ziegler–Nichols tuning se compare karo.
- . . Kyun? Infinitely stiff spring — lekin reality mein bahut bada loop ko oscillate/unstable kar deta hai (dekho Stability & the Routh–Hurwitz criterion). Limit mein accuracy, practice mein chaos.
- . Integral term vanish ho jaata hai; aap wapas pure P par aa jaate hain apne offset ke saath. Kyun? Koi memory nahi matlab past bhool jaao — woh bimari wapas aati hai jo pure P ko hoti hai.
- . Koi damping nahi. Response overshoot aur ring karta hai. Kyun? Koi trend nahi padhta, toh kuch bhi pehle brake nahi karta. Ulta system ko freeze kar deta aur har noise spike par chillata.
Verify: (accuracy), jabki restore karta hai (offset wapas). Parent ke "har term pichle term ki bimari cure karta hai" ke saath consistent.
- (a) Flat error, D term. . Kyun? Flat line ka slope zero hota hai — D kuch nahi kehta jab kuch change nahi hota. Sirf P aur I act karte hain.
- (a) I ramping karta rehta hai. Har step memory mein add karta hai — integrator kabhi rest nahi karta jab error persist karta hai. Yahi exactly woh kaise offset erase karta hai. Kyun? Constant nonzero error integrator ka fuel hai.
- (b) Noise spike, D term. . Kyun? Ek choti fast wiggle (ek chhote step mein ka jump) ek enormous slope produce karta hai. D high-frequency noise amplify karta hai — yeh classic failure hai. Fix: derivative filter karo (dekho Sensor noise & filtering).
Verify: Flat line: D . Spike: D ek jump se ke upar — ek unit-size glitch se blow-up. Dikhata hai kyun raw jittery sensor ke saath dangerous hai.
- Physics translate karo. ; pehle wala . Kyun? Hamesha word problem ko pehle mein convert karo; target se neeche ⇒ positive error ⇒ lift chahiye.
- Integral update. . Kyun? Nayi error rectangle add karo.
- P term. . Kyun? Present altitude gap par react karo — abhi bhi low hai, toh us gap ke proportional lift add karo.
- I term. . Kyun? Low rehne ki accumulated history steady extra throttle add karti hai taaki koi lingering offset erase ho sake.
- D term. . Kyun? Altitude badhi () toh error shrink hua — D throttle cut karta hai taaki se aage na nikal jaaye.
- Sum. throttle-units. Kyun? Linear superposition: single throttle command teeno contributions ka plain sum hai.
Verify: Net positive (abhi bhi chadh raha hai, correctly), lekin negative D P+I ke raw se trim karta hai — ek pre-emptive brake. Woh loop jisme yeh baitha hai uske liye Feedback control loops dekho.
- Shared P aur I. ; . Dono ke liye same. Kyun? P aur I sirf present value aur memory padhte hain — yahan identical hain.
- Student A ka D. . Total . Kyun? Error tezi se gir raha hai → zor se brake karo.
- Student B ka D. . Total . Kyun? Error badh raha hai → aur zor se push karo pakadne ke liye.
Verify: vs — ka ek swing, sab D term se, identical instantaneous error ke baavjood. Trap: ka ek snapshot kabhi determine nahi karta; aapko trend jaanna hoga. Yeh sabse common exam gotcha hai.
Recall Quick self-test (reveal karne ke liye click karo)
Cell C — lekin aur ke saath, kya hai? ::: (P aur D kuch contribute nahi karte). Cell D — pure P, , , dhundho. ::: . Cell H — kyun do identical alag de sakte hain? ::: Kyunki (D term) par bhi depend karta hai; same value, different trend. Cell F — perfectly flat error ka D term? ::: Zero; constant ka slope zero hota hai.