IntroductiontoPIDControllerDesignwith examples in MATLAB and Simulink
RameshKomarasami
16 views
14 slides
Jun 28, 2024
Slide 1 of 14
1
2
3
4
5
6
7
8
9
10
11
12
13
14
About This Presentation
Key idea is to shape first- or second-order “dominant” plant dynamics. That is, you can ignore fast poles in the model.
Find a first- or second-order model, P(s), that has a similar response as the original model, Po(s). For example, you can use step(P, Po) or bode(P, Po) to compare responses...
Key idea is to shape first- or second-order “dominant” plant dynamics. That is, you can ignore fast poles in the model.
Find a first- or second-order model, P(s), that has a similar response as the original model, Po(s). For example, you can use step(P, Po) or bode(P, Po) to compare responses. Similar poles and zeros can be ignored to simplify the model.
2
® ®
What is a PID Controller?
A special type of controller C(s) with
Proportional
Integral
Derivative
terms acting on the error signal E(s).Step
P(s)
Process Model
Plant Output
C(s)
PID Controller
U(s)R(s) E(s) Y(s)
3
® ®
What is a PID Controller? (cont.)
Ideal (standard) form:
Series (cascade) form:
Main point is:any second-order controller of the form
is a PID controller.)(
1
)( sE
s
sK
s
K
KsU
D
DI
P
)(
1
11)( sE
sD
sD
s
I
KsU
SS
SS
S
12
01
2
2
)(
dsds
nsnsn
sC
4
® ®
PID Controllers Are Everywhere…
More than 90% of all controllers
used in process industries are
PID controllers.
A typical chemical plant has
100s or more PID controllers.
PID controllers are widely used
in:
Chemical plants
Oil refineries
Pharmaceutical industries
Food industries
Paper mills
Electronic equipments
5
® ®
Some History: Fluid Level Control
and at steady state: in flow
:cross-sectional area
: liquid level
in
q
A
h ()
( ) ( )
Gs
k
A
k
A
Y s R s
s
Process Dynamics
1/A
s
Gain
k
Desired liquid level Actual level
r(t) error q_in(t)
h(t)=y(t)h(t)=y(t) (0) 1G 1
in
in
A dh q dt
hq
A
6
® ®
More History: Flyball Governor in Steam
Engines
Proportional control
Speed control for engines used
proportional control. See the
flyball governor by James Watt
in 1788.d
Jw bw T T w(t)
speedSet point - Desired Speed Gain
k
Engine Dynamics
1
J.s+b
Disturbance torque
r(t) error T(t)
Td(t) :inertia
:friction coefficient
: disturbance torque
d
J
b
T
7
® ®
Many Types of “PID” Controllers…
Proportional (P):
Integral (I):
Proportional + Integral (PI):
Proportional + Derivative (PD):
You might see other combinations with different
parameters than Kp, Ki, and Kd.)()( sEKsU
P )()( sE
s
K
sU
I
)()( sE
s
K
KsU
I
P
)(
1
)( sE
s
sK
KsU
D
D
P
8
® ®
Low-Order Process Models
Many industrial processes can be modeled using simple
stabletransfer functions.
First-order process with delay:
Second-order process with delay:
There are many variations of these models, with or
without time delays, with transfer functions zeros, ...
We can design PI/PID controllers based on these models.1
)(
0
0
0
s
eK
sP
s
2
000
2
0
2
)(
0
ss
eK
sP
s
9
® ®
Desirable first-order responses with a
tuning parameter K
Remember the open-looptransfer function is given by
Design your PID controller so that L(s) looks like
Then the closed-looptransfer function will look like)()()( sCsPsL s
K
sL)( 1)/(
1
)(1
)(
)(
KsKs
K
sL
sL
sT Step
P(s)
Process Model
Plant Output
C(s)
PID Controller
U(s)R(s) E(s) Y(s)
10
® ®
Designing a PI controller for a first-order
process model
PI controller for a first-order process model
Remember, given K, we want:
Our PI parameters:
Let’s put this in MATLAB and Simulink…s
K
KsC
s
K
sP
I
P
)( and
1
)(
0
0
00
0
and
K
K
K
K
K
K
IP
s
K
sCsPsL )()()(
11
® ®
Desirable second-order responses with
tuning parameters K and α
Design your PID controller so that L(s) looks like
Then the closed-looptransfer function will look like
K and αare our design parameters.1)/1()/(
1
)(1
)(
)(
22
sKsKKss
K
sL
sL
sT
Step
P(s)
Process Model
Plant Output
C(s)
PID Controller
U(s)R(s) E(s) Y(s) )1(
)()()(
ss
K
sCsPsL
12
® ®
Designing a PID controller for a second-
order process model
PID controller for a second-order process model
Remember, given K and α, we want:
Let’s put this in MATLAB and Simulink…1
)( and
2
)(
2
000
2
0
s
sK
s
K
KsC
ss
K
sP
D
DI
P
)1(
)()()(
ss
K
sCsPsL
DDIP
K
K
K
K
K
K
K
K
K , 2-1 , , 2
2
0
2
00
00
2
02
000
0
13
® ®
MATLAB and Simulink Helper
MATLAB commands
useful for control
design:
•P = tf(num, den)
•C = zpk(z, p, K)
•L = minreal(P*C)
•K = dcgain(P)
•T = feedback(L,1)
•bode(P,L), step(T)
•sisotool(P)
Simulink blocks useful
for control design:
•Transfer Fcn
•Zero-Pole
•Integrator
•Gain, Sum
•Transport Delay (time
delay)
•PID Controller
14
® ®
Exam Question (10 points)
How to design PI/PID controllers for higher-order plants?
Key idea is to shape first-or second-order “dominant” plant
dynamics. That is, you can ignore fast polesin the model.
Find a first-or second-order model, P(s), that has a similar
responseas the original model, Po(s). For example, you can use
step(P, Po) or bode(P, Po) to compare responses. Similar poles
and zeroscan be ignored to simplify the model.
Question: Design a PI controller, using the technique of
slides 9 & 10, for the plant
Can you get a closed-loop settling time less than 50 sec?20
)1.01)(1)(201(
)151(2
)(
sss
s
sP