Sie sind auf Seite 1von 75

Digital Signal & Image Processing

Lecture-8
Dr Muhammad Arif
m.arif@faculty.muet.edu.pk
https://sites.google.com/site/mdotarif/teaching/dsip
Overview

Discrete Time Fourier Transform (DTFT)


Properties of DTFT
Frequency Response & Difference Equation
Frequency Response & Transfer Function
Frequency Response & Impulse Response
System Output in the Frequency Domain
Frequency Response & Filter Shape
Properties of Magnitude & Phase Reponses
Filters Shape from Poles & Zeros
Discrete Time Fourier Transform

The discrete time Fourier transform (DTFT) is a frequency


domain tool used to find the spectrum X() of a signal x[n] (or
the frequency response H() of a system.

The frequency response H() of a system is composed of two


parts, the magnitude response and phase response.

This is a consequence of the fact that the frequency response


is a complex number and therefore can be written in polar
form, using magnitude and phase.

The magnitude response gives the shape of a filter and the


greatest insight into the way the filter behaves. 3
Discrete Time Fourier Transform

The DTFT of the impulse response h[n] of the system is


defined as

Where H() is the frequency response of a system.

4
Discrete Time Fourier Transform

The discrete time Fourier transform (DTFT) of a signal [] is

where is the digital frequency (in radians) defined as

The DTFT of a signal [] is denoted as

5
Discrete Time Fourier Transform

Example-1: Find the DTFT of the signal.

Solution
Only the four nonzero samples
at = 0, 1, 2 and 4 are contributing
to the transform.

= []
=

= 2 + 3 2 + 4
6
Discrete Time Fourier Transform

Example-2: Find the DTFT of the signal.


x[n] = 4(u[n] u[n-3])

Solution
The signal [] can be written as

= []
=

= + +

7
Discrete Time Fourier Transform

Since =
= []

Where = cos n sin n


Therefore

= [] cos n sin n
=
The transform X() is different at each different digital frequency .
It is largest when the signal x[n] resonates with the sinusoids cos(n)
or sin(n).
That is., the X() is largest when signal x[n] varies at nearly the same
frequency .
The product of the cosine signal x[n] with other cosines is largest when
the signals are most similar as shown in the next slides. 8
Discrete Time Fourier Transform

Signal Resonance for the Discrete Time Fourier Transform

9
Discrete Time Fourier Transform

Signal Resonance for the Discrete Time Fourier Transform

10
Discrete Time Fourier Transform

Signal Resonance for the Discrete Time Fourier Transform

11
Discrete Time Fourier Transform

Signal Resonance for the Discrete Time Fourier Transform

12
Properties of DTFT

The two important properties of DTFT are

1. Time delay or Time shifting


2. Periodicity

13
Properties of DTFT

1. Time delay or Time shifting

14
Properties of DTFT

A delay of M steps in the time domain appear in the DTFT


domain as a complex exponential. That is,

For example, when delay M = 1

15
Properties of DTFT

This delay property of DTFT also makes conversion from a


difference equation to a frequency response H() very
straightforward.
In practice, the process is accomplished most easily by using
the transfer function H(z) as an intermediate step.

y[n] + a1y[n-1] + a2y[n-2] + = b0x[n] + b1x[n-1] + b2x[n-2] +

16
Properties of DTFT

2. Periodicity

Consider (+2)

17
Properties of DTFT

The DTFT is periodic with a period of 2.

So the magnitude and phase responses also repeat with the


period of 2.

The DTFT tests a signal against an infinite number of


frequencies and measures how well an impulse response (or
signal) resonates with each frequency.

When the test frequency is close to the frequency of the


impulse response (or signal), the DTFT produces a strong
response. Otherwise it produces a weak response.

18
Frequency Response & Difference Equation

The general form of a difference equation is

or

It can be transformed into the frequency domain by taking the


DTFT of each term.

19
Frequency Response & Difference Equation

20
Frequency Response & Difference Equation

Example-3: Find the frequency response that corresponds to the


difference equation

Solution

Taking term by term DTFT

21
Frequency Response & Transfer Function

22
Frequency Response vs. Transfer Function

The frequency response H() is a ratio of output to input in


the Discrete Fourier frequency domain.

The transfer function H(z) is a ratio of output to input in the z


frequency domain.

23
Frequency Response & Impulse Response

The frequency response () and the impulse response []


are related as

So the frequency response () is the DTFT of the impulse


response [].

24
Frequency Response & Transfer Function

Example-4: Find an expression for the frequency response of the


filter with transfer function

Solution

we get the frequency response by replacing z with ej

25
Frequency Response & Impulse Response

Example-5: The impulse response for a digital filter is

Find an expression for the frequency response of the filter.

Solution
The frequency response is the DTFT of the impulse response and
can be computed as

26
System Output in the Frequency Domain

27
System Output in the Frequency Domain

The DTFT of the systems output Y() may be calculated from the
frequency response H() and the DTFT of the input X() as
follows:

The frequency response analyzes a systems behavior in terms of


its individual frequencies, this equation is normally only used
when the input x[n] is sinusoidal.

x[n] = Acos(nW0 + qX)

with the short form notation AqX.

28
System Output in the Frequency Domain

At the frequency W= W0, the system has a gain H and a phase


difference q, that is
H(W0) = Hq
then the output from the filter is
Y(W) = (Hq AqX
Y(W) = q + qX)

In the time domain, this equates to


y[n] = HAcos(nW0 + q + qX)

Thus, when the input to a linear filter is a sinusoid, the output is


a sinusoid at the same digital frequency, but with a different
amplitude and phase. 29
System Output in the Frequency Domain

30
System Output in the Frequency Domain

31
Frequency Response & Filter Shape

The magnitude response of a filter is a collection of the gains of the


filter over all frequencies.

It is a plot of filter gain |H(W)| versus digital frequency W in radians.

The magnitude response gives the shape of the filter.

The phase response is a collection of the phase differences over all


frequencies.

It is a plot of phase difference q(W) versus digital frequency W in


radians.

Both the magnitude response and the phase response are smooth
functions of frequency.
32
Frequency Response & Filter Shape

The magnitude response is an even function, that is,


|H(-W)| = |H(W)|

33
Frequency Response & Filter Shape

The phase response is a odd function, that is,


q(-W) = -q(W)

34
Frequency Response & Filter Shape

The gains are expressed either in linear form, |H(W)|, or in logarithmic form
in decibels, 20log|H(W)| dB.

The phases q(W) are expressed either in degrees or radians.

It is often useful to re-express the values along the horizontal frequency


axis as analog frequencies in Hz instead of digital frequencies in radians.

The equation

can be re-arranged to give the formula needed for the conversion:

35
Frequency Response & Filter Shape

Sampling Frequency Unknown

Magnitude Response Phase Response

36
Frequency Response & Filter Shape

Sampling Frequency of 12 kHz

Magnitude Response Phase Response

37
Frequency Response & Filter Shape

Example-6: Frequency response of a system is

Find and sketch the magnitude and phase response for the
system. Cover a range of digital frequencies from to 3.

Solution
According to the Euler Form
ej = cos +jsin

1
=
1 0.4 cos W sin W
38
Frequency Response & Filter Shape

1
=
1 0.4 cos W sin W
1
=
1 0.4 cos W + 0.4 sin W
When W = 0
1 1
0 = = = 1.666
1 0.4 cos 0 + 0.4 sin 0 1 0.4 1 + 0

When W = /4
1
/4 =
1 0.4 cos /4 + 0.4 sin /4
1 0.71 0.28
= = 1.24 0.49 = 1.2972 0.3757
0.71 + 0.28 0.71 0.28

39
40
Frequency Response & Filter Shape

Magnitude Response

41
Frequency Response & Filter Shape

Phase Response

42
Magnitude & Phase Reponses
(Linear & Logarithmic Scales)

43
Properties of Magnitude & Phase Reponses

The magnitude and phase responses are periodic, and they repeat
every 2 radians.

This periodicity holds for all DTFTs.

Both magnitude and phase responses are continuous functions


(they have values for every value of frequency).

The magnitude response is an even function. The portion to the


left of the zero is a perfect mirror image of what lies to the right of
zero, that is,

This is true for all magnitude responses. 44


Properties of Magnitude & Phase Reponses

The phase response is an odd function.

This is true for all phase responses.

Normally, there is no need to record the part of the magnitude and


phase responses to the left of = 0: This potion can be deduced
from the plot for > 0.

Furthermore, there is no need to consider values of above.

The frequency responses of the filters are usually plotted for values
0 .

The advantage of using decibels is that a that an extremely large


range of gains , from very large to very small, can be conveniently
plotted on same graph. 45
Frequency Response & Filter Shape

The filter shape for a digital filter is furnished by its magnitude response.

LOW PASS FILTER

46
Frequency Response & Filter Shape

HIGH PASS FILTER

47
Frequency Response & Filter Shape

BAND PASS FILTER

48
Frequency Response & Filter Shape

BAND STOP FILTER

49
Frequency Response & Filter Shape

Example-7: Sketch the frequency response of the system.

. W
W =
+ . W

Solution

Computing the frequency response with a step size of W = /4

50
Frequency Response & Filter Shape

51
Frequency Response & Filter Shape

Magnitude Response Phase Response

52
Frequency Response & Filter Shape

Example-8: Find and sketch the frequency response of the filter


whose impulse response is
h[n] = [n] 1.25 [n-2]
Plot phases in degrees and linear gains.

Solution

The frequency response is given by

W = 1 0.25 2W

Magnitude and phase responses are calculated in the table.

53
Frequency Response & Filter Shape

54
Frequency Response & Filter Shape

Magnitude Response Phase Response

55
Frequency Response & Filter Shape

Example-9: the difference equation describing a digital filter is


y[n] = 1.5y[n-1] 0.85y[n-2] + x[n]
Find and sketch the frequency response. Plot phases in degrees
and gains in decibels.

Solution

The frequency response is given by

1
W =
1 1.5 W + 0.85 W

Magnitude and phase responses are calculated in the table.

56
Frequency Response & Filter Shape

57
Frequency Response & Filter Shape

Magnitude Response Phase Response

58
Frequency Response & Filter Shape

A filter is considered to pass signals where the gain is at least


0.707 of its maximum value.

This is equivalent to a gain of 3 dB below maximum.

In other words, when the maximum gain of a filter is 1, or 0


dB, the edge of the pass band occurs where the gain is 0.707,
or -3 dB.

The shape of a digital filter can be designed independent of


sampling frequency.

The sampling frequency chosen will, however, determine the


range of input frequency over which filter will act.
59
Frequency Response & Filter Shape

When sampling rate is known, the frequency axis can be


plotted in terms of analog frequency in Hertz instead of
digital frequency in radians.

It is often easier to understand filter behavior in this way.

As we know that

With this conversion, nothing in frequency response diagram


changes except labelling of the horizontal axis.

But the choice of sampling frequency has an enormous


impact on the effect of the filter.
60
Frequency Response & Filter Shape

Example-10: A filter with frequency response shown in the


following figure is used in a digital filter with a 12 kHz sampling
frequency.

a) Plot the frequency response against analog frequency in Hz


instead of digital frequency in radians.

b) What is the bandwidth of the low pass filter in Hz.

c) What is the bandwidth if the sampling frequency is changed to


30 kHz.

61
Frequency Response & Filter Shape

62
Frequency Response & Filter Shape

a) Plot the frequency response against analog frequency in Hz instead


of digital frequency in radians.
Digital Frequencies: 0 to radians
Analog Frequencies: 0 to Fs/2 Hz
b)
The bandwidth is the range of frequencies passed by the filter.
For a low pass filter, this corresponds to the frequency where the
gain drops by 3 dB from its low frequency value.
For the magnitude response in figure (on previous slide), this occurs
at a frequency of 1800 Hz.

c) If the sampling frequency were changed to 30khz, frequencies of


interest would range from 0 to 15 kHz, and bandwidth would
become 4500 Hz.
63
Filters Shape from Poles & Zeros

When the poles and zeros of a filter are known, the filters
shape can be estimated without computing the frequency
response first.

For a digital frequency , the smaller the distance between


ej and a zero, the smaller the gain at that frequency.

Similarly, the smaller the distance between ej and a pole, the


greater the gain at that frequency.

64
Filters Shape from Poles & Zeros

Thus a filter with a single pole at z = 0.99 has its largest gains
at low frequencies , which describes a low pass filter.

Conversely, a filter with a single pole at z = -0.99 has its largest


gains at high frequencies , which describes a high pass filter.

The closer the zeros and poles are to the unit circle, the more
selective the filter, that is, the steeper the transition between
the pass band and stop band regions.

65
Filters Shape from Poles & Zeros

Point which is moving on unit circle according to the different


values of frequency is
ej = cos +jsin
Or in ordered pair form (cos, sin)

As the frequency increases from 0 to radians, the point


(cos, sin) will travel through unit circle from (1,0) to (-1,0).

The pole P is defined as a complex number


+ j
Or in ordered pair form ( , )

66
Filters Shape from Poles & Zeros

The filters shape can be computed as

0 1
=
0 1

Where the distance between the point ej and pole P and can
be computed as
ej P = (cos +jsin) ( + j)
67
Filters Shape from Poles & Zeros

For a digital frequency between 0 and radians, the closer


ej is to a pole of a filter, and further ej is to a zero, the larger
the magnitude tends to be.

A pole close to the unit circle leads to a filter shape with an


extremely large magnitude at some frequency.

A zero close to the unit circle leads to a filter shape with a


small magnitude at some frequency.

Extremely large and small magnitudes tend to signal filters


that are very selective.

68
Filters Shape from Poles & Zeros

Example-11: Deduce the filter shape describe by the transfer function.



=
.
Solution
This filter has a single pole at z = 0.45, with no zeros, and a unity gain.

1
() =
(0.45,0)

The distance between the point ej and


pole is smaller near = 0, and largest at = radians.

Since the magnitude of the filter is reciprocal to the this


distance, the magnitude is largest near =0, and smallest at = rad. 69
Filters Shape from Poles & Zeros

70
Filters Shape from Poles & Zeros

Filter Shape

71
Filters Shape from Poles & Zeros

Example-12: Deduce the filter shape describe by the difference


equation.
= + [ ]
Solution
The transfer function of the filter is

2 + 1
=
3

This filter has three poles at z = 0


Zeros at z = j and z = -j

72
Filters Shape from Poles & Zeros

Since all poles are at origin the distances between the point
ej and the poles are the same for all values of .
Thus only the zero positions affect the overall filter shape.
A magnitude of zero will be obtained for = /2 radians.
The filter have a band stop effect as shown in the figure.

73
Filters Shape from Poles & Zeros

Example-13: Compare the filter shape for the following filters.



a) = +. +.

b) = +. +.

c) = +. +.

Solution

None of the filters have zeros.


The first filter has the poles . . , with magnitude of
0.95.
The second filter has the poles . . , magnitude of 0.9.
The third filter has the poles . . , magnitude of 0.8. 74
Filters Shape from Poles & Zeros

As the figure shows, the value of for which the poles are nearest the unit
circle is the same for all three filters.
Therefore the magnitude response should all give a spike at this value of .
The poles of first filter (a) are closest to the unit circle, therefore the spike for
this filter should be largest.
Three Pole-Zero Plots Superimposed

75

Das könnte Ihnen auch gefallen