Sampled Signals and Digital Systems
Sampled Signals and Digital Systems
In a great number of modern control applications, digital computing equipment is used to evaluate
control algorithms. The general structure of a computer control system is
Computer disturbance
d(t)
reference pre-filter controller input plant + output
r(t) + u(t) + y(t)
F(w) G(w) P(s)
A/D D/A
-
A/D
The computer works with a sequence of numbers although you may read all sorts of confusing
things about comb functions and trains of impulses etc. We usually try to take samples of signals at
equidistant times, T. In the same way as we were able to define the Laplace transform of a signal
in the continuous time, we will define the Z transform of discrete signals. We need to be a little
careful with the relationship between Z transforms of signals when speaking about systems.
Consider the signal, y( t ) = e − t shown alongside and the sequence of numbers, yi=y(iT), T=0.2
ti y(ti) 0.9
0.0 1.0000
0.8
0.2 0.8187
0.4 0.6703 0.7
0.6 0.5488
0.6
0.8 0.4493
1.0 0.3679 0.5 y0
1.2 0.3012 y1
0.4
1.4 0.2466 y2
y3
1.6 0.2019 0.3 y4
1.8 0.1653 y5
0.2
2.0 0.1353 y6
0.1
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
We can describe y(ti) = yi by means of a recurrence relationship (i.e a simple geometric series):
y i = e − T y i −1 , e −0.2 = 0.8187
∞
Z{ y( n )} = Y( z ) = ∑ y i z − i (5.2)
i=0
∞
1 z
Z{1} = ∑ 1 z − i = = (5.3)
i= 0 1 − z −1 z −1
{
Z e −0 .2n = } z
z − e −0 .2
, where y(n) is a sequence of ones and Y( z) =
z
z −1
(5.6)
In general,
{ }
Z e − anT = Z{1}
z = z e aT
=
z
z − e − aT
(5.7)
These properties allow us to develop Z transform tables and we will use them in much the same
way as Laplace transform tables.
5.3.1. Tables
One simple way to obtain the inverse Z transform is to write it out as a partial fraction expansion if
possible and use tables, as we have done with the Laplace transform.
Example
3z 2 − 2z
Find the inverse Z transform of Y( z ) = .
z 2 − 1.25z + 0.375
⎧ z 2z ⎫
y( n ) = Z −1 {Y( z )} = Z −1 ⎨ + ⎬
⎩ z − 0.75 z − 0.5 ⎭
= e − an + 2e − bn , e − a = 0.75, e − b = 0.5
y( n ) = e −0 .288n + 2e −0 .693n
= (3, 1.75, 1.06, 0.67, 0.44, K )
Example above:
3 + 1.75z −1 + 1.06z −2 + 0.66z −3 +K
z 2 − 1.25z + 0.375 3z 2 − 2z etc
3z 2 −3.75z +1125
.
1.75z −1125
.
1.75z −21875
. +0.6563z −1
1.0625 −0.6563z −1
def ∞
Since Z{ y( n )} = ∑ y i z − i , coefficients of the expansion are the values of yi required.
i=0
Consider
1
y( t ) = e − at Y (s ) = pole at s=-a (5.8a)
s+a
z
y( n ) = e − anT Y( z ) = pole at z= e − aT (5.8b)
− aT
z−e
The poles of a signal are related by z = e sT . Be careful of placing too much importance on this
relationship as it applies to the poles and not the zeros and it also does not apply to the Z domain
“transfer function”. The mapping is illustrated below.
def ∞
As Z{ y( n )} = ∑ y i z − i , y0 = lim Y( z) (5.9)
i=0 z→∞
∞
Z{y ( n + 1) − y ( n )} = ∑ ( y i +1 − y i ) z− i
i=0
= ( z − 1) Y( z) − z y 0
let z → 1,
∞
lim Z{y ( n + 1) − y ( n )} =
z→1
∑ ( y i +1 − y i )
i=0
= lim y N − y 0
N →∞
lim y N = lim ( z − 1) Y( z)
N →∞ z→1
Real world systems are described by continuous differential equations as their signals exist for all
time. Assume for the moment that we can somehow get a system that is described by a difference
equation. (An example would be the adding of interest to a bank account at the end of a month.)
We do not know what happens between sampling instants. Examine Y(z) = Z{y(n)}:
b + b1z−1 + b 0z−2
Y ( z) = 2 U ( z)
1 + a1z−1 + a 0z−2
b z2 + b1z1 + b 0
= 22 U ( z)
z + a1z1 + a 0
x = Ax + Bu (5.11a)
y = Cx + Du (5.11b)
(
A t − to )x t A ( t − τ) B u( τ) dτ
x=e o + ∫t o − e (5.12a)
y = Cx + Du
(5.12b)
t A ( t − τ ) B u( τ) dτ → convolution integral
∫o − e
yi = Cxi + Dui
The behaviour of {xi} and {yi} depend on how u(t) behaves over all time. To make {xi}, {yi}
unique, we specify how u(t) will behave (e.g. ramp/staircase etc.) between samples.
1
0.9 Staircase
(Zero order hold)
0.8 First order hold
0.7
0.6
0.5 y0
y1
0.4 y2
y3
0.3 y4
0.2
y5
y6
0.1
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
xi + 1 = A d xi + B d ui
(5.18)
yi = Cxi + Du i
( ( ) ( )
A d = e AT = φ t i + 1 − φ t i = φ (T) )
T A ( T − τ ) dτ B
Bd = ∫0 e
= ⎛⎜⎝ e AT − I⎞⎟⎠ A −1 B
for A regular (i.e. non-singular)
z X ( z ) − z x ( 0) = A d x ( z ) + B d U ( z )
Y ( z ) = Cd x ( z ) + DU ( z ) (5.20)
Y ( z ) = (C Iz − A −1B + D) U ( z )
d ( d ) d x ( 0) = 0
z − 1 ⎧⎪ -1⎧ P(s) ⎫ ⎪⎫
P( z ) = Z⎨ L ⎨ ⎬ ⎬ (5.21)
z ⎪⎩ ⎩ s ⎭ t = iT ⎪⎭
To examine the output of a continuous plant between sampling instances, add a delay, 0 < Δ < to
the input staircase. See back of table. Can be used to locate oscillations in pure discrete designs.
T
(
yi + 1 ≈ yi + ui + 1 + ui
z
)
T
( z − 1)Y (z) = (z + 1)U(z)
2
2 z −1
s≈ (5.22)
T z +1
1 + sT / 2
z≈ (5.23)
1 − sT / 2
, consider
1 1 − e− aT ⎛ 2 z − 1⎞ T ( z + 1)
Ps (s) = , Pz ( z ) = Ps ⎜ ⎟=
s/ a +1 z − e− aT ⎝ T z + 1⎠ 2 ( z − 1) / a + T ( z + 1)
with a = 1, T = 5 × 10−3
4.99 x10−3
Pz ( z ) =
z − 0.995
The above (and other considerations) motivate definition of the w transform pair (bilinear)
2 z −1
w=
T z +1
(5.24)
1 + wT / 2
z=
1 − wT / 2
In older books the scaling by T/2 is often left out. This is an exact transform, defined on z-
transform i.e.: we need to know T before starting.
2) If we can transform t-domain specifications into w domain and T has been fixed, we design in
w domain using familiar s domain tools.
Note that sampling too fast causes problems: (+ extra cost of fast hardware) (Middleton &
Goodman “Improved Finite Word Length characteristics in Digital Control Using Delta Apparatus”
IEEE Transactions on Automatic Control, Vol. AC-31 No 11, November 1986).
1
P ( s) = with finite precision
s/ a +1
1 − e− aT
P( z ) =
z − e− aT
yi + 1e− aT yi + ⎜⎛⎝ 1 − e− aT ⎟⎞⎠ ui eg a = 1, T = 5x10−3 two digits
If T is small,
We can develop discrete domain models based on changes in variables over the step,
Systems & Simulation - ENEL3SS 5-9
SS1_5.DOC
z −1
δ= ; z = δT + 1 (5.25)
T
In above,
yi + 1 − yi 1 − e− aT 1 − e− aT 1 − e− aT
= yi + ui P(δ ) =
T T T 1 − e− aT + δT
Another view is obtained by writing Ps(s) as partial fraction expansion and then taking the z-
transform (transfer function with “zero-order hold”, not signal) and w-transform. Assuming no
repeated roots (for convenience),
n
Ps ( s ) = ∑
ri
, and Pz ( z ) = ∑ i
(
n r 1 − e − pi T p )
i , giving,
−
i =1 s + pi
p T
i =1 z −e i
⎡n
Pz ( w) = ⎢ ∑
( )
ri 1 − e − piT pi
⎤
(
⎥ 1− wT )
⎣
( T
2
) ( )
⎢i =1 1 + w − 1 − w e T
2
− pi T ⎥
⎦
2
= ⎢∑ T
( ) (
⎡ n ri 2 tanh pi T pi ⎤
⎥ 1− wT )
( )
2 (5.26)
⎢i =1 w + tanh pi
2 T ⎥ 2
⎣ T 2 ⎦
⎡n
≈ ⎢∑
ri ⎤
( )
⎥ 1− w 2
T
⎣i =1 w + pi ⎦
The approximations require that piT << 1, meaning that the sampling rate, 1/T must be more than
the highest plant corner frequency that has significant residual, ri. Eq. (2.1.7) illustrates the effect of
frequency warping when translating between the s- and w- domains.
0.8
0.6
0.4
0.2
imag
-0.2
-0.4
-0.6
-0.8
-1
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
real