0% found this document useful (0 votes)
23 views17 pages

Chapter 3

This document discusses the discrete-time Fourier transform (DTFT), which serves as the Fourier representation of a discrete-time signal. The DTFT is defined by a summation equation resembling the Fourier series representation of a periodic function. It is a periodic function in the real variable w with period 2π. The DTFT can be used to analyze discrete-time signals and systems in the frequency domain, providing important clues about how signals should be processed and how systems will respond to inputs. Key properties of the DTFT, such as its relationship to the time domain signal and various transform pairs, are presented.

Uploaded by

sateesh reddy
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)
23 views17 pages

Chapter 3

This document discusses the discrete-time Fourier transform (DTFT), which serves as the Fourier representation of a discrete-time signal. The DTFT is defined by a summation equation resembling the Fourier series representation of a periodic function. It is a periodic function in the real variable w with period 2π. The DTFT can be used to analyze discrete-time signals and systems in the frequency domain, providing important clues about how signals should be processed and how systems will respond to inputs. Key properties of the DTFT, such as its relationship to the time domain signal and various transform pairs, are presented.

Uploaded by

sateesh reddy
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/ 17

The Frequency Domain

3.1 THE DISCRETE-TIME FOURIER TRANSFORM


The concept of the frequency domain is as important for understanding discrete-time
signals and systems as it is for understanding the continuous-time case. A careful ex-
amination of the spectrum of a signal provides important clues about how that signal
should be analyzed. The frequency response of a system tells us how the system will
respond to unknown, and possibly difficult to characterize, inputs. This chapter fo-
cuses on the discrete-time Fourier transform (D1Ff) and the frequency response of
discrete-time systems. These are the most important of the frequency-domain analy-
sis tools. It also discusses a number of properties of the DTFT. The chapter concludes
with a brief discussion of filtering. A more complete discussion of the latter topic can
be found in the companion text Digital Filters: A Computer lAboratory Text.
The discrete-time Fourier transform, which serves as the Fourier representation
of a discrete-time signal, is defined by the summation
00

X(~w) = L x[n}e-i""'. (3.1}


n=-oo

It is a periodic function in the real variable w with a period of 21r. The DTFf is equiv-
alent to the representation of a signal as a sequence of samples, since the samples can
be computed from the DTFf and vice versa. The integral

x[n] = _.!._
211'
1,..
-11'
X (~w)~wn di.,; (3.2}

is used to evaluate the inverse DTFf. Note that the range of integration is limited to
one period of X(eiw). These two formulas resemble those that define the Fourier

64
Sec.3.1 The Discrete-Tlme Fourier Transform

series representation of a periodic function. In fact, the sample values x(n) can be
identified with the Fourier series coefficients of X(ei"'). Thble 3.1 contains an abbre-
viated list of discrete-time Fourier transform pairs.

Table 3.1. A Short List of DTFr Pairs'

x(n] X(ei..,)
1 2d((w))2,.
21r6((w- wa))2,.
cos won 1r6((w- wa))2,. + 1r6((w + Wo))2,.
11" 11'
sin won -:6((w- wa))2.. - -:6((w +wa))2,.
3 3
00

L 6[n-kN]
lc=-oo

1
1- ae-iw

x(n] = {
1

lni$N sin(w(N + l )]
0, lni>N sin( !f)

sino:n X(w) = { 1, 0 < lwl <a:


1rn 0, a: < lwl $ ""
c5(n] 1

u[n]

c5(n- no]
1
(n + 1)a"u(n], lal <1
(n+k-1)1"
nl(k- 1)1 a u(n], lal <1

-nte DTFf is always periodic in w with period 211'. Thus impulses in the frequency domain
are actually impulse trains with a period of 211'. This is indicated by the notation ((·))2,.. c5(w) is a
Dirac delta function.

The Fourier transform of a continuous-time signal is defined by the integral

(3.3)
II The Frequency Domain

A number of similarities and differences between equations (3.1) and (3.3) become
evident when they are compared. For example, both are complex functions, and thus
are displayed in terms of real and imaginary parts or in terms of magnitude and phase.
Unlike the Fourier transform, however, the DTFf is periodic in frequency with period
27r. When x[n] is of finite length, the DTFf can be evaluated numerically for selected
frequencies, but the Fourier transform cannot, in general. The units of the frequency
variables are also different: w bas units of radians while n is measured in radians per
second.
The DTFf is used frequently because many signals, systems, and signal processing
operations can be described more conveniently in the frequency domain than in the
time domain. A number of properties of the DTFf are listed in Thble 3.2; these can
be very helpful in making difficult problems easy to solve.

Table 3.2. Properties of the Discrete-Time Fourier nansform•

x[n) {:=:::} X(eJ'"')


x[n- no] {:=:::} e-jwno X(ei'"')
eJwonx[n] {:=:::} X(eJ(w-wo))

x•[n] {:=:::} x•(e- ; ... )

x[-n) {:=:::} X(e-i'"')

x[n) •y[n) {:=:::} X(ei'"')Y(ei'"')

x[n)y[n) {:=:::} _..!_


2'11" -·
1• X(ei')Y(ei<w-t)) dO

x[n]- x[n -1] {:=:::} (1 - e-;'"')X(ei"')


n
L x[k]
A:=-oo
{:=:::}
1
_ !-;. . X(ei'"') + 1rX(ei0 )6((w))2..
.dX{ei'"')
nx[n] {:=:::}
3 dw

Re{xe[n]} {:=:::} ev{Re(X(ei'"'))}


i ~{xe[n]} {:=:::} jev{~(X (ei'"'))}

Re{xo[n]} {:=:::} jod{~m(X(ei'"'))}

j ~{xo[n]} {:=:::} od{Re(X(ei'"'))}

"The symbo16((w)) 2 ,.. is the Dirac delta function. The notation ((-))2..
reflects the fact that the DTFf is always periodic in w with period 211'.
Sec. 3.1 The 01acrete-Time Fourier Transform 17

1\vo additional properties relate measurements in the time domain to measure-


ments in the frequen<-)' domain. Parseval's relation relates signal energy in the time
domain to measurements made from the DTFf.

The initial value relations

x[O) =
2~ [ X(ei'"') dw

00

X(ei 0 ) = L x[n]
n=-oo
are frequently useful for checking computations.
· The exercises in this section examine the frequen<-)' domain and the ways in which
the discrete-time Fourier transform may be used as an analysis tool.

- EXERCISE 3.1.1. Response of a System to a Complex Exponential


An LTI system is completely characterized by its impulse response. Here the out-
put of an LTI system is examined when the input is a complex exponential. Consider
the system with impulse response h[n) given by

h[n] = 0.036[n] + 0.46[n- 1] + 0.546[n - 2] + 0.2cS[n - 3] - 0.26[n- 4).


Create a signal file containing this impulse response using the create fik option in x
siggen. Generate a set of six 128-point complex exponentials of the form &'"'•" with
the following discrete-time frequencies: w 1 = 1r/6, W2 = 1r/3, w 3 = 1r /2, w4 = 21r /3,
w5 = S1r /6, and w5 = 81r /9. This may be done easily by using the exponential K & 0 "
option in x siggen. The parameters for a should be complex in this case, e.g.,
0 1r /2, 0 1r/3, etc. Display the real and imaginary parts of the complex exponential
and observe that they are sinusoids with unity amplitude. Convolve each complex
exponential with the system impulse response, h[n], to form Y.t [n], 112[n], ... , 116[n].

(a) Examine and record the magnitude of each of the output sequences in the steady
state region, i.e., 4 ~ n ~ 128. The function x view2 can be used to examine
the magnitudes of these outputs one above the other. You will observe that the
outputs are essentially constant. The only differences are that the magnitudes
of the output sequences may differ from those of the inputs and that the output
sequences may have been shifted slightly in time.
(b) Construct a graph with amplitude along the vertical axis and frequency in the
range (0 ~ w ~ 1r) along the horizontal axis. Plot the peak magnitude values for
yt[n], y2 [n], .. . , y6 [n] on the graph-one point for each of the six frequencies.
88 The Frequency Domain I
Connect the points to form a continuous plot. Your result should approximate
the discrete-time Fourier transform magnitude, IH(ei"')l. . I
(c) The discrete-time Fourier transform, or DTFf, is a frequency-domain represen-
tation that is most often displayed in the frequency range -1r ~ w < 1r. Plots
of the DTFT are continuous curves. The computer is actually displaying discrete
I
sample values of the DTFT and connecting these points with straight lines. Use
the x dtft function to display the DTFT magnitude, IH(ei"')l. Sketch the trans-
form magnitude in the range 0 ~ w ~ 1r. How does it compare to your plot in
part (b)?

The discrete-time Fourier transform of a signal or systtm can be interpreted as its


response to an infinite set of complex sinusoids that collectively_ span the frequency
range.
- EXERCISE 3.1.2. Symmetry in the Fourier Transform
I
In Chapter 2 the concept of even and odd symmetry was introduced. It was shown
that any real sequence, x[n], could be expressed as a sum of its even and odd parts
where theeven part was defined as
I
ev{x[n]} = (x[n] + x[-n])/2 I
and the odd part of x[n] was defined as
I
od{x[n]} = (x[n]- x[-n])/2.
This concept was also extended so that any arbitrary complex sequence, .X[n], could
be expressed in terms of the even and odd parts of its real and imaginary components, I
i.e.,
.X[n] = ae[n]
~
+ a [n] +
~
0 j
~
be[n] + j b0 [n].
~
I
real-even real-odd imag-even imag-odd

The DTFT can be similarly expressed in terms of these components, I


----- -----
X(tl"') = Ce(tl"') +Co(tl"') + j De(tl"')
real-even real-odd '---'
imag-even
+ j Do(tl"').
'---'
lmag-odd

In this exercise the even and odd symmetry properties with respect to the discrete-time
I
Fourier transform are investigated. I
(a) Generate an arbitrary 5-point complex sequence, .X[n]. Do this by using x rgen
to create two random 5-point real sequences. Use x gain with the gain pa-
rameter equal to "0 1" (which represents the complex number j) to transform
I
one of the real sequences into a purely imaginary signal, then add the sequences
together using x add. Sketch the real and imaginary parts of .X[n}.
11
II
Sec. 3.1 The Discrete-Time Fourier Transform

(b) Using the computer, decompose x[n] into its four components, ae [n], a0 [n], be [n],
b0 [n], and provide a sketch for each. The functions x realpart and x imag-
part can be used to extract the real and imaginary parts, respectively. The even
and odd components can be obtained by using the x reverse, x add, x sub-
tract, and x gain functions. Next compute the DTFT of x[n]. Decompose
X(eiw) into its components Ce(eiw), C0 (&w), De(&w), and Do(&w) in the same
way. Recall from Chapter 1 that the function x dtft generates a 513 point file
"_dtft_" that contains samples of the transform. (Note that this file name begins
and ends with underbars.) You may reverse, add, and process this file appropri-
ately to generate Ce(&w), C0 (&w), De(&w), and Do(&w).
(c) Now individually take the discrete-time Fourier transform of ae[n], a0 [n], jbe[n],
and jb0 [n]. Summarize your findings by matching the time-domain and frequency-
domain components listed below.
Time Domain Frequency Domain
rul-v...., ae[n] Ce(&w) "e.a.l-e-v6At
.,.e,J-c.JJ a 0 [n]S x 5C0 (&w) re..l-oJJ
i ""a~I"'10 J -~be(n] 'De(ei_w) j....,«j; rt.,._•J- evevl
\""'llj~wt.,._v:J-JJjb0 [n] JDo(&w) ;"''lt}i".,-j -•JJ
These symmetry properties that you have observed apply for any arbitrary complex
sequence.
- EXERCISE 3.1.3. Proving the Symmetry Properties
In Chapter 2 and in the previous exercise the concept of a decomposition into
even and odd signal components was discussed. You saw that any arbitrary signal (real
or complex) could be expressed in terms of real-even, real-odd, imaginary-even, and
imaginary-odd components. In the previous exercise you were shown experimentally
that each of these components transforms to one of four related frequency-domain
components.
Consider the definitions for the even and odd components in the time domain and
the frequency domain:
ae[n] = !(a[n] + a[-n])
a0 [n] = !(a[n]- a[-n])
Ce(&w) = !(C(&w) + C(e-;w))
Co(&w) = !(C(&w)- C(e-;w))
I where a[n] and C(&w) are assumed to be purely real signals. Using the definition of
the DTFT, prove analytically that the relationships you found in the previous exercise
I are always true. (Hint: You may wish to use the fact that
00

L f[n] =0
I n=-oo

I
70 The Frequency Domain

if /[n) is odd. You may also wish to determine whether each of the components is
either even or odd. Then determine if each is real or imaginuy.)

- EXERCISE 3.1.4. Hermitian Symmetry


The two previous exercises established the relationships between the real, imagi-
nary, even, and odd parts of signals in the time and frequency domains. A special case
of this general result occurs when the time signal, x[n], is purely real. In this case, the
real part of the DlFf is an even function and the imaginuy part is an odd function.
This condition is known as Hermitian symmetry.

(a) Using the function x dtft sketch the real and imaginuy parts of the DTFf of
the signal cc[n] contained in the file cc. Observe the symmetry in the real and
imaginary parts. What type of symmetry is present in the magnitude and phase
of the DTFf of this signal, i.e., which is an even function and which is odd?
(b) Now use X dtft to examine the DTFf of the complex signal, dd(n] contained
in the file dd. Sketch the real and imaginary parts of its DTFf. Also sketch the
magnitude and phase.
(c) It is very common to display the DTFf only over the range from 0 :S: w :S: 1r due
to Hermitian symmetry. Based on your observations in part (b), when would it
be inappropriate to display the transform in this limited range?

- EXERCISE 3.1.5. Periodicity of the Discrete-Time Fourier Transform


The discrete-time Fourier transform shares many characteristics with the continu-
ous-time Fourier transform. A major difference, however, is that the DTFf is periodic
in w with period 2w.
Th examine the issue of periodicity, consider the definition
00

X(ei"') = L x[n)e-Jwn
n=-oo
= · · · + x[-l]ei"' + x[O) + x[l)e-;"' + x[2]e-;2w + · · ·.
Carefully examine each term in the DTFf and observe that it repeats in frequency
=
every 2w radians. This is because e-i2'"' 1 for n = 0, ±1, ±2, ....
Use x dtft to compute the DTFf of the signal aa[n) contained in the file aa By
examining the x d t ft display, estimate the numerical values for each of the following
using the periodicity property:

(a) IAA(ei1r/ 4 )!.


(b) IAA(ei3r/4)1.
(c) IAA( ei91r/ 4) I·
(d) IAA(eJ17r/4)1.

Note that X dtft only displays the DTFf in the range between -1r and 1r.
Sec. 3.1 The Discrete-Time Fourier Transform 71

-EXERCISE 3.I.6. The Shift Property


The shift property of the DTFf says that shifting a signal in time by no causes its
DTFf to be multiplied or modulated by the complex exponential e-;wno. In other
words, if x[n] has a DTFf X(ei"'), then x[n- no] has DTFf X(ei"')e~Jc.m•.

(a) Display and sketch the 15-point signal ee[n] contained in the file ee using x
view. Using x dtft, display and sketch the imaginary part. Observe that
since ee[n] is an odd function, the DTFf is purely imaginary (i.e., its real part
is zero), and consequently only one sketch is necessary for its complete represen-
tation. Practically speaking, the real part of the DTFf shown in the plot is only
approximately zero due to limited numerical precision in the computation.
(b) Consider the signals

Yo[n] = ee[n- 1]
and
yi(n] = ee[n + 1].
Using the x lshift and x dtft functions, sketch their frequency responses. You
I will observe that the resulting frequency response is no longer purely imaginary.
Euler's formula states that

' e±;wno = coswno ±jsinwno.


Therefore, the shifted signals will have the form

(3.4)

Display and sketch the real and imaginary parts of Yo(ei"') and Y1 (&"') and ob-
I serve the frequency-domain effects of shifting in time. ·
(c) By changing the summation variable, n in the DTFf definition (i.e., letting n -+

I n- no), derive the shift property. ( tJ ( R.)

- EXERCISE 3.1.7. The Modulation Property


I The modulation property is the dual of the shift property. It states that multiplying
a sequence, x[n], by a complex exponential &an shifts its DTFf in frequency by a. If
x[n] has the DTFf X(ei"'), then x[n]&an has the DTFf X(ei<w-a>). Consider the
I signal ee[n] contained in the file ee. Modulate this signal by e)1rn!4 using X cexp.

(a) Display and sketch IEE(el"')l the DTFf magnitude of ee[n], and also the DTFf
I magnitude of e;1rn/4 ee[n].
(b) Analytically derive the modulation property by explicitly taking the DTFf of
x[n]&an.
72 The Frequency Domain

-EXERCISE 3.1.8. The Convolution Property


• The convolution property is one of the most important and useful properties of
the DTFT. It states that when two signals are convolved, their respective DTFIS are
multiplied. In other words, the D1Ff of x(n] * h[n] is X(ei 111 )H(ei111 ). Consider the
sequences ee[n] and //[n] contained in the files ee and ff.

(a) Display and sketch the magnitude responses of EE(ei111 ) and FF(ei111 ). Based on
these plots, sketch the magnitude of EE(ei111 ) FF(ei 111 ).
(b) Using the x convolve function, compute
y[n] = ee(n] * //(n].
Display and sketch the D1Ff magnitude of y[n].
(c) Consider deriving the convolution property. Recall that the convolution of two
signals x[n] and h[n] is defined by the convolution sum
00

x[n] * h[n] = L x[m]h[n- m].


m=-oo

Apply the DTFf definition to the convolution sum. Observe that this double
summation may be rewritten as
00 00

L x[m] L h[n- m]e-iwn


m=-oo n=-oo

DTFf of la[n-mJ
since x(m] has no dependence on the variable n. Using the definition of the
DTFT and the shift property, show that this expression reduces to X (ei111 )H(& 111 ).

-EXERCISE 3.1.9. The Multiplication Property


The multiplication and convolution properties are duals in the sense that multipli-
cation in the time domain implies convolution in the frequency domain and convolu-
tion in the time domain implies multiplication in the frequency domain. The DTFT
of a product of two sequences is the convolution of their individual DTFIS, i.e.,

2~X(eJ
DTFT{x[n]h[n]} = 111 ) ® H(eJ111 )

= _!_ ~w X(eJB)H(eJ(w-9}) dO (3.5)


21r -1r

where the circled star is used to denote a form of convolution called circular or periodic
convolution.

(a) Taking the DTFf of x[n]h(n] results in


Sec. 3.1 The Discrete-Time Fourier Transform 73

00

DTFT{x[n)h[n]} = L x[n)h[n)e-;"'".
n=-oo

By expressing x[n) as the inverse DTFf of X(&"') and substituting, this equation
becomes

DTFT{x[n)h[n]} = f,
n=-oo
~~·
211"
X(ei"')eifln dBh[n)e-;"'",
-•
z[n]

By interchanging the order of the sum and integration operations, show analyti-
cally. that the multiplication property is valid.
(b) Circular convolution is a topic that will be considered in more detail later in this
text. For the present we will consider only a simple example. Display and sketch
the DTFT magnitudes of the sequences f![n) and gg[n) contained in files ff and
gg. The circular convolution of FF(&"') and GG(&"') is very much like their
linear convolution except that the two signals are periodic and the integration is
confined to one period. Display and sketch the magnitude of

FF(ei"') ® GG(ei"')
using the multiplication property defined in equation (3.5), i.e., use the functions
x multiply and x dtft.
EXERCISE 3.1.10. The Initial Value Theorem
The initial value theorem states that

which is proportional to the area under a graph of the DTFT. The analogous relation-
ship with the domains reversed is
00

n=-oo

I These properties can be very useful in solving certain problems.


(a) Write the definition of the inverse DTFT. Let n equal zero and show that the
result reduces to the initial value theorem.
(b) Now use the definition of the forward DTFT to derive the other initial value
relationship.
I (c) Using the x lshift function, create the signal vv[n] = gg[n + 5], where gg[n]
is the signal contained in the file gg. Now use x dtft to display the real and
imaginary parts. Sketch the real part of VV (&"') and estimate the area under the
I
I
74 The Frequency Domain

curve. Since x dtft produces an output file _dtft_containing the 513 samples
of the DTFf used in the graphics, the function x summer can be used to sum
the frequency domain samples. Th obtain the area under the curve, you must
multiply this sum by 21r /513. Now examine w(n) using x view and record the
value of vv(O). Verify that
1
vv[O) = 11' (area under VV(ei"')).
2

- EXERCISE 3.1.11. Some Fourier Transform Pairs


A number of signals arise frequently in digital signal processing. Remembering
their discrete-time Fourier transforms can be very useful. This exercise will add to the
list of familiar discrete-time Fourier transform pairs.

(a) Compute and sketch the DTFf magnitudes of the following finite length se-
quences using x ~iggen, x multiply, and x dtft:
(I) sin("'8n)(u[n)- u(n- 64)).
(II) cos( wan)( u(n) - u(n - 64)).
(Ill) u(n) - u[n - 32).
(lv) siu<;:/2 ) (u(n + 20)- u[n- 21]). You may use x fdesign with the rectan-
gular window option to create sin[(7rn/2)/7rn).
(v) A 64-point square wave with period 8.
(vi) A 64-point impulse train with period 8.
Notice that the discrete-time Fourier transforms of these signals are slightly dif-
ferent from the Fourier transforms of the related continuous-time signals. Ex-
plain the differences.
(b) It can be shown analytically that the discrete-time Fourier transform of a sine
wave is a pair of impulses; however, the results that you observed on the computer
were not impulses. Explain this apparent contradiction.

3.2 FILTERS
The term "filter" describes a very large variety of different systems. However, it is
commonly used to refer to LTI systems with frequency-selective frequency responses.
These filters allow certain regions of the spectrum to remaiJ! undisturbed while other
spectral regions are attenuated. Familiar examples include lowpass, highpass, and
bandpass filters.
Filters are specified by their frequency-domain magnitude characteristics. Ideally,
the frequency response of a filter should display only two types of behavior: it should
have one or more spectral regions of constant nonzero amplitude (called the pass-
band(s)) and one or more regions where the frequency response is zero (called the
Sec. 3.2 Filar! 71

stopband(s)). These ideal filters are not realizable in practice. Realizable filters will
also contain intermediate regions called transition bands. Because the frequency re-
sponse must be continuous, a transition band must lie between each passband and
stopband.
Realizable filters are designed to approximate ideal filters to within certain pre-
scribed tolerances. These tolerances are defined by the widths of the transition re-
gions, the maximum passband deviation, and the maximum stopband deviation. These
parameters are illustrated in Fig. 3.1 for a lowpass filter. The effect is to define are-
gion on the graph in which the magnitude response of the filter must lie. The ideal
frequency response is shown by the solid black line. The following parameters define
the match between the digital filter and the ideal:
6p passband ripple,
6. stopband ripple,
Wt lower cutoff frequency,
Wu upper cutoff frequency,
We nominal cutoff frequency.
For high-quality filters that closely approximate the ideal response, the ripples in the
stopband may not be visible in a plot of the magnitude response. In these cases, the log
magnitude response, defined as 20log10 IH{&w)l, may be more useful. The vertical
axis of the log magnitude plot is measured in decibels and clearly shows the variation
in the stopband region. Thus, an alternate way of specifying the maximum stopband
deviation is through the attenuation where

attenuation~ -20log10 6. (dB).


The phase response of the filter is defined as

'w) -1 ~m{ H(&w)} 11' { { ( ·w)}))


LH (e' =tan Re{H(eiw)} +2 1 + sgn(Re He' .

Since the phase function is a multivalued function, the principal value is generally
displayed. This results in a function with an amplitude that ranges between -11' and
+1r. The phase response of a filter can be important in certain applications, although
historically greater attention has been given to the magnitude response.
Digital filters can be divided into two general categories based on their lengths:
finite impulse response (FIR) filters and infinite impulse response (IIR) filters. FIR
filters have impulse responses that are finite in duration; they can be implemented
conveniently using convolution. IIR filters, on the other hand, are infinite in dura-
tion and are implemented using difference equations. Much can be said about digital
filters, their properties, and methods for their design, but this is the topic of the com-
panion text, Digital Filters: A Computer Laboratory Text. The few exercises that follow
try to provide some limited familiarity with this topic.
78 The Frequency Domain

I
I
I
I

L-------------
w
Wt

Figure 3.1. Tolerances for specifying the acceptable performance of a lowpass filter. The
ideal filter H(~..,) is shown by the solid line.

- EXERCISE 3.2.1. Digital Filters


When the frequency response of a linear time-invariant system allows a certain re-
gion of the spectrum to be passed undisturbed and rejects or nullifies other frequency
regions, the system is often called a filter. Consider the two FIR filters h 1 [n] and ~ [n]
with impulse responses

h 1 [n] = 0.036c5[n]- 0.036c5[n- 1]- 0.29c5[n- 2] + 0.56c5[n- 3]


-0.29c5[n - 4] - 0.036c5[n - 5] + 0.036c5[n - 6]
h2[n] = -0.09c5[n] + 0.12c5[n- 1] + 0.5c5[n- 2]
+0.5c5[n - 3] + 0.12c5[n - 4] - 0.09c5[n - 5].
In addition, consider the IIR filter that is described by the difference equation

y[n] - 0.57y[n- 1] + 0.88y[n- 2] - 0.26y[n- 3] + 0.09y[n- 4]


= O.llx[n] + 0.27x[n -1] + 0.37x[n- 2] + 0.27x[n- 3] + O.llx[n- 4].
Use the create file option of x siggen to create files for each of these filters.
Display and sketch the magnitude responses for each filter using x d tft. Classify each
as a lowpass or highpass. What are the approximate cutoff frequencies and transition
widths in radians for each of these filters? What is the stopband attenuation (in dB)
for each? Estimate these values by inspecting the DTFf plots.

- EXERCISE 3.2.2. Time-Domain Filter Characteristics


In the preceding exercise, you examined the frequency characteristics of some LTI
filters. In this exercise, you will investigate time-domain characteristics of ideal low-
pass filters.
The impulse response, h[n], of an ideallowpass filter can be expressed analytically
as
h[n] = sin w0 n.
7rn
Sec· 3.2 Flt!n 77

Give a rough sketch of this signal for w0 = 1r /2, 1r /4, 1r /6, and 1r /8. The function
x fdesign (using the rectangular window option) can be used to construct lowpass
filters that have this time domain characteristic.

(a) Design four 32-point lowpass filters with cutoff frequencies as specified above.
Examine them carefully in both the time domain and the frequency domain. In
the time domain each impulse response has a peaked cluster of samples centered
in the middle of the sequence. This cluster is called the main lobe. How is the
width of the main lobe in the impulse response related to the width of the pass-
band of the filter?
(b) The step response of a filter is the output when the input is an ideal unit step,
u[nJ. In this exercise, approximate the step function by a block of length 100 cre-
ated using x siggen. Sketch the step responses for the set of lowpass filters
used in part (a). lhlncate your result to 50 samples using x truncate to avoid
displaying the erroneous points due to the block approximation of the unit step.
Determine the relationship between the slope of the step response in the mid-
dle of the transition and the main lobe width of the impulse response. Observe
that the ripple heights (overshoot and undershoot) in the step response are not
significantly affected by the nominal cutoff frequency.

- EXERCISE 3.2.3. Filter Design


There are many programs available for designing FIR filters. This text does not
address filter design procedures. However, the use of filters and the ability to design
them are important if complex systems are to be constructed. The program x fde-
sign is a filter design program based on the window design procedure. Three choices
for the window can be chosen: a rectangular window, a Hanning (Von Hann) window,
or a Hamming window. Design a 32-point and a 64-point lowpass filter with cutoff 1r /3
using each of these window options. Measure the attenuation and transition band in
each case using x dtft.

(a) Which window gives the greatest attenuation? What is the value of that attenu-
ation? Does it seem to depend on the filter length? ·
(b) Which option gives the narrowest transition band for a given filter length? How
does the transition band depend on the filter length?

- EXERCISE 3.2.4. Filtering a Sinusoid and a Random Sequence


The frequency domain provides useful insight in understanding filtering. Create a
file containing the filter h 1 [nJ defined in Exercise 3.2.1 using the create file option of
x siggen.
(a) Display and sketch the DTFf magnitude of this filter.
(b) Create the following two signals using x siggen, x add, and x rgen.
(i) The first 256 points of
I
78 The Frequency Domain I
4
x1 [n] = L sin 1r k n.
5
lc=l

(II) A 256-point random signal x 2 [n].


Display and sketch the DTFf magnitudes of xl[n] and x 2 [n].
I
(c) Consider Xt [n] and X2[n] as inputs to the filter with impulse response ht [n]. With-
out the aid of the computer, sketch the DTFf magnitude of the outputs. Verify I
your results using the computer.

An LTI system can be used to alter the spectral shape of the input. For the random I
signals generated by x rgen, the DTFf has energy that is uniformly distributed in
the frequency domain. Thus the frequency response of the LTI system shapes the
spectrum of the random signal. !I
3.3 LINEAR PHASE I
The DTFf is a complex function that can be expressed in terms of either its real and
imaginary parts or its magnitude and phase-the latter being more common. An im-
portant subclass of signals is the class for which the DTFf phase is linear. Real, linear I
phase signals have the property that their discrete-time Fourier transforms can be
written as A(ei"')e-Jwno where A(ei"') is either purely real or purely imaginary. In
this context, A(ei"') plays the role of an amplitude function and -wno plays the role I
of the phase. Since this phase component is a linear function of w, signals of this form
are termed linear-phase sequences.
The linear-phase condition imposes a well-defined symmetric structure on the sig- il
nal in the time domain. For odd length real sequences, the samples are either symmet-
ric or antisymmetric about a midpoint as shown in Fig. 3.2. For even length sequences,
the symmetry characteristics are similar, except that the point of symmetry lies mid-
way between two sample values. For finite length sequences that begin at N 1 and end
at N2 (Nt < N2), the midpoint, no is at

~"jtk: L ~ ~ -IJ~+ 1 no= N• ~N• .:: N1 + L; 1


When the sequence length is odd, no is an integer, but when the sequence length is I
even, no is a half integer.
An interesting subset of linear-phase sequences is the class of odd length sequences
with a midpoint at n = 0. These are called zero-phase sequences because no is zero I
and the phase term is also identically zero.
- EXERCISE 3.3.1. Zero Phase
Zero-phase sequences are odd length linear-phase sequences that are centered at
I
the origin. Due to the sequence symmetry, the discrete-time Fourier transform of a
Sec.3.3 UnearPhase 71

n .I I J:I I I . ., n

(a) Symmetrict odd length (b) Symmetri<=t even length

n
T n

(c) Antisymmetric, odd length (d) Antisymmetric, even length

Figure 3.2. The four types of linear-phase sequences.

real odd lengtht symmetric (even function) zero-phase sequence h(n] can always be
expressed as
L L
H(eiw) = L h(n]e-;wn = h(O] + 2 L h(n] coswn. (3.6)
n=-L n=l

Create an arbitrary 13-point zero-phase sequence, e(n]. There are many ways to do
this, one of which is to use x fdesign. Sketch the sequence and its DTFT. Now
create
/(n] = e(n] + 6(n]
and sketch F(&w). Compare E(&w) and F(&w) and explain why they have similar
spectral shapes.

I - EXERCISE 3.3.2. A Cascaded System


The frequency response of an LTI system provides useful information about its
behavior. Consider the LTI systems with impulse responses

ht (n] = -0.046(n] + 0.046(n - 1] + 0.36[n - 2] - O.M[n - 3]


+0.36[n - 4] + 0.046[n - 5] - 0.046[n - 6]
I
80 The Frequency Domain I
h2[n] = 0.096[n]- 0.126[n- 1]- O.M[n- 2]
-O.M[n- 3] + 0.126[n- 4] + 0.096[n- 5].
Use the create file option of x siggen to create files for each filter.
(a) Using x dtft display and sketch the magnitude responses of h 1 [n] and ~[n].
I
(b) Now consider a new system composed of the cascade of hl[n] and h2[n]. The
impulse response of the new system, which we will call h 3 [n], can be shown to I
equal
ha[n] = ht[n] * h2[n].
I
Without the aid of the computer, give a rough sketch of the magnitude response
of ha[n]. Verify your answer by explicitly computing h3 [n] and taking its DTFf.

-EXERCISE 3.3.3. A Parallel System


I
Consider two LTI systems defined by the impulse responses

h 1 [n] = 0.046[n]- 0.046[n -1]- 0.36[n- 2] + 0.66[n- 3]


I
-0.3c5[n - 4] - 0.046[n - 5] + 0.046[n - 6]
h2[n] = 0.096[n]- 0.126[n- 1]- 0.56[n- 2] I
-O.M[n- 3] + 0.126[n- 4] + 0.096[n- 5].
Use the create file option of x siggen to create files for these filters. I
(a) Using x dtft display and sketch the magnitude responses for h 1 [n] and h2[n].
(b) Now consider a new system h3 [n] composed of the sum of h 1 [n] and h2[n] where

Without the aid of the computer, give a rough sketch of the magnitude response
of h 3 [n]. Verify your answer by explicitly computing h 3 [n] using x add and
taking its DTFf magnitude.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy