606 C H A P T E R 10: Fourier Analysis of Discrete-Time Signals and Systems
corresponding outputsy 1 [n],y 2 [n], andy 3 [n]. The frequency responses{Hi(ejω)},i=1, 2, 3 of the
filters are found using the functionfreqz.
The three filters separatex[n] into its low-, middle-, and high-band components from which we
are able to obtain approximately the power of the signal in these three bands—that is, we have a
crude spectral analyzer. Ideally, we would like the sum of the filters outputs to be equal tox[n],
with some delay, and so the sum of the frequency responses
H(ejω)=H 1 (ejω)+H 2 (ejω)+H 3 (ejω)
should be the frequency response of an all-pass filter. Indeed, that is the result shown in
Figure 10.10, where we obtain the input signal as the output of the filter with transfer function
H(z), delayed 15 samples (which corresponds to half the order of the filters used).
(^00) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0.5
1
ω/π
ω/π
0 5 10 15 20 25 30 35 40 45
− 1
0
1
n
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
5
x[
n]
|H
(ωi
)|
|X
(e
jω
)|
(a)
0 5 10 15 20 25 30 35 40 45 50
−0.2
−0.1
0
0.1
0.2
−0.5 0 5 10 15 20 25 30 35 40 45 50
0
0.5
− (^205101520253035404550)
0
2
n
y^1
[n]
y^2
[n]
y^3
[n]
(b)
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
0
0.2
0.4
0.6
0.8
1
ω/π
0 5 10 15 20 25 30 35 40 45 50
− 1
−0.5
0
0.5
1
n
|H
(ω
)|
y[
n]
(c)
FIGURE 10.10
A crude spectral analyzer: (a) magnitude response of low-pass, band-pass, and high-pass filters; input signal
and its magnitude spectrum; (b) outputs of filters; (c) overall magnitude response of the bank of filters, an
all-pass filter, and overall response. Delay is due to linear phase of the bank of filters.