0% found this document useful (0 votes)
9 views4 pages

ASP Lab 1

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)
9 views4 pages

ASP Lab 1

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
You are on page 1/ 4

Advanced Signal Processing

Departement of electronics and Telecommunications


University of Ouargla , 2024-2025

Lab 1: Z-Transform and Digital Filters

1 Z-transform
The Z-transfer of a sequence x(n) is defined as

x(n)z −n
X
X(z) =
n=−∞

where z is a complex-valued variable from the z-plan. The set of values of z for which
the z-transform converges is called the region of convergence (ROC) of the Z-transform
of the sequence x(n). Digital filters are described by the difference equation
N
X M
X
y(n) + ai y(n − i) = ai x(n − i)
i=1 i=0

The system function H(z) can be easily computed by taking the z-transform on both sides
leading to:
b0 + b1 z −1 + ... + bM z −M B(z)
H(z) = −1 −N
=
1 + a1 z + ... + aN z A(z)
The roots of the denominator of H(z) are called poles and those of the numerator are
called zeros. A system is said to be stable if all of its poles lie inside of a unit circle on
the z-plane.

Example 1: Given a causal system, y(n) = 0.9y(n − 1) + x(n). Determine H(z) and
sketch its pole-zero plot.
1
H(z) = , | z |> 0.9
1 − 0.9z −1
z
H(z) =
z − 0.9
Poles: p=0.9, Zeros: z=0. The pole is inside the unit circle, then the system is stable.
In MATLAB, you can determine the zeros and poles of H(z) using The function tf2zp
to find the poles and the zeros or the function zplane to map the poles and zeros of the
transfer function

Example 2: Given a causal system, y(n) = 0.1y(n − 1) + 0.02y(n − 2) + 2x(n) − x(n − 1).
Determine H(z) and sketch its pole-zero plot.
2 Inverse z-transform
there are two methods to find the inverse of Z-transform,
1. Partial fraction method
first, a partial fraction expansion is performed using the function residuez and
then determining the inverse of each term in the expansion by looking up a table of
z-transforms. Let:
z −1
H(z) = , | z |> 1
3 − 4z −1 + z −2

2. Power series method To find inverse z-transform by power series, one may use the
function impz. It provides the samples of the time-domain sequence, which is
assumed to be causal. Let:
z −1
H(z) = , | z |> 1
3 − 4z −1 + z −2

3 Evaluation of the z-Transform on the Unit Circle


The function freqz can be used to evaluate the values of a rational z-transform on the unit
circle. The evaluation of Z- Transform on a unit circle leads to the Frequency Response
or Fourier Transform.
4 RIR an IIR filters
1. FIR filters

M
X
y(n) = ai x(n − i)
i=1

Suppose you have a filter with coefficients b = [2, 1, 0, 1, 2]. Write the analytical
equation of the filtered signal y(n). Locate the poles and zeros of the transfer
function plot the frequency response

2. IIR filters
N
X M
X
y(n) = − ai y(n − i) = ai x(n − i)
i=1 i=1

Suppose that coefficients b = [2, 1, 0, 1, 2] and a = [3, 2, 1] Write the analytical


equation of the filtered signal y(n). Locate the poles and zeros of the transfer
function plot the frequency response

3. Filtering

X
y(n) = h(m)x(n − m)
m=0

the filter function is used to apply a digital filter to an input signal based on the
filter coefficients a and b.

From the magnitude and phase curves, determine the gain and the phase of the
filter at the specified frequency. Determine manually the filtred signal and compare
it with that obtained using Matlab.
5 Matlab exercises
1. Using Matlab, determine the factored form of the following Z-transforms:

4z 4 + 15.6z 3 + 2.4z 2 + 2.4z − 6.4


H(z) =
3z 4 + 2.4z 3 + 6.3z 2 − 11.4z + 6
24z 4 + 6.4z 3 + 4.9z 2 − 0.1z − 0.6
H(z) =
5z 4 + 15.5z 3 + 31.7z 2 + 22.52z + 4.8
2. Using Matlab, evaluate the inverse Z-transforms of the following z-transforms:

z(z − 1)
Y (z) = | z |> 1
(z + 1)(z + 1/3

4 − 3z −1 + 3z −2
Y (z) = , | z |> 3
(z + 1)(z − 3)2
3. Plot the magnitude and the phase responses of the causal IIR filter

0.0534(1 + z −1 )(1 − 1.0166z −1 + z −2 )


H(z) =
(1 − 0.683z −1 )(1 − 1.4461z −1 + 0.7957z −2

Let x(k) be a signal containing 5 samples:

4. let x(k) be a signal containing 5 samples [0, 1, 1, 0, 1] . We will filter this signal using
a filter described by the the difference equation:

y(n) = 0.5x(n) + 0.5x(n − 2)

Calculate the output of the filter manually (by hand). Then, use the filter function
in MATLAB to perform the filtering and verify your manual calculations.

You might also like