### Lecture 26: PID Control Theory

```kp
++
++
+
kd s
ki
1
++
s
A( s )
-1
-1
Professor Walter W. Olson
Department of Mechanical, Industrial and Manufacturing Engineering
University of Toledo
PID Control
++
P(s)
Outline of Today’s Lecture
 Review
 Ideal PID Controller
 Proportional Control
 Proportional-Integral Control
 Proportional-Integral Derivative Control
 Ziegler Nichols Tuning
 PID Theory
 Integrator Windup
 Noise Improvement
Proportional-Integral-Derivative
Controller
Based on a survey of over eleven thousand controllers in the refining,
chemicals and pulp and paper industries, 97% of regulatory controllers
utilize PID feedback.
L. Desborough and R. Miller, 2002 [DM02].
 PID Control, originally developed in 1890’s in the form of motor
 The first theory of PID Control was published by a Russian
(Minorsky) who was working for the US Navy in 1922
 The first papers regarding tuning appeared in the early 1940’s
 Today. there are several hundred different rules for tuning PID
controllers (See Dwyer, 2003, who has cataloged the major methods)
 While most of the discussion is about the “ideal” PID controller,
there are many forms of the PID controller
PID Control
 Process independent
 The best controller where the specifics of the process can not be modeled
 Leads to a “reasonable” solution when tuned for most situations
 Inexpensive: Most of the modern controllers are PID
 Can be tuned without a great amount of experience required





Not optimal for the problems
Can be unstable unless tuned properly
Not dependent on the process
Hunting (oscillation about an operating point)
Derivative noise amplification
The Ideal PID Controller
 The input/output realtionship for the PID Controller is the Integral-Differential
Equation
t
u ( t )  k p y ( t )  k t  y ( )d   k d
0

1
 k p  y (t ) 
dt
Ti

dy

0
t
y ( ) d   T d
 The ideal PID controller has the transfer function


1
C P ID ( s )  k p 
 kd s  k p 1 
 Td s 
s
Ti s


ki
 Structurally it would look like
C PID ( s )
kp
++
ki
s
++
+
kd s
-1
P(s)
dy 

dt 
Proportional Control
Y (s)
R(s)

kd P (s)
1  kd P(s)
C PID ( s )
kp
Y(s)
R(s)
++
ki
s
++
+
kd s
-1
P(s)
Proportional – Integral Controller
 Most controllers using this technology are of this form:
ki 

k

 p
 P(s)
k p s  ki P ( s)
Y (s)
s 



k 
R(s)

1  k p  s  ki P ( s)
1   k p  i  P(s) 
s 

C PID ( s )
kp
Y(s)
R(s)
++
ki
s
++
+
P(s)
kd s
-1
 This reacts to the system error and reduces it
PID Tuning
 Tuning is the choosing of the parameters kd, ki, and kp, for a PID




Controller
The oldest and most used method of tuning are the ZieglerNichols (ZN) methods developed in the 1940’s.
The first method is based on the assumption that the process
without its feedback loop performs with a 1st order transfer
function, perhaps with a transport delay
The second method assumes that a higher order system has
dominant poles which can be excited by gain to the point of steady
oscillation
In order to establish the constants for computing the parameters
simple tests are performed of the process
Ziegler-Nichols PID Tuning
Method 1 for First Order Systems
 A system with a transfer function of the form P ( s ) 
has the time response to a unit step input:
K
sa
e
 st 0
 This response might also be generated from a higher order
system that is has high damping.
Ziegler-Nichols PID Tuning
Method 1 for First Order Systems
 The advice given is to draw a line tangent to the response curve through the
inflection point of the curve.
 However, a mathematical first order response doesn’t have a point of inflection as it is of
the form y ( t )  e  at (at no place does the 2nd derivative change sign.) My advice:
place the line tangent to the initial curve slope
 You also have to adjust for the gain K of the system by multiplying compensator by 1/K
Rise
Time
T
Lag L
Type
P
PI
PID
kp
T
Ti
Td
L
0.9T
L
1.2T
L
3 .3 3 L
2L
0 .5 L
Ziegler-Nichols PID Tuning
Method 2 for Unknown Oscillatory System
 The form of the transfer function unknown but the system can be put
in steady oscillation by increasing the gain:
 Increase gain,K, on closed loop system until the gain at steady
oscillation, Kcr, is found
 Then measure the critical period, Pcr
 Apply table for controller constants and multiply by system gain 1/K
Type
kp
Pcr
P
0.5 K cr
1
Cycle
PI
0.45 K cr
PID
0.6 K cr
Ti
Td
Pc r
1 .2
0.5 Pcr
0.125 Pcr
PID: A Little Theory
 Consider a 1st order function where the 1st method of Ziegler
Nichols applies
 The general transfer function for this system is
P(s) 
K
sa
 The term e  st
e
 st 0

K
1
a s
1
a
e
 st 0
 Ka
1
Ta s  1
e
 st 0
is the transport lag and delays the action for
t0 seconds. Therefore L  t 0
 The term Ta is the time constant for the system. T measured on
the graph is an estimate of this.
0
PID: A Little Theory
 The method 1 PI controller applied to the loop equation is





1 
T 
1  
1
 st 0 
k p 1 
P
(
s
)

0.9
1

K
e




L s    a Ta s  1
Ti s 
K
L






0.3  


assum ing that L  t 0 ,
K  Ka
and T  T a

1 
T s  0.333  sL
 0.9 T s  0.3   1
 sL 
k p 1 
e
 0.9
e
 P(s)  
  Ts  1

T
s
L
s
L
s
T
s

1








i 

L
1
0.9
e
 sL
F  s   L
T s  0.333
 Ls  Ts  1
e
1
 f  t  L  1  t  L 
 sL
 0.9
T s  0.333
 s  Ts  1
2
tim e shifted by L
PID: A Little Theory
 In Method 2, the gain was increased until the system was
nearly a perfect oscillatory system.
 Since the gain changes the oscillatory patterns, the lowest order
system that this could represent would by a 3rd order system.
G (s) 
K
s  as  bs  K
3
2
 For this system to oscillate, there must be a solution of the
characteristic function for K real and positive where s=±wi
s  as  bs  K  0
3
2
 w i  a w  bw i  K  0 for s  w i
3
2
w i  a w  bw i  K  0 for s   w i
3
2
 K  a w  K cr  a w
2
2
and Pcr 
2
w
PID: A Little Theory
 Applying the PI Controller:
C P I ( s ) P ( s )  0.45 K cr

1.2  
K

2
1 
 3
  0.45 a w
2
Pcr s   s  as  bs  K 

2

1.2 w  
aw

1 
 3

2
2
2  s   s  as  bs  a w 

2



aw
s  0.191 w
 s  0.191 w  
2
4


C P I ( s ) P ( s )  0.45 a w 

0.45
a
w

 3
 3
2
2 
2
2
s
s

as

bs

a
w
s
s

as

bs

a
w


 

 
2
Integrator Windup
 We have tacitly assumed that the controlled devices could meet
the demands of the controls that we designed.
 However real devices have limitations that may prevent the system
from responding adequately to the control signal
 When this occurs with an integrating controller, the error which is
used to amplify the control signal may build up and saturate the
controller.
 We refer to this as “integrator windup”:
 the system can’t respond and the integrator signal is extremely large
(often maxed out on a real controller)
 the result is an uncontrolled system that can not return to normal
operating conditions until the controller is reset
Integrator Windup
 To avoid windup, a possible solution is to provide a
correcting error from the actuator by adding another loop:
(the actuator has to be extracted from the plant)
kp
++
++
+
kd s
ki
1
++
s
-1
A( s )
-1
++
P(s)
Derivative Noise Improvement
 A major problem with using the derivative part of the PID
controller that the derivative has the effect of amplifying the
high frequency components which, for most systems, is likely
to be noise.
Without PID
With PID
Derivative Noise Improvement
 One way to improve the noise rejection at higher frequencies
is to apply a second order filter that passes low frequency and
rejects high frequency
 The natural frequency of the filter should be chosen as
wn 
Nk p
kd
with N chosen to give the controller the bandwidth
necessary, usually in the range of 2 to 20
 The controller then has the design
2

ki
wn


C P ID ( s )   k p 
 kd s   2
2 
s

  s  2w n s  w n 
Summary
 PID Theory
 Integrator Windup
 Noise Improvement
Next Class Loop Shaping
```