You are on page 1of 112

Process Dynamic and

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 Processing
Perturbations objectives

Market
Economy
Climate Safety
Upsets... Make $$$
Environment...

Control
2
T>>>
General representation of a control problem

Disturbance Set point


variables(d) (ysp)

Manipulated
variables (u)

Process Controlled
variables (y)

INPUT: (u) Something that you can manipulate


DISTURBANCE: (d) Something that comes as a result of some outside
phenomenon
OUTPUT: (y) An observable quantity that we want to regulate
Control Nomenclature
Identification of all process variables

o Inputs (affect process)


o Outputs (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

5
Driving a Car: An Everyday Example of Process Control

Control Objective
(Setpoint):
o Maintain car in proper lane
Controlled variable:
o Location on the road
Manipulated variable:
o Orientation of the front wheels
Actuator:
o Drivers steering wheel
Sensor:
o Drivers eyes
Controller:
o Driver
Disturbance:
o Curve in road
Schematic of Feedback Loop
Car example

Curve in road

Where the
driver Drivers Steering Driving
+
wants to go - brain wheel a car Current
location on
road

Signal Drivers
from eyes eyes
to brain
Transfer Function
INPUT Input : Fo, D, ZF, XD
Output : F, CA

Hubungan Input-Output
dinyatakan dalam suatu Fungsi
Transfer

OUPU
T

G
INPUT 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.
U(s) Y(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.
How to derive a transfer function?
Reactor CSTR with
reaction
1. Derive a dynamic equation
2. Check linear or not linear!!, if it is
a non linear, do linearization
3. Derive the steady state equation,
Fin dC/dt=0, CCs
4. Form a deviation state by
Cin
substraction of dynamic eq with
steady equation:
C= C-Cs
5. Do Laplace for deviation state
Fout
equation( Nr 4)
V 6. Transfer function is output
C variable (C ) divided by input
variable (Cin) in the laplace form
(-r)=kC
Laplace Transform
Transform from t domain to frequency (s) domain

L( f (t )) f ( s ) f (t )e st dt
0

Example:
f (t ) C ,

C C
L( f (t )) f ( s ) Ce st dt e st
0 s s
0

df (t )
f (t ) ,
dt

df (t ) st
L( f (t )) f ( s ) e dt sf ( s ) f (t ) t 0
0 dt
Linearization
Function of one variable
F 1 2F
F ( x ) F ( xs ) ( x xs ) ( x xs ) 2 ...
x xs 2! x 2
xs

Function of two variables

F F 1 2F 1 2F
F ( x1, x2 ) F ( x1, s , x2 , s) ( x1 x1s ) ( x2 x2 s ) ( x1 xs )
2
( x2 xs ) 2 .....
x1 x1, s , x 2 s
x2 x1, s , x 2 s
2! x12 2! x22
x1, s , x 2 s x1, s, x 2 s
Linearization
1 1/ 2
F ( x) x
1/ 2
F ( x) xs1/ 2 xs ( x xs )
2

F ( x) (1.5x 3) 2
Reactor CSTR with
reaction

Fin

Cin
Derive its transfer function !!!

Fout
V
C

(-r)=kC^2
Reactor Thermal mixer

F1 F2

T1 T2
Derive its transfer function !!!

F
V
T
Derivation of a Transfer
Function
dT Dynamic model
M F1 T1 F2 T2 ( F1 F2 ) T
dt of CST thermal
mixer

Apply deviation
variables
T T T0 T1 T1 T0 T2 T2 T0
Equation in
terms of
dT deviation
M F1 T1 F2 T2 ( F1 F2 )T variables.
dt
Derivation of a Transfer
Function
F1 T1 ( s ) F2 T2 ( s ) Apply Laplace
T (s)
M s F1 F2 transform to each
term considering that
only inlet and outlet
temperatures change.
G ( s)
T ( s)

F Determine the transfer
function for the effect
1
1
T ( s)
1 M s F F 1 2

of inlet temperature
changes on the outlet
G2 ( s)
T (s)

F2 temperature.
T2 (s) M s F1 F2 Note that the
response is first order.
Gtot (s) G1 G2
First order Transfer
Function
dY
Y KpU
. (t ) Y (t ) Kp.U (1 et / )
dt

U(s) Y(s)

G(s) Kp

Gain constant

Y ( s) Kp
G( s)
U ( s) s 1 time

Time constant
Second order transfer
function
CA0
2
d Y dY
2 Y Kp.U (t )
dt 2 t r=kCA
CA1

Y (s) Kp
G(s) 2 2
U ( s) s 2 s 1 V1
CA2

Damping factor
V2
Block diagram
Y(s) X1(s)
X(s)
G(s) Y(s)
G(s)
X2(s)
X1(s)

X3(s) X1(s)
Y1(s)
X2(s) G(s)

Y2(s)
X1(s) X3(s)

X2(s)
Exercise

X1 X2
X0
G1 G2

X2
X0
X1
G1
G1

X0 X3
G2

G2 X2
Combining Transfer
Functions
Ex: Feedback Loop

Error Manipulated
variable

Controlled
variable
Disturbance

ysp e c u
+ 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
D(s)
Cff (s)
Gff(s)

Gd(s)

Ysp(s)
++ ++
Cfb(s) Y(s)
+- Gc(s) Gp(s)
Response
Process dynamics
Given a dynamic model of the process, it
investigates the process response to various input
changes

Two elements are necessary:

a dynamic model of the process


a known forcing function

A A

u (t ) Step input u (t ) Pulse input

0 0

0 time 0 b time
Type of input(u)
Unit step Unit sinus
u(s)=w/(s2w2)
u u(s)=u/s u

t t
Unit impulse

u u(s)=d

t
First-order systems

Time-domain model Laplace-domain model

( Dividing by a0 )

dy KP
P y K P u (t ) Y ( s ) U ( s )
dt Ps 1
KP is the process steady state gain (it can be >0 or <0)

P is the process time constant (it is always >0)

KP
Transfer function of a first-order system: G (s)
Ps 1
Response of first-order systems
We only consider the response to a step forcing
output,y
function of amplitude A
AKP
0.632 AKP
The time-domain
P response is:
0

y (t ) AK P 1

input,u

A 45 time
It takes
constants for the
process to reach the
0
newtime
steady state
Determining the process gain
An open-loop test can be performed starting from
the reference steady state:
step the input to the process
record the time profile of the measured output until a new steady state is
approached
check if this profile resembles
if so, calculate KP as:
y (t ) AK P (1 e t / P )
y ss ,new y ss ,ref (output )
KP
unew uref (input ) steady state The gain is a
dimensional figure

The process gain can be determined from


steady state information only
Determining the time constant
From the same open-loop test:
determine P graphically (note: it has the dimension of time)


You need dynamic
information to
determine the process
output, y

time constant
AKP

0.632 AKP Determining the values


of KP and P from
process data is known as

process identification
0 time
First order
First order Transfer
Function
dY
Y KpU
. (t ) Y (t ) Kp.U (1 et / )
dt

U(s) Y(s)
G(s) Kp

Gain constant

Y ( s) Kp
G( s)
U ( s) s 1 time

Time constant
Fitting a first-order model to plant data
Process: white line Model: yellow line
Model: First Order File Name: fit_FO.txt

55
Process Variable

50

45

55
Manipulated Variable

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
2 y Ku (t ) r=kCA
dt dt CA1

Laplace-domain representation:
V1 CA
Y (s) K
2 2
U ( s ) s 2s 1 K = process gain
= natural period V2
Y (s) K
= damping
U ( s ) ( 1s 1)( 2 s 1) coefficient
Effect of the damping coefficient
The value of completely determines the degree of
oscillation in a process response after a perturbation

>1: overdamped, sluggish response


0 < < 1 : underdamped, oscillating response
(the damping is attenuated as decreases)
<0: unstable system
(the oscillation amplitude grows indefinitely)
Second order
The importance of 2nd-order systems
Control systems are often designed so that the
controlled (i.e., closed-loop) process responds as an
underdamped second-order system

actual trajectory
1.4
1.2
controlled variable

1.0

0.8
0.6
0.4
0.2 desired value

0.0

0 5 10 15 20 25 30
time units
Second order
Performance assessment
t = rise time r

P (set-point tracking problem) tp = time to first peak


1.4
ts = settling time
1.2
a
normalized controlled variable

1.05
1.0 c A good decay
0.95
ratio is 1/4
0.8 (quarter
amplitude
0.6 decay)
a /b = overshoot
b
0.4 c /a = decay ratio
0.2
P = period of oscillation

0.0
0 t t 5 10 t 15 20 25 30
r p s
time units
Try me..

Peter
A. Lin
Copyri
Northern Illinois University ME322
ght
Summer 2005 Module 3, Slide 50
2001-
Type of input(u)
Unit step Unit sinus
u(s)=w/(s2w2)
u u(s)=u/s u

t t
Unit impulse

u u(s)=d

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) U(s) Y(s)


+
+- Gc(s) Ga(s) Gp(s) +

Ys(s)
Gs(s)
Closed Loop Transfer Functions
From the general feedback control loop and
using the properties of transfer functions, the
following expressions can be derived:

Y ( s) G p ( s ) Ga ( s ) Gc ( s )

Ysp ( s ) G p ( s ) Ga ( s ) Gc ( s ) Gs ( s ) 1

Y ( s) Gd ( 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:

G p (s) Ga (s) Gc (s) Gs (s) 1 0


PID Control
Proportional
Algorithm
Integral Derivative

1
t
de(t )
c(t ) c0 K c e(t ) e(t )dt D
I 0 dt
where e(t ) ysp ys (t )

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
c(t ) c0 K c e(t )
P Control Gc ( s ) K c
Example,
Properties of
Proportional Action
c(t ) c0 K c e(t )
Gc ( s ) K c
Kc K p Closed loop transfer
Kc K p 1 function base on a P-
Y (s)
only controller applied
Ysp ( s ) p to a first order process.
s 1
Kc K p 1 Properties of P control
o Does not change order of
process
o Closed loop time
constant is smaller than
open loop p
Effect P to first order
Effect of controller gain . kc

Figure 8.8. Process response with proportional


control.
Increasing the controller gain.
less sluggish process response.
Too large controller gain.
undesirable degree of oscillation or even
unstable response.
An intermediate value of the controller gain
best control result.
Effect P on 2nd order
Integral Control
Properties of Integral
Action
Kc t
c(t ) c0
I
0
e(t ) dt
Based on applying
Y ( s) 1 an I-only controller

Ysp ( s ) I p 2 I to a first order
s s 1 process
Kc K p Kc K p
I p
Properties of I
p control
Kc K p
o Offset is eliminated
1 I o Increases the order

2 p Kc K p 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.
Proportional Action for the
Response of a PI Controller
Process with a PI
Controller

Kc 2 I 10 Kp 1 p 5
Characteristic Equation :
1 2
2 1 0
5s 1 10 s
Rearrangin g
25s 15s 1 0
2


p 5 1.5
Applied to a Second Order
Process
K c 1; I 1; K p 1; p 5; 2
Characteristic Equation :
1 1
1 1 0
25s 20s 1 s
2

Rearrangin g
25s 20s 2 s 1 0
3 2

p1 0.764 and a second order


response with p 4.37 and 0.08
Effect of integral time . I

Figure 8.9. PI control: (a) effect of integral time (b) effect of controller
gain.
Increasing the integral time.
more conservative(sluggish) process response.
Too large integral time.
too long time to reach to the set point after load
upset or set-point change occurs.
Theoretically, offset will be eliminated for all values
of . I
Derivative Control
Properties of Derivative
Action
de(t )
c(t ) c0 K c D
dt
Y (s) K c K p D s
2 2
Ysp ( s ) p s (2 p K c K p D )s 1

Closed loop transfer function for


derivative-only control applied to a
second order process.
Properties of derivative control:
o Does not change the order of the process
o Does not eliminate offset
o Reduces the oscillatory nature of the feedback response
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.
Effect of derivative time . D

Figure 8.10. PID control: effect of derivative


Increasing time.
the derivative time.
improved response by reducing the maximum
deviation, response time and the degree of oscillation.
Too large derivative time.
measurement noise tends to be amplified and the
response may be oscillatory.
D is desirable.
Intermediate value of
Composite Control
PI
PD
PID
Effect PI
Typical Response of Feedback Control Systems

Figure 8.7. Typical process response with feedback


control.
No feedback C iscontrol makefrom
the deviation the the
process
initial slowly reach a
steady-state.
new steady-state.
Proportional control speeds up the process response
and reduces the offset.
Integral control eliminates offset but tends to make the
response oscillatory.
Derivative control reduces both the degree of
oscillation and response time.
The Characteristics of P, I, and D controllers

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.

Proportional and Integral Control


The response becomes more oscillatory and needs longer to settle, the
error disappears.

Proportional, Integral and Derivative Control


All design specifications can be reached.
The Characteristics of P, I, and D controllers

CL RESPONSE RISE TIME OVERSHOOT SETTLING TIME S-S ERROR

Decrease Increase Small Change Decrease


Kc
(++) (--) (+/-) (+)

Decrease Increase Increase Eliminate


Ki
(++) (--) (--) (++)

Small Change Decrease Decrease Small Change


Kd
(+/-) (++) (++) (+/-)
Tips for Designing a PID Controller

1. Obtain an open-loop response and determine what needs to be


improved
2. Add a proportional control to improve the rise time
3. Add a derivative control to improve the overshoot
4. Add an integral control to eliminate the steady-state error
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
D
c 0.5
PB 200%
100%
K c 0.5 0.25 % / psi
200 psi
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
D
c 3.75
F 100%
100%
PB 26.7%
3.75
Open-Loop Control - Example

1
G( s )
2
s 10s 20

num=1;
den=[1 10 20];
step(num,den)
Proportional Control - Example

The proportional controller (Kp) reduces the rise time, increases the overshoot,
and reduces the steady-state error.

MATLAB Example
Kp
T( s )
2
s 10 s ( 20 Kp )
Step Response
From: U(1)
1.4

Kp=300; 1.2 Step Response


From: U(1)
1

num=[Kp]; 1
0.9
Amplitude

0.8 0.8
den=[1 10 20+Kp];
To: Y(1)

0.7
0.6

0.6
t=0:0.01:2;
Amplitude

To: Y(1)
0.4
0.5

step(num,den,t) 0.2
K=300 0.4 K=100
0.3
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
0.2
Time (sec.)
0.1

0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

Time (sec.)
Proportional - Derivative - Example

The derivative controller (Kd) reduces both the overshoot and the settling time.

MATLAB Example

Kd s Kp
T( s )
2
s ( 10 Kd ) s ( 20 Kp )
Step Response
From: U(1)
1.4

1.2

Kp=300; 1 Step Response


From: U(1)
1
Amplitude

Kd=10; 0.8
To: Y(1)

0.9

0.6 0.8

num=[Kd Kp]; 0.4


0.7

Kd=10 0.6

Amplitude
den=[1 10+Kd 20+Kp];
To: Y(1)
0.2 0.5

0.4
0

t=0:0.01:2; 0 0.2 0.4 0.6 0.8 1

Time (sec.)
1.2 1.4 1.6 1.8
0.3
2

0.2
Kd=20
step(num,den,t) 0.1

0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

Time (sec.)
Proportional - Integral - Example

The integral controller (Ki) decreases the rise time, increases both the overshoot
and the settling time, and eliminates the steady-state error

MATLAB Example
Kp s Ki
T( s )
3 2
s 10 s ( 20 Kp ) s Ki
Step Response
From: U(1)
1.4

Kp=30;
1.2
Step Response
From: U(1)
1 1.4

Ki=70; 1.2
Amplitude

0.8
To: Y(1)

1
0.6

num=[Kp Ki];
Ki=70
Amplitude
0.8

To: Y(1)
0.4

den=[1 10 20+Kp Ki]; 0.2


0.6

0.4
0

t=0:0.01:2; 0 0.2 0.4 0.6 0.8 1

Time (sec.)
1.2 1.4 1.6 1.8
0.2
2

Ki=100
step(num,den,t) 0
0 0.2 0.4 0.6 0.8 1

Time (sec.)
1.2 1.4 1.6 1.8 2
Assignment
Stability

You might also like