0% found this document useful (0 votes)
3 views14 pages

Exp03

The document outlines the laboratory experiment for EEE 312, focusing on the Z-transform and its applications in digital signal processing. It covers the definition, properties, and MATLAB functions related to Z-transforms, inverse Z-transforms, and system analysis through stability and causality. Additionally, it includes pre-lab exercises and examples to reinforce understanding of the concepts presented.

Uploaded by

rakibbhuiyan07
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views14 pages

Exp03

The document outlines the laboratory experiment for EEE 312, focusing on the Z-transform and its applications in digital signal processing. It covers the definition, properties, and MATLAB functions related to Z-transforms, inverse Z-transforms, and system analysis through stability and causality. Additionally, it includes pre-lab exercises and examples to reinforce understanding of the concepts presented.

Uploaded by

rakibbhuiyan07
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Digital Signal Processing 1 Laboratory EEE 312

BANGLADESH UNIVERSITY OF ENGINEERING AND TECHNOLOGY


DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING,
DHAKA-1000, BANGLADESH.

COURSE NO.: EEE 312

Experiment No. - 3

Z-transform and Its Application

The Z-transform plays the same role in the analysis of discrete time signals and LTI systems
as the Laplace transform does in the analysis of continuous-time signals and LTI systems.
The use of z-transform techniques permits simple algebraic manipulations. The Z-transform
has become an important tool in the analysis and design of digital filters. In this experiment,
different features of Z-transform have been discussed through various examples and pre-lab
work exercises. At the end of this experiment, one will be able to perform Z transformation,
inverse Z transform, system analysis through stability and causality.

Pre Lab Concerns:


ƒ Read this lab description carefully before coming to the laboratory class,
so that you will know what is required.
ƒ Try to follow the lecture notes of EEE 311.
ƒ Try to practice the Pre Lab exercises before coming to class.
ƒ The problems that will be given in the class may differ from the given ones
but they will certainly cover the syllabus.
ƒ You will be able to solve the problems in lab if you do practice before coming to
class.
ƒ Do not bring any prepared MATLAB code in the lab with any portable
device.
Used Functions:
ztrans(), iztrans(), conv(), residuez(), impz(), filter(), zplane(),zp2sos(),tf2zp()

&
SPTOOL
©Dept of EEE 32
Digital Signal Processing 1 Laboratory EEE 312

Part – A
Z - transform

The Z-transform of a discrete time signal x(n) is –


n f
X ( z) ¦ x ( n) z
n f
n

where, z is a complex variable. Since z-transform is an infinite series, it exists only for those
values of z for which this series converges. The region of convergence (ROC) of X(z) is the
set of all values of z for which X(z) attains a finite value.

Example:
x(n) is a finite duration signal like -

x ( n) ^1,2,5,7,0,1` .

Its z transformed signal, X ( z ) 1  2 z 1  5 z 2  7 z 3  z 5 , its ROC is entire Z-plane


except z=0.

For x(n) ^1,2,5,7,0,1` , its z transformed signal is X ( z ) z 2  2 z  5  7 z 1  z 3 , here its


ROC is entire Z-plane except z=0 and z= f .

Z transform of different functions:

Sequence Transform ROC

[n] 1 all z
u[n] z/(z-1) |z|>1
-u[-n-1] z/(z-1) |z|<1
 [n-m] z-m all z except 0 if m>0 or if m<0
anu[n] z/(z-a) |z|>|a|
-anu[-n-1] z/(z-a) |z|<|a|
nanu[n] az/(z-a)2 |z|>|a|
-nanu[-n-1] az/(z-a)2 |z|<|a|
[cos0n]u[n] (z2-[cos0]z)/(z2-[2cos0]z+1) |z|>1
[sin0n]u[n] [sin0]z)/(z2-[2cos0]z+1) |z|>1
[rncos0n]u[n] (z2-[rcos0]z)/(z2-[2rcos0]z+r2) |z|>r
[rnsin0n]u[n] [rsin0]z)/(z2-[2rcos0]z+r2) |z|>r
anu[n] - anu[n-N] (zN-aN)/zN-1(z-a) |z|>0

MATLAB representation:

©Dept of EEE 33
Digital Signal Processing 1 Laboratory EEE 312

For representing a signal like this X ( z ) 1  2 z 1  5 z 2  7 z 3  z 5 in MATLAB, we just


have to put the coefficients of the polynomial like -
x=[1,2,5,7,0,1];
For converting the time domain signal into equivalent Z domain ztrans() function can be
used which is part of the symbolic toolbox. It evaluates signals of the form x[n]u[n], i.e. for
non-negative values of n.

Example
To find a Z transform of a function, for example, anu[n], we have to write following codes –
>> syms a n f;
>> f=a^n;
>> ztrans(f)

Note that there is also the iztrans() function which performs inverse Z transform.

Pre-Lab Exercise – A.1:


Find the Z transform for the signals listed in the above table and verify with the given results.

Properties of Z transform:

Properties
Uniqueness

Homogeneity

Additivity

Shifting

Convolution

Among different properties of z-transform, convolution property is an important one. It


removes the complexity of doing convolution, because this property transforms the time
domain convolution into a multiplication of two functions.

©Dept of EEE 34
Digital Signal Processing 1 Laboratory EEE 312

Pre-Lab Exercise – A.2:

Let X 1 ( z ) 2  3z 1  4 z 2 and X 2 ( z ) 3  4 z 1  5 z 2  6 z 3 . Determine


X 3 ( z ) X 1 ( z ) X 2 ( z ) . Use conv() function to obtain the result and verify the result
theoretically.

Part – B
Inverse Z-transform

The inverse Z-transform is the conversion of Z-domain signal into time domain signal. The
inversion can be done by Cauchy’s Integral theorem, long division process, partial fraction
expansion etc.

I) Partial fraction expansion:


Suppose a function X(z) is given in Z-domain.

b0  b1 z 1  b2 z 2    bM z  M B( z )
X ( z)
1  a1 z 1  a 2 z  2    a N z  N A( z )

To convert it in the time domain, it is expressed as

b0  b1 z 1  b2 z 2    bN 1 z  ( N 1) M  N
X ( z) 1 2 N
 ¦ C k z k , where, M t N
1  a1 z  a 2 z    a N z k 0

Then performing partial fraction expansion on the proper rational part of X(z) to obtain

N
Rk M N
X ( z) ¦1 p
k 1 z 1
 ¦C
k 0
k z k
k

Now the time domain signal x(n) is –

1 ª º M N
N
1
x ( n) ¦ R k Z «
1  p z 1 »
 ¦ C k G (n  k )
k 1 ¬ k ¼ k 0

MATLAB representation:
A MATLAB function residuez() is available to compute the residue part and the direct terms
of a rational part in z 1 . [R, p, C] = residuez(b,a) finds the residues, poles and direct terms of
X(z) in which two polynomial B(z) and A(z) are given in two vectors b and a.

©Dept of EEE 35
Digital Signal Processing 1 Laboratory EEE 312

Pre-Lab Exercise – B.1:


1. A function X(z) is given below.
z
X ( z)
3z  4 z  1
2

Find the residue, poles and direct terms of it from the function and hence determine the
inverse of X(z) manually. Verify your result using iztrans().

II) Long Division:

For causal sequences, the Z-transform X(z) can be expanded into power series in z 1 . In
series expansion, the coefficient multiplying by z  n is then the nth sample x[n]. For a rational
X(z), a convenient way to determine the power series is to express the numerator and the
denominator as polynomials in z 1 , and then obtain the power series expansion by long
division.

MATLAB representation:
By using impz() function we can get the sampled values in time domain from an analogous
Z-domain function. Same process can be done by using a filter() function, where the input
will be an impulse function.

Pre-Lab Exercise – B.2:


1. The transfer function of a causal system is given by

1  2.0 z 1
H ( z)
1  0.4 z 1  0.12 z  2

Determine the first 10 coefficients of the impulse response of this system.

Part – C
Pole – zero plot & ROC for different cases

The poles are those values for which the system transfer function becomes infinite. These are
the roots of the denominator of a transfer function.

©Dept of EEE 36
Digital Signal Processing 1 Laboratory EEE 312

The zeros are those values for which the system transfer function becomes zero. These are
the roots of the numerator of a transfer function.

The pole zero plot of a system provides information about the system behavior.

MATLAB representation:

With the function zplane(), the pole zero plot can be obtained from which we can get the
information of system behavior.

Example:
1
For a transfer function of H ( z ) ,
1  0.9 z 1
if we write MATLAB code like –

>> b=[1 0];


>> a=[1 -0.9];
>> zplane(b,a)
the pole zero plot will be –

Pole Zero plot

0.8

0.6

0.4
Imaginary Part

0.2

-0.2

-0.4

-0.6

-0.8

-1

-1 -0.5 0 0.5 1
Real Part

ROC :

x The ROC of a causal signal is the exterior of a circle of radius D .


x The ROC of an anticausal signal is the interior of a circle E .
x The ROC of a noncausal signal is a ring (annular region) in the Z-plane.

Pole location and time domain behavior for causal signals


©Dept of EEE 37
Digital Signal Processing 1 Laboratory EEE 312

Causal real signals with real poles or simple complex conjugate pair of poles, which are
inside or on the unit circle are always bounded in amplitude. On the other hand, if they are
outside the unit circle then the signals become unbounded.

Effect of single pole:

Effect of real poles:

Effect of complex conjugate pair of poles:

©Dept of EEE 38
Digital Signal Processing 1 Laboratory EEE 312

Effect of multiple poles:

Multiple real poles:

©Dept of EEE 39
Digital Signal Processing 1 Laboratory EEE 312

MATLAB representation:
From the above discussion it is known that different systems provide different impulse
responses depending on their pole zero location. That’s why different signals can be
generated from those defined systems.

For a ramp signal we see that the signal should have 2 positive real poles on the unit circle.
So define a system transfer function which will contain 2 positive real poles. Then obtain the
impulse response of that system.

>> num=[1 0 0];


>> den=[1 -2 1];
>> [h,t]=impz(num,den,100);
>> stem(h)

RAMP signal
100

90

80

70

60

50

40

30

20

10

0
0 10 20 30 40 50 60 70 80 90 100

Using sptool for system design:

On the MATLAB command prompt type sptool to start the filter design tool. Click New
Design, set Algorithm to Pole/Zero Editor, and delete all current poles and
zeros by pressing Delete All. To be able to watch the frequency response simultaneously
©Dept of EEE 40
Digital Signal Processing 1 Laboratory EEE 312

while adding/moving/deleting poles/zeros, you should also open the View window from
the small parent window (“Filters” specification is in the middle column). After adding a set
of poles/zeros you can also observe the impulse response and step response for that particular
design.

Pre-Lab Exercises – C.1:


Design a system whose impulse response gives a digital oscillation.

Pre-Lab Exercises – C.2:


Design a simple low pass and a high pass filter.

Causality and stability:


x An LTI system is causal if and only if the ROC of a system transfer function is
the exterior of a circle of radius, r  f .
x An LTI system is BIBO stable if and only if the ROC of the system transfer
function includes the unit circle.

So a causal LTI system is BIBO stable if and only if all the poles of H(z) are inside the unit
circle.

MATLAB representation:

The inversion process can be done by any of the above described methods. The function
zp2sos() can be used to convert the z-domain transfer function into the factored form
whereas tf2zp() can be used to obtain poles, zeros and gain constant.

Pre-Lab Exercise – C.3:


Determine the system function and the response for a) unit step b) unit impulse input
described by the difference equation- (assume a causal LTI system)

y ( n) y (n  1)  x(n)

©Dept of EEE 41
Digital Signal Processing 1 Laboratory EEE 312

Looking only the pole-zero plot of Y(Z), state whether the system will be stable.
Comment on ROC.

Pre-Lab Exercise – C.4:

Determine the system function and the unit sample response for a stable LTI system
described by the difference equation-

1 1
y ( n) y (n  1)  x(n)  x(n  1)
2 3
Comment on ROC.

Pre-Lab Exercise – C.5:

An LTI system is characterized by the system transfer function


3  4 z 1
H ( z)
1  3.5 z 1  1.5 z  2

Specify the ROC of H(z) and determine h(n) for the following conditions:

(a) The system is causal, (b) The system is anticausal, & (c) The system is noncausal.

For which case, the system is stable?

Pre-Lab Exercise – C.6:

Express the following z – transform in factored form, find its poles and zeros, plot the poles,
zeros and then determine its ROCs for causal cases, anticausal case and noncausal case. (
Here take the coefficients as the inputs from the keyboard. )

2 z 4  16 z 3  44 z 2  56 z  32
G( z)
3z 4  3z 3  15 z 2  18 z  12

Pole zero cancellation:


When a Z-transform has a pole that is at the same location as a zero, the pole is cancelled by
zero, consequently, the term containing that pole in the inverse z term vanishes. This pole
zero cancellation can occur either in the system function itself or in the product of the system
transfer function with the z-transform of the input signal.

©Dept of EEE 42
Digital Signal Processing 1 Laboratory EEE 312

Pre-Lab Exercise – C.7:

Determine the system function and the output response for the causal system described by the
difference equation-

5 1
y ( n)
y (n  1)  y (n  2)  x(n)
6 6
1
where, x(n) G (n)  G (n  1)
3

Is it possible to reconstruct the original system response from the output response?

Pre-Lab Exercise – C.8:

An LTI system is given by


z2
z 2  2.5 z  1

Make the system stable assuming the system (a) causal and (b) anticausal.

Part – D
Higher order stability testing

For testing the stability of a higher order transfer function, a famous method called Schür
Cohn stability test is used.

The transfer function of a system is –


B( z )
H ( z)
A( z )

The denominator polynomial of the system transfer function is –

A( z ) 1  a1 z 1  a 2 z 2    a N z  N

By denoting this denominator with a polynomial of degree m –

m
Am ( z ) ¦a
k 0
m (k ) z  k and a m (0) 1

©Dept of EEE 43
Digital Signal Processing 1 Laboratory EEE 312

The reciprocal or reverse polynomial of B m (z ) are the same as those of Am (z ) , but in the
reverse order. In the Schür Cohn stability test, to determine a set of coefficients, called
reflection coefficients, K 1 , K 2 ,  K N from the polynomials Am (z ) . First, we set
AN ( z ) A( z )
and
K N a N (N )
Then we compute the lower-degree polynomials Am (z ) , m = N, N-1, N-2, ……., 1,
according to the recursive equation

Am ( z )  K m Bm ( z )
Am 1 ( z )
1  K m2
where the coefficients K m are defined as
Km a m (m)

The Schür Cohn stability test states that the polynomial A( z ) has all its roots inside the unit
circle if and only if the coefficients K m satisfy the condition K m  1 for all m = 1, 2, …..,
N.

Pre-Lab Exercises – D:
Write a generalized program in MATLAB which takes the coefficients of the denominator of
a system transfer function as input and tests the system stability by Schür Cohn stability test
method.

Algorithm:

x Take the inputs from the user.


x Set a N (k ) a k for k 1,2,  , N
x Set K N a N (N )
x Then for m N , N  1,  ,1 , compute K m a m (m) where a m 1 (0) 1
a m ( k )  K m bm ( k )
x Then compute a m 1 (k ) , k 1,2,  , m  1
1  K m2
where bm (k ) a m (m  k ) , k 0,1,  , m

References:
3) Proakis & Manolakis, “Digital Signal Processing: Principles, Algorithms and
Applications.”, Chapter 1, 3rd Edition , Prentice Hall Ltd.

©Dept of EEE 44
Digital Signal Processing 1 Laboratory EEE 312

4) Ingle & Proakis, “ Digital Signal Processing using MATLAB ”, Edition 2000
Thomson-Brooks/Cole Co Ltd.

5) Sanjit K. Mitra, “Digital Signal Processing – A Computer based approach” ,


TATA McGraw –Hill Edition.

-----------------------------------------------------------------------------------------------------------
The laboratory tutorial of this experiment is prepared by –
Imtiaz Ahmed
Lecturer, Dept. of EEE, BUET.
&
Shankhanaad Mallick
Lecturer, Dept. of EEE, BUET.

Under the supervision of –


Dr. Md. Kamrul Hasan
Professor, Dept. of EEE, BUET.

June 30, 2007

©Dept of EEE 45

You might also like