Documente Academic
Documente Profesional
Documente Cultură
Student Manual
Texas Instruments
v12
Texas Instruments
ver. 12
Agenda
1. Fundamental Concepts
Linear systems
Transient response classification
Frequency domain descriptions
2. Feedback Control
Effects of feedback
Steady state error
Stability & bandwidth
3. Controller Design
Phase compensation
Root locus analysis
Transient tuning
1. Fundamental Concepts
Linear systems
Transient response classification
Frequency domain descriptions
Linearity
For a linear system, if a scale factor is applied to the input, the output is scaled by the same amount.
f ( k u ) k f (u )
The ordinary differential equation with constants a0, a1,...,an and b0, b1,...,bm ...
an
dny
d n 1 y
dy
d mu
d m 1u
du
an 1 n 1 ... a1
a0 y bm m bm 1 m 1 ... b1
b0u
n
dt
dt
dt
dt
dt
dt
...is termed a constant coefficient differential equation
If none of the coefficients depend explicitly on time, the equation is said to be time invariant. This type
of equation can be used to describe the dynamic behaviour of a linear time-invariant (LTI) system
A system is causal if its present output depends only on past and present values of its input
5
Convolution
The impulse response of an LTI system is its output when subjected to an impulse function, (t)
a
i 0
d i y m d iu
bi
dt i i 0 dt i
If the impulse response g(t) of a system is known, its output y(t) arising from any input u(t) can be
computed using a convolution integral
y(t) u( ) g(t ) d
0
F ( s) L f (t )
f (t ) e
st
dt
f ( ) f (t ) d F (s) F (s)
t
Convolution
Linearity
L k1 f1 (t ) k 2 f 2 (t ) k1 F1 ( s ) k 2 F2 ( s )
lim f (t ) lim s F ( s )
s0
L f (t T ) e sT F ( s )
Shifting theorem
dny
dy
d mu
du
... a1 a0 y bm m ... b1
b0u
n
dt
dt
dt
dt
For zero initial conditions, the CCDE can be written in Laplace form...
B ( s ) bm s m bm 1s m 1 bm 2 s m 2 ... b1s b0
The ratio
B( s )
is called the transfer function of the system
A( s)
G (s)
Numerator & denominator can be factorised to express the transfer function in terms of poles & zeros
G( s) k
( s z1 )( s z 2 )...( s z m )
( s p1 )( s p2 )...( s pn )
bm s m bm 1s m 1 ... b1s b0
U ( s)
an s n an 1s n 1 ... a1s a0
The nth order transfer function gives rise to n roots through partial fraction expansion.
Y (s)
1
2 ... n
s p1 s p2
s pn
Roots may be either real or appear as complex conjugate pairs. Hence both first and second order
terms can be present. This motivates the study of classical systems of first and second order.
The time response will be dominated by those roots with the smallest absolute real part.
10
y (t ) y (t ) u (t )
...where is the time constant of the system
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
U ( s ) 1
s 1
y (t ) 1 e
11
0.98
1
0.9
y(t) = 1 e-t
0.8
0.7
0.63
0.6
0.5
0.4
0.3
0.2
0.1
0
1
0.7
The output reaches 50% of the final value after ~0.7 seconds
The output reaches ~63% of the final value after seconds
The output y(t) is within 2% of the final value for t > 4
A tangent to the y(t) curve at time t = 0 always meets the final value line seconds later
12
Time Constant
s 2 2 n s n2 0
14
Damping Ratio
The second order step response can exhibit simple exponential decay, or over-shoot and
oscillation, depending on value of the damping ratio
The ability to represent both types of response means higher order systems can sometimes be
approximated using a second order model based on the dominant poles
y(t)
2
1.875
1.75
1.625
1.5
1.375
1.25
1.125
1
0.875
0.75
0.625
0.5
0.375
0.25
Unit step response of second order system with varying damping ratio
15
s 2 2n s n2 0
s n n 2 1
s n n 2 1
s n
s n j n 1 2
s j n
16
Classification
Roots
s n n 1
over-damped
s n
critically damped
0 1
s n j n 1
s j n
under-damped
un-damped
17
y (t ) 1
e t
1
sin( d t )
...where cos
1
18
2
d
e t
1 2
sin(d t )
3
d
0.8 2.5
ln 1 2
20
y (t ) 1
e t
1 2
sin( d t )
To find the peaks and troughs, differentiate with respect to time and equate the result to zero.
y (t )
e t
1 2
e t
sin ( d t )
1 2
d cos ( d t ) 0
sin (d t ) 1 2 cos(d t )
tan ( d t )
1 2
1 2
d
1
tan
tan1
tan ( d t ) tan( )
So the peaks & troughs occur when
d t n
or
n
d
e t
1 2
sin(d t )
Peak overshoot
y(t)
1+e
Decay envelope
t
Mp
2
1.875
1.75
1.625
1.5
1.375
1.25
1.125
1
0.875
0.75
0.625
0.5
0.375
0.25
Overshoot delay
d
t
tp
2
d
Damped frequency
Tutorial 1.2
22
n2
s 2 2 n s n2
s n jn 1 2
s jd
or
e t
y (t ) 1
1 2
decay rate:
sin( d t )
d n 1 2
23
n 1 2
= cos-1
24
s n j 1
7
n13
5
n12
n11
n10
n9
1
n8
n8
1
n9
2
n10
3
n11
4
n12
5
n13
6
7
25
26
s n jn 1 2
s jd
Line of constant
Line of constant
defines region of
acceptable overshoot
Line of constant
defined by maximum
acceptable settling
time
Shaded regions excluded from design because system will not meet transient requirements
Poles positioned far to the left have fast response but require large control effort
28
n2
s 2 2 n s n2
29
1
Y ( s ) G ( s )
s
1
1
Y ( s ) Y ( s ) s Y ( s )
s
z
1
y (t )
z
1.5
0.5
0
0
0.01
0.02
0.03
0.04
0.05 0.06
time (s)
0.07
0.08
0.09
0.1
The effect of adding a LHP zero is to add a scaled version of the derivative of the step response
of the original system
30
For a single RHP zero, peak undershoot is bounded by the inequality yus y f
1
e ts 1
yf = final value
ts = settling time
= error bound
= Re(z)
The effect of adding an RHP zero is to increase rise time (make the response slower) and induce
undershoot
31
Frequency Response
If the steady state sinusoid u(t) = u0 sin(t + ) is applied to the linear system G(s), then the output is
y (t ) y0 sin(t )
y0
u0
y0
G ( j )
u0
G ( j )
32
Polar Plots
We can plot the evolution of magnitude and phase of G(j) over frequency as a vector in the complex
plane. This is known as a polar plot.
G ( j )
s 1
1
1 2 2
G ( j ) tan 1 ( )
When = 0:
As
G ( j ) 1 0
G ( j ) 0
The polar plot for a first order simple lag system stays in the fourth quadrant of the s-plane
33
G ( j )
Defining v
1 2 j 2
n
n
...
n
G ( jv)
1 v 2v
2 2
G ( jv) tan 1
When = 0
When
As
1
2
2v
1 v2
G ( j ) 1 0
G ( j )
2
2
1
2
G ( j ) 0
The polar plot of a second order system ( n-m = 2 ) enters the third quadrant of the s-plane
34
Magnitude (dB)
40
20
-20
1
s
-40
90
1
s 1
Phase (deg)
45
0
-45
-90
-2
10
-1
10
10
10
10
Frequency (rad/sec)
Bode plots show gain and phase on separate graphs against a common logarithmic frequency axis
For simple transfer functions the gain and phase curves are related by a derivative
35
Non-minimum phase systems exhibit more phase lag and are therefore harder to control
For minimum phase systems the phase curve is related to the rate of change of the gain curve and
vice-versa.
G ( j )
d log G ( j )
2 d log( )
If the gain curve has a constant slope n, the phase curve has constant value n
36
37
Bode asymptotes for the second order case plots shown for varying damping ratio
38
Resonant Peak
The resonant peak occurs at frequency r n 1 2 2
Resonant peak magnitude is given by M r
: 0
1
2
1
2 1 2
| Y(j ) |
log
n
r n as 0
39
n2
2
n
j 2 n
2
...which is at
d G ( jv)
0
dv
r n 1 2 2
The peak value Mr can be found by substituting the normalised frequency r into the magnitude equation
Mr
1
2 1 2
...for 0
1
2
40
2. Feedback Control
Effects of feedback
Steady state error
Stability & bandwidth
41
Effects of Feedback
The objective of control is to make the output of a plant precisely follow a reference input
r = reference input
F = controller
e = error signal
G = plant
u = control effort
FG = forward path
y = output
ym = feedback
H = feedback path
e / r = error ratio
y / r = closed loop
43
G
y
ym
The loop transfer function is obtained by breaking the loop at the summing point
L = FGH
If a sinusoid of frequency 0 is applied at r, in the steady state the signal ym will also be a
sinusoid of the same frequency 0 but its amplitude and phase will be modified by L(j)
ym (0 ) L ( j0 ) r (0 )
The condition necessary to sustain oscillation inside the loop is | L(j) | -1 where is the
frequency at which phase lag is
44
Negative Feedback
y
FG
r 1 FGH
direct
1 + loop
45
1
1
and
2
2
1
1
2
2
k 1
y
1
r 1 k 1 2
1 2
y
k 1 2
r 1 2 k 1 2
46
r 1 2 k 1 2
If any (s) have positive real parts the open loop will be unstable, but the closed loop can be stable
Closed loop zeros comprise the zeros of the forward path and the poles of the feedback path
Zeros in the feedback path affect the poles of the closed loop system
Poles in the feedback path appear as zeros in the closed loop system
47
Classification by Type
FGH
k1 ( s zi )
i 1
n
s l ( s pi )
k1 ( s )
s l ( s)
i 1
...where l 0 and zi and pi are non-zero finite zeros and poles of FGH, is called a type l system.
The type number reflects the number of integrators in the open-loop transfer function
The steady state error will be either zero, finite or infinite, depending on the integer l
48
r (s)
ess
1
1
1
is given by ess lim s n
s 0
sn
s 1 L( s )
1
lim s n 1 L( s )
s 0
L( s)
k1 ( s )
s l ( s)
ess
1
lim s n 1l k 2
s 0
...where
k 2 k1
( 0)
( 0)
if l n 1
49
Error Ratio
e
1
1
r 1 FGH 1 L
The error ratio determines loop sensitivity to disturbance and is called the sensitivity function
1
1 L
50
Feedback Ratio
ym
FGH
L
r 1 FGH 1 L
The feedback ratio determines the reference tracking accuracy of the loop and is called the
complementary sensitivity function.
L
1 L
y T
r H
51
dT F (1 FG ) FGF
dG
(1 FG ) 2
dT
F
ST
dG ( 1 FG ) 2
G
dT / T
S
dG / G
S is the relative sensitivity of the closed loop to relative plant model error.
52
S+T=1
Sensitivity function is: S
1
1 L
S T
L
1 L
1 L
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|
Magnitude (abs)
|S|
0.8
0.6
0.4
0.2
0
-3
10
10
-2
10
-1
10
10
10
Frequency (rad/sec)
53
y G d F r Hy
y 1 FGH Gd FGr
y GS d
T
r
H
54
y GS d
For good disturbance rejection we want S = 0
L( j )
T
r
H
r
H
As |L(j)| rolls off both tracking performance and disturbance rejection will deteriorate
Controller design involves shaping the open loop plot L(j) to achieve the best compromise
between reference tracking and disturbance rejection
55
y=G(d+u)
x1 = r H x3
ym = H ( n + y )
x2 = d + F x1
u = F ( r - ym )
x3 = n + G x2
The equations for the exogenous signals in terms of internal signals are:
r = x1 + H x3
d = x2 F x1
n = x3 G x2
56
r 1
d F
n 0
0
1
G
H x1
0 x2
1 x3
If the 3x3 matrix is non-singular, the loop equation can be re-arranged to find the three internal signals
x1
1
x
2 1 FGH
x3
1 GH
F
1
G
FG
H r
FH d
1 n
x1
GH
H
1
r
d
n
1 L
1 L
1 L
x2
F
FH
1
r
d
n
1 L
1 L
1 L
x3
FG
G
1
d
n
r
1 L
1 L
1 L
57
Internal Stability
Internal stability requires that x1, x2 & x3 do not grow without bound, so the following seven transfer
functions must all be stable:
1
1 L
F
1 L
G
1 L
H
1 L
GH
1 L
FH
1 L
FG
1 L
FS
GS
HS
T
F
T
G
T
H
The Nyquist D contour encloses the RHP with small indentations to avoid any poles of L(s) on the
imaginary axis and an arc at infinity
59
If L(s)0 as s then the portion of the D contour at infinity maps to the origin
60
Plot the gain and phase of the open loop L(j) vs. frequency
Evaluate gain and phase margins graphically to determine relative stability
Information clearly presented on Bode or Nyquist plots
Can represent non-minimum phase systems (but Bode relations do not apply)
61
Phase Margin
Phase Margin (PM) is defined as:
Phase margin is the angular difference between the point on the frequency response at the
unit circle crossing and -180. For a robust control system we want large positive m.
62
Gain Margin
1
... where is the phase crossover frequency
L( j )
1
GM
Gain margin is the amount of extra loop gain we would have to add for the L(j) line to reach
the [-1,0] point. For a robust control system we want large positive GM.
63
log
log
Phase Margin
L( )
1
L( j )
Phase Margin (PM) is defined as: PM L( jc ) ... where c is the gain crossover frequency
64
-1
| 1+L(j
0)
|
| L(j
0)
L(j )
Conditional Stability
Bode diagram for the system with open loop transfer function L( s )
3( s 6) 2
s ( s 1) 2
Bode Diagram
GM = -13.1 dB (at 3 rad/sec) , PM = 18.4 deg (at 5.92 rad/sec)
30
20
10
GM
0
-10
-150
-160
-170
PM
-180
0.1
10
0.3
10
0.5
10
0.7
10
0.9
10
Frequency (rad/sec)
Open loop phase lag exceeds 180 degrees at frequencies below cross-over but closed loop is stable
66
Conditional Stability
Nyquist diagram for the system with open loop transfer function L( s )
3( s 6) 2
s ( s 1) 2
-1
L(j )
L(j )
The plot of L(s) as s traverses the Nyquist contour does not make a clockwise encirclement of the
critical point, hence the closed loop system will be stable
67
Although gain and phase margins are adequate (GM infinite, PM = 70 deg.), the system has two lightly
damped modes (1 = 0.81, 2 = 0.014) causing a highly oscillatory step response.
Magnitude (dB)
50
-50
-100
Phase (deg)
-90
-135
-180 -2
10
PM
10
-1
10
Frequency (rad/sec)
10
10
In general, the Nyquist plot provides more complete stability information than the Bode plot
68
Stability Index
A better measure of relative stability is to gauge the closest L(j) passes to the critical point [-1,0].
This is called the stability index
-1
sn
sn min 1 L( j )
L(j )
The reciprocal of the sensitivity index sn is the infinity norm of the sensitivity function
1
1
1
max
S
1 L ( j )
sn min 1 L( j )
A large value of || S || indicates L(j) comes close to the critical point and the feedback system is
nearly unstable
69
|| S ||
3.5
Magnitude (abs)
3
2.5
2
1.5
|S|
1
0.5
0
10
-2
10
-1
10
10
Frequency (rad/sec)
Although the S infinity norm is a good measure of relative stability and robustness, is does not indicate
stability in the binary sense: for example, a Nyquist plot which encloses the critical point might have a
similar S response to that shown above
70
M T max T ( j )
Ms
1.5
| T(j ) |
| S(j ) |
0.5
0
90
0
-90
-180
-270
-360
-3
-2
10
-1
10
10
10
10
10
Frequency (rad/sec)
Typical design requirements are: MS < 2 (6dB) and MT < 1.25 (2dB)
71
Bandwidth
Bandwidth is defined as the frequency range [
Closed loop bandwidth is defined as the frequency at which | S(j) | first crosses -3dB from below
Gain crossover frequency c is defined as the frequency at which | L(j) | first crosses 0dB from above
1.4
|L(j )|
1.2
|S(j )|
1
B
0.8
0.707
0.6
0.4
0.2
0
10
-2
10
-1
10
Frequency (rad/sec)
10
10
10
72
Magnitude (abs)
Bandwidth can be defined in terms of the |S(j)| crossing of -3dB from below.
73
-1
Sensitivity bandwidth
reached when L(j ) first
crosses this circle
-j
L(j
L(j )
1
1
first crosses
from below:
1 L
2
1
1 L 2
2
1
2 1
1
L
1
1 L 2 L
first crosses
from above: T
1 L
2
2
0 dB
-2 dB
-4 dB
1
4 dB
-6 dB
6 dB
0.5
10 dB
20 dB
-1
-0.8
-10 dB
-20 dB
-0.6
-0.4
-0.2
0.2
0.4
0.6
0.8
-0.5
-1
-1.5
L( s) e s
6
( s 2) ( s 2 s 4.25)
PM
0
0.05
42.1174
36.1664
0.1
30.2154
0.15
24.2643
0.2
0.25
18.3133
12.3623
0.3
6.4113
0.35
0.460286
0.4
0.45
-5.49073
-11.4417
Time delay is equivalent to a frequency dependent phase lag which erodes phase margin.
77
L2(j )
L1(j )
-1
L1 ( s )
1
s 1
L2 ( s )
1 s 1
s 1 s 1
Both systems are strictly proper with pole excess of 1, but L2(j) has significantly higher phase lag
due to its RHP zero, causing it to enter the unit circle centred at [-1,0].
78
Loopshaping Limitations
If L(s) is rational and has a pole excess of at least 2, then for closed-loop stability
i 1
ln S ( j ) d Re( p )
i
ln S ( j ) d 0
For a given system, any increase in bandwidth (|S| < 1 over larger frequency range) must come at the
expense of a larger sensitivity peak. This is termed the waterbed effect.
Magnitude (abs)
| S(j ) |
Equal areas
log
79
3. Controller Design
Phase compensation
Root locus analysis
Transient tuning
80
For low frequency performance, L(s) must contain at least one integrator for each integrator in r
81
Phase Compensation
Start with gain k1 and introduce phase lead at high frequencies to achieve specified PM, GM, Mp, ...etc.
Start with gain k2 and introduce phase lag at low frequencies to meet steady-state requirements
Start with gain between k1 and k2 and introduce phase lag at low frequencies and lead at high
frequencies (lag-lead compensation)
82
s z
s p
...where (z < p )
| F(j ) |
0
log
F( j )
log
0
m
83
F (s)
1 1 cs
1 cs
Maximum phase is
sin m
...where > 1
1
1
1 sin m
1 sin m
84
s z
s p
...where (p < z )
85
Lag-Lead Compensation
The lag-lead compensator has two poles and two zeros arranged to induce phase lag and phase
lead over different frequency ranges
( s z1 )( s z 2 )
( s p1 )( s p 2 )
86
2DOF Controller
The 2 degrees-of-freedom structure permits disturbance rejection and tracking performance to be
designed independently.
y Sd Fr
T
r
H
F FG
y
r
r 1 FGH
Fr
+
+
+
Feed-Forward Compensation
y G Fr F
r 1 FGH
F1
y
F1G
r 1 G F2 F1 H
88
~
G
~ 1
~
y G G 1r
FG
1 FGH
F G 1
Q
1 QH
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
90
Gn e s
i 1
s zi
s zi
This is an all-pass filter with delay. Any new LHP poles in Gn can be cancelled by LHP zeros in Gm
F Gm1
F Gm1 Gn1
f Gn
1 f Gn H
f
1 f Gn H
1 ( s ) 2 ( s) k 1 ( s) 2 ( s ) 0
Every locus begins at a pole when k = 0, and ends either at a zero or infinity (i.e. follows an asymptote)
The number of asymptotes is given by the pole excess, n - m
k=
k=0
92
1 2 k 1 2 0
k 1 2 1 2
k
1 2
1
1 2
FGH 1
i.e. all points on the root locus must satisfy the magnitude criterion:
...and the angle criterion:
1
k
L n
L
(n odd)
93
94
2i 1
nm
real parts of the poles of L(s) - real parts of the zeros of L(s)
n-m
96
For each RHP zero one locus crosses into the RHP, so at sufficiently high gain the closed loop will
become unstable
k
Maximum value of k
which gives stable
response
k=0
Maximum achievable control gain (kcrit) occurs where the first closed loop pole crosses into the RHP
97
PID Controllers
1
e(t ) dt
d
de
dt
PID (Proportional, Integral, Derivative) controllers enable intuitive loop tuning in the time domain,
normally against a step response. Typical objectives are delay, overshoot, & settling time.
e(t ) dt
de
dt
General notes:
The proportional term k directly controls 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 shift.
Derivative action introduces phase lead which improves stability and increases bandwidth. This
tends to stabilize the loop but can lead to large control movements.
Tutorial 3.4
B
A
99
Quality of Response
A performance index can be used to assess transient response quality against variation of a key
parameter.
e(t ) dt
2
| e(t ) | dt
0
t | e(t ) | dt
0
For second order systems, a damping ratio of ~0.7 gives a minimum value for IAE & ITAE, and ~0.5 for IES.
100
Sampled systems
The z-transform
z plane mapping
101
r(k)
e(k)
F(z)
Continuous time
u(k)
b(k)
u(t)
DAC
G(s)
b(t)
ADC
y(t)
H(s)
r(k)
b(t)
ADC
b(t)
b(k)
+
_
e(k)
F(z)
b(k)
u(k)
u(k)
u(t)
DAC
u(t)
102
Sampled Systems
y(t)
y(k)
y(t)
0
y(k)
Sampler
0 1
2 3 4 5 6 7
The sampler converts a continuous function of time y(t) into a discrete time function y(kT)
Almost all samplers operate at a fixed rate f s
1
T
103
Discrete Convolution
The impulse response of a discrete system is its response to a single input pulse of unit amplitude
at time t = 0.
Once the impulse response f (nT) is known, the controller output u(nT) arising from any arbitrary input
e(nT) can be computed using the summation
n
The design task is to find the f (nT) coefficients which deliver a desired output u(nT) for some e(nT)
104
Discrete Convolution
F(z)
e(k)
Input e(k)
e(k)
u(k)
Output u(k)
u(k)
f (k)
9 10 11
3 ...
k
0
T = 0:
T = 1:
T = 2:
T = 3:
u(0) = f (0)e(0)
u(1) = f (0)e(1) + f (1)e(0)
u(2) = f (0)e(2) + f (1)e(1) + f (2)e(0)
u(3) = f (0)e(3) + f (1)e(2) + f (2)e(1) + f (3)e(0)
T = n:
4 ...
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
106
Impulse Modulation
T (t ) (t nT )
n0
f * (t ) f (t ) (t nT )
n 0
107
The z Transform
Applying the screening property of the delta function at each sample instant, we find
The shifting theorem allows us to take the Laplace transform of this series term-by-term...
F * ( s ) f (nT )e snT
n 0
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 0
108
z Transforms
f (nT)
F (z)
f (nT)
F (z)
nT e anT
Tze aT
( z e aT ) 2
(t )
z n
(t nT )
z
z 1
1 a nT
z (1 a)
( z 1)( z a)
1 e at
z (1 e aT )
( z 1)( z e aT )
n 0
1(t )
(unit step)
z
z 1
nT
(unit ramp)
Tz
( z 1) 2
sin nT
z sin T
z 2 2 z cos T 1
T 2 z ( z 1)
2( z 1)3
e anT sin nT
z e aT sin T
z 2 2 z e aT cos T e 2 aT
cos nT
z ( z cos T )
z 2 2 z cos T 1
e anT cos nT
z 2 z e aT cos T
z 2 2 z e aT cos T e 2 aT
(nT ) 2
e anT
z
z e aT
109
z Transform Theorems
n
k 0
Z f1 (kT ) f 2 ([n k ]T ) F1 ( z ) F2 ( z )
Linearity:
Time shift:
Z f (n k ) z k F ( z )
z 1
110
F (s)
k ( s z1 )( s z 2 )...( s z m )
( s p1 )( s p2 )...( s pn )
The z-transform of an equivalent sampled data system can be found using a discrete transformation,
which yields a transfer function in the complex variable z:
F ( z)
k ( z z1 )( z z 2 )...( z z m )
( z p1 )( z p2 )...( z pn )
Poles & zeros in the discrete domain are in different positions compared with those in the Laplace domain
The pole excess of the continuous and discrete representations may not be the same
Time and frequency domain performance of the two systems will be different
111
Stability
The first order discrete time transfer function
u( z)
b
e( z ) z a
u(k)
k
1
be(1)
be(2) + abe(1)
b a i e( n i )
1
1
-1
n 1
-j
i 1
1
pt
G(s) = s p has an impulse response of the form y(t) = e
If p =
z
G(z) = z p has a unit pulse response y(nT) involving the term pn
Therefore, for stability |p| must be less than 1, and
stable poles must lie within the unit circle in the z-plane
113
G(z)
z2
(z pe )(z pe j )
j
y( z)
A1
A1
( z pe j ) ( z pe j )
y (nT ) A1 pe j A1 pe j
n
y (nT ) 2 p n cos n
complex poles give rise to an oscillatory response and have the same stability constraints as
simple poles
114
f (nT)
F(z)
[T ]
z
z 1
nT
z
( z 1) 2
an
z
za
1 an
z (1 a)
( z a )( z 1)
z-plane
115
F(z)
f (nT)
cos anT
z ( z cos aT )
z 2 2 z cos aT 1
sin anT
z sin aT
z 2 z cos aT 1
a n sin bnT
az sin bT
z 2 2az cos bT a 2
z-plane
116
Frequency Response
The response of G(j) at frequency = 0 is evaluated by G ( z ) z e j0T
j
0
a
1
-1
a*
-j
G (e j0T )
zb
magnitude and phase are found from
( z a )( z a*)
e j0T b
e
j0T
a e j0T a *
117
z Plane Mapping
s plane
C
z plane
s
2
A
F
A
F
s
2
-j
r1 = e-T
r2 =
eT
r3 =
e-T
1 = T
2 = T
119
z-plane
s
2
s
2
The Nyquist frequency represents the highest unique frequency in the discrete time system
Uniqueness is lost for higher continuous time frequencies after sampling
120
Aliasing
Loss of uniqueness means an infinite number of congruent strips are mapped into the unit circle
121
122
d
d13
0.6 /T
s plane
d12
0.5 /T
0.4 /T
0.7 /T
z plane
0.3 /T
d11
0.8 /T
0.2 /T
d10
d9
0.9 /T
0.1 /T
d8
/T
- /T
6
1
d8
d9
-0.1 /T
-0.9 /T
d10
-0.2 /T
-0.8 /T
d11
d12
-0.3 /T
-0.7 /T
-0.6 /T
d13
-0.4 /T
-0.5 /T
123
124
125
Pole-zero matching
Numerical approximation
Invariant methods
Direct digital design
126
( s z1 )
F (s) A
( s p1 )( s p2 )( s p2 )
Tutorials 5.1 & 5.2
F ( z ) A1
( z 1) ( z e z1T )
( z e p1T )( z e p2T )( z e p3T )
127
Numerical Approximation
F ( s)
a
sa
u (t ) au (t ) ae(t )
u (t ) a e(t ) u (t ) dt
0
u (k 1) u (k ) a e(t ) u (t ) dt
k
e(t)-u(t)
t
k
k+1
128
u (k 1) u (k ) aT e(k ) u ( k )
F ( z)
u( z)
a
e( z ) z 1 a
k+1
The forward approximation method implies we can find the z-transform directly from the Laplace
transform by making the substitution:
z 1
T
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.
129
u (k 1) u (k ) aT e(k 1) u (k 1)
F ( z)
a
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
Tz
The backward approximation rule maps the ROC of the s plane into a
circle of radius 0.5 within the z plane unit circle. Pole-zero locations are
very distorted under this mapping.
130
u ( k 1) u ( k )
aT
e(k ) u (k ) e(k 1) u (k 1)
2
F ( z)
a
2 z 1 a
T z 1
k+1
The trapezoidal approximation method implies we can find the z-transform directly from the Laplace
transform by making the substitution:
2 z 1
T z 1
Trapezoidal approximation maps the ROC of the s plane exactly into the
unit circle.
Forward approximation
I aT e(k ) u (k )
z 1
T
-1
-j
Backward approximation
I aT e(k 1) u (k 1)
z 1
Tz
-1
-j
Trapezoidal approximation
I a
T
e(k 1) u (k 1) e(k ) u (k )
2
2 z 1
T z 1
-1
-j
132
Step and ramp invariant methods are also known as ZOH and FOH equivalent methods respectively
Invariant methods capture the gain & phase characteristics of the respective hold unit
133
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.
Tutorial 5.3
134
135
Cheaper processor
tr
T
or
tr
N
138
Phase Delay
From the shifting property of the Laplace transform, if L
f (t ) F ( s)
then L
f (t ) e s F ( s)
Reconstruction
Hold functions attempt to construct a smooth continuous time signal from a discrete time sequence.
To do so, the function must approximate over the interval kT t ( k 1)T
u (t ) u (k )
u (t ) u ( k )
u (k ) u ( k 1)
t kT
T
140
FZOH ( j )
1 e jT
j
This can be simplified using the exponential form of the sine function
FZOH ( j ) e
T
2
T
j
j T2
e 2 2 j
T j T2
2
e
sin
e
2j
j 2
T jT / 2
FZOH ( j ) T sinc
e
2
This is a complex number expressed in polar form, where the angle is given by
FZOH ( j )
s
2
The Zero Order Hold contributes a frequency dependent phase lag to the loop response
141
T
approximation
holds reasonably well for s
4
2
T
2
142
Quantization takes place at each continuous/discrete boundary. Resolution limits can be referred
to the continuous domain by:
bmax
2 N2
umax
2 N1
1
b
K DAC u
Displacement (mm)
Displacement (mm)
Steady-state limit cycles may appear if the sense resolution (b) is worse than the control
resolution (u)
Limit cycle oscillation will be low amplitude & high frequency, and may not cause an issue in low
bandwidth systems, or in systems with high inertia or friction. In some cases, the oscillation may even
be beneficial as it introduces a dither-like effect.
144
umax
2 N1
bmax
2 N2
u max
u
k max
2 N1
2N2
2 N1
1 N2
2
k
To avoid a steady-state limit cycle, control effort resolution must satisfy the inequality
N1 N 2 log 2 k
145
u ( z ) 0 z m 1 z m1 ... m 1 z m
e( z ) 0 z n 1 z n 1 ... n 1 z n
Normalizing for the term involving the highest denominator power (a0) gives
u ( z ) b0 z m n b1 z m 1 n ... bm 1 z1 n bm z n
e( z )
1 a1 z 1 ... an 1 z1 n an z n
u ( z ) e( z ) b0 z m n b1 z m 1 n ... bm 1 z1 n bm z n u ( z ) a1 z 1 ... an 1 z1 n an z n
Applying the shifting property of the z-transform term-by-term yields the difference equation
146
e(k)
z-1
b0
b1
z-1
e(k-2)
b2
+
-a2
e(k-1)
u(k)
-a1
u(k-2)
z-1
u(k-1)
z-1
148
Pre-Computation
Sample-to-output delay can be reduced by pre-computing that part of the control law which is already available.
u (k ) b0 e(k ) v(k 1)
149
e sT
Since T
When = ns ...
j 2
s j
j 2
e jT cos T j sin T
cos 2
j sin 2
s
s
cos 2n j sin 2n 1
(n integer)
n s
Whenever the input frequency is a multiple of the sample rate (ns), a series of constant sample
values will be produced. i.e. DC is indistinguishable from any signal which is a multiple of the sample
rate.
150
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.
151
y(t ) (t kT )
(t kT ) C
e jns t
T /2
Cn
1
(t kT ) e jnst dt
T T / 2 k
T /2
Cn
1
(t ) e jnst dt
T T/ 2
We can integrate this easily using the screening property of the delta function
f (t ) (t a) dt f (a)
Cn
1 0 T /2
e T / 2 1
T
T
(t kT ) T e
jn s t
152
(t kT ) T e
jn s t
Y * ( s ) L y * (t ) y (t ) e jn s t e st dt
T n
Y * (s)
1
y(t ) e ( s jns )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
Y * (s)
1
Y (s jns )
T n
Y * ( j )
1
Y ( j ns )
T n
Each term in the infinite summation corresponds to the response of the continuous system, shifted
along the frequency axis by ns
153
Sampled Spectrum
154
Anti-Aliasing
To prevent aliasing, we need to attenuate the input signal to less than 1 converter bit at
s
2
before sampling.
(dB)
0
-20 log10(2N)
155
156
Review
1. Fundamental Concepts
Linear systems
Transient response classification
Frequency domain descriptions
2. Feedback Control
Effects of feedback
Steady state error
Stability & bandwidth
3. Controller Design
Phase compensation
Root locus analysis
Transient tuning
4. Discrete Time Systems
Sampled systems
The z-transform
z plane mapping
5. Digital Control Design
Pole-zero matching
Numerical approximation
Invariant methods
Direct digital design
6. Digital Control Systems Implementation
Sample rate selection
Sample to output delay
Reconstruction
Control law implementation
Aliasing
157
Suggested Reading
J.J.DiStefano, A.R.Stubberud & I.J.Williams, Feedback & Control Systems, Schaum, 1995
J.Doyle, B.Francis & A.Tannenbaum, Feedback Control Theory, Macmillan, 1990
S. Skogestad & I. Postlethwaite, Multivariable Feedback Control, Wiley, 2005
Gene F. Franklin, J. David Powell & Michael L. Workman, Digital Control of Dynamic Systems,
Addison-Wesley, 1998
158
Richard Poley
Texas Instruments Inc.
r-poley@ti.com
159
F(s)
(t )
(t T )
e sT
1(t )
(unit step)
1
s
1(t T )
(delayed step)
1 sT
e
s
1(t ) 1(t T )
(rectangular pulse)
1
(1 e sT )
s
(unit ramp)
1
s2
t n1
(n 1)!
1
sn
e at
1
sa
1
t n 1 e at
(n 1)!
1
(s a)n
sin t
s 2
2
cos t
s
s 2
1
( s a) 2 2
e at sin t
e at cos t
sa
( s a) 2 2
f (t)
F(s)
1
(e at e bt )
ba
1
( s a )( s b)
1
(ae at be bt )
a b
s
( s a )( s b)
1
(1 e at )
a
1
s( s a)
1
(1 e at ate at )
2
a
1
s( s a) 2
1
(at 1 e at e at )
2
a
1
s ( s a)
1 be at ae bt
ab b a b a
1
s( s a)( s b)
1
s (s 2 )
d
1
2
n
(1 cos t )
e nt sin d t
nd
sin (t )
e nt sin (d t )
1
s 2 n s n
2
1
s ( s 2 n s n )
2
s sin cos
s2 2
F(z)
(t )
z n
(t nT )
z
z 1
1(t )
(unit step)
z
z 1
nT
(unit ramp)
Tz
( z 1) 2
n0
(nT ) 2
T 2 z ( z 1)
2( z 1)3
e anT
z
z e aT
nT e anT
Tze aT
( z e aT ) 2
1 a nT
z (1 a)
( z 1)( z a )
1 e at
z (1 e aT )
( z 1)( z e aT )
sin nT
z sin T
z 2 z cos T 1
e anT sin nT
z e aT sin T
z 2 2 z e aT cos T e 2 aT
cos nT
z ( z cos T )
z 2 z cos T 1
e anT cos nT
z 2 z e aT cos T
z 2 2 z e aT cos T e 2 aT
Notes
Notes
Notes
Notes
Texas Instruments
Japan
Fax
International
Domestic
+81-3-3344-5317
0120-81-0036
Internet/Email
International support.ti.com/sc/pic/japan.htm
Domestic
www.tij.co.jp/pic
Asia
Phone
International
+91-80-41381665
Domestic
Australia
China
Hong Kong
India
Indonesia
Korea
Malaysia
New Zealand
Philippines
Singapore
Taiwan
Thailand
Toll-Free Number
1-800-999-084
800-820-8682
800-96-5941
1-800-425-7888
001-803-8861-1006
080-551-2804
1-800-80-3973
0800-446-934
1-800-765-7404
800-886-1028
0800-006800
001-800-886-0010
Fax
Email
+886-2-2378-6808
tiasia@ti.com
ti-china@ti.com
Internet
support.ti.com/sc/pic/asia.htm