0% found this document useful (0 votes)
10 views673 pages

1focs Marechal

Uploaded by

menor.sousa.2003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views673 pages

1focs Marechal

Uploaded by

menor.sousa.2003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 673

Fundamentals of Control Systems1

A. Karamanco§lu

Eski³ehir Osmangazi University

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

These slides are based mainly on the following textbooks:


K.Ogata, Modern Control Engineering, Prentice Hall, 4th Ed.,
2002.
R.C. Dorf, R. H. Bishop, Modern Control Systems, 10th Ed.,
Prentice Hall, 2004.

3/670
System

A denition A group of interacting, interrelated, or


interdependent elements forming a complex whole.

Another denition A set of detailed methods, procedures, and


routines established or formulated to carry out a specic activity,
perform a duty, or solve a problem

4/670
Modeling
Modeling is representing the physical system in terms of
mathematical symbols.

Motivations for Modeling:


A motivation For a given input x , obtain the corresponding output
y.
Another motivation Determining the input x that causes a
specied output y .
Another motivation Reconguring the system so that the
resulting system is more ecient or more desired.
5/670
A modeling: Separately excited dc motor

A typical dc motor has two windings: Armature winding and eld


winding. Field coils are generally on the stator and are excited by a
xed dc voltage. In some dc motors a permanent magnet may
replace eld winding. Field circuitry aects the generated torque as
a constant factor. Therefore, the torque is controlled by the
armature circuitry which is shown above.

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

Assume that aircraft is in steady state cruise at constant altitude


and velocity. Thus, thrust and drag cancel out, and the lift and
weight balance out each other.

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]

J α̈ + b α̇ + (CZE l + CZW d)α = CZE lE


mḧ = (CZE + CZW )α − CZE E

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

Another viewpoint on the system


A system is an entity which produces a set of certain outputs (y ) in
response to a set of inputs (x ).

24/670
Deterministic-Nondeterministic

A system is said to be deterministic if the outputs y (t) are


predicted with 100 percent certainty. Otherwise it is said to be
nondeterministic.

25/670
26/670
Static-Dynamic

If the values of its outputs at any specic time t depend only on


the values of its inputs at the same specic time t , then this system
is said to be a static system. Otherwise, it is said to be a dynamic
system

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 −∞

"Let us consider you as a system. Now you are watching a live


basketball match. You are now a causal system because your
feelings and emotions depend only on what happened in the past
and what is happening at present. However, if you record it and
watch the same basketball match later, you will know what will
happen after some time in the match (because data of the match is
already recorded in your mind). Now, your feelings and emotions
concerning the match not only depends on the past and present
events in the match but also depends on the future events of the
match because you already know what happens."
28/670
Continuous-Discrete

If both inputs and outputs of a system are dened over a


continuous time scale, then this system is said to be a continuous
time system.
Example
ẏ (t) + 3y (t) = sin(5t), y (0) = 4, (1)
Both the input sin(5t) and the corresponding output y are
continuous. They are dened for all t ∈ [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)

System outputs are dened only at times t = 0, 1, 2, 3, . . ..


System outputs have the following values:

y (0) = 3, y (1) = 1.5, y (2) = 0.75, y (3) = 0.375, . . .

In the example, the discrete system model does not provide


information on the value of y at, for instance, t = 0.5.

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

In linear systems: If the input x1 (t) produces the output y1 (t),


and the input x2 (t) produces the output y2 (t), then the input
α1 x1 (t) + α2 x2 (t) produces the output α1 y1 (t) + α2 y2 (t) where α1
and α2 are any constants. If a system is not linear then it is called
nonlinear.

33/670
Homework 1.b
A simplied model of an underwater vehicle is

v̇ + |v | · v = u

Compute its response to signals given by the gures below.

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

1. The pilot sets a control mode to maintain the wings in a level


position.
2. However, even in the smoothest air, a wing will eventually go
down to a lower level.
3. Gyroscopes (or other position sensors) on the wing detect this
deection and send a signal to the autopilot computer.
4. The autopilot computer processes the input data and determines
that the wings are no longer level.

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

The RC circuit given above has input vi and output v0 .


48/670
Continued from the previous page
dv0
vi = iR + v0 , i = C = C v̇0
dt
→ RC v̇0 + v0 = vi (3)
Expression (3) is a linear constant coecient dierential equation
describing the input output relation of the system.
RC circuit is a linear time invariant (LTI) system.

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

RC [sV0 (s) − v0 (0)] + V0 (s) = Vi (s)

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

g (t) = L−1 G (s)

51/670
Impulse response g (t) is the time domain counterpart of the
transfer function. Impulse function is L−1 (1), and denoted by δ .

vi (t) ↔ Vi (s), y (t) ↔ Y (s)


Y (s) = G (s) · 1 = G (s)
→ y (t) = g (t) ∗ δ(t) = g (t)
52/670
In the time domain analysis, output of a linear time invariant (LTI)
system is obtained by convolving the input and the impulse
response of the system. Let x(t), y (t) and g (t) be the input,
output and the impulse response respectively. Then
Z t
y (t) = x(τ )g (t − τ ) dτ
0

In the Laplace domain

Y (s) = G (s)X (s)

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τ

Let T = t − τ , then t = T + τ , dt = dT , and e −st = e −sT e −sτ


Z ∞Z ∞
L (g (t) ∗ u(t)) = e −sτ e −sT g (τ )u(T )dTdτ
−∞ −τ
Z ∞ Z ∞
−sτ
= e g (τ )dτ e −sT u(T )dT
0 0
= L{g (t)} × L{u(t)}
= G (s)U(s)

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

Ms 2 Y (s) = F (s) − kY (s) − BsY (s)

Y (s) 1 ∆
= 2
= G1 (s) (4)
F (s) Ms + Bs + k

"A spring returns a force for a given displacement; a damper


returns a force for a given velocity."

58/670
Torsion springs

"A torsion spring is a spiral cylindrical spring with approximately


constant angle stiness that is able to receive external forces acting
perpendicularly to the axis of the coiling with a torsional moment in
the direction of coiling or uncoiling. "
59/670
The rst spring-loaded mouse trap was invented in 1894.

A torsion spring is a spring that works by torsion or twisting; that


is, a exible elastic object that stores mechanical energy when it is
twisted. When it is twisted, it exerts a force (actually torque) in the
opposite direction, proportional to the amount (angle) it is twisted.
60/670
J θ̈ = T − Td − Ts
where Td = Kd θ̇ and Ts = Ks θ.

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)

Electrical Mechanical Rotational


Input vi f τ
Output Cv0 y θ
Energy storing device L M J
1
Energy storing device C k k
Energy dissipating device R B B

64/670
Example

m1 ẍ1 = u − k1 x1 − k2 (x1 − x2 ) − b(ẋ1 − ẋ2 )


m2 ẍ2 = −k3 x2 − k2 (x2 − x1 ) − b(ẋ2 − ẋ1 )

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:

m1 s 2 + bs + (k1 + k2 ) X1 (s) = (bs + k2 )X2 (s) + U(s) (6)


 

m2 s 2 + bs + (k2 + k3 ) X2 (s) = (bs + k2 )X1 (s) (7)


 

Solve (7)for X2 (s) and substitute it into Equation (6):

66/670
Continued from the previous page

m1 s 2 + bs + k1 + k2m2 s 2 + bs + k2 + k3 − (bs + k2 )2 X1 (s)


   

= 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

Suppose a controller is designed in the form of a transfer function.


In order to implement such a controller, we utilize integrators, gains
and summers.
Consider the transfer function
n(s) bm s m + bm−1 s m−1 + ....... + b1 s + b0
G (s) = = (10)
d(s) s n + an−1 s n−1 + ...... + a1 s + a0

We assume that (10) is proper, i.e.,n ≥ m. The realization of a


transfer function is, in general, non-unique. Here we will discuss a
particular realization which is called the
controllable canonical realization.

68/670
For this, dene an auxiliary function z as a solution of

z (n) + an−1 z (n−1) + ...... + a1 ż + a0 z = x

where (.)(n) denotes nth time derivative.


In Laplace domain, with zero initial conditions, we have

s n Z (s) + an−1 s n−1 Z (s) + ...... + a1 sZ (s) + a0 Z (s) = X (s)

s + an−1 s n−1 + ...... + a1 s + a0 Z (s) = X (s)


 n 

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

Figure: Realization of Block 1

71/670
Also consider another transfer function arising from the dierential
equation:

y = bm z (m) + bm−1 z (m−1) + ....... + b1 ż + b0 z

In Laplace domain, with zero initial conditions, we have

Y (s) = bm s m Z (s) + bm−1 s m−1 Z (s) + ....... + b1 sZ (s) + b0 Z (s)

Y (s) = Z (s) bm s m + bm−1 s m−1 + ....... + b1 s + b0


 

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

Figure: Realization of Block 2

74/670
75/670
76/670
Homework 2.a

Obtain the controllable canonical realization of


3s 3 + 2s 2 + s
G (s) =
s 7 + 3s 5 + 6s 4 − 8s 3 − 4

77/670
Review of the Laplace Transform

Let f (t) be function of time specied for t > 0. Laplace transform


of f denoted by L(f ) is dened by
Z∞
F (s) = e −st f (t)dt
0

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

Table: Laplace Transforms of some elementary functions

79/670
Some Important Properties of Laplace Transforms

f (t) ↔ F (s)

L {c1 f1 (t) + c2 f2 (t)} = c1 L {f1 (t)} + c2 L{f2 (t)} (11)

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

Laplace transform of time domain dierentiation


f 0 (t) ↔ sF (s) − f (0) (15)

f 00 (t) ↔ s 2 F (s) − sf (0) − f 0 (0) (16)


f (n) (t) ↔ s n F (s)−s n−1 f (0)−s n−2 f 0 (0)−. . .−sf (n−2) (0)−f (n−1) (0)
(17)

81/670
Eect of integration in time domain on the Laplace transform

Zt
F (s)
f (λ)dλ ↔ (18)
s
0

Eect of t n factor, n positive integer, on the Laplace transform


dn
t n f (t) ↔ (−1)n F (s) (19)
ds n
Eect of division by t on the Laplace transform
Z∞
f (t)
↔ F (λ)dλ (20)
t
s

82/670
Initial Value Theorem. If the indicated limits exist then

lim f (t) = lim sF (s)


t→0 s→∞

Final Value Theorem. If the indicated limits exist then

lim f (t) = lim sF (s)


t→∞ s→0

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

If the Laplace transform of a function f (t) is F (s), then f (t) is


called an inverse Laplace transform of F (s). Symbolically
L−1 F (s) = f (t)

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

L−1 {c1 F1 (s) + c2 F2 (s)} = c1 L−1 F1 (s) + c2 L−1 F2 (s)


4 3s 5 5
− 2 + 2 ↔ 4e 2t − 3 cos 4t + sin 2t
s − 2 s + 16 s + 4 2

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

F (n) (s) ↔ (−1)n t n f (t)


−2s d 1
= ( 2 ) ↔ −t sin(t)
(s 2+ 1)2 ds s + 1

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

If f (0) = 0 then sF (s) ↔ f 0 (t)

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→∞

lim [sF (s) − f (0)] = lim f (t) − f (0)


s→0 t→∞

lim sF (s) = lim f (t) 


s→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

lim y (t) = lim sY (s)


t→∞ s→0
= lim sG (s)U(s)
s→0
1
= lim sG (s)
s→0 s
= lim G (s)
s→0
= G (0)

If G is not stable then the result above is not valid.


101/670
Example
Let G (s) = s 3 +6s 21+11s+6 Its steady state output value is G (0) = 61 .
Poles of G are -1, -2, -3.

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:

sX (s) − x(0) = AX (s) + BU(s)

sIX (s) − x(0) = AX (s) + BU(s)


Solve it for X (s):

(sI − A)X (s) = x(0) + BU(s)


(sI −A)−1 −1 −1
(sI − A)X (s) =(sI −A) x(0) +(sI −A) BU(s)
→ X (s) = (sI − A)−1 x(0) + (sI − A)−1 BU(s)

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

If the initial condition is given at arbitrary t0 , the formula becomes:


Z t
A(t−t0 )
x(t) = e x(t0 ) + e A(t−τ ) Bu(τ )dτ
t0

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

where u is the unit step function.


For the solution we use the following formula
Z t
x(t) = e x(0) +
At
e A(t−τ ) Bu(τ )dτ
0

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

Continued from the previous page

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

4e − 3e −2t e −(t−τ ) − e −2(t−τ )


   −t  Z t 
x1 (t)
= + dτ
x2 (t) −4e −t + 6e −2t 0 −e −(t−τ ) + 2e −2(t−τ )

118/670
Continued from the previous page

4e −t − 3e −2t e −(t−τ ) − e −2(t−τ )


    Z t 
x1 (t)
= + dτ
x2 (t) −4e −t + 6e −2t ) 0 −e −(t−τ ) + 2e −2(t−τ )
or
1
4e −t − 3e −2t − e −t + 21 e −2t
     
x1 (t) 2
= +
x2 (t) −4e −t + 6e −2t e −t − e −2t

119/670
Example

The outputs of the above system are dened as capacitor voltage


and the current through the resistor R2 . They are denoted by y1
and y2 respectively. Select system states as inductor current x1 and
capacitor voltage x2 .
120/670
Continued from the previous page

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 )

Continued from the previous page


In matrix notation
−R1 R2
! !
R1 R2 R1 R2
L(R1 +R2 ) L(R1 +R2 ) L(R1 +R2 ) L(R1 +R2 )
ẋ = −R1 −1 x+ 1 R1 u
c(R1 +R2 ) c(R1 +R2 ) c(R1 +R2 ) c(R1 +R2 )
! !
0 1 0 0
y= −R1 −1 x+ 1 R1 u
(R1 +R2 ) (R1 +R2 ) (R1 +R2 ) (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

ẍ + 2ẋ + 5x = 3, x(0) = 0, ẋ(0) = 0,


3
s 2 X (s) + 2sX (s) + 5X (s) =
s
3 3
3 5 5 (s + 2)
X (s) = = −
s(s 2 + 2s + 5) s s 2 + 2s + 5
3 3 3
5 10 ×2 5 (s + 1)
= − 2 2

s (s + 1) + 2 (s + 1)2 + 22
3 3 3
↔ − e −t sin 2t − e −t cos 2t for t ≥ 0
5 10 5

129/670
State Space Representations of Transfer Functions

Let a system be dened by

y (n) + a1 y (n−1) + · · · + an−1 ẏ + an y = b1 u (n−1) + · · · + bn−1 u̇ + bn u

where u and y are input and output respectively. Transfer function


of this system is

Y (s) b1 s n−1 + · · · + bn−1 s + bn


= n
U(s) s + a1 s n−1 + · · · + an−1 s + an

We will present three state space canonical representations of the


system above: Controllable canonical form, Observable canonical
form, Diagonal canonical form.

130/670
Controllable Canonical Form

Y (s) b1 s n−1 + · · · + bn−1 s + bn


= n
U(s) s + a1 s n−1 + · · · + an−1 s + an
0 1 0 0 0
      
x˙1 ··· x1
 x˙2   0 0 1 ··· 0   x2   0 
..   .. .. .. ..   .. ..
      
. = . . . .  . + . u
   
 
  0 0 0 1    0
      
 ẋn−1 ··· xn−1 
ẋn −an −an−1 −an−2 · · · −a1 xn 1
 
x1
 x2 
y = bn bn−1 · · · b1  ... 
 


 
 xn−1 
xn

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

>> pkg load signal


>>a=[0 1 0 0; 0 0 1 0; 0 0 0 1; -2 -3 -8 -6];
>>b=[ 0; 0 ; 0; 1];
>>c= [6 2 5 4];
>>d=0;
>>[num,den]=ss2tf(a,b,c,d)
num = 4 5 2 6
den = 1 6 8 3 2

132/670
Observable Canonical Form

Y (s) b1 s n−1 + · · · + bn−1 s + bn


= n
U(s) s + a1 s n−1 + · · · + an−1 s + an

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

>> pkg load signal


>>a=[-6 1 0 0; -8 0 1 0; -3 0 0 1; -2 0 0 0];
>>b=[4; 5; 2; 6];
>>c= [1 0 0 0];
>>d=0;
>>[num,den]=ss2tf(a,b,c,d)
num = 4 5 2 6
den = 1 6 8 3 2

134/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
0 1
      
x˙1 −p1 x1
 x˙2   −p2  x2   1 
.. = .. ..  
+ .. u
      
. . .   .
 
    
ẋn 0 −pn xn 1
 
x1
 x2 
kn  ...
  
y= k1 k2 · · ·
 

 
 xn−1 
xn

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

>> pkg load signal


>>a=[-1 0; 0 -2];
>>b=[1; 1];
>>c= [2 -1];
>>d=0;
>>[num,den]=ss2tf(a,b,c,d)
num = 1 3
den = 1 3 2 139/670
Transfer Functions
Consider a rational transfer function
N(s)
G (s) =
D(s)

where N(s) = bm s m + bm−1 s m−1 + .... + b1 s + b0 and


D(s) = s n + an−1 s n−1 + ... + a0
Roots of N are called zeros of G . Roots of D are called poles of G .
Note that if z is zero of G then G (z) = 0. If p is a pole of G , then

lim |G (s)| = ∞
s→p

G is said to be strictly proper if n > m. G is said to be proper if


n ≥ m. G is said to be non-proper if n < m. Note that if G is
proper then lims→∞ |G (s)| is nite. If it is strictly proper then the
limit equals zero. If G is non-proper then the limit is innity.

140/670
Transfer function of a basic feedback system

E (s) = R(s) − H(s)Y (s); Y (s) = G (s)E (s)


Y (s) = G (s)[R(s) − H(s)Y (s)]
G (s)
Y (s) = R(s)
1 + G (s)H(s)
Y (s) G (s)
=
R(s) 1 + G (s)H(s)
141/670
feedback command in Octave (control package needed)

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 .

For the solution method Mason's Gain Formula we need the


denitions given next.
149/670
Denitions

Forward path Path from input to output in the directions of


arrows.
Forward path gain Product of branch gains of a forward path.
Loop gain Product of branch gains of a loop.
Determinant of a graph (∆)
∆ = 1−(sum of all dierent loop gains)+( sum of gain products of
all possible combinations of two nontouching loops )- ( sum of gain
products of all possible combinations of three nontouching loops
)+(. . . . . . )-. . . . . .

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 −(G2 H2 +G3 H3 +G6 H6 +G7 H7 )+(L1 L3 +L1 L4 +L2 L3 +L2 L4 )


∆ = 1 − (G2 H2 + G3 H3 + G6 H6 + G7 H7 )
+(G2 H2 G6 H6 + G2 H2 G7 H7 + G3 H3 G6 H6 + G3 H3 G7 H7 )
152/670
Denition
∆k : Determinant of the graph when the loops touching to the k -th
forward path is removed.

∆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

C2 (s) G1 G2 G3 G4 G5 +G1 G4 G5 G6 +G1 G2 G7 (1+G4 H1 )


R(s) = 1+G4 H1 −G2 G7 H2 −G4 G5 G6 H2 −G4 H1 G2 G7 H2 −G2 G3 G4 G5 H2

158/670
Continued from the previous page

159/670
Continued from the previous page

P1 and P2 touch all the loops, P3 touches only L1 , L2 , L3 ; it does


not touch L4 . ∴ ∆1 = ∆2 = 1; ∆3 = 1 − (−G4 H1 ).

160/670
Continued from the previous page

The loops L3 and L4 are nontouching. Their gain −G4 H1 G2 G7 H2


takes place in the determinant ∆. Recall that

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

A has three nodes; B has four nodes.


In A both loops have a common node; in B they do not have any
common node.
Two or more loops are said to be nontouching if they do not have
any common node.
163/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

x1 = xin + acex4 + bcex1


x3 = bcx1 + acx4
x4 = dx3
x4 = d(bcx1 + acx4 )
x4 = bcdx1 + acdx4
xout = x4

172/670
Continued from the previous page

Node x3 has no outows and is not a node of interest. It is deleted


along with its inows.

x1 = xin + acex4 + bcex1


x4 = bcdx1 + acdx4
xout = x4

173/670
Continued from the previous page

174/670
Continued from the previous page

x1 = xin + acex4 + bcex1


x1 (1 − bce) = xin + acex4
1 ace
x1 = xin + x4
1 − bce 1 − bce
x4 = bcdx1 + acdx4
xout = x4

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

Remove outow from x4 to xout


1 ace bcd
x1 = xin + × x1
1 − bce 1 − bce 1 − acd
bcd
xout = x1
1 − acd

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

One can avoid being tortured by utilizing the Mason's Formula:

P1 = bcd, ∆1 = 1, ∆ = 1 − bce − acd


xout bcd
=
xin 1 − bce − acd

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:

Also note that ẋ1 equals sum of two signals: − C1 x2 and 1


C u.
Likewise, ẋ2 equals sum of two signals: L1 x1 and − RL x2 .

212/670
213/670
214/670
Example

215/670
Continued from the previous page

M1 ẍ1 = u − k1 (x1 − x2 ) − b1 (ẋ1 − ẋ2 )


M2 ẍ2 = k1 (x1 − x2 ) + b1 (ẋ1 − ẋ2 ) − k2 x2 − b2 ẋ2
We have 4 variables: x1 , ẋ1 , x2 , ẋ2 . Let us rename two of them:
∆ ∆
x3 = ẋ1 , x4 = ẋ2 Now we can write:

ẋ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

DC motor is a widely used actuator in control systems. The input


to the system is the voltage applied to the motor's armature (Va ),
while the output is the angular position of the shaft (θ). The stator
generates a stationary magnetic eld that surrounds the rotor. This
eld is generated by either permanent magnets or electromagnetic
windings. The rotor, also called the armature, is made up of one or
more windings. When these windings are energized they produce a
magnetic eld. The magnetic poles of this rotor eld will be
attracted to the opposite poles generated by the stator, causing the
rotor to turn.
219/670
Component Equations
eb = Kb θ̇: back - emf
T = Kf if Ka ia = K1 ia : generated torque

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

Proportional Control of a First Order System


Consider the rst order system

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) X (s) − H(s)


K
X (s) − s 2 T +s+K X (s) [1 − K
s 2 T +s+K
]X (s)
= = =
X (s) X (s) X (s) X (s)
K s 2T + s
=1− =
s 2T + s + K s 2T + s + K
240/670
Continued from the previous page

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

Consider the system above with Kp , J, f > 0. Its i-o relationship


from N to C is:
C (s) 1
= 2
N(s) s J + sf + Kp

242/670
C (s)
For computation of N(s) , the other inputs are taken zero, i.e.,

R(s) = 0

The transfer function from N to E is


E (s) 0 − C (s) −1
= = 2
N(s) N(s) s J + sf + Kp
−1
Letting n(t) = Tn u(t) results E (s) = s 2 J+sf +Kp
· Tn
s

−s Tn −Tn
lim e(t) = lim sE (s) = lim · =
t→∞ s→0 s→0 s 2 J + sf + Kp s Kp

The torque disturbance has contributed to the steady state error


signal. This is not desired. Steady-state error can be reduced by
increasing 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

Continued from the previous page


When N(s) = s ,
Tn
we have

−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

First Order Systems

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→∞

Unit Impulse Response


1 1 −t
Cδ (s) = · 1 ↔ cδ (t) = e T , t ≥ 0
Ts + 1 T

248/670
Continued from the previous page

Unit-Step Input is the derivative of the Unit-Ramp Input.

Unit-Impulse Input is the derivative of the UnitStep Input.

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
∆ ∆

A Fact When a > 0, b > 0 the solutions of x 2 + ax + b = 0 are


either negative real numbers or complex numbers with negative real
parts.
251/670
Continued from the previous page

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

Continued from the previous page


Case 1 0 < ζ < 1 (Underdamped)
Poles of a second order system can be expressed as:

r1,2 = −ζwn ± iwn 1 − ζ 2 or by dening wd = wn 1 − ζ 2 we can
p p

write them as: r1,2 = −ζwn ± iwd .


The transfer function:

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

Continued from the previous page


Case 2 ζ = 0 ( zero damped (or undamped) )
C (s) wn2
= 2
R(s) s + 2 × 0 × wn s + wn2
wn2
C (s) = R(s)
(s 2 + wn2 )
Unit step response:
wn2
C (s) =
(s 2 + wn2 )s
c(t) = 1 − cos wn t, t ≥ 0

257/670
C (s) wn2
= 2
R(s) s + 2ζwn s + wn2

Continued from the previous page


Case 3 ζ = 1 ( critically damped )
C (s) wn2
= 2
R(s) s + 2 × 1 × 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

Continued from the previous page


Case 4 ζ > 1 ( overdamped )
1 √
−(ζ+ ζ 2 −1)wn t
c(t) = 1 + e
2 ζ 2 − 1(ζ + ζ 2 − 1)
p p

1 √
e −(ζ− ζ −1)wn t , t ≥ 0
2
− p
2 ζ 2 − 1(ζ − ζ 2 − 1)
p

Faster decaying component may be assumed zero for a 1st order


approximation.

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.

Also notice that the frequency in undamped motion is wn ; it never


dies out and has a constant oscillation amplitude forever. It is,
therefore, called the undamped natural frequency of the system.

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 ζ

where wd = wn 1 − ζ 2 . The underdamped response is the most


p

useful response in practice. We analyze this response in the time


domain.

264/670
Denitions For a Transient Response

0 < ζ < 1 generates transient response as in the gure above.

265/670
Delay Time

Continued from the previous page

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

Continued from the previous page

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

Continued from the previous page

tp : It is the time c(t) reaches its rst local max.

268/670
Max. Overshoot

Continued from the previous page

c(tp ) − css
Mp =
css

269/670
Settling Time

Continued from the previous page

It is the time required to reach and stay within [0.95 − 1.05] or


[0.98 − 1.02]

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 ζ

Continued from the previous page


The envelope for c(t) is obtained by noting

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

in the standard form.

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 − cos−1 0.6 3.14 − 0.93


tr = = = = 0.55sec.
wn 1 − ζ 2 4
p
wd

π 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

Given that u is a step function with amplitude 5.


6
Then x is 5 × 15 = 2. This implies yss = 2.

tr = 0.55, tp = 0.88, Mp = 0.27

c(tp ) = 2.53, ts = 2 (for the 5% criterion)

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

y (t) = 2 − 2.224e −t + 0.247e −10t − 0.0022e −100t


It could be approximated as

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)

C (s) p(s)d(s) ∼ b0 s m + b1 s m−1 + ...... + bm−1 s + bm


= =
R(s) q(s)d(s) + p(s)n(s) a0 s n + a1 s n−1 + .... + an

287/670
Continued from the previous page

C (s) p(s)d(s) ∼ b0 s m + b1 s m−1 + ...... + bm−1 s + bm


= =
R(s) q(s)d(s) + p(s)n(s) a0 s n + a1 s n−1 + .... + an
C (s)
Factorize R(s) . For simplicity, assume the roots are distinct.

C (s) k(s + z1 )(s + z2 )....(s + zm )


=
R(s) (s + p1 )(s + p2 )....(s + pn )

k(s + z1 )(s + z2 )....(s + zm )


C (s) = × R(s)
(s + p1 )(s + p2 )....(s + pn )
k(s + z1 )(s + z2 )....(s + zm ) 1
C (s) = ×
(s + p1 )(s + p2 )....(s + pn ) s

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

If pi > 0, i = 1, ...., n then limt→∞ c(t) = a


If some of the roots of the denominator are complex then we use
the following factorization:

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

Any real positive pole contributes a monotonous increase to the


response. Complex pole with positive real part causes oscillations
with increasing amplitude.

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

3s 4 + 20s 3 + 98s 2 + 212s + 195 1


C (s) = ×
s 4 + 6s 3 + 26s 2 + 46s + 65 s
3s 4 + 20s 3 + 98s 2 + 212s + 195 1
C (s) = ×
((s + 2)2 + 9) · ((s + 1)2 + 4) s
3 −6 8
C (s) = + +
s (s + 2)2 + 9) (s + 1)2 + 4)
↔ c(t) = 3 + e −2t (−3) sin(3t) + e −t 4 sin(2t)
lim c(t) = 3
t→∞

292/670
Stability

A system is BIBO (bounded-input bounded-output) stable if every


bounded input produces a bounded output.
Examples for bounded inputs: 4 sin t , 2u(t), e −t for t > 0.
Examples for unbounded inputs: 2 + 5t , t 3 , e 2t , e t sin(t).

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

Assume that g (t) is absolutely integrable and the input is bounded


such that |x(t)| < Bx .
R∞
|y (t)| = R| 0 g (τ )x(t − τ )dτ |

≤ R0 |g (τ )x(t − τ )|dτ

= 0 R|g

(τ )||x(t − τ )|dτ
≤ Bx 0 |g (τ )|dτ
=: BY

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

We showed that when g (t) is not absolutely integrable, the


bounded input x(t) = sign(g (−t)) result in unbounded response. 

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)

is not BIBO stable, because it has poles not in the OLHP.

Example
An LTI system with impulse response

y (t) = 3 sin(2t)

is not BIBO stable because |y (t)| is not integrable in [0, ∞).

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

Figure: 5 Its t.f.: (s+a)((s+b)2 +w 2 ) .


n(s)
Its response to input R(s):
−at
A
s+a + Bs+C
(s+b)2 +w 2 + R1 (s) ↔ Ae + e −bt (K1 sin wt + K2 cos wt) + r1 (t)

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.

Figure: 6 Its t.f.:(s+a)((s+b)2 +w 2 )(s−p) .


n(s)
Its response to input R(s):
A Bs+C D
s+a + (s+b)2 +w 2 + s−p + R1 (s) ↔
−at −bt
Ae +e (K1 sin wt + K2 cos wt) + De pt + r1 (t)

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

Lets investigate the stability of

C (s) b0 s m + b1 s m−1 + ....bm−1 s + bm


=
R(s) a0 s n + a1 s n−1 + .... + an−1 s + an

m ≤ n, ai , bi are real for all i 's.

304/670
Routh's Algorithm

C (s) b0 s m + b1 s m−1 + ....bm−1 s + bm


=
R(s) a0 s n + a1 s n−1 + .... + an−1 s + an
1. Write a0 s n + a1 s n−1 + ... + an−1 s + an = 0, a0 > 0
2. If there is any zero or negative coecient, then there exist at
least one root with nonnegative real part.
Example

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

3. Form the following array:

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)

Array Polynomial interpretation

sn a0 a2 a4 a6 ... → a0 s n + a2 s n−2 + a4 s n−4 + · · ·


s n−1 a1 a3 a5 a7 ... → a1 s n−1 + a3 s n−3 + a5 s n−5 + · · ·
s n−2 b1 b2 b3 b4 ... → b1 s n−2 + b2 s n−4 + b3 s n−6 + · · ·
s n−3 c1 c2 c3 c4 ... → c1 s n−3 + c2 s n−5 + c3 s n−7 + · · ·
..
.
s2 e1 e2 → e1 s 2 + e2
s1 f1 → f1 s
s0 g1 → g1

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

Solution: Use the above row to form the auxiliary polynomial.


Case 3
Array ends before reaching the s 0 row

Example s5 ∗
s4 ∗
s3
s2
s1
s0

312/670
Some Special Cases-Ctd.

Case 1 If a rst column term in any row is zero, but there is a


nonzero term on that row, or there is no remaining term on that
row then the zero term is replaced by ε and rest of the array is
evaluated. Here ε is assumed to be a positive number. If the sign
of the coecient above ε is the same as that below it, it indicates
that there are pair of conjugate roots on the imaginary axis. If,
however, the sign of the coecient above ε is opposite that below
it, it indicates that there is one sign change.
Case 2 If all the coecients in any derived row are zero, it
indicates that there are roots of the equal magnitude lying radially
opposite in the complex plane, In such a case, the zero row is
replaced with derivative of the preceding row. Associated roots are
found by solving the polynomial of the preceding row.
Case 3 If the procedure terminates before reaching the s 0 row, say
at s k row then there is a root at s = 0 with multiplicity k .

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

If a1 a2 − a0 a3 > 0, equivalently a1 a2 > a0 a3 , and a0 , a1 , a2 , a3 > 0


then all the roots are in the OLHP.

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

We used ε for 0, because we had Case 1.


Conclusion: A pair of imaginary roots.

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

We used ε for 0, because we had Case 1.


Conclusion: Two roots with positive real parts.

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

Conclusion: 2nd degree polynomials with positive coecients have


all roots in the OLHP

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

a0 (ŝ − σ)n + a1 (ŝ − σ)n−1 + · · · + an−1 (ŝ − σ) + an = 0 (23)

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

Does f have all its roots to the left of Re(s) =


ŝ 3 1 6.36
−2?
∆ ŝ 2 5 1.08
Use s = ŝ − 2, then f becomes 1
ŝ 6.144
(ŝ − 2)3 + 11(ŝ − 2)2 + 38.36(ŝ − 2) + 41.8 ŝ 0 1.08
= ŝ 3 + 5ŝ 2 + 6.36ŝ + 1.08

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

D(s) = s n + an−1 s n−1 + · · · + a1 s + a0 = (s + p1 )(s + p2 )...(s + pn )

How do the coecients a0 , a1 , ...an−1 relate to p1 , p2 , ...pn ?

324/670
(s + p1 )(s + p2 ) = s 2 + (p1 + p2 )s + p1 p2

(s + p1 )(s + p2 )(s + p3 ) = s 3 + (p1 + p2 + p3 )s 2 +

(p1 p2 + p1 p3 + p2 p3 )s + p1 p2 p3

(s + p1 )(s + p2 )(s + p3 )(s + p4 ) = s 4 + (p1 + p2 + p3 + p4 )s 3

+(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

Based on the above examples, we see that:


an−1 is the sum of all the pi 's.
an−2 is the sum of all products of the pi 's taken two at a time.
an−3 is the sum of all products of the pi 's taken three at a time.
325/670
..
.
a0 is the product of all the pi 's.
Now, suppose that all roots are in the OLHP (i.e.,
p1 > 0, p2 > 0, ..., pn > 0). This means that
a0 > 0, a1 > 0, ..., an−1 > 0 as well. This leads us to the following
conclusion:

The polynomial D(s) = s n + an−1 s n−1 + · · · + a1 s + a0 has all


roots in the OLHP only if all of the coecients a0 , a1 , ..., an−1 are
positive.

326/670
Some Remarks

The Routh test is proposed by English mathematician Edward John


Routh in 1876. German mathematician Adolf Hurwitz
independently proposed in 1895 to arrange the coecients of the
polynomial into a square matrix, called the Hurwitz matrix, and
showed that the polynomial is stable if and only if the sequence of
determinants of its principal submatrices are all positive. The two
procedures are equivalent, however, Routh test is computationally
more ecient. A polynomial satisfying the Routh (Hurwitz)
criterion is called a Hurwitz polynomial.

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

P(s) = a0 s n + a1 s n−1 + · · · + an−1 s + an = 0

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

P(s) = s 4 + 7s 3 + 17s 2 + 17s + 6


7 17 0 0
 
 1 17 6 0 
 0 7 17 0 
 

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 )

Let we 1 , we 2 , . . . be the positive real roots of PR , and wo 1 , wo 2 , . . .


be the positive real roots of PI , both arranged in ascending order of
magnitude.

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:

we 1 , we 2 , we 3 = 0.6180, 1.0000, 1.6180


wo 1 , wo 2 = 0.7962, 1.5382

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

∴ P(s) is Hurwitz stable polynomial.


335/670
Figure: PR and PI graphics

336/670
Steady state error analysis

Control systems may be classied according to their ability to


follow step inputs, ramp inputs, ... Open-loop transfer function is
sucient for this kind of classication. Open-loop transfer function
is given by

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

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

Type 0 system→ Ka = 0 → ess = ∞


Type 1 system → Ka = 0 → ess = ∞
Type 2 system→ Ka = K → ess = K1
1
Type 3 or higher → Ka = ∞ → ess = ∞ =0

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

Desired position of the barrier has the following time graphics:

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

TF of the dc motor: EΘ(s)


a (s)
= s 2 +31s+2
a) Using a proportional control conguration above with
r (t) = π2 u(t), how do you choose K for the maximum overshoot of
5%? Find the corresponding rise time.
b) Choose a K for the maximum overshoot 2%. Compute the
corresponding rise time.

348/670
Motion control of a car

A simplied equations of motion for a car is

mv̇ = u − bv

From the force u to the speed v the transfer function is

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

Resulting response shown in the next slide complies with our


expectations.

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:

For a cruise control of a car, its plant model can be used in a


feedback conguration.

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

K (s+z1 )(s+z2 )···


Given G (s)H(s) = (s+p1 )(s+p2 )··· , it is desired to nd locations of
G (s)
the poles of 1+G (s)H(s) as K varies from 0 to ∞.
Example (Problem Statement)
K 1
G (s) = ; H(s) =
(s + 1)(s + 2) s +3
K
→ G (s)H(s) =
(s + 1)(s + 2)(s + 3)
G (s) K (s + 3)
→ =
1 + G (s)H(s) (s + 1)(s + 2)(s + 3) + K
As K varies from 0 to ∞ how are the poles aected by this?
358/670
Example
K
G (s) = , H(s) = 1
s
G (s) K
= , K :0→∞
1 + G (s)H(s) s +K

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

Notice, for a given s and z1 , how we sketched s + z1 ; and how we


viewed its angle. Also notice how we slid the vector s + z1 .
In the following slides, the reasoning behind vector representation
of s + z1 is presented.

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

1 + G (s)H(s) = 0, Its roots are the poles of the closed loop


system. Its alternative form:
G(s)H(s) = −1
This can be decomposed into two parts:
G(s)H(s) = ∓π(2k + 1)
|G(s)H(s)| = 1
k = 0, 1, . . .

371/670
Root Locus Denition

A plot of points satisfying the angle condition alone is the root


locus.
Every point satisfying the angle condition also satises the
magnitude condition for some K .

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 .

The angle of G (s)H(s):

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)

Continued from the previous page


Test point Angle Conclusion
−0.1 −π On the RL
−0.6 −π On the RL
−2 −2π Not on the RL
1 0 Not on the RL
i − 34 π Not on the RL
−0.5 + i −π On the RL
−0.5 + 2i −π On the RL
Table: 3 Test points and their angles

For every point on the root locus there exists a K satisfying


G (s)H(s) = −1
377/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)

q(s + z1 )(s + z2 )......(s + zm ) N(s)


G (s) = = , q > 0, n ≥ m
(s + p1 )(s + p2 )....(s + pn ) D(s)
Closed loop transfer function:
KG (s) KN(s)
T (s) = =
1 + KG (s) D(s) + KN(s)

381/670
Digression: Continuity of the roots of a polynomial in terms
of its coecients

Let the polynomial f (x) = x n + c1 x n−1 + c2 x n−2 + ... + cn with


c1 , . . . , cn ∈ R have the roots a1 , a2 , . . . , an in ascending order.

Consider the polynomial g (x) = x n + d1 x n−1 + d2 x n−2 + ... + dn


with d1 , . . . , dn ∈ R leading to the roots b1 , b2 , . . . , bn in ascending
order.

If it is desired that |a1 − b1 | < , . . . , |an − bn | <  for any positive


, then one can always nd a positive δ such that

|c1 − d1 | < δ, . . . , |cn − dn | < δ → |a1 − b1 | < , . . . , |an − bn | < 

∴ Little changes in polynomial coecients results in little changes


in root locations.
382/670
Digression: Symmetric positions of the polynomial roots
with respect to the real axis

The complex conjugate root theorem states that if P is a


polynomial in one variable with real coecients, and a + bi is a
root of P with a and b real numbers, then its complex conjugate
a − bi is also a root of P .
It follows that the roots of a polynomial with real coecients are
mirror-symmetric with respect to the real axis.

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.

Since the coecients of G (s) are real by assumption, complex


conjugate roots must appear in pairs. Therefore, the trajectories
are symmetric with respect to the real axis.
384/670
Property 2

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) = −π

Thus s2 = 0 is on the root locus plot. In fact every point in [−2, 1]


is on the root locus plot. The total phase of every point in
[−4, −2] can be shown to be zero. Therefore they cannot be on the
root locus plot. Every point in (−∞, −4] can be shown to satisfy
phase condition, therefore, is on the root locus plot.

388/670
The vector s + a with −a and s are on the real axis, has angle
either 0 or π .

When −a is to the left of s the angle of s + a is 0, so that we do


not count them in the phase condition. However, when −a is to the
right of s the angle of s + a is π , in this case we want odd number
of them to satisfy the phase condition.

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

Its poles are the same as those of G (s) when K = 0.


The roots of D(s) + KN(s) = 0 are the poles of T (s). This can be
written as D(s)
K + N(s) = 0. Thus its roots approach those of N(s)
as K → ∞.

390/670
q(s + z1 )(s + z2 )......(s + zm )
G (s) = , q > 0, n ≥ m
(s + p1 )(s + p2 )....(s + pn )

Continued from the previous page


There is one problem however. The number of poles and the
number of zeros may not be the same. If n > m, then m
trajectories will enter m zeros, The remaining (n − m) trajectories
will approach (n − m) asymptotes.

391/670
Property 4

For large s , the root locus trajectories will approach (n − m)


number of straight lines, called asymptotes. Asymptotes intersect
the real axis at
poles − zeros
P P
( , 0)
number of poles - number of zeros

intersection point is called centroid. These (n − m) asymptotes


have angles
±π ±3 × π ±5 × π
, , , ......
n−m n−m n−m
These formulas will give only (n − m) distinct angles.

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 + i) + (−3 − i) + (−2 + i) + (−2 − i) − 1) − (0)


= −2.2
5−0
Or, because the imaginary components cancel out

(−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

q(s + z1 )(s + z2 )....(s + zm ) q


≈ (25)
(s + p1 )(s + p2 )....(s + pn ) (s − a)n−m

for very large s .


In other words, all m zeros are cancelled by poles, and only (n − m)
poles are left at a. Now we compute the relationship among zi , pi ,
and a.

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

(s − a)n−m = s n−m − (n − m)as n−m−1 + · · ·

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

which implies, by direct division, an expansion

zi ]s n−m−1 + ... ≈ s n−m − (n − m)as n−m−1 + ....


X X
s n−m + [ pi −

Equating the coecients of s n−m−1 yields


X X X X
(n − m)a = −[ pi − zi ] = (−pi ) − (−zi )

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

Similarly as K approaches innity, one root will approach the zero


at -4 and another will approach −∞ along the asymptote that
coincides with the negative real axis. Because the root locus
trajectories are continuous, the two roots must come in or break in
somewhere in the section(−∞, −4] as shown below. Such a point
is called a break-in point.
We will calculate points A and B .
403/670
Digression

If a polynomial f has root at s0 repeated twice, then f (s0 ) = 0 and


f 0 (s0 ) = 0.
Example

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

D(s0 ) + KN(s0 ) = 0 (26)

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

To nd angle of depar-


ture, we draw a small
circle around pole −1 +
4i as shown below. We
then nd a point s1 on
the circle with a total
phase equal to π .

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

Satisfying the above equation is no dierent than satisfying the


previously given formula. In our problem breakaway formula yields
3s 2 + 6s + 2 = 0. Its solutions are s1,2 = −0.4226, −1.5774. Good
one is −0.4226.
416/670
Continued from the previous page
Determine the imaginary axis crossing points: Since the
characteristic equation for the closed loop system is
s 3 + 3s 2 + 2s + K = 0, we form the Routh array to nd the points
of destabilization:
s3 1 2
2
s 3 K
s 1 6−K
3
s0 K
At K = 6 the imaginary axis is crossed. Looking at the
√ second row
2 2
of the Routh array 3s + K = 3s + 6 = 0 → s = ±i 2.
Another method: Set poles to zero in the tf:

(s 3 + 3s 2 + 2s + K )s=iw = (iw )3 + 3(iw )2 + 2(iw ) + K = 0

→ −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)

and the conguration below.

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

s 3 + (5 + K )s 2 + (12 − 2K )s + (5K − 18) = 0

a symbolic processing Routh table generator outputs

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)

Due to the complexity and redundant terms (i.e., redundancies in


the last term of the rst column exist), analysis of the array may
not performed by inspection!
We shall nd the stable interval of K by using the root- locus
method.

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

Breakaway point Ṅ(s)D(s) − N(s)Ḋ(s) = 0

(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:

54.7 − (900 + θ) = 180; θ = 180 − 90 + 54.7 = 1450

Suppose we want a K resulting in ζ = 0.7

ζ = 0.7 → arccos(0.7) = 450 = β


426/670
Continued from the previous page
S can be obtained by trial and error method. The point
s = t(−1 + i) for t = 1.67 satises the angle condition.

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

The above conguration is not in the standard form. Recall the


standard form given below:

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)

20(1 + ks) s(s + 1)(s + 4) + 20(1 + ks)


1+G (s)H(s) = 1+ = =0
s(s + 1)(s + 4) s(s + 1)(s + 4)
Poles of T (s) satisfy s 3 + 5s 2 + 4s + 20 + 20ks = 0
430/670
Continued from the previous page

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)

can be used for the root locus analysis.

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

(−5+i 2−i 2)−(0)


Intersection of asymptotes and real axis: 3−1 = −2.5
±π(2n+1)
Angle of asymptotes: 3−1 = ± π2 (2n + 1)

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

y (t) = 1 − 0.747e −2.902t − 0.253e −1.049t cos(2.406t)

−1.011e −1.049t sin(2.406t)


The response for the other k may be found, and the responses are
compared. Designer selects the one that best ts the specications.
439/670
Example
Railway barrier problem Reconsider the railway barrier problem (See
Figure 10). This time, as a controller, use an integral controller Ks
(See the conguration in Figure 11).

Figure: 11 Integral controller conguration

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.

Pole-zero locations for the feedback conguration:

441/670
Continued from the previous page

Figure: 12 The root locus

System is stable for K values below some critical K value.


442/670
Noting that the forward path has the tf KG (s) = K
s(s 2 +3s+2)
, the
closed loop transfer function is T (s) = s 3 +3s 2K+2s+K . By Routh
analysis, system is stable for 0 < K < 6.
Continued from the previous page
s=tf('s');
G=1/(s*(s^2+3*s+2));
rlocus(G)
K=2;
T=K/(s^3+3*s^2+2*s+K);
[y,t]=step(pi/2*T); %response to step with ampl. pi/2
plot(t,y)

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.

If C (s) were K , and if we tried all K values from 0 to innity, we


would get all possible root locations. We may check whether the
desired roots are among them.

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:

By this, seemingly we can get the desired roots. Checking carefully,


we see that the actual poles are at −2 ± i 2.24. We are not lucky; it
is not close enough.

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.

However, this approach is not desired. Because it contains


dierentiators, which engineers don't use in practice. As a good
solution you may try a rst order compensator of the form
C (s) = K(s+b)
(s+a)
for some proper choice of a and b .

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.

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.

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 (s) = −0.5s × (R(s) + N(s))

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.

The properness is needed to avoid the use of dierentiators in


realizing compensators; the well-posedness is needed to avoid
amplication of high frequency noise in overall systems.

454/670
Total stability

In the design of control systems the rst requirement is always the


stability of the closed loop transfer function G0 (s), from the
reference input r to the plant output y . However, this may not
guarantee that the system will work properly. The following
example illustrates this:

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

Notice that the plant transfer function is unstable, because it has a


pole in the RHP, namely, at s = 1. The (s − 1) term in the
denominator of the plant tf is cancelled by the controller's (s − 1)
term in its numerator. This is called a direct cancellation of an
unstable pole. This is not practised by the control engineers for the
reasons to be explained.

457/670
Continued from the previous page

Let us look at the transfer function Gyn (s) from n to y .


1
s−1 s +1
Gyn (s) = s−1 1
=
1+ s+1 s−1
(s − 1)(s + 2)

It is unstable. Thus any nonzero noise, no matter how small, will


excite an unbounded plant output and the system will burn out.

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

For this conguration, well-posedness is equivalent to


1 + C (∞)G (∞) 6= 0.
Example
s+1
When C (s) = − s+ 2 and G (s) = s+1 , we have
s

1 + C (∞)G (∞) = 0, therefore the system is not well-posed.

461/670
Pole placement

The overall transfer function G0 (s) from r to y is


C (s)G (s)
G0 (s) =
1 + C (s)G (s)
This implies
G0 (s)
C (s) =
G (s)(1 − G0 (s))
Formula to nd compensator transfer function, when the plant
transfer function and the desired overall transfer function are given.
462/670
Example
1
Let G (s) = s(s+2) and the desired overall transfer function
3
G0 (s) = s 2 +2.4s+3
. Compute the required controller transfer
function C (s).
3
s 2 +2.4s+3 3(s + 2)
C (s) = 1 3 =
s(s+2) (1 − s 2 +2.4s+3
) s + 2.4

It is a proper compensator. This implementation has a pole zero


cancellation. Because the cancelled pole s + 2 is a stable pole, the
system is totally stable. Since 1 + C (∞)G (∞) 6= 0, the system is
also well-posed.

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

However, the conguration has the denominator template

s 2 + 2s + K

Clearly, there is no K to meet the equation. Therefore, if the


compensator is of degree zero, it is not possible to achieve arbitrary
pole placement.

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

D0 (s) = (s + 2)(s + 2 − 2i)(s + 2 + 2i) = s 3 + 6s 2 + 16s + 16

Matching this to the denominator of G0 (s), we have A1 = 1,


A0 = 4, B1 = 8, B0 = 16.

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

y (t) = ae −iwt + ae iwt + b1 e −s1 t + b2 e −s2 t + · · · + bn e −sn t

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→∞

where B = A|G (iw )| and φ = G (iw ) = tan−1 Im G (iw )


∆ ∆
Re G (iw )
Steady state response of a stable linear time invariant system to a
sinusoidal is a sinusoidal at the same frequency. However, output's
amplitude and phase are possibly modied.

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

In Bode plots, 20 log |G (iw )| versus log w represents magnitude


graphics. The unit of 20 log |G (iw )| is decibel, abbreviated dB. The
G (iw ) vs. log w is the conventional phase plot. The main
advantage of the Bode plot is that multiplication of the gains could
be treated as sum of the gains. Let us obtain Bode plots for the
elementary transfer function factors.

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

w log w |G (iw )| 20 log |G (iw )|


1 0 1 0
10 1 0.1 −20
100 2 0.01 −40

(0, 0), (1, −20), (2, −40)

476/670
Example
Let G (s) = s then G (iw ) = iw . Its Bode plot is

w log w |G (iw )| 20 log |G (iw )|


1 0 1 0
10 1 10 20
100 2 100 40

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)

Use the following normalized form:

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

− limw →∞ (1 + iw4 ) − limw →∞ (1 + 5 ) − limw →∞ (1 +


iw iw
6 )−
limw →∞ (1 + 7 ) − limw →∞ (1 + 8 )
iw 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

The response of a non minimum phase system to a step input has


an "undershoot". This means, if the output was initially zero and
the steady state output is positive, the output becomes rst
negative before changing direction and converging to its positive
steady state value. Intuitively, this is annoying from a controller
point of view: Imagine you take action to change the temperature
of the water in your shower because it is too cold. However, before
becoming warmer, the water becomes even colder. You may think
in the rst moment, you turned the knob in the wrong direction, so
you turn it back. This would be a wrong decision because this will
make the water even colder in the long run.

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]

h(s) (6.24 + s)(2.24 − s)


=
E (s) s 2 (s + 2)2

where h and E denote altitude and elevator angle respectively. Its


step input in elevator angle response h is given below:

Observe that, in response to the step input, the aircraft initially


494/670
Using OCTAVE for Bode Plots

Example
1 + 10s 1 − 10s
G1 (s) = 0.1 , G2 (s) = 0.1
| {z 1 + s } | {z 1 + s }
Min.Phase Nonmin.Phase

G1 = 0.1*tf([10 1],[1 1]);


G2 = 0.1*tf([-10 1],[1 1]);
subplot(2,1,1),bode(G1)
subplot(2,1,2),bode(G2)

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

100 + 20s + s 2 104 + 2 × 103 s + 100s 2


H(s) = 100 =
s 2 (1 + 10−4 s + 10−6 s 2 ) 10−6 s 4 + 10−4 s 3 + s 2

N=[100 2e3 1e4];


D=[1e-6 1e-4 1 0 0];
sys=tf(N,D)
bode(sys)

497/670
Continued from the previous page

498/670
Transportation Lag

G (s) = e −sT , G (iw ) = e −iwT


|G (iw )| = | cos wT − i sin wT | = 1, G (iw ) = −wT

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.

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)

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

For small values of the frequency, the plot is an approximately a


straight line with a slope of -20 dB/dec. So the transfer function
has a factor of pole at the origin. Magnitude of the tf is 20 dB at
w=1, thus we have a constant factor of 10 in the numerator. A
simple zero is located at 1000 rad/s because the curve goes
10(1+ 1000
s
)
upwards by 20 dB/dec at 1000 rad/s. Ans. H(s) = s

507/670
Polar plots

The polar plot of a sinusoidal transfer function G (iw ) is a plot of


G (iw ) on the complex plane as w varied from zero to innity.
Example
First order factors
1
G (s) = 1+sT
1
G (iw ) = 1+iwT .
= √ 1 − tan−1 wT
1+w 2 T 2

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.

Figure: 14 Polar plot of (1 + iwT )


511/670
Example
Integral and Derivative factors:
G (s) = 1s → G (iw ) = iw1
= −i w1
Polar plot is the negative imaginary axis.

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

The graph looks similar for both underdamped and overdamped


cases.
514/670
Example
Some values for the polar plot of 1 + 2ζ(i wwn ) + (i wwn )2 , wn i0, ζi:

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

Figure: 16 Polar plot of 1 + 2ζ(i wwn ) + (i wwn )2

515/670
Continued from the previous page
Let ζ = 0.5, G (iw ) = 1 + i wwn + (i wwn )2 ,

Figure: 17 Polar plot of 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

When G (s) is a ratio of two polynomials with real coecients we


know that G (iw ) and G (−iw ) are related. Namely

[G (iw )]∗ = G (−iw ) (28)

Using this if we calculated G (iw ) for positive w values, then we


would not need any more calculation to nd G (iw ) for negative w
values. We simply utilize (28).

519/670
Example

Figure: Images for positive and negative iw values

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

p(s) = an s n + an−1 s n−1 + · · · + a1 s + a0

This leads to
h i∗
p((re iθ )∗ ) = p(re −iθ ) = p(re iθ ) (Prelim. 2)

This identity is detailed below:

p((re iθ )∗ ) = an r n e −inθ + an−1 r n−1 e −i(n−1)θ + · · · + a1 re −iθ + a0


∗
= an r n e inθ + an−1 r n−1 e i(n−1)θ + · · · + a1 re iθ + a0


= p(re iθ )

Conclusion:
∗
n(re iθ ) [n(re iθ )]∗ n(re −iθ )

∗
G (re iθ ) = = G (re −iθ )

= ∗
=

d(re ) iθ
[d(re )] d(re −iθ )

522/670
Example

Figure: Images for a line and and its conjugate

523/670
Nyquist stability criterion

Mapping Theorem Let F (s) be the ratio of two polynomials in s .


Let P be the number of poles and Z be the number of zeros of F (s)
that lie inside some closed contour Γs in s-Plane, with multiplicity
of poles or zeros accounted for. Let the contour Γs does not
contain any poles or zeros of F (s). Let us map the points on Γs to
the curve ΓF on the F (s) plane. The total number N of clockwise
encirclements of the origin of F (s) plane by ΓF , as s traces out the
entire contour Γs in the clockwise direction, is equal to Z − P .

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

F (s) has two poles in the region.


529/670
Stability Test in the Frequency Domain

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)

Closed loop system poles are the roots of D(s) + N(s).


Also notice that:
N(s) D(s) + N(s)
1 + G (s) = 1 + =
D(s) D(s)

Zeros of 1 + G (s) are the roots of D(s) + N(s).


Closed loop system poles in Γs = Zeros of 1 + G (s) in Γs
Dene Z: Number of zeros of 1 + G (s) in Γ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

Figure: Images of positive Im axis points under the mapping


8s
G (s) = (s−1)(s−2)

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

1 + G (s) encircles the origin twice in the ccw direction (because


G (s) encircles −1 + i 0 twice in the ccw direction), i.e., N = −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)

has poles in the RHP.

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:

Figure: Modication of the Nyquist contour

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

Operation Truncated Result Approximation


π
1 + 0.0001e i 2 = 1 + 0.0001i ≈1
π
1 + 0.0001e i 3 = 1.0001 + 0.000086i ≈1
π
1 + 0.0001e i 4 = 1.0001 + 0.000070i ≈1
π
1 + 0.0001e i 5 = 1.0001 + 0.000058i ≈1
Table: 1 plus comparatively small numbers
546/670
Because G (s) has poles at the origin, standard contour's part that
pass through the origin is replaced by the semicircle εe iθ , where θ
varies from −900 → 900 , and ε is very small. The mapping G (s)
for the points on the semicircle can be approximated as
s +1 1 −1
G (s) = ≈ 2 = 2
s 2 (s − 2) s (−2) 2s

547/670
−1
G (s) ≈
2s 2

Now consider point A or s = εe i 0 : G (A) = 2ε−2 e1i 0 = 2eε2 = 21ε2 e iπ


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)

Is the system on the right


stable? Use the Nyquist
criterion.

552/670
s +3
G (s) = 10
(s + 2)(s − 2)

Continued from the previous page


Stability analysis by the Nyquist
theorem uses image of the Nyquist
path under the mapping G (s). We
rst obtain the image of positive
imaginary axis. For negative imag-
inary axis and for the right half cir-
cle we do not need any new com-
putation, we use properties of the
complex plotting.

553/670
s +3
G (s) = 10
(s + 2)(s − 2)

Continued from the previous page


s G (s)

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

200i 0.05 −1.585

554/670
s +3
G (s) = 10
(s + 2)(s − 2)

Continued from the previous page


s G (s)

0 −7.5

0.5i 7.15 −2.97

3i 3.26 −2.35

20i 0.5 −1.71

200i 0.05 −1.585

555/670
s +3
G (s) = 10
(s + 2)(s − 2)

Continued from the previous page

556/670
s +3
G (s) = 10
(s + 2)(s − 2)

Continued from the previous page

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

N = number of clockwise encirclements of the -1 +i 0 point in the


G (iw )H(iw ) plane

P = number of poles of G(s)H(s) in the right-half s plane

For a stable control system, we must have Z = 0; in such case the


mapping theorem formula becomes N = −P ; in other words, we
must have P counterclockwise encirclements of the -1 + i 0 point.

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)

This does not encircle the point −1 + i 0, therefore the system is


stable for every K , T1 , T2 > 0.

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

Polar plot for the positive frequencies:


Label A B C D E F G H
w 0 0.1 0.5 1 2 10 20 50
|G (s)| 3 2.92 1.89 0.94 0.32 0.014 0.0037 0.00059
G (s) 0 -17.02 -71.56 -108.43 -139.40 -171.43 -175.71 -178.28
562/670
Example
K
G (s)H(s) =
(2s + 1)(3s + 1)(4s + 1)

Stable for K = 3; unstable for K = 20.


563/670
Let us analyze stability of the minimum phase systems
25
G1 (s) =
(s + 1)(s + 2)(s + 3)

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.

The gain margin refers to the amount of gain, which can be


increased or decreased without making the system unstable. It is
expressed as a magnitude in dB.

The phase margin refers to the amount of phase, which can be


increased or decreased without making the system unstable. It is
expressed as a phase in degrees.

In calculating the phase and gain margins of the minimum phase


systems,it is more practical to consider part of the Nyquist plot
corresponding to the positive frequencies

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

The phase margin is that amount of additional phase lag at the


gain crossover frequency required to bring the system to the
verge of instability.

The gain crossover frequency is the frequency at which |G (iw )|,


the magnitude of the open-loop transfer function, is unity.

The phase margin γ is 1800 plus the phase angle φ of the


open-loop transfer function at the gain crossover frequency, or:

γ = 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

Kg dB = 20logKg = −20log |G (iwc )|

The gain margin expressed in decibels is positive if Kg is greater


than unity and negative if Kg is smaller than unity. Thus, a positive
gain margin (in Decibels) means that the system is stable, and a
negative gain margin (in Decibels) means that the system is
unstable

576/670
Figure: Positive gain margin

577/670
578/670
Discrete control

For simplicity in analysis, we assume that the numbers entering or


leaving the computer have the same xed period T , called the
sampling period.
Thus, reference input is a sequence of sample values r (kT ).

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

Notice that the area below the function curve is 1.


As the base length of the pulse gets smaller, the δi (t) approaches
the unit impulse function δ(t).
δ(t) is nonzero at t = 0, it is zero elsewhere.
δ(t − T ) is nonzero when t − T = 0, i.e., t = T , it is zero
elsewhere.
582/670
The pulse sequence δi (t) has the limit δ(t) , and called unit
impulse function. δ(t) and δ(t − T ) are graphically shown below.

The area below the unit impulse function is 1.


Z ∞ Z ∞
δ(t)dt = 1, δ(t − T )dt = 1
−∞ −∞

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

"From a purely mathematical viewpoint, the impulse function is not


strictly a function, because any real function that is equal to zero
everywhere but a single point must have total integral zero."

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

Note that impulse with strength A has the following integrals:


Z ∞ Z ∞
Aδ(t)dt = A, Aδ(t − T )dt = A
−∞ −∞

587/670
More properties

Product of the impulse function and a continuous function can be


integrated as follows:
Z ∞
f (t)δ(t)dt = f (0)
−∞
Z ∞
f (t)δ(t − t0 )dt = f (t0 )
−∞
Z ∞ ∞
X
f (t) δ(t − kT )dt = f (0) + f (T ) + f (2T ) + · · ·
−∞ k=0

Note that the integral of impulse is no more an impulse; it is a


number.

588/670
Laplace transform of the impulse function

The formula Z ∞
f (t)δ(t − t0 )dt = f (t0 )
−∞

with the function f (t) = e −st :


Z ∞
L{δ(t − t0 )} = e −st δ(t − t0 )dt = e −st0
0

As t0 approaches zero, we obtain

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.

ZOH takes the value r (kT ) and holds it constant for


kT ≤ t < (k + 1)T .

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

In the Laplace transform domain e −sT factor means T units delay


in the time domain.
Example
1 1
u(t) ↔ so u(t − T ) ↔ e −sT
s s
1 1
tu(t) ↔ 2
so (t − T )u(t − T ) ↔ e −sT 2
s s

In the inverse laplace transforming e −sT F (s) we therefore inverse


laplace transform F (s) and the result is shifted in the time domain
by T units.
EOD

596/670

X

r (t) = r (kT )δ(t − kT )
k=0

r ∗ (t) is a sequence of Dirac Delta impulses.


Z ∞ Z ∞ ∞
X
∗ ∗ −st −st
L (r (t)) = r (t)e dt = e r (kT )δ(t − kT )dt
0 0 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

Laplace transform of r ∗ (t) is a weighted sum of samples of r (t)


taken at t = kT , k = 0, 1, 2, . . ..

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:

z −1 r (0) + r (T )z −1 + r (2T )z −2 + r (3T )z −3 + · · · =


 

r (0)z −1 + r (T )z −2 + r (2T )z −3 + r (3T )z −4 + · · ·


We therefore have the following z transform pair:

x((k − 1)T ) ↔ z −1 Z (x(kT ))

An interpretation of a Z-transform expression

r (0) + r (T )z −1 + r (2T )z −2 + r (3T )z −3 + · · ·


|{z} | {z } | {z } | {z }
0th sample 1st sample 2nd sample 3rd sample

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

If the sampling time T is known we can also write



X
Z (r (t)) = Z (r ∗ (t)) = r (kT )z −k
k=0

601/670
A comparison

Laplace transform operates on a function and returns a


function in s .

Z-transform operates on samples (sequence of numbers) and


returns a function in z .

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

z-transform of the discrete unit step function:


∞ ∞
1 z
(1·z −1 )k =
X X
U(z) = Z (un ) = u(kT )z −k = =
1 − z −1 z −1
k=0 k=0


X z
∴ z −k =
z −1
k=0

604/670
Example
(Discrete) Exponential sequence e −akT , k = 0, 1, 2, . . . :

(1, e −aT , e −2aT , . . .)

z-transform of the exponential sequence:



X ∞
X
−at −akT −k
(ze aT )−k

Z e = e z =
k=0 k=0

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)

x1 (t) + x2 (t) X1 (z) + X2 (z)

x(t + T ) zX (z) − zx(0)

tx(t) −Tz dXdz(z)

e −at x(t) X (ze aT )

x(0), initial value limz→∞ X (z) if the limit exists

x(∞), nal value limz→1 (z − 1)X (z) if the limit exists

and the system is stable

607/670
Example
1−e −sT
Consider the ZOH system with tf G0 (s) = s .

Y (s) 1 − e −sT 1 1 − e −sT


= G0 (s)Gp (s) = × = := G (s)
R ∗ (s) s s(s + 1) s 2 (s + 1)

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:

G (z) = 0.3678z −1 + 0.7675z −2 + 0.9145z −3 + · · · = Y (z)

Recall Y (z) = ∞ −k . This yields:


P
k=0 y (kT )z

y (0) = 0, y (T ) = 0.3678, y (2T ) = 0.7675, y (3T ) = 0.9145. . . .

611/670
A discrete equivalent of a continuous plant by ZOH method

u(t) = u(k), kTs ≤ t ≤ (k + 1)Ts


ZOH has the tf GZOH (s) = 1−es
−sT

Y (z) = Z [GZOH (s)G (s)] U(z)

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

Y (z) = Z [GZOH (s)G (s)] U(z)

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

(z − 0.1353)Y (z) = 0.8647U(z)


(1 − 0.1353z −1 )Y (z) = 0.8647z −1 U(z)
yk − 0.1353yk−1 = 0.8647uk−1 , k = 1, 2, . . .
616/670
Continued from the previous page
ZOH discretization by OCTAVE
s=tf('s');
Ts=2;
G=1/(s+1);
c2d(G,Ts,'zoh')

Transfer function:
0.8647
----------
z - 0.1353

Sampling time (seconds): 2

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

Sampling time: 0.5 s

619/670
Y (z) G (z)
= T (z) =
Y (z) = G (z)R(z) R(z) 1 + G (z)

620/670
Example

G (z) := Z(G0 (s)Gp (s))

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

Y (z) = 0.3678z −1 + z −2 + 1.4z −3 + 1.4z −4 + 1.147z −5 + · · ·

→ y (0) = 0, y (1) = 0.3678, y (2) = 1, y (3) = 1.4, y (4) = 1.4, . . .

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

Laplace and Z-transforms are related by z = e sT . Thus


z = e sT = e (σ+iw )T we have |z| = e σT and z = wT .
In the left half s-plane σ < 0, therefore, for stability z must satisfy
the condition |z| < 1.

624/670
Continued from the previous page

The imaginary axis of the s-plane corresponds to the unit circle in


the z-plane, and the inside of the unit circle corresponds to the left
half of the s-plane
Therefore, a sampled-data system is stable if all the poles of the
closed-loop transfer function T(z) lie within the unit circle of the
z-plane.
625/670
Example

G (z) := Z(G0 (s)Gp (s))

0.3678z + 0.2644
G (z) =
z2 − 1.3678z + 0.3678
For K = 1, the closed loop transfer function is

Y (z) KG (z) 0.3678z + 0.2644


= = 2
R(z) 1 + KG (z) z − z + 0.6322

The characteristic equation is q(z) = z 2 − z + 0.6322.

626/670
Y (z) 0.3678z + 0.2644
= 2
R(z) z − z + 0.6322

Continued from the previous page

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.

When K = 10, we have


q(z) = z 2 + 2.310z + 3.012 = (z + 1.155 +i 1.295)(z + 1.155 −i 1.295)
and the system is unstable because both roots lie outside the unit
circle.

This system is stable for 0 < K < 2.39.

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 (1) = 2y (0) + u(1) → y (1) = 1


y (2) = 2y (1) + u(2) → y (2) = 2
y (3) = 2y (2) + u(3) → y (3) = 4
y (4) = 2y (3) + u(4) → y (4) = 8
.. ..
. .

The solution sequence y (n) grows to innity. We call a dierence


equation BIBO stable if every bounded input produces a bounded
output. Thus, the given dierence equation is unstable.
628/670
Continued from the previous page
Stability of a dierence equation can also be determined by
checking its pole locations.

y (m) = 2y (m − 1) + u(m)

Z transform throughout:

Y (z) = 2z −1 Y (z) + U(z)

(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

y (m) = 0.2y (m − 1) + u(m)

The transfer function is


Y (z) 1 z
H(z) := = 1
=
U(z) 1 − 0.2z − z − 0.2

It is stable. Its unit step response in the z-domain is


z z
Y (z) = H(z)U(z) = ×
z − 0.2 z − 1
Its steady state unit step response is

y (∞) = limz→1 (z − 1)Y (z)


z2
= limz→1 (z − 1)H(z)U(z) = limz→1 z−0.2 = 1.25

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

Multiply it throughout by z −n and sum over 0, 1, 2, . . .:



X ∞
X ∞
X
yn+1 z −n −3 yn z −n = 4 z −n
|0 {z } | 0 {z } | 0 {z }
1st term 2nd term 3rd term

3rd term is the z-transform of (1, 1, 1, . . .) and equals z−


z
1 . 2nd
term isP
the z-transform of yn and let us denote it by Y (z). How
about ∞ 0 yn+1 z ? This can be written as
−n

∞ ∞
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 Y (z) − z 2 − z = zY (z) − z + Y (z)

(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

Consider the continuous time state space system model

ẋ = Ax + Bu
y = Cx + Du

where x ∈ R n , y ∈ R p , u ∈ R m . The rst row is called the state


equations, and the second is called the output equations. For a
known input u and the initial condition x(t0 ), state equations have
the solution
Z t
A(t−t0 )
x(t) = e x(t0 ) + e A(t−τ ) Bu(τ )dτ
t0

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

u(t) = u(kT ), kT ≤ t < (k + 1)T

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

Recall that the general solution was


Z t
A(t−t0 )
x(t) = e x(t0 ) + e A(t−τ ) Bu(τ )dτ
t0

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

after some change of variables, can be written as


Z T
x(k + 1) = |{z} AT
e x(k) + e Aτ dτ B u(k)
Φ |0 {z }
Γ

or in a compact notation

x(k + 1) = Φx(k) + Γu(k)

644/670
Z T
x(k + 1) = |{z}
e AT x(k) + e Aτ dτ B u(k)
Φ |0 {z }
Γ

x(k + 1) = Φx(k) + Γu(k)


The term Φ above can be obtained analytically by taking inverse
Laplace transform of (sI − A)−1 and evaluating at T .
Setting the matrices H and J to C and D respectively, the state
space model
ẋ = Ax + Bu
y = Cx + Du
now becomes
x(k + 1) = Φx(k) + Γu(k)
y (k) = Hx(k) + Ju(k)

645/670
Recap

x(k + 1) = Φx(k) + Γu(k)


y (k) = Hx(k) + Ju(k)
Φ calculation
h i
Φ = e At = L−1 (sI − A)−1 t=T
 
t=T

Γ 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

We will show that it can also be calculated by

−1 1
 
−1
Γ=L (sI − A) B
s t=T

Start the illustration by dening 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

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

We want to discretize the above dynamics. Let the sampling period


be T = 0.5 sec. For the discrete model, we next compute Φ, Γ, H,
and J matrices.

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)

Substitute the calculated matrices:


1 0.5 0.125
   
x(k + 1) = x(k) + u(k)
0 1 0.5
| {z } | {z }
Φ Γ

1 0 x(k) + [0] u(k)


 
y (k) =
| {z } |{z}
H J

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

zIX (z) = ΦX (z) + ΓU(z)


x(k + 1) = Φx(k) + Γu(k)
Y (z) = HX (z) + JU(z)
y (k) = Hx(k) + Ju(k)

(zI − Φ)X (z) = ΓU(z)

X (z) = (zI − Φ)−1 ΓU(z)


Y (z) = H(zI − Φ)−1 ΓU(z) + JU(z)
= H(zI − Φ)−1 Γ + J U(z)
Transfer Function of the system:

Y (z) = G (z)U(z) = H(zI − Φ)−1 Γ + J U(z)


 
| {z }
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)

Figure: 35 Step Response of H(z)

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:

x[n+1] = Ax[n] + Bu[n]


y[n] = Cx[n] + Du[n]

to a step applied to the single input IU. The number


of points is determined automatically.

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.

DSTEP(A,B,C,D,IU,N) or DSTEP(NUM,DEN,N) uses the


user-supplied number of points, N. When invoked
with left hand arguments,
[Y,X] = DSTEP(A,B,C,D,...)
[Y,X] = DSTEP(NUM,DEN,...)
returns the output and state time history in the
matrices Y and X. No plot is drawn on the screen.
Y has as many columns as there are outputs and X has
as many columns as there are states.

659/670
Continued from the previous page
>> help stairs
STAIRS Stairstep plot.
STAIRS(Y) draws a stairstep graph of the elements
of vector Y.

STAIRS(X,Y) draws a stairstep graph of the elements


in vector Y at the locations specified in X.
.....
.....

660/670
Example

Let the output signal y (kT ) = (e aT )k cos(kbT )u(kT ) be the


impulse response of the LTI system above. Find the transfer
function G (z).

y (kT ) = Z −1 (Y (z)) = Z −1 (G (z)U(z))

Note that the impulse signal has the z-transform U(z) = 1.

→ y (kT ) = Z −1 (G (z)) → Y (z) = G (z)


661/670
Continued from the previous page

Express y (kT ) = (e aT )k cos(kbT )u(kT ) in a simpler notation.

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

z(z − r cos(θ) z(z − r cos(θ)


U(z) = 1, Y (z) = −iθ
, G (z) =

(z − re )(z − re ) (z − re iθ )(z − re −iθ )

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

Figure: r = 0.5 and θ = 0.75 case

667/670
Critically Stable System
Continued from the previous page
(b) r = 1, i.e., poles are on the unit circle.

Figure: r = 1 and θ = 0.75 case

668/670
Critically Stable System
Continued from the previous page

Figure: r = 1 and θ = 0.25 case

669/670
Unstable System
Continued from the previous page
(c) r > 1, i.e., poles are outside the unit circle.

Figure: r = 1.5 and θ = 0.25 case

670/670

You might also like