Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
27 views88 pages

Control Manual

The Control Theory Seminar manual provides an overview of control systems, focusing on linear time invariant systems, feedback control, and transient response. It covers fundamental concepts such as the Laplace transform, system classification, and the dynamics of first and second order systems. The seminar aims to equip participants with the knowledge to design simple feedback controllers and understand the limitations of control systems.

Uploaded by

dr.p.kumar2019
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)
27 views88 pages

Control Manual

The Control Theory Seminar manual provides an overview of control systems, focusing on linear time invariant systems, feedback control, and transient response. It covers fundamental concepts such as the Laplace transform, system classification, and the dynamics of first and second order systems. The seminar aims to equip participants with the knowledge to design simple feedback controllers and understand the limitations of control systems.

Uploaded by

dr.p.kumar2019
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/ 88

Control Theory Seminar

Student Manual

TEXAS INSTRUMENTS
Author: Richard Poley

Texas Instruments Inc.


MS.728
12203 Southwest Fwy.
Stafford
TX 77477
USA

e-mail: [email protected]

Module designator: Q2/1

Version 14

Revision 1

May 2013

© 2013 Texas Instruments Incorporated

Seminar materials may be downloaded at…


https://sites.google.com/site/controltheoryseminars/

TEXAS INSTRUMENTS
Contents

Introduction 1

1 Fundamental Concepts 3
Linear systems 3
The Laplace transform 5
Transient response 7
First order systems 8
Second order systems 9
Effects of zeros 12
Frequency response 14
Classification of systems 16

2 Feedback Control 18
Effects of feedback 18
The Nyquist Plot 21
The Nyquist stability criterion 25
Phase compensation 27
Sensitivity & tracking 30
Bandwidth 32
The Nyquist grid 33
The sensitivity integral 34
Plant model error 37
Internal model control 38

3 Transient Response 40
Transient specifications 40
Steady state error 42
PID control 44
Integrator windup 46
Complex pole interpretation 47
Root locus analysis 49
4 Discrete Time Systems 54
Sampled systems 55
The z transform 57
Z plane mapping 63
Aliasing 65
Sample to output delay 70
Reconstruction 71
Discrete time transformations 72
Direct digital design 80

Recommended Reading 81
Introduction

Scope
Welcome to this control theory seminar.

Objectives
• Understand why control is useful

• Know the language, the key ideas and the concepts

• Review the basic mathematical theory

• Understand how to formulate and interpret specifications

• Be able to design simple feedback controllers

• Appreciate the limitations of control

Dynmical systems can be classified in various ways. This seminar concerns the control of
linear time invariant systems.

While the system to be controlled is always continuous in time, the controller may be either
continuous time (analogue) or discrete time (digital).

What is Control?
“A control system is considered to be any system which exists for the purpose of regulating or
controlling the flow of energy, information, money, or other quantities in some desired fashion.”
William L. Brogan, Modern Control Theory, 1991

r(t) y(t)

Control
r(t) y(t)
System
t t

The finite dynamics of the system make perfect tracking impossible - compromises must be made.

Among the characteristics a good control system should possess are...

• Stability
• Steady state accuracy
• Satisfactory transient response
• Satisfactory frequency response
• Reduced sensitivity to disturbances

1
Control Theory Seminar

Modelling Paradigms
In this seminar we will consider two different modelling paradigms: input-output and state space.
Each may be used to model continuous time or discrete time systems.

Continuous Time Discrete Time

Sampling
Input - Output y(s) = G(s)u(s) y(z) = G(z)u(z)

State Selection State Selection

.
State Space x(t) = Ax(t) + Bu(t) x(k+1) = Fx(k) + Gu(k)
y(t) = Cx(t) + Du(t) Sampling y(t) = Hx(k) + Ju(k)

• The process of sampling converts a continuous time to a discrete time system representation

• State selection is required to arrive at an equivalent state space representation.

Notation
 Important points are marked with a blue quad-bullet. Keywords are highlighted in this colour.

Signals are always represented by lower case symbols and transfer functions by upper case symbols,
regardless of the how they are expressed.
y(s) = G(s) u(s)

g(t) = L -1{ G(s) }

The independent variable may be omitted where the meaning is obvious from the context.
y
G=
u

Matrices and vectors are represented by non-italic bold case. Matrices are upper case.

y(t) = Ax(t)

Differentiation will be denoted using prime or dot notation as appropriate:


x′(t ) x (t )

Slides with associated tutorials are marked in the lower left corner.
0.0

2
1 – Fundamental Concepts

Control Theory Seminar


1. Fundamental Concepts

• Linear Systems
• The Laplace Transform
• Dynamic Response
• Classification of Systems

“Few physical elements display truly linear characteristics.... however, by assuming an ideal, linear physical
element, the analytical simplification is so enormous that we make linear assumptions wherever we can possibly
do so in good conscience.”
Robert H. Cannon, Dynamics of Physical Systems, 1967

Linear Systems
Physical systems are inherently non-linear. Examples of non-linearity include:
• Viscous drag coefficients depend on flow velocity
• Amplifier outputs saturate at supply voltage
• Coulomb friction present in mechanical moving objects
• Temperature induced parameter changes

We study linear systems because of the range of tractable mathematical methods available.

Linearisation of a non-linear model about an operating point can help to understand local behaviour.

Complex non-linear phenomena cannot be predicted by linear models:


• Multiple equilibria
• Domains of attraction
• Chaotic response
• Limit cycles

3
Control Theory Seminar

Linearity
If a scaling factor is applied to the input of a linear system, the output is scaled by the same amount.

y1a
f1 y1a
u(t)

y2a
f2 y2a
t
u
y1b
f1 y1b
t
k

f2 y2b y2b
t

This is the homogeneous property of a linear system f (k u) = k f (u)

The additive property of a linear system is f (u1 + u2) = f (u1) + f (u2)

Terminology of Linear Systems

 Homogeneous and additive properties combine to form the principle of superposition, which all
linear systems obey
f (k1u1 ± k 2u2 ) = k1 f (u1 ) ± k 2 f (u2 )

The dynamics of a linear system may be captured in the form of an ordinary differential equation...

dny dy d mu du
an n
+ ... + a1 + a0 y = bm m + ... + b1 + b0u
dt dt dt dt

...or, using a more compact notation...

any(n) + ... + a1y′ + a0y = bmu(m) + ... + b1u′ + b0u

 If all the coefficients a0, a1, ... an and b0, b1, ... bm are (real) constants, this equation is termed a
constant coefficient differential equation, and the system is said to be linear, time invariant (LTI).

4
1 – Fundamental Concepts

Convolution
The impulse response of a system is it’s response when subjected to an impulse function, δ (t).

u(t) y(t)
δ (t)
g(t)
u(t) System y(t)

t t

 If the impulse response g(t) of a system is known, it’s output y(t) arising from any input u(t) can be
computed using a convolution integral

t
y (t ) = g (t ) * u (t ) = ∫ g (t − τ )u (τ ) dτ
−∞

This integral has a distinctive form, involving time reversal, multiplication, and integration over an infinite
interval. It is cumbersome to apply for every u(t).

The Laplace Transform


If f (t) is a real function of time defined for all t > 0, the Laplace transform f (s) is...

f ( s ) = L { f (t )} = ∫ f (t ) e
− st
dt
0+

...where s is an arbitrary complex variable.

Convolution L { ∫ f (t −τ ) f (τ ) dτ } = f (s) f (s)


t

0
1 2 1 2

Linearity L { k1 f1 (t ) ± k 2 f 2 (t ) } = k1 f1 ( s ) ± k 2 f 2 ( s )

Final value theorem lim f (t ) = lim s f ( s )


t→∞ s→0

Shifting theorem L { f (t − T ) } = e − sT f ( s )

The Laplace transform converts time functions to frequency dependent functions of a complex variable, s.

5
Control Theory Seminar

Poles & Zeros


any(n)(t) + ... + a1 y′(t) + a0 y(t) = bmu(m)(t) + ... + b1 u′(t) + b0 u(t)

For zero initial conditions, the differential equation can be written in Laplace form as...

ansn y(s) + ... + a1s y(s) + a0 y(s) = bmsm u(s) + ... + b1s u(s) + b0 u(s)

( ansn + ... + a1s + a0 ) y(s) = ( bmsm + ... + b1s + b0 ) u(s)

α(s) y(s) = β (s) u(s)

The dynamic behaviour of the system is characterised by the two polynomials:

β (s) = bmsm + ... + b1s + b0

α(s) = ansn + ... + a1s + a0

 The m roots of β (s) are called the zeros of the system

 The n roots of α(s) are called the poles of the system

The Transfer Function

u(s) G(s) y(s)

β (s)
The ratio is called the transfer function of the system.
α (s)
y ( s ) β ( s ) bm s m + ... + b1s + b0
G (s) = = =
u ( s ) α ( s ) an s n + ... + a1s + a0

 The transfer function of a system is the Laplace transform of its impulse response

y(t) = g(t)*u(t) = L -1{ G(s) u(s) }

The quantity n – m is called the relative degree of the system. Systems are classified
according to their relative degree, as follows...

• strictly proper if m < n


• proper if m ≤ n
• improper if m > n

6
1 – Fundamental Concepts

Transient Response
Numerator & denominator can be factorised to express the transfer function in terms of poles & zeros.

( s + z1 )( s + z 2 )...( s + z m )
y(s) = k u (s)
( s + p1 )( s + p2 )...( s + pn )

This rational function yields q terms through partial fraction expansion

ε1 ε2 εq
y(s) = + + ... +
s + r1 s + r2 s + rq

 Since all ai, bi are real, r1...rq are always either real or complex conjugate pairs

The time response is a sum of exponential terms, where each index is a denominator root.

− rq t
y (t ) = ε 1 e − r1t + ε 2 e − r2t + ... + ε n e − rnt + ε n +1 e − rn+1t + .. + ε q e

yc(t) yp(t)
Transient response Steady state response

The n terms in y(t) with roots originating from G(s) comprise the transient response, while the q-n
terms originating from u(s) comprise the steady state response.

Stability
For stability we require that the transient part of the response decays to zero, i.e. yc(t)→0 as t→∞.

The transient response is defined by the first n exponential terms in y(t)

yc (t ) = ε 1 e − r1t + ε 2 e − r2t + ... + ε n e − rnt

...where each complex root is of the form ri = σi ± jωi

For real systems complex roots always arise in conjugate pairs, so terms involving complex
exponential pairs arise in the time response.

yc (t ) = ε 1 e − r1t + ε 1 e − r1t + ...

Therefore the transient part of the response will include oscillatory terms, the amplitude of each being
constrained by an exponential.
yc (t ) = A1eσ 1t sin (ω1t + φ1 ) + ...

For stability we require that the real part (σi) of every ri in G(s) be negative.

7
Control Theory Seminar

First Order Systems

The dynamics of a classical first order system are defined by the differential equation

τ y′(t ) + y (t ) = u (t )

...where the parameter τ represents the time constant of the system.

Taking Laplace transforms and re-arranging to find the transfer function...

τ s y( s) + y( s) = u ( s)
y(s) 1
=
u ( s ) sτ + 1

The output y(t) for any input u(t) can be found using the method of Laplace transforms.

y (t ) = L −1 u ( s ) 1 
 
 sτ + 1 

t

The response following a unit step input is: y (t ) = 1 − e τ

First Order Step Response


A tangent to y(t) meets the
final value τ seconds later
For t > 4τ the output lies
within 2% of final value
y(t)

0.98 1

0.9
y(t) reaches 63% of final
0.8 y(t) = 1 – e-t
value at t ≈ τ

0.7
0.63
0.6

0.5

y(t) reaches 50% of final 0.4


value at t ≈ 0.7τ
0.3

0.2

0.1

0 t
0 1 2 3 4 5 6
t1 0.693 t2

tr

The 10% to 90% rise time


is approximately 2.2τ

Unit step response for first order system with τ = 1.

8
1 – Fundamental Concepts

Second Order Systems


Linear constant coefficient second-order differential equations of the form

y′′(t ) + 2ζω n y′(t ) + ωn2 y (t ) = ωn2u (t )

are important because they often arise in physical modelling.

Dynamic behaviour is defined by two parameters:

ζ is called the damping ratio


ωn is called the un-damped natural frequency

y( s) ωn2
The transfer function of the second order system is = 2
u ( s ) s + 2ζω n s + ωn2

...from which we get the characteristic equation s 2 + 2ζω n s + ωn2 = 0

The poles of the second-order linear system are at s = −ζω n ± ωn ζ 2 − 1

Classification of Second Order Systems


Dynamic response of the second order system is classified according to damping ratio.

Damping ratio Roots Classification

ζ >1 s = −ζω n ± ωn ζ 2 − 1 over-damped

ζ =1 s = −ωn critically damped

0 < ζ <1 s = −ζω n ± jωn 1 − ζ 2


under-damped

ζ =0 s = ± jω n un-damped
y(t)
2
1.875
2 1.75
1.625
1.5
1.375
1.25
1.125
1
1 0.875
0.75
0.625
0.5
0.375
0.25
0.125
0 t 0

9
Control Theory Seminar

The Under-Damped Response

In the under-damped case (0 < ζ < 1) we have a pair of complex conjugate roots at

s = −ζω n ± jωn 1 − ζ 2

Real and imaginary parts are denoted s = −σ ± jωd

1
τ is the time constant of the system: τ =
σ

ωd is the damped natural frequency of the system: ωd = ωn 1 − ζ 2

 The under-damped step response is of the form

ωn −σ t
y (t ) = 1 − e sin(ωd t + φ ) ...where φ = cos-1ζ
ωd

Transient Decay Envelope


ωn −σ t
y (t ) = 1 − e sin(ωd t + φ )
ωd

The under-damped unit step response comprises an oscillation of frequency ωd and phase φ,
constrained within a decaying exponential envelope determined by σ and ζ.

1.8 1 + ce-σt
1.6

1.4

1.2

y(t) ωn
1 c=
ωn
0.8

0.6

0.4 1 – ce-σt
0.2

0
0 2 4 6 8 10 12 14 16 18 20
t (seconds)

Unit step response with ωn = 1 & ζ = 0.125

10
1 – Fundamental Concepts

Second Order Step Response


Peak overshoot
πσ
y(t) −
1+e ωd
Decay envelope
Mp −σt
1+ce

1±δ

Overshoot delay
π
ωd

Settling time
1 c
ln
σ δ

0 t
tp ts

ωd
Damped frequency

1
Characteristics of the unit step response of the under-damped (ζ = 0.25) second order system
s 2 + 0.5s + 1

Step Response Specifications


Step Response Parameter Variation vs. Damping Ratio
4
Rise Time (seconds)

1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

100
Overshoot (%)

50

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

100
Settling Time (seconds)

50

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

Damping Ratio

Plots show variation in rise time, over-shoot, and settling time for a second order system with ωn = 1

11
Control Theory Seminar

Effect of LHP Zero


s
Adding a LHP zero at s = -z to the original transfer function: G1 ( s ) = 1 +  G (s)
 z
1 1
For a unit step input y1 ( s ) = G1 ( s ) = y ( s ) + s y ( s )
s z

1
Taking inverse Laplace transforms y1 (t ) = y (t ) + y′(t )
z

1.5

y(t)
1 y1(t)

0.5

0 t
0

The effect of adding a LHP zero is to add a derivative term to the step response of the original system

 In general, rise time is decreased and overshoot increased by a LHP zero

Effect of RHP Zero


1
Similarly, adding a RHP zero at s = z changes the response according to y2 (t ) = y (t ) − y′(t )
z

1.5

1 Peak under-shoot is bounded by:


ε
1− ε
0.5 yus ≥ y f
eα t s − 1
y(t)
yf = final value
0

y2(t)
ts = settling time
-0.5
ε = error bound
yus

-1 t
α = Re(z)
0

ts

The step response of a stable plant with n real RHP zeros will cross it’s starting value at least n times.

 The effect of adding an RHP zero is to increase rise time (make the response slower) and induce
undershoot

12
1 – Fundamental Concepts

Effect of Zero Location on Transient Response


Im
j5

j2.5

Re
-5 -2.5 -1 1 2.5 5

Effect on step response of adding a zero pair to a stable system

Time Delay Approximation


Time delay can be approximated by a rational transfer function with n real RHP zeros...
n
 θ 
1 − s
 2n 
e −θ s ≈ n
 θ 
1 + s
 2n 

The Padé approximation is only valid at low frequencies, so it is important to compare the true and
modelled responses to choose the right approximation order and check its’ validity.

1.2

0.8
Plot shows 2nd & 8th order Padé
approximations to the transfer function True delay
0.6
2nd order Padé
8th order Padé
−2 s
e 0.4
G (s) =
s +1 0.2

-0.2 t
0 2

13
Control Theory Seminar

Frequency Response

u(t) G(s) y(t)

If the steady state sinusoid u(t) = u0 sin(ωt + α) is applied to a linear system G(s), the output is

y(t) = y0 sin(ωt + β )

y0
• The amplitude is modified by
u0

• The phase is shifted by φ = β − α

 Amplitude and phase change from input to output are determined by G(jω):

y0
= G ( jω ) φ = ∠ G ( jω )
u0

Frequency Response
Response of G(s) at each frequency can be determined directly from the pole-zero map

( s + z1 ) ( s − z 2 )
For example, at frequency ω0 the transfer function G ( s ) = has response
( s + p1 ) ( s + p2 )

Im ( jω0 + z1 ) ( jω0 − z 2 )
G ( s ) s = jω 0 = = G ( jω0 ) ∠G ( jω0 )
( jω0 + p1 ) ( jω0 + p2 )
jω0
r3

p1 θ3
r2
r1
r4 ω increasing Modulus and argument are found from:
θ1 θ2
Re r1 r2
z1 z2 G ( jω 0 ) =
r3 r4

θ4 ∠G ( jω0 ) = θ1 + θ 2 − θ 3 − θ 4
p2

14
1 – Fundamental Concepts

First Order Bode Asymptotes


| G(jω) |
(dB) 1dB 3dB

0
1dB
-20 dB/decade

-20

log ω
ωc
1 octave 1 octave

1 decade 1 decade
∠ G(jω)

0 log ω
~5.5º
~5.5º -45º/decade

~5.5º

~5.5º

Second Order Bode Asymptotes

| G(jω) |
(dB) -40 dB/decade
−40

log ω
1 decade 1 decade

∠ G(jω)


log ω
0.1ωn ωn 10ωn
-90º/decade

Plots shown for damping ratios: 0.025 ≤ ζ ≤ 2

15
Control Theory Seminar

Resonant Peak
1
The resonant peak occurs at frequency ωr = ωn 1 − 2ζ 2 : 0<ζ <
2
1
Resonant peak magnitude is given by Mr =
2ζ 1 − ζ 2

| G(jω) |

ζ
ωr 0.025
0.1
0.175
0.25
0.325
0.4
0 0.475
0.55
0.625
0.7
0.775
0.85
0.925
1

log ω
ωn

The resonant peak ωr approaches ωn as damping ratio approaches zero: ωr → ωn as ζ → 0

1.1

All-Pass Transfer Functions


An all-pass transfer function Gap passes all frequencies with the same attenuation.

Such a transfer function has pole-zero symmetry about the imaginary axis.

i.e. if s0 is a zero, then –s0 is a pole.

Im
0.48 0.36 0.24 0.12 1.4

0.62 1.2 s −1 s2 − s + 2
Examples are:
1
s +1 s2 + s + 2
0.76 0.8

0.6
0.88 1

0.4
0.5
Magnitude (dB)

0.97
0.2

0
Re
-0.5
0.2
0.97

0.4 -1
360
0.88
0.6
270
Phase (deg)

0.76 0.8
180

1
90

0.62 1.2
0
-2 -1 0 1 2
0.48 0.36 0.24 0.12 1.4 10 10 10 10 10
Frequency (rad/s)

16
1 – Fundamental Concepts

Minimum Phase Systems


A minimum phase transfer function Gmp meets the following criteria:

• No time delay
• No RHP zeros
• No poles on the imaginary axis (except the origin)
• No unstable poles

1 s s2 + 2
Examples are: 1 2
s s +1 s +s+2

π
For a minimum phase system, total phase variation is (n − m) over 0 < ω < ∞.
2

A non-minimum phase transfer function exhibits more negative phase.

 Any stable, proper, real-rational transfer function G can always be written in terms of minimum-
phase and all-pass transfer functions: G = GapGmp

Phase Area Formula


For minimum phase systems, gain and phase curves on the Bode plot are approximately related
through a derivative:
π d log G ( jω )
∠ G ( jω ) ≈
2 d log(ω )

20
20 dB/decade -20 dB/decade
0
Magnitude (dB)

-20

-40

-60

-80

π
2
π
4
Phase (rad)

π
θ≈ 2
0

π π
- θ ≈-
4 2


2 -2 -1 0 1 2
10 10 10 10 10
Frequency (rad/s)

π
For a constant gain slope p, the phase curve has the asymptotic value θ=p
2

17
Control Theory Seminar

Control Theory Seminar


2. Feedback Control

• Effects of Feedback
• The Nyquist Plot
• Phase Compensation
• Sensitivity & Tracking
• Robustness

“...by building an amplifier whose gain is deliberately made, say 40 decibels higher than necessary, and then feeding
the output back to the input in such a way as to throw away that excess gain, it has been found possible to effect
extraordinary improvement in constancy of amplification and freedom from non-linearity.”

Harold S. Black, Stabilized Feedback Amplifiers, 1934

Effects of Feedback

+
Input _ Controller Plant Output

Sensor

Feedback (also called “closed loop control”) is a simple but tremendously powerful idea which has
revolutionised many engineering applications.

When properly applied, feedback can...

• Reduce or eliminate steady state error

• Reduce the sensitivity of the system to parameter changes

• Change the gain or phase of the system over some desired frequency range

• Cause an unstable system to become stable

• Reduce the effects of load disturbance and noise on system performance

• Linearise a non-linear component

18
2 – Feedback Control

Notation

+ e u
r _ F G y

ym
H

Signals Transfer Functions

r = reference input F = controller

e = error signal
G = plant
u = control effort
H = sensor
y = output

ym = feedback

Negative Feedback

+ e
r _ F G y

Error equation is e = r - Hy Output equation is y = FGe

Combining error and output equations gives y = FG (r – Hy)

y (1 + FGH) = FGr

y FG
 The closed loop transfer function is =
r 1 + FGH

 The open loop transfer function is L = FGH

19
Control Theory Seminar

The Closed Loop Transfer Function


β1 β2
Define the transfer functions of the forward and feedback elements as F = k, G= and H=
α1 α2

+ β1
r _ k y
α1

β2
α2

β
k 1
y α1
=
r 1 + k β1 β 2
α1 α 2

y k β1 α 2
The closed loop transfer function is =
r α1 α 2 + k β1 β 2

Closed Loop Stability

 The criterion for closed loop, or external stability is that the closed loop transfer function must
contain no RHP poles

y FG
=
r 1+ L

i.e. there should be no RHP zeros in 1 + L(s)

y k β1 α 2
=
r α1 α 2 + k β1 β 2

Equivalently, there should be no RHP roots of α1(s)α2(s) + k β 1(s)β2(s) = 0

In this section we examine stability from the point of view of the frequency domain. A time domain
view of stability is dealt with in section 3.

20
2 – Feedback Control

Encirclement & Enclosure


A complex point or region is encircled if it is found inside a closed path

A complex point or region is enclosed if it is found to the left of the path when the path is traversed
in the CCW direction

Im Im

Γ B
Γ
B

A A

Re Re

A encircled & enclosed A encircled but not enclosed


B not encircled or enclosed B enclosed but not encircled

Multiple Encirclements
A point in the complex plane can be encircled multiple times.

Im Im

Γ Γ

A A
Re Re
B B

A encircled once A encircled once


B encircled twice B encircled twice

A not enclosed A enclosed


B not enclosed B enclosed

21
Control Theory Seminar

Mapping
A complex function of a complex variable cannot be plotted on a single set of axes. We need two
separate complex planes: the s plane and the function plane. The correspondence between points
in the two planes is called mapping.

s plane
Im Im
∆(s) plane

s0

∆(s0)

Re Re
∆(s1)
s1

If each point in the s plane maps to one (and only one) point in the function space, the function is
called single valued. A transfer function is an example of a single valued complex function.

The transfer function ∆(s) uniquely maps points in the s plane to points in the ∆(s) plane.

Contour Mapping
Let ∆(s) be a single valued function, and Γs represent an arbitrary closed contour in the s plane.

If Γs does not pass through any poles of ∆(s), then its image Γ∆ is also closed.

Im Im
s plane ∆(s) plane
Γs
s1
s2 Γ∆
s3

Re Re
∆(s1)
∆(s2)
∆(s3)

Depending on ∆(s), the direction of Γ∆ can be the same as, or opposite to that of Γs.

22
2 – Feedback Control

Principle of the Argument

Assuming that Γs encircles Z zeros and P poles of ∆(s), define the integer N :

N=Z-P

The principle of the argument states that Γ∆ will encircle the origin of the ∆(s) space exactly N times

The direction of encirclement is as follows:

1. N > 0 (Z > P) : Γ∆ encircles the origin N times in the same direction as Γs

2. N = 0 (Z = P) : Γ∆ does not encircle the origin of the ∆(s) space

3. N < 0 (Z < P) : Γ∆ encircles the origin N times in the opposite direction to Γs

Determination of N
Im Im ∆(s) plane
∆(s) plane
N = -2 N=0

Re Re

Γ∆
Γ∆

Im Im
∆(s) plane ∆(s) plane
N=0 Γ∆
N = -3

Re Re

Γ∆

• By convention, counter-clockwise encirclement is regarded as positive.

23
Control Theory Seminar

The Nyquist Path

Im
s plane
+ j∞
Γs

Re
Poles of ∆(s) ∞

- j∞

Indentations on the imaginary axis are necessary to ensure Γs does note pass through any poles of ∆(s)

Any RHP pole or zero of ∆(s) is enclosed by the Nyquist path

The Nyquist Plot


The Nyquist plot is the image of the loop transfer function L(s) as s traverses the Γs contour.

Im s plane Im
+ j∞ L(s) plane
s= jω0 Γs

ΓL
Critical point

Re -1
Re

∠ L(jω0)

L(jω0)

| L(jω0) |
- j∞

Nyquist path Nyquist plot

Since we are interested in roots of 1 + L(s) we examine enclosure relative to the point [-1,0]

24
2 – Feedback Control

Nyquist Stability Criterion

Recall, for closed loop (external) stability we require no RHP zeros in 1 + L(s). i.e. N = -P

 For closed loop stability, the Nyquist plot must encircle the critical point once for each RHP pole in
L(s), and any encirclement must be made in the opposite direction to Γs.

For minimum phase systems: N = 0

 The simplified Nyquist stability criterion for minimum phase systems states that the feedback
system is stable if the Nyquist plot does not enclose the critical point.

Enclosure of the Critical Point

Critical point not enclosed Critical point enclosed


Im Im

Re Re
-1 -1

ω increasing -j ω increasing -j

L(jω) L(jω)

Closed loop stable Closed loop unstable

Note: The convention of CCW traversal of the Nyquist path means the direction of ΓL follows
decreasing positive frequency.

25
Control Theory Seminar

Nyquist’s Paper
Nyquist, H. 1932. Regeneration Theory. Bell System
Technical Journal, 11, pp. 126-147

Nyquist’s paper changed the process of feedback control from trial-and-error to systematic design.

Nyquist had the critical point at +1. Bode changed it to -1.

Relative Stability
The proximity of the L(s) curve to the critical point is a measure of relative stability, which is often
used as a performance specification on the feedback system

Im

L(jωπ)

-1
θm
Re

| L(jωc) |
L(jωc)

-j
ω increasing

L(jω)

1 ωπ is the phase crossover frequency


 Gain Margin (GM) is defined as: GM = ... where
L( jωπ )

 Phase Margin (PM) is defined as: PM = ∠ L( jωc ) + π ... where ωc is the gain crossover frequency

26
2 – Feedback Control

Stability Margins
Gain & phase margins can be read directly from the Bode plot.

| L(jω) |

0 dB
Gain Margin

log ω
ωc ωπ

ωc ωπ
− π2 log ω

Phase Margin

−π

∠ L(jω)

A rule-of-thumb for minimum phase systems is that the closed loop will be stable if the slope of | L(jω) |
is -2 or less at the cross-over frequency (ωc). This follows from the phase area formula.

Phase Compensation
When relative stability specifications cannot be met by gain adjustment alone, phase compensation
techniques may be applied to change the Nyquist curve in some frequency range.

Meets relative stability


spec but not steady state
requirements Im
Meets steady state
requirements but is
unstable

Nyquist plot of
Re
compensated loop
-1

ω increasing

L2(jω) -j
L1(jω)
(unstable)
(stable)

The terms “controller” and “compensator” are used interchangeably.

27
Control Theory Seminar

Phase Compensation Types


• Start with gain k1 and introduce phase lead at high frequencies to achieve specified PM, GM, Mp, ...etc.
∠ F(jω)

θm

s + ωz
F (s) = ...where (ωz < ωp )
s +ωp
0 log ω
ωz ωm ωp

• Start with gain k2 and introduce phase lag at low frequencies to meet steady-state requirements
∠ F(jω)

s + ωz
F ( s) = ...where (ωz > ωp )
θm
s +ωp
log ω
ωp ωm ωz

• Start with gain between k1 and k2 and introduce phase lag at low frequencies and lead at high
frequencies (lag-lead compensation)
∠ F(jω)
( s + ω z1 )( s + ω z 2 )
θm2 F (s) =
( s + ω p1 )( s + ω p 2 )
0

θm1
log ω For unity gain: ωp1 ωp2 = ωz1 ωz2
ωp1 ωz1 ωz2 ωp2
ωm1 ωm2

Phase Lead Compensation


The first order phase lead compensator has one pole and one zero, with the zero frequency lower
than that of the pole.

s + ωz
The simple lead compensator transfer function is: F ( s ) = ...where (ωz < ωp )
s +ωp

| F(jω) |

αc
log ω

∠ F(jω)

θm

0 log ω
ωz ωm ωp

28
2 – Feedback Control

Lead Compensator Design


1 1 + α cs
The passive phase lead compensator is given by F (s) = ...where α>1
α 1 + cs
∠ F(jω)

θm

0 log ω
ωz ωm ωp

α −1 1
Maximum phase lead of sin θ m = occurs at frequency ω m =
α +1 c α

1 + sin θ m 1
 Fix α using α= , then calculate c using c =
1 − sin θ m ωm α

Note that cross-over frequency will typically fall so the process will need to iterate to find an acceptable
design.

2.1, 2.2

A Problem with Stability Margins


Care should be taken when relying solely on gain and phase margins to determine stability and
performance. These evaluate the proximity of L(jω) to the critical point at (at most) two frequencies,
whereas the closest point may occur at any frequency and be considerably less than that at either GM
or PM, as the example below illustrates.

0.38 ( s 2 + 0.1s + 0.55)


L( s ) =
s ( s + 1) ( s 2 + 0.06s + 0.5)

Im
1.2

-1
Re 1

PM 0.8
Amplitude

0.6

0.4

0.2

-j 0
0 50 100 150 200 250 300 350
L(jω) Time (seconds)

In this example, although gain and phase margins are adequate (GM infinite, PM ≈ 70 deg.),
simultaneous change of both gain and phase over a narrow range of frequency leads to poor relative
stability. The step response exhibits a fast rise time but with considerable oscillation.

29
Control Theory Seminar

Error Ratio

+ e
r _ F G y

The error ratio plays a fundamental role in feedback control

e 1 1
= =
r 1 + FGH 1 + L

 The error ratio is also called the sensitivity function as it determines loop sensitivity to disturbance

1
S=
1+ L

Feedback Ratio

+
r _ F G y

ym
H

The feedback ratio or complementary sensitivity function is

ym FGH L
= =
r 1 + FGH 1 + L

 The feedback ratio determines the reference tracking accuracy of the loop

L
T=
1+ L

y T
 The closed loop transfer function is related to T by: =
r H

30
2 – Feedback Control

S+T=1
1 L
Sensitivity function is: S = Complementary sensitivity function is: T =
1+ L 1+ L

1+ L
S +T = =1
1+ L

 The shape of L(jω) means we cannot maintain a desired S or T over the entire frequency range

1.4

1.2

|T| |S|
1
Magnitude (abs)

0.8

0.6

0.4

0.2

0
-3 -2 -1 0 1 2
10 10 10 10 10 10
Frequency (rad/sec)

Control with Output Disturbance


Consider the case of a unity feedback loop with disturbance acting at the output...

+ e +
r _ F G y
+

Superposition allows reference and disturbance effects to be included in y...

y = d + FG (r – y)

Substituting S and T gives y=Sd+Tr

 S determines the ability of the loop to reject disturbance acting at the output

 T determines the ability of the loop to track a reference input

31
Control Theory Seminar

Bandwidth
1
Bandwidth (ωΒ & ωBT) can be defined in terms of the frequencies at which | S | & | T | first cross
2
1.4

1.2

|T(jω)| |S(jω)|
1

Magnitude (abs)
0.8

0.707
0.6

0.4

0.2

0
-3 -2 -1 0 1 2
10 10 10 10 10 10

Control effective Control not effective


ωB ωBT
Frequency (rad/sec)

• Below ωΒ performance is improved by control

• Between ωΒ and ωBT control affects response but does not improve performance

• Above ωBT control has no significant effect

Closed Loop Properties from the Nyquist Plot


The vectors |L(jω0)| and |1+L(jω0)| can be obtained directly from the Nyquist plot for any frequency ω0

(1 + L(jω0)) Im
L(jω0)
T(jω0)

Re
-1 T(jω0) 1
0)
|

|L(
|1
+

|T(jω
L(

0)
0)
|

L(jω0)
T(jω0)

L(jω)

For the unity feedback system...

L ( jω )
Closed loop magnitude is given by: T ( jω ) =
1 + L ( jω )

Closed loop phase is given by: ∠T ( jω ) = ∠L( jω ) − ∠(1 + L( jω ) )

32
2 – Feedback Control

Nyquist Diagram: Sensitivity Function


Peaking & bandwidth properties of the sensitivity function can be inferred from the Nyquist diagram.

Im
Sensitivity peaking when
L(jω) lies inside this circle

-1 1
Re
√2

Sensitivity bandwidth
reached when L(jω) first -j
crosses this circle

1 1 1
Sensitivity bandwidth reached when S = first crosses from below: S > ⇒ 1+ L < 2
1+ L 2 2

Sensitivity peaking occurs when 1 + L < 1

Nyquist Diagram: Tracking Performance


Peaking & bandwidth of the tracking response can also be determined from the Nyquist diagram.

Tracking performance peaking when


L(jω) lies to the left of this line Im
0 dB Tracking performance bandwidth reached when
L(jω) first crosses this line
3 dB -3 dB

2 dB -2 dB
4 dB -4 dB
1

6 dB -6 dB

0.5
10 dB -10 dB

20 dB -20 dB

-3 -2.5 -2 -1.5 -1 -0.5 0.5 1 1.5 2


Re

-0.5

-1

L 1 1
Tracking bandwidth reached when T = first crosses from above: T < ⇒ 1+ L > 2 L
1+ L 2 2

Tracking peaking occurs when Re{ L(jω) } < -0.5

33
Control Theory Seminar

Loop Shape from the Nyquist Plot


Key features of the S & T curves such as peaking and bandwidth are available from the Nyquist plot.

Im

|L|

Tpk1 Spk1 Tpk2 |S|


-1 1 1
-0.5 Re
TB 1 SB TB

Magnitude (abs)
Tpk2
1 2

√2
√2

Spk1
-j
|T|
0 ω
ωΒ ωc ωΒΤ
SB
-3 dB
Frequency
Tpk1

L(jω)

T ( jω )
The trajectory of L(jω) can be determined from the S & T curves, since L ( jω ) =
S ( jω )
For example, at cross-over: L ( jω c ) = 1 ⇔ T ( j ω c ) = S ( jω c )

The Sensitivity Integral

If L(s) is non-minimum phase or has a pole excess of at least 2, then for closed-loop stability
∞ N

∫ ln S ( jω ) dω = π ∑ Re( p )
0 i =1
i

...where L has N RHP poles at locations s = pi


For a stable open loop ∫ ln S ( jω ) dω = 0
0

| S(jω) |

Equal areas

0 log ω

34
2 – Feedback Control

The Waterbed Effect


• The sensitivity integral means that any increase in bandwidth (|S| < 1 over larger frequency range)
must come at the expense of a larger sensitivity peak. This is known as the waterbed effect.

3.5

2.5

2
Magnitude (abs)

1.5

0.5

0
-3 -2 -1 0 1 2
10 10 10 10 10 10
Frequency (rad/sec)

k 2−s
Sensitivity magnitude plots for L( s ) = with k varying from 0.1 to 1.5
s 2+s

• Sensitivity improvement in one frequency range must be paid for by sensitivity deterioration in another.

Maximum Peak Criteria


The maximum peaks of sensitivity and complementary sensitivity are:

M S = sup S ( jω ) = S ∞
M T = sup T ( jω ) = T ∞
ω ω

MT MS

1.5 | S(jω) |
Magnitude (abs)

| T(jω) |
0.5

0 ω

Phase margin and gain margin are loosely related to the | S | & | T | peaks

Typical design requirements are: MS < 2 (6dB) and MT < 1.25 (2dB)

35
Control Theory Seminar

High Gain Feedback


One of the benefits of negative feedback is that it generates an implicit inverse model of the plant
under high gain conditions. To see this, consider the unity feedback loop...

+ u
r _ F G y

The control effort u = F (r – y) can be written in terms of the sensitivity function

F
u= r = FSr
1 + FG

FG
Since T = = FGS , we have FS = G-1T, and the above equation can be written
1 + FG

u = G-1Tr

When the loop gain FG is large, T ≈ 1 and we have u = G-1r, as we should for perfect control.

y = G u = G G-1 r = r

Nominal Performance Specification

r(ω0)
e(ω0) y(ω0)
+
_ F G

The infinity norm of the sensitivity function S provides a good indication of closed loop performance,
since it captures the magnitude of the worst case loop error ratio over all frequency.

e(ω )
S = sup

ω r (ω )

The response of dynamic systems varies with frequency, hence our design objectives should also
vary with frequency.

One way to achieve this is to define a frequency dependent weighting function which bounds | S | at
every frequency.

36
2 – Feedback Control

Plant Model Sensitivity


+
r _ F G y

FG
For the unity feedback system, tracking performance is given by T=
1 + FG

If we differentiate T with respect to the plant G, we find ...

dT F (1 + FG ) − FGF ST
= =
dG (1 + FG ) 2 G

dT / T
S=
dG / G

 The sensitivity function S represents the relative sensitivity of the closed loop to relative plant model error

Sensitivity and Model Error

Let the model error in G be represented by the multiplicative output term ε.

~
G = G ( 1+ ε )

~
1 + L = 1 + FG ( 1 + ε )

Therefore loop sensitivity including model error is:

~ 1 1
S= ~=
1 + L 1 + FG + FGε

~ S
S=
1 + Tε

 The major effect of model error is in the cross-over region, where S ≈ T

37
Control Theory Seminar

Effect of Plant Model Error


│L│
1.2 │T│
│S│ ~ S
1
S=
Magnitude (abs) 0.8
1 + Tε
0.6

0.4
The effect of plant model error is most severe
0.2 around cross-over - exactly where the stability
and performance properties of the loop are
0
-4 -3 -2 -1 0 1 2
determined.
10 10 10 10 10 10 10

-3
x 10
7

6
Evaluating and accounting for model
5 uncertainty is therefore an important step in
~ design.
Magnitude (abs)

4 │S - S│

2
The process of modelling plant uncertainty and
1
designing the control system to be tolerant of it
ωc is known as robust control.
0
-4 -3 -2 -1 0 1 2
10 10 10 10 10 10 10
Frequency (rad/s)

Internal Model Principle


u
r F G y

In open loop control: y = FGr

~ ~
The basis of the Internal Model Principle is to determine the plant model G and set F = G-1

~ u
r G -1 G y

~
y = G −1Gr = r

i.e. perfect control is achieved without feedback!

The practical value of this approach is limited because...

• Information about the plant may be inaccurate or incomplete


• The plant model may not be invertible or realisable

• Control is not robust, since any change in the process results in output error

38
2 – Feedback Control

Internal Model Control

An alternative to shaping the open loop is to directly synthesize the closed loop transfer function. The
approach is to specify a desirable closed loop shape Q, then solve to find the corresponding controller.

FG
Q=
1 + FGH

Q
⇒ F = G −1
1 − QH

This method is known as Internal Model Control (IMC), or Q-parameterisation.

In principle, any closed-loop response can be achieved providing the plant model is accurate and
invertible, however the plant might be difficult to invert because...

• RHP zeros give rise to RHP poles – i.e. the controller will be unstable

• Time delay becomes time advance – i.e. the controller will be non-causal

• If the plant is strictly proper, the inverse controller will be improper

2.3

Non-Minimum Phase Plant Inversion

Step 1: factorise G into invertible and non-invertible (i.e. non-minimum phase) parts: G = GmGn
q
s − zi
...where the non-invertible part is given by Gn = e −θ s ∏
i =1 s + zi
This is an all-pass filter with delay. Any new LHP poles in Gn can be cancelled by LHP zeros in Gm

Step 2: write the desired closed loop transfer function to include Gn: Q = f Gn

f Gn
Step 3: substitute into the controller equation: F = Gm−1 Gn−1
1 − f Gn H

Non-minimum phase terms cancel to leave an equation which does not require inversion of Gn

f
F = Gm−1
1 − f Gn H

39
Control Theory Seminar

Control Theory Seminar


3. Transient Response

• Transient Specifications
• Steady State Error
• PID Controllers
• Root Locus Analysis

“It don’t mean a thing if it ain’t got that swing.”


Duke Ellington (1899 – 1974)

Transient Response Specifications

B
Decay ratio D=
A
Peak overshoot (<0.3)
(20% typ.)
y(t) Error bound
(2% typ.)
Mp

1
yss ± δ Steady state error
(small)
yss
0.9yss A B

0 t
tr ts

Rise time Settling time


(small) (small)

• Transient response tuning is typically a compromise between competing objectives

• Results are highly subjective: different users may select very different controller settings

• Optimality only possible when some form of performance index is specified

40
3 – Transient Response

Transient Performance Index


y(t) Transient error
e(t0) = r(t0) - y(t0)

0 t
t0

A performance index can be defined based on the integral of the closed loop error:

∫ e(t ) dt
2
IES = Integral of the Error Squared
0

IAE = Integral of the Absolute Error ∫ | e(t ) | dt
0

ITAE = Integral of Time x Absolute Error ∫ t | e(t ) | dt
0

Quality of Response
Performance index plotted against variation of a key parameter typically yields a convex curve with a
well defined minimum

Performance Indices vs. Damping Ratio for Unit Step Response


0.02
IES

0.01

0
0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

0.04
IAE

0.02

0
0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

0.001
ITAE

0.0005

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

The parameter setting which yields minimum performance index represents an optimal controller choice

41
Control Theory Seminar

Classification by Type

e F G

ym H

A canonical feedback system with open-loop transfer function

ym ( s ) k β (s)
= L( s ) = n
e( s ) s α (s)
...where n ≥ 0 is called a “type n” system.

 The type number denotes the number of integrators in the open-loop transfer function, L(s)

 Closed loop steady state error will be zero, finite or infinite, depending on the type number, n

Input Stimuli
u(t)

1
Impulse u(t) = δ (t) u(s) = 1
t
0
u(t)

1
1
Unit step u(t) = 1(t) u(s) =
s
t
0
u(t)

1
Unit ramp 1 u(t) = t u(s) =
s2
t
0
u(t)

1
Parabola u(t) = t2 u(s) =
s3
t
0
u(t)

ω
Sine 0 u(t) = a sin(ωt) u(s) = a
s2 + ω2
t

42
3 – Transient Response

Type 0 Systems

+ e β (s)
r _ k y
α (s)

e( s ) 1 α ( s)
Error ratio is given by: = =
r ( s) 1 + k β ( s ) α ( s ) + kβ ( s )
α ( s)

Steady state error following a step input is found by applying the final value theorem to e(s)

1 α (s) 
ess = lim s  
s →0
 s α ( s ) + kβ ( s ) 

α (0)
ess =
α (0) + kβ (0)

 For a type 0 system there is always a steady state error following a step input which is
inversely related to loop gain, k

Type 1 Systems

+ e 1 β (s)
r _ k y
s α (s)

e( s ) 1 sα ( s )
Error ratio is given by: = =
r (s) 1 + k 1 β ( s ) sα ( s ) + kβ ( s )
s α (s)

Again, steady state error following a step input is found from the final value theorem:

1 sα ( s ) 
ess = lim s  
s →0
 s sα ( s ) + kβ ( s ) 

ess = 0

 The presence of an integrator in the loop eliminates steady state error following a step input

 To avoid steady state error L(s) must contain at least as many integrators as r(s)

43
Control Theory Seminar

Response Type Summary


Type 0 Type 1 Type 2
Step Response Plot for a Type 0 System Step Response Plot for a Type 1 System Step Response Plot for a Type 2 System
1 1 1.4
0.9 0.9
1.2
0.8 0.8
0.7 0.7 1

1 0.6 0.6
0.8
Position r(s) =

Output
Output

Output
0.5 0.5
s 0.4 0.4
0.6

0.3 0.3 0.4


0.2 0.2
0.2
0.1 0.1
0 0 0
0 1 2 3 4 5 6 7 8 9 10 0 5 10 15 20 25 30 0 5 10 15 20 25 30
Time (s) Time (s) Time (s)

Ramp Response Plot for a Type 0 System Ramp Response Plot for a Type 1 System Ramp Response Plot for a Type 2 System
10 30 35
9
25 30
8
7 25
20

1
6
20
Velocity r(s) = 2
Output

Output

Output
5 15

s 4
10
15

3 10
2
5 5
1
0 0 0
0 1 2 3 4 5 6 7 8 9 10 0 5 10 15 20 25 30 0 5 10 15 20 25 30
Time (s) Time (s) Time (s)

Parabolic Response Plot for a Type 0 System Parabolic Response Plot for a Type 1 System Parabolic Response Plot for a Type 2 System
100 900 100
90 800 90
80 700 80
70 70
600

1
60 60
500
Acceleration r(s) = 3
Output

Output
Output
50 50
400
s 40
300
40
30 30
20 200 20
10 100 10
0 0 0
0 1 2 3 4 5 6 7 8 9 10 0 5 10 15 20 25 30 0 1 2 3 4 5 6 7 8 9 10
Time (s) Time (s) Time (s)

PID Controllers
PID (Proportional + Integral + Derivative) controllers allow intuitive tuning of the transient response.

t
de(t )
The parallel PID form is: u (t ) = k p e(t ) + ki
−∞
∫ e(τ )dτ + k d
dt

kp

ki

+
r
+ e + u
_ ∫ +
kd
y
d
dt

• The proportional term kp directly affects loop gain

• Integral action increases low frequency gain and reduces/eliminates steady state errors,
however this can have a de-stabilizing effect due to increased phase lag

• Derivative action introduces a predictive type of control which tends to damp oscillation &
overshoot but can lead to large control effort

44
3 – Transient Response

PID Control Action


y(t)

r(t)

1
Transient response

0
t
e(t)
t1
∫ e(τ) dτ .
t0 e(t1)
e(t) = r(t) - y(t)
Transient error
0

e(t1)
t
t0 t1 t1 + kd

t
de(t )
u (t ) = k p e(t ) + ki ∫ e(τ ) dτ + kd
−∞
dt
Many guidelines exist (Ziegler-Nichols, Cohen-Coon, etc.) but PID tuning is typically an iterative process.

3.1

Optimal PID Tuning


Optimal controller settings can be sought based on a transient response “cost” function such as ITAE.

2.4
2.2
2
1.8
ITAE

1.6
1.4
1.2
1
0.8
0.6
0.4
6 1
7 1.5
8 2
9 2.5
10 3
11 3.5
12
kp 13
14 4.5
4
ki
15 5

A simple minimum search algorithm reveals the controller terms which yield the smallest cost function.

Pairs of tuning parameters, such as proportional and integral gain terms, can be found in this way.
For larger numbers of tuning parameters, iteration using multiple plots is required.

45
Control Theory Seminar

Integrator Windup
If a component in the loop saturates control will be lost. The integrator continues to accumulate error,
increasing corrective effort even though the plant output does not change. This effect is called windup.

Anti-windup reset Output saturation


ki up kp

+ e + ui +
+ upid
r _ _ ∫ +
usat
+
ud _
y

kw

Modern industrial PID controllers incorporate an anti-windup feature which clamps the integrator input
when saturation occurs.

2.5 1

0.5
1.5

1 Commanded (upid)
0
Applied (usat)
0.5

0 -0.5
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10

Windup Anti-windup

PID Controller Refinements


Practical PID controllers incorporate various refinements to improve performance and avoid specific
difficulties. Some of these are shown below.

Independent set-point
weighting

kr
Output saturation
+
_ kp
ki

+
+ e + +
u
r _ _ ∫ +
+
_
Derivative acts on output
feedback only

d
dt kw
Anti-windup reset

kd
y
Derivative term filtering

46
3 – Transient Response

Complex Pole Interpretation


Recall, for the under-damped second order case poles are located at s = −ζω n ± jωn 1 − ζ
2

Im

jωd

ωn
ωn 1 − ς 2

φ = cos-1ζ
−σ Re
−φ

ωn

−jωd

ζωn

 The decay parameter and damped natural frequency are the real and imaginary components of the poles

 Un-damped natural frequency and transient phase represent the modulus and argument of the poles

Influence of Pole Location on Transient Response


Im
j8

j4

j1.5

Re
-4 -2.5 -1 -0.5 0.5

Plot shows unit step response of second order system with varying pole location. Stable poles positioned further to the left
exhibit faster decay, while those with larger imaginary part have a higher frequency of oscillation.

47
Control Theory Seminar

Constant Parameter Loci


Im
Vertical lines indicate constant
decay parameter (σ) ωd13

ωd12

ωd11

ωd10
Horizontal lines indicate
constant damped natural ωd9
frequency (ωd)
ωd8

−σ6 −σ5 −σ4 −σ3 −σ2 −σ1


Re
−ωd8

−ωd9

−ωd10

−ωd11
Note: decay rate and settling time
are not linearly related. −ωd12

−ωd13

 Poles located further to the left have faster decay rate

 Poles with larger imaginary component are more oscillatory

Constant Parameter Loci


Im
ζ7
ζ6 ωn13
ζ5
ζ4 ωn12

ζ3 ωn11

ζ2 ωn10
Radial lines from the origin
indicate constant damping ωn9
ratio (ζ) ζ1
ωn8

ωn8
Re
ζ1
ωn9
ζ2 ωn10
Concentric circles about ζ3 ωn11
the origin indicate constant
un-damped natural ζ4 ωn12
frequency (ωn) ζ5
ζ6 ωn13
ζ7

This is the usual grid drawn on a pole-zero map to aid in transient response estimation.

48
3 – Transient Response

Root Locus Design


We have seen how key properties of the transient response can be inferred from the location of
poles in the complex plane.

The root locus design method is a graphical procedure for determining the transient response of
the closed loop.

 In a root locus plot, the closed loop pole paths are plotted in the complex plane as some free
parameter (often loop gain, k) is varied

Recall, closed loop poles are the roots of α1α2 + k β 1 β 2 = 0

• When k = 0 the roots are α1α2 = 0 i.e. at open loop poles

• As k → ∞ the roots tend towards β 1β2 = 0 i.e. at open loop zeros

• For 0 < k < ∞ the roots follow well defined paths called "loci"

Root Locus Plots


 Every root locus begins at an open loop pole when k = 0, and either ends at an open loop zero or
follows an asymptote to infinity

Im
k=∞
k→∞

k=0

Re
k→∞

k→∞

Example root locus plot for system with two closed loop zeros and five poles (i.e. relative degree three)

At each value of k, features of the closed loop transient response can be inferred from location of the
dominant poles.

49
Control Theory Seminar

Root Locus Example


Root locus plot for the open
loop transfer function Im s plane
k ( s + 1.5)
L( s ) =
s ( s + 2.5) ( s 2 + 2 s + 2)
k→∞
k = 15.0

k = 8.0

k=0 k = 5.2
k = 2.5
k = 0.5
k = 1.0 k = 1.5

k = 15.0

k = 8.0

k = 2.5

k = 1.5

k = 1.0
k = 0.5
k = 5.2
k = 1.0

k = 0.5

k=∞
k=0

k=0
-2.5 -1.5
Re
k→∞

Association of step response with closed loop root location for varying controller gain.

High Gain Asymptotes


The number of high gain asymptotes is equal to the relative degree of L(s), n – m.

Asymptotes are distributed symmetrically around a focal point on the real axis. The angle of
separation of the asymptotes and their point of intersection on the real axis depend on the relative
degree of the closed loop transfer function.

Im

focal point

θ 2π
θ = n-m

Re
θ

∑ Re( p ) − ∑ Re( z )
i i
x= i i
x
n−m

50
3 – Transient Response

Root Loci Asymptotes


High gain root locus asymptotes shown by closed loop relative degree

1 Im 2 Im 3 Im

Re Re Re

4 Im 5 Im 6 Im

Re Re Re

Note that for relative degree of 3 or greater loci move into the RHP, causing instability at high gain

Properties of the Root Loci

Transient response is
dominated by those roots
closest to the imaginary
axis
Complex roots yield an Im
oscillatory transient
response k=∞
k→∞

Real roots contribute an k=0


exponential response Root loci are always
symmetrical about the
real axis

Re
k→∞ k=0

Roots lying about five times


further left than dominant
k=∞ k→∞
roots have negligible effect on
transient response

Maximum value of k
which gives stable
response

 The number of root loci in the s plane is the same as the order of L(s)

51
Control Theory Seminar

RHP Zero: High Gain Instability


As open loop gain increases, each root locus tend towards either an infinite asymptote or an open
loop zero. i.e. for proper systems, each zero accommodates a closed loop pole at infinite gain.

 For each RHP zero one locus crosses into the RHP, so at sufficiently high gain the closed loop will
become unstable

Im
k→∞

Maximum value of k
which gives stable
response
k=0

k=0
π
Re
k→∞
x

k→∞

Pole-Zero Cancellation

When a pole and zero lie on top of one another their combined effect on closed loop response is zero.

s+q
G (s) = = 1∠ 0
s+q

Poles and zeros which lie close to one another generate a short locus which has little overall effect on
the closed loop response.

k→∞

Pole-zero cancellation means placing controller poles and zeros to cancel out undesirable poles
and zeros in the plant. Additional controller poles & zeros can then be placed in more desirable
locations in the complex plane.

3.2, 3.3

52
3 – Transient Response

Tuning Multiple Parameters

Im
0.92 0.85 0.76 0.62 0.44 0.22 2.5 Im
0.5 0.4
2
k3
0.965
1.5
4.0 52 k1
k1 = 10
1
k1 = 8 10 20
0.992
78
0.5 2.0
k1 = 7 2 4 7
11 16
-6 -5 -4 -3 -2 -1 1
Re 0.9 k2
64
-0.5 0.9
0.992 21 0.5
-1 k2 16 2
15
-1.5
11 k3
0.965
9 9 68

0.92 0.85 0.76 0.62 0.44 0.22


-2
Re
-2.5 k2 k2

1
Standard PID controller parameter tuning for the plant G ( s ) =
( s 2 + 4 s + 8)( s + 1)

Interpretation of the root loci may be difficult if more than one parameter is varied. Simulation packages
contain no native tools to display root loci for multiple free parameters, or root contours.

The presence of closed loop zeros means tuning choices should be supported by other data.

Root Locus Example


“The Stability of Motorcycles Under Acceleration,”
by D J N Limebeer, R S Sharp and S Evangelou,
Journal of Applied Mechanics, Vol. 69, 2002
Original publisher: ASME

Root-locus for a fixed roll angle of 30°. The speed is increased from 6 m/s (□) to 60 m/s (*).

53
Control Theory Seminar

Control Theory Seminar


4. Discrete Time Systems

• Sampled systems
• The z Transform
• Complex Plane Mapping
• Aliasing
• Discrete Transformations

“...in recent times, almost all analogue controllers have been replaced by some form of computer control. This is a
very natural move since control can be conceived as the process of making computations based on past observations
of a systems behaviour. The most natural way to make these computations is via some form of computer.”

Goodwin, Graebe & Salgado, Control System Design, 2000

The Digital Control System


Discrete time Continuous time

+ e(k) u(k) u(t)


r(k) _ F(z) Hold G(s) y(t)

ym(k) ym(t)
Sampler H(s)

r(k)

ym(k) + e(k) u(k)


ym(t) Sampler _ F(z) Hold u(t)

ym(t) ym(k) u(k) u(t)

t k k t

54
4 – Discrete Time Systems

The Sampler

ym(t) ym(k) T

ym(t) Sampler ym(k)

t k
0 0 1 2 3 4 5 6 7

• The sampler converts a continuous function of time ym(t) into a discrete time function ym(kT)

1
• Almost all samplers operate at a fixed rate fs =
T

• The T is implicit in notation, so for example ym(k) is equivalent to ym(kT)

• The dynamic properties of the signal are changed as it passes through the sampler

Unit Pulse Response


The unit pulse response f (nT) is the response of the controller output following an input which has
unit value at time kT = 0, and zero at all other times.

Unit pulse input e(k) Controller response f (k)


e(k) f (k)

1 Controller

0 k 0 k
-3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 -3 -2 -1 0 1 2 3 ...

Providing the controller is stable, its unit pulse response will converge as k becomes large.

The transient properties of the controller are captured in the sequence f (k).

55
Control Theory Seminar

Digital Controller Operation


The input sequence e(k) is convolved with the unit pulse response f (k) to form the controller output u(k)

Input e(k) Unit pulse response f (k) Output u(k)


e(k) f (k) u(k)

k k k
0 1 2 3 4 5 6 7 8 9 10 11 0 1 2 3 ... 0 1 2 3 4 ...

The sequence of events which take place inside the digital controller is tabulated below.

T = 0: u(0) = f (0)e(0)
T = 1: u(1) = f (1)e(0) + f (0)e(1)
T = 2: u(2) = f (2)e(0) + f (1)e(1) + f (0)e(2)
T = 3: u(3) = f (3)e(0) + f (2)e(1) + f (1)e(2) + f (0)e(3)

T = n: u(n) = f (n)e(0) + f (n-1)e(1) + .......................... + f (0)e(n)

Discrete Convolution

The digital controller computes this n-term sum-of-products for each input sample.

T = n: u(n) = f (n)e(0) + f (n-1)e(1) + .......................... + f (0)e(n)

In practice, the number of terms (n) in the sequence is limited by the available computation time
and memory.

Once the unit pulse response f (nT) is known, the controller output u(nT) arising from any arbitrary input
e(nT) can be found using a convolution summation.

n
u (nT ) = ∑ e(kT ) f ([n − k ]T )
k =0

The design task is to find the f (nT) coefficients which deliver a desired output u(nT) for some e(nT).

56
4 – Discrete Time Systems

The Delta Function


δ (t)

t
0

The delta function, denoted δ (t), represents an impulse of infinite amplitude, zero width, and unit area.

If a delta impulse is combined with a continuous signal the result is given by the screening property

∫ δ (t − a) f (t )dt = f (a)
−∞

δ (t - a)

f (t)

t
0 a

Impulse Modulation
T
δT(t)


δ T (t ) = ∑ δ (t − nT )
n = −∞

t
0 T 2T 3T 4T 5T 10T 15T

f(t)

t
0 T 2T 3T 4T 5T 10T 15T

f*(t)


f * (t ) = f (t ) ∑ δ (t − nT )
n = −∞

t
0 T 2T 3T 4T 5T 10T 15T

57
Control Theory Seminar

The z Transform

Applying the screening property of the delta function at each sample instant, we find


f * (t ) = ∑ f (nT ) δ (t − nT )
n = −∞

The shifting theorem allows us to take the Laplace transform of this series term-by-term...

f * ( s ) = L [... + f (2T ) δ (t + 2T ) + f (T ) δ (t + T ) + f (0) δ (t ) + f (T ) δ (t − T ) + f (2T ) δ (t − 2T ) + ...]


f * (s) = ∑ f (nT )e
n = −∞
− snT

The z transform of f (t) is found from the above series after making the substitution z = esT


f ( z) = ∑ f (nT ) z
n = −∞
−n

Properties of the z Transform



f ( z ) = Z { f (nT ) } =ˆ ∑ f (nT ) z
n = −∞
−n

 n 
• Convolution: Z  ∑ f1 (kT ) f 2 ([n − k ]T )  = f1 ( z ) f 2 ( z )
 k =0 

• Linearity: Z [a1 f1 (nT ) ± a2 f 2 (nT )] = a1 f1 ( z ) ± a2 f 2 ( z )

• Final value theorem: lim f (nT ) = lim( z − 1) f ( z )


n →∞ z →1

• Time shift: Z { f (n + k )} = z k f ( z )

Note: Compare the above properties with those of the Laplace transform.

58
4 – Discrete Time Systems

Transfer Functions

A linear continuous time system may be represented in transfer function form as

( s + zc1 )( s + zc 2 ) ... ( s + zcm )


G (s) = k
( s + pc1 )( s + pc 2 ) ... ( s + pcn )

An equivalent sampled data system can be found using a discrete transformation, which yields a
transfer function in the complex variable z.

( z + z d 1 )( z + z d 2 ) ... ( z + z dm )
G( z) = k ′
( z + pd 1 )( z + pd 2 ) ... ( z + pdn )

Comparing the continuous time and discrete time representations of the same system:

• Poles & zeros are in different positions in the complex plane

• The relative degree may not be the same

• Dynamic performance is different

The Difference Equation


u ( z ) β 0 z 2 + β1 z + β 2
The 2-pole 2-zero transfer function is written =
e( z ) α 0 z 2 + α 1 z + α 2

Normalizing for the term involving the highest denominator power (α0) gives

u ( z ) b0 + b1 z −1 + b2 z −2
=
e( z ) 1 + a1 z −1 + a2 z − 2

Re-arranging to find an expression for u(z)...

u(z) { 1 + a1 z-1 + a2 z-2 } = e(z) { b0 + b1 z -1 + b2 z-2 }

u(z) = e(z) { b0 + b1 z -1 + b2 z-2 }- u(z) { a1 z-1 + a2 z-2 }

u(z) = b0 e(z) + b1 z -1 e(z) + b2 z-2 e(z) - a1 z-1 u(z) - a2 z-2 u(z)

Applying the shifting property of the z-transform term-by-term yields the difference equation

u(k) = b0 e(k) + b1 e(k – 1) + b2 e(k – 2) - a1 u(k – 1) - a2 u(k – 2)

59
Control Theory Seminar

Discrete Time Stability


u( z) b
Consider the first order transfer function =
e( z ) z − a

The corresponding difference equation is: u(k) = be(k - 1) + au(k - 1)

The evolution of the time sequence is: k u(k)

1 be(0)
2 be(1) + abe(0)
3 be(2) + abe(1) + a2be(0)
4 be(3) + abe(2) + a2be(1) + a3be(0)

...
...
n −1
n b ∑ a κ e( n − κ )
κ =1

The presence of the aκ term means that the output u(k) will remain bounded (stable) as k → ∞
providing | a | ≤ 1. This is the stability constraint for discrete time systems.

Common z Transforms
Data f (nT) F(z) z-plane

δ [T ] 1

z
1 z −1

z
nT ( z − 1) 2

z
an
z−a

z (1 − a )
1− an
( z − a )( z − 1)

60
4 – Discrete Time Systems

Complex Poles
As for continuous time systems, discrete time complex poles always arise in conjugate pairs.

z2
G( z) =
( z − ae jω )( z − ae − jω )

The transient part of the response is given by


ε1 ε1
y( z) = + + ...
( z − ae jω ) ( z − ae − jω )

y (k ) = ε 1 (ae jω ) + ε 1 (ae − jω ) + ...


k k

...where the residual ε1 has the form Ae jθ

The time sequence is always oscillatory and of the form

y(k) = Ba k sin( kω + θ ) + ...

 In order that y(k) remain bounded, every pole in G(z) must be constrained by | a | ≤ 1 .

Common z Transforms
Data f (nT) F(z) z-plane

z ( z − cos aT )
cos anT 2
z − 2 z cos aT + 1

z sin aT
sin anT
z 2 − 2 z cos aT + 1

az sin bT
a n sin bnT
z − 2az cos bT + a 2
2

61
Control Theory Seminar

Frequency Response
 The response of the discrete time system G(z) at frequency ω = ω0 is evaluated by G ( z ) z =e ω j 0T

Im

j
z +b ω0
For the system G ( z ) = r2
( z + a )( z + a*) a
θ2
r1

r3 θ1

-1 1
Re
b
Magnitude is found from...
θ3
e jω0T + b r a*
G (e jω0T ) = = 1
e jω0T + a e jω0T + a * r2 r3
-j

Phase is found from...

∠G (e jω0T ) = ∠( e jω0T + b ) − ∠( e jω0T + a ) − ∠( e jω0T + a *) = θ1 − θ 2 − θ 3

Discrete Time Bode Plot


The frequency response of a discrete time system may be represented in Bode plot form, however
the maximum unique frequency is limited by the sampling theorem. Typically only those frequencies
below the Nyquist limit (ωN) are shown.

80
Continuous time
60
Discrete time
Magnitude (dB)

40

20

-20

45

-45
Phase (deg)

-90

-135

-180

-225
2 3 4 5 6 7 8
10 10 10 10 10 10 10
ωN
Frequency (rad/s)

Notice that the relative stability of the discrete time system may change due to phase delays
introduced by the sampler and hold processes.

62
4 – Discrete Time Systems

Nyquist Analysis of Discrete Time Systems


Nyquist analysis can be used with discrete time systems in a similar way to continuous systems. The
region of unstable roots of L(z) is shown shaded in the diagram below.

Im Im
s plane z plane

Re Re
1

∞ ∞

Recall, if the open loop is stable we look for enclosure of the critical point by the above contour after
mapping by L(z). If the open loop is unstable, we determine closed loop stability by counting
encirclements of the critical point relative to the number of unstable poles of 1 + L(z).

Discrete Time Nyquist Plot


The frequency response of discrete time systems may be representation using the Nyquist plot, in the
same way as continuous time systems.
Im

Continuous time

Discrete time

-1
Re

1
Plot shows the Nyquist curve for the system together with its discrete time equivalent
s 2 + 0.3s + 5
after transformation by the matched pole-zero method for a sample rate of 2Hz.

63
Control Theory Seminar

z Plane Mapping

s plane
Im Im z plane

ωs j
C j
B 2

A B C A
F
Re E D F
Re

E ωs
D −j
2 -j

Equivalent regions shown cross-hatched

Complex Plane Mapping


 Points in the s-plane are mapped according to: z = esT = e(a+jb)T = eaTejbT = rejϕ

Im Im
s plane z plane
E jω2
C

D C
r2
jω1

D r1
E
ϕ1
ϕ2
B A B A
-γ -σ σ
Re Re
r3

r1 = e-σT
ϕ1 = ω1T
r2 = eσT
ϕ2 = ω2T
r3 = e-γT

64
4 – Discrete Time Systems

The Nyquist Frequency


s plane z plane
Im Im

ωs
j
2

E jω1

Re Re
−ϕ

E*
E* -jω1

ωs
−j
2

 The Nyquist frequency represents the highest unique frequency in the discrete time system

 Uniqueness is lost for higher continuous time frequencies after sampling

Aliasing
Im

j
3ωs
2
Im
j
jωs

ωs
j
2

Re -1 1 Re

ωs
−j
2

− jωs
-j

3ωs
−j
2

Loss of uniqueness means an infinite number of congruent strips are mapped into the unit circle.

65
Control Theory Seminar

Discrete Frequency Ambiguity

f1 = sin (5t + 0.32) f2 = sin (35t)

Both f1 & f2 give rise to exactly the same set of samples. After sampling it is impossible to determine
which frequency was sampled. In fact, any of an infinite number of possible sine waves could have
produced these samples. This effect is known as aliasing.

Frequency Response of a Sampled System



The sampled signal is given by y * (t ) = y (t ) ∑ δ (t − kT )
k = −∞

∞ ∞
The sampler is periodic so can be represented by the Fourier series ∑ δ (t − kT ) = ∑ C
k = −∞ n = −∞
n e jnωs t

T /2
1 ∞
...where the Fourier coefficients are given by Cn = ∫ ∑
T −T / 2 k = −∞
δ (t − kT ) e − jnωst dt

T /2
1
T −T∫/ 2
Only one term is within range of the integration, so Cn = δ (t ) e − jnωst dt

We can integrate this easily using the screening property of the delta function

1 0 T /2
Cn = [ e ] −T / 2 = 1
T T

1 ∞
So, the Fourier series representing the sampler is given by ∑ δ (t − kT ) = T ∑ e
k = −∞ n = −∞
jnω s t

66
4 – Discrete Time Systems

Frequency Response of a Sampled System



1 ∞

∑ δ (t − kT ) = T ∑ e
k = −∞ n = −∞
jnω s t


We can now find the Laplace transform of the sampled system L { f (t ) } = ∫ f (t ) e − st dt = f ( s)
0


1 ∞ 
y * ( s ) = L { y * (t ) } = ∫ y (t )  ∑ e jnω s t  e − st dt
0 T n = −∞ 


1 ∞
y * ( s) = ∑ y(t ) e −( s − jnωs )t dt
T n = −∞ ∫0

The integral term is the same as the Laplace transform of y(t), but with a change of complex variable

1 ∞
y * (s) = ∑ y(s − jnωs )
T n = −∞

The frequency response of the samples signal is:

1 ∞
y * ( jω ) = ∑ y( j [ω − nωs ])
T n = −∞

Each term in the infinite summation corresponds to the response of the continuous system, shifted
along the frequency axis by ±nωs

Frequency Response of a Sampled System


Continuous Spectrum
y(jω)

−ω ω
0

Sampled Spectrum
y*(jω)

a
T

−ω ω
-3ωs −ωs −ωs 0 ωs ωs 3ωs
2 2 2 2

67
Control Theory Seminar

Anti-Aliasing
 To prevent aliasing, we need to attenuate the input signal to less than 1 converter bit at ωs before sampling.
2

α(dB)

-20 log10(2N)

ω
0 ωc ωs
2

Filter constraints can be relaxed if a faster sample rate is selected.

y*(jω)

a
T

−ω ω
-3ωs −ωs −ωs 0 ωs ωs 3ωs
2 2 2 2

Pole Location vs. Step Response

Im
j

Re
-1 1

Unit step response as a function of pole location for a second order system.

68
4 – Discrete Time Systems

Complex Plane Grid


Lines of constant decay parameter (σ ) and damped natural frequency (ωd )

Im Im
ωd
ωd13 0.5π/T
σ 0.6π/T 0.4π/T
s plane z plane
ωd12
0.7π/T 0.3π/T
ωd11 σ7
0.8π/T 0.2π/T
ωd10
σ6
ωd9 σ5
0.9π/T 0.1π/T
σ4
ωd8 σ3
σ2
π/T σ1 0
Re -π/T Re
−σ6 −σ5 −σ4 −σ3 −σ2 −σ1
−ωd8
-0.9π/T -0.1π/T
−ωd9

−ωd10
-0.8π/T -0.2π/T
−ωd11
-0.7π/T -0.3π/T
−ωd12
-0.6π/T -0.4π/T
−ωd13 -0.5π/T

Complex Plane Grid


Lines of constant damping ratio (ζ ) and un-damped natural frequency (ωn)

Im Im
ωn
s plane 0.5π/T z plane
ζ7 0.4π/T
ζ6 0.6π/T
ωn13 ζ
ζ5 0.7π/T 0.3π/T
ζ4 ωn12 0.1
0.2
ωn11 0.8π/T 0.3 0.2π/T
ζ3 0.4
0.5
ζ2 ωn10
0.6
0.9π/T 0.7 0.1π/T
ωn9 0.8
ζ1 0.9
ωn8
π/T 0
Re -π/T Re
ωn8
ζ1
ωn9
-0.9π/T -0.1π/T
ζ2 ωn10

ζ3 ωn11 -0.8π/T -0.2π/T


ζ4 ωn12
ζ5 -0.7π/T -0.3π/T
ζ6 ωn13
-0.6π/T -0.4π/T
ζ7 -0.5π/T

69
Control Theory Seminar

Sample to Output Delay

Continuous time feedback


y(t) signal
y(k+2)
y(k+1)

y(k)

t
k k+1 k+2 Time delay imposed by ADC
and control law computation
u(t) td td td

Line of desired control effort

Line of effective control effort

u(k+2) Reconstructed output


u(k) signal
u(k+1)
t
k k+1 k+2

td = sample to output delay

Time Delay
Consider a continuous signal y(t) to which a fixed delay φ is applied.

From the shifting property of the Laplace transform we know that L {y (t − φ )} = e − sφ y ( s)

The influence of time delay is to change the phase of the signal by –ωφ, while the amplitude is unaffected.

0.5

-0.5

-1 t
0

0.5

-0.5

-1 t
0

 Phase lag is indistinguishable from delay in the time domain: Delay in the time domain translates
into frequency dependent phase lag in the frequency domain.

70
4 – Discrete Time Systems

Time Delay
Im

Plots show the effect of adding a progressively


longer time delay to a stable third order system
Re
-1
6
L( s ) = e −θ s
( s + 2) ( s 2 + s + 4.25)

14

12 td (s) PM (deg) MS
0 42.1174 3.05143
10
0.025 39.1419 3.34803
0.05 36.1664 3.6989
8
0.075 33.1909 4.1195
|S|
0.1 30.2154 4.63152
6 0.125 27.2398 5.26635
0.15 24.2643 6.07107
4 0.175 21.2888 7.11953
0.2 18.3133 8.53442
2 0.225 15.3378 10.5353
0.25 12.3623 13.5574
0
1 1.5 2 2.5 3 3.5 4 4.5 5

Frequency (rad/s)

Reconstruction
Hold functions attempt to reconstruct a smooth continuous time signal from a discrete time sequence.

u(k) u(t)

u(k) Hold u(t)

k t

The only practical hold function considered is the Zero Order Hold (ZOH) which delivers a piece-wise
constant output over the unknown interval kT ≤ t ≤ (k + 1)T

u(t)

t
k-7 k-6 k-5 k-4 k-3 k-2 k-1 k k+1 k+2 k+3 k+4 k+5

The frequency response of the Zero Order Hold is modelled by that of a unit pulse over the sampling
interval T.

71
Control Theory Seminar

Zero Order Hold

The frequency response of the Zero Order Hold can be modelled by that of a unit pulse over the
sampling interval T.
1 − e − j ωT
FZOH ( jω ) =

This can be simplified using the exponential form of the sine function

 jω T − jω
T

2 j e 2 −e 2  − jω T2 2  ωT  − jω T2
FZOH ( jω ) = e = sin  e
jω  2j  ω  2 
 

This is a complex number expressed in polar form, where the angle is given by

T ω
∠ FZOH ( jω ) = −ω = −π
2 ωs

 The Zero Order Hold contributes a frequency dependent phase lag to the loop response

Discrete Time Controller Design

The result of discrete time controller design is a difference equation involving current and previous
terms in e(k) and u(k).

e(k) F(z) u(k)

There are two approaches to the discrete time design:

• In design by emulation, we transform an existing controller design into the z domain, then
find a corresponding difference equation. The following methods are common:
– Pole-zero matching
– Numerical approximation
– Hold Equivalent

• In direct digital design, we carry out the entire controller design in the z domain using one
of the methods previously described (Nyquist, root locus, ...etc.).

In general, direct design methods yield superior performance for the same sample rate, however
access to computer design tools is very desirable.

72
4 – Discrete Time Systems

Pole – Zero Matching


1. Transform the poles & zeros of the transfer function using z = esT

2. Map any infinite zeros to z = -1 (but maintain a relative degree of 1)

3. Match the gain of the transformed system at z = 1 to that of the original at s = 0

Im
s plane Im j
z plane

p1 jω

e-σT

p3 z1 ωT
-σ Re -1 -ωT 1
Re
-β -γ e-βT e-γT

e-σT

p2 -jω

-j

( s + z1 ) ( z + 1) ( z − e − z1T )
F ( s) = A F ( z ) = A1
( s + p1 )( s + p2 )( s + p3 ) ( z − e )( z − e − p2T )( z − e − p3T )
− p1T

4.1, 4.2

Numerical Approximation

e F u

a
Starting with the simple controller F ( s ) = we get the differential equation u'(t) + au(t) = ae(t)
s+a
t
The solution to the continuous equation is u (t ) = a ∫ (e(τ ) − u (τ )) dτ
0

An equivalent discrete time controller performs this integration in discrete time:


k +1
u (k + 1) = u (k ) + a ∫ (e(τ ) − u (τ ) ) dτ
k

e(t)-u(t)

t
k k+1

73
Control Theory Seminar

Forward Approximation Method


kT +T
u (kT + T ) = u (kT ) + a ∫ (e(τ ) − u (τ ))dτ
kT

The integral portion can be approximated by a rectangle area:

u (k + 1) = u (k ) + aT [e(k ) − u (k )]

Using the shifting property of the z-transform: Z { f (k + n)} = z n F ( z ) t


k k+1

zu ( z ) = u ( z ) + aTe( z ) − aTu ( z )

u( z) a
F ( z) = =
e( z )  z − 1  + a
 
 T  Im
j
The forward approximation method implies we can find the z-transform
directly from the Laplace transform by making the substitution:
z −1
s← Re
T -1 1

The forward approximation rule maps the ROC of the s plane into the
region shown. The unit circle is a subset of the mapped region, so stability
is not necessarily preserved under this mapping. -j

Backward Approximation Method


Approximating the unknown area using a rectangle of height a{e(k+1) - u(k+1)}...

u (k + 1) = u (k ) + aT [e(k + 1) − u (k + 1)]

Application of the shifting theorem and simple algebra leads to...

a t
F ( z) = k k+1
 z − 1 +a
 
 Tz 

The backward approximation method implies we can find the z-transform directly from the Laplace
transform by making the substitution:
z −1 Im
s←
Tz j

The backward approximation rule maps the ROC of the s plane into a
-1 Re
circle of radius 0.5 within the z plane unit circle. Pole-zero locations are 1

very distorted under this mapping.

-j

74
4 – Discrete Time Systems

Trapezoidal Approximation Method


Approximating the unknown area using a trapezoid...
aT
u (k + 1) = u (k ) + [e(k ) − u (k ) + e(k + 1) − u (k + 1)]
2

Application of the shifting theorem and simple algebra leads to...


t
a
F ( z) = k k+1
 2 z −1  + a
 
 T z +1

The trapezoidal approximation method implies we can find the z-transform directly from the Laplace
transform by making the substitution:
2 z −1 Im
s←
T z +1 j

Trapezoidal approximation maps the ROC of the s plane exactly into the
unit circle. -1 Re
1

This method is also known as Tustin’s method or the bi-linear transform. -j

Numerical Approximation Methods


Im
j

Forward approximation
z −1
I = aT [e(k ) − u (k )] s← -1 Re
T
1

t -j
k k+1
Im
j

Backward approximation
z −1
s← Re
I = aT [e(k + 1) − u (k + 1)]
-1
Tz
1

-j
t
k k+1
Im
j

Trapezoidal approximation

T 2 z −1
I =a [e(k + 1) − u (k + 1) − e(k ) + u (k )] s← -1 1
Re
2 T z +1

t -j
k k+1

75
Control Theory Seminar

Frequency Warping
Im

ω Im
j 2s

z = esT
Re Re
-1 1

The correct transformation maps only the


primary strip inside the unit circle.
-j
ωs
-j
2

Im

Im
j
2 + sT
z=
2 - sT

Re Re
-1 1
The Tustin transformation maps the entire
LHP inside the unit circle. Pole & zero
-j frequencies are said to be warped by the
transformation.

Frequency Warping
2 z −1
The Tustin transformation is: s←
T z +1

The frequency response of the continuous time prototype F(s) = s is evaluated as

F ( s ) s = jω = j ω

Evaluating the frequency response of the equivalent discrete time system...

2 e j ωT − 1 2 T
F ( z ) z = e j ωT = = j tan ω
T e j ωT + 1 T 2

Compared with the continuous time system, we see that the frequency response of the discrete time
system has been “warped” by the above formula.

This effect can be compensated by pre-warping the pole-zero frequencies of the original system prior
to transformation by the Tustin method.

76
4 – Discrete Time Systems

Pre-Warping
The technique of pre-warping changes the s-plane location of each pole such that it is mapped by the
Tustin transformation to the correct place in the z-plane.

 s 
1. Re-write the desired characteristic in the form G  
 ω1 

2. Replace ω1 by a, such that a = 2 tan ω1T


T 2

2 z −1
3. Transform using the Tustin method s←
T z +1

4. Match the gain of the original system at s = 0 with that of the transformed system at z = 1

For systems with multiple critical frequencies which must be preserved, each frequency must be warped
using the formula in step 2 prior to design in the continuous domain.

4.3

Step Invariant Method


Invariant methods emulate the response of the continuous system to a specific input.

1. Determine the output of the output of the continuous time system for the selected hold input

2. Find the corresponding z-transform of the response

3. Divide by the z-transform of the selected input

1 F(s)
e(s) = F(s) u(s) =
s s

-1
e(t) = 1(t) f (t) u(t) = L { u(s) }

z
e(z) = F(z) u(z) = Z {u(t)}
z-1

F(z) = (1-z-1) Z {u(t)}

The step invariant method is also known as the ZOH equivalent method.

Invariant methods capture the gain & phase characteristics of the respective hold unit.

77
Control Theory Seminar

Ramp Invariant Method


The ramp invariant method emulates the response of the continuous system to a ramp input.

Except for the input reference the method is identical to the step invariant method.

1 F(s)
e(s) = F(s) u(s) =
s2 s2

-1
e(t) = 1(t) f (t) u(t) = L { u(s) }

Tz
e(z) = F(z) u(z) = Z {u(t)}
(z-1)2

(z-1)2
F(z) = Z {u(t)}
Tz

The ramp invariant method is also known as the FOH equivalent method.

Phase Error Comparison

10

4
matched
Phase error (deg)

2 forward
backward
0
Tustin
-2 pre-warp
ZOH
-4
FOH
-6

-8

-10
2 3 4 5 6
10 10 10 10 10 fN

Frequency (rad/s)

Comparison of phase performance for various discrete transformation methods.

78
4 – Discrete Time Systems

Summary of Emulation Design Methods

Matched pole-zero Relatively easy hand calculation with good performance, but computation
delay imposes significant phase lag.

Forward approximation Easiest method for hand calculation, but performance is very dependent
on sample rate. Can potentially convert a stable design into an unstable
one.

Backward approximation Produces significant phase error at low frequencies due to warping of the
stability region during mapping.

Tustin’s method Best compromise between ease-of-calculation and performance. Pre-


warping enables phase to be preserved at specific frequencies.

Step invariant Most accurate, since it accounts for phase shift induced by the ZOH unit.
Used for direct digital design methods.

Ramp invariant Best overall performance, but need access to design tools for
computation.

Recommendations

• If a zero order hold element is present, use the step invariant (ZOH equivalent) method once in
the design. This will capture phase lag effects introduced by the ZOH.

• If multiple elements must be transformed and the ZOH effect has already been accounted for,
use the ramp invariant (FOH equivalent) method for the remaining elements.

• If computer design tools are not available, Tustin’s method represents a good compromise
between performance and ease of calculation. Remember to account for ZOH phase effects
separately.

79
Control Theory Seminar

Direct Digital Design


G(z)

+
r(z) _ F(z) ZOH G(s) y(z)

H(z)

• In direct design we begin by transforming the plant model into discrete form using the step invariant
method. This captures the action of the ZOH element which precedes the plant.

• Standard design techniques (root locus, phase compensation, etc.) can then be used to synthesize
the controller.

• The design cycle iterates as many times as necessary until a satisfactory controller is found.

• For the same sample rate, control performance with the direct method is usually significantly better
than with emulation methods.

4.4, 4.5

Discrete Time Control


• Sampling
– The sampling process changes the frequency characteristics of the feedback signal.
Understanding of the relationship between s- and z-planes is key to good digital design.

– Careful selection of sample rate is the first and most critical step in design.

• Controller design
– Emulation techniques allow legacy analogue controller designs to be re-used. Trade-offs
exist between computational complexity and performance of each method.

– Design in the digital domain yields superior performance for the same sample rate.
Classical design techniques (Bode, Nyquist, root locus, ...) can be used, with modifications
to account for the discrete time nature of the signals and sub-systems.

– State space design methods for continuous and discrete time systems are similar.

• Time delay
– Conversion and computational delays are unavoidable in practice. These contribute a net
phase lag to the open loop response which is proportional to frequency. Phase margin is
eroded!

– Reconstruction using zero order hold contributes a further phase lag.

80
Recommended Reading
1. K.J.Åstrom & R.M.Murray,
Feedback Systems, Princeton, 2010

2. W.L.Brogan,
Modern Control Theory, Prentice-Hall, 1991

3. E.A.Coddington,
Introduction to Ordinary Differential Equations, Dover, 1989

4. C.W.Curtis,
Linear Algebra: An Introductory Approach, Springer, 1999

5. J.J.DiStefano, A.R.Stubberud & I.J.Williams,


Feedback & Control Systems, Schaum, 2011

6. J.Doyle, B.Francis & A.Tannenbaum,


Feedback Control Theory, MacMillan, 1990

7. J.N.Franklin,
Matrix Theory, Dover, 1993

8. G.F.Franklin, J.D.Powell & M.L.Workman,


Digital Control of Dynamic Systems, Addison-Wesley, 1998

9. M.W.Hirsch, S.Smale & R.L.Devaney,


Differential Equations, Dynamical Systems & an Introduction to Chaos,
Academic Press, 2012

10. B.C.Kuo & F.Golnaraghi,


Automatic Control Systems, Wiley, 2003

11. J.Schwarzenbach & K.F.Gill,


System Modelling & Control, Edward Arnold, 1992

12. S.Skogestad & I.Postlethwaite,


Multivariable Feedback Control, Wiley, 2005

13. M.R.Spiegel,
Advanced Mathematics for Scientists & Engineers, Schaum, 1980

14. L.A.Zadeh & C.A.Desoer,


Linear System Theory: The State Space Approach, Dover, 2008

81
This page intentionally left blank
IMPORTANT NOTICE

Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements,
improvements, and other changes to its products and services at any time and to discontinue any product or service without notice.
Customers should obtain the latest relevant information before placing orders and should verify that such information is current and
complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s
standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this
warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily
performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and
applications using TI components. To minimize the risks associated with customer products and applications, customers should
provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask
work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services
are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such
products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under
the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of TI information in TI data books or data sheets is permissible only if reproduction is without alteration and is
accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an
unfair and deceptive business practice. TI is not responsible or liable for such altered documentation. Information of third parties
may be subject to additional restrictions.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service
voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business
practice. TI is not responsible or liable for any such statements.

TI products are not authorized for use in safety-critical applications (such as life support) where a failure of the TI product would
reasonably be expected to cause severe personal injury or death, unless officers of the parties have executed an agreement
specifically governing such use. Buyers represent that they have all necessary expertise in the safety and regulatory ramifications
of their applications, and acknowledge and agree that they are solely responsible for all legal, regulatory and safety-related
requirements concerning their products and any use of TI products in such safety-critical applications, notwithstanding any
applications-related information or support that may be provided by TI. Further, Buyers must fully indemnify TI and its
representatives against any damages arising out of the use of TI products in such safety-critical applications.

TI products are neither designed nor intended for use in military/aerospace applications or environments unless the TI products are
specifically designated by TI as military-grade or "enhanced plastic." Only products designated by TI as military-grade meet military
specifications. Buyers acknowledge and agree that any such use of TI products which TI has not designated as military-grade is
solely at the Buyer's risk, and that they are solely responsible for compliance with all legal and regulatory requirements in
connection with such use.

TI products are neither designed nor intended for use in automotive applications or environments unless the specific TI products
are designated by TI as compliant with ISO/TS 16949 requirements. Buyers acknowledge and agree that, if they use any non-
designated products in automotive applications, TI will not be responsible for any failure to meet such requirements.
TEXAS INSTRUMENTS

TI Worldwide Technical Support


Internet Japan
TI Semiconductor Product Information Fax International +81-3-3344-5317
Center Domestic 0120-81-0036
support.ti.com
Internet/Email
TI Semiconductor KnowledgeBase International support.ti.com/sc/pic/japan.htm
support.ti.com/sc/knowledgebase Domestic www.tij.co.jp/pic

Asia
Product Information Centers Phone
International +91-80-41381665
Americas
Phone +1(972) 644-5580 Domestic Toll-Free Number
Fax +1(972) 927-6377 Australia 1-800-999-084
Internet/Email China 800-820-8682
support.ti.com/sc/pic/americas.htm Hong Kong 800-96-5941
India 1-800-425-7888
Europe, Middle East, and Africa Indonesia 001-803-8861-1006
Phone Korea 080-551-2804
European Free Call 00800-ASK-TEXAS Malaysia 1-800-80-3973
(00800 275 83927) New Zealand 0800-446-934
International +49 (0) 8161 80 2121 Philippines 1-800-765-7404
Russian Support +7 (4) 95 98 10 701 Singapore 800-886-1028
Taiwan 0800-006800
Note: The European Free Call (Toll Free) Thailand 001-800-886-0010
number is not active in all
countries. If you have technical difficulty calling Fax +886-2-2378-6808
the free call number, Email [email protected]
please use the international number above. [email protected]
Fax +(49) (0) 8161 80 2045 Internet support.ti.com/sc/pic/asia.htm
Internet support.ti.com/sc/pic/euro.htm

© 2013 Texas Instruments Incorporated

You might also like