4 Discrete models of sampled data systems

advertisement
Discrete models of sampled data systems
31
4
4.1
Discrete models of sampled data systems
4.2 Properties of the z-transform
4.2
Properties of the z-transform?
Let F (z) = Z f (kT ) =
More on z-transforms
Methods of computing the z-transform Y (z) given a sequence yk :
(a). Evaluate the sum Y (z) =
P1
k=0 yk z
k
directly.
This method was used earlier to compute the z-transform of a sequence
with only a finite number of non-zero terms (see p. 24). It was also the
method used to compute the z-transform of exponential signals using
the formula for a geometric series (see p. 25).
(b). Use standard results in tables (see e.g. HLT p. 15).
32
1
X
f (kT ) z
k
, then F has the following properties:
k=0
• Time Delay: Z f (kT
n
nT ) = z
F (z), for n > 0.
Note: Franklin has no constraint on n because he uses the two-sided
z-transform.
• Linearity: Z ↵ f1 (kT ) + f2 (kT ) = ↵F1 (z) + F2 (z).
Note: error in Franklin Table B1, p701.
Some methods of finding the inverse z-transform yk of a function Y (z):
(a). Determine the coefficients y0 , y1 , y2 , . . . of 1, z 1 , z 2 , . . . by computing the
Maclaurin series expansion of Y (z).
1
z 1
= 1 2z 1 (1 z 1 + z 2 . . .)
1+z 1
= 1 2z 1 + 2z 2 . . . = Z{1, 2, 2, 2, . . .}
so {y0 , y1 , y2 , y3 , . . .} = {1, 2, 2, 2, . . .}.
e.g. Y (z) =
1 z
1+z
1
=1
2
(b). Use standard results in tables (HLT p. 15).
z sin aT
= Z{0, sin(aT ), sin(2aT ), . . .}
z 2 2z cos aT + 1
so yk = sin(akT ) for k = 0, 1, . . ..
e.g. Y (z) =
(c). Write down a related recurrence equation and find its pulse response.
1
implies yk is the pulse response of the t.f. Y (z)
2z 1
therefore yk 2yk 1 = k , with yk = 0 for k < 0
so {y0 , y1 , y2 , . . .} = {1, 2, 4, 8, . . .} or yk = 2k for k = 0, 1, . . ..
e.g. Y (z) =
1
(d). By integration (not covered in this course, but see the comment on p. 41).
• Differentiation: Z k f (kT ) =
z
d
Z f (kT ) .
dz
This is useful for finding some of the z-transforms.
• Convolution: Z
See section 3.5
⇢X
1
f1 (iT ) f2 (kT
iT )
= F1 (z) F2 (z).
i=0
• Final Value Theorem: lim f (kT ) = lim (z
k!1
z!1
1)F (z)
provided that the poles of (z 1)F (z) are inside the unit circle and that
F (z) converges for all |z| > 1.
? Franklin
§4.6
Discrete models of sampled data systems
33
4.3
Pulse transfer function models?
The z-domain provides a means of handling the discrete part of the system.
But what can we do about the rest of the system, namely the plant, actuators,
sensors etc. which necessarily operate in continuous time?
Given the continuous part of the system, G(s), driven by a zero-order
hold, the problem is to calculate a transfer function G(z) which is equivalent
at the sample times. [The functions of s and of z will not generally have the
same form; whether we’re talking about the continuous or discrete model is
indicated by whether the argument is s or z.]
4.3 Pulse transfer function models
34
So the continuous part of the system (the “plant”) is driven by a signal with
Laplace transform
1
X
(1 e T s ) kT s
U (s) =
uk
e
.
s
k=0
We can therefore derive the pulse transfer function G(z) (equivalent at the
sample times to the continuous function G(s) driven by a ZOH) by working out
the impulse response of (1 e T s )G(s)/s in continuous time, then sampling
it, and then finding its z-transform, i.e.:
⇢
n (1 e T s )G(s) o
G(z) = Z L 1
.
t=kT
s
However e
Ts
represents a delay of T , which is equivalent to z
1
in the
z-transform domain. Therefore we can simplify this to:
G(z) = (1
Figure 18: Sampled data system.
First consider the ZOH. This takes the discrete value uk at sample time k
and produces a rectangular pulse of height uk and width T (Fig. 19).
⇢
n G(s) o
z 1 )Z L 1
t=kT
s
For simplicity, this operation is usually written as (1
z 1 )Z
⇢
G(s)
.
s
Example
Suppose G(s) =
Figure 19: Zero-order hold impulse response
For each sample uk , the output of the ZOH is therefore a step of height
uk at time tk = kT plus a step of height uk at time tk+1 = (k + 1)T , so the
continuous signal at the output of the ZOH has the Laplace transform:
n
o
n
o
uk
uk
L uk U (t kT )
L uk U t (k + 1)T
= e kT s
e (k+1)T s
s
s
(1 e T s ) kT s
e
= uk
s
? Franklin
(where U (t) is the unit step function).
§4.3
a
. Then, using the formula above, G(z) is obtained from
s+a
⇢
n
o
a
1
G(z) = (1 z )Z L 1
s(s + a)
⇢
n1
1 o
= (1 z 1 )Z L 1
s (s + a)
n
o
1
= (1 z )Z U (t) e at U (t) t=kT
= (1
z 1 )Z U (kT )
e
akT
U (kT )
But the z-transform of the unit step function is
Z U (kT ) =
1
X
k=0
z
k
=
z
z
1
(for |z| > 1)
Discrete models of sampled data systems
35
and similarly the exponentially decaying term has z-transform
akT
U (kT ) =
so
G(z) = (1
1
X
e
akT
z
k
=
k=0
z 1)
⇣ z
z 1
z
e
z
z
e
z
(for |z| > e
aT
aT
⌘
4.4
1
z
=
e
e
aT
)
aT
.
aT
3
36
The ZOH transfer function
Consider again the Laplace transform of the signal at the output of the DAC:
P
kT s
(1 e T s )/s. Separating the parts of this expression that
U (s) = 1
k=0 uk e
depend on k from the part that is independent of k, we get
1
⇣1 e Ts ⌘
X
U (s) =
U ⇤ (s) , where U ⇤ (s) =
uk e kT s .
s
k=0
This suggests that the digital-to-analogue conversion process can be represented mathematically by two operations: construction of U ⇤ from the discrete input signal uk , then filtering by (1 e sT )/s, which is the transfer func-
Example
Now suppose that the ADC and DAC in the previous example are not synchronized, and that there is a fixed delay of ⌧ seconds between sampling the
plant output at the ADC and updating the DAC, 0  ⌧  T . This situation
arises for example if there is a non-negligible processing delay (known as
latency) in the controller. The delay has exactly the same effect as a delay of
⌧ in the continuous system, which is represented as a factor e s⌧ multiplying
G(s). Thus we can determine a new pulse transfer function, G⌧ (z), which
represents the same plant as G(z) but now includes the delay of ⌧ :
⇢
n e s⌧ a o
G⌧ (z) = (1 z 1 )Z L 1
s(s + a)
z 1 )Z U (kT
= (1
⌧)
e
a(kT ⌧ )
U (kT
ZOH(s) =
a(kT ⌧ )
U (kT
⌧ )} =
⌧) =
1
X
k=1
1
X
k
e
a(kT ⌧ )
=
z
k
k=1
=
e
z
G⌧ (z) = z
a(T ⌧ )
)z + (e a(T
z e aT
e j!T )
= Te
j!
j!T /2 (e
j!T /2
e
j!T
j!T /2
)
= Te
j!T /2 sin(!T /2)
!T /2
⌧)
e
!T /2
a(T ⌧ )
e
1
aT
sample), and rearranging gives
e
(1
arg ZOH(j!) =
(remember that ⌧ < T so the impulse response is delayed by at most one
1 (1
.
the continuous time controller, and the closed loop system was approximated
as the continuous feedback loop with the transfer function ZOH(s) inserted
into it). In section 2.6 it was argued that this involves simply inserting a phase
delay of !T /2 into the feedback loop. We can now justify this using the ZOH
1
z
Ts
which has phase:
1
z
e
s
In fact ZOH(s) was used in section 2.6 to approximate the effects of using
a digital controller to implement a continuous time controller (the output of the
discrete time controller was assumed to be equal at the sampling instants to
ZOH(j!) =
Z U (kT
1
frequency response:
⌧)
Substituting for
Z e
tion of an ideal ZOH circuit, denoted ZOH(s):
aT
)
For example, if ⌧ = T , we get G⌧ (z) = z 1 G(z), as expected.
| ZOH ( j ! ) | / T
Z e
4.4 ZOH transfer function
0.8
0.6
0.4
0.2
0
0
.
3
0.2
0.4
0.6
0.8
1
!T/2"
1.2
1.4
1.6
Figure 20: The gain of the ZOH frequency response ZOH(j!)
1.8
2
Discrete models of sampled data systems
37
and gain:
sin(!T /2)
= T |sinc(!T /2)|.
ZOH(j!) = T
!T /2
Thus the argument of the ZOH is !T /2 as expected, and the magnitude is
T |sinc(!T /2)|. This latter is a sinc function (Fig. 20) which is approximately
constant for !  ⇡/30T , the typical bandwidth of a fast sampling system
(shown by the dashed line in Fig. 20).
4.5
Aside: impulse modulation?
4.6 Signal analysis and dynamic response
Using the impulse modulation model of sampling, the spectrum of a discrete signal is represented by the spectrum of an impulse train such as u⇤ (t).
You should realize that u⇤ (t) is just a mathematical representation of the discrete signal uk which is consistent with the requirement that U (z) = U ⇤ (s) for
z = esT . After all, the discrete signal uk is a string of finite numbers rather
than impulses. The impulse model is useful in explaining the effects of aliasing (more on this in A1 Time-Frequency Analysis), but for the remainder of
this course we deal directly with discrete signals uk rather than u⇤ (t).
4.6
The two-stage mathematical representation of digital-to-analogue conversion
used in section 4.4 is the basis of a method of modelling discrete signals as
functions of continuous time, which is known as impulse modulation.
Recall (from P1) that the Laplace transform of a continuous time impulse
(or Dirac delta function) (t kT ) with infinite height at time t = kT and unit
area is L (t kT ) = e skT . Therefore the inverse Laplace transform of
Signal analysis and dynamic response?
The z-transform can be used to compute the response of a discrete system
analogously to the the way that Laplace transforms are used for continuous
systems:
U (s) is a train of continuous time impulses multiplied by (i.e. modulated by)
the samples uk :
u (t) = L
1
⇤
U (s) = L
1
1
nX
k=0
uk e
kT s
o
=
1
X
G(z)
u(kT )
uk (t
Y (z) = G(z) U (z)
U (z)
⇤
⇤
38
y(kT )
kT ) .
k=0
The analogue-to-digital conversion can similarly be represented as a sampling process which generates an impulse train y ⇤ (t) followed by conversion
into a sequence of numbers yk (Fig. 21).
1. Compute the transfer function G(z) of the system.
2. Compute the transform U (z) of the input signal u(kT ) (or look it up in
tables).
3. Multiply the transform of the input by the transfer function to find the
transform of the output Y (z).
4. Invert this transform to obtain the output y(kT ) (or look it up!).
Figure 21: Impulse modulation model of sampled signals in a sampled data system.
? Franklin
§5.1
? Franklin
§4.4
Discrete models of sampled data systems
39
4.6 Signal analysis and dynamic response
You’ve already seen some z-transforms of signals, here are some others:
F(s)
—
—
1
s
1
s2
f (kT )
F (z)
1, k = 0; 0, k 6= 0
1
1, k = m; 0, k 6= m
z
m
z
1(kT )
1
Tz
(z 1)2
kT
. . . and in case that’s not enough, here are a few more:
F(s)
f (kT )
a
s2 (s + a)
1
(akT
a
b 1
(s + a)(s + b)
z
s
(s + a)2
1
s3
1
(kT )2
2!
T 2 z(z + 1)
2 (z 1)3
a2
s(s + a)2
1
s4
1
(kT )3
3!
T 3 z(z 2 + 4z + 1)
6
(z 1)4
(b a)s
(s + a)(s + b)
1
sm
( 1)m 1 @ m 1
e
a!0 (m
1)! @am 1
1
s+a
1
(s + a)2
lim
e
z
e
z
akT
kT e
1
2 akT
2 (kT ) e
1
(s + a)m
( 1)m 1 @ m 1
e
(m 1)! @am 1
1
( 1)m 1 @ m 1
a!0 (m
1)! @am 1 z
lim
z
e aT
T ze aT
(z e aT )2
akT
1
(s + a)3
a
s(s + a)
akT
e
akT
2
T
e
2
akT
aT
aT
z(z + e )
(z e aT )3
( 1)m 1 @ m 1
(m 1)! @am 1 z
z(1 e aT )
(z 1)(z e aT )
z
e
aT
akT
e
sin akT
s
s 2 + a2
cos akT
s+a
(s + a)2 + b2
e
akT
b
(s + a)2 + b2
e
akT
2
1+e
akT
)
F (z)
⇥
z (aT
1+e aT )z +(1 e
a(z 1)2 (z e
aT
aT
a +b
⇥
⇤ 1 e
s (s+a)2 +b2
bkT
cos bkT
aT )
bT
sin bkT
akT
(cos bkT
a
+ sin bkT )
b
z2
z sin aT
(2 cos aT )z + 1
z2
z(z cos aT )
(2 cos aT )z + 1
z2
aT
aT e
(e
e )z
(z e aT )(z e bT )
⇥
⇤
z z e aT (1 + aT )
akT
(1 akT )e
(z e aT )2
⇥
z z(1 e aT aT e aT )+e 2aT e
1 e akT (1+akT )
(z 1)(z e aT )2
⇥
⇤
z z(b a) (be aT ae bT )
be bkT ae akT
(z e aT )(z e bT )
e
a
+ a2
s2
2
aT
40
z(z e aT cos bT )
2e aT (cos bT )z + e
ze
z2
2e
(z
1) z 2
aT
e
B=e
2aT
+aT e
2aT
+e
2aT
z(Az + B)
2e aT (cos bT )z + e
aT
⇤
sin bT
aT (cos bT )z
A=1
aT
)
cos bT
a
+ e
b
aT
a
e
b
sin bT
aT
2aT
sin bT
e
aT
cos bT
aT
⇤
Discrete models of sampled data systems
41
Note:
4.7 Systems with several outputs
4.7
1. All of these z-transforms (and Laplace transforms) apply to signals f
where F (z) = Z{f (kT )} (and F(s) = L{f (t)}). Of course you can
also use the table to work out z-domain transfer functions from a pulse
response and vice versa. Be careful, however, of directly comparing
F (z) and F(s) because the former relates to f (kT ) but the latter relates
to f (t). Remember that to form the pulse transfer function equivalent
of the Laplace transfer function G(s) plus a ZOH we have to start with
(1 z 1 )G(s)/s.
2. In all cases, the functions of t are zero for t < 0.
3. The closed form solutions for F (z) are valid for |z| > |pi |, where pi are
their pole positions.
4. For the case of Laplace transforms, the inverse Laplace transform can
be significantly more difficult to calculate than the (forward) transform,
and the easiest way of doing the inversion is usually to take partial fractions of F(s) and look up the factors in a table of transforms. This applies
even more strongly to z-transforms, because the (forward) z-transform
is usually easy to find (involving a series summation rather than the in-
42
Pulse transfer functions of systems with several outputs
A discrete transfer function can only describe the map from one discrete
signal to another. This is important to remember when calculating the pulse
transfer functions of systems with more than one output variable.
Consider for example the system in Figure 22, which has two output variables: y and z. The pulse transfer function between uk and yk is
n G (s) o
Y (z)
1
= (1 z 1 )Z
,
U (z)
s
whereas that from uk to zk is clearly
Z(z)
= (1
U (z)
z 1 )Z
n G (s)G (s) o
1
2
.
s
Even though z is related to y via Z(s) = G2 (s)Y (s), this can’t be used directly to simplify computation of the the pulse transfer function from uk to zk
because z and y are related by a purely continuous system, and in particular
n G (s)G (s) o
n G (s) o n
o
1
2
1
6= (1 z 1 )Z
Z G2 (s) .
(1 z 1 )Z
s
s
tegration required for Laplace) but the inverse z-transform still requires
an integration:
I
1
1
Z
F (z) = f (kT ) =
z k 1 F (z) dz
2⇡j
(where the contour encircles the poles of F (z)).
5. If all we are really after is to work out the output as function of time for a
specific input function, it may well be easier: (a) to perform a convolution
of the input with the impulse response of the system; or (b) to iterate the
difference equation. The main purpose of z-transforms in this context is
as a tool to examine the poles and zeros of the pulse transfer function.
Figure 22: Sampled data system with two outputs.
Discrete models of sampled data systems
43
4.8
5
Summary of section 4
This section discusses the discrete model of a sampled data system, which
consists of a continuous system interfaced via an ADC and DAC with ZOH.
• The pulse transfer function:
G(z) = (1
44
⇢
z 1 )Z L
1
n G(s) o
s
t=kT
gives the sampled output response of a continuous system G(s), when
Step response and pole locations
As for continuous systems, the poles, zeros and d.c. gain of a discrete transfer function provide all the information needed to estimate the response.
When designing a controller, an understanding of how the poles in particular affect the approximate response is usually more useful than the ability
to compute the exact response. This section provides a characterization of
system response in terms of the locations of the poles of the discrete transfer
function.
the input is supplied by a ZOH.
5.1
• The ideal ZOH transfer function ZOH(s) has
gain: ZOH(j!) = T sinc(!T )
phase: arg ZOH(j!) =
!T /2.
Poles in the z-plane
Of all the z-transforms, arguably the most interesting is the z-transform of the
general sinusoid which grows or decays exponentially according to whether
r > 1 or r < 1.
• The exact response yk of a sampled data system to a discrete input
signal uk can be determined from G(z) by:
– computing Y (z) = G(z)U (z) and yk = Z
1
{Y (z)},
Take y(t) = e
at
cos(bt) U (t) (where U (t) is the unit step function), then
with r = e
y(kT ) = rk cos(k✓) U (kT )
=
– or by iterating the discrete time recurrence equation implied by G(z).
rk 21 (ejk✓
+e
jk✓
k
1
2
aT
, ✓ = bT
) U (kT )
from which we get
Y (z) =
1
2
1
X
rk ejk✓ z
k=0
+
1
X
rk e
jk✓
z
k
k=0
1
1
1
1
=
+
j✓
1
2 1 re z
2 1 re j✓ z
1
z
1
z
=
+
2 z rej✓ 2 z re j✓
z(z r cos ✓)
=
(z rej✓ )(z re j✓ )
1
[for |z| > r]
[=
z2
z(z r cos ✓)
]
2r(cos ✓)z + r2
Suppose that this signal is generated by applying a unit pulse to the system with transfer function:
G(z) =
(z
z(z r cos ✓)
rej✓ )(z re
j✓ )
.
Step response and pole locations
45
5.1 Poles in the z-plane
Figure 23 shows the poles of this transfer function at z = re±j✓ and the zeros
at z = 0 and z = r cos ✓. Figures 24 and 25 give the responses (when the
r = 0.7
✓ = ⇡/4
0.5
y
k
input is a unit pulse) as r and ✓ vary.
46
1
0
−0.5
0
2
4
6
8
10
sample k
1
k
0.5
y
0
r = 1.0
✓ = ⇡/4
−0.5
−1
0
2
4
6
8
10
sample k
Figure 23: Pole and zero locations, x = pole, o = zero
10
5
yk
As r is varied (Fig. 24):
. r < 1 gives an exponentially decaying envelope
. r = 1 gives a sinusoidal response with 2⇡/✓ samples per period
−5
0
2
4
6
8
10
sample k
. r > 1 gives an exponentially increasing envelope.
As ✓ is varied (Fig. 25):
r = 1.3
✓ = ⇡/4
0
Figure 24: Responses for varying r
. When ✓ = 0 and r = 1:
. small values of ✓ give a frequency much less than the sample rate and
lots of samples in a period
. larger ✓ values give a frequency nearer to the sample rate and fewer
samples in a period.
z
z 1
which you may recognize as the unit step (p. 34).
Y (z) =
. When r = 0:
Y (z) = 1
Some special cases are the following:
which you may recognize as the unit pulse (p. 26).
. For ✓ = 0, Y (z) simplifies to:
Y (z) =
. When ✓ = 0 and
z
z
r
with one zero at the origin and one pole at z = r. This corresponds to
an exponentially decaying response (see p. 24).
1 < r < 0:
we get samples of alternating signs.
These responses are superimposed on the complex plane at the locations
of the z-plane poles in Figure 26.
Step response and pole locations
47
5.2 The mapping between s-plane and z-plane
48
y
k
1
r = 0.7
✓=0
0.5
0
0
2
4
6
8
10
sample k
1
r = 0.7
✓ = ⇡/2
yk
0.5
0
−0.5
0
2
4
6
8
10
sample k
1
yk
0.5
0
r = 0.7
✓=⇡
−0.5
−1
0
2
4
6
8
10
Figure 26: Pulse response for various pole locations (from Franklin p.126)
sample k
Figure 25: Responses for varying r
5.2
The mapping between s-plane and z-plane
What observations can be made from this?
. Poles inside the unit circle (|z| < 1) are stable.
. Poles outside the unit circle (|z| > 1) are unstable.
. Poles on the unit circle (|z| = 1) result in oscillation.
. Real poles at 0 < z < 1 result in an exponential pulse response.
. Real poles near |z| = 1 are slow.
. Real poles near z = 0 are fast.
. Complex poles give faster responses as their angle to the real axis increases.
. Complex poles give a more resonant response as they get nearer the
unit circle.
You should be able to spot some similarities with poles in the s-plane!
Now cast your eyes over the list of z-transforms on pages 39 and 40. What
do you notice about the poles?
If a continuous-time signal, F (s), has a pole at s = a, then the sampled
signal always has a pole at z = eaT . Of course this is to be expected since
z = esT , so the poles are effectively in the same place for the sampled signal
as for the continuous signal.
[The correspondence between continuous and discrete system poles works
out even better than it appears at first glance. When modelling a continuous
system plus ZOH, the continuous transfer function is excited by (1 z 1 )/s
or (z 1)/(zs). But a pole at s = 0 maps to a pole at z = 1 producing a (z 1)
in the denominator to cancel the (z 1) introduced in the numerator by the
ZOH. Notice also that (apart from the pulse functions), all the F (z) have a
Step response and pole locations
49
factor z in the numerator – this cancels with the z in the denominator due to
the ZOH.]
5.3 Damping ratio and natural frequency
50
take just the part of the s-plane within the half-sampling frequency, |!| < ⇡/T
which maps one-to-one onto the whole of the z-plane (Fig. 27).
Thus we see that the pole locations of a continuous signal in the s-plane
map to the pole locations of the sampled signal in the z-plane under the
transformation z = esT . Writing s = + j!, we obtain
(
|z| = e T
( +j!)T
T j!T
z=e
=e e
=)
arg(z) = !T
! unit circle (z = ej!T )
= 0)
left-half plane ( < 0)
! inside of the unit circle (|e T | < 1)
right-half plane ( > 0)
! outside of the unit circle (|e T | > 1)
[i.e. z-plane poles inside the unit circle are stable]
negative real axis (! = 0,
1<
positive real axis (! = 0, 0 <
negative infinity ( ! 1)
< 0)
Recall the s-plane poles with natural frequency !0 ,
damping ratio ⇣ < 1:
! real axis (z > 1)
! origin (z = 0)
< 1)
⇣!0 ± j!0
p
1
⇣2
The z-plane poles under the mapping z = esT are
p
z = rej✓ with r = e ⇣!0 T , ✓ = !0 T 1 ⇣ 2 .
Figure 28: s-plane poles
Thus:
• Lines of constant natural frequency, !0 which are circles in the s-plane,
map to the shapes shown in Figure 29
z-plane
Im(s)
=) s =
• Lines of fixed damping ⇣, which radiate from the origin of the s-plane
map to logarithmic spirals in the z-plane (Fig. 29).
! real axis (0 < z < 1)
s-plane
Im(z)
5.4
✓
! = ⇡/T
sT
z = e6
Re(s)
!=
Damping ratio and natural frequency
s2 + 2⇣!0 s + !02 = 0
What does this mapping look like?
imaginary axis (s = j!,
5.3
Re(z)
! = ±⇡/T
⇡/T
@
R
@
Figure 27: The mapping z = esT from s-plane to z-plane
The mapping from s-plane to z-plane is a many-to-one mapping, because
s = s1 ! z = e s 1 T
implies
s = s1 + ej2n⇡ ! z = es1 T
for any integer n. Bearing in mind Nyquist’s sampling theorem, which states
that we need to sample at a frequency at least twice the signal bandwidth, we
System specifications?
Control systems may be designed to satisfy various different criteria. However, surprisingly often the controlled system finishes up with a response
strongly resembling that due to the dominant (i.e. slowest) poles alone. To
get a good compromise between design specifications, we often therefore
aim for a closed-loop response dominated by a pair of complex conjugate
poles representing an approximation to an underdamped 2nd-order system.
For the discrete control system in Fig. 30 this involves specifying the locations of the dominant z-plane poles, i.e. the roots of 1 + D(z)G(z) = 0.
Typically we aim for a damping factor ⇣ around 0.7 and natural frequency
!0 as high as reasonably possible (to make the response as fast as possible).
? Franklin
§2.1.6, 2.1.7, 2.2.2, 2.2.4
Step response and pole locations
51
5.4 System specifications
52
Figure 31: Second order system step responses (from Franklin p.19, see also HLT p.168)
Figure 29: z-plane lines of constant damping ratio and natural frequency (from Franklin p.125)
Figure 32: Step response design criteria (from Franklin p.20)
troduction to Control Theory):
Figure 30: Discrete controller and continuous plant
Actual design criteria include:
Rise Time,
Settling Time,
Peak Overshoot,
Steady State Error,
tr
ts
Mp
ess
Gain Margin, & Phase margin
For a 2nd-order underdamped system, we can obtain some approximate
relationships between these criteria and the pole positions (see e.g. A2 In-
Rise Time (10% to 90%): tr ⇡ 1.8/!0
Settling Time (to 1%):
ts ⇡ 4.6/(⇣!0 )
p
Peak Overshoot:
Mp ⇡ e ⇡⇣/ 1
Phase Margin:
PM
⇡ 100⇣
⇣2
(for 0  ⇣  1)
(
PM
in degrees)
To design a controller so as to meet a given specification in terms of ess , ts ,
Mp etc., a number of design techniques (including root locus and frequency
response methods) exist for placing the z-plane poles at desired locations.
However these are beyond the scope of this course (see the control B-paper).
Step response and pole locations
53
5.4 System specifications
54
3. Next translate the specification on overshoot and settling time into constraints on the poles of the transfer function from r to y:
Example
A continuous system with transfer function G(s) = 1/(s(10s + 1)) is controlled
by a discrete control system with a ZOH as in Fig. 30. The closed loop
system is required to have: a step response y(kT ) with overshoot Mp < 16%
and settling time ts < 10 s; and steady-state error to a unit ramp ess < 1.
Check these specifications if the sample interval is T = 1 s and controller is
0.5uk
1
+ 13(ek
Now look at the table on p. 40 with T = 1 and a = 0.1 to get:
=
1 + e 0.1 )z + (1 e
0.1(z 1)2 (z e
0.1
1 + e )z + (1 e 0.1 0.1e
0.1(z 1)(z e 0.1 )
1) z (0.1
(z
z
(0.1
Find the controller transfer function (recall z
0.1
0.1e
0.1
)
0.1 )
0.1
1
)
=
0.0484(z + 0.9672)
(z 1)(z 0.9048)
= forward shift operator):
1
U (z)
(1 0.88z )
(z 0.88)
= D(z) = 13
= 13
.
E(z)
(1 + 0.5z 1 )
(z + 0.5)
2. Next check the steady state error. The transfer function from r to e is
E(z)
1
=
.
R(z) 1 + D(z)G(z)
and the steady state error is ess = limk!1 ek . From the z-transform of a
ramp (p. 39) and the final value theorem (p. 32) we get
n
o
Tz
1
T
ess = lim (z 1)
= lim
2
z!1
z!1 (z
(z 1) 1 + D(z)G(z)
1)D(z)G(z)
1 0.9048
1.00
(1 + 0.5)
=
=
= 1.00
= 0.96
0.0484(1 + 0.9672)D(1) D(1)
13(1 0.88)
so ess < 1, as required.
⇣ > 0.5
settling time: ts < 10
=)
⇣!0 > 0.46 =) radius of poles < 0.63
But the poles are the roots of 1 + D(z)G(z) = 0, i.e.
1+13
0.88ek 1 ).
1. First find the pulse transfer function of G(s) plus the ZOH:
n G(s) o
G(z) = (1 z 1 )Z
s
o
(z 1) n
0.1
=
Z 2
.
z
s (s + 0.1)
G(z) =
=)
(z 0.88) 0.0484(z + 0.9672)
= 0 =) z = 0.876,
(z + 0.5) (z 1)(z 0.9048)
0.050±j0.304
At first sight it appears that the requirement on settling time is violated
by the slow pole at z = 0.876. However the transfer function from r to y:
Y (z)
D(z)G(z)
=
R(z)
1 + D(z)G(z)
has a zero at z = 0.88 which effectively cancels the pole at z = 0.876.
Therefore the dominant poles are
(
r = | 0.050 + j0.304| = 0.31
±j✓
z = 0.050 ± j0.304 = re
✓ = tan 1 (0.304/0.05) = 1.73
so r < 0.63 is satisfied. Finally, to check that ⇣ > 0.5, use (from p. 50):
)
r = e ⇣!0 T
⇣
ln(1/r)
p
=) p
=
= 0.680 =) ⇣ = 0.56.
2
2
✓
1 ⇣
✓ = !0 T 1 ⇣
Hence the controller meets the specifications, as shown by the closed
loop step response in Figure 33.
3
1.5
Output y and input u/10
uk =
overshoot: Mp < 16%
1
0.5
0
−0.5
−1
−1.5
0
1
2
3
4
5
6
7
8
9
Time (sec)
Figure 33: Step response, –+– = output y, –o– = input u ⇥ 0.1
10
Step response and pole locations
55
5.5
Fast sampling revisited
5.6
Finally, note that at the beginning of the course it was shown that for a high
enough sampling frequency, the sampled system becomes virtually indistinguishable from a continuous system. How can this be? Well, as T becomes
small, we can approximate z = esT by writing
z = esT = 1 + sT + (sT )2 /2 + · · · ⇡ 1 + sT
or equivalently, s ⇡ (z
1)/T .
To see what this means, consider the unit circle in the z-plane. In the
(z 1)-plane this becomes a unit circle shifted to the left by one so that the
point z = 1 goes to the origin, and in the ((z 1)/T )-plane this offset circle is
blown up to a large radius, 1/T .
(z
Im(z
1)-plane
(z
⇥
Im (z
1)
Re(z
5.6 Summary of section 5
1)
Re (z
Summary of section 5
This section considers how response of a discrete time system is affected by
the location of its poles in the z-plane.
• The pulse response of a 2nd order system is investigated as the radius
and argument of its z-plane poles are varied.
• For a sampled data system with a ZOH:
if s = pi is a pole of G(s), then z = epi T is a pole of G(z).
• The locus of s =
+ j! under the mapping z = esT is considered:
. the left half plane ( < 0) maps to the unit disk (|z| < 1)
1)/T -plane
⇤
1)/T ⇡ !
⇥
56
. s-plane poles with damping ratio ⇣, natural frequency !0 map to zp
plane poles with |z| = e ⇣!0 T , arg(z) = 1 ⇣ 2 !0 T .
⇤
1)/T ⇡
• Design specifications (rise time, settling time, overshoot) translate into
constraints on the ⇣ and !0 values of the dominant closed loop poles.
• For fast sampling, Euler’s approximation is related to z = esT as T ! 0.
Figure 34: The unit circle |z|  1 under the mappings z ! z
1 and z ! (z
1)/T
In the limit as T ! 0, the unit circle therefore maps to the entire left-half of
the s-plane. For practical purposes (i.e. small but non-zero T ), if the system
is stable, then the dominant poles will be the slowest ones and these will be
close to the z = 1 point for small T . If they are close enough, we can magnify
this small region of the z-plane until it looks for all intents and purposes like
the origin of the s-plane. Our previous “rule of thumb” that the sample rate
should be 30 times the bandwidth roughly translates to looking at poles within
a sector of 360 /30 = 12 of the unit circle around the z = 1 point.
Step response and pole locations
57
5.7
Learning Outcomes
1. Have an appreciation of how control systems are affected by the presence of a computer in the control loop.
[L1]
2. Know how to approximate fast sampling continuous systems (filters or
controllers) using discrete time approximations to continuous time derivatives.
[L1]
3. Understand the effects of sample rate on a computer-controlled system.
[L1]
4. Know how to describe difference equations using transfer functions between signals represented by z-transforms.
[L2]
5. Understand that the transfer function is the z-transform of the pulse response and that the system output is the convolution of the pulse response and the input.
[L2]
6. Know how to derive the discrete time model of a continuous time sampled data system using transform techniques.
[L3]
7. Know how to compute the dynamic response of a sampled data system.
[L3]
8. Know useful properties of z-transforms: linearity, initial and final value
theorems, multiplication, convolution and differentiation.
[L3]
9. Understand how the location of z-plane poles affects the step response
of a second order system.
[L4]
10. Understand how the poles of sampled data systems map from the splane to the z-plane.
[L4]
11. Be able to relate specifications on damping and speed of response to
specifications on z-plane pole locations.
[L4]
Download