Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 116

Controller Design

The Stability of a Linear


System
Given a linear system 𝑌 ( 𝑠 ) =𝐺 ( 𝑠 )
𝑢 (𝑠)

where N, D are polynomials in s

• A linear system is stable if and only if all the roots of


D(s) is at LHS, i.e., the real parts of the roots of D(s)
are negative.
Stability in a Complex Plane
Im

Exponential Decay Purdy oscillatory

with oscillatory

Exponential growth

with oscillatory

Fast Exponential
Exponential Decay
growth

Re
Fast Decay
Slow Decay Slow growth

Purdy oscillatory

Stable (LHP) Unstable (RHP)


Transfer function Block diagram
1
R=Tset + QS
Σ Kc MC P S  UA C=Td

- 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

X(S)= G1(S)*U1(S) + G2(S)*U2(S)

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

are all in LHP


Tuning Methods & Response
 Zeigler-Nichols
¼ Wave Decay
http://www.jashaw.com/pid/tutorial/pid6.html

 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

 ¼ Wave decay concept


 Criticism is that it will not give robust controller
performance and the process borders on instability
ZN Methods
 1) Z-N Continuous Cycling Method
– This is a trial and error method conducted while a control
loop is in automatic mode (closed loop systems)

 2) Z-N Step Method


– Uses a reaction curve to perform calculations
– Used for stable open loop systems (manual mode)
Z-N Continuous Steps
 Step 1
 With the loop in automatic mode, enter a new set point a small
amount above or below the set point at which you want to tune.
Allow the loop to stabilize.
 Step 2
 Place the loop in manual mode, the loop must continue to be
stable.
 Step 3
 Turn off integral and derivative action (set them to zero), and set
proportional to a small value.
 Step 4
 Place the controller in automatic mode.
Z-N Continuous Steps
 Step 5
 Change the set point (SP) to your operating set point, an offset
should occur in the process variable (PV).
 Step 6
 Increase the gain until the loop starts oscillating.

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

Kc Ku/2 Ku/2.2 Ku/1.7

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)

 Will not work for dead time dominant processes.


– Dead time is the delay from when a controller output (CO) signal is issued
until when the measured process variable (PV) first begins to respond. The
presence of dead time, Өp, is never a good thing in a control loop. (
http://www.controlguru.com/wp/p79.html)

 Requires proper manipulation of the bias value by the controller or the


person doing the tuning.
Z-N Step Method
• Step 1 : Create a disturbance (Δ CV) -- Step Function the system input
• Step 2 : Record this on a Reaction Curve (Graph)
• Step 3
• Draw a line tangent to the rising part of the response curve. This line defines the lag
time (L) and rise time (T) values.
• Lag time is the time delay between the controller output and the CV response
Z-N Step Method
Step 4
 Calculate the slope of the curve (Refer to example on next few
slides)
Step 5
 Calculate the PID constants (Refer to example on next few
slides)
L = .2 s (lag time)
T = .9 s (rise time)
PV = 7% (change in process variable from sensor)
CV = 10% (step change of controlled variable from
controller)
Z-N Step Method (STEP 5)
N = slope of response curve
L = .2 s (lag time)
T = .9 s (rise time)
PV = 7% (change in process variable from sensor)
CV = 10% (step change of controlled variable from controller)

N = (PV)/T = 7%/.9 s = 7.8%/s


Kc = (1.2CV)/NL = (1.2*10%)/(7.8%/s*.2 s) = 7.7
Ti = 1/2L = 1/(2*.2 s) = 2.5/s
Td = .5L = .5*2 s = .1 s
Ziegler-Nichols Reaction Curve Tuning Rule

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

D1.4 3.7-1.4=2.3 time


Example - Continued

1. Reaction Curve Approach: KC=1.2/DKp=1.2*2.5/(0.5*0.165)=36;

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

Pessen uses the same approach as Z-N continuous


cycling method, determining the ultimate process
gain and ultimate process period through trial and
error.
Pessen modifies the Z-N calculations to achieve either
no overshoot or some overshoot.

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   et  dt
0 0
 
ISE    y s  y t  dt   et  dt
2 2

0 0
 
ITAE   t y s  y dt   t et  dt
0 0
Stability of a Controlled System
Method 1: Direct Substitution

Ga ( s) G p ( s ) GT ( s ) Gc ( s )  1  0

• Method 1: Direct Substitution


• Select a P-Only controller.
• Write the characteristic equation in a
polynomial form of s.
• Substitute s=wui and Kc=Kcu
• Solve for Kcu and wu
Example
Exchanger Sensor/Transmitter

50 C 1 %TO
GP ( s )  GT ( s ) 
30 s  1 kg / s 10 s  1 C

Valve P-Only controller

0.016 kg / s %C
Gv ( s )  Gc ( s )  K c
3s  1 %CO %TO
Solution

Characteristic 1  Gv ( s )GP ( s )GT ( s )Gc ( s )  0


equation

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

Substituting s=iwu, and Kc=Kcu

900iwu   420iwu   43iwu   1  0.8 K c ,u  0


3 2
Solution
 420 w  1  0.80K  i 900 w  43 w  0  i0;
2
u cu
3
u u

 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  1s  2s  3 B = sin(wt+f)
Basic Theorem

• Given a process with transfer function G(s);


• AR(ω)= ︳ G(iω) ︳
• φ(ω)=∠ G(iω)
• Basically, G(iω)=a+ib

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

• Given G(iω), assume that at a frequency ωu, such that


φ=-180° and one has AR(ωu),
• The sufficient and necessary condition of the stability
of the closed loop of G(s) is such that: AR(ωu) ≦1
The Extension of Nyquist Stability
Criteria
Given plant open loop transfer function G(s), such that
at a frequency ωu, the phase angle φ(ωu)=-180°.

At that point, the amplitude ratio AR= | G (ωu) | ,


then the ultimate gain of the closed loop system is
Ku=1/AR, ultimate period Pu=2π/ ωu.
Example - Continued

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;

I=Pu/2= 2* / 2U =0.9;

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

• For integrating processes, P-only control provides


offset-free operation. In fact, if as integral action is
added to such a case, the control performance
degrades.
• Therefore, for integrating processes, P-only control
is all that is usually required.
PID Controller Design Issues
• PID: use for sluggish processes (i.e., a process with large
deadtime to time constant ratios) or processes that
exhibit severe ringing for PI controllers. PID controllers
are applied to certain temperature and composition
control loops. Use derivative action when:

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

• Since the flow sensor and the process (changes in


flow rate for a change in the valve position) are so
fast, the dynamics of the flow control loop is
controlled by the dynamics of the control valve.
• Almost always use PI controller.
Deadband of a Control Valve
Stem Position

Air Pressure

Time

• Deadband of industrial valves is between ±10%-


±25%.
• As a result, small changes in the air pressure
applied to the valve do not change the flow rate.
Deadband of Flow Control Loop

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.

• The sensor is generally faster than the actuator,


which is faster than the process.
• Use P-only controller if it is an integrating process
otherwise use a PI controller.
Temperature Control Loop

• The dynamics of the


process and sensor are
TT TC T sp usually slower than the
actuator.
RSP
• Use a PI controller
Process
Stream FC unless the process is
FT sufficiently sluggish to
Gas
warrant a PID
controller.
Analysis of PI Controller Applied to
Typical Temperature Loop
 I  30;  p  60;  s  20
 1   Kp   1 
Kc 1  30s   60 s  1   20 s  1   1  0
   

Kc Kp p1 τp ζ
0.02 0.057 325 1.48
0.10 0.056 140 0.74
0.80 0.051 48 0.37
1.50 0.057 28 0.14
Further Analysis of Dynamic of a
Typical Temperature Control Loop

• Note that as the controller gain is increased, i.e.,


KcKp increase, the closed loop time constant
becomes smaller.
• Also, note that as the controller gain is increased,
the value of z decreases.
Composition Control Loop

C.W. • The process is usually


the slowest element
followed by the sensor
with the actuator being
the fastest.
• Use a PI controller
FT AT
unless the process is
FC sufficiently sluggish to
AC
warrant a PID
RSP controller.
DO Control Loop

• The process and the


sensor have
approximately the same
AC AT dynamic response.
• This is a fast responding
Air process for which offset-
free operation is desired.
Therefore, PI controller
Variable Speed should be used.
Air Compressor
Biomass Controller

AC • The process for this


system is the slowest
Glucose element.
Feed
• Because the process
is a high-order
Variable
E-1 AT sluggish process, a
Speed
PID controller is
Pump
required.
Overview
• The characteristic equation determines the dynamic
behavior of a closed loop system
• Proportional, integral, and derivative action each have
unique characteristics.
• There are a number of different ways to apply a PID
controller.
• Use a PI controller unless offset is not important or if
the process is sluggish.
• When analyzing the dynamics of a loop, consider the
dynamics of the actuator, the process, and the sensor
separately.
The State Differential Equation:
The state of a system is described by the set of first-order differential
equations written in terms of the state variables [x1 x2 ... xn].

These first-order differential equations can be written in general form as

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.

The state variables of a system characterize the dynamic behavior of a


system.

The engineer’s interest is primarily in physical, where the variables are


voltages, currents, velocities, positions, pressures, temperatures, and similar
physical variables.
Thus, this set of simultaneous differential equations can be written in matrix
form as follows:

 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 

n: number of state variables, m: number of inputs.

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

This differential equation is also commonly called the state equation.


The matrix A is an nxn square matrix, and B is an nxm matrix.

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

yC xDu

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.

Consider the first-order differential equation

x  ax  bu

Where x(t) and u(t) are scalar functions of time.

We expect an exponential solution of the form eat.


x  ax  bu
Taking the Laplace transform of both sides, we have
s X(s)  x 0  a X(s)  b U (s)
therefore,

x (0) b
X(s)   U (s)
sa sa

The inverse Laplace transform of X(s) results in the solution

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

X(s)  sI  A  x (0)  sI  A  B U(s)


1 1

where we note that [sI-A]-1=ϕ(s), which is the Laplace transform of ϕ(t)=eAt.


The matrix exponential function ϕ(t) describes the unforced response of the
system and is called the fundamental or State Transition matrix.

t
x ( t )  ( t ) x (0)   ( t  ) B u () d
0

Dorf and Bishop, Modern Control Systems


THE TRANSFER FUNCTION FROM THE STATE EQUATION

The transfer function of a single input-single output (SISO) system can be


obtained from the state variable equations.

x  A x  B u
yCx
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)

where B is an nx1 matrix, since u is a single input.


We do not include initial conditions, since we seek the transfer function.
Reordering the equation
[sI  A] X(s)  B U(s)
X (s)  sI  A  BU(s)  (s)BU(s)
1

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

Dorf and Bishop, Modern Control Systems


The Full-State Feedback block diagram
(with no reference input)

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

det I  A  B K  0


If all the roots of the characteristic equation lie in the left-half plain, then the closed
loop is stable.
In other words, for any initial condition x(t0), it follows that

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.

The addition of a reference input can be considered as


u ( t )  K x ( t )  N r ( t )

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

Dorf and Bishop, Modern Control Systems


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

Dorf and Bishop, Modern Control Systems


d3y d2y 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 0x
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  BKx
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

   detI  A  BK   3  5  k 3 2  3  k 2   2  k1   0

If we seek a rapid response with a low overshoot, we choose a desired


characteristic equation such that


   2  2n   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

If we choose ωn=6 rad/s, the desired characteristic equation is

 2
 9.6   36  4.8  3  14.4 2  82.1   172.8

Comparing two characteristic equations yields


5  k 3  14.4
3  k 2  82.1
2  k1  172.8

Therefore, we require that k1=170.8, k2=79.1 and k3=9.4.

K  170.8 79.1 9.4


ACKERMANN’S FORMULA:

For a single-input, single output system, Ackermann’s formula is useful for


determining the state variable feedback matrix

K  k1 k2  kn 
where
u  K x
Given the characteristic equation

q    n  1n 1     n
The state feedback gain matrix is

K  0 0  1P q A  1
C
where
qA   A n  1A n 1     n 1A   n I
where PC is the controllability matrix.
Example:

Consider the system

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  qA 
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 
qA      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.

With Matlab Result:


>>A=[0 1;0 0];
K=
>>B=[0;1];
>>K=acker(A,B,[-1+i,-1-i]) 2 2

>>K=place(A,B,[-1+i,-1-i])

Dorf and Bishop, Modern Control Systems


CONTROLLABILITY:

Full-state feedback design commonly relies on pole-placement


techniques. It is important to note that a system must be completely
controllable and completely observable to allow the flexibility to place all
the closed-loop system poles arbitrarily. The concepts of controllability and
observability were introduced by Kalman in the 1960s.

A system is completely controllable if there exists an unconstrained


control u(t) that can transfer any initial state x(t0) to any other desired
location x(t) in a finite time, t0≤t≤T.
For the system

x  Ax  Bu

we can determine whether the system is controllable by examining the


algebraic condition


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.

For a single-input, single-output system, the controllability matrix Pc is


described in terms of A and B as


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 0x  0u
 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.

Consider a system represented by the two state equations

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 1x  0u
 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.

Dorf and Bishop, Modern Control Systems


The controllability matrix Pc can be constructed in Matlab by using ctrb
command.
From two-mass system,

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.

A system is completely observable if and only if there exists a finite time T


such that the initial state x(0) can be determined from the
observation history y(t) given the control u(t).

Consider the single-input, single-output system

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 

Dorf and Bishop, Modern Control Systems


CA  0 1 0 , CA 2  0 0 1

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.

Example: Consider the system given by

 2 0 1
x    x u and y  1 1x
 1 1  1
We can check the system controllability and observability using the Pc and P0
matrices.

From the system definition, we obtain

1 2
B    and AB   
 1   2

Therefore, the controllability matrix is determined to be

1 2
Pc  B AB   
  1  2 
det Pc=0 and rank(Pc)=1. Thus, the system is not controllable.

Dorf and Bishop, Modern Control Systems


From the system definition, we obtain

C  1 1 and CA  1 1

Therefore, the observability matrix is determined to be

 C  1 1
Po      
CA
   1 1
det PO=0 and rank(PO)=1. Thus, the system is not observable.

If we look again at the state model, we note that

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.

The observability matrix PO can be constructed in Matlab by using obsv


command.

From two-mass system,


Po =

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

Dorf and Bishop, Modern Control Systems


Tuning a Cascade Loop
• Loop within a Loop
• Master Loop (outside loop)
• Slave Loop (inner loop)
• No more difficult than a regular loop.
• The master loop is the one that receives the input to the
process
• The output of the master loop is the input (Set Point) for
the slave loop
• The Slave Loop sends its output to the final control
element
• Tune from inside out
• Slave Loop first (usually P only as it must be quick)
For Integrating Processes
“One of the biggest challenges for practitioners is recognizing that a particular process
shows integrating behavior prior to starting a controller design and tuning project. This,
like most things, comes with training, experience and practice. Once in automatic,
closed loop behavior of an integrating process can be unintuitive and even confounding.
Trial and error tuning can lead us in circles as we try to understand what is causing the
problem” (Rice & Cooper, 2007).
http://www.controlguru.com/wp/p79.html

Consider using a Proportional only type control


Upper Limit of Designed
Controller Parameters of PID
Controllers
• Q: Given a plant with a transfer function G(s), one
implements a PID controller for closed loop control,
what is the upper limit of its parameters?
• A: The upper limit of a controller should be bounded
at its closed loop stability.
Approaches

• Direct Substitution for Kc


• Root Locus method for Kc
• Frequency Analysis for all parameters
Controller Tuning
• Ziegler-Nichols
• Integral Criteria
• Internal Model Control
• Frequency Techniques
Stability
• Substitution
• Root Locus
• Frequency techniques
Stability of the Control Loop
• For a feedback control loop to be stable, all the
roots of its characteristic equation must be either
negative real numbers or complex numbers with
negative real parts.
2. Method of Root Locus

Rlocus (sys,k)

k(12) ans =69.6706

You might also like