Control Manual
Control Manual
Student Manual
TEXAS INSTRUMENTS
Author: Richard Poley
e-mail: [email protected]
Version 14
Revision 1
May 2013
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
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.
• 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.
Sampling
Input - Output y(s) = G(s)u(s) y(z) = G(z)u(z)
.
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
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)
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)
Slides with associated tutorials are marked in the lower left corner.
0.0
2
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.
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
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
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).
0
1 2 1 2
Linearity L { k1 f1 (t ) ± k 2 f 2 (t ) } = k1 f1 ( s ) ± k 2 f 2 ( s )
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
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)
β (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
The quantity n – m is called the relative degree of the system. Systems are classified
according to their relative degree, as follows...
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 )
ε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→∞.
For real systems complex roots always arise in conjugate pairs, so terms involving complex
exponential pairs arise in the time response.
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
The dynamics of a classical first order system are defined by the differential equation
τ y′(t ) + y (t ) = u (t )
τ 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 τ
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
0.2
0.1
0 t
0 1 2 3 4 5 6
t1 0.693 t2
tr
8
1 – Fundamental Concepts
y( s) ωn2
The transfer function of the second order system is = 2
u ( s ) s + 2ζω n s + ωn2
ζ =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
In the under-damped case (0 < ζ < 1) we have a pair of complex conjugate roots at
s = −ζω n ± jωn 1 − ζ 2
1
τ is the time constant of the system: τ =
σ
ωn −σ t
y (t ) = 1 − e sin(ωd t + φ ) ...where φ = cos-1ζ
ω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)
10
1 – Fundamental Concepts
1±δ
Overshoot delay
π
ωd
Settling time
1 c
ln
σ δ
0 t
tp ts
2π
ωd
Damped frequency
1
Characteristics of the unit step response of the under-damped (ζ = 0.25) second order system
s 2 + 0.5s + 1
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
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
1.5
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
j2.5
Re
-5 -2.5 -1 1 2.5 5
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
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
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
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º
| G(jω) |
(dB) -40 dB/decade
−40
log ω
1 decade 1 decade
∠ G(jω)
-π
log ω
0.1ωn ωn 10ωn
-90º/decade
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
1.1
Such a transfer function has pole-zero symmetry about the imaginary axis.
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
• 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
Any stable, proper, real-rational transfer function G can always be written in terms of minimum-
phase and all-pass transfer functions: G = GapGmp
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
• 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.”
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.
• Change the gain or phase of the system over some desired frequency range
18
2 – Feedback Control
Notation
+ e u
r _ F G y
ym
H
e = error signal
G = plant
u = control effort
H = sensor
y = output
ym = feedback
Negative Feedback
+ e
r _ F G y
y (1 + FGH) = FGr
y FG
The closed loop transfer function is =
r 1 + FGH
19
Control Theory Seminar
+ β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
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
y k β1 α 2
=
r α1 α 2 + k β1 β 2
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
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
Multiple Encirclements
A point in the complex plane can be encircled multiple times.
Im Im
Γ Γ
A A
Re Re
B B
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
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
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
Γ∆
23
Control Theory Seminar
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)
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∞
Since we are interested in roots of 1 + L(s) we examine enclosure relative to the point [-1,0]
24
2 – Feedback Control
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.
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.
Re Re
-1 -1
ω increasing -j ω increasing -j
L(jω) L(jω)
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.
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ω)
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.
Nyquist plot of
Re
compensated loop
-1
ω increasing
L2(jω) -j
L1(jω)
(unstable)
(stable)
27
Control Theory Seminar
θ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
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
θ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
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
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
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)
+ e +
r _ F G y
+
y = d + FG (r – y)
S determines the ability of the loop to reject disturbance acting at the output
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
• Between ωΒ and ωBT control affects response but does not improve performance
(1 + L(jω0)) Im
L(jω0)
T(jω0)
Re
-1 T(jω0) 1
0)
|
jω
|L(
|1
+
|T(jω
L(
jω
0)
0)
|
L(jω0)
T(jω0)
L(jω)
L ( jω )
Closed loop magnitude is given by: T ( jω ) =
1 + L ( jω )
32
2 – Feedback Control
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
2 dB -2 dB
4 dB -4 dB
1
6 dB -6 dB
0.5
10 dB -10 dB
20 dB -20 dB
-0.5
-1
L 1 1
Tracking bandwidth reached when T = first crosses from above: T < ⇒ 1+ L > 2 L
1+ L 2 2
33
Control Theory Seminar
Im
|L|
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 )
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
∞
For a stable open loop ∫ ln S ( jω ) dω = 0
0
| S(jω) |
Equal areas
0 log ω
34
2 – Feedback Control
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.
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
+ u
r _ F G y
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
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
FG
For the unity feedback system, tracking performance is given by T=
1 + FG
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
~
G = G ( 1+ ε )
~
1 + L = 1 + FG ( 1 + ε )
~ 1 1
S= ~=
1 + L 1 + FG + FGε
~ S
S=
1 + Tε
37
Control Theory Seminar
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)
~ ~
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
• Control is not robust, since any change in the process results in output error
38
2 – Feedback 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
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
2.3
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
• Transient Specifications
• Steady State Error
• PID Controllers
• Root Locus Analysis
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
• Results are highly subjective: different users may select very different controller settings
40
3 – Transient Response
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
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
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
1 0.6 0.6
0.8
Position r(s) =
Output
Output
Output
0.5 0.5
s 0.4 0.4
0.6
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
• 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
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
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.
+ 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
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
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
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
ωd12
ωd11
ωd10
Horizontal lines indicate
constant damped natural ωd9
frequency (ωd)
ωd8
−ωd9
−ωd10
−ωd11
Note: decay rate and settling time
are not linearly related. −ωd12
−ωd13
ζ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
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
• For 0 < k < ∞ the roots follow well defined paths called "loci"
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
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.
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
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
Transient response is
dominated by those roots
closest to the imaginary
axis
Complex roots yield an Im
oscillatory transient
response k=∞
k→∞
Re
k→∞ k=0
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
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
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
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 for a fixed roll angle of 30°. The speed is increased from 6 m/s (□) to 60 m/s (*).
53
Control Theory Seminar
• 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.”
ym(k) ym(t)
Sampler H(s)
r(k)
t k k t
54
4 – Discrete Time Systems
The Sampler
ym(t) ym(k) T
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 dynamic properties of the signal are changed as it passes through the sampler
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
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)
Discrete Convolution
The digital controller computes this n-term sum-of-products for each input sample.
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
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) = ∑ 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
n
• Convolution: Z ∑ f1 (kT ) f 2 ([n − k ]T ) = f1 ( z ) f 2 ( z )
k =0
• 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
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:
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
Applying the shifting property of the z-transform term-by-term yields the difference equation
59
Control Theory Seminar
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ω )
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
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
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).
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
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
ω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
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
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.
∞ ∞
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
∑ δ (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 = −∞
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
−ω ω
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
y*(jω)
a
T
−ω ω
-3ωs −ωs −ωs 0 ωs ωs 3ωs
2 2 2 2
Im
j
Re
-1 1
Unit step response as a function of pole location for a second order system.
68
4 – Discrete Time Systems
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
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
69
Control Theory Seminar
y(k)
t
k k+1 k+2 Time delay imposed by ADC
and control law computation
u(t) td td td
Time Delay
Consider a continuous signal y(t) to which a fixed delay φ is applied.
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
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)
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
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ω ) =
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
The result of discrete time controller design is a difference equation involving current and previous
terms in e(k) and u(k).
• 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
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
e(t)-u(t)
t
k k+1
73
Control Theory Seminar
u (k + 1) = u (k ) + aT [e(k ) − u (k )]
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
u (k + 1) = u (k ) + aT [e(k + 1) − u (k + 1)]
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
-j
74
4 – Discrete Time Systems
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
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
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
F ( s ) s = jω = j ω
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 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
1. Determine the output of the output of the continuous time system for the selected hold 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
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
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.
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)
78
4 – Discrete Time Systems
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.
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
+
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
– 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!
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
7. J.N.Franklin,
Matrix Theory, Dover, 1993
13. M.R.Spiegel,
Advanced Mathematics for Scientists & Engineers, Schaum, 1980
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
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