PID Controller

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 32

PID controller

Proportional +Integral+Derivative (PID) Controller

This controller forms its control action from:

u(t)=Kpe(t)+KDde/dt+KIe(t)dt
Control
• The term means to force a system to behave as we wish.

• This means, to keep the output variable as close as posible to the


input variable.

• Or: TO KEEP THE CLOSED LOOP ERROR=0


• The latter can happen in two basic situations:
• A) The system response is NOT unstable but we want to improve
performance.

• B) The system response is unstable or may be disturbed in such a way


that can become unstable (for instance, resonance)
Designing a PID controller
• Easy to:
• Undesrtand…
• Implement…
• Change…
• Design…

• 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

This is what we wish;


what we feed to the system

They do not look the same!


Recomendations to design/study PIDs
Remain in open loop (*)

Feedback (control design)


P-controller: C(s)=n(s)/d(s)=Kp
• Assume that we have to control the level of a tank:
Analysis of performance (1)
• First: Let’s observe the location of the open loop pole: s=-1/.
y(s) 1 1
 
r ( s ) s  1 0.5s  1
How does the systen behave?

Notice that we are feeding


a step input with
AMPLITUDE=1 !!

Open loop system response


C(s)=n(s)/d(s)=Kp
• Second: We wonder, are we satisfied with this…? (Too slow
reponse,etc)
• If this is not the case, let’s reduce the closed loop system…
1
Kp Kp
y(s)  s  1
 
r (s) 1  K 1 s  1  K p
p
s  1

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:

e(t  )  ess  lim se( s )   lim s (r ( s )  y ( s ) 


s 0 s 0

• 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)

This is what we get


QUESTION:
• Is it possible to force ess=0 with a P- controller…?

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:

1 - The simplest structure to improve


 ess the response of the system.
This is what we want (1  K p )
- But
This is the difference (error) - Too simple that ess0
between them (as t)

This is what we get


PI controller: C(s)=n(s)/d(s)=KI/s, 1/s

u(t)=e(t)dt
PI controller: C(s)=KI/s
• Proceeding as before, we obtain the closed loop system B(s):

KI 1 Closed loop poles :


y(s) KI
 s s  1  s 2  s  K I  0
r (s) K 1 s (s  1)  K I
1 I (Complex in general)
s s  1
Advantages:
• We obtain directly the ess as before: Ess=0

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)=KDsu(t)=KDde/dt
r(s) y(s)

Open loop poles: s1,2=-j

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

NOW: s2+KDs+1; Over/crit./under damped system


Homework: Repeat the latter analysis for a
PID controller of the following form:

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

You might also like