You are on page 1of 34

PID Controllers

Control Engineering
by Dr. L. K. Wong

Dr. WONG, Lik-Kin Page 1


Output Feedback Control Systems
Reference +
Controller Plant Output

• Feed back only the output signal


– Easy access
– Obtainable in practice

Dr. WONG, Lik-Kin Page 2


PID Controllers
• Proportional controllers
– pure gain or attenuation
• Integral controllers
– integrate error
• Derivative controllers
– differentiate error

Dr. WONG, Lik-Kin Page 3


Proportional Controller
u = K pe

• Controller input is error (reference − output)


• Controller output is control signal
• P controller involves only a proportional
gain (or attenuation)

Dr. WONG, Lik-Kin Page 4


Integral Controller
u = Ki ∫ edt

• Integral of error with a constant gain


• Increase system type by 1
– Infinity steady-state gain
– Eliminate steady-state error for a unit step input

Dr. WONG, Lik-Kin Page 5


Integral Controller
Y (s) G p ( s)
=
R(s) 1 + G p (s)
Y ( s ) = E ( s )G p ( s )
R(s)
E (s) =
1 + G p (s)

sR ( s ) 1 1
ess = lim e(t ) = lim sE ( s ) = lim = lim = =0
t →∞ s →0 s →0 1 + G ( s ) s →0 1 + G ( s ) 1+ ∞
p p

Dr. WONG, Lik-Kin Page 6


Derivative Control
de
u = Kd
dt

• Differentiation of error with a constant gain


• Reduce overshoot and oscillation
• Do not affect steady-state response
• Sensitive to noise

Dr. WONG, Lik-Kin Page 7


Controller Structure
• Single controller
– P controller, I controller, D controller
• Combination of controllers
– PI controller, PD controller
– PID controller

Dr. WONG, Lik-Kin Page 8


PID Controller
• PI controller u = K pe + Ki ∫ edt

de
• PD controller u = K pe + K d
dt

de
• PID controller u = K p e + Ki ∫ edt + K d
dt

Dr. WONG, Lik-Kin Page 9


PID Controller
Ki
• PI controller U (s) = ( K p + ) E ( s)
s

• PD controller U (s) = ( K p + Kd s)E ( s)

Ki
• PID controller U (s) = ( K p + + Kd s ) E ( s)
s

Dr. WONG, Lik-Kin Page 10


Controller Performance
• P controller
• PI controller
• PD controller
• PID controller

Dr. WONG, Lik-Kin Page 11


Block Diagram

Reference + PID
Plant Output
− Controller

Dr. WONG, Lik-Kin Page 12


P Controller
1
G p (s) = 2
s + s +1

U ( s) = K p E ( s )

Kp
OLTF = 2
s + s +1

Kp
CLTF = 2
s + s +1+ Kp

Dr. WONG, Lik-Kin Page 13


P Controller
• Increase in gain
– upgrade both steady-state and transient
responses
– reduce steady-state error
– reduce stability

Dr. WONG, Lik-Kin Page 14


P Controller
Step Response
From: U(1)
1.5

1
Kp = 10
Amplitude

To: Y(1)

Kp = 5
Kp = 2
0.5
Kp = 1

0
0 2 4 6 8 10 12

Time (sec.)

Dr. WONG, Lik-Kin Page 15


P Controller
Step Response
From: U(1)
2

1.8

1.6

1.4

1.2
Amplitude

Kp = 1000
To: Y(1)

0.8

0.6

0.4

0.2

0
0 2 4 6 8 10 12

Time (sec.)

Dr. WONG, Lik-Kin Page 16


Proportional Controller
Bode Diagrams 1000
L3 ( s ) =
From: U(1) ( s + 1)( s + 100)
50

0
Phase (deg); Magnitude (dB)

-50

-100

-150

0
1
L2 ( s ) =
-50
( s + 1)( s + 100)
To: Y(1)

-100

-150

-200
10 -1 10 0 10 1 10 2 10 3

Frequency (rad/sec)

Dr. WONG, Lik-Kin Page 17


PI Controller
U ( s) Ki
= (K p + )
E (s) s
Y ( s) Ki
= ( K p + )G p ( s)
E( s) s
( K p s + Ki )
= Gp ( s )
s

K p s + Ki
CLTF = 3 2
s + s + (1 + K p ) s + Ki

Dr. WONG, Lik-Kin Page 18


PI Controller
Kp = 2 Step Response
From: U(1)
1.6

1.4
Ki = 2

1.2
Ki = 1

1
Amplitude

To: Y(1)

0.8 Ki = 0.5
0.6
Ki = 0
0.4

0.2

0
0 5 10 15 20 25 30 35 40

Time (sec.)

Dr. WONG, Lik-Kin Page 19


PD Controller
U (s) = ( K p + Kd s)E ( s)

Kd s + K p
OLTF = 2
s + s +1

Kd s + K p
CLTF = 2
s + (1 + K d ) s + (1 + K p )

Dr. WONG, Lik-Kin Page 20


PD Controller
Kp = 2 Step Response
From: U(1)
1
Kd = 10
0.9

0.8
Kd = 1
0.7

0.6
Amplitude

To: Y(1)

0.5
Kd = 2 Kd = 0
0.4

0.3

0.2

0.1

0
0 5 10 15

Time (sec.)

Dr. WONG, Lik-Kin Page 21


PID Controller
Ki
U (s) = ( K p + + Kd s)E (s)
s
Kd s2 + K ps + Ki
= E (s)
s

K d s 2 + K p s + Ki
OLTF =
s3 + s2 + s

K d s 2 + K p s + Ki
CLTF = 3
s + (1 + K d ) s 2 + (1 + K p ) s + K i

Dr. WONG, Lik-Kin Page 22


PID Controller
Step Response
From: U(1)
1.4

1.2
Kp = 5, Ki = 5, Kd = 2
Kp = 5, Ki = 5, Kd = 5
1

Kp = 2, Ki = 1, Kd = 2,
Amplitude

0.8
To: Y(1)

Kp = 2, Ki = 2, Kd = 2,
0.6

0.4

0.2

0
0 2 4 6 8 10 12 14

Time (sec.)

Dr. WONG, Lik-Kin Page 23


Design of PID Controllers
• Based on the knowledge of P, I and D
– trial and error
– manual tuning
– simulation

Dr. WONG, Lik-Kin Page 24


Design of PID Controllers
• Ziegler-Nichols method
– based on a open-loop process
– based on a critical gain

Dr. WONG, Lik-Kin Page 25


Ziegler-Nichols Method 1

Ke −τ d s
K G( s ) =
τs + 1

Slope R = K/τ

Time delay τ
L = τd
Dr. WONG, Lik-Kin Page 26
Ziegler-Nichols Method 1
• P controller
– Kp = 1/RL
• PI controller
– Kp = 0.9/RL, Ki = 0.27/RL2
• PID controller
– Kp = 1.2/RL, Ki = 0.6/RL2, Kd = 0.6/R

Dr. WONG, Lik-Kin Page 27


Ziegler-Nichols Method 2
• Increase a pure gain Ku of a closed-loop
system until the system is marginally stable
• Measure the period of oscillation Pu (unit is
second)

Dr. WONG, Lik-Kin Page 28


Ziegler-Nichols Method 2
• P controller
– Kp = 0.5Ku
• PI controller
– Kp = 0.45Ku, Ki = 0.54Ku/Pu
• PID controller
– Kp = 0.6Ku, Ki = 1.2Ku/Pu, Kd = 0.075KuPu

Dr. WONG, Lik-Kin Page 29


Digital P and D Controller

U ( z) = K p E ( z)

de(t )
u (t ) =
dt
e( k ) − e( k − 1)
u( k ) ≈
T

Dr. WONG, Lik-Kin Page 30


Digital I Controller
t
u ( t ) = u( t0 ) + ∫ e(τ )dτ
t0
( k +1) T
u ( k + 1) = u( k ) + ∫ e(τ )dτ
kT

= u( k ) + [e(k + 1) + e( k )]
T
2
zU ( z ) = U ( z ) + [zE ( z ) + E ( z ) ]
T
2
T z +1
U ( z) = E ( z)
2 z −1

Dr. WONG, Lik-Kin Page 31


Digital PID Controller
Kp

T z +1
E(z) Ki + U(z)
2 z −1

( z − 1)
Kd
Tz

Dr. WONG, Lik-Kin Page 32


Conclusion
• Properties of P, I, D, PI, PD, and PID
controllers
• Design of PID controllers
• Digital PID controllers

Dr. WONG, Lik-Kin Page 33


Reference
• M. Gopal, Digital Control Engineering.
John Wiley & Sons.
• B. C. Kuo, Automatic Control System.
Englewood Cliffs, N.J.: Prentice Hall, 1995.
• G. F. Franklin, J. D. Powell, and A. Emami-
Naeini, Feedback Control of Dynamic
Systems. Singapore: Addison-Wesley,
1988.
Dr. WONG, Lik-Kin Page 34

You might also like