PID Controller
PID Controller
u(t)=Kpe(t)+KDde/dt+KIe(t)dt
Control
• The term means to force a system to behave as we wish.
• But…
• Of limited action (it is a LINEAR controller) but very useful!
What is a controller?
What is a controller?
• First:
• It is a math model which MODIFIES the output of a closed loop
system in such a way that…
• The error signal is zero (or as small as possible) AND…
• A desired performance is satisfied (small overshoot, just a few small
oscillations or none, etc).
• Second:
• That math model can be implemented as an algorithm in a
computer…
• Or as a physical device (an electronic circuit, a hydraulic/pnemumatic
valve, an electro-hydraulic valve, etc.).
This is what we obtain; the output signal
y(s) Kp
r ( s ) s (1 K p )
y(s) Kp
B( s) Closed loop pole
r (s) s (1 K p )
Closed loop block B(s)
y ( s) B( s)r ( s)
Analysis of performance (2)
• We now obtain the STEADY STATE ERROR, ess as:
• In our example…
ess lim se( s ) lim s (r ( s ) y ( s )
s 0 s 0
1 Kp 1
lim s y(s) Kp
s (1 K p ) B( s)
s 0
s s r ( s ) s (1 K p )
Reference B(s)Closed
loop system
Reference
System output y ( s) B( s)r ( s)
1 Kp 1
lim s
s 0
s s (1 K p ) s
Reference B(s)Closed
loop system
Reference
System output
Kp Kp 1
lim 1 1 ess
s 0 s (1 K ) (1 K p ) (1 K p )
p
1
ess
This is what we want (1 K p )
This is the difference (error)
between them (as t)
1
ess
(1 K p )
• No. (Why?).
• As a consequence…
• There will always exist a NON-ZERO ess with a P-controller in any plant!
Advantages/disadvantaes of
a P controller:
u(t)=e(t)dt
PI controller: C(s)=KI/s
• Proceeding as before, we obtain the closed loop system B(s):
BUT
It may introduce oscillations and
overshoot (complex poles)
1 KI 1
lim s
s 0
s s (s 1) K ) s
I
Reference B(s)Closed loop systemReference
System output
KI KI
lim 1 1 0 ess
s 0
s (s 1) K I ) (0 K I )
0 ess
PD controller: C(s)=KDsu(t)=KDde/dt
r(s) y(s)
NO DAMPING=
PURE OSCILATIONS
KDs
y(s) s 2
1 KDs
2 Overdamped, crit.damped, underdamped!
r (s) K s s K s 1
1 2 D D
s 1 Closed loop system
ess (t ) e(t ) lim s r ( s ) y ( s )
s 0
1 KDs 1
lim s 2
s 0
s s KDs 1 s
r ( s )
y(s)
0
lim 1 1 Derivative-Action:
s 0 1 (Global performance not ok) DAMPING ADDED
TO THE SYSTEM
Before: S1,2=-j
KI u (s)
C (s) K p KDs
s e( s )
de(t )
u (t ) K p e(t ) K I e(t )dt K D
dt
Summing up
Proportional action: Kp Integral action: KI Derivative action: KD
Increasing this gain does It gets ess=0 but it may It adds damping to the
not improve ess. produce oscillations and closed loop system,
(This action alone, does overshoot hence, reduces
not achieve ess=0) overshoot and
undesirable oscillations
but it delays output
response
Resonance
• https://www.youtube.com/watch?v=FU57DJvbE3k
Clap, clap resonance…
• https://www.youtube.com/watch?v=qR1-3gYXsfE