Peng Pros
Peng Pros
Control
Hadiyanto
E: hady.hadiyanto [at]gmail.com
Introduction
What is the purpose of a control system?
To maintain important process characteristics at desired targets despite
the effects of external perturbations.
Plant
Perturbations
Market
Economy
Climate
Upsets...
Processing
objectives
Safety
Make $$$
Environment...
Control
2
T>>>
Disturbance
variables(d)
Manipulated
variables (u)
Process
Set point
(ysp)
Controlled
variables (y)
Control Nomenclature
Identification of all process variables
o Inputs
o Outputs
(affect process)
(result of process)
Inputs
o Disturbance variables
Variables affecting process that are due to external forces
o Manipulated variables
Things that we can directly affect
Controlled variable:
Manipulated variable:
Actuator:
Sensor:
o Drivers eyes
Controller:
o Driver
Disturbance:
o Curve in road
Curve in road
Where the
driver
+
wants to go -
Drivers
brain
Signal
from eyes
to brain
Steering
wheel
Drivers
eyes
Driving
a car
Current
location on
road
Transfer Function
INPUT
Hubungan Input-Output
dinyatakan dalam suatu Fungsi
Transfer
OUPU
T
INPUT
G
OUPU
T
Transfer Function
The transfer function is a model, based on,
Laplace transform of output variable y(t),
divided by the Laplace transform of the input
variable x(t) with all initial conditions being
equal to zero.
Y(s)
U(s)
G(s)
Y (s)
G (s)
U (s)
Transfer Functions
Defined as G(s) = Y(s)/U(s)
Represents a normalized model of a process, i.e.,
can be used with any input.
Y(s) and U(s) are both written in deviation variable
form.
The form of the transfer function indicates the
dynamic behavior of the process.
Fout
(-r)=kC
Laplace Transform
Transform from t domain to frequency (s) domain
L( f (t )) f ( s )
f (t )e st dt
Example:
f (t ) C ,
C
L( f (t )) f ( s ) Ce st dt e st
s
0
f (t )
C
s
df (t )
,
dt
L( f (t )) f ( s )
df (t ) st
e dt sf ( s ) f (t ) t 0
dt
Linearization
Function of one variable
F
F ( x ) F ( xs )
x
1 2F
( x xs )
2! x 2
xs
( x xs ) 2 ...
xs
F
( x1 x1s )
x2
x1, s , x 2 s
1 2F
( x2 x2 s )
2! x12
x1, s , x 2 s
1 2F
( x1 xs )
2! x22
( x2 xs ) 2 .....
x1, s , x 2 s
x1, s, x 2 s
Linearization
F ( x) x
1/ 2
F ( x)
xs1/ 2
F ( x) (1.5x 3)
2
1 1/ 2
xs
( x xs )
2
Fout
(-r)=kC^2
F2
T1
T2
Derivation of a Transfer
Function
dT
M
F1 T1 F2 T2 ( F1 F2 ) T
dt
T T T0
T1 T1 T0
T2 T2 T0
dT
M
F1 T1 F2 T2 ( F1 F2 )T
dt
Dynamic model
of CST thermal
mixer
Apply deviation
variables
Equation in
terms of
deviation
variables.
Derivation of a Transfer
Function
F1 T1 ( s ) F2 T2 ( s )
T (s)
M s F1 F2
Apply Laplace
transform to each
term considering that
only inlet and outlet
temperatures change.
Determine the transfer
T ( s)
F
G ( s)
T2 (s)
M s F1 F2 Note that the
response is first order.
1
Gtot (s) G1 G2
Y (t ) Kp.U (1 et / )
Y(s)
G(s)
Kp
Gain constant
Kp
Y ( s)
G( s)
U ( s) s 1
Time constant
time
d Y
dt 2
CA0
dY
2
Y Kp.U (t )
t
r=kCA
CA1
Y (s)
Kp
G(s)
2 2
U ( s) s 2 s 1
Damping factor
V1
CA2
V2
Block diagram
X(s)
Y(s)
X1(s)
Y(s)
G(s)
X2(s)
G(s)
X1(s)
X3(s)
X1(s)
Y1(s)
G(s)
X2(s)
X1(s)
Y2(s)
X3(s)
X2(s)
Exercise
X0
X1
X2
G1
G2
X2
X0
X1
G1
G1
X0
X3
G2
G2
X2
Combining Transfer
Functions
Manipulated
variable
Controlled
variable
Disturbance
ysp
Gc
Gv
Gp
y
Gm
Ex: FF Controller
D(s)
Gff(s)
Gds(s)
Gd(s)
Cff(s)
Ga(s)
Gp(s)
+
+
Y(s)
Combined FF and FB
Control
Cff (s)
D(s)
Gff(s)
Gd(s)
Ysp(s)
+-
Gc(s)
Cfb(s)
++
Gp(s)
++
Y(s)
Response
Process dynamics
Given a dynamic model of the process, it
investigates the process response to various input
changes
u (t )
u (t )
Step input
Pulse input
0
0
time
time
Type of input(u)
Unit step
Unit sinus
u(s)=w/(s2w2)
u(s)=u/s
u
Unit impulse
t
u(s)=d
u
t
First-order systems
Time-domain model
Laplace-domain model
( Dividing by a0 )
dy
P
y K P u (t )
dt
KP
U ( s )
Y ( s )
Ps 1
KP
G (s)
Ps 1
output,y
input,u
The time-domain
response is:
y (t ) AK P 1
A 45 time
It takes
constants for the
process to reach the
newtime
steady state
KP
y ss ,new y ss ,ref
unew uref
(output )
(input ) steady state
y (t ) AK P (1 e t / P )
The gain is a
dimensional figure
output, y
time
First order
U(s)
Y (t ) Kp.U (1 et / )
Y(s)
G(s)
Kp
Gain constant
Kp
Y ( s)
G( s)
U ( s) s 1
Time constant
time
Process Variable
55
50
45
Manipulated Variable
55
50
45
0
500
1000
1500
Time
Gain (K) = 1.51, Time Constant (T1) = 169.6
SSE: 32.88
Second-order systems
Time-domain representation:
d2 y
dy
a2 2 a1
a0 y bu (t )
dt
dt
CA0
2
d
y
dy
2
2
y Ku (t )
2
dt
dt
Laplace-domain representation:
Y (s)
K
2 2
U ( s ) s 2s 1
Y (s)
K
U ( s ) ( 1s 1)( 2 s 1)
r=kCA
CA1
V1
K = process gain
= natural period
= damping
coefficient
CA
V2
>1:
<0:
unstable system
(the oscillation amplitude grows indefinitely)
Second order
controlled variable
1.4
1.2
1.0
0.8
0.6
0.4
desired value
0.2
0.0
0
10
15
time units
20
25
30
Second order
Performance assessment
t = rise time
r
1.4
ts = settling time
1.2
normalized controlled variable
1.05
1.0
0.95
0.8
0.6
a /b = overshoot
b
c /a = decay ratio
0.4
P = period of oscillation
0.2
0.0
0
t
r
5
p
10
15
s
time units
20
25
30
A good decay
ratio is 1/4
(quarter
amplitude
decay)
Try me..
ME322
Module 3, Slide 50
Peter
A. Lin
Copyri
ght
2001-
Type of input(u)
Unit step
Unit sinus
u(s)=w/(s2w2)
u(s)=u/s
Unit impulse
u(s)=d
u
t
First order
Second order
Second order
Feedback Concept
FB v FF
FB vs FF
FB vs FF
Case of HE
Ratio Control
Method
General Feedback
Control Loop
D(s)
Gd(s)
Ysp(s)
E(s)
+-
C(s)
Gc(s)
Ys(s)
Ga(s)
Gs(s)
U(s)
Gp(s)
+
+
Y(s)
G p ( s ) Ga ( s ) Gc ( s )
Y ( s)
Ysp ( s ) G p ( s ) Ga ( s ) Gc ( s ) Gs ( s ) 1
Gd ( s)
Y ( s)
D( s) G p ( s) Ga ( s) Gc ( s) Gs ( s) 1
Servo , d=0,
Regulator , ysp=0,
Characteristic Equation
Since setpoint tracking and disturbance
rejection have the same denominator for
their closed loop transfer functions, this
indicates that both setpoint tracking and
disturbance rejection have the same
general dynamic behavior.
The roots of the denominator determine the
dynamic characteristics of the closed loop
process.
The characteristic equation is given by:
PID Control
Algorithm
Integral
Derivative
Proportional
1
de(t )
c(t ) c0 K c e(t ) e(t )dt D
I 0
dt
C ( s)
1
Gc ( s )
K c 1
D s
E ( s)
Is
Definition of Terms
e(t)- the error from setpoint [e(t)=ysp-ys].
Kc- the controller gain is a tuning parameter and
largely determines the controller aggressiveness.
I- the reset time is a tuning parameter and
determines the amount of integral action.
D- the derivative time is a tuning parameter
and determines the amount of derivative action.
Proportional Control
P Control
Example,
c(t ) c0 K c e(t )
Gc ( s ) K c
Properties of
Proportional Action
c(t ) c0 K c e(t )
Gc ( s ) K c
Kc K p
Y (s)
Ysp ( s )
Kc K p 1
Kc K p 1
s 1
kc
Effect P on
nd
2
order
Integral Control
Properties of Integral
Action
c(t ) c0
Kc
e(t ) dt
Based on applying
an I-only controller
Y ( s)
1
to a first order
I p 2
I
Ysp ( s )
s
s 1
process
Kc K p
Kc K p
Properties of I
I p
p
control
I
Kc K p
1
I
2 p Kc K p
o Offset is eliminated
o Increases the order
by 1
o As integral action is
increased, the
process becomes
faster, but at the
Integral Action
The primary benefit of integral action is that it
removes offset from setpoint.
In addition, for a PI controller all the steady-state
change in the controller output results from
integral action.
Process with a PI
Controller
Kc 2
I 10
Kp 1
Characteristic Equation :
1
2
1 0
10 s
5s 1
Rearrangin g
25s 15s 1 0
p 5
1.5
2
p 5
1
2
25s 20s 1
Rearrangin g
1
1 0
25s 20s 2 s 1 0
3
Figure 8.9. PI control: (a) effect of integral time (b) effect of controller
gain.
Derivative Control
Properties of Derivative
Action
de(t )
c(t ) c0 K c D
dt
K c K p D s
Y (s)
2 2
Ysp ( s ) p s (2 p K c K p D )s 1
Response of a PID
Controller
ysp
ys
cder
Time
Derivative Action
The primary benefit of derivative action is that it
reduces the oscillatory nature of the closed-loop
response.
Composite Control
PI
PD
PID
Effect PI
A proportional controller (Kp) will have the effect of reducing the rise time and
will reduce, but never eliminate, the steady-state error.
An integral control (Ki) will have the effect of eliminating the steady-state error,
but it may make the transient response worse.
A derivative control (Kd) will have the effect of increasing the stability of the
system, reducing the overshoot, and improving the transient response.
Proportional Control
By only employing proportional control, a steady state error occurs.
CL RESPONSE
RISE TIME
OVERSHOOT
SETTLING TIME
S-S ERROR
Kc
Decrease
(++)
Increase
(--)
Small Change
(+/-)
Decrease
(+)
Ki
Decrease
(++)
Increase
(--)
Increase
(--)
Eliminate
(++)
Kd
Small Change
(+/-)
Decrease
(++)
Decrease
(++)
Small Change
(+/-)
1.
2.
3.
4.
5.
Adjust each of Kp, Ki, and Kd until you obtain a desired overall
response.
Lastly, please keep in mind that you do not need to implement all three
controllers (proportional, derivative, and integral) into a single system, if
not necessary. For example, if a PI controller gives a good enough
response (like the above example), then you don't need to implement
derivative controller to the system. Keep the controller as simple as
possible.
Proportional Band
100%
PB
Kc
Another way to express the controller
gain.
Kc in this formula is dimensionless. That is,
the controller output is scaled 0-100% and
the error from setpoint is scaled 0-100%.
In more frequent use 10-15 years ago, but
it still appears as an option on DCSs.
Conversion from PB to
Kc
Proportional band is equal to 200%.
The range of the error from setpoint is 200
psi.
The controller output range is 0 to 100%.
100% 100%
K
0.5
PB
200%
100%
K c 0.5
0.25 % / psi
200 psi
D
c
Conversion from Kc to
PB
Controller gain is equal to 15 %/F
The range of the error from setpoint is 25
F.
The controller output range is 0 to 100%.
15% 25 F
K
3.75
F 100%
100%
PB
26.7%
3.75
D
c
G( s )
1
2
s 10s 20
num=1;
den=[1 10 20];
step(num,den)
MATLAB Example
Kp
T( s )
s 10 s ( 20 Kp )
Step Response
From: U(1)
1.4
Kp=300;
1.2
Step Response
From: U(1)
1
num=[Kp];
step(num,den,t)
0.8
0.7
0.6
0.4
K=300
0.2
0.6
To: Y(1)
To: Y(1)
0.8
Amplitude
t=0:0.01:2;
0.9
Amplitude
den=[1 10 20+Kp];
0.5
K=100
0.4
0.3
0
0
0.2
0.4
0.6
0.8
1.2
1.4
1.6
1.8
0.2
Time (sec.)
0.1
0
0
0.2
0.4
0.6
0.8
Time (sec.)
1.2
1.4
1.6
1.8
Kd s Kp
T( s )
s ( 10 Kd ) s ( 20 Kp )
Step Response
From: U(1)
1.4
1.2
Kp=300;
Step Response
From: U(1)
t=0:0.01:2;
0.9
0.6
0.8
0.7
0.4
Kd=10
0.2
0.6
To: Y(1)
0.8
Amplitude
num=[Kd Kp];
To: Y(1)
Kd=10;
Amplitude
0.5
0.4
0
0
0.2
0.4
0.6
0.8
Time (sec.)
1.2
1.4
1.6
1.8
0.3
Kd=20
0.2
step(num,den,t)
0.1
0
0
0.2
0.4
0.6
0.8
Time (sec.)
1.2
1.4
1.6
1.8
MATLAB Example
Kp s Ki
T( s )
s 10 s ( 20 Kp ) s Ki
Step Response
From: U(1)
1.4
Kp=30;
1.2
Step Response
From: U(1)
1.4
1.2
0.8
Ki=70
0.4
To: Y(1)
0.6
Amplitude
num=[Kp Ki];
To: Y(1)
Ki=70;
Amplitude
0.8
0.6
0.2
0.4
t=0:0.01:2;
step(num,den,t)
0
0
0.2
0.4
0.6
0.8
Time (sec.)
1.2
1.4
1.6
1.8
Ki=100
2
0.2
0
0
0.2
0.4
0.6
0.8
Time (sec.)
1.2
1.4
1.6
1.8
Assignment
Stability