The Z-Transform
Sampled Data The generalized function (t) (also known as the impulse function) is useful in the definition and analysis of sampled-data signals. Figure 1 below shows a simplified graph of an impulse. (t-t0) t t0 Figure 1: Simplified graph of an impulse function For an impulse, it can be shown that
f(t) δ(t t 0 ) dt f(t 0 )
(1)
This property is called the sifting property and may be used to define a sampled signal f *(t) as shown in Figure 2 below. The sampled signal is basically f(t) modulated by the pulse train p(t) given by
p(t) =
δ(t nT)
(2)
n
f*(t)
f(t) t
t p(t)
t Figure 2: Ideal impulse sampling Therefore
*
f (t) = f(t) p(t) =
f(nT) δ(t nT)
(3)
n
So that the sampled signal is an amplitude modulated train of pulses. If each pulse is replaced with the number f(nT), it is then called discrete-time signal. Finally, if f(t) is defined only over t 0, the summation in Eq. (3) is taken over [0,]. EE452 Digital Control Dr. Salah Foda
Page 1
The z-Domain The Laplace and z-transforms are closely related techniques. To demonstrate this, we will start with the Laplace transform and show how it can be changed into the z-transform. The single-sided Laplace transform of the time domain f(t) is defined as:
F(s) f(t)e st dt
(4)
0
where F(s) is the s-domain representation of the signal f(t). The above equation analyzes the time domain signal in terms of sine and cosine waves that have an exponentially changing amplitudes. This can be understood by using the substitution s = +j so that the Laplace transform becomes: (5) t jt
F( , ) {f(t) e } e 0
dt
Figure 3: An interpretation of F(,) for a unit step u(t) Now, take the Laplace transform of the sampled-data signal f*(t) given by Eq. (3)
F (s) f (t) e dt f(nT) δ(t nT) e st dt *
st
*
0
n 0
f(nT) e
nTs
0
f(0) + f(T) e-sT + f(2T) e-2sT+ f(3T) e-3sT+
(6)
n 0
This equation is our starting point to define the z-transform of a sampled signal. It also relates in a direct way the s-transform and the z-transform as will be soon illustrated. Define the forward delay operator z = esT and rewrite Eq. (6) as follows: F(z)
f(nT) z
n
f(0) + f(T) z-1 + f(2T) z-2+ f(3T) z-3+
(7)
n 0
where F(z) is called the z-transform of the discrete signal f(nT) or Z{f(t)}. EE452 Digital Control Dr. Salah Foda
Page 2
Example: Find the z-transform for the unit step u(t)=1 for t ≥ 0 and is zero for negative time. SOLUTION: Substitute for u(t) in Eq. (7) to get 1 z U(z) u(nT) z n 1+ z-1 + z-2+ z-3+ = = given that |z| >1. 1 1 z z 1 n 0 Properties of the z-transform: (1) Linearity: Given f(t) and g(t) with corresponding F(z) and G(z), then for arbitrary constants α, βIɌ or ₵
Z{α f(t)+ β g(t)}= αF(z)+ βG(z)
(8)
(2) Translation: For m > 0 m
m
m-1
Z{f(nT+mT)}= z F(z) z f0 z f1 zfm-1 m
and Z{f(nTmT)}= z F(z)
(9)
(10)
PROOF:
Z{f(nT+mT)}= f(nT mT) z n = z
m
n0
=z
m
f n 0
f(nT mT) z n0
m
m
( n m)
m
z m f m 1 z ( m 1) = z F(z) z f0 z
m1
f1 z fm-1
Proof for the second case is similar except that f(nT) is assumed zero for negative indices. (3) Complex Differentiation:
Z {nT f(nT)}= Tz dF(z)/dz 2
3
(11) 4
PROOF: Note that dF(z)/dz = f1 z 2f2 z 3f2 z Example: Find the z-transform for the ramp function r(t) = t for t ≥ 0. SOLUTION: Using complex differentiation property z 1 Tz R(z) = zT dU(z)/dz = zT d( )/dz = zT = 2 z 1 ( z 1) ( z 1) 2 (4) Frequency Scaling: Z{nf(nT)}=F(1z)
(12)
PROOF: Using translation property
Z{nf(nT)}= f n ( 1 z ) n = F(1z) n 0
EE452 Digital Control Dr. Salah Foda
Page 3
(5) Initial Value Theorem: f(0) = lim F(z)
(13)
(6) Final Value Theorem: f() = lim (z1)F(z)
(14)
z
z 1
PROOF: Using translation property N
Z {fn+1fn}= lim
N
(f
n 1-
f n ) z n = z F(z) z f(0) F(z)
n 0
Now, let z =1 and observe that lim (z1) F(z) f(0) = lim {(f1f0)+ (f2f1)+ +(fNfN-1)} = f() f(0). z 1
N
Note that this final value exists only if (z-1)F(z) has its poles within unit circle. The following table summarizes the Laplace and z-transforms for a few of the standard functions. Table: Standard Laplace and z-transforms Time Function f(t) t >0
Laplace Transform F(s)
z-transform F(z)
Kronecker delta (t)
1
1
Step function u(t)
1 s
z z 1
z za
Power function at Ramp t
1 s2
Tz ( z 1) 2
Parabolic function t2
2 s3
T z ( z 1)
k!
tk
s
k 1
( z 1) 3
lim (1) k
0
k
k
[
z ze
T
eat
1 sa
z z e aT
teat
1 ( s a) 2
Tze aT ( z e aT ) 2
a s( s a)
z (1 e aT ) ( z 1) ( z e aT )
at
1e
]
Damped sine eat sin(t)
( s a)2 2
ze aT sin T z 2 2 ze aT cos T e 2 aT
Damped Cosine eat cos(t)
sa ( s a) 2 2
z 2 ze aT cos T z 2 2 ze aT cos T e 2 aT
EE452 Digital Control Dr. Salah Foda
Page 4
The Inverse z-transform There are several methods to obtain the inverse of the z-transforms. We shall discuss two simple methods; long division and partial fraction expansion. Both are illustrated though the following examples. Example: Find the inverse z-transform for F(z) =
z 0.2 ( z 0.5) ( z 1)
SOLUTION: (a) Using long division
1
2
3
4
z +0.7z + 0.85 z +0.775 z + 2 z 0.5z 0.5 z+0.2 1 z 0.50.50 z 1 0.7+0.50 z 1 2 0.70.35 z 0.35 z 1 2 0.85 z +0.35 z 1 2 3 0.85 z 0.425 z 0.425 z 2 3 0.775 z +0.425 z Or, simply
F(z) =
f(nT) z
n
1
2
3
4
= z +0.7z + 0.85 z +0.775 z +
n0
(b) Using partial fractions F(z) can be expanded as F(z) =
0.2 0.8 so that ( z 0.5) ( z 1)
z z 0.8 ( z 0.5) ( z 1) and from z-transform table, we get fn+1 = 0.2(0.5)n + 0.8 z 0.2 and f0 = lim = 0 as confirmed in (a). z ( z 0.5) ( z 1) z F(z) = 0.2
for n 0
(c) Computation using Matlab The following Matlab code may be used to confirm the above results: >> delta=[1 zeros(1,15)]; >> num=[0 1 0.2]; >> den=conv([1 .5],[1 -1]); >> f=filter(num,den,delta) f = 0 1 0.7 0.85 0.775 0.8125 0.7937 0.8031 0.7984 0.8008 0.7996 .8002 0.7999 0.8 0.8 0.8
Note that the sequence fn is seen as the impulse response of a filter with F(z) as its transfer function. EE452 Digital Control Dr. Salah Foda
Page 5
Example: Find the inverse z-transform for z ( z 5 z 6)
F(z) =
2
SOLUTION: (a) Using long division
F(z) =
f(nT) z
n
1
2
3
4
= z +5z + 19 z + 65 z +
n0
Also, F(z)/z can be expanded as F(z)/z =
z z ( z 3) ( z 2)
Hence F(z) = So that
1 1 1 = ( z 5 z 6) ( z 3) ( z 2) 2
n
n
f((nT) = (3) (2) ,
for n 0.
(b) Using Matlab: >> delta=[1 zeros(1,5)]; >> num=[0 1 0]; >> den=[1 -5 6]); >> f=filter(num,den,delta) f = 0 1 5 19 65
211
(c) Using Symbolic Toolbox: >> syms f F n z >> F=z/(z^2-5*z+6); >> f=iztrans(F) f = -2^n+3^n
Example: Find the value of the infinite series
f=
k (0.5)
k
k 0
SOLUTION: First, we may note that f is simply F(z) evaluated at z =1 (provided that F(z) has no poles outside the unit circle). Let us evaluate F(z) as the complex 2z z d z ( )= differentiation of i.e. F(z) = z z 0.5 dz z 0.5 ( z 0.5) 2 Hence, the sum f = F(1) = 8. Example: Using z-transform table and partial fraction expansion, find the inverse ztransform for F(z) =
z ( z 1)
( z z 1) ( z 1) 2
SOLUTION: First, let us expand F(z) using partial fractions in the form F(z)/z =
( z 1) ( z z 1) ( z 1) 2
=
EE452 Digital Control Dr. Salah Foda
2 2 z 1 a bzc 2 2 = ( z 1) ( z z 1) ( z 1) ( z z 1)
Page 6
z z 2 0.5 z 2 2 So that F(z) = ( z 1) ( z 2 z 1) Comparing the second term with table entry for cos(nT) (a=0), we find cos(T)= 1/2, so that T = /3 and f((nT) = 2(1 cos(n/3)) u(nT) The following matlab code was used to verify the values of f((nT): >> >> >> >> >> >>
delta=[1 zeros(1,19)]; num=[0 1 1 0]; den=[1 -2 2 -1]); f=filter(num,den,delta); stem(f),grid ylabel('\bf f(nT)'),xlabel('\bf nT')
5 4.5 4 3.5
f(nT)
3 2.5 2 1.5 1 0.5 0 0
2
4
6
8
10 nT
12
14
16
18
20
Figure 4: Plot of the periodic sequence f(nT). Useful Hints: The following formulas may be useful and are used quite often N 1 r N 1 (i) r n r < 1 (Finite geometric series) 1 r n 0
(ii)
r
n
n 0
1 r
n
n k k 0
1
1
n
r<1
(Infinite geometric series) n
nk k
(iii) (a+b) = a
2
b where = n(n1)(nk+1)/k! (Binomial expansion) k 3 2
4 3
(iv) (a+b) = a a b + a b a b +
Special case of (iii).
z n (v) Z{ n-k}= ( z ) k 1 k
EE452 Digital Control Dr. Salah Foda
Page 7
Exercises 2: (1) Find the z-transform for the following functions: (a) f(t) = u(tT)K , t 0 (b) f(nT) = u(nT)(0.5)
n
(c) f(t) = e3nT cos(10 nT) u(nT) ( Hint: use the fact that cos(nT) is the real part of ejnT) (d) f(nT) = u(nT)(4)
n+3
(2) Find the initial value f(0) and final value f() for the following single sided z-transforms: (a) F(z) =
2z 1 z 1
(b) F(z) =
2z z 2z 1
(c) F(z) =
z z ( z 1)
(d) F(z) =
10 z 2 2 z (5 z 1) 2 ( z 1)
2
2
(3) Find the inverse z-transform for: (a) F(z) =
3 z e T
(b) F(z) =
4z ( z 4 z 4) ( z 2)
(c) F(z) =
z2 z ( z 0.5)3 ( z 0.25)
2
(4) Find the z-transform for the Fibonacci sequence given by the following recursive equation: x k+2 = xk+1 + xk given x1= x0 =1. i.e. the discrete sequence xk= {1, 1, 2, 3, 5, 8, 13, 21, 34, }. Also find the golden ratio
defined by lim xk+1/xk k
EE452 Digital Control Dr. Salah Foda
Page 8