Professional Documents
Culture Documents
Controller Design
Controller Design
with oscillatory
Exponential growth
with oscillatory
Fast Exponential
Exponential Decay
growth
Re
Fast Decay
Slow Decay Slow growth
Purdy oscillatory
- controller process
Proportional control
No measurement lags
1
Measuring device
𝐾𝑐
𝑈𝐴
1 𝐾𝑝
KC (
𝑀𝐶𝑝
𝑆+ 1)
Td MC P S UA 𝑈𝐴 (𝜏 𝑆+1) 𝐾𝑝
¿ = =
Tset 1 𝐾𝑐
1+
𝐾𝑝 𝜏 𝑆+ 1+ 𝐾𝑝
1 KC 𝑈𝐴 (𝜏 𝑆+1)
MC P S UA 1+
𝑀𝐶𝑝
( 𝑆 +1)
𝑈𝐴
==
Transfer functions in parallel
X1(S) X2(S)
G1(S)
U1(S)
X1(S)
+
X (S)
Σ
+
G2(S)
U2(S) X2(S)
X2
d(S) GL(S)
e
+ +
∑ ∑
Rs Gc(S) GP(S) C(S)
m X1 +
-
H(S)
Xm
e = Rs – Xm
m = Gc (S) e(s) = Gc e
X1 = H m = Gp Gc e
X = X2+ X1 = GL d + Gp Gc e
Xm = H C = HGL d + Gp Gc e
X = GL d + Gp Gc[Rs – Xm]
= GL d + Gp Gc [Rs] – Gp Gc [Xm]
=GL d + Gp Gc Rs – Gp Gc H C
𝐺𝐿 𝐺𝑝𝐺𝑐
𝐶 ( 𝑠 )= 𝑑 (𝑠)= 𝑅( 𝑠)
1+𝐺𝑝𝐺𝑐𝐻 1+ 𝐺𝑝𝐺𝑐𝐻
Stability of a Closed Loop System
• A closed loop system is stable if and only of the roots
of its characteristic equation :
1+GcGpH(s)=0
Pessen
Little or No Overshoot
http://www.valin.com/sites/default/files/valve-flow2-fig4_1.jpg
Example –Temperature Control of a CSTR
Method of Reaction Curve
Process
output
Maximum slope
△C
D τ
time
Time constant
Dead time
Zeigler-Nichols Approach
John G. Zeigler and Nathaniel B. Nichols are
the fathers of scientific tuning methods
– In 1942, they published two loop tuning
techniques that addressed the question of how an
engineer can determine the values of Kp, Ti, and Td
http://www.jashaw.com/pid/tutorial/pid6.html
Step 7
Record the gain as your ultimate gain (Ku).
Step 8
Record the resulting period as the ultimate period (Pu).
Step 9
Calculate Kp, Ti, and Td using the following table:
Ziegler-Nichols Ultimate Gain Tuning
Find the ultimate gain of the process Ku. The period
of the oscillation is called ultimate period Pu
P only PI PID
I - Pu/1.2 Pu/2
D - - Pu/8
Z-N Continuous Method
Even though this method is frequently used, it has the
following disadvantages:
It can be time consuming if several trials are required and the process
dynamics are slow.
Introducing oscillations into a process is in many cases not desirable.
Will not work for an integrating process.
– Some processes where the streams are comprised of gases, liquids, powders,
slurries and melts do not naturally settle out at a steady state operating level.
Process control practitioners refer to these as non-self regulating, or more
commonly, as integrating processes.
(http://www.controlguru.com/wp/p79.html)
P only PI PID
Kc T/LKp 0.9T/LKp 1.2T/LKp
I n.a. L/0.3 L/0.5
D n.a. n.a. 0.5L
△C
D
△m
Kc= -579.2079
D= 1
τi =3.33
τ =13
k = -0.0202
setpoint
Example
Response
0.165 0.5 s
GP e
2.5s 1
I=D/0.5=1;D=D*0.5=0.25
1.8
1.6
1.4
1.2
0.8
0.6
0.4
0.2
0
0 1 2 3 4 5 6 7 8 9 10
Pessen Tuning Approach
No Overshoot Kc = 0.2 Ku Ti = Pu / 3 Td = Pu / 2
Some Overshoot Kc = 0.33 Ku Ti = Pu / 2 Td = Pu / 3
Measuring Controller Performance
IAE y s y t dt et dt
0 0
ISE y s y t dt et dt
2 2
0 0
ITAE t y s y dt t et dt
0 0
Stability of a Controlled System
Method 1: Direct Substitution
Ga ( s) G p ( s ) GT ( s ) Gc ( s ) 1 0
50 C 1 %TO
GP ( s ) GT ( s )
30 s 1 kg / s 10 s 1 C
0.016 kg / s %C
Gv ( s ) Gc ( s ) K c
3s 1 %CO %TO
Solution
Substituting 1 50 0.016
corresponding 1 Kc 0
TFs 10 s 1 30 s 1 3s 1
3 2
Rearranging 900 s 420s 43s 1 0.8 K c 0
420 w 1 0.80K 0
2
u cu
The real and imaginary parts
have to be each one equal to
zero to make the equation
900 w 43 w 0
3
u u
equal to zero.
%CO
For wu 0 K cu 1.25 ;
%TO
%CO
For wu 0.2186 rad / s K cu 23.8 ;
%TO
Solution
• To determine the correct range, first we need to
determine the sign of the multiplication of the gain
of the process, sensor, and actuator.
• If KpKTKV is (+) then Kc must be +.
• If KpKTKV is (-) then Kc must be -.
• In this case, Kc must be positive, hence Kc = 23.8 is
the only physical sound solution
An Example
+ 1
○
Kc
-
( s 1)( s 2)( s 3)
1. Stability Limit by Direct
Substitution
• At the stability limit (maximum value of Kc
permissible), roots cross over to the RHP. Hence
when Kc=Ku, there are two roots on the imaginary
axis s=±iω
• (s+1)(s+2)(s+3)+Ku=0,
• set s= ±iω, we have (iω+1)(iω+2)(iω+3)+Ku= 0, i.e.
(6+Ku-6ω2)+i(11ω-ω3)=0.
• This can be true only if both real and imaginary parts
vanishes:
• 11ω-ω3=0→ ω= ±√11 ; 6+Ku-6×11=0 →Ku=60
3. Frequency Domain Analysis
Definitions:
• Given a transfer function G(s)=y(s)/x(s); Given
x(t)=Asin(ωt); we have y(t) →Bsin(ωt+ψ)
• We denote Amplitude Ratio=AR(ω) =B/A; Phase
Angle=ψ(ω)
• Both AR and ψ are function of frequency ω; we hence
define AR and ψ is the frequency response of system G(s)
An Example
1
A sin(wt)
s 1s 2s 3 B = sin(wt+f)
Basic Theorem
AR a 2 b 2
tan 1
b / a
Example: First Order System
1
G ( s)
s 1
1 1 i ( ) 1 ( )
G i 2 2
2 2
i 2 2
a ib
i 1 1 1 1
2 2 1
AR a b
1 2 2
b
tan 1 tan 1
a
Note that
lim AR 0
lim 90
Corollary
If G(s)=G1(s)G2(s)G3(s)
Then
AR(G)=AR(G1) AR(G2) AR(G3)
And φ(G)=φ (G1) +φ (G2)+φ (G3)
Example
K1 K2
G ( s) G1 s G2 s
1 1 2 1
K1 K2
AR AR1 AR2
2
1 2
1 2
2
2 1
1 2 tan 1 1 tan 1 2
G(s)=1/(s+1)(s+2)(s+3)
where db=20log10(AR)
Nyquist Plot
Nyquist Stability Criteria
Transfer function:
----------------------
s^3 + 6 s^2 + 11 s + 6
u=3.5
ARu=-38db
-38/20
=10
=0.0162
Ku=1/ARu=80
Example - Continued
1. Ultimate properties Approach:
Ku/1.7=80/1.7=47;
D=Pu/8=0.22
Guidelines for Selecting Direct and Reverse
Acting PID’s
• Consider a direct acting final control element to be
positive and reverse to be negative.
• If the sign of the product of the final control element
and the process gain is positive, use the reverse acting
PID algorithm.
• If the sign of the product is negative, use the direct
acting PID algorithm
• If control signal goes to a control valve with a valve
positioner, the actuator is considered direct acting.
Level Control Example
• Process gain is positive
because when flow in is
increased, the level
F in
LT LC
increases.
• If the final control
L
F out element is direct acting,
use reverse acting PID.
• For reverse acting final
control element, use
direct acting PID.
Level Control Example
• Process gain is negative
because when flow out is
F in increased, the level
LT LC decreases.
L
• If the final control
F out element is direct acting,
use direct acting PID.
• For reverse acting final
control element, use
reverse acting PID.
Integrating Processes
p
1
p
Comparison between PI and PID
for a Low qp/tp Ratio
PI
PID
Time
Comparison between PI and PID
for a High qp/tp Ratio
PI
PID
Time
Analysis of Several Commonly
Encountered Control Loops
• Flow control loops
• Level control loops
• Pressure control loops
• Temperature control loops
• Composition control loops
• DO control loop
• Biomass controller
Flow Control Loop
FC Flow
Setpoint
FT
Air Pressure
Time
Flow Rate
0 20 40 60
Time (seconds)
• A control valve (deadband of ±10-25%) in a flow
control loop or with a positioner typically has a
deadband for the average flow rate of less than
±0.5% due to the high frequency opening and
closing of the valve around the specified flow rate.
Level Control Loop
F in
L sp
F out • Dynamics of the sensor
LC LT and actuator are fast
FT compared to the
process.
• Use P-only controller if it
FC
RSP is an integrating process.
Pressure Control Process
P sp PC
Vent
PT C.W.
x 1 a 11 x1 a 12 x 2 a 1n x n b11 u1 b1m u m
x 2 a 21x1 a 22 x 2 a 2 n x n b 21u1 b 2 m u m
x n a n1x1 a n 2 x 2 a nn x n b n1u1 b nm u m
dVd
b11 F0,d b12 Fd
dt
dC A,d
a21Vd a22C A,d b11 F0,d b12 Fd
dt
dTd
a31Vd a32C A,d a33Td b31 F0,d b32 C A,d b33Tsd
dt
i.e.
Vd 0 0 0 Vd b11 b12 0 F0,d
d a
C a22 0 C A,d b21 b22 b23 Fd AX ( s) BU ( s )
dt
A, d 21
Td a31 a32 a33 Td b31 b32 b33 Ts ,d
Vd F0,d
y 0 0 1 C A, d 0 0 0 Fd CX DU
Td Ts ,d
Td s C ( sI A) 1 B D U ( s )
G p s Tsd s GL s F0,d ( s ) GL ' s Fd s
In an actual system, there are several choices of a set of state variables that
specify the energy stored in a system and therefore adequately describe the
dynamics of the system.
x1 a11 a 12 a 1n x1
b11 b1m u1
d x 2 a 21 a 22 a 2n x 2
dt
b n1 b nm u m
x n a n 1 a n2 a nn x n
The column matrix consisting of the state variables is called the state vector
and is written as
x1
x
x 2
x n
Dorf and Bishop, Modern Control Systems
The vector of input signals is defined as u. Then the system can be
represented by the compact notation of the state differential equation as
x A x B u
The state differential equation relates the rate of change of the state of the
system to the state of the system and the input signals.
The system can be represented by the compact notation of the state differential
equation as
x A x B u
In general, the outputs of a linear system can be related to the state variables
and the input signals by the output equation
yC xDu
Where y is the set of output signals expressed in column vector form. The
state-space representation (or state-variable representation) is comprised of
the state variable differential equation and the output equation.
The solution of the state differential equation can be obtained in a manner
similar to the approach we utilize for solving a first order differential equation.
x ax bu
x (0) b
X(s) U (s)
sa sa
t
x ( t ) e at x (0) e a ( t ) b u () d
0
We expect the solution of the state differential equation to be similar to x(t)
and to be of differential form. The matrix exponential function is defined
as
A2t 2 Ak t k
e At I At
2! k!
which converges for all finite t and any A Dorf and Bishop, Modern Control Systems
. Then the solution of the state differential equation is found to be
t
x ( t ) e At x (0) e A ( t ) B u () d
0
t
x ( t ) ( t ) x (0) ( t ) B u () d
0
x A x B u
yCx
where y is the single output and u is the single input.
The Laplace transform of the equations
sX (s) AX(s) B U(s)
Y(s) CX(s)
Y (s) C(s)BU(s)
Therefore, the Transfer Function G(s)=Y(s)/U(s) is
G (s) C(s)B
Example:
Determine the transfer function G(s)=Y(s)/U(s) for the RLC circuit as described
by the state differential function
1
0 1
x C x u , y 0 R x
1 R C
0
L L
R 1
s
(s) sI A
1 1 L C
1 1
s (s) s
sI A 1 C
R L
s
L L 2 R 1
(s) s s
L LC
Then the transfer function is
R
s
L 1 1
G (s) 0 R (s) C (s) C
1 s 0
L (s) (s)
R / LC R / LC
G (s)
(s) R 1
s2 s
L LC
System Model
x A x B u
u x
Control Law
-K
Full-state feedback
With the system defined by the state variable model
x A x B u
and the control feedback given by
u K x
The closed-loop system to be
x A x B u A x B K x A B K x
The characteristic equation associated with above equation is
x ( t ) e A BK t x ( t 0 ) 0 as t
Given the pair (A,B), we can always determine K to place all the system closed loop
poles in the left half-plane if and only if the system is completely controllable-that is,
if and only if the controllability matrix PC is of full rank.
System Model
r(t) u
N x A x B u
x
Control Law
-K
When r(t)=0 for all t>t0, the control design problem is known as the regulator
problem. That is, we desire to compute K so that all initial conditions are
driven to zero in a desirable fashion (as determined by the design
specifications).
When using this state variable feedback, the roots of the characteristic
equation are placed where the transient performance meets the desired
response.
Example:
Consider the third-order system with the differential equation
3 2
d y d y dy
3
5 2 3 2y u
dt dt dt
3 2
d y d y dy
3
5 2 3 2y u
dt dt dt
We can select the state variables as x1=y, x2=dy/dt, x3=d2y/dt2. (Phase variables)
y x1 and y 1 0 0x
dy
x 1 x2
dt
d2y
x 2 2 x 3
dt
d3y
x 3 3 5 x 3 3 x 2 2 x1 u
dt
x 1 0 1 0 x 1 0
x 0 0 1 x 0 u A x B u
2 2
x 3 2 3 5 x 3 1
If the state variable matrix is
K k1 k2 k3
and
u K x
then the closed-loop system is
x A x B K x A BKx
The state feedback matrix is
0 1 0
A BK 0 0 1
2 k1 3 k 2 5 k 3
Dorf and Bishop, Modern Control Systems
and the characteristic equation is
2 2n 2n n
We choose ζ=0.8 for minimal overshoot and ωn to meet the settling time
requirement.
/ 1 2
ov e
0.8 / 1 0.8 2
ov e 0.0152
If we want a settling time (with a 2% criterion) equal to 1 second, then
4 4
ts 1 n 6 rad / s
n 0.8 n
2
9.6 36 4.8 3 14.4 2 82.1 172.8
K k1 k2 kn
where
u K x
Given the characteristic equation
q n 1n 1 n
The state feedback gain matrix is
K 0 0 1P q A 1
C
where
qA A n 1A n 1 n 1A n I
where PC is the controllability matrix.
Example:
d2y Y(s) 1
u(t) G (s) 2
dt 2
U(s) s
and determine the feedback gain to place the closed-loop poles at s=-1±i.
Therefore, we require that
2
>>poly([-1+i -1-1i]) q ( ) 2 2
and α1= α2=2. With x1=y and x2=dy/dt, the matrix equation for the system G(s) is
dy A B
x1 x2
dt 0 1 0
d2y x x u
x 2 2 u ( t )
dt 0 0 1
Dorf and Bishop, Modern Control Systems
The controllability matrix is
0 1
PC B AB
1 0
Thus we obtain
1
0 1
K 0 1 qA
1 0
where
1 0 1 0 1
1
P
C
1 1 0 1 0
and
2
0 1 0 1 1 0 2 2
qA 2 2
0 0 0 0 0 1 0 2
Then we have
k1 k2
0 1 2 2 0 2
K 0 1 0 1 2 2
1 0 0 2 2 2
Note that computing the gain matrix K using Ackermann’s formula requires the
1
use of PC . We see that complete controllability is essential because only then
1
we can guarantee that the controllabilty matrix PC has full rank and hence that PC
exists.
>>K=place(A,B,[-1+i,-1-i])
x Ax Bu
rank B AB A 2 B A n 1B n
The matrix A is an nxn matrix an B is an nx1 matrix. For multi input systems,
B can be nxm, where m is the number of inputs.
Pc B AB A 2 B A n 1B
which is nxn matrix. Therefore, if the determinant of Pc is nonzero, the system
is controllable.
Example:
Consider the system
0 1 0 0
x 0 0 1 x 0 u , y 1 0 0x 0u
a 0 a1 a 2 1
0 1 0 0 0 1
A 0 0 1 , B 0 , AB 1 , A 2 B a 2
a 0 a1 a 2 1 a 2 a 22 a 1
0 0 1
Pc B AB A 2 B 0 1 a 2
1 a 2 a 22 a1
The determinant of Pc =1 and ≠0 , hence this system is controllable.
Example.
x 1 2 x1 u , x 2 3 x 2 d x1
The output of the system is y=x2. Determine the condition of controllability.
2 0 1
x x u , y 0 1x 0u
d 3 0
1 2 0 1 2
B and AB
0 d 3 0 d
1 2
Pc The determinant of pc is equal to d, which is
0 d nonzero only when d is nonzero.
0 0 0 1 0
0 0 0 0 1
B , A
50 500 500 20.5 0
0 20000 20000 0 8.2
Pc =
clc 1.0e+007 *
clear 0 0.0000 -0.0001 -0.0004
A=[0 0 1 0;0 0 0 1;-500 500 -20.5 0 0 0 0.1000
0.0000 -0.0001 -0.0004 0.0594
0;20000 -20000 0 -8.2]; 0 0 0.1000 -2.8700
B=[0;0;50;0];
Pc=ctrb(A,B) rank_Pc =
rank_Pc=rank(Pc) 4
The system is
det_Pc=det(Pc) controllable.
det_Pc =
-2.5000e+015
OBSERVABILITY:
All the poles of the closed-loop system can be placed arbitrarily in the complex
plane if and only if the system is observable and controllable. Observability
refers to the ability to estimate a state variable.
x Ax Bu and y Cx
where C is a 1xn row vector, and x is an nx1 column vector. This system is
completely observable when the determinant of the observability matrix P0
is nonzero.
The observability matrix, which is an nxn matrix, is written as
C
CA
PO
n 1
C A
Example:
Consider the previously given system
0 1 0
A 0 0 1 , C 1 0 0
a 0 a1 a 2
Thus, we obtain
1 0 0
PO 0 1 0
0 0 1
The det P0=1, and the system is completely observable. Note that
determination of observability does not utility the B and C matrices.
2 0 1
x x u and y 1 1x
1 1 1
We can check the system controllability and observability using the Pc and P0
matrices.
1 2
B and AB
1 2
1 2
Pc B AB
1 2
det Pc=0 and rank(Pc)=1. Thus, the system is not controllable.
C 1 1 and CA 1 1
C 1 1
Po
CA
1 1
det PO=0 and rank(PO)=1. Thus, the system is not observable.
y x1 x 2
However,
x 1 x 2 2 x1 x 2 x1 u u x1 x 2
Thus, the system state variables do not depend on u, and the system is not
controllable. Similarly, the output (x1+x2) depends on x1(0) plus x2(0) and does
not allow us to determine x1(0) and x2(0) independently. Consequently, the
system is not observable.
1 1
clc 1 1
clear
A=[2 0;-1 1];
rank_Po =
C=[1 1];
Po=obsv(A,C) 1
rank_Po=rank(Po)
det_Po=det(Po) The system is not
det_Po =
observable.
0
Rlocus (sys,k)