0% found this document useful (0 votes)
13 views68 pages

CMP4101 - 6 Filters Part II

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)
13 views68 pages

CMP4101 - 6 Filters Part II

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/ 68

CMP4101: Digital Signal Processing

Cosmas Mwikirize, Ph.D


Department of Electrical and Computer Engineering, Makerere
University

© Cosmas Mwikirize, 2022

1
Signal Analysis Signal Analysis Signal Analysis
Introduction
in the Time in the in the
-The big picture: Domain Linear Systems The Z
Frequency Frequency
signals and Analysis in the Transform and Window
-Time Domain Domain: Domain:
systems Time Domain: application to Functions
Measurements Fourier Series Implications
-Digital vs Convolution Filters
-Time Domain and Fourier and
Analog signals Transformation applications
Analysis

2
Filters Part II: The Z Transform,
IIR Filters

3
Quote of the day
“What we know is not much. What we do not know is
immense.”
Pierre Simon Laplace (1749-1827)

4
The Z Transform

5
The Z Transform
• Counterpart of the Laplace transform for discrete-time signals
• Generalization of the Fourier Transform
– Fourier Transform does not exist for all signals
• The z-Transform is often more convenient to use
Definition:

Compare with DTFT: X(z ) =  xn z −n

n = −

( ) =  xn e

j − jn
Xe
n = −

• z is a complex variable that can be represented as z=r ej


• Substituting z=ej will reduce the z-transform to DTFT
6
Z transform of
impulse response
h[n] results in a
‘transfer function’

7
Causal: output depends only present and past inputs 8
Example 1

Calculate the transfer function of the FIR filter with impulse


response coefficients given by h[n]={2,0,-3,0,2}

9
Understanding the Z Transform

If we write z in polar form as z= 𝑟𝑒 𝑗𝜔 : r =magnitude, z=angle


+∞

𝐻 𝑧 = ෍ 𝑟 −𝑛 𝑥[𝑛] 𝑒 −𝑗𝜔𝑛
𝑛=−∞

For r=1, this is the Fourier Transform


On a similar line, the Fourier transform, and z-transform of a system can be given as:

10
The Z transform and the complex plane
• The z-transform is a function of the complex z variable
• Convenient to describe on the complex z-plane
• If we plot z=ej for =0 to 2 we get the unit circle

Im ( )
X e j

Unit Circle

r=1
 0
Re 
2 0 2

11
Poles and Zeros

In the z-plane, the contour corresponding to |z| = 1 is a circle of unit radius. This contour is
referred to as the Unit Circle. Also, the z-transform is most useful when the infinite sum can be
expressed as a simple mathematical formula. One important form of representation is to
represent it as a rational function inside the Region Of Convergence.,i.e.

The values of z for which H(z) = 0 are called the zeros of H(z), and the values of z for
which H(z) is  are referred to as the poles of H(z).

A plot of Pole and Zeros of a system on the z-plane is called a Pole-Zero plot.

Usually, a Zero is represented by a 'o'(small-circle) and a pole by a 'x'(cross).

12
Frequency Response from a Pole Zero Plot

The pole-zero plot gives us a convenient way of visualizing the relationship between
the Frequency domain and Z-domain. The frequency response H(e jw ) is obtained from
the transfer function H(z), by evaluating the transfer function at specific values of z =
e jw. Since, the frequency response is periodic with period 2, we need to evaluate it
over one period, such as - <  < . If we substitute these values of  in z= e jw, values
of z lie on the unit circle and range from z = -1 all the way around and back to the
point z = -1. From this the periodicity of 2 in frequency domain corresponds to moving
through an angle of 2 on the unit circle.

13
Convergence of the Z ransform
( ) =  xn e

j − jn
Xe
n = −

• DTFT does not always converge

– Infinite sum not always finite if x[n] no absolute summable


– Example: x[n] = anu[n] for |a|>1 does not have a DTFT

• Complex variable z can be written as r ej so the z-transform

( ) =  xn (re ) ( )
 
X re j − j −n
=  xn r −n e− jn
n = − n = −

• DTFT of x[n] multiplied with exponential sequence r -n


– For certain choices of r the sum maybe made finite

 xn r
n = −
-n


14
Convergence of the Z transform
Pole-Zero plot can be used to determine stability. This can be done with some knowledge
about the region of convergence and frequency response. For a given sequence, the set
of values of z for which the z-transform converges is called the Region of Convergence
(ROC). Using the definition of Z-transform:

15
Example 2
Find the poles and zeros for a system whose transfer function is given by:

16
17
Example 3

18
19
Z-Transform Pairs
Sequence z-Transform ROC

(n) 1 All z
All z except 0 (if m>0)
( n − m ) z −m
or  (if m<0)
1
| z | 1
u (n) 1 − z −1
1
− u (−n − 1) | z | 1
1 − z −1

a n u (n) 1
| z || a |
1 − az −1

− a n u (− n − 1) 1
1 − az −1 | z || a |
Z-Transform Pairs
Sequence z-Transform ROC
1 − [cos 0 ]z −1
[cos 0 n]u (n) | z | 1
1 − [2 cos 0 ]z −1 + z − 2

[sin 0 ]z −1
[sin 0 n]u (n)
1 − [2 cos 0 ]z −1 + z − 2 | z | 1

1 − [r cos 0 ]z −1
[r cos 0 n]u (n)
n
| z | r
1 − [2r cos 0 ]z −1 + r 2 z −2

[r n sin 0 n]u (n) [r sin 0 ]z −1


| z | r
1 − [2r cos 0 ]z −1 + r 2 z −2

a n 0  n  N −1 1− aN z−N
 | z | 0
0 otherwise 1 − az −1
Example 4

22
23
Final Value Theorem
Theorem: If all of the poles of (1 − z )Y ( z ) lie within the unit circle, then
k lim y (k ) = z lim1 ( z − 1)Y ( z )

-0.05

−0.11z −0.11z -0.1


Y ( z) = 2 =
z − 1.6 z + 0.6 ( z − 1)( z − 0.6) -0.15

y(k)
−0.11z -0.2
( z − 1)Y ( z ) |z =1 = |z =1 = −0.275
z − 0.6 -0.25

-0.3

-0.35
0 5 10 15
k

If any pole of (1-z)Y(z) lies out of or ON, the


unit circle, y(k) does not converge!
What Can We Infer from TF?

• Almost everything we want to know


– Stability
– Steady-State
– Transients
• Settling time
• Overshoot
– …
IIR Filters

26
27
28
29
30
31
32
33
34
35
36
Example:

Find and plot the frequency spectrum and the impulse response of a digital linear
Process having the digital Transfer Function:

37
Poles and Zeros

38
Frequency and Phase Spectra

39
40
Poles and Zeros

41
Example

Consider a system whose transfer function is:

Its poles and zeros, magnitude and phase response are shown below:

In order to relate the Pole-Zero plot to the frequency response, the system needs to be
stable. Since, it is not stable for this case, we cannot use this to determine the
frequency response. 42
Example

Consider a system whose transfer function is:

Its poles and zeros, magnitude and phase response are shown below:

In this case, the system is stable and we can relate the pole-zero plot to the frequency
response of the system.
43
44
45
Demo
Denoising an ECG signal

Note that normalized frequency is pi* fc/(fs/2) but in MATLAB, the pi is 46


implied
Demo
Denoising an ECG signal

47
Demo
Denoising an ECG signal

48
Demo
Denoising an ECG signal:
Approach 2

49
50
51
Example: Plot the frequency response curves (in db) obtained from an 8th order low
Pass filter using the Butterworth, Chebyshev Type I and Type II, and Elliptic Filters.
For all filters, the passband ripple should be less than 3dB and the minimum attenuation
Greater than 60dB.

52
53
54
55
56
57
58
59
60
61
62
63
64
Practice Question

a) Explain how the poles and zeros of the discrete time system function H(z) affect the
stability, the gain response and the phase response of the system.
b) A system’s signal-flow graph yields the following difference equation:

𝑦 𝑛 = 𝑥 𝑛 + 𝑥 𝑛 − 1 − 0.81 y[n − 2]

Plot its poles and zeros on the z plane and determine whether it is stable.

65
Practice Question

Solution: A necessary condition for a system to have LTI properties is that it must be
at rest, ie initial conditions of the system must be zero.

66
Practice questions

67
c) Give the range of values for K for which the system is bounded-input bounded-output
(BIBO) stable.

68

You might also like