You are on page 1of 10

Signals, Spectra and Signal Processing

Name:__________________________________
Date Performed: _________________________

Rating:__________________________
Date Submitted: __________________

Signals, Spectra and Signal Processing


THE -TRANSFORM
Activity No. 7
I. INTENDED LEARNING OUTCOMES
1. Use the MathScript RT module of LabVIEW to obtain the poles and zeros of the z-transform of a
signal and plot them on the complex z-plane.
2. Obtain the partial fraction expansion of a function X(z) to aid in the determination of its inverse ztransform.
3. Solve difference equations using z-transform approach.
II. BACKGROUND INFORMATION
The z-transform of the signal x(n) is given by the power series

X(z) =

x(n)z

wherez = re is a complex number. The set of values of z for which X(z) exists (i.e. X(z) is a finite
value) is called the region of convergence. For the z-transform and its ROC, the following can be deduced:
The complex variable z is called the complex frequency given as z = re where r is the
attenuation and is the real frequency.
The ROC of X(z) is defined in terms of the magnitude of z, |z| which means that the shape of the
ROC is an open ring as shown below.

Note that the interior circle may shrink up to the origin while the exterior circle can extend up to
infinity.
The ROC of the z-transform is the exterior of a circle of radius r when |z| > r and the interior
of a circle of radius r when |z| < r . Thus when r > r , the ROCs intersect and X(z) exists in
this region of intersection.

Activity No. 7 The z-Transform

Page 1

Signals, Spectra and Signal Processing

The z-transform will not exist whenr < r since the ROCs will not intersect.
When the magnitude |z| = 1, z = e . Thus if X(z) exists when |z| = 1 (or when the ROC of
X(z) includes the circle in the z-plane whose radius is unity, called the unity circle), the quantity
X e can be computed, which is called the discrete-time Fourier transform of the signal x(n).

The inverse z-transform of a complex function X(z) is given by


1
x(n) =
X(z)z dz
j2
whereC is a counterclockwise contour encircling the circle and lying in the ROC of X(z). However, when
the z-transform is rational, as in most cases, a better method can be developed, called the method of
residues, which is the partial fraction expansion of X(z) and using a table of transform pairs to determine
the inverse.
In this activity, the MathScript RT module of LabVIEW will again be used to analyze systems in zdomain, in particular, obtaining the poles and zeros of the system and relating that to the frequency
response of the system. This is essential in the design of frequency-selective systems, or filters by poleand-zero placement in the complex z-plane. The MathScript node will also be used to obtain the partial
fraction expansion of a given X(z) that will aid in the determination of its inverse.
III. LEARNING ACTIVITIES
Activity 7.1 The z-transform and the poles and zeros of X(z)
1. Build the following BD and FP of act07-01.vi. This VI will plot the function in the time-domain using the
filter coefficients b and a and compute for the poles and zeros of the z-transform and plot them on the
complex z-plane.

Activity No. 7 The z-Transform

Page 2

Signals, Spectra and Signal Processing

The vectors b and a are 1D complex double arrays (CDB 1D). These are the coefficients of the
numerator and the denominator, respectively, of the z-transform X(z) when arranged in
decreasing powers of z.
The MathScript node is used to implement the function of the VI. It computes the values of the
signal, places it on the vector h and plots the function on a separate window. Then it computes the
poles and zeros of the z-transform, places them onthe vector p and z, respectively and plots them
on the complex z-plane on another separate window.
The output of the vectors p and z are converted to the polar form using the Complex to Polar VI
and then transposed. The output is displayed on a 2D array named poles (mag/arg) and zeros
(mag/arg) respectively. Choose the Add Dimension option in the shortcut menu of the array in the
FP to make the array two-dimensional. The magnitude of the poles and zeros is placed on the first
column, while the argument or angle on the second column.
The array Signal x(n) is a one-dimensional array, while the gain is a scalar numerical indicator.

2. Save the VI. To plot the signal x(n) = u(n), whose z-transform is X(z) =

, form the vectorsb

and a by having the coefficients of zarranged in decreasing powers of z. In this case,b = [1]and a =
[1 1]. Place this on the b and a arrays on the FP, then run the VI.

Activity No. 7 The z-Transform

Page 3

Signals, Spectra and Signal Processing


Question: What are the poles and zeros of the signal ( )? Draw the pole-zero plotand the timedomain waveform of this signal. Does this result agree with the results of manual calculations?
Verify.
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
Poles and Zeros

Pole-Zero Plot

Time-Domain Waveform

Question: Complete the table below for a given signal ( ).


Signal
Poles and zeros
Time-Domain Waveform
x(n) = (0.9) u(n)

-transform

Activity No. 7 The z-Transform

Pole-Zero Plot

Page 4

Signals, Spectra and Signal Processing


Signal

x(n) = cos

Poles and zeros

Time-Domain Waveform

n u(n)
4

Pole-Zero Plot

-transform

Signal

x(n) = (0.9) cos

Poles and zeros

Time-Domain Waveform

u(n)
4

-transform

Pole-Zero Plot

Question: In the second signal of the table above, what can be said about the angular frequency of
oscillation
of the sinusoid and the argument of the poles? Change the value of the angular
frequency and observe its relationship with the argument of the pole. Generalize your observations.
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________

Activity No. 7 The z-Transform

Page 5

Signals, Spectra and Signal Processing


Question: What does the following MathScript functions do: impz, stem, eqtflength, tf2zp
and zplane?
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
Activity 7.2 Inverse z-transform via the method of residues.
1. Create the VI act07-02.vi. This will compute the partial fraction expansion of a rational X(z) given the
coefficients of z in decreasing powers. Build the FP and the BD as shown.

Activity No. 7 The z-Transform

Page 6

Signals, Spectra and Signal Processing

The arrays b and a are one-dimensional arrays which are the coefficients of the powers of z
arranged in decreasing powers of the numerator and denominator respectively.
The arrays r and p are complex, one-dimensional arrays which represent the residues and the
poles respectively. The array k is a real one-dimensional arrays which represent the direct terms
arranged in decreasing powers of z.
The MathScript function residuez returns the residues, poles and direct terms of the partial
fraction expansion of X(z) =
X(z) =

( )
( )

B(z)
r
=
A(z) 1 p z

or
r
1p z

++

r
1p z

+k +k z

If there are poles p with multiplicity m, the expansion includes the terms
r
1 pz

r
(1 p z

++

r
(1 p z

The direct terms k , k , k , is nonzero when the highest power of z in the numerator is
greater than the denominator (in this case, the rational X(z) is said to be improper). These terms
can be obtained through long division by eliminating the powers of z higher than that of the
highest power of z in the denominator.
2. Save the VI. Obtain a partial fraction expansion for the function

X(z) =

1 + 3z

1+ z

+ z

+ z

by defining first the arrays b and a, typing them in the VI and running the VI.
Question: Is the function proper or improper? Explain.
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________

Activity No. 7 The z-Transform

Page 7

Signals, Spectra and Signal Processing


Question: Write the partial fraction expansion for the given -transform above.
Partiial fraction expansion for X(z) =

3. Use the VI and the table of z-transform pairs to obtain the inverse of a given z-transform.
Question: Complete the table below. Verify the answers using hand calculations.
-transform
Inverse -transform
X(z) =

1
1 1.5z

X(z) =

X(z) =

+ 0.5z

1+z
1 z + 0.5z

(1 + z

1
)(1 z

4. Use the VI act07-01.vi to plot the poles and zeros on the complex z-plane as well as the time-domain
behavior of the signals.

Activity No. 7 The z-Transform

Page 8

Signals, Spectra and Signal Processing


Question: Using the VI act07-01.vi, display the time-domain waveform and the pole-zero plot of the
signals whose -transforms are given in Question in step 3.
Pole-Zero Plot

Time-Domain Behavior

IV. CONCLUSIONS
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________

Activity No. 7 The z-Transform

Page 9

Signals, Spectra and Signal Processing


V. MACHINE PROBLEM
Create a VI that will solve a difference equation using the z-transform approach. The VI must accept inputs
for the coefficients of the difference initial conditions, different forms of input (constant, real exponential,
sinusoidal) together with the required parameters, and the range for which the output will be computed. The
VI must display (in tabular or array form) and plot the following outputs:

Zero-input and zero-state responses


Total response
Impulse and step responses

An option for more interactivity, such as allowing the user to change the parameter/s of the input must be
added. Call the VI for this machine problem macpro07.vi.
VI. REFERENCES
Kehtarnavaz, N. & Kim, N. (2005).Digital Signal Processing System-Level Design Using LabVIEW.Oxford,
United Kingdom: Elsevier, Inc.
Proakis, J. &Manolakis D. (2006). Digital Signal Processing: Principles, Algorithms and Applications 4th
Edition. New Jersey, USA: Prentice-Hall.
Ingle, V. &Proakis, J. (1997).Digital Signal Processing Using MATLAB V.4. Boston, New York: PWS
Publishing Company.

Activity No. 7 The z-Transform

Page 10

You might also like