You are on page 1of 40

Dynamic Systems and Control, Chapter 5: PID control

Proportional Integral Derivative


(PID) Control

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-1
Dynamic Systems and Control, Chapter 5: PID control

Closed-loop Control System


Reference signal r
+
- Controller Plant
y e u

Feedback

Premature baby incubator


Desired
temperature Thermocouple
Microcontroller

Amplifier

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-2
Dynamic Systems and Control, Chapter 5: PID control

On/Off Control
Reference signal r
+
- On/Off control Incubator
y
e u

Feedback

ery u
umax
umin , e  0
u umin
 umax , e  0
e

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-3
Dynamic Systems and Control, Chapter 5: PID control

Proportional Control

Reference signal r
+ KP Incubator
y
-
e u

Feedback

Proportional control law:


u
 umax , e  e0 umax

u  u0  K P e, e0  e  e0
umin
 umin , e  e0
 e
© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-4
Dynamic Systems and Control, Chapter 5: PID control

Proportional + Integral Control


t
K I  e( s ) ds
0

Reference signal r
+ KP ++ Incubator
-
e u
y

Feedback

Proportional Integral
(PI) controller keeps 𝑡

adjusting the control 𝑢 𝑡 = 𝐾𝑃 𝑒 𝑡 +𝐾𝐼 𝑒 𝑠 𝑑𝑠


0
signal as long as there is
an error
© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-5
Dynamic Systems and Control, Chapter 5: PID control

Proportional + Integral + Derivative Control


t
K I  e( s ) ds
0

Reference signal r
+ KP ++ Incubator
-
e + u
y
K D det / dt

Feedbac
Add the prediction of the control k
error

e D
𝑡 𝑑𝑒
I P 𝑢 𝑡 = 𝐾𝑃 𝑒 𝑡 +𝐾𝐼 0 𝑒 𝑠 𝑑𝑠+𝐾𝐷
𝑑𝑡
t
© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-6
Dynamic Systems and Control, Chapter 5: PID control

The responses of the incubator with :


on/off control law

Oscillation!

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-7
Dynamic Systems and Control, Chapter 5: PID control

The responses of the incubator with :


on/off control law proportional control law

No oscillation but stationary


error

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-8
Dynamic Systems and Control, Chapter 5: PID control

The responses of the incubator with :


on/off control law proportional control law

PI
control law

No stationary error but slow convergence

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-9
Dynamic Systems and Control, Chapter 5: PID control

The responses of the incubator with :


on/off control law proportional control law

PI PID control law


control law

Faster convergence Reduced oscillation


© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-10
Dynamic Systems and Control, Chapter 5: PID control

Characteristics of P, I, and D controllers


CL SETTLING S-S
RISE TIME OVERSHOOT
RESPONSE TIME ERROR

Decreas Small Decreas


KP Increase
e Change e

Decreas
KI e
Increase Increase Eliminate

Small Small
KD Change
Decrease Decrease
Change

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-11
Dynamic Systems and Control, Chapter 5: PID control

Conclusions
PID controller is the best because:
- High demand on precision
- High variation in desired outputs

However, it is:
- Expensive
- Complicated to tune

How to tune it?

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-12
Dynamic Systems and Control, Chapter 5: PID control

PID control
- The magical three-term controller
t
K I  e( s ) ds
0

Reference signal r
+ KP ++ Incubator
-
e + u
y
K D det / dt

Feedbac
k

de  1 0 de(t ) 

t
u (t )  K P e(t )  K I  e( s )ds  K D  K p  e(t )  e( )d  Td 
 TI dt 
t
0 dt

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-13
Dynamic Systems and Control, Chapter 5: PID control

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
Ziegler-Nichols (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
₋ 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

We can build a PID controller that works well in practice in


most situations without knowing control theory

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-14
Dynamic Systems and Control, Chapter 5: PID control

Ziegler-Nichols PID Tuning: Method 1 for First Order Systems

Rise Time T
Type Kp TI TD
T
P L
Lag L 0.9T
PI L
3.33L

1.2T
PID L
2L 0.5L

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-15
Dynamic Systems and Control, Chapter 5: PID control

Ziegler-Nichols PID Tuning: Method 2 for Unknown


Oscillatory System

Increase gain K on closed loop system until the gain at steady


oscillation Kcr is found

Type Kp TI TD

Pcr P 0.5Kcr

1 PI 0.45Kcr Pcr
Cycl 1.2
e PID 0.6Kcr 0.5Pcr 0.125Pcr

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-16
Dynamic Systems and Control, Chapter 5: PID control

PID tuning

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-17
Dynamic Systems and Control, Chapter 5: PID control

Overview of PID control

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-18
Dynamic Systems and Control, Chapter 5: PID control

Review the steady-state error


Steady-state error is the difference between the input and the output
for a prescribed test input (such as step, ramp, or parabola) as t →∞ .
Consider the following unity feedback system.

The error: The steady-state error:

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-19
Dynamic Systems and Control, Chapter 5: PID control

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-20
Dynamic Systems and Control, Chapter 5: PID control

Improving Steady-State Error – Using PI Controller


Objective: design a control system to eliminate the steady-state
error without affecting the transient response.
The steady-state error of P control system can be eliminated by
adding an integrator (i.e., 1/s) to the controller. The resultant
controller is called an integral (I) controller.

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-21
Dynamic Systems and Control, Chapter 5: PID control

Improving Steady-State Error – Using PI Controller


Problem: Using the I controller, Point A that represents the desired transient
response is no longer on the root locus, as shown in the following figures.

(a) No Compensation
(b) Only Integrator:
– Steady-state performance
improved.
– However, the transient
response in (a) can not be
achieved!

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-22
Dynamic Systems and Control, Chapter 5: PID control

Improving Steady-State Error – Using PI Controller


Solution: Add a zero that is close to the pole at the origin, as shown in following
figure, such that the new system has a root locus going through Point A.

The resultant controller is called an


proportional-plus-integral (PI) controller
or ideal integral compensator. It has the
transfer function

- In the design of PI controller, the zero


must be chosen to be close to the pole at
the origin so that the angular contributions
from the zero and the pole cancel out, i.e.,
θzc-θpc = 0
- Point A is still on the root locus;
meanwhile the steady-state error is
eliminated.

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-23
Dynamic Systems and Control, Chapter 5: PID control

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-24
Dynamic Systems and Control, Chapter 5: PID control

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-25
Dynamic Systems and Control, Chapter 5: PID control

Ideal Derivative Compensation (PD)

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-26
Dynamic Systems and Control, Chapter 5: PID control

Ideal Derivative Compensation (PD)

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-27
Dynamic Systems and Control, Chapter 5: PID control

Ideal Derivative Compensation (PD)

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-28
Dynamic Systems and Control, Chapter 5: PID control

Ideal Derivative Compensation (PD)

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-29
Dynamic Systems and Control, Chapter 5: PID control

Ideal Derivative Compensation (PD)

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-30
Dynamic Systems and Control, Chapter 5: PID control

Cascade compensator

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-31
Dynamic Systems and Control, Chapter 5: PID control

Improving Steady-State Error and Transient Response – Using


PID Controller
A PID controller is combination of a PD controller and a PI controller

Gc(s) can also be expressed as

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-32
Dynamic Systems and Control, Chapter 5: PID control

Various of PID control

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-33
Dynamic Systems and Control, Chapter 5: PID control

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-34
Dynamic Systems and Control, Chapter 5: PID control

Design Procedure

1. From the requirements figure out the desired pole


location to meet transient response specifications.
2. Design the PD controller.
3. Check validity of the design by simulation.
4. Design PI controller to yield steady state error
performance.
5. Combine PD and PI to obtain K1;K2;K3.

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-35
Dynamic Systems and Control, Chapter 5: PID control

PID Controller: Example

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-36
Dynamic Systems and Control, Chapter 5: PID control

PID Controller: Example

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-37
Dynamic Systems and Control, Chapter 5: PID control

PID Controller: Example

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-38
Dynamic Systems and Control, Chapter 5: PID control

PID Controller: Example

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-39
Dynamic Systems and Control, Chapter 5: PID control

Consider a control system with a type 0 process and a PID


controller. Design the controller parameters so that the
following specifications are satisfied
Ramp-error constant Kv = 100
Rise time tr < 0.01 sec
Maximum overshoot < 2%

© 2015 Quoc Chi Nguyen, Head of Control & Automation Laboratory, nqchi@hcmut.edu.vn 5-40

You might also like