1focs Marechal
1focs Marechal
A. Karamanco§lu
May 8, 2024
1
These slides are intended for educational use only; not for sale under any
circumstances.
1/670
Denitions and examples
Example: Separately excited dc motor
Example: Inverted Pendulum
Example: Aircraft Modeling
Example: Macroeconomic growth model
System classications
Deterministic-Nondeterministic
Static-Dynamic
Causal-Noncausal
Continuous-Discrete
Time invariant-Time varying
Linear-Nonlinear
Control systems' parts
Example: Subblocks for Temperature control of a room
Example: Basic Car Cruise Control System
Example: One Axis Autopilot System
Modeling and realization
Example: RC circuit
2/670
Denitions: Transfer function, Impulse response, Convolution
Examples: Mass-Damper-Spring system, RLC circuit
Example: Multi-input multi-output transfer function
A realization of transfer functions
Review of the Laplace Transform
State-space representation of LTI systems
State Space Representations of Transfer Functions
Transfer functions
Signal ow graph methods
Mason's Gain Formula and examples
Block diagram reduction rules
A realization of state space model
Example: Modeling of an electromechanical system
Example: Transfer function of cascade elements
2/670
Basic control actions
Example: Proportional Control of a First Order System
Example: A Compensator Implementation
Example: Integral Controllers
Example: Proportional Controller's Response to Torque
Disturbances
Example: Proportional plus Integral control
System responses under feedbacks
Second Order Systems under feedback
Unit Step Response of Third Order System
Transient response of higher order systems
Stability
Routh stability analysis
Relative stability analysis
The Hurwitz notation
HermiteBiehler theorem and stability
Steady state error analysis
Example: Motion control of a car
Root locus analysis
Review of the related Complex Calculus 2/670
Total stability
Pole placement
Frequency response methods
Frequency response from Pole-Zero Plots
Bode plots
Minimum phase systems
System type and Log Magnitude curve
Polar plots
Nyquist stability criterion
Phase and gain margins
Discrete control
The z-Transform
A discrete equivalent of a continuous plant
Feedback conguration
Stability
Stability of Scalar Dierence Equations
Discrete state space control
2/670
Textbook
3/670
System
4/670
Modeling
Modeling is representing the physical system in terms of
mathematical symbols.
6/670
Denitions:
ua : Armature voltage; θ(t) : Output angle
J : Inertia of the shaft; τe : Electrical torque
ia : Armature current; τl : Load torque
Ra : Armature resistance c1 , c2 , k1 , k2 : constants;
La : Armature inductance e : Back emf
7/670
Conguration equations:
dia
ua = Ra ia + La +e
dt
dif
uf = Rf if + Lf
dt
J θ̈ = τe − τl
8/670
Component equations:
e = c1 if θ̇ := k1 θ̇
τe = c2 Lf if ia := k2 ia
Note that uf and if are constants.
9/670
Simplify conguration equations using the component equations:
dia
ua = Ra ia + La + k1 θ̇
dt
J θ̈ = k2 ia − τl
Load torque calculation depends on the load type. See the the
example next.
10/670
Load Torque Required for Lifting a Load
1
τl = DW
2
τl : Load torque (Nm)
D: Drum diameter (m)
W: Load (N)
11/670
A modeling: Inverted Pendulum
The objective is to keep the pendulum vertically upright by applying
appropriate force to the cart.
12/670
Inverted pendulum denitions
y (t): horizontal distance of the cart from the reference pt.
θ(t): angle of pendulum
M : mass of cart
m: mass of pendulum
l : length of pendulum
u : force applied to the cart
13/670
Equations of motion
∆ ∆ ∆ ∆
Let x1 (t) = y (t), x2 (t) = ẏ (t), x3 (t) = θ(t), x4 (t) = θ̇(t)
ẋ1 = x2
2
ẋ2 = −bx2 +ml sin(x 3 )x4 −mg sin(x3 ) cos(x3 )+u
M+m−m cos2 (x3 )
ẋ3 = x4
2
ẋ4 = (bx2 −u−ml sin(x 3 )x4 ) cos(x3 )+(M+m)g sin(x3 )
l(M+m−m cos2 (x3 ))
14/670
Aircraft Modeling
15/670
Flight Control Surfaces (A380)
16/670
Example
A380 has maximum takeo weight of 575 tonnes, wingspan of
79.676m and an area of 845.8m2 , equivalently, there is space to
park 144 cars on each side of the the wing. Each wing has 3
ailerons, 8 spoilers, 8 slats and 3 aps. Fuel tanks: Each wing has a
capacity of 149924 litres, approximately, 120 tonnes (see the
following slide).
17/670
18/670
Motion Axes
19/670
Under these assumptions, the longitudinal equations of motion of
an aircraft can be written as [J.J. E. Slotine and W. Li, Applied
Nonlinear Control, Prentice Hall, 1991]
Symbol Description
α angle of attack
E elevator deection angle
m mass of aircraft
LW Lift Force
LE Elevator Force
LW := CZW α, LE := CZE (E − α)
20/670
A macroeconomic growth model
The Solow dierence equation is a mathematical formula used in
the Solow growth model to describe how an economy's capital
stock changes over time. It helps us understand how factors like
investment, depreciation, and population growth aect the
accumulation of capital and, consequently, economic growth. Solow
dierence equation is
∆K = sY − (δ + n)K
where:
∆K represents the change in capital stock over time,
s represents the savings rate (the proportion of income saved and
invested),
Y represents the output or income of the economy,
δ represents the depreciation rate (how much capital is lost due to
wear and tear),
n represents the population growth rate, and K represents the
existing capital stock.
21/670
The dierence equation may also be coded as
Ki+1 − Ki = sYi − (δ + n)Ki
To break it down further, the equation tells us that the change in
capital (∆K ) is determined by the amount of savings (sY ) minus
the amount lost due to depreciation (δK ), adjusted for population
growth (nK). If the amount of savings and investment is higher
than the depreciation and population growth, the capital stock will
increase, leading to economic growth. On the other hand, if the
amount of savings and investment is lower, the capital stock will
decrease, potentially leading to slower economic growth.
Typical units in the dierence equation are: K , Y in dollars, s, δ, n
are unitless.
it is important to note that it is a simplied representation of the
real world and does not capture all the complexities of economic
growth.
The model was developed independently by Robert Solow and
Trevor Swan in 1956. In 1987 Solow was awarded the Nobel Prize
in Economics for his work.
22/670
In economics, capital represents the physical assets or resources
used in the production of goods and services.
Capital can take various forms, including buildings, machinery,
equipment, tools, infrastructure, technology, and even nancial
resources. A classication may be:
Financial Capital
Physical Capital
Human Capital
Social Capital
Intellectual Capital
Measuring capital is, in general, complex; however, in most cases
monetary units are used in measurements.
23/670
Introductory denitions and classication
24/670
Deterministic-Nondeterministic
25/670
26/670
Static-Dynamic
27/670
A system is said to be causal if the output of the system depends
only on past or present values of the inputs but not on future values
of the inputs. Otherwise, it is said to be a noncausal system.
Examples
Z∞ Zt
y (t) = x(λ)dλ Noncausal; y (t) = x(λ)dλ Causal
0 −∞
29/670
Example
If both the inputs and outputs of a system are dened only at
discrete time instants, then this system is said to be a discrete
time system.
Example
y (n) = 0.5y (n − 1), y (0) = 3, n = 1, 2, ... (Discrete)
30/670
Time invariant-Time varying
For a time invariant system,
if input x(t) of a system results the output y (t)
then
input x(t + τ ) results in y (t + τ ) for any τ . Otherwise it is said to
be a time varying system.
31/670
Homework 1.a
dy
+ 0.5y = u(t) (2)
dt
1, for t ≥ 0
u(t) = , y (0) = 3
0, for t < 0
Obtain the graphics of y (t) in the interval [0-20] secs. For the
dierential
equation (2), now let the input be
1, for t ≥ 5
u(t) = and initial condition be y(5)=3. Obtain
0, for t < 5
the output in the same interval. Based on these graphics, can you
conclude that the system of interest is time invariant.
32/670
Linear-Nonlinear
33/670
Homework 1.b
A simplied model of an underwater vehicle is
v̇ + |v | · v = u
Obtain the graphics of v in the interval [0-20] secs. for each input.
Based on the graphics what can you conclude about linearity of the
system.
34/670
Continued from the previous page
35/670
If the underwater vehicle velocity has a steady state value,
assuming the pulse is long enough, for the pulse input with
amplitude 1, it is calculated by
0
> + |vss | · vss = 1
v̇ss
vss2 = 1 → vss = 1
For the pulse with amplitude 4, we have
0
> + |vss | · vss = 4
v̇ss
vss2 = 4 → vss = 2
36/670
37/670
38/670
A control system usually consist of the following parts (which are
systems in their own right)
Plant is a given system whose outputs are to be controlled.
Sensors are devices which measure the outputs of the plant.
Controller is a system which calculates the necessary values of the
plant inputs to achieve desired values of the plant outputs.
Actuators are devices which set the values of the plant inputs to
those dictated by the controller.
Actuators and sensors may sometimes be a part of the plant or the
controller.
If the outputs of the controller do not explicitly depend on the
actual values of the plant outputs, then the control system is said
to be an open-loop control system.
Otherwise, it is said to be a closed-loop or (equivalently) a
feedback control system.
39/670
Example: Subblocks for Temperature control of a room
40/670
41/670
Overall Control System
42/670
Basic Car Cruise Control System
43/670
How it works
If the car is going too slowly, that is, slower than the desired speed,
then the error signal is positive and the controller is on. This
"presses" the accelarator pedal, and this makes the car go faster.
If the car is faster than the desired speed, then error signal is
negative, consequently the controller is o. This releases the gas
pedal, so the car slows down.
44/670
One Axis Autopilot System
45/670
5. The autopilot computer sends a signal to the servos that control
the aircraft's ailerons. The signal is a very specic command telling
the servo to make a precise adjustment.
6. Each servo has a small electric motor tted with a slip clutch
that, through a bridle cable, grips the aileron cable. When the
cable moves, the control surfaces move accordingly.
7. As the ailerons are adjusted based on the input data, the wings
move back toward level.
8. The autopilot computer removes the command when the
position sensor on the wing detects that the wings are once again
level.
9. The servos cease to apply pressure on the aileron cables.
46/670
The loop above works continuously, many times a second, much
more quickly and smoothly than a human pilot could. Two- and
three-axis autopilots obey the same principles, employing multiple
processors that control multiple surfaces. Some airplanes even have
autothrust computers to control engine thrust. Autopilot and
autothrust systems can work together to perform very complex
maneuvers.
47/670
MODELING and REALIZATION
Model: mathematical representation of a system
Example
49/670
→ RC v̇0 + v0 = vi (cf. 3)
Most people prefer to deal with algebraic equations rather than the
dierential equations. Dierential equation (3) can be transformed
into the algebraic domain by Laplace transformation.
Laplace transform of (3) is
Given v0 (0) = 0,
1
V0 (s) = Vi (s)
1 + RCs
or
V0 (s) 1 ∆
= = G (s)
Vi (s) 1 + RCs
50/670
V0 (s) 1 ∆
= = G (s)
Vi (s) 1 + RCs
G (s) is called the transfer function and describes the
input-output relation of an LTI system.
Impulse response is the time domain counterpart of the transfer
function. It is denoted by g (t), and, in symbols, dened by
51/670
Impulse response g (t) is the time domain counterpart of the
transfer function. Impulse function is L−1 (1), and denoted by δ .
where X (s) and Y (s)are the Laplace transforms of x(t) and y (t).
53/670
Digression: Multiplication by the unit step
54/670
Convolution Integral
Input Output
δ(t) g (t)
δ(t − τ ) g (t − τ )
u(τ )δ(t − τ ) u(τ )g (t − τ )
R∞ R∞
−∞ u(τ )δ(t − τ )dτ −∞ u(τ )g (t − τ )dτ
R∞
u(t) −∞ u(τ )g (t − τ )dτ
55/670
Laplace Transform of Convolution Integral
Assume that g (t) = u(t) = 0 for t < 0, then
R
∞
L (g (t) ∗ u(t)) = L −∞ g (τ )u(t − τ )dτ
R∞ R∞
= 0 e −st −∞ g (τ )u(t − τ )dτ dt
R∞ R∞
= −∞ 0 e −st g (τ )u(t − τ )dtdτ
56/670
Mass Damper Spring
Example
Newton's law: M ÿ = f − ky − B ẏ
57/670
Continued from the previous page
Newton's law: M ÿ = f − ky − B ẏ
Given y (0) = 0, ẏ (0) = 0
Y (s) 1 ∆
= 2
= G1 (s) (4)
F (s) Ms + Bs + k
58/670
Torsion springs
61/670
Newton's law: J θ̈ = τ − kθ − B θ̇
Given θ(0) = 0, θ̇(0) = 0
Θ(s) 1 ∆
= 2 = G2 (s) (5)
T(s) Js + Bs + k
62/670
Notice the analogy between (4) and (5). The same analogy existing
between the above mechanical systems and the following electrical
system.
V0 (s) 1 1/C ∆
= 2
= 2 = G3 (s)
Vi (s) LCs + CRs + 1 Ls + Rs + 1/C
63/670
Y (s) 1
= (Translational Mechanical)
F (s) Ms 2 + Bs + k
Θ(s) 1
= 2 (Rotational Mechanical)
T(s) Js + Bs + k
V0 (s) 1/C CV0 (s) 1
= 2 → = 2
Vi (s) Ls + Rs + 1/C Vi (s) Ls + Rs + 1/C
(Electrical)
64/670
Example
65/670
Continued from the previous page
m1 ẍ1 = u − k1 x1 − k2 (x1 − x2 ) − b(ẋ1 − ẋ2 )
m2 ẍ2 = −k3 x2 − k2 (x2 − x1 ) − b(ẋ2 − ẋ1 )
Take Laplace transforms:
66/670
Continued from the previous page
= m2 s 2 + bs + k2 + k3 U(s)
X1 (s) m2 s 2 + bs + k2 + k3
→ =
U(s) (m1 s 2 + bs + k1 + k2 ) (m2 s 2 + bs + k2 + k3 ) − (bs + k2 )2
(8)
Using (7) and (8):
X2 (s) bs + k2
= ....
U(s) (m1 s + bs + k1 + k2 ) (m2 s 2 + bs + k2 + k3 ) − (bs + k2 )2
2
(9)
X1 (s) X2 (s)
Equations (8) and (9) are the transfer functions U(s) and U(s)
respectively.
67/670
A realization of transfer functions
68/670
For this, dene an auxiliary function z as a solution of
Z (s) 1
= n n−1
X (s) s + an−1 s + ...... + a1 s + a0
| {z }
Transfer function fromX to Z
69/670
Z (s) 1
= n n−1
X (s) s + an−1 s + ...... + a1 s + a0
| {z }
Transfer function fromX to Z
Z (s)
Block diagram representation of the transfer function X (s) is given
below as Block 1:
70/670
z (n) + an−1 z (n−1) + ...... + a1 ż + a0 z = x
z (n) = −an−1 z (n−1) − ...... − a1 ż − a0 z + x
71/670
Also consider another transfer function arising from the dierential
equation:
Y (s)
= bm s m + bm−1 s m−1 + ....... + b1 s + b0
Z (s) | {z }
Transfer function from Z to Y
72/670
Y (s)
= bm s m + bm−1 s m−1 + ....... + b1 s + b0
Z (s) | {z }
Transfer function from Z to Y
Y (s)
Block diagram representation of the transfer function Z (s) is given
below as Block 2:
73/670
y = bm z (m) + bm−1 z (m−1) + ....... + b1 ż + b0 z
74/670
75/670
76/670
Homework 2.a
77/670
Review of the Laplace Transform
78/670
1
1 s
1
t s2
t n , n = 0, 1 . . . n!
s n+1
1
e at s−a
a
sin(at) s 2 +a2
s
cos(at) s 2 +a2
79/670
Some Important Properties of Laplace Transforms
f (t) ↔ F (s)
L e at f (t) = F (s − a) (12)
f (t − a) for t > a
g (t) = ⇒ L{g (t)} = e −as F (s) (13)
0 for t < a
80/670
Time scaling property
For a > 0
1 s
f (at) ↔ F ( ) (14)
a a
81/670
Eect of integration in time domain on the Laplace transform
Zt
F (s)
f (λ)dλ ↔ (18)
s
0
82/670
Initial Value Theorem. If the indicated limits exist then
83/670
Example
d 1 1 2
te 2t ↔ − ( )=( ) by (19)
ds s − 2 s −2
Zt
1 2
sin(2u)du ↔ ( ).( 2 ) by (18)
s s +4
0
1 1 3
sin(3t) ↔ ( ).( 2
)= 2 by (14)
3 (s/3) + 1 s +9
84/670
Inverse Laplace Transform
85/670
1
s 1
1
s2
t
1 tn
s n+1
, n = 0, 1, . . . n!
1
s−a e at
1 sin(at)
s 2 +a2 a
s
s 2 +a2
cos(at)
Table: Some Inverse Laplace Transforms
86/670
Linearity
87/670
Shifting Property
L−1 F (s − a) = e at f (t)
−1 −as f (t − a), t > a
L e F (s) =
0, t<a
1 1 1
= ↔ e t sin 2t
s2 − 2s + 5 2
(s − 1) + 4 2
88/670
Change of Scale
1 t
L−1 F (ks) =f( )
k k
2s 2s 1 4t 1
2
= 2
↔ cos( ) = cos(2t)
4s + 16 (2s) + 16 2 2 2
89/670
Derivatives
90/670
Integrals
Z∞
f (t)
F (u)du ↔
t
s
Z∞
1 1 1 − e −t
( − )du ↔
u u+1 t
s
91/670
Multiplication by s
92/670
Division by s
Zt
F (s)
↔ f (u)du
s
0
Zt
1 1 1
2
↔ sin 2udu = (1 − cos 2t)
s(s + 4) 2 4
0
93/670
Convolution
Zt
F (s)G (s) ↔ f (t) ∗ g (t) = f (u)g (t − u)du
0
Example
Zt
1 1
× ↔ e t ∗ e 2t = e u e 2(t−u) du = e 2t − e t
s −1 s −2
0
R∞
In general f (t) ∗ g (t) = f (u)g (t − u)du . However, if both f
−∞
and g are causal functions, that is, f (t) = f (t)u(t) or
g (t) = g (t)u(t), then
Z∞ Zt
f (t) ∗ g (t) = f (u)g (t − u)du = f (u)g (t − u)du
−∞ 0
94/670
Example
x(t) h(t)
z }| { z }| { Z ∞
y (t) = e −t u(t) ∗ e −2t u(t) = e −τ u(τ )e −2(t−τ ) u(t − τ )dτ
−∞
95/670
Continued from the previous page
96/670
Continued from the previous page
Z t
−2t
e −t
u(t) ∗ e u(t) = e −τ u(τ )e −2(t−τ ) u(t − τ )dτ
0
= 0 if t < 0
−τ −2(t−τ )
e u(τ )e u(t − τ )
6= 0 if t > 0 and 0 < τ < t
97/670
Continued from the previous page
Z t
e −t u(t) ∗ e −2t u(t) = e −τ u(τ )e −2(t−τ ) u(t − τ )dτ
0
98/670
Linear Time Invariant System's Response
99/670
Proof of the nal value theorem
Z ∞
df df
lim L = lim e −st
dt
s→0 dt s→0 0 dt
Z ∞
df
= lim e −st dt
s→ 0 dt
Z0 ∞
df
= dt
0 dt
= lim f (t) − f (0)
t→∞
100/670
Steady state response of an LTI system under the unit step
input
Let all the poles of G have negative real parts (i.e., "stable"). Then
102/670
Example
Let G (s) = s 3 −71s−6 Its steady state output value is NOT
G (0) = −16 . Poles of G are -1, -2, 3.
103/670
Finding Inverse Laplace Transforms by Partial Fractions
Example
2s − 5 A B C D
3
= + 3
+ 2
+
(3s − 4)(2s + 1) 3s − 4 (2s + 1) (2s + 1) (2 s + 1 )
3s 2 − 4s + 2 As + B Cs + D E
= 2 + +
(s 2 + 2s + 4)2 (s − 5) (s + 2s + 4)2 s 2 + 2s + 4 s − 5
3s + 16
↔ 5e 3t − 2e −2t
s2 − s − 6
27 − 12s
↔ 3e −4t − 3 cos 3t
(s + 4)(s 2 + 9)
s 2 − 2s + 3 1 3
↔ (2t − 1)e t + e −t
(s − 1)2 (s + 1) 2 2
104/670
In the OCTAVE environment
Dening polynomials
>> n=[2];
>> d=[ 1 3 2 0];
>> polyout(n,'s')
2
>> polyout(d,'s')
1*s^3 + 3*s^2 + 2*s^1 + 0
105/670
Partial fraction expansion representation
2 1 −2 1
= + +
s 3 + 3s 2 + 2s s +2 s +1 s
>>[r,p,k]=residue(n,d)
r =
1.00000
-2.00000
1.00000
p =
0
-1
-2
k = [](0x0)
106/670
s2 + 1 1.25 −0.25 0.5
3 2
= + + 2
s + 2s s +2 s s
>> n=[1 0 1];
>> d=[1 2 0 0 ];
>> [r,p,k]=residue(n,d)
r =
1.2500
-0.2500
0.5000
p =
-2
0
0
k =
[]
107/670
2s 2 + 3s − 1 13 −4
2
= + +2
s − 3s + 2 s −2 s −1
>>[r,p,k]=residue([2 3 -1],[1 -3 2])
>>r =
13
-4
>>p =
2
1
>>k =
2
Thus, we have:
a pole at 2 with residue 13 and
a pole at 1 with residue −4,
and we have a single direct term of 2.
108/670
Taking Laplace transforms
2
t2 ↔
s3
>>pkg load symbolic
>> syms t
>> f=t^2;
>> laplace(f)
ans = (sym)
2
---
3
s
109/670
Taking inverse Laplace transforms
2
t2 ↔
s3
>>pkg load symbolic
>> syms s
>> F=1/s^3;
>> ilaplace(F)
ans = (sym)
2
t
---
2
110/670
State-space representation of LTI systems
State space representation of an LTI system dynamics with n rst
order dierential equations in n unknowns is below.
State Equations:
ẋ1 = a11 x1 + a12 x2 + ........ + a1n xn + b11 u1 + b12 u2 + .... + b1m um
ẋ2 = a21 x1 + a22 x2 + ........ + a2n xn + b21 u1 + b22 u2 + .... + b2m um
..
.
ẋn = an1 x1 + an2 x2 + ........ + ann xn + bn1 u1 + bn2 u2 + .... + bnm um
Output equations:
y1 = c11 x1 + c12 x2 + ........ + c1n xn + d11 u1 + d12 u2 + .... + d1m um
..
.
yp = cp1 x1 + cp2 x2 + ........ + cpn xn + dp1 u1 + dp2 u2 + .... + dpm um
111/670
Matrix Representation
ẋ1 a11 . . . a1n x1 b11 . . . b1m u1
.. .. .. .. .. .. .. .. ..
. = . . . . + . . . .
ẋn an1 · · · ann xn bn 1 · · · bmn um
| {z } | {z } | {z } | {z } | {z }
ẋ A x B u
y1 c11 ... c1n x1 d11 ... d1m u1
.. .. .. .. .. + .. .. .. ..
. = . . . . . . . .
yp cp1 ··· cpn xn dp1 ··· dpm um
| {z } | {z }| {z } | {z }| {z }
y C x D u
112/670
Compact Representation
ẋ = Ax + Bu
(21)
y = Cx + Du
Transfer function matrix
Take Laplace transform of (21) assuming all initial conditions are
zero:
sX (s) = AX (s) + BU(s)
sIX (s) = AX (s) + BU(s)
(sI −A)−1 −1
→ (sI − A)X (s) =(sI −A) BU(s)
→ X (s) = (sI − A)−1 BU(s)
Y (s) = CX (s) + DU(s)
→ Y (s) = (C (sI − A)−1 B + D) U(s)
| {z }
Transfer Function Matrix
113/670
Laplace Transform Approach to the Solution of State Space
Equations
Consider
ẋ = Ax + Bu
Transform the equation in the Laplace domain:
114/670
X (s) = (sI − A)−1 x(0) + (sI − A)−1 BU(s)
Let us denote the inverse Laplace transform of (sI − A)−1 by e At ,
call it state transition matrix, and take inverse transform
throughout:
Z t
x(t) = e x(0) +
At
e A(t−τ ) Bu(τ )dτ
0
Recall that
Zt
F (s)G (s) ↔ f (τ )g (t − τ )dτ
0
115/670
Example
Obtain the time response of the following:
0 1 0 x1 (0) 1
ẋ1 x1
= + u, =
ẋ2 −2 −3 x2 1 x2 (0) 2
116/670
Continued from the previous page
Calculate the state transition matrix e At :
1 0 0 1 s −1
sI − A = s − =
0 1 −2 −3 2 s +3
1 s +3 1
(sI − A)−1 =
(s + 1)(s + 2) −2 s
s+3 1
" #
(s+1)(s+2) (s+1)(s+2)
= −2 s
(s+1)(s+2) (s+1)(s+2)
2e −t − e −2t e −t − e −2t
At
e =
−2e −t + 2e −2t −e −t + 2e −2t
Use the state transition matrix in the formula
Z t
x(t) = e x(0) +
At
e A(t−τ ) Bu(τ )dτ
0
117/670
Z t
x(t) = e At x(0) + e A(t−τ ) Bu(τ )dτ
0
2e −t − e −2t e −t − e −2t 1
x1 (t)
=
x2 (t) −2e −t + 2e −2t −e −t + 2e −2t 2
2e −(t−τ ) − e −2(t−τ ) e −(t−τ ) − e −2(t−τ )
Z t
0
+ 1dτ
0 −2e −(t−τ ) + 2e −2(t−τ ) −e −(t−τ ) + 2e −2(t−τ ) 1
118/670
Continued from the previous page
119/670
Example
i1 = y2 + x1 − u2
= c ẋ2 + x1 − u2
u1 = R1 i1 + R2 y2 + x2
= R1 (c ẋ2 + x1 − u2 ) + R2 c ẋ2 + x2
= c(R1 + R2 )ẋ2 + x2 + R1 x1 − R1 u2
1
⇒ ẋ2 = (−R1 x1 − x2 + u1 + R1 u2 )
c(R1 + R2 )
121/670
Continued from the previous page
Lẋ1 = R2 y2 + x2
Lẋ1 = R2 c ẋ2 + x2
1 1
R2 c
ẋ1 = (−R1 x1 − x2 + u1 + R1 u2 ) + x2
L c(R1 + R2 ) L
−R1 R2 R1 R2 R1 R2
ẋ1 = x1 + x2 + u1 + u2
L(R1 + R2 ) L(R1 + R2 ) L(R1 + R2 ) L(R1 + R2 )
122/670
Continued from the previous page
y1 = x2
1
y2 = c ẋ2 = (−R1 x1 − x2 + u1 + R1 u2 )
(R1 + R2 )
123/670
−R1 R2 R1 R2 R1 R2
ẋ1 = x1 + x2 + u1 + u2
L(R1 + R2 ) L(R1 + R2 ) L(R1 + R2 ) L(R1 + R2 )
−R1 −1 1 R1
ẋ2 = x1 + x2 + u1 + u2
c(R1 + R2 ) c(R1 + R2 ) c(R1 + R2 ) c(R1 + R2 )
y1 = x2
1
y2 = c ẋ2 = (−R1 x1 − x2 + u1 + R1 u2 )
(R1 + R2 )
124/670
Continued from the previous page
When R1 = R2 = 2Ω, C = 12 F , L = 1H, the state equations become
−1 1/2 1/2 1
ẋ = x+ u
−1 −1/2 1/2 1
0 1 0 0
y= x+ u
−1/2 −1/4 1/4 1/2
125/670
Continued from the previous page
The transfer function matrix is G (s) = C (sI − A)−1 B + D
−1
s + 1 −1/2 1 s + 21 1
−1 2
(sI −A) = =
1 s + 1 /2 s 2 + 32 s + 1 −1 s +1
s s
!
2s 2 +3s+2 s + s+1
2 3
→ G (s) = s2
2
s2
4s 2 +6s+4 2s 2 +3s+2
126/670
Continued from the previous page
s s
" #
Y1 (s) 2s +3s+2
2
s + s+1
2 3 U1 (s)
= s2
2
2
Y2 (s) s U2 (s)
4s 2 +6s+4 2s 2 +3s+2
U2 (s) = 0 →
s s2
Y1 (s) = U1 (s), Y2 (s) = 2 U1 (s)
2s 2 + 3s + 2 4s + 6s + 4
U1 (s) = 0 →
s s2
Y1 (s) = U2 (s), Y2 (s) = U2 (s)
s 2 + 32 s + 1 2s 2 + 3s + 2
127/670
Example
Solve ẍ + 3ẋ + 2x = 0, x(0) = a, ẋ(0) = b, where a, b are
constants.
L[x(t)] = X (s)
L[ẋ(t)] = sX (s) − x(0)
L[ẍ(t)] = s 2 X (s) − sx(0) − ẋ(0)
→ [s 2 X (s) − sx(0) − ẋ(0)] + 3[sX (s) − x(0)] + 2X (s) = 0
→ [s 2 X (s) − as − b] + 3[sX (s) − a] + 2X (s) = 0
[s 2 + 3s + 2]X (s) = as + b + 3a
as + b + 3a as + b + 3a 2a + b a + b
→ X (s) = = = −
s 2 + 3s + 2 (s + 1)(s + 2) s +1 s +2
→ x(t) = (2a + b)e −t − (a + b)e −2t , for t ≥ 0.
128/670
Example
129/670
State Space Representations of Transfer Functions
130/670
Controllable Canonical Form
131/670
Example
Y (s) 4s 3 + 5s 2 + 2s + 6
= 4
U(s) s + 6s 3 + 8s 2 + 3s + 2
x˙1 0 1 0 0 x1 0 x1
x˙2 0 0 1 0 x2 0 x2
x˙3 = 0 x3 +
u, y = 6 2 5 4
0 0 1 0 x3
x˙4 −2 −3 −8 −6 x4 1 x4
132/670
Observable Canonical Form
1 0 0
−a1 ··· b1
x˙1 x1
−a2 0 ··· 0 0 b2
x˙2
.. .. .. ..
x2
..
.. = . . . . ..+ . u
. .
−an−1 0 0 1
··· bn−1
ẋn xn
−an 0 0 ··· 0 bn
x1
x2
1 0 ··· 0 0
y= ..
.
xn
133/670
Example
Y (s) 4s 3 + 5s 2 + 2s + 6
= 4
U(s) s + 6s 3 + 8s 2 + 3s + 2
x˙1 −6 1 0 0 x1 4 x1
x˙2 −8 0 1 0 x2 5 x2
x˙3 = x3 +
u, y = 1 0 0 0
−3 0 0 1 2 x3
x˙4 −2 0 0 0 x4 6 x4
134/670
Diagonal Canonical Form
135/670
Diagonal Canonical Form
Y (s) b1 s n−1 + · · · + bn−1 s + bn
=
U(s) (s + p1 )(s + p2 ) · · · (s + pn )
k1 k2 kn
= + + ··· +
s + p1 s + p2 s + pn
136/670
Example
Y (s) s +3
= 2
U(s) s + 3s + 2
Controllable canonical form:
0 1 0
x˙1 x1
= + u
x˙2 −2 −3 x2 1
x1
3 1
y=
x2
137/670
Continued from the previous page
Observable canonical form:
Y (s) s +3
= 2
U(s) s + 3s + 2
0 −2 3
x˙1 x1
= + u
x˙2 1 −3
x2 1
x1
y= 0 1
x2
Alternatively,
−3 1 1
x˙1 x1
= + u
x˙2 −2 0 x2 3
x1
1 0
y=
x2
138/670
Continued from the previous page
Diagonal canonical form:
Y (s) s +3 2 −1
= 2 = +
U(s) s + 3s + 2 s +1 s +2
−1 0 1
x˙1 x1
= + u
x˙2 0 −2 x2 1
x1
y = 2 −1
x2
lim |G (s)| = ∞
s→p
140/670
Transfer function of a basic feedback system
Example
>> pkg load control
>>G = tf (1, [1 2]);
>>H = tf (1, [1 5]);
>>cl = feedback (G,H)
Transfer function 'cl' from input 'u1' to output ...
s + 5
y1: --------------
s^2 + 7 s + 11
142/670
Signal Flow Graph Methods
A signal-ow graph is a visual representation of a system. Signal
Flow Diagrams allow using the analysis method Mason's Gain
Formula. Mason's gain formula simplies calculation of transfer
functions of systems which are built by connecting many
subsystems.
A transfer function of an LTI system in a signal ow diagram is
represented by a gain box with an input and output, or a directed
line with a gain. It is assumed that it has innite input impedance
and zero output impedance.
143/670
Figure: parallel connection
144/670
Figure: series connection
145/670
146/670
147/670
148/670
Example
For the control system conguration below, nd the transfer
function from R to Y .
150/670
Example
∆ ∆ ∆ ∆
Loop gains: L1 = G2 H2 , L2 = G3 H3 , L3 = G6 H6 , L4 = G7 H7
Two nontouching loop gains: L1 L3 , L1 L4 , L2 L3 , L2 L4
Three nontouching loop gains: None.
Forward path gains P1 : G1 G2 G3 G4 , P2 : G5 G6 G7 G8
151/670
Continued from the previous page
∆1 = 1 − (G6 H6 + G7 H7 )
153/670
Continued from the previous page
∆2 = 1 − (G2 H2 + G3 H3 )
154/670
Continued from the previous page
Y (s) P1 ∆ 1 + P2 ∆ 2
=
R(s) ∆
Y (s) G1 G2 G3 G4 (1 − (G6 H6 + G7 H7 )) + G5 G6 G7 G8 (1 − (G2 H2 + G3 H3 ))
=
R(s) 1 − (G2 H2 + G3 H3 + G6 H6 + G7 H7 ) + (L1 L3 + L1 L4 + L2 L3 + L2 L4 )
155/670
Continued from the previous page
Mason's Gain Formula
P
Y (s) k Pk ∆ k
=
R(s) ∆
Recall that
Pk : Gain of k−th forward path
∆k : k−th subdeterminant
∆ : Determinant of the whole system
156/670
Home Exercise
C1 (s) G1 G2 G3
=
R(s) 1 − G1 G2 H1 + G2 G3 H2 + G1 G2 G3
157/670
Example
158/670
Continued from the previous page
159/670
Continued from the previous page
160/670
Continued from the previous page
1 + G4 H1 − G2 G7 H2 − G4 G5 G6 H2 − G4 H1 G2 G7 H2 − G2 G3 G4 G5 H2
161/670
Example
Y G1 G2
For A: =
U 1 − (G1 H1 + G2 H2 )
Y G1 G2
For B: =
U 1 − (G1 H1 + G2 H2 ) + G1 H1 G2 H2
162/670
Continued from the previous page
s1 = U + H1 s2 ; s2 = G1 s1 + H2 s3 , s3 = G2 s2 , Y = s3
Y G1 G2
=
U 1 − (G1 H1 + G2 H2 )
164/670
Continued from the previous page
s1 = U + H1 s2 , s2 = G1 s1 , s3 = s2 + H2 s4 , s4 = G2 s3 , Y = s4
Y G1 G2
=
U 1 − (G1 H1 + G2 H2 ) + G1 H1 G2 H2
165/670
Example
x1 = xin + ex3
x2 = bx1 + ax4
x3 = cx2
x4 = dx3
xout = x4
166/670
Continued from the previous page
x1 = xin + ex3
x2 = bx1 + ax4
x3 = cx2
x3 = c(bx1 + ax4 )
x3 = bcx1 + cax4
x4 = dx3
xout = x4
167/670
Continued from the previous page
168/670
Continued from the previous page
Removing node x2 and its inows
x2 has no outows, and is not a node of interest.
169/670
Continued from the previous page
x1 = xin + ex3
x1 = xin + e(bcx1 + cax4 )
x1 = xin + bcex1 + acex4
x2 = bx1 + ax4
x3 = bcx1 + cax4
x4 = dx3
xout = x4
170/670
Continued from the previous page
171/670
Continued from the previous page
172/670
Continued from the previous page
173/670
Continued from the previous page
174/670
Continued from the previous page
175/670
Continued from the previous page
176/670
Continued from the previous page
1 ace
x1 = xin + x4
1 − bce 1 − bce
x4 = bcdx1 + acdx4
x4 (1 − acd) = bcdx1
bcd
x4 = x1
1 − acd
xout = x4
177/670
Continued from the previous page
178/670
Continued from the previous page
1 ace
x1 = xin + x4
1 − bce 1 − bce
1 ace bcd
x1 = xin + × x1
1 − bce 1 − bce 1 − acd
bcd
x4 = x1
1 − acd
xout = x4
179/670
Continued from the previous page
180/670
Continued from the previous page
181/670
Continued from the previous page
Eliminating self-loop at x1 :
1 ace bcd
x1 = xin + × x1
1 − bce 1 − bce 1 − acd
ace bcd 1
x1 (1 − × )= xin
1 − bce 1 − acd 1 − bce
1
x1 = xin
(1 − bce) × (1 − 1−bce
ace bcd
× 1−acd )
bcd
xout = x1
1 − acd
182/670
Continued from the previous page
183/670
Continued from the previous page
1
x1 = xin
(1 − bce) × (1 − 1−bce
ace bcd
× 1−acd )
bcd
xout = x1
1 − acd
bcd 1
xout = × xin
1 − acd (1 − bce) × (1 − 1−bce
ace
× bcd
1−acd )
184/670
Continued from the previous page
−bcd
xout = xin
bce + acd − 1
185/670
Example
186/670
Example
Given the LTI systems with their transfer functions below, nd the
transfer function Y (s)/X (s)
P1 = G1 G2 G3 , ∆1 = 1, P2 = G1 H5 G3 , ∆2 =?
Does the loop G2 H4 touch P2 ? Yes it is touching; so ∆2 = 1
Y (s) G1 G2 G3 + G1 G3 H5
=
X (s) 1 − G2 H4
187/670
An illustration of the assertion
A = G1 X ,
B = A + H4 C ,
C = G2 B + H5 A,
Y = G3 C
Y (s) G1 G2 G3 + G1 G3 H5
∴ =
X (s) 1 − G2 H4
188/670
Block Diagram Reduction Rules
189/670
190/670
191/670
192/670
193/670
194/670
195/670
196/670
Example
197/670
Continued from the previous page
198/670
Continued from the previous page
199/670
Continued from the previous page
200/670
Continued from the previous page
201/670
Home Exercise
C (s) G1 G2 G3
=
R(s) 1 + G1 G2 H1 + G2 H2 + G2 G3 H3
202/670
Example
203/670
Continued from the previous page
204/670
Continued from the previous page
205/670
Continued from the previous page
206/670
Continued from the previous page
207/670
Continued from the previous page
208/670
Continued from the previous page
209/670
Continued from the previous page
210/670
A realization of state space model
Example
A state space model
ẋ1 = − C1 x2 + C1 u
ẋ2 = L1 x1 − RL x2
y = Rx2
For the above model, obtain a realization that utilizes summers,
gains, and integrators.
211/670
Continued from the previous page
The terms x1 and ẋ1 (likewise x2 and ẋ2 ) are related as follows:
212/670
213/670
214/670
Example
215/670
Continued from the previous page
ẋ1 = x3
ẋ2 = x4
ẋ3 = −M k1
1
x1 + Mk1
1
b1
x2 − M 1
b1
x3 + M1
x4 + M11 u
k1 k1 +k2 b1 b1 +b2
ẋ4 = M2 x1 − M2 x2 + M2 x3 − M2 x4
y = x1
216/670
Continued from the previous page
In matrix notation:
0 0 1 0 0
ẋ1 x1
ẋ2 0 0 0 1 x2 0
ẋ3 = −k x3 + 1
1 k1 −b1 b1
u
M1 M1 M1 M1
M1
−k1 −k2 −b1 −b2
ẋ4 M
k1
2 M2
b1
M2 M2
x4 0
x1
x2
y= 1 0 0 0
x3
x4
Compactly:
ẋ = Ax + Bu
y = Cx
217/670
218/670
Modeling of an Electromechanical System
220/670
Component Equations
eb = Kb θ̇
T = Kf if Ka ia = K1 ia
Eb (s) = Kb sΘ(s)
T (s) = K1 Ia (s)
System Equations
Va = Ra ia + La i˙a + eb
J θ̈ = T − B θ̇ = K1 ia − B θ̇
Va (s) − Eb (s)
Va (s) = Ra Ia (s) + La sIa (s) + Eb (s) → Ia (s) =
sLa + Ra
T (s)
Js 2 Θ(s) = T (s) − BsΘ(s) → Θ(s) =
Js 2 + Bs
221/670
Eb (s) = Kb sΘ(s)
T (s) = K1 Ia (s)
Va (s) − Eb (s)
Ia (s) =
sLa + Ra
T (s)
Θ(s) = 2
Js + Bs
222/670
Transfer Functions of Cascade Elements
1
Z
(i1 − i2 )dt + R1 i1 = ei
C1
1 −1
Z Z
(i2 − i1 )dt + R2 i2 = i2 dt = −eo
C1 C2
Eo (s) 1
= 2
Ei (s) R1 C1 R2 C2 s + (R1 C1 + R2 C2 + R1 C2 )s + 1
223/670
224/670
If two RC circuits are connected in cascade as in the gure below,
the overall transfer function is not the product of (R1 C11 )s+1 and
1
(R2 C2 )s+1 . This is due to the loading eect.
225/670
If the input impedance of the 2nd block innite as in the gure
below, the output of the 1st block is not aected by connecting it
to the 2nd block. This result in the overall transfer function
1 1
(R1 C1 )s+1 × (R2 C2 )s+1 .
226/670
Once more...
τ (t) = K1 i(t)
τ (t) − Bw (t) = J ẇ
di
e(t) = Ri(t) + L dt + Kw (t)
227/670
Continued from the previous page
τ (t) = K1 i(t)
τ (t) − Bw (t) = J ẇ
di
e(t) = Ri(t) + L dt + Kw (t)
In Laplace domain, w/ initial conditions zero, we have
T (s) = K1 I (s)
T (s) − BW (s) = JsW (s)
E (s) = RI (s) + LsI (s) + KW (s)
K1
→ W (s) = E (s)
(Ls + R)(Js + B) + KK1 )
| {z }
TransferFunction
228/670
Basic Control Actions
Recall that the controller is the block located after the error signal.
We have seen the on-o controller (see the gure below). However,
there exist more complicated and functional controllers, such as P,
I, PI, PD, PID controllers.
229/670
P, I, PI, PD Controllers
230/670
PID Controller
Zt
de(t)
m(t) = Kp · e(t) + Ki e(t)dt + Kd
dt
0
M(s) Ki
= Kp + + Kd s
E (s) s
231/670
Examples for the Uses of Controllers
232/670
A digression
233/670
Continued from the previous page
Using a proportional controller K1 > 0 and a feedback gain Kb > 0
consider the conguration below:
234/670
Continued from the previous page
H(s) K
=
X (s) Ts + 1 + K
∆ ∆
K = K1 RKb , T = RC
Unit step response
K TK
K 1 1+K 1+K
H(s) = · = −
Ts + 1 + K s s Ts + 1 + K
K 1+K
↔ (1 − e − T t )
1+K
235/670
Continued from the previous page
236/670
Noninverting Amplier
R2
e0 = (1 + )ei
R1
237/670
A Compensator Implementation
E0 (s) s + T11
= Kc 1
Ei (s) s + αT 2
where T1 := R1 C1 , αT2 := R2 C2 , Kc := R3 C2 .
R4 C1
238/670
Integral Controllers
239/670
Continued from the previous page
K := K2 Kb R, T := RC
H(s) K
= 2
X (s) s T +s +K
E (s) s 2T + s
= 2
X (s) s T +s +K
s 2T + s
E (s) = X (s)
s 2T +s +K
When unit step is applied
s 2T + s 1
E (s) =
s 2T + s + K s
s 2T + s 1
lim e(t) = lim sE (s) = lim s 2
· =0
t→∞ s→0 s→0 s T +s +K s
As t → ∞, the dierence between x(t) and h(t) goes to zero.
241/670
Proportional Controller's Response to Torque Disturbances
242/670
C (s)
For computation of N(s) , the other inputs are taken zero, i.e.,
R(s) = 0
−s Tn −Tn
lim e(t) = lim sE (s) = lim · =
t→∞ s→0 s→0 s 2 J + sf + Kp s Kp
243/670
Proportional plus Integral control
C (s) s
= 3
N(s) s J + s 2 f + Kp s + Kp /Ti
E (s) −s
= 3
N(s) s J + s 2 f + Kp s + Kp /Ti
−s
E (s) = 3 2
N(s)
s J + s f + Kp s + Kp /Ti
244/670
−s
E (s) = N(s)
s 3J + s 2f + Kp s + Kp /Ti
−s 2 Tn
lim e(t) = lim sE (s) = lim 3 2
· =0
t→∞ s→0 s→0 Js + fs + Kp s + Kp /Ti s
Notice that the disturbance has not aected the steady state error
signal. This is due to the good choice of the controller.
245/670
System Responses under Feedbacks
1
C (s) = R(s)
Ts + 1
246/670
Continued from the previous page
Unit Step Response
1 1 1 T
Cu (s) = · = −
Ts + 1 s s Ts + 1
−t
cu (t) = 1 − e T , t≥0
lim cu (t) = 1
t→∞
−t
e(t) = r (t) − cu (t) = e T , t≥0
lim e(t) = 0
t→∞
247/670
Continued from the previous page
Unit Ramp Response
1 1 1 T T2
Cr (s) = · 2 = 2− +
Ts + 1 s s s Ts + 1
−t
cr (t) = t − T + Te T , t≥0
−t
e(t) = r (t) − cr (t) = T (1 − e T ), t ≥ 0
lim e(t) = T
t→∞
248/670
Continued from the previous page
Once you know the unit-step response, take the derivative to get
the unit-impulse response and integrate to get the unit-ramp
response.
249/670
Second Order Systems
250/670
Continued from the previous page
C (s) wn2
= 2
R(s) s + 2ζwn s + wn2
where wn is a positive number called the undamped natural
frequency, and ζ is a nonnegative number called the damping ratio.
Matching the given tf to the standard form,let KJ = wn2 , FJ = 2ζwn
∆ ∆
K /J wn2
↔ 2
s2 + (F /J)s + K /J s + 2ζwn s + wn2
r
∆ K ∆ F
wn = , ζ= √
J 2 KJ
252/670
Unit Step Response
C (s) wn2
= 2
R(s) s + 2ζwn s + wn2
C (s) wn2
=
R(s) (s + ζwn + iwd )(s + ζwn − iwd )
253/670
1 − ζ2
p
r1,2 = −ζwn ± iwn
Continued from the previous page
The roots can be written as: r1,2 = wn (−ζ ± i 1 − ζ 2 ), that is,
p
| {z }
magnitude=1
|r1,2 | = wn and cos β = ζ .
254/670
Continued from the previous page
C (s) wn2
= 2
R(s) (s + 2ζwn s + wn2 )
1
For the unit step input R(s) = s
wn2
C (s) =
(s 2 + 2ζwn s + wn2 )s
1 s + ζwn ζwn
= − 2 −
s 2
(s + ζwn ) + wd (s + ζwn )2 + wd2
ζ
c(t) = 1 − e −ζwn t (cos wd t + p sin wd t), t ≥ 0
1 − ζ2
1 − ζ2
p
e −ζwn t
=1− p sin(wd t + arctan ), t ≥ 0
1 − ζ2 ζ
√
Identity used: A cos Θ + B sin Θ = A2 + B 2 sin(Θ + arctan BA )
255/670
Continued from the previous page
ζ
c(t) = 1 − e −ζwn t (cos wd t + p sin wd t), t ≥ 0
1 − ζ2
e(t) = r (t) − c(t)
ζ
= e −ζwn t [cos wd t + p sin wd t] → lim e(t) = 0
1 − ζ2 t→∞
256/670
C (s) wn2
= 2
R(s) s + 2ζwn s + wn2
257/670
C (s) wn2
= 2
R(s) s + 2ζwn s + wn2
wn2
C (s) = R(s)
(s + wn )2
Unit step response:
wn2
C (s) =
(s + wn )2 s
c(t) = 1 − e −wn t (1 + wn t), t ≥ 0
258/670
C (s) wn2
= 2
R(s) s + 2ζwn s + wn2
1 √
e −(ζ− ζ −1)wn t , t ≥ 0
2
− p
2 ζ 2 − 1(ζ − ζ 2 − 1)
p
259/670
Summary: Unit step responses
C (s) wn2
= 2
R(s) s + 2ζwn s + wn2
Case 1 0 < ζ < 1 (Underdamped)
ζ
c(t) = 1 − e −ζwn t (cos wd t + p sin wd t), t ≥ 0
1 − ζ2
1 − ζ2
p
e −ζwn t
=1− p sin(wd t + arctan ), t ≥ 0
1 − ζ2 ζ
Case 2 ζ = 0 (undamped) c(t) = 1 − cos wn t, t ≥ 0
Case 3 ζ = 1 (critically damped) c(t) = 1 − e −wn t (1 + wn t), t≥0
Case 4 ζ > 1 ( overdamped )
1 √
e −(ζ+ ζ −1)wn t
2
c(t) = 1 + p
2 2
2 ζ − 1(ζ + ζ − 1)
p
1 √
e −(ζ− ζ −1)wn t , t ≥ 0
2
− p
2 2
2 ζ − 1(ζ − ζ − 1)
p
260/670
261/670
262/670
Notice that the transients die faster in the overdamped case; and
there is no settling(or a constant steady state) in the undamped
case. The damping rate is decided by ζ , therefore, it is called the
damping ratio.
263/670
System Response for the Underdamped Case
ζ
c(t) = 1 − e −ζwn t (cos wd t + p sin wd t)
1 − ζ2
1 − ζ2
p
e −ζwn t
=1− p sin(wd t + arctan )
1 − ζ2 ζ
264/670
Denitions For a Transient Response
265/670
Delay Time
td : The rst occurrence of c(t) equals the half of the steady state
value; for the unit step input, half of the steady state value is
c(t) = 0.5.
266/670
Rise Time
tr : The rst occurrence of c(t) equals the steady state value css ,
for the unit step input the steady state value is css = 1.
267/670
Peak Time
268/670
Max. Overshoot
c(tp ) − css
Mp =
css
269/670
Settling Time
270/670
Rise Time Computation
ζ
c(tr ) = 1 = 1 − e −ζwn tr (cos wd tr + p sin wd tr )
1 − ζ2
ζ
0 = −e −ζwn tr (cos wd tr + p sin wd tr )
1 − ζ2
ζ
0 = cos wd tr + p sin wd tr
1 − ζ2
1 − ζ2 1 1 − ζ2
p p
tan wd tr = − → tr = arctan
ζ wd −ζ
1 wn 1 − ζ 2
p
→ tr = arctan
wd −ζwn
1 wd π−β ∆
tr = arctan( )= , σ = ζwn
wd −σ wd
271/670
Continued from the previous page
1 wd π−β ∆
tr = arctan( )= , σ = ζwn
wd −σ wd
Convince yourself that "wn must be large for small value of tr ."
272/670
Peak Time Computation
ζ
c(t) = 1 − e −ζwn t (cos wd t + p sin wd t)
1 − ζ2
dc(t) ζ
= ζwn e −ζwn t (cos wd t + p sin wd t)
dt 1 − ζ2
ζwd
+e −ζwn t (wd sin wd t − p cos wd t)
1 − ζ2
cosine terms cancel out! The expression above reduces to:
dc wn
= (sin wd tp ) p e −ζwn tp = 0
dt 1 − ζ2
π
→ sin wd tp = 0 → wd tp = 0, π, 2π, ... → tp =
wd
273/670
Maximum Overshoot Computation
Recall that for a step input with amplitude css 2nd order system in
the standard
form has the response
ζ
c(t) = css 1 − e −ζw n t (cos wd t + √ sin wd t)
2 1−ζ
Maximum overshoot occurs at t = tp = wπd .
c(tp ) =
" #
−ζwn wπ π ζ π − √ ζπ
css 1 − e d (cos wd +p sin wd ) = (1+e 1−ζ 2 )css
wd 1 − ζ2 wd
c(tp ) − css
Mp =
c
ss
− √ ζπ
css 1 + e 1−ζ 2 − css
=
css
−( √ ζπ 2
)
= e 1−ζ
274/670
Settling Time Computation
1 − ζ2
p
e −ζwn t
c(t) = 1 − p sin(wd t + arctan ), t ≥ 0
1 − ζ2 ζ
275/670
1 − ζ2
p
e −ζwn t
c(t) = 1 − p sin(wd t + arctan ), t ≥ 0
1 − ζ2 ζ
e −ζwn t e −ζwn t
1− p ≤ c(t) ≤ 1 + p
1 − ζ2 1 − ζ2
1 −t
Time constant for the envelope is ζwn . ∴ t ≥ 3τ ⇒ e τ ≤ 0.05
Exact determination of the settling times depends on ζ value, and
it is complicated. However, we can use an approximation:
e −ζwn t
t ≥ 3τ ⇒ 0.95 / 1 ± p / 1.05
1 − ζ2
e −ζwn t
t ≥ 4τ → 0.98 / 1 ± p / 1.02
1 − ζ2
276/670
Exact Calculation
277/670
Unit Impulse Response of a 2nd Order System
wn2
C (s) = ·1
s 2 + 2ζwn s + wn2
wn
e −ζwn t sin(wn 1 − ζ 2 t), t ≥ 0
p
0 < ζ < 1 → c(t) = p
1 − ζ2
ζ = 1 → c(t) = wn2 te −wn t , t ≥ 0
wn √ wn √
e −(ζ− ζ −1)wn t − p e −(ζ+ ζ −1)wn t
2 2
ζ > 1 → c(t) = p
2
2 ζ −1 2
2 ζ −1
In order to obtain the impulse response we dierentiate the
response to unit step.
278/670
wn2
C (s) s(s+2ζwn ) wn2
= =
R(s) 2
1 + s(s+w2nζwn ) s 2 + 2ζwn s + wn2
279/670
Example
A 2nd order transfer function in the standard form has ζ = 0.6 and
wn = 5 rad/sec. Compute tr , tp , Mp , c(tp ) and ts when the system
is subjected to a unit step input.
π 3.14
tp = = = 0.785sec.
wd 4
− √ ζπ
Mp = e 1−ζ 2
= e −0.75×3.14 = 0.095
c(tp ) = (1 + Mp )css = (1 + 0.095) × 1 = 1.095
1 1
ts = 3 × τ = 3 × = 3 × = 1 sec. for the 5 % criterion
σ 3
1 1
ts = 4 × τ = 4 × = 4 × = 1.33 sec. for the 2 % criterion
σ 3
280/670
Example
Bring the following into the standard form.
6
T (s) =
s 2 + 3s + 15
√ 3
wn = 15 → 2ζwn = 3 → ζ = √
2 15
281/670
Continued from the previous page
282/670
Continued from the previous page
283/670
Steady State Error for Ramp Input
Js 2 + Bs
E (s) = R(s)
Js 2 + Bs + K
1 Js 2 + Bs 1 B
If R(s) = 2
then lim e(t) = lim sE (s) = lim s 2 2
=
s t→∞ s→ 0 s→ 0 Js + Bs + K s K
284/670
Dominant Poles
Approximate the step response of G (s) = (s+1)(s+2000
10)(s+100) by
using system's dominant poles. Its step response
2000 1
Y (s) = ×
(s + 1)(s + 10)(s + 100) s
In partial fractions
2 2.24 0.247 0.0022
Y (s) = − + −
s s + 1 s + 10 s + 100
Time domain response
2 − 2.224e −t
The dominant pole (or pole pair) is the one (pair) closest to the iw
axis and kept in the approximated expression.
285/670
Unit Step Response of Third Order System
C (s) wn2 p
= 2 , 0 < ζ < 1, p > 0
R(s) (s + 2ζwn s + wn2 )(s + p)
c(t) = 1 − A1 cos wd t − A2 sin wd t − A3 e −pt , A3 > 0 always!
3rd term decreases max overshoot and increases the settling time.
286/670
Transient Response of Higher Order Systems
C (s) G (s)
=
R(s) 1 + G (s)H(s)
∆ p(s) ∆ n(s)
G (s) =q(s) , H(s) =d(s)
287/670
Continued from the previous page
288/670
Unit Step Response
k(s + z1 )(s + z2 )....(s + zm ) 1
C (s) = ×
(s + p1 )(s + p2 )....(s + pn ) s
Continued from the previous page
n n
a X ai X
C (s) = + ↔ c(t) = a + ai e −pi t , t ≥ 0
s s + pi
i=1 i=1
k m
Q
Qi=1 (s + zi )
C (s) = Qq
s j=1 (s + pj ) k=1 (s 2 + 2ζk wk s + wk2 )
r
q
a
q
X aj
r b (s + ζ w ) + c w
X k k k k k 1 − ζk2
C (s) = + +
s s + pj s 2 + 2ζk wk s + wk2
j=1 k=1
289/670
Continued from the previous page
q
a
q
X aj
r b (s + ζ w ) + c w
X k k k k k 1 − ζk2
C (s) = + +
s s + pj s 2 + 2ζk wk s + wk2
j=1 k=1
q
X
c(t) = a + aj e −pj t
j=1
r q r
1 − ζk2 t)+ ck e −ζk wk t sin(wk 1 − ζ 2 t)
X X p
+ bk e −ζk wk t cos(wk
k=1 k=1
290/670
Example
8s 3 + 78s 2 + 168s + 64 1
C (s) = ×
s 3 + 14s 2 + 56s + 64 s
8s 3 + 78s 2 + 168s + 64 1
C (s) = ×
(s + 4)(s + 2)(s + 8) s
1 4 1 2
C (s) = + + +
s s +4 s +2 s +8
↔ c(t) = 1 + 4e −4t + e −2t + 2e −8t
lim c(t) = 1
t→∞
291/670
Example
292/670
Stability
293/670
Theorem
An LTI system which has a proper rational transfer function
n(s)
G (s) =
d(s)
is BIBO stable if and only if all the poles of G (s) have negative real
parts (in other words, all the poles of G (s) are in the open left half
complex plane (OLHP)).
Theorem
For a continuous causal linear time invariant system, the condition
for BIBO stability is that the impulse response be absolutely
integrable, i.e., Z ∞
|g (t)|dt
0
exists.
294/670
Theorem
For a continuous causal linear time invariant system, the condition
for BIBO stability
R ∞is that the impulse response be absolutely
integrable, i.e., 0 |g (t)|dt exists.
Proof The input output relation in the time domain is
Z ∞
y (t) = g (τ )x(t − τ )dτ
0
295/670
If g (t) is not absolutely integrable we show that there are bounded
inputs which cause unbounded outputs. For instance
x(t) = sign(g (−t)), where the sign function is 1 when the
argument is positive, -1 when the argument is negative, and zero
when the argument is 0. Note that
Z ∞
y (t) = g (τ )x(t − τ )dτ
0
Z ∞
y (t) = g (τ )sign(−(t − τ ))dτ
0
using the input at t = 0 we have
Z ∞ Z ∞
y (0) = g (τ )sign(g (τ ))dτ = |g (τ )|dτ = ∞
0 0
296/670
Let the input x equal zero. If every initial condition set results y (t)
converging to zero, then the system is asymptotically stable.
For the LTI systems BIBO stability and asymptotic stability are
equivalent.
297/670
Example
An LTI system with the following transfer function
3(s + 2)
(s + 5)(s + 1)(s − 4 + i)(s − 4 − i)
Example
An LTI system with impulse response
y (t) = 3 sin(2t)
298/670
Some facts
1. If all the poles are located in the open left half plane (OLHP),
then the system is BIBO stable (equivalently, asymptotically stable).
299/670
2. If there are some poles in the open right half complex plane
(ORHP), then the impulse response is asymptotically (as time
tends to innity) unbounded. ∴ Such systems are not BIBO stable.
300/670
3. If there are only simple poles on the imaginary axis, and no poles
in the ORHP, then the impulse response is bounded. However, such
systems are not BIBO stable.
Case 1 If there is a simple pole at the origin (all the other poles in
OLHP), then the steady-state impulse response is a constant.
Case 2 If there is a pair of imaginary poles at ∓iw (all the other
poles in OLHP), then the steady state impulse response is
sinusoidal with angular frequency w .
Systems in Case 1 and Case 2 are called critically stable.
Note that such systems are BIBO unstable, since they produce
unbounded outputs in response to certain bounded inputs
(Figure 7).
301/670
Figure: 7 Its t.f.: (s+a)(s 2 +w 2 ) .
n(s)
Its response to input R(s):
A
s+a + Bs+C
s 2 +w 2 + R1 (s) ↔ Ae −at
+ K1 sin wt + K2 cos wt + r1 (t) Its
response to sin wt : n(s) A
= s+a w
+ sBs+C Ds+E
2 +w 2 + (s 2 +w 2 )2 ↔
(s+a)(s 2 +w 2 ) s 2 +w 2
Ae −at + K1 sin wt + K2 cos wt + t(K3 sin wt + K4 cos wt)
302/670
4. If there are repeated poles on the imaginary axis, then the
impulse response is asymptotically unbounded.
In the above analysis it is assumed that n(s) and d(s) have no
common roots.
303/670
Routh stability analysis
304/670
Routh's Algorithm
s 6 + 7s 5 − 11s 4 + 2s 3 + s 2 + 8s + 1 = 0
s 4 + 5s 2 + 2s + 7 = 0
Each of these two polynomials has at least one root with
nonnegative real part.
305/670
a0 s n + a1 s n−1 + a2 s n−2 + a3 s n− + ... + an−1 s + an = 0, a0 > 0
3
sn a0 a2 a4 a6 ...
s n−1 a1 a3 a5 a7 ...
s n−2 b1 b2 b3 b4 ...
s n−3 c1 c2 c3 c4 ...
..
.
s2 e1 e2
s1 f1
s0 g1
a1 a2 − a0 a3 a1 a4 − a0 a5 a1 a6 − a0 a7
b1 = , b2 = , b3 = , .....
a1 a1 a1
b1 a3 − a1 b2 b1 a5 − a1 b3 b1 a7 − a1 b4
c1 = , c2 = , c3 = , .....
b1 b1 b1
306/670
sn a0 a2 a4 a6 ...
s n−1 a1 a3 a5 a7 ...
s n−2 b1 b2 b3 b4 ...
s n−3 c1 c2 c3 c4 ...
..
.
s2 e1 e2
s1 f1
s0 g1
Multiplying a row in the array by a positive number does not
change the result of the stability analysis.
307/670
Formulas for the derived array elements:
a1 a2 − a0 a3 a1 a4 − a0 a5 a1 a6 − a0 a7
b1 = , b2 = , b3 = , .....
a1 a1 a1
b1 a3 − a1 b2 b1 a5 − a1 b3 b1 a7 − a1 b4
c1 = , c2 = , c3 = , .....
b1 b1 b1
If, in any formula, both products are undened then the result is
blank.
If only one product is undened then take that undened product
as zero.
308/670
sn a0 a2 a4 a6 ...
s n−1 a1 a3 a5 a7 ...
s n−2 b1 b2 b3 b4 ...
s n−3 c1 c2 c3 c4 ...
..
.
s2 e1 e2
s1 f1
s0 g1
Number of roots with positive real part = number of sign changes
in the 1st column.
309/670
Polynomial interpretation of Routh array rows (will be used in
Special Case 2 that lies ahead)
310/670
Some Special Cases
Case 1
Zero as 1st element in a row and no other term in the row; or
Zero as 1st element in a row and a nonzero term in the row
Example 1 ∗ ∗
∗
0
Example 2 ∗ ∗ ∗ ∗ ∗
∗ ∗ ∗ ∗ ∗
0 7 0 2
Example 3 ∗ ∗ ∗
∗ ∗
0 2
Solution: Replace 0 with a positive number ε
311/670
Some Special Cases-Ctd.
Case 2
Zero as 1st element in a row and all others are zero
Example ∗ ∗ ∗ ∗ ∗ ∗
∗ ∗ ∗ ∗ ∗ ∗
0 0 0 0 0
Example s5 ∗
s4 ∗
s3
s2
s1
s0
312/670
Some Special Cases-Ctd.
313/670
Example
Does a0 s 3 + a1 s 2 + a2 s + a3 = 0 have all roots in the OLHP?
s3 a0 a2
s2 a1 a3
s1 a1 a2 −a0 a3
a1
s0 a3
314/670
Example
s 4 + 2s 3 + 3s 2 + 4s + 5 = 0
s4 1 3 5
no ch. ↓
s3 2 4
no ch. ↓
2×3−4×1 2x 5−0
s2 2 =1 2 =5
ch. ↓
1×4−2×5
s1 1 = −6
ch. ↓
s0 5
Conclusion: Two roots have positive real parts.
315/670
Example
s 3 + 2s 2 + s + 2 = 0
s3 1 1
no ch. ↓
s2 2 2
|
s1 0 → ε
no ch. ↓
s0 2
316/670
Example
s 3 − 3s + 2 = 0 i.e., (s − 1)2 (s + 2) = 0
s3 1 −3
|
s2 0∼
=ε 2
ch. ↓
2
s 1 −3 − ε
ch. ↓
s0 2
317/670
Example
s 5 + 2s 4 + 24s 3 + 48s 2 − 25s − 50 = 0
s5 1 24 −25
s 4 2 48 −50
s3 0 0
s3 8 96 0
s 2 24 −50
s 1 112.7
ch. ↓
s0 −50
Conclusion: One sign change, that is, one root with positive real
part. Because of the zero row at s 3 (i.e., Case 2) there is a root
pair lying radially opposite. They are obtained by solving
2s 4 + 48s 2 − 50 = 0
318/670
Continued from the previous page
s 5 + 2s 4 + 24s 3 + 48s 2 − 25s − 50 = 0
s5 1 24 −25
s4 2 48 −50
s 3 0 0
s3 8 96
s2 24 −50
s 1 112.7
ch. ↓
s0 −50
2s 4 + 48s 2 − 50 = 0
→ s 2 = 1 and s 2 = −25. Which leads to the roots −1, 1, −5i, 5i .
The other root, by computation, is −2.
319/670
Example
s 5 + 2s 4 = 0
s5 1
s4 2
s3
s2
s1
s0
Conclusion: A special case 3. Array ends at s 4 , so we have four
zeros as roots. Indeed, the roots are −2, 0, 0, 0, 0.
320/670
2nd Order Systems
Example
as 2 + bs + c = 0, a > 0, b > 0, c > 0
s2 a c
s1 b
s0 c
321/670
Relative Stability Analysis
Given
a0 s n + a1 s n−1 + · · · + an−1 s + an = 0
(22)
Want to know whether all the roots
are located to the left of Re(s) = −σ .
∆
Let s = ŝ − σ , then
If all the roots of (23) have negative real parts, Then Re(ŝ) < 0 for
all ŝ satisfying (23). Equivalently Re(s + σ) < 0, or, Re(s) < −σ
for all s satisfying the original equation (22).
322/670
Example
s3 1 38.36
2 11 41.8
f (s) = s 3 + 11s 2 + 38.36s + 41.8 s
∴ All its roots are in the OLHP. s 1 34.56
s 0 41.8
Yes, all the roots of f are to the left of −2. Indeed, the roots of f
are −2.2, −3.8, −5.
323/670
A Necessary Condition for Stability
Suppose that the polynomial D(s) has roots −p1 , −p2 , . . . , −pn
(for simplicity, assume that these are all real, but the following
analysis also holds if some of the roots are complex). The
polynomial can then be written as
324/670
(s + p1 )(s + p2 ) = s 2 + (p1 + p2 )s + p1 p2
(p1 p2 + p1 p3 + p2 p3 )s + p1 p2 p3
+(p1 p2 + p1 p3 + p1 p4 + p2 p3 + p2 p4 + p3 p4 )s 2
+(p1 p2 p3 + p1 p2 p4 + p1 p3 p4 + p2 p3 p4 )s + p1 p2 p3 p4
326/670
Some Remarks
327/670
The Hurwitz notation
Let P(s) = a0 s n + a1 s n−1 + · · · + an−1 s + an = 0, with all
coecients positive. Form an n × n Hurwitz matrix
0 0 0
a1 a3 a5 . . . . . . . . .
.. .. ..
. . .
a0 a2 a4
.. .. ..
0 a1 a3 . . .
. .. ..
. ..
. a0 a2 . 0 . .
. . .. ..
.
H = . 0 a1 . . an . . .
. . . ..
.. .. a .. a 0 .
0 n−1
. . ..
.. .. 0 an−2 an .
. . .
. . .
. .
. 0
an−3 an−1
0 0 0 ... ... ... an−4 an−2 an
328/670
Leading principal minors of H are
a1 a3 a5
a1 a3
∆1 = a1 , ∆2 = , ∆3 = a0 a2 a4 ,...
a0 a2
0 a1 a3
329/670
Hurwitz Theorem
All the roots of the polynomial
have the real part negative if and only if all the leading principal
minors of the matrix H are positive.
330/670
Example
P(s) = s 3 + s 2 + s + 1
1 1 0
1 1 0
0 1 1
∆1 = 1, ∆2 = ∆3 = 0
∴ P does not have all the roots in the OLHP.
331/670
Example
0 1 17 6
∆1 = 7, ∆2 = 102, ∆3 = 1440, ∆4 = 8640
∴ P has all the roots in the OLHP.
332/670
HermiteBiehler theorem and stability
Let
P(s) = p0 + p1 s + p2 s 2 + · · · + pn s n
For every frequency w ∈ R we can write
P(iw ) = PR (w ) + iPI (w )
333/670
Example
P(s) = s 6 + 2s 5 + 4s 4 + 6s 3 + 4s 2 + 3s + 1
P(iw ) = (−w 6 + 4w 4 − 4w 2 + 1) + i(2w 5 − 6w 3 + 3w )
PR = −w 6 + 4w 4 − 4w 2 + 1, PI = 2w 5 − 6w 3 + 3w
Roots of PR : (−1.6180, 1.6180, −1.0000, −0.6180, 1.0000, 0.6180)
Roots of PI : (0, −1.5382, −0.7962, 1.5382, 0.7962)
Positive roots arranged in ascending order:
334/670
HermiteBiehler Theorem
Let P(s) = p0 + p1 s + p2 s 2 + · · · + pn−1 s n−1 + pn s n be a given real
polynomial of degree n. Then P(s) is Hurwitz stable if and only if
(a) All the roots of PR and PI are real and distinct, and
(b) pn and pn−1 are of the same sign, and
(c) Positive real zeros satisfy the following interlacing property
0 < we 1 < wo 1 < we 2 < wo 2 < · · ·
Example
Recall that for P(s) = s 6 + 2s 5 + 4s 4 + 6s 3 + 4s 2 + 3s + 1 we have
we 1 , we 2 , . . . = (0.6180, 1.0000, 1.6180)
wo 1 , wo 2 , . . . = (0.7962, 1.5382)
Conditions (a), (b) and (c)are satised. In particular, the
interlacing is satised as:
0 < 0.6180 < 0.7962 < 1.0000 < 1.5382 < 1.6180
336/670
Steady state error analysis
Denitions
N = 0 → Type 0 system
N = 1 → Type 1 system
..
.
337/670
1
ess = lim e(t) = lim sE (s) = lim s R(s)
t→∞ s→0 s→0 1 + G (s)H(s)
Note that, the nal value theorem is applicable if the closed-loop
system above is stable.
338/670
Figure: Inputs referred in this section
339/670
Static Position Error Constant Kp
1 s 1 1
R(s) = → ess = lim =
s s→0 1 + G (s)H(s) s 1 + lims→0 G (s)H(s)
1
=:
1+ Kp
|{z}
st.pos. err. cons.
Type 0 system
K (Ta s + 1)(Tb s + 1) · · · 1
Kp = lim 0
= K → ess =
s→0 s (T1 s + 1)(T2 s + 1) · · · 1+K
Type 1 system
K (Ta s + 1)(Tb s + 1) · · ·
Kp = lim = ∞ → ess = 0
s→0 s 1 (T1 s + 1)(T2 s + 1) · · ·
It can be shown that Kp = ∞ for type 2,3,... systems.
340/670
Static Velocity Error Constant Kv
1 s 1 1
R(s) = 2
→ ess = lim 2
= lim
s s→0 1 + G (s)H(s) s s→0 sG (s)H(s)
1
=:
Kv
|{z}
st.vel. err. cons.
Type 0 system
K (Ta s + 1)(Tb s + 1) · · ·
Kv = lim s = 0 → ess = ∞
s→0 s 0 (T1 s + 1)(T2 s + 1) · · ·
Type 1 system
K (Ta s + 1)(Tb s + 1) · · · 1
Kv = lim s 1
= K → ess =
s→0 s (T1 s + 1)(T2 s + 1) · · · K
Type 2 system
K (Ta s + 1)(Tb s + 1) · · · 1
Kv = lim s = ∞ → ess = =0
s→0 s 2 (T1 s + 1)(T2 s + 1) · · · ∞
341/670
Static Acceleration Error Constant Ka
t2 1 1 1
r (t) = , R(s) = 3 → ess = lim s
2 s s→0 1 + G (s)H(s) s 3
1
= 2
lim s G (s)H(s)
|s→0 {z }
Ka
342/670
Homework
Railway barriers
343/670
Continued from the previous page
A railway barrier is controlled by a dc motor. When the gate is
closed dc motor's output angle is θ = 0 radians. Gate open
corresponds θ = π2 radians (Figure 10).
Figure: 10 Gate open and gate closed cases for the railway barrier HW
344/670
Continued from the previous page
Let the dc motor have the following i/o relationship:
Θ(s) 1
= 2
Ea (s) s + 3s + 2
1 1
π
Θ(s) = −
2 s s +1
345/670
Continued from the previous page
Θ(s) 1
= 2
Ea (s) s + 3s + 2
π 1 1
Θ(s) = −
2 s s +1
s 2 + 3s + 2 π 1 1 π 2
−→ Ea (s) = × − = [ + 1]
1 2 s s +1 2 s
π
ea (t) = πu(t) + δ(t)
2
This input signal is so hard to generate! Even it is generated, it is
very sensitive to the accuracy of the tf model.
∴ Open-loop position control with a dc motor is not recommended.
346/670
Continued from the previous page
347/670
Continued from the previous page
348/670
Motion control of a car
mv̇ = u − bv
V (s) 1
=
U(s) ms + b
349/670
V (s) 1
=
U(s) ms + b
Let us see whether this transfer function makes sense or not.
Notice this is a low pass lter transfer function.
Let us apply a step force and see the response. We do it by
pressing the gas pedal, for instance, half way down and holding it
there. Let this pedal position correspond 500 N force. Also let
m = 1000 kg , b = 50 N·sm . Then
V (s) 1
=
U(s) 1000s + 50
350/670
The speed settles at 10 m/s (36 km/h)
351/670
Regarding its forceinput-speed output relationship, a car can be
represented by a 1st order transfer function shown below:
352/670
Closed loop tf equals vREF
v K
= 1000s+ 50+K . For a cruising speed of
10 m/s, let vREF = 10 and K = 2. Corresponding system response
is shown in the next slide.
353/670
The graph shows that output is not close to the reference input. It
doesn't make much dierence how we choose K value. We need to
use a controller that better ts to the conguration: Integral
control.
354/670
Closed loop tf equals vREF
v K
= 1000s 2 + 50s+K . Its response to
VREF = 10m/s , when K = 2, is shown in the next slide.
355/670
The reference input and the steady state value of the speed output
now match. However the response has a large rise time. This can
be improved by changing the integral controller factor suitably. A
graphics for K = 4 is shown next.
356/670
357/670
Root locus analysis
359/670
Example
K C (s) K
G (s) = , = 2
s(Js + B) R(s) Js + Bs + K
360/670
As K increases from 0 to ∞, the root locations change. Each one
follows a path called its trajectory.
361/670
We want to nd the roots of 1 + G (s)H(s) = 0, equivalently, we
want to solve G (s)H(s) = −1. This can be decomposed into two
parts:
|G (s)H(s)| = 1, (magnitude condition)
and
G (s)H(s) = ∓π(2k + 1), k = 0, 1, . . . (angle condition)
362/670
Review of the related Complex Calculus
β
P : angle of point P = arctan −α , (region 2)
|P|:magnitude of P = α + β 2 2
p
363/670
Continued from the previous page
364/670
Let z1 and z2 be two points on the complex plane. The graphical
representation of z1 − z2 is as follows:
365/670
Let z1 = 1 + 3i and z2 = 1 + i . Let us verify our claim:
366/670
Apply this idea to the angle computations of the transfer functions.
K (s+3)
Let G (s)H(s) = (s+1)(s+2) . Find angle of G (s)H(s) at s = 2i :
G (2i)H(2i) = K + 2i + 3 − 2i + 1 − 2i + 2
G (2i)H(2i) = 0 + Φ1 − Θ1 − Θ2
367/670
K (s+3)
G (s)H(s) = (s+ 1)(s+2) We want to use the test point s together
with the poles and zeros:
368/670
Let us compare the two sketches together below:
369/670
An identity:
g1 (s)g2 (s)
f1 (s)f2 (s)
= g1 (s) + g2 (s) − { f1 (s) + f2 (s)}
Example
When s = 2i , the expression above becomes
g1 (2i)g2 (2i)
f1 (2i)f2 (2i)
= g1 (2i) + g2 (2i) − { f1 (2i) + f2 (2i)}
Verify it for
g1 (s) = 2s + 1, g2 (s) = 3s, f1 (s) = s + 5, f2 (s) = s 2 + 3
370/670
Review
371/670
Root Locus Denition
In other words:
Root locus is a sketch of the set of s values satisfying
1 + G (s)H(s) = 0 for K in [0, ∞).
372/670
Example
K (s + z1 )
G (s)H(s) =
(s + p1 )(s + p2 )(s + p3 )(s + p4 )
Given that K positive real.
Which s values satisfy 1+G(s)H(s)=0?
If the angle condition is satised for some s , then this s satises
1 + G (s)H(s) = 0 for a suitable choice of K .
G (s)H(s) = K + s + z1 −{ s + p1 + s + p2 + s + p3 + s + p4 }
373/670
Continued from the previous page
Graphically
G (s)H(s) = K + s + z1 −{ s + p1 + s + p2 + s + p3 + s + p4 }
G (s)H(s) = φ1 − {θ1 + θ2 + θ3 + θ4 }
374/670
Example
Root Locus of a Second Order System
K G (s) ∗
G (s)H(s) = → =
s(s + 1) 1 + G (s)H(s) s(s + 1) + K
Sketch the root locus (i.e., points satisfying the angle condition)
G (s)H(s) = K
s(s+1)
= 0 − { s + s + 1}
375/670
Continued from the previous page
G (s)H(s) = K
s(s+1)
= −{ s + s + 1}
The point i does not satisfy the angle condition, therefore, it is not
on the root locus.
The point −0.5 + 0.5i satises the angle condition, therefore, it is
on the root locus.
376/670
K
G (s)H(s) =
s(s + 1)
Example
Take s = − 41 . It is on the root locus. Find the corresponding K .
−1 −1
|G ( )H( )| = 1
4 4
|K | 3
−1 −1
=1→K =
|( 4 )( 4 + 1)| 16
Conclusion s = −1
4 is a pole for G (s)
1+G (s)H(s) . This pole occurs when
3
K= 16
378/670
K
G (s)H(s) =
s(s + 1)
Example
−1
Take s = 2 + 2i
K
| −1
| = 1 → K = 4.25
( 2 + 2i)( −21 + 2i + 1)
Conclusion s = −1
2 + 2i is a pole for G (s)
1+G (s)H(s) . This pole occurs
when K = 4.25
Looking at the phase plot, we see that the roots are in the LHP for
all values of K . Second order systems with positive coecients are
always stable.
379/670
380/670
Properties of Root Locations (Loci)
(Chen, Analog and Digital Control System Design, Saunders
College Publishing,1992)
381/670
Digression: Continuity of the roots of a polynomial in terms
of its coecients
383/670
Property 1
The root locus plot consists of n continuous trajectories as K varies
continuously from 0 to ∞. The trajectories are symmetric with
respect to real axis.
KN(s)
Recall the closed loop tf: T (s) = D(s)+KN(s)
The denominator
D(s) + KN(s) (24)
of the closed-loop system has degree n Because the roots of a
polynomial are continuous functions of its coecients, the n roots
form n continuous trajectories as K varies from 0 to ∞. When K
changes continuously from 0 to ∞, The coecient of the
polynomial D(s) + KN(s) changes continuously. This results in
continous root location trajectories.
Does the root locus have parts on the real axis? Which sections of
the real axis are on the root locus?
Every section of the real axis with an odd number of real poles and
zeros (counting together) on its right side is a part of the root
locus plot for K ≥ 0.
If K ≥ 0, the root locations consist of those s with total phases
equal to π radians. Recall that we have assumed q > 0, thus the
total phase of G (s) is contributed by poles and zeros only.
385/670
Example
Consider
s +4
G (s) =
(s − 1)(s + 2)
Their poles and zeros are plotted below.
386/670
Continued from the previous page
Choose a test point s1 = −2.5, and draw vectors from poles and
zeros to s1 , then
s+4
G (s) = (s−1)(s+2)
= s + 4 − ( s − 1 + s + 2)
= 0 − (π + π) = −2π
the phase of G (s1 ) is −2π , which is not an odd multiple of π . Thus
1 + KG (s) = 0 is not satised for s1 for any K .
387/670
Continued from the previous page
If we choose s2 = 0 and draw vectors from the poles and zero to s2 ,
then the total phase is
s + 4 − ( s − 1 + s + 2) = 0 − (π + 0) = −π
388/670
The vector s + a with −a and s are on the real axis, has angle
either 0 or π .
389/670
Property 3
N(s)
The n trajectories migrate from the poles of G (s) = D(s) as K
increases from 0 to ∞. They go towards the zeros of G (s).
Recall that closed loop system's transfer function is
KN(s)
T (s) = D(s)+KN(s) .
390/670
q(s + z1 )(s + z2 )......(s + zm )
G (s) = , q > 0, n ≥ m
(s + p1 )(s + p2 )....(s + pn )
391/670
Property 4
392/670
Consider G (s) = (s+3+i)(s+3−i)(s+1 2+i)(s+2−i)(s+1)
When the test point s is very large, the poles can be replaced with
their equivalents. For instance, angle condition for pole zero cong.
below is:
0 − (θ1 + θ2 + θ3 + θ4 + θ5 ) = π(2n + 1), n = 0, ±1, ±2, . . .?
393/670
The equivalent conguration: Each of the ve poles is located at
-2.2.
Angle condition for pole zero cong. 2:
0 − (θ + θ + θ + θ + θ) = π(2n + 1), n = 0, ±1, ±2, . . .?
394/670
Property 4 says:
Asymptotes emit from
poles − zeros
P P
( , 0)
number of poles - number of zeros
For the example above:
(−3 − 3 − 2 − 2 − 1) − (0)
= −2.2
5−0
These (n − m) asymptotes have angles
±π ±3 × π ±5 × π
, , , ......
n−m n−m n−m
For the example above: 5,3 × 5,5 × 5,7 × 5,9 × 5
π π π π π
395/670
To the test point below, we have 5 vectors such that each is from
-2.2 to s and each has angle π5 radians.
If a test point is on the asymptote, the it satises the angle
condition.
396/670
1
The root locus for the tf G (s) = (s+3+i)(s+3−i)(s+2+i)(s+2−i)(s+1)
397/670
s+1
Given an open-loop tf G (s) = (s+2)(s+3)(s+4)(s+7) , as an example.
It has the centroid ( (−2)+(−3)+(−4)+(−7)−(−1)
4−1 , 0) = (−5, 0)
3×π 5×π 7×π
and asymptote angles ± 3 , ± 3 , ±
π
3 ,± 3 , . . .. Only three of
the angles are distinct: π3 , π, 53π .
398/670
Algebraic Justication
For a very large test pt. s , the pole and zeros can be considered to
cluster at the same point, say a.
G (s) can be approximated as
399/670
Continued from the previous page
q(s + z1 )(s + z2 )....(s + zm ) q
≈
(s + p1 )(s + p2 )....(s + pn ) (s − a)n−m
(s + p1 )(s + p2 )....(s + pn )
→ ≈ (s − a)n−m
(s + z1 )(s + z2 )....(s + zm )
s n + ( pi )s n−1 + · · ·
P
(s + p1 )(s + p2 ) · · · (s + pn )
= m ≈ (s−a)n−m
s + ( zi )s m−1 + · · ·
P
(s + z1 )(s + z2 ) · · · (s + zm )
Note that
Therefore,
s n + ( pi )s n−1 + · · ·
P
≈ s n−m − (n − m)as n−m−1 + · · ·
s m + ( zi )s m−1 + · · ·
P
400/670
Continued from the previous page
s n + ( pi )s n−1 + · · ·
P
≈ s n−m − (n − m)as n−m−1 + · · ·
s m + ( zi )s m−1 + · · ·
P
poles − zeros
P P P P
(−pi ) − (−zi )
→a= =
n−m number of poles- number of zeros
401/670
Property 5
Breakaway points: Solutions of D(s)Ṅ(s) − Ḋ(s)N(s) = 0.
N(s) 4
Consider the transfer function G (s) = D(s) )(s+2) . Its closed
= (s−1s+
KG (s) KN(s)
loop transfer function is T (s) = 1+KG (s) = D(s)+KN(s) . As K
increases, the two roots of D(s) + KN(s) move away from poles at
1 and -2 and move toward each other inside the section [−2, 1]. As
K continues to increase, the two roots eventually collide and split
or breakaway. Such a point is called a breakaway point.
402/670
Continued from the previous page
f (s) = s 2 + 2s + 1
has repeated roots at s0 = −1. Therefore,
f (−1) = s 2 + 2s + 1 s=−1 = 0
and
f 0 (−1) = [2s + 2]s=−1 = 0
404/670
Continued from the previous page
Breakaway points,can be computed analytically. A breakaway point
is where two roots collide and breakaway; therefore, there are at
least two roots at every breakaway point. Let s0 be a breakaway
point of D(s) + KN(s). Then it is a repeated root of
D(s) + KN(s). Consequently we have
and
d
[D(s) + KN(s)]|s=s0 = Ḋ(s0 ) + K Ṅ(s0 ) = 0 (27)
ds
Solving (26) and (27) for K :
Ḋ(s0 )
D(s0 ) − N(s0 ) = 0
Ṅ(s0 )
which implies
D(s0 )Ṅ(s0 ) − Ḋ(s0 )N(s0 ) = 0
405/670
Continued from the previous page
For
s +4
G (s) =
(s − 1)(s + 2)
we have
D(s) = s 2 + s − 2 → Ḋ(s) = 2s + 1
N(s) = s + 4 → Ṅ(s) = 1
D(s)Ṅ(s) − Ḋ(s)N(s) = s 2 + 8s + 6 = 0
Its roots are -0.8 and -7.2. Thus the root locus trajectories have
breakaway points A=-0.8 and B=-7.2.
For this example, two solutions yield two breakaway points. In
general, not every solution is necessarily a breakaway point for
K ≥ 0. Although breakaway points occur mostly on the real axis,
they may appear elsewhere.
406/670
Property 6
Angle of departure or arrival. Consider the transfer function
2(s + 2)
G2 (s) =
(s + 3)2 (s + 1 + i 4)(s + 1 − i 4)
Its root locus may have the form shown below:
407/670
Continued from the previous page
2(s+2)
However, G2 (s) = (s+3)2 (s+1+i 4)(s+1−i 4)
has the following actual
root locus:
408/670
Continued from the previous page
There are 4 poles so there are 4 trajectories. One departs from the
pole at -3 and enters the zero at -2. One departs from another pole
at -3 and moves along the asymptote on the negative real axis. The
last two trajectories will depart from the complex conjugate poles
and move toward the asymptotes with angles ± π3 .
409/670
Continued from the previous page
410/670
Continued from the previous page
411/670
Continued from the previous page
The angles can be measured,
or calculated, as 760 , 630 and
900 . Therefore, the total
phase of G2 (s) at s1 is
76 − (63 + 63 + 90 + θ1 )
= −140 − θ1
Note that there are two poles
at -3, therefore there are two
630 in the phase equation. In
order for s1 to be on the root
locus plot, the total phase
must be ±180. Thus we
have θ1 = 400 . This is the
angle of departure.
412/670
413/670
Example
Root Locus by Octave:
s=tf('s')
G=(s+1)/(s^2+3*s+1)
rlocus(G)
414/670
Example
1
G (s) = , H(s) = 1
s(s + 1)(s + 2)
415/670
Continued from the previous page
1
G (s) = , H(s) = 1
s(s + 1)(s + 2)
±π(2k+1)
Angle of asymptotes: 3−0 , k = 0, 1, . . .
(0−1−2)−(0)
Centroid: 3−0 = −1
Breakaway point formula is D(s)Ṅ(s) − Ḋ(s)N(s) = 0. Some text
equivalently has dK
ds = 0. Noting that D(s) + KN(s) = 0 gives the
poles, using this K = − D(s)
N(s) so that
dK D(s)Ṅ(s) − Ḋ(s)N(s)
= =0
ds (N(s))2
→ −iw 3 + i 2w = 0 and − 3w 2 + K = 0
√
These equations result in: w = ± 2 and K = 6.
417/670
Stability Range from Root Locations- Magnitude Condition
Example
Given
s 2 − 2s + 5 (s − 1 + 2i)(s − 1 − 2i)
G (s) = 3 2
=
s + 5s + 12s − 18 (s − 1)(s + 3 + 3i)(s + 3 − 3i)
418/670
Continued from the previous page
KG (s)
For the stability, the overall transfer function 1+KG (s) must have all
poles in the OLHP. The poles of the overall transfer function are
the roots of 1 + KG (s) = 0, that is,
s 3 + (5 + K )s 2 + (12 − 2K )s + (5K − 18) = 0. Note that,
necessarily all the coecients must be positive. Thus K > 3.6 and
K < 6 must be satised. If we form the Routh table for the
polynomial, we can further rene this interval as 3.6 < K < 5.54.
We shall recompute it by using the root- locus method.
419/670
Continued from the previous page
For the polynomial
1 12 - 2*K
K+5 5*K - 18
-(2*K2 + 3*K - 78)/(K + 5)
-(-10*K3+21*K2+444*K-1404)/(2*K2+3*K-78)
420/670
Continued from the previous page
The 1st crossing the iw axis at s = 0. Call the gain at this point K1 .
421/670
Continued from the previous page
The 1st crossing the iw axis at s = 0. Call the gain at this point K1 .
K1 (s − 1 + 2i)(s − 1 − 2i)
=1
(s − 1)(s + 3 + 3i)(s + 3 − 3i) s=0
K1 | − 1 + 2i| × | − 1 − 2i|
= 1 → K1 = 3.6
| − 1| × |3 + 3i| × |3 − 3i|
The second crossing is at s ≈ i . (Exact crossing pt. is i 0.952). Call
the gain at this point K2
K2 (s − 1 + 2i)(s − 1 − 2i)
=1
(s − 1)(s + 3 + 3i)(s + 3 − 3i) s=i
K2 | − 1 + 3i| × | − 1 − i|
= 1 → K2 = 5.7
| − 1 + i| × |3 + 4i| × |3 − 2i|
The conclusion is roughly the same as the one obtained by Routh
test.
422/670
Continued from the previous page
Some angle condition tests can show that Scenario 1 is the correct
one.
423/670
Example
(s + 2)
G (s) = √ √
(s + 1 − i 2)(s + 1 + i 2)
∓π(2k+1)
Angle of asymptotes 2−1 = ∓π(2k + 1)
424/670
Continued from the previous page
(s 2 + 2s + 3) − (s + 2)(2s + 2) = 0
√
s 2 + 4s + 1 = 0 → s = −2 ∓ 3
√
The good one is −2 − 3 = −3.73
425/670
Continued from the previous page
√
Angle of departure for −1 + i 2 is obtained by:
427/670
Continued from the previous page
Using the magnitude condition
K (s + 2)
√ √ =1
(s + 1 − i 2)(s + 1 + i 2) s=−1.67+i 1.67
K | − 1.67 + 1.67i + 2|
√ =1
| − 1.67 + 1.67i + 1 − j 2|| − 1.67 + 1.67i + 1 + 2i|
yields K = 1.33.
428/670
Example
429/670
Continued from the previous page
20(1 + ks)
G (s)H(s) =
s(s + 1)(s + 4)
20
G (s) s(s+1)(s+4)
T (s) = = 20(1+ks)
1 + G (s)H(s) 1 + s(s+ 1)(s+4)
s 3 + 5s 2 + 4s + 20 + 20ks
1 + G (s)H(s) = =0
s(s + 1)(s + 4)
Poles of T (s) satisfy s 3 + 5s 2 + 4s + 20 + 20ks = 0
Dene M := 20k then poles of T (s) satisfy
s 3 + 5s 2 + 4s + 20 + Ms = 0
Divide the above equation throughout by s 3 + 5s 2 + 4s + 20.
This gives the closed-loop system's 1 + MG (s)H(s) = 0 expression
as
Ms
1+ 3 =0
s + 5s 2 + 4s + 20
Thus
s s
→ G (s)H(s) = =
s3 + 5s 2 + 4s + 20 (s + 5)(s + i 2)(s − i 2)
431/670
Continued from the previous page
Poles of the following conguration satisfy
Ms
1+ =0
s3 + 5s 2+ 4s + 20
Ms
1+ =0
(s + 5)(s + i 2)(s − i 2)
432/670
Continued from the previous page
Ms
20 T2 = 3 2
T1 = 3 s + 5s + 4s + 20 + Ms
s + 5s 2 + 4s + 20 + 20ks 20ks
T2 = 3
s + 5s 2 + 4s + 20 + 20ks
Systems on the left and on the right have the same pole locations.
The one on the right is suitable for the root locus analysis method.
433/670
Continued from the previous page
434/670
Continued from the previous page
435/670
Continued from the previous page
Angle of departure from i 2: 90 − (90 + 21.8 + θ) must equal an
odd multiple of 180. That is, θ = 158.20
436/670
Continued from the previous page
Suppose we want ζ = 0.4. This implies β = 66.420 . A pole
s = t(−1 + i 2.291) is on the β = 66.420 line. There are two
solutions:
s = −1.04 + i 2.41 → M = 8.9 → k = 20 M
= 0.449
s = −2.15 + i 4.96 → M = 28.26 → k = 20 = 1.4130
M
437/670
Continued from the previous page
Original system
Y (s) 20
=
R(s) s(s + 1)(s + 4) + 20(1 + ks)
When k = 0.449 the transfer function becomes:
Y (s) 20
= 3 2
R(s) s + 5s + 12.98s + 20
438/670
Continued from the previous page
Y (s) 20
= 3
R(s) s + 5s 2 + 12.98s + 20
Its unit step response
440/670
Continued from the previous page
a. For which values of K , the closed loop system is stable?
b. Find time response of the system to π2 u(t) for various K gains.
441/670
Continued from the previous page
443/670
Continued from the previous page
444/670
Continued from the previous page
445/670
Continued from the previous page
446/670
Example
1
Given a unity feedback system with G (s) = s(s+ 1) . We desire
closed loop system poles to be at −2 ± i . Design a compensator
C (s) for this task.
447/670
Continued from the previous page
One can see that for no K we can get the desired roots.
448/670
Continued from the previous page
Let us try C (s) = K (s + 3). This amounts to modifying the
1 (s+3)
previous G (s) = s(s+ 1) to G1 (s) = s(s+1) and plot the root locus:
449/670
Continued from the previous page
Next we may try C (s) = K (s + 2.5). If we are lucky enough we
may get closer to the desired roots.
450/670
Properness and well-posedness
Example
The transfer function of the plant and the compensator are proper.
The transfer function Gyr (s) from r to y is
−(s+1) s
s+2 s+1 −0.5s
Gyr (s) = 1) s
=
1 + −(s+ 1
s+2 s+1
It is improper.
451/670
Continued from the previous page
The properness of all components of the feedback system does not
guarantee the properness of an overall transfer function.
452/670
Continued from the previous page
Suppose r (t) = sin t and n(t) = 0.01 sin(10000t), where r (t)
denotes a reference signal and n(t) denotes a high frequency noise.
Because the transfer function is −0.5s , the plant output is simply
the derivative of r (t) + n(t), scaled by −0.5. Therefore, we have
y (t) = −0.5 dt
d
[sin t + 0.01 sin(10000t)]
= −0.5 [cos t + 100 cos(10000t)]
= −0.5 cos t − 50 cos(10000t)
Although the magnitude of the noise is one hundredth of that of
the reference signal at the input, it is 100 times larger at the plant
output. Therefore, the plant output is largely dominated by the
noise and the system cannot be used in practice.
453/670
Well-posedness
Denition
A system is said to be well-posed or closed loop proper if the closed
loop transfer function of every possible input output pair of the
system is proper.
454/670
Total stability
455/670
Example
s−1 1
s+1 s−1 2
G0 (s) = 2 × 1 1 =
1 + s−
s+1 s−1
s +2
It is stable. Any bounded input applied to this system produces a
bounded output. Thus the system appears to be a good control
system.
456/670
Continued from the previous page
457/670
Continued from the previous page
458/670
Continued from the previous page
s +1
Y (s) = Gyn (s)N(s) = × N(s)
(s − 1)(s + 2)
A B
= + + ···
s −1 s +2
↔ Ae t + Be −2t + · · ·
459/670
Total Stability
Denition
A system is said to be totally stable if the closed loop transfer
function of every possible input output pair of the system is stable.
In the above example we see that if a plant has an unstable pole, it
is useless to eliminate it by direct cancellation. Although the
cancelled pole does not appear in the transfer function G0 (s) from r
to y , it appears in the transfer function from n to y . Any unstable
pole zero cancellation will not actually eliminate the unstable pole,
only make it hidden from some closed loop transfer functions.
If the overall transfer function from r to y is stable and if there is
no unstable pole/zero cancellation, then system is totally stable.
460/670
A test for well-posedness
461/670
Pole placement
463/670
Consider a plant with transfer function
1
G (s) =
s(s + 2)
and consider a unity feedback conguration given above. If the
compensator C (s) is a gain of K then the overall transfer function
can be computed as
KG (s) K
G0 (s) = = 2
1 + KG (s) s + 2s + K
464/670
KG (s) K
G0 (s) = = 2
1 + KG (s) s + 2s + K
This G0 (s) has two poles. These two poles cannot be arbitrarily
assigned by choosing a value for K . For example if we assign two
poles at −2 and −3, then the denominator of G0 (s) must equal
(s + 2)(s + 3) = s 2 + 5s + 6
s 2 + 2s + K
465/670
Next let the compensator be proper and of degree 1, or
B0 + B1 s
C (s) =
A0 + A1 s
with A1 6= 0. Then the overall transfer function becomes
C (s)G (s) B1 s + B0
G0 (s) = =
1 + C (s)G (s) A1 s + (2A1 + A0 )s 2 + (2A0 + B1 )s + B0
3
This G0 (s) has three poles. If, for instance, we assign three poles of
G0 (s) as −2, −2 + 2i , −2 − 2i , then D(s) becomes
466/670
The corresponding compensator is
8s + 16
C (s) =
s +4
This compensator will place the poles of G0 (s) at −2, −2 + 2i ,
−2 − 2i . Indeed, using this compensator we obtain
8s + 16
G0 (s) =
s3 + 6s 2 + 16s + 16
Note that the compensator also introduces zero 8s + 16 into G0 (s).
We have no control over this zero.
467/670
For a proper functioning:
A control system must be Totally stable and Well posed.
468/670
Frequency response methods
x(t) = A sin(wt)
∆ p(s) ∆ p(s)
G (s) = =
q(s) (s + s1 )(s + s2 ) · · · (s + sn )
p(s) Aw
Y (s) = G (s)X (s) = q(s) · s 2 +w 2
a a b1 b2 bn
= s+iw + s−iw + s+s1 + s+s2 + ··· + s+sn
469/670
y (t) = ae −iwt + ae iwt + b1 e −s1 t + b2 e −s2 t + · · · + bn e −sn t
If G (s) is stable, then −s1 , −s2 , . . . , −sn have negative real parts.
This implies
∆
lim y (t) = ae −iwt + ae iwt = B sin(wt + φ)
t→∞
470/670
Frequency response from Pole-Zero Plots
K (s + z) K (iw + z)
G (s) = → G (iw ) =
s(s + p) iw (iw + p)
K |iw + z| K |AP|
|G (iw )| = =
|iw ||iw + p| |OP||BP|
w w
G (iw ) = iw + z− iw − iw + p = tan−1 −900 −tan−1 = Φ−θ1 −θ2
z p
471/670
Home Exercise
Given
3
G (s) =
(s + 2)(s + 7)
(a) Find |G (i 5)| G (i 5)
(b) Find its steady state response to 10 sin(5t)
Ans.
3
(a) (s+2)(s+ 7) = −0.015377 − 0.062908i = 0.0647 −1.8105
s=5i
(b) 0.647 sin(5t − 1.81)
472/670
Logarithmic Plots
x=[0.01 100 ];
y=[0.01 100];
loglog(x,y)
"LOGLOG(...) is the same as PLOT(...), except logarithmic scales
are used for both the X- and Y- axes."
473/670
Bode plots
474/670
Example
Let us obtain Bode plot for G (iw ) = K , K = 50.
475/670
Example
1 1
Let G (s) = s then G (iw ) = iw . Its Bode plot is
476/670
Example
Let G (s) = s then G (iw ) = iw . Its Bode plot is
477/670
Example
10
Plot G (s) = s .
10
G (iw ) =
iw
w log w |G (iw )| 20 log |G (iw )|
1 0 10 20
10 1 1 0
100 2 0.1 −20
478/670
Example
1
Plot G (s) = 1+sT asymptotically.
1
G (iw ) = 1+iwT
1
wT 1 → G (iw ) ≈ 1, (w → G (iw ) ≈ 1)
T
1 1 1
wT 1 → G (iw ) ≈ , (w → G (iw ) ≈ )
iwT T iwT
479/670
Example
10 10
Sketch Bode plot of G (s) = s(0.1s+1) , G (iw ) = iw (0.1iw +1)
10
20 log |G (iw )| = 20 log =
iw (0.1iw +1)
20 log 10 − 20 log |iw | − 20 log |0.1iw + 1|
480/670
Continued from the previous page
481/670
Continued from the previous page
482/670
Example
100
Sketch Bode plot of G (s) = s 2 (s+1)
483/670
Continued from the previous page
484/670
Example
G (s) = 0.1s + 1 What is the actual 20 log |G
√(iw )| at the corner
frequency? 20 log |0.1iw + 1|w =10 = 20 log 2 = 3dB . Dierence
between the actual and asymptotic values is the highest at the
corner frequency.
485/670
Continued from the previous page
486/670
Quadratic Factors
Consider
K
G (s) =
s2 + 2wn ζs + wn2
For the case that ζ > 1, the Bode Plot will have two distinct break
frequencies at each pole s1 and s2 . Each will cause the Bode curve
to decrease in slope by 20 dB/dec at the break frequency.
For the case that ζ = 1, the Bode plot will have a double break
frequency at s1 . This will cause the slope to decrease 40 dB/dec at
the break frequency.
487/670
For 0 < ζ < 1, G (iw ) = K
(iw )2 +2wn ζ(iw )+wn2
has magnitude
|K | |K /wn2 |
|G (iw )| = =
| − w 2 + iw (2ζwn ) + wn2 | | − (w /wn )2 + i(2w ζ/wn ) + 1|
At low frequencies wwn 1:
20 log |G (iw )| = 20 log |K /wn2 | (i.e., 0 dB/dec); G (iw ) = 00 ,
At high frequencies wwn 1:
w
20 log |G (iw )| = 20 log |K /wn2 | − 40 log( )
wn
(i.e., -40 dB/dec); G (iw ) = −1800 .
488/670
Example
Sketch the Bode plot of
10(iw + 3)
G (iw ) =
iw (iw + 2)((iw )2 + iw + 2)
10 · 3 · (iw /3 + 1)
G (iw ) =
iw · 2 · (iw /2 + 1) · 2 · ((iw )2 /2 + iw /2 + 1)
7.5(iw /3 + 1)
G (iw ) =
iw (iw /2 + 1)((iw )2 /2 + iw /2 + 1)
The magnitude plot could be decomposed as:
20 log |G (iw )| = 20 log |7.5| + 20 log |iw /3 + 1| − 20 log |iw | −
20 log |iw /2 + 1| − 20 log |(iw )2 /2 + iw /2 + 1|
489/670
Minimum phase systems
Minimum phase systems have all the poles and zeros in the LHP.
Otherwise a system is called a nonminimum phase system. If a
system is minimum phase, transfer function can uniquely be
determined from the magnitude curve. Consider the following two
sinusoidal transfer functions:
1 + iwT 1 − iwT
G1 (iw ) = and G2 (iw ) =
1 + iwT1 1 + iwT1
These two transfer functions have the same magnitude
characteristics:
12 + (wT )2 12 + (−wT )2
p p
|G1 (iw )| = p and |G2 (iw )| = p
12 + (wT1 )2 12 + (wT1 )2
However, their angle plots are dierent (Home exercise). For a
minimum phase system, the phase angle as w → ∞ is −90(p − z).
In either system, the slope of the log magnitude curve is
−20(p − z)dB/dec.
490/670
For a minimum phase system, the phase angle as w → ∞ is
−90(p − z).
Example
(1 + 2s )(1 + 3s )
G (s) =
(1 + 4s )(1 + 5s )(1 + 6s )(1 + 7s )(1 + 8s )
(1 + iw
2 )(1 + iw
3 )
→ G (iw ) =
(1 + iw
4 )(1 + iw
5 )(1 + iw
6 )(1 + iw
7 )(1 + iw
8 )
limw →∞ G (iw ) = limw →∞ (1 + iw
2 ) + limw →∞ (1 + 3 )
iw
900 + 900 − 900 − 900 − 900 − 900 − 900 = −2700 = −(p − z)900
A nonexample
(1 − 2s )(1 + 3s )
G (s) = , lim G (iw ) =?
(1 + 4 )(1 + 5s )(1 + 6s )(1 + 7s )(1 + 8s ) w →∞
s
491/670
Step response of nonminimum phase systems
492/670
Example
Consider the nonminimum system tf G and its step response shown
below:
4(1 − s)
G (s) =
(s + 2)(s + 3)
Note that the initial motion is towards the negative direction even
though the steady state value is positive. 493/670
Example
Longitudinal motion of aircraft cruising at a constant altitude has
the transfer function [Slotine and Li, Applied Nonlinear Control,
Prentice Hall, 1991]
Example
1 + 10s 1 − 10s
G1 (s) = 0.1 , G2 (s) = 0.1
| {z 1 + s } | {z 1 + s }
Min.Phase Nonmin.Phase
495/670
1 + 10s 1 − 10s
G1 (s) = 0.1 , G2 (s) = 0.1
1+s 1+s
Continued from the previous page
496/670
Using OCTAVE for Bode Plots
Example
497/670
Continued from the previous page
498/670
Transportation Lag
499/670
System type and Log Magnitude curve
Recall that G (s)H(s) is used for classifying the systems. Recall the
denition:
K (Ta s + 1)(Tb s + 1)...(Tm s + 1)
G (s)H(s) =
s N (T1 s + 1)(T2 s + 1)...(Tp s + 1)
Denitions
N = 0 → Type 0 system
N = 1 → Type 1 system
..
.
Notice that, for small w values (1 + iwT ) terms have very small
eects on G (iw )H(iw ). An approximation G (iw )H(iw ) ≈ (iwK)N
makes sense. To nd out the system type, therefore, we examine
Bode plot's behavior at small w values.
500/670
K (Ta iw + 1)(Tb iw + 1)...(Tm iw + 1)
G (iw )H(iw ) =
(iw )N (T1 iw + 1)(T2 iw + 1)...(Tp iw + 1)
501/670
502/670
Continued from the previous page
Type 0 system:
lims→0 G (s)H(s) = Kp , limw →0 G (iw )H(iw ) = Kp
20 log Kp = 30 → Kp = 31.6
503/670
Continued from the previous page
Type 1 system:
When w 1, G (iw )H(iw ) = Kiwv → 20 log | Kiwv |w =1 = 20 log Kv .
Besides, if | iw
Kv
1
| = 1 → 20 log | iw
Kv
1
|=0
In this case we have Kv = w1
504/670
Continued from the previous page
Type 2 system:
G (iw )H(iw ) = Ka
(iw )2
at very low frequencies. Also
= 1 → 20 log | (iwKaa)2 | = 0
| (iwKaa)2 |
√
In this case we have wa = Ka .
√ 10
wa = Ka → Ka = (3.16)2 = 10. Indeed G (s) = s 2 (1+0.1s)
.
505/670
Example
Obtain the transfer function H(iw ) corresponding to the Bode
diagram shown in the gure below.
506/670
Continued from the previous page
507/670
Polar plots
w |G (iw )| G (iw )
0 1 0
1 √1
.
T 2
−450
∞ 0 −900
508/670
Continued from the previous page
w |G (iw )| G (iw )
0 1 0
1 √1
.
T 2
−450
∞ 0 −900
1
Figure: 13 Polar plot of (1+iwT )
509/670
Continued from the previous page
The plot is a semicircle. To prove this, express G(iw )in
components:
1
G (iw ) =
1 + iwT
1 −wT
G (iw ) = 2 2
+i
1+w T 1 + w 2T 2
=: X + iY
1 1
(X − )2 + Y 2 = ( )2
2 2
Thus in the X-Y plane G (iw )is a circle with centre at X = 12 ,
Y = 0.
510/670
Example
Polar plot of G (s) = 1 + sT (or G (iw ) = 1 + iwT ) is given by
Figure 14.
G (s) = s → G (iw ) = iw
Polar plot is the positive imaginary axis
512/670
Quadratic Factors
wn2
G (s) = , wn i0, ζi0
s 2 + 2ζwn s + wn2
1
G (s) = 2
1+ 2ζ( wsn ) + ( ws 2 )
n
Example
1
G (iw ) =
1+ 2ζ(i wwn ) + (i wwn )2
w |G (iw )| G (iw )
0 1 0
1
wn 2ζ −900
∞ 0 −1800
513/670
Continued from the previous page
1
Figure: 15 Polar plot of 1+2ζ(j wwn )+(j wwn )2
w = 0, G (iw ) = 1 00
w = ∞, G (iw ) = ∞ 1800
Polar plot of 1 + 2ζ(i wwn ) + (i wwn )2 is given in Figure 17
515/670
Continued from the previous page
Let ζ = 0.5, G (iw ) = 1 + i wwn + (i wwn )2 ,
Label A B C D E F G H I
w 0.1wn 0.5wn wn 2wn 10wn 20wn 50wn 100wn 200wn
|G (s)| 0.9950 0.9014 1 3.6056 99.504 399.50 2499.5 9999.5 40000
G (s) 5.7679 33.690 90 146.31 174.23 177.13 178.85 179.43 179.71
516/670
Example
1
G (s) = s(Ts+1)
1 1
G (iw ) = iw (1+iw >) = − 1+w>2 >2 − i w (1+w 2 >2 )
w |G (iw )| G (iw )
0+ ∞ −900 .
∞ 0 −1800
1
Figure: 18 Polar plot of s(Ts+1)
517/670
Continued from the previous page
1
Let T = 1, G (iw ) = iw (1+iw )
1
Figure: 19 Polar plot of s(s+1)
Label A B C D E F G H I
w 0.001 0.01 0.1 0.5 1 2 5 10 50
|G (s)| 1000 99.99 9.9504 1.7889 0.7071 0.2236 0.039223 0.0099 0.00039
G (s) -90.057 -90.573 -95.711 -116.57 -135 -153.43 -168.69 -174.29 -178.85
518/670
Some Plotting Properties
519/670
Example
520/670
Do we have any relationship between G (a + ib) and G (a − ib)?
Are the images of blue and red segments related? In the answering
process we recall the following preliminaries:
∗
z1∗ z1
= (Prelim. 1)
z2∗ z2
521/670
Let p be polynomial with real coecients, i.e.,
This leads to
h i∗
p((re iθ )∗ ) = p(re −iθ ) = p(re iθ ) (Prelim. 2)
Conclusion:
∗
n(re iθ ) [n(re iθ )]∗ n(re −iθ )
∗
G (re iθ ) = = G (re −iθ )
= ∗
=
iθ
d(re ) iθ
[d(re )] d(re −iθ )
522/670
Example
523/670
Nyquist stability criterion
524/670
Example
1
Consider the function F (s) = s+
s−1 . Map the closed path Γs on the
left to the curve ΓF on the right.
s+1
Figure: An application of the mapping theorem when F (s) = s−1
525/670
Example
1
s−1 . Map the closed path Γs on the
Consider the function F (s) = s+
left to the curve ΓF on the right.
s+1
Figure: An application of the mapping theorem when F (s) = s−1
526/670
Example
1
Consider the function F (s) = s+
s−1 . Map the closed path Γs on the
left to the curve ΓF on the right.
s+1
Figure: An application of the mapping theorem when F (s) = s−1
527/670
Example
Find number of poles of s 3 −2s12 −s+2 in the region
{x + iy : 0 < x < 3, −3 < y < 3}.
1
Figure: Applications of the mapping theorem when F (s) = s 3 −2s 2 −s+2
528/670
Note that, for F (s), number of zeros in the region is 0, and number
of poles in the region is not known at this time. Graphics in Figure
25 shows that N = −2. Thus
Z − P = N → 0 − P = −2 → P = 2
G1 (s)C (s)
G0 (s) =
1 + G1 (s)C (s)
where G1 (s)C (s) is called the loop transfer function. The stability
of G0 (s) is determined by the poles of G0 (s) or zeros of the rational
function 1 + G1 (s)C (s) = 0. We already utilized two methods of
checking whether or not all zeros of 1 + G1 (s)C (s) have negative
real parts. The Routh test and the root locus method. Nyquist
criterion is the next one.
530/670
In the forward path, C and G1 can be multiplied and represented by
a single block, call G . For simplicity in presentation we use this
simpler conguration.
531/670
The Nyquist Plot
G (s)
Consider: G0 (s) = 1+G (s) The condition for G0 (s) to be stable is
that 1 + G (s) has no zero in the closed RHP as shown in the
gure, in which the radius R of the semicircle should be very large
or innity. The direction is arbitrarily chosen to be clockwise.
532/670
Notice that:
N(s)
G (s) D(s) N(s)
G0 (s) = = =
1 + G (s) N(s)
1 + D(s) D(s) + N(s)
533/670
N(s)
G (s) =
D(s)
N(s) D(s) + N(s)
1 + G (s) = 1 + =
D(s) D(s)
Notice that: Poles of G and poles of 1 + G are the same.
Dene
P: Number of poles of 1 + G in Γs .
Z: Number of zeros of 1 + G in Γs
N: Number of clockwise encirclement of the origin in the
1 + G plane
Relationship between N and Z-P:
N=Z-P
534/670
We next may map Γs to 1 + G (s) plane and may apply the formula
N = Z − P.
However, we can simplify the procedure further.
Note that 1 + G (s) and G (s) have the same poles.
Shifting G (s) 1 unit towards right, we obtain 1 + G (s).
So, the encirclement of the origin in the 1 + G (s) plane is
equivalent to the encirclement of (−1, 0) in the G (s) plane.
535/670
Example 1
8s
Positive Im axis image data under the mapping G (s) = (s−1)(s−2) :
Label A B C D E F G H I
s 0.05i 0.2i 0.5i i 1.5i 2i 5i 20i 50i
|G (s)| 0.199 0.780 1.735 2.529 2.662 2.529 1.456 0.397 0.159
G (s) 1.645 1.867 2.279 2.819 -3.086 -2.819 -2.148 -1.720 -1.630
536/670
8s
G (s) =
(s − 1)(s − 2)
Using these we can plot the polar plot of G (iw ) for w ≥ 0.
Because all the coecients are real we have G (−iw ) = G ∗ (iw )
where the asterisk denotes the complex conjugate. Thus the
mapping of G (iw ), for w ≤ 0, is simply the reection, with respect
to the real axis of the mapping of G (iw ) for w ≥ 0. Because G (s)
is strictly proper every point of the semicircle with R → ∞ mapped
by G (s) into 0.
537/670
The Nyquist plot of 1 + G (s) is simply the Nyquist plot of G (s)
shifted to the right by one unit. Therefore, encirclement of (−1, 0)
by G (s) is equivalent to the encirclement of the origin by 1 + G (s).
538/670
Label A B C D E F G H I
s 0.05i 0.2i 0.5i i 1.5i 2i 5i 20i 50i
|G (s)| 0.199 0.780 1.735 2.529 2.662 2.529 1.456 0.397 0.159
G (s) 1.645 1.867 2.279 2.819 -3.086 -2.819 -2.148 -1.720 -1.630
539/670
Figure: An image of positive Im axis under the mapping
8s
G (s) = (s−1)(s−2)
540/670
541/670
Now apply the mapping theorem:
1 + G (s) has Z zeros in the RHP (Z is unknown at this time).
D(s)+N(s)
1 + G (s) (i.e., = D(s) ) has 2 poles in the RHP (i.e., P=2).
Theorem says N = Z − P → −2 = Z − 2 → Z = 0.
Thus 1 + G (s) has no zeros in the RHP; closed loop system is
stable.
542/670
Example 2
Consider
s +1
G (s) =
s 2 (s − 2)
Its poles and zeros are shown on the complex plane. We are
interested in whether the closed loop system
G (s)
G0 (s) =
1 + G (s)
543/670
Mapping theorem assumes that the contour Γs does not pass
through the poles and zeros of the mapping function. To comply
with this, we modify the Nyquist contour as follows:
544/670
How many poles does the closed loop system have in the shaded
region?
The shaded region can be viewed as the RHP.
545/670
Digression: Innitely small numbers
Innitely small numbers are quantities that are closer to zero than
any standard real number, but are not zero. For an innitely small
number ε and a real number a, the following approximations make
sense:
a + ε ≈ a; a − ε ≈ a
For engineering purposes, these identities make sense for
comparatively small numbers.
Example
547/670
−1
G (s) ≈
2s 2
Its phase 1800 and its amplitude is very large because ε is very
small. Similarly
π e iπ 1 π
B : s = εe i 4 , G (B) = = 2 ei 2
2
2ε e i π2 2ε
e iπ 1
= 2 ei0
π
C : s = εe i 2 , G (C ) =
2ε2 e iπ 2ε
548/670
s |G (iw )| G (iw )
0.01i 5000 0.90
0.1i 50 90
i 0.6 710
10i 0.01 1620
s+1
Table: Polar plot data of G (s) = s 2 (s−2)
549/670
s+1
Figure: Polar plot of s 2 (s−2)
550/670
Now apply the mapping theorem:
1 + G (s) has Z zeros in the RHP (Z is unknown at this time).
1 + G (s) has 1 poles in the RHP.
1 + G (s) encircles the origin once in the cw direction (because
G (s) encircles −1 + i 0 once in the cw direction), i.e., N = 1.
Theorem says Z − P = N → Z − 1 = 1 → Z = 2. Thus 1 + G (s)
has 2 zeros in the RHP; closed loop system is unstable.
551/670
Example
Given that
s +3
G (s) = 10
(s + 2)(s − 2)
552/670
s +3
G (s) = 10
(s + 2)(s − 2)
553/670
s +3
G (s) = 10
(s + 2)(s − 2)
0 10 2(−3 2) = −7.5
04 0.16
0.5i 10 2.06 03..24 ×2.06 2.89
= 7.15 −2.97
24 0.78
3i 10 3.60 04..98 ×3.60 2.15
= 3.26 −2.35
.22 1.42
20i 10 20.09 120.47 ×20.09 1.67
= 0.5 −1.71
554/670
s +3
G (s) = 10
(s + 2)(s − 2)
0 −7.5
3i 3.26 −2.35
555/670
s +3
G (s) = 10
(s + 2)(s − 2)
556/670
s +3
G (s) = 10
(s + 2)(s − 2)
P = 1, N = −1
Z −P =N →Z =0
∴ System is stable
557/670
Nyquist Stability criterion:
Hypotheses
G (s)H(s) has no poles on the imaginary axis:
The open loop transfer function G (s)H(s) has k poles in the right
half s plane
and lims→∞ G (s)H(s) = constant
Conclusion For stability, the G (iw )H(iw ) locus, as w varies from
−∞ to ∞, must encircle the -1 + i 0 point k times in the
counterclockwise direction.
558/670
This criterion can be expressed as:
Z =N +P
Z
where
= number of zeros of 1 + G (s)H(s) in the right-half s plane
559/670
If G(s)H(s) does not have any poles in the right-half s plane, then
for stability there must be no encirclement of the -1 + i 0 point by
the G (iw )H(iw ) locus.
In this case it is not necessary to consider the locus for the entire
iw axis, only for the positive-frequency portion.
560/670
Example
K
G (s)H(s) = , K , T1 , T2 > 0
(T1 s + 1)(T2 s + 1)
561/670
Continued from the previous page
3
Let K = 3, T1 = 1, T2 = 2 so that G (s)H(s) = (s+1)(2s+1) ,
and
100
G2 (s) =
(s + 1)(s + 2)(s + 3)
using Nyquist method.
None of the transfer functions G1 and G2 has poles in the right half
plane, that is, P = 0. Therefore, for stability, the Nyquist plot must
not encircle the point −1 + i 0. To nd out this, we need to consider
Nyquist plot part corresponding to the positive imaginary axis only.
564/670
25
Nyquist plot of G1 (s) = (s+1)(s+2)(s+3) for positive frequencies.
565/670
25
Nyquist plot of G1 (s) = (s+1)(s+2)(s+3) for all frequencies.
566/670
100
Nyquist plot of G2 (s) = (s+1)(s+2)(s+3) for positive frequencies.
567/670
100
Nyquist plot of G2 (s) = (s+1)(s+2)(s+3) for all frequencies.
568/670
We next dene phase and gain margins to quantify how close the
system is to the stability or instability.
569/670
Phase and gain margins
The gure below shows two Nyquist plot parts obtained for two
dierent K values. One is encircling -1+i0, and the other is not.
So, there is a critical value of K in between them. At the critical
value of K , Nyquist plot crosses −1 + i 0. How close is K to the
critical value is quantied by the phase and gain margins.
570/670
In the following discussion, for simplicity in presentation, we shall
assume that the systems considered have unity feedback. Note that
it is always possible to reduce a system with feedback elements to a
unity-feedback system as shown in the next slide.
We shall also assume that, unless otherwise stated, the systems are
minimum phase; that is; the open loop transfer function has neither
poles nor zeros in the right-half s plane. In such case, for stability,
−1 + i 0 is not encircircled by the G (iw )H(iw ) locus.
571/670
Figure: Conversion to unity feedback
572/670
Phase Margins
γ = 1800 + φ
573/670
Figure: Positive phase margin
574/670
Figure: Negative phase margin
575/670
Gain Margin
The gain margin is the reciprocal of the magnitude |G (iw )| at the
frequency at which the phase angle is −1800 . Dening the phase
crossover frequency wc to be the frequency at which the phase
angle of the open-loop transfer function equals −1800 gives the
gain margin Kg
1
Kg =
|G (iwc )|
In terms of decibels
576/670
Figure: Positive gain margin
577/670
578/670
Discrete control
579/670
A system where part of the system acts on sampled data is called a
sampled data system.
580/670
Notice that r ∗ is dened only at t = nT ; not dened elsewhere.
r (nT )δ(t − nT ) if t = nT , n = 0, 1, 2, . . .
∗
r (t) =
not dened otherwise
581/670
The Unit Impulse (Dirac Delta) Function
583/670
Unit impulse train
∞
X
δ(t − nT ) = δ(t) + δ(t − T ) + δ(t − 2T ) + δ(t − 3T ) + · · ·
n=0
584/670
mpulse function is a limit of sequence of functions.
Z 2
f (t)dt = 0
0
Z 2
g (t)dt = 0
0
585/670
∞
X
r (t) δ(t − kT )
k=0
=
∞
X
r (kT )δ(t − kT )
k=0
586/670
The signal on the left is an
impulse train with strength
at t = kT equals r (kT ) for
k = 0, 1, 2, . . ..
587/670
More properties
588/670
Laplace transform of the impulse function
The formula Z ∞
f (t)δ(t − t0 )dt = f (t0 )
−∞
L{δ(t)} = 1
589/670
Digital to Analog Converter (DAC) makes r ∗ (t) a continuous signal
p(t). It is represented by a zero order hold (ZOH) circuit.
590/670
ZOH takes the value r (kT ) and holds it constant for
kT ≤ t < (k + 1)T .
For an impulse function input, r (kT ) = 1 at k = 0, ZOH output
holds r (kT ) = 1 for 0 ≤ t < T :
591/670
Recall that:
Transfer function of ZOH equals its output when its input is the
unit impulse function.
592/670
The time domain signal above can be written as a sum of two step
functions: g (t) = u(t) − u(t − T )
593/670
The time domain signal above can be written as a sum of two step
functions: g (t) = u(t) − u(t − T )
1 1 −sT 1 − e −sT
G (s) = L{g (t)} = L [u(t) − u(t − T )] = − e =
s s s
594/670
1 − e −sT
G (s) =
s
595/670
Digression
596/670
∞
X
∗
r (t) = r (kT )δ(t − kT )
k=0
597/670
Z ∞ Z ∞ ∞
X
L (r ∗ (t)) = r ∗ (t)e −st dt = e −st r (kT )δ(t − kT )dt
0 0 k=0
Z ∞
= e −st [r (0)δ(t) + r (T )δ(t − T ) + r (2T )δ(t − 2T ) + · · · ] dt
0
Z ∞ Z ∞ Z ∞
= e −st r (0)δ(t)dt+ e −st r (T )δ(t−T )dt+ e −st r (2T )δ(t−2T )dt+· ·
0 0 0
∞
= r (0) + r (T )e −sT + r (2T )e −s 2T + · · · =
X
r (kT )e −skT
k=0
598/670
The z-Transform
In the Laplace transform
∞
X
L (r ∗ (t)) = r (kT )e −skT
k=0
dene z = e sT
∞
X
∗
Z (r (t)) = r (kT )z −k
|k=0 {z }
z-Transform
Z (r ∗ (t)) = r (0) + r (T )z −1 + r (2T )z −2 + r (3T )z −3 + · · ·
Z-transform of r ∗ (t) is also weighted sum of samples of r (t) taken
at t = kT , k = 0, 1, 2, . . .. So, if we know the samples r (kT ) for
k = 0, 1, 2, . . . then we can construct the z-transform corresponding
to these samples.
599/670
The factor z −1 shifts the x(kT ) term towards right by one
sampling time:
600/670
Continued from the previous page
∞
X
∗
L (r (t)) = r (kT )e −ksT
k=0
∞
X
∗
Z (r (t)) = r (kT )z −k
k=0
601/670
A comparison
602/670
Z-transform operates on sequence of numbers. Some sequences are
as follows:
(Discrete) Unit impulse sequence
1 for n = 0
(1, 0, 0, . . .) or δn =
0 otherwise
Its z transform is
∞
X ∞
X
∆(z) = Z(δn ) = xn z −n = 1 + 0z −n = 1
n=0 n=1
603/670
(Discrete) Unit step sequence
1 for n ≥ 0
(1, 1, 1, . . .) or un =
0 otherwise
∞
X z
∴ z −k =
z −1
k=0
604/670
Example
(Discrete) Exponential sequence e −akT , k = 0, 1, 2, . . . :
1 z
1
=
1 − (ze )
aT − z − e −aT
605/670
Table: z-Transforms
x(t) X (s) X (z)
δ(t) 1 1
δ(t − kT ) e −kTs z −k
1 z
u(t) s z−1
1 Tz
t s2 (z−1)2
1
e −at (s+a)
z
z−e −aT
z
bk z−b
w z sin(wT )
sin(wt) s 2 +w 2 z 2 −2z cos(wT )+1
s z(z−cos(wT ))
cos(wt) s 2 +w 2 z 2 −2z cos(wT )+1
ze −aT sin(wT )
e −at sin(wt) w
(s+a)2 +w 2 z 2 −2ze −aT cos(wT )+e −2aT
606/670
Table: Properties of the z-Transform
x(t) X (z)
kx(t) kX (z)
607/670
Example
1−e −sT
Consider the ZOH system with tf G0 (s) = s .
608/670
Continued from the previous page
1−e −sT
Find Z-transform of G (s) = s 2 (s+1)
1 − e −sT 1
G (s) = 2
= (1 − e −sT ) × 2
s (s + 1) s (s + 1)
1 1 1
= (1 − e −sT )( 2
− + )
s s s +1
1 1 1 1 1 1
G (s) = ( 2 − + ) − e −sT ( 2 − + )
s s s +1 s s s +1
1 1 1 1 1 1
G (z) = Z{G (s)} = Z{ 2 − + } − Z{e −sT ( 2 − + }
s s s +1 s s s +1
1 1 1 1 1 1
G (z) = Z{ 2 − + } − z −1 Z{ 2 − + }
s s s +1 s s s +1
Tz z z Tz z z
G (z) = ( 2
− + )−z −1 ( 2
− + )
(z − 1) z − 1 z − e −T (z − 1) z − 1 z − e −T
609/670
Continued from the previous page
Tz z z
G (z) = (1 − z −1 )( − + )
(z − 1)2 z − 1 z − e −T
(ze −T − z + Tz) + (1 − e −T − Te −T )
=
(z − 1)(z − e −T )
Let the sampling time T equal 1, then
ze −1 + 1 − 2e −1
G (z) =
(z − 1)(z − e −1 )
610/670
Continued from the previous page
ze −1 + 1 − 2e −1
T = 1 → G (z) =
(z − 1)(z − e −1 )
0.3678z + 0.2644 0.3678z + 0.2644
= = 2
(z − 1)(z − 0.3678) z − 1.3678z + 0.3678
Find the response to the unit impulse R(z) = 1. The output will be
Y (z) = G (z) · 1. Performing the division G (z) · 1 results in:
611/670
A discrete equivalent of a continuous plant by ZOH method
1 − e −sT
Y (z) = Z G (s) U(z)
s
G (s)
Y (z) = Z (1 − e −sT ) U(z)
s
612/670
1−e −sT
ZOH has the tf GZOH (s) = s
1 − e −sT
Y (z) = Z G (s) U(z)
s
−sT G (s)
Y (z) = Z (1 − e ) U(z)
s
−1 G (s)
Y (z) = (1 − z )Z U(z)
s
613/670
−1 G (s)
Y (z) = (1 − z )Z U(z)
s
−1 G (s)
Gd (z) := (1 − z )Z
s
614/670
Example
1
−1 G (s) −1
Gd (z) = (1 − z )Z = (1 − z )Z
s s(s + 1)
1 1
−1 −1 z z
= (1 − z )Z − ↔ (1 − z ) −
s s +1 z − 1 z − e −2
1 − e −2 0.8647
Gd (z) = 2
=
z −e − z − 0.1353
615/670
Continued from the previous page
0.8647
Gd (z) =
z − 0.1353
Corresponding dierence equation:
Y (z) 0.8647
=
U(z) z − 0.1353
Transfer function:
0.8647
----------
z - 0.1353
617/670
Example
s+2
Given a ZOH in cascade with G1 (s) = s+1 , that is,
1 − e −Ts s + 2
G (s) =
s s +1
nd the sampled data transfer function, G (z), if the sampling time
T = 0.5 second.
z −1
−1 G1 (s) G1 (s)
G (z) = (1 − z )Z = Z
s z s
s +2 2 1
= − ↔ 2 − e −t
s(s + 1) s s +1
2z z
2 − e −kT ↔ −
z − 1 z − e −T
z −1 2z z − 0.213
z
G (z) = − =
z z − 1 z − 0.607 z − 0.607
618/670
Continued from the previous page
ZOH discretization by OCTAVE
s=tf('s');
Ts=0.5;
G=(s+2)/(s+1);
c2d(G,Ts,'zoh')
Transfer function 'ans' from input 'u1' to output ...
z - 0.2131
y1: ----------
z - 0.6065
619/670
Y (z) G (z)
= T (z) =
Y (z) = G (z)R(z) R(z) 1 + G (z)
620/670
Example
0.3678z + 0.2644
G (z) =
z 2 − 1.3678z + 0.3678
For the process used in the previous example, the closed loop
transfer function is
Y (z) G (z)
=
R(z) 1 + G (z)
Y (z) 0.3678z + 0.2644
= 2
R(z) z − z + 0.6322
621/670
Continued from the previous page
Use the unit step input
z
R(z) =
z −1
Then
(0.3678z + 0.2644) z 0.3678z 2 + 0.2644z
Y (z) = × =
(z 2 − z + 0.6322) z − 1 z 3 − 2z 2 + 1.6322z − 0.6322
Division yields
622/670
Digression
z = e iθ → |z| = 1, z = θ
z = re iθ → |z| = r , z = θ
z = e x+iy = e x e iy → |z| = e x , z = y
z = re x+iy = re x e iy → |z| = re x , z = y
EOD
623/670
Stability
624/670
Continued from the previous page
0.3678z + 0.2644
G (z) =
z2 − 1.3678z + 0.3678
For K = 1, the closed loop transfer function is
626/670
Y (z) 0.3678z + 0.2644
= 2
R(z) z − z + 0.6322
q(z) = z 2 − z + 0.6322
= (z − 0.5 + i 0.61)(z − 0.5 − i 0.61)
The system is stable because the roots
lie within the unit circle.
627/670
Stability of Scalar Dierence Equations
Example
Consider the dierence equation
y (m) = 2y (m − 1) + u(m), m = 1, 2, 3, . . .
For instance, the initial condition y (0) = 0.5 and the input
sequence u(1) = u(2) = · · · = 0 result the following iterations:
y (m) = 2y (m − 1) + u(m)
Z transform throughout:
(1 − 2z −1 )Y (z) = U(z)
Y (z) 1 z
H(z) := = 1
=
U(z) 1 − 2z − z −2
The transfer function H(z) has a pole outside the unit circle,
therefore the given dierence equation is unstable.
629/670
Example
Consider the dierence equation
630/670
Continued from the previous page
hold on
y=1;
for k=0:10
plot(k,y,'*r')
y=0.2*y+1
end
grid
631/670
Continued from the previous page
hold on
y=5;
for k=0:10
plot(k,y,'*r')
y=0.2*y+1
end
grid
632/670
Example
Consider the dierence equation
yn+1 − 3yn = 4, y0 = 1, n = 0, 1, 2, . . .
∞ ∞
yn+1 z −(n+1) = z y1 z −1 + y2 z −2 + y3 z −3 + · · ·
X X
−n
yn+1 z =z
0 0
633/670
Continued from the previous page
This can be written as
∞ ∞
yn+1 z −(n+1) = z y1 z −1 + y2 z −2 + y3 z −3 + · · ·
X X
−n
yn+1 z =z
0 0
= z y0 + y1 z −1 + y2 z −2 + y3 z −3 + · · · −zy0
A Result
yn+1 ↔ zY (z) − zy0
Thus
z
yn+1 − 3yn = 4 ↔ zY (z) − zy (0) − 3Y (z) = 4
z −1
634/670
Continued from the previous page
The dierence equation in the z-domain is
z
zY (z) − zy (0) − 3Y (z) = 4
z −1
Using the i.c. y0 = 1 we obtain
z
zY (z) − z − 3Y (z) = 4
z −1
z 2 + 3z z 2 + 3z
(z − 3)Y (z) = → Y (z) =
z −1 (z − 1)(z − 3)
Use partial fractions:
−2 3
Y (z) = z( + )
z −1 z −3
−2 3
−1
yn = Z z( + )
z −1 z −3
635/670
Continued from the previous page
−2 3
−1
yn = Z z( + )
z −1 z −3
z z
yn = −2Z −1 ( ) + 3 Z −1 ( )
z −1 z −3
yn = −2 + 3 × 3n , n = 0, 1, 2, . . .
636/670
Continued from the previous page
hold on
y=1;
for k=0:5
plot(k,y,'*r')
y=3*y+4;
end
grid
637/670
Example
Consider
yn+2 = yn+1 + yn , y0 = y1 = 1
z 2 Y (z) − z 2 y0 − zy1 = zY (z) − zy0 + Y (z)
Insert the i.c.:
(z 2 − z − 1)Y (z) = z 2
z2 z2
Y (z) = = √ √
z2 − z − 1 1+ 5 1− 5
(z − )(z − )
2 }
| {z 2 }
| {z
a b
Unstable!
638/670
Continued from the previous page
z2 z2
Y (z) = = √ √
z2 − z − 1 1+ 5 1− 5
(z − )(z − )
2 }
| {z 2 }
| {z
a b
a b
a−b z b−a z
Y (z) = +
z −a
z −b
a n b
yn = a + bn
a−b b−a
Shifting properties
yk ↔ Y (z)
yk+1 ↔ zY (z) − zy0
yk+2 ↔ z 2 Y (z) − z 2 y0 − zy1
yk−n ↔ z −n Y (z)
639/670
Discrete state space control
ẋ = Ax + Bu
y = Cx + Du
where
e At = L−1 (sI − A)−1
640/670
Z t
A(t−t0 )
x(t) = e x(t0 ) + e A(t−τ ) Bu(τ )dτ
t0
where
e At = L−1 (sI − A)−1
Notice that the solution has two parts:
First part e A(t−t0 ) x(t0 ) is due to the initial values at t0 . This part
does not exist if the initial conditions are zero.
Rt
The second part t0 e A(t−τ ) Bu(τ )dτ is due to the applied input u .
This part does not exist if no input is applied to the system.
641/670
Let the system
ẋ = Ax + Bu
y = Cx + Du
be preceded by a zero order hold, that is, the control input u is
kept constant over the sampling period
642/670
Let us make the initial time t0 = kT (current sampling instant) and
calculate the state vector T seconds later at t = kT + T :
Z kT +T
AT
x(kT + T ) = e x(kT ) + e A(kT +T −τ ) Bu(kT )dτ
kT
643/670
Let the index k denote the k -th sampling instant and x(k) denote
the value of x at time kT . The equation
Z kT +T
x(kT + T ) = e AT
x(kT ) + e A(kT +T −τ ) Bu(kT )dτ
kT
or in a compact notation
644/670
Z T
x(k + 1) = |{z}
e AT x(k) + e Aτ dτ B u(k)
Φ |0 {z }
Γ
645/670
Recap
Γ calculation
−1 1
−1
Γ=L (sI − A) B
s t=T
H and J calculation
H = C, J = D
The reasoning for the Γ formula is presented next.
646/670
Previously Γ was dened by
Z T
Γ= e Aτ dτ B
0
−1 1
−1
Γ=L (sI − A) B
s t=T
647/670
Let us dene an intermediate function
Z t
Γ(t) := e Aτ dτ B
0
nR o
t
Laplace transform throughout: L{Γ(t)} = L 0 e Aτ dτ B
R
t
LΓ(t) = L 0 e Aτ dτ B
= 1s L e Aτ B
= 1s (sI − A)−1 B
Inverse Laplace transform throughout
−1 1
−1
Γ(t) = L (sI − A) B
s
Evaluate at t = T
1
−1
Γ=L (sI − A)−1 B
s t=T
648/670
Example
0 1 0
ẋ = x+ u
0 0 1
| {z } | {z }
A B
1 0 x + [0] u
y=
| {z } |{z}
C D
649/670
Continued from the previous page
−1
s −1
−1 −1 −1
Φ=L (sI − A) =L
t=T 0 s
t=T
1 1
1 t 1 0.5
= L−1 s s2
1 = =
0 s t=T
0 1 t=T
0 1
( − 1 )
−1 1 s −1 1 0
−1 −1
Γ=L (sI − A) B =L
s t=T
0 s s 1
t=T
1 2
T 0.125
L−1 s3
1 = 2 =
s 2
t=T T 0.5
1 0 , J = [0]
H=
650/670
Continued from the previous page
Recall the discrete model:
x(k + 1) = Φx(k) + Γu(k)
y (k) = Hx(k) + Ju(k)
651/670
Using MATLAB for Discretization
>> A=[ 0 1 ; 0 0];
>> B=[0;1];
>> C=[1 0];
>> D=0
>>sys=ss(A,B,C,D)
a =
x1 x2
x1 0 1
x2 0 0
b =
u1
x1 0
x2 1
c =
x1 x2
y1 1 0
652/670
Continued from the previous page
d =
u1
y1 0
>> sysd=c2d(sys,0.5)
a =
x1 x2
x1 1 0.5
x2 0 1
b =
u1
x1 0.125
x2 0.5
c =
x1 x2
y1 1 0
d =
u1
653/670
Discretization of continuous time state space model by
Euler's Method
Consider the state space model
ẋ = Ax + Bu
y = Cx + Du
x(k+1)−x(k)
and let ẋ = T . Then:
x(k+1)−x(k)
T = Ax(k) + Bu(k)
y (k) = Cx(k) + Du(k)
This results in:
x(k + 1) = (I + AT )x(k) + BTu(k)
y (k) = Cx(k) + Du(k)
654/670
z-Domain Transfer Function
655/670
Time Domain Response
Example
1
H(z) =
z 2 − 0.3z + 0.5
>>numHz=[1];
>>denHz=[1 -0.3 0.5];
>>pzmap(numHz,denHz)
>>axis([-1 1 -1 1])
656/670
Continued from the previous page
>>[x] = dstep (numHz,denHz,41);
>>t = 0:0.05:2;
>>stairs (t,x)
657/670
Continued from the previous page
>> help dstep
DSTEP Step response of discrete-time linear systems.
DSTEP(A,B,C,D,IU) plots the response of the
discrete system:
658/670
Continued from the previous page
DSTEP(NUM,DEN) plots the step response of the
polynomial transfer function G(z) = NUM(z)/DEN(z)
where NUM and DEN contain the polynomial coefficients
in descending powers of z.
659/670
Continued from the previous page
>> help stairs
STAIRS Stairstep plot.
STAIRS(Y) draws a stairstep graph of the elements
of vector Y.
660/670
Example
y (kT ) = r k cos(kθ)u(kT )
4 4
where r = e aT and θ = bT .
z(z − r cos(θ)
Y (z) =
(z − re iθ )(z − re −iθ )
662/670
Continued from the previous page
663/670
Continued from the previous page
z(z−r cos(θ)
iθ )(z−re −iθ ) has poles at re
G (z) = (z−re iθ and re −iθ and zeros at 0
and r cos(θ).
664/670
Stability of the system, or output sequence's magnitude as t → ∞,
depends on the pole locations. There are three cases:
(a) r < 1, i.e., poles are in the unit circle.
(b) r = 1, i.e., poles are on the unit circle.
(c) r > 1, i.e., poles are outside the unit circle.
665/670
Stable System
Continued from the previous page
(a) r < 1, i.e., poles are in the unit circle.
>> r=0.5;
>> theta=0.75;
>> z=tf('z')
>> G=(z*(z-r*cos(theta)))/((z-r*exp(i*theta))*
(z-r*exp(-i*theta)))
Transfer function:
z^2 - 0.3658 z
---------------------
z^2 - 0.7317 z + 0.25
>> numG=[1 -0.3658 0];
>> denG=[1 -0.7317 0.25]
>> [x]=dstep(numG,denG,51)
>> t=0:0.05:2.5;
>> stairs(t,x)
666/670
Continued from the previous page
667/670
Critically Stable System
Continued from the previous page
(b) r = 1, i.e., poles are on the unit circle.
668/670
Critically Stable System
Continued from the previous page
669/670
Unstable System
Continued from the previous page
(c) r > 1, i.e., poles are outside the unit circle.
670/670