Professional Documents
Culture Documents
Ch08 - Applications To Filters and Equalizers PDF
Ch08 - Applications To Filters and Equalizers PDF
8.1 Introduction
Basic concepts:
1. Filters Functional blocks to suppress spurious signals by exploiting the fact
that the frequency content of these signals is separated from the frequency
content of wanted signals.
2. Equalizers Functional blocks to compensate for distortion that arises when
a signal is transmitted through a physical system such as a telephone channel.
Distortionless transmission, analog
Study topics in this chapter
filters, digital filters, and equalizers
8.2 Conditions for Distortionless Transmission
LTI system
x(t), X(j ) y(t) = x(t) h(t)
LTI system, h(t), H(j )
Y(j ) = X(j ) H(j )
1. By distortionless transmission we mean that the output signal of the
system is an exact replica of the input signal, except, possibly, for two minor
modifications:
Signals_and_Systems_Simon 1
Haykin & Barry Van Veen
CHAPTER
Application to Filters and Equalizers
1) A scaling of amplitude
2) A constant time delay
2. A signal x(t) is transmitted through the system without distortion if the
output signal y(t) is defined by
y (t ) Cx(t t0 ) (8.1) Fig. 8.1.
where constant C accounts for a change in amplitude and constant t0 accounts
for a delay in transmission.
3. FT:
Y(j ) CX(j)e jt0 (8.2)
Signals_and_Systems_Simon 3
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
p ; v
Signals_and_Systems_Simon 5
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
2. The frequency response of the system given in Eq.(8.3) takes the new form
H ( j ) Ce j ( t0 k )
But
jk 1, k 1, 3,
e
1, k 0, 2, 4,
H ( j ) Ce jt0
which is of exactly the same form as Eq.(8.3), except for a possible change
in the algebraic sign of the scaling factor C.
3. We conclude that the conditions for distortionless transmission through a
linear time-invariant system remain unchanged when the phase response
of the system is changed by a constant amount equal to a positive or
negative integer multiple of 180.
8.3 Ideal Low-Pass Filters
The frequency response of a filter is characterized by a passband and a
stopband, which are separated by a transition band.
1. Frequency response of an ideal lowpass filter: Fig. 8.3.
Signals_and_Systems_Simon 6
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
p ; v
Signals_and_Systems_Simon 7
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
c j ( t t0 )
1 1 e c
sin(c (t t0 ))
c
j ( t t0 )
h (t ) e d (8.10)
2 2 j (t t0 ) c ( t t0 )
Recall the definition of the sinc function given by Eq. (3.24):
sin(t ) c
sinc(t ) (8.11) h (t ) sinc c (t t0 ) (8.12)
t
4. This impulse response has a peak amplitude of c/, centered at time t0, as
shown in Fig. 8.4 for c = 1 and t0 = 8.
5. The duration of the mainlobe of the impulse response is 2/ c, and the rise
time from zero at the beginning of the mainlobe to the peak is / c.
6. For any finite value of t0, there is some response from the filter before the
time t = 0 at which the unit impulse is applied to the input of the filter.
Ideal low-pass filter is non-causal!
8.3.1 Transmission of A Rectangular Pulse Through An Ideal Low-Pass
Filter
1. Rectangular pulse uses the following protocols to represent a binary
sequence transmitted through a channel:
Signals_and_Systems_Simon 8
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
c T0 2 sin( c (t t 0 ))
y (t )
T0 2 c (t t 0 )
d
Let c (t t0 )
Signals_and_Systems_Simon 10
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Changing the variable of integration from to , we may rewrite y(t) as
1 a sin 1 a sin b sin
y (t ) d d d , (8.16)
b 0 0
where the limits of integration, a and b, are defined as
T0 T0
a c (t t 0 ) (8.17) and b c (t t 0 ) (8.18)
2 2
5. Sine integral: Si(u) can not be evaluated in closed form, but it
can be integrated by using a power series
u sin
Si(u ) d (8.19) Fig. 8.5.
0
From the figure, we see that
1) The sine integral Si(u) has odd symmetry about the origin u = 0.
2) It has maxima and minima at multiples of ; and
3) It approaches the limiting value of /2 for large values of u.
6. The response y(t) defined in Eq. (8.16) can be rewritten in the compact form of
y (t )
1
Si(a) Si(b) (8.20)
a and b are defied in Eqs. (8.17) and
(8.18), respectively.
Signals_and_Systems_Simon 11
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Figure 8.5 (p. 620) p ; v
Sine integral.
7. Fig. 8.6 depicts the response y(t) for three different values of the cutoff
frequency c, assuming that the pulse duration T0 = 1 s and the
transmission delay t0 is zero.
In each case, we see that the response y(t) is symmetric about t = 0. We further
observe that the shape of the response y(t) is markedly dependent on the cutoff
frequency. In particular, we note the following points:
Signals_and_Systems_Simon 12
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Signals_and_Systems_Simon 13
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
1). When c = 2/T0 , as in Fig. 8.6 (a), the response y(t) has approximately the
same duration as the rectangular pulse x(t) in two major respects:
Unlike the input x(t), the response y(t) has nonzero rise and fall times that are
inversely proportional to the cutoff frequency c.
The response y(t) exhibits ringing at both the leading and trailing edges.
2). When c = 2/T0, as in Fig.8.6(b), the response is recognizable as a pulse,
However, the rise and fall times of y(t) are now significant compared with the
duration of the input rectangular pulse x(t).
3). When the cutoff frequency c is smaller than 2/T0, as in Fig.8.6(c), the response
y(t) is a grossly distorted version of the input x(t).
8. These observations point to the inverse relationship that exists between two
parameters: (1) the duration of the rectangular input pulse applied to an
ideal low0pass filter and (2) the cutoff frequency of the filter.
Example 8.2 Phase Response for Distortionless Transmission
The response y(t) shown in Fig.8.6(a), corresponding to a cutoff frequency c =
4/T0 for T0 = 1 s, exhibits an overshoot of approximately 9%. Investigate what
happens to this overshoot when the cutoff frequency c is allowed to approach
infinity.
<Sol.>
Signals_and_Systems_Simon 14
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
1. In Figs. 8.7(a) and (b), we show the pulse response of the ideal low-pass filter for
cutoff frequency c = 10 /T0 and c = 40 /T0. The two graphs illustrate that the
overshoot remains approximately equal to 9 % in a manner that is practically
independent of how large the cutoff frequency c is. This result is, in fact, another
manifestation of the Gibbs phenomenon discussed in Chapter 3.
2. To provide an analytic proof of what the graphs illustrate, we observe from Fig. 8.5
that the sine integral Si(u) defined in Eq.(8.19) oscillates at a frequency of 1/(2).
The implication of this observation is that the filter response y(t) will oscillate at a
frequency equal to c/(2), where c is the cutoff frequency of the filter. The filter
response y(t) has its first maximum at
T0
t max (8.21)
2 c
3. Correspondingly, the integration limits a and b defined in Eqs.(8.17) and (8.18)
take on the following values (assuming that t0 = 0):
T0 T0 T0
amax c tmax c cT0 ; (8.22)
2 2 c 2
and
Signals_and_Systems_Simon 15
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Signals_and_Systems_Simon 16
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
T T T0
bmax c tmax 0 c 0 (8.23)
2 2 c 2
4. Substituting Eqs.(8.22) and (8.23) into(8.20) yields
y (t max )
1
Si(a max ) Si(bmax )
1
Si( cT0 ) Si( )
1
Si( cT0 ) Si( ) (8.24)
Let
Si( cT0 ) 1 (8.25)
2
where is the absolute value of the deviation in the value of Si( cT0 ),
expressed as a fraction of the final value + /2. The maximum value of Si(u)
occurs at umax = and is equal to 1.852, which we may write as (1.179)( /2);
that is,
Signals_and_Systems_Simon 17
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Si( ) 1.179
2
Hence, we may rewrite Eq.(8.24) as
y ( t max ) 1
2 1.179 1 1.09 12 (8.26)
5. Viewing c as a measure of the filters bandwidth, we note from Fig.8.5 that for a
time-bandwidth product cT0 large compared with unity, the fractional deviation
has a very small values. We may thus write the approximation
y (t max ) 1.09 for c 2 /T0 (8.27)
which shows that the overshoot in the filter response is approximately 9%, a
result that is practically independent of the cutoff frequency c.
8.4 Design of Filters
Tolerance diagram for continuous-time analog filter Fig. 8.8
1. Inside the passband, the magnitude response of the filter should lie
between 1 and 1 ; that is
1 e H ( j ) 1 for 0 p (8.28)
Signals_and_Systems_Simon 18
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
d ; e ; v
Signals_and_Systems_Simon 20
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
1. Analog approach, which applies to the class of analog filters.
2. Analog-to-digital approach, where the motivation is to design a digital filter by
building on what we know about an analog filter design.
3. Direct digital approach, which applies to the class of the digital filters.
8.5 Approximating Functions
Basic concept:
1. Basically, the approximation problem is an optimization problem that can be
solved only in the context of a specific criterion of optimality. In other words,
before we proceed to solve the approximation problem, we have to specify a
criterion of optimality in an implicit or explicit sense.
2. Moreover, the choice of that criterion uniquely determines the solution.
Two optimality criteria commonly used in filter design:
1. Maximally flat magnitude response.
Let |H(j )| denote the magnitude response of an analog low-pass filter of order k,
where K is an integer, Then the magnitude response |H(j )| is said to be
maximally flat at the origin if its multiple derivatives with respect to vanish at
= 0 that is, if K
H ( j ) 0 at 0 k 1, 2, ..., K 1.
K
Signals_and_Systems_Simon 21
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
2. Equiripple magnitude response.
Let the squared value of the magnitude response |H(j )| of an analog low-pass
filter be expressed in the form
1
H ( j )
2
1 2 F 2
where is related to the passband tolerance parameter and F( ) is some
function of . Then the magnitude response |H(j )| is said to be equiripple in the
passband if F2( ) oscillates between maxima and minima of equal amplitude
over the entire passband.
3. Illustrations for the formulation of the second optimality criterion for two
cases, K = 3 and K = 4:
Case (a): K = 3 and c = 1
Fig. 8.9
(i) F 2 ( ) 0 i f 0, a
(ii) F 2 ( ) 1 if b , 1
2
(iii) F ( ) 0 if 0, b , a
where 0 b a 1.
Signals_and_Systems_Simon 22
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
v
1
1/(2 K ) 1/(2 K )
e
p c (8.31) and s c (8.32)
1 e
Signals_and_Systems_Simon 24
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
3. The squared magnitude response |H(j )|2 obtained by using the
approximating function of Eq. (8.30) is plotted in Fig. 8.10 for four different
values of filter order K a s a function of the normalized frequency / c.
All these curves pass through the half-power point at = c.
A butterworth function is
monotonic throughout the
passband and stopband.
4. In the vicinity of = 0,
the magnitude of H(j )
can be expanded as a
power series
Signals_and_Systems_Simon 25
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
2K 4K 6K
1 3 5
H ( j ) 1 , (8.33)
2 c 8 c 16 c
This equation implies that the first 2K 1 derivatives of |H(j )| with respect
to are zero at the origin.
The Butterworth function is indeed maximally flat at = 0.
5. Given the Butterworth function |H(j )|2 how to find the corresponding
transfer function H(s)?
We put j = s and recognize that
H ( s) H ( s) H ( j )
2
s j (8.34)
Hence, setting = s/j, we may rewrite Eq. (8.30) in the equivalent form
1
H ( s) H ( s) 2K
s (8.35)
1
c
j
The roots of the denominator polynomial are locate at the following points
in the s-plane:
Signals_and_Systems_Simon 26
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
s jc ( 1)1/(2 K )
j (2 k 1) /(2 K )
(8.36)
c e for k 0, 1, , 2 K 1
That is, the poles of H(s)H( s) form symmetrical patterns on a circle of radius c,
as illustrated in Fig. 8.11 for K = 3 and K = 4.
Note that, for any K, none of the poles fall on the imaginary axis of the s-plane.
6. Which of these 2K poles belong to H(s)?
For the transfer function H(s) to represent a stable and causal filter, all of its
poles must lie in the left half of the s-plane.
Those K poles of H(s)H( s) which lie in the left half of the s-plane are
allocated to H(s), and the remaining right half poles are allocated to
H( s).
H(s) is stable, H( s) is unstable.
Example 8.3 Butterworth Low-Pass Filter of Order 3
Determine the transfer function of a Butterworth filter of the low-pass type of
order K = 3. Assume that the 3-dB cutoff frequency c = 1.
<Sol.>
Signals_and_Systems_Simon 27
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Signals_and_Systems_Simon 28
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
1. For filter order K = 3, the 2K = 6 poles of H(s)H(s) are located on a circle of
unit radius with angular spacing 60, as shown in Fig.8.11(a). Hence,
allocating the left-half plane poles to H(s), we may define them as
1 3 1 3
s j s 1 and s j
2 2 2 2
2. The transfer function of a Butterworth filter of order 3 is therefore
1
H ( s)
1 3 1 3
s 1 s j s j (8.37)
2 2 2 2
Table 8.1 presents a summary of the transfer functions of Butterworth
filters of cutoff frequency c = 1 for up to and including filter order K = 6.
8.5.2 Chebyshev Filter
The tolerance of Fig. 8.8 calls for an approximating function that lies between 1
and 1 inside the passband range 0 p.
The Butterworth function meets this requirement, but concentrates its
approximating ability near = 0.
Signals_and_Systems_Simon 29
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Table 8.1 Summary of Butterworth Filter Transfer Functions.
1
H (s)
Q( s)
Filter Order K Polynomial Q(s)
1 s 1
2 s 2 2s 1
3 s3 2s 2 2s 1
4 s 4 2.6131s3 3.4142s 2 2.6131s 1
5 s5 3.2361s 4 5.2361s 3 5.2361s 2 3.2361s 1
6 s 6 3.9637 s 5 7.4641s 4 9.1416s3 7.4641s 2 3.8637 s 1
1. For a given filter order, we can obtain a filter with a reduced transition bandwidth
by using an approximating function that exhibits an rquiripple characteristic in the
passband (i.e., it oscillates uniformly between 1 and 1 for 0 p.), as
illustrated in Fig. 8.12 (a) and (b) for K = 3, 4, respectively, and 0.5 dB ripple in
the passband.
Signals_and_Systems_Simon 30
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
equiripple in equiripple in
passband passband
Monotonic Monotonic
in stopband in stopband
e ;v
Figure 8.12 (p. 629)
Magnitude response of Chebyshev filter for order (a) K = 3 and (b) K = 4 and
passband ripple = 0.5 dB. The frequencies b and a in case (a) and the
frequencies a1 and b, and a2 in case (b) are defined in accordance with the
optimality criteria for equiripple amplitude response.
Signals_and_Systems_Simon 31
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
2. The magnitude responses plotted here satisfy the equiripple criteria described
earlier for K odd and K even, respectively.
3. Approximating functions with an equiripple magnitude response are known
collectively as Chebyshev functions.
4. A filter designed on this basis is called a Chebyshev filter.
5. We may use another class of Chebyshev functions that exhibit a monotonic
response in the passband, but an equiripple response in the stopband, as
illustrated in Fig. 8.13 (a) and (b) for K = 3, 4, respectively, and 30-dB stopband
ripple.
A filter designed on this basis is called an inverse Chebyshev filter.
The transfer function of an inverse Chebyshev filter has zeros on the j -axis
of the s-plane.
6. The ideas embodied in Chebyshev and inverse Chebyshev filters can be
combined to further reduce the transition bandwidth by making the
approximating function equiripple in both the passband and stopband.
Such an approximating function is called an elliptic function, and a filter
resulting from its use is called an elliptic filter.
Other discussion: see page 630, textbook.
Signals_and_Systems_Simon 32
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Monotonic Monotonic
in passband in passband
equiripple in equiripple in
stopband stopband
d ; v
Figure 8.13 (p. 630)
Magnitude response of inverse Chebyshev filter for order (a) K = 3 and
(b) K = 4 and stopband ripple = 30 dB.
Signals_and_Systems_Simon 33
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Signals_and_Systems_Simon 34
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Example 8.4 Third-Order Butterworth High-Pass Filter
Equation(8.37) defines the transfer function of a Butterworth low-pass filter of
order 3 and unity cutoff frequency. Determine the transfer function of the
corresponding high-pass filter with cutoff frequency c = 1.
<Sol.>
1. Applying the frequency transformation equation(8.38) to the low-pass
transfer function of Eq.(8.37) yields the transfer function of the
corresponding high-pass filter with c = 1:
1
H ( s)
1 1 1
1 2 1
s s s
s3
s 1 ( s 2 s 1)
8.6.2 Low-Pass to Band-Pass Transformation
1. The frequency response H(j ) of a band-pass filter has the following
properties:
1) H(j ) = 0 at both = 0 and = .
Signals_and_Systems_Simon 35
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
2) |H(j )| 1 for a frequency band centered on 0, the midband frequency of the filter.
2. A low-pass to band-pass transformation that meets these requirements is
described by
0 midband frequency; B
s 2 0 2
s (8.40) bandwidth of the band-pass filter
Bs
Low-pass filter Band-pass filter
s=0 s = j 0
s= s = 0 and s =
3. A pole factor (s dj) in the transfer function H(s) of a low-pass prototype
filter is transformed as follows:
The frequency
1 Bs
transformations described in
s d j s p1 s p 2 (8.41)
Eqs. (840) and (8.41) are
reactance functions.
Note that the poles p1 and p2 are defined by
p1 , p 2 12 Bdj B 2 d j 4 0
2 2
(8.42) Network is entirely
consisted of Ls and Cs
Signals_and_Systems_Simon 36
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Signals_and_Systems_Simon 37
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Signals_and_Systems_Simon 38
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Signals_and_Systems_Simon 39
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
4. Analog filters, exemplified by the passive filters discussed in Section 8.7, are
characterized by an impulse response of infinite duration. (See Problem 8.9.)
5. There are two classes of digital filters, depending on the duration of the
impulse response:
1) Finite-duration impulse response (FIR) digital filters, the operation of which is
governed by linear constant-coefficient difference equations of a nonrecursive
nature. The transfer function of an FIR digital filter is a polynomial in z 1.
Consequently, FIR digital filters exhibit three important properties:
a) They have finite memory, and therefore, any transient start-up is of limited
duration.
b) They are always BIBO stable.
c) They can realize a desired magnitude response with an exactly linear
phase response (i.e., with no phase distortion), as explained subsequently.
2) Infinite-duration impulse response (IIR) digital filters, whose input-output
characteristics are governed by linear constant-coefficient difference equations
of a recursive nature. The transfer function of an IIR digital filter is a rational
function in z 1. Consequently, for a prescribed frequency response, the use of
an IIR digital filter generally results in a shorter filter length than does the use
of the corresponding GIR digital filter.
Signals_and_Systems_Simon 40
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
However, this improvement is achieved at the expense of phase distortion and a
transient start-up that is not limited to a finite time interval.
8.9 FIR Digital Filters
An inherent property of FIR digital filters is that they can realize a frequency
response with linear phase.
Linear phase response corresponds to constant delay.
The design simplifies to that of approximating a desired
magnitude response. Window
method
1. Notations:
h[n] = impulse response of FIR digital filter = inverse DTFT of H(e j)
H(e j) = frequency response
hd[n] = impulse response of FIR digital filter = inverse DTFT of Hd(e j)
M = filter order, corresponding to a filter length of M + 1
Hd(e j) = a desired frequency response over the frequency interval .
2. To design the filter, we are required to determine the filter coefficients h[n], n
= 0, 1 2, , M, so that the actual frequency response of the filter, namely, H(e
j), provides a good approximation to a desired frequency response over the
frequency interval .
Signals_and_Systems_Simon 41
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
3. A good measure of goodness of the approximation: Mean square error
1 2
Hd (e
j j
E ) H (e ) d (8.43)
2
Invoking Parsevals theorem from Section 3.16, we may redefine the error
measure in the equivalent form
Filter coefficients h[n] is the only
hd n h n
2
E (8.44) adjustable parameters
n
n n M 1
n 0
(8.48)
W e j H
1
e j d
2 d
The function
sin M 1 / 2
W e j
e jM / 2 , (8.49)
sin / 2
is the frequency response of the rectangular window w[n].
Fig. 8.16: Magnitude response |W(e j)| of the rectangular window for filter order M
= 12.
Signals_and_Systems_Simon 43
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Signals_and_Systems_Simon 46
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
11. To further compare the frequency response of the Hamming window with that of
the rectangular window, we have chosen to plot 20 log 10| W(e j))| for these two
windows in Fig.8.18 for M = 12. From this figure, we may make two important
observations:
1) The mainlobe of the rectangular window is less than half the width of the
mainlobe of the Hamming window.
2) The sidelobes of the Hamming window, relative to the mainlobe, are greatly
reduced compared with those of the rectangular window. Specifically, the
peak amplitude of the first sidelobe of the rectangular window is only about
13 dB below that of the mainlobe, whereas the corresponding value for the
Hamming window is about 40 dB below.
There is a price to be paid for this improvement, namely, a wider transition
band.
Since the windows are symmetric about n = M/2, for M even, we desire to
concentrate the maximum values of hd[n] about n = M/2. This is
accomplished by choosing the phase response arg{Hd(e j)} to be linear,
with zero intercept and a slope equal to M/2.
Signals_and_Systems_Simon 47
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Example 8.5 Comparison of Rectangular and Hamming Windows
Consider the desired frequency response
e jM / 2 , c
Hd e
j
, (8.51)
0, c
which represents the frequency response of an ideal low-pass filter with a
linear phase. Investigate the frequency response of an FIR digital filter of
length M = 12, using (a) a rectangular window and (b) a Hamming window.
Assume that c = 0.2 radians.
<Sol.>
1. The desired response is
1
hd n H d (e j )e jnd
2
(8.52)
1 c
2
c
e j ( n M / 2) d
2. Invoking the definition of the sinc function, we may express hd[n] in the
compact form
Signals_and_Systems_Simon 48
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
c c M
hd n sinc n , n (8.53)
2
3. This impulse response is symmetric about n = M/2, for M even, at which
point we have
M
hd c (8.54)
2
(a) Rectangular window. For the case of a rectangular window, the use of
Eq.(8.47) yields
c c M
sinc n , 0 n M ,
hn 2 (8.55)
0, otherwise
the value of which is given in the second column of Table 8.2 for c = 0.2 an M
= 12. The corresponding magnitude response |H(e j ))| is plotted in Fig. 8.19.
The oscillations in |H(e j ) | due to windowing the ideal impulse response are
evident at frequency greater than c = 0.2.
Signals_and_Systems_Simon 50
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Signals_and_Systems_Simon 52
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Table 8.2 Filter Coefficients of Rectangular and Hamming Windows for
Low-pass Filter (c = 0.2and M = 12).
h[n]
n Rectangular window Hamming window
0 0.0281 0.0027
1 0.0000 0.0000
2 0.0421 0.0158
3 0.0909 0.0594
4 0.1364 0.1271
5 0.1686 0.1914
6 0.1802 0.2180
7 0.1686 0.1914
8 0.1364 0.1271
9 0.0909 0.0594
10 0.0421 0.0158
11 0.0000 0.0000
12 0.0281 0.0027
Signals_and_Systems_Simon 53
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Signals_and_Systems_Simon 56
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Signals_and_Systems_Simon 57
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Table 8.3 Filter Coefficients of Rectangular and Hamming
Windows for a Differentiator.
h[n]
n Rectangular window Hamming window
0 0.1667 0.0133
1 0.2000 0.0283
2 0.2500 0.0775
3 0.3333 0.1800
4 0.5000 0.3850
5 1.0000 0.9384
6 0 0
7 1.0000 0.9384
8 0.5000 0.3850
9 0.3333 0.1800
10 0.2500 0.0775
11 0.2000 0.0283
12 0.1667 0.0133
Signals_and_Systems_Simon 58
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
8.9.1 Filtering of Speech Signals
1. The preprocessing of speech signals is fundamental to many applications,
such as the digital transmission and storage of speech, automatic speech
recognition, and automatic speaker recognition systems. FIR digital filters
are well suited for the preprocessing of speech signals, for two important
reasons:
1) In speech-processing applications, it is essential to maintain precise time
alignment. The exact linear phase property inherent in an FIR digital filter
caters to this requirement in a natural way.
2) The approximation problem in filter design is greatly simplified by the exact
linear phase property of an FIR digital filter. In particular, in not having to deal
with delay (phase) distortions, our only concern is that of approximating a
desired magnitude response.
Price to be paid to achieve these two desire features: To design am FIR
digital filter with a sharp cutoff characteristic, the length of the filter has to
be large, producing an impulse response with a long duration.
2. Example: Real-life speech signal
Fig. 8.22 (a): Female speaker saying the phrase, This was easy for us.
Sampling rate = 16 kHz, total number of samples = 27,751.
Signals_and_Systems_Simon 59
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Figure 8.22
(p. 643)
(a) Waveform of
raw speech
signal,
containing an
abundance of
high-frequency
noise. (b)
Waveform of
speech signal
after passing it
through a low-
pass FIR digital
filter of order M
= 98 and cutoff
frequency fc =
3.1 X 103 rad/s.
Signals_and_Systems_Simon 60
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
The speech signal is applied to an FIR digital low-pass filter with the following
specifications:
1) Length of filter, M + 1 = 99,
2) Symmetric about midpoint to obtain a linear phase response
3) Cutoff frequency fc = c/2 = 3.1 103 rad/sec
The design of the filter was based on the window method, using the Hanning or
raised cosine window, which is not to confused with the Hamming window. This
new window is defined by
1 2 n
1 cos , 0 n M .
W [n ] 2 M (8.61)
0, otherwise
The Hanning window goes to zero, with zero slope at the edges of the window (i.e.,
n = 0 and n = M).
Fig. 8.23 shows the magnitude spectra of the speech signal before and after
filtering.
Fig. 8.23 (a): unfiltered signal, Fig. 8.23 (b): filtered signal by FIR low-
pass filter with cutoff frequency = 3.1 k Hz
Signals_and_Systems_Simon 61
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Figure 8.23
(p. 644)
(a) Magnitude
spectrum of
unfiltered speech
signal. (b)
Magnitude
spectrum of
unfiltered speech
signal. Note the
sharp cutoff of
the spectrum
around 3100 Hz.
Signals_and_Systems_Simon 62
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
In listening to the unfiltered and filtered versions of the speech signal, the
following observations were made:
1) The unfiltered speech signal was harsh, with an abundance of high-frequency
noise such as clicks, pops, and hissing sounds.
2) The filtered signal, in contrast, was found to be much softer, smoother, and
natural sounding.
Filter design:
1) Signal data:
Sampling rate = 16 kHz, sampling interval Ts = 62.5 sec, total number of
samples = 27,751.
2) Filter data:
Order M = 98
In passing the speech signal through this filter with M + 1 = 99
coefficients, a delay of
M
Ts 62.5 49 3.0625 ms
2
is introduced into the filtered speech signal.
Signals_and_Systems_Simon 63
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
8.10 IIR Digital Filters
1. The bilinear transform, for converting analog transfer functions to digital
transfer functions, provides a unique mapping between points in the s-plane
and those in the z-plane.
2. Bilinear transform:
2 z 1
s , (8.62)
Ts z 1
where Ts = the implied sampling interval associated with conversion from
the s-domain to the z-domain.
For simplify matters, we shall set Ts = 2 henceforth.
3. Let Ha(s) denote the transfer function of an analog (continuous-time) filter.
The transfer function of the corresponding digital filter is obtained by
substituting the bilinear transformation of Eq. (8.62) in Ha(s), yielding
H ( z ) H a (s) s (( z 1) /( z 1)) . (8.63)
With Ts = 2, we have
Signals_and_Systems_Simon 64
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
1 s
z ,
1 s
4. Putting s = + j in this equation, we may express the complex variable z in
the polar form
z re j ,
where the radius and angle are defined, respectively, by
r z
1/ 2
(1 ) 2 2 (8.64)
2
(1 ) 2
and
arg z
w 1 w (8.65)
tan 1 tan .
1 1
5. From Eqs. (8.64) and (8.65), we readily see that
Signals_and_Systems_Simon 65
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
1) r < 1 for < 0.
2) r = 1 for = 0.
3) r > 1 for > 0.
4) = 2 tan 1 ( ) for = 0.
6. Accordingly, we may state the properties of the bilinear transform as follows:
1) The right-half of the s-plane is mapped onto the exterior of the unit circle in the
z-plane.
2) The entire j -axis of the s-plane is mapped onto one complete revolution of the
unit circle in the z-plane.
3) The right-half of the s-plane is mapped onto the exterior of the unit circle in the
z-plane.
These properties are illustrated in Fig. 8.24.
From property 1): If Ha(s) is stable and causal, then the digital filter derived from
it by using the bilinear transform given by Eq. (8.62) is guaranteed to be stable
and causal also.
Real coefficients in Ha(s) H(z) has real coefficients also
7. For = 0 and = , Eq. (8.65) reduces to
2 tan 1 ( ), (8.66) Fig. 8.25 for > 0.
Signals_and_Systems_Simon 66
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
v
0.0181( z 1) 3
H ( z) . (8.71)
( z 0.50953)( z 1.2505 z 0.39812)
2
3. Figure 8.26 shows the impulse response h[n] of the filter [i.e., the inverse z-
transform of the H(z) given in Eq.(8.71)].
4. In Section 7.9, we discussed different computational structures (i.e., cascade and
parallel forms) for implementing discrete-time systems. In light of the material
covered therein, we readily see that the transfer function of Eq.(8.71) can be
realized by using a cascade of two sections, as shown in Fig.8.27. The section
resulting from the bilinear transformation of the simple pole factor ((s/ c) + 1) in
Ha(s) is referred to as a first-order section.
5. Similarly, the section resulting from the bilinear transformation of the quadratic
pole factor ((s/ c) 2 + (s/ c) +1) in Ha(s) is referred to as a second-order section.
Indeed, this result may be generalized to say that the application of the bilinear
transform to Ha(s) in factored form results in a realization of H(z) that consists of a
cascade of first-order and second-order sections. From a practical point of view,
this kind of structure for implementing a digital filter has intuitive appeal.
Signals_and_Systems_Simon 71
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Signals_and_Systems_Simon 73
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
p ; v
Figure 8.28 (p. 649)
(a) Magnitude response of the IIR low-pass digital filter characterized by the
impulse response shown in Fig. 8.26, plotted in decibels. (b) Phase
response of the filter.
Signals_and_Systems_Simon 74
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
8.11 Linear Distortion
There is always a certain amount of distortion present in the output signal
of a physical LTI system.
In particular, we may distinguish two components of linear distortion
produced by transmitting a signal through an LTI system:
1. Amplitude distortion. When the magnitude response of the system is not constant
inside the frequency band of interest, the frequency components of the input
signal are transmitted through the system with different amounts of gain or
attenuation. This effect is called amplitude distortion. The most common form of
amplitude distortion is excess gain or attenuation at one or both ends of the
frequency band of interest.
2. Phase distortion. The second form of linear distortion arises when the phase
response of the system is not linear with frequency inside the frequency band
of interest. If the input signal is divided into a set of components, each one of
which occupies a narrow band of frequencies, we find that each such
component is subject to a different delay in passing through the system, with
the result that the output signal emerges with a waveform different from that of
input signal. This form of linear distortion is called phase or delay distortion.
Signals_and_Systems_Simon 75
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
In CT LTI system:
A constant delay means a linear phase response (i.e., arg{H(j )} = t0 , where t0
is the constant delay).
A constant phase shift means that arg{H(j )} equals some constant for all .
Constant delay is a requirement for distortionless transmission; constant
phase shift causes the signal to be distorted.
An LTI system that suffers from linear distortion is said to be dispersive.
8.12 Equalization
1. To compensate for linear distortion, we may use a network known as an
equalizer connected in cascade with the system in question: Fig. 8.29.
Signals_and_Systems_Simon 76
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
2. Communication system:
1) Hc(j ) = frequency response of the communication system
2) Heq(j ) = frequency response of the cascaded equalizer
3. Distortionless condition: where t0 is the constant delay
H c ( j ) H eq ( j ) e jt0 , (8.72)
j t 0 The scaling factor C equals to unity.
e
H eq ( j ) . (8.73)
H c ( j )
The above mentioned condition is also applicable to the design of DT
equalizer.
Tapped-delay-line equalizer:
1. Filter type: FIR filter.
2. Filter structure: Fig. 8.20.
3. If the sampling interval equals Ts, the equalizer frequency response is
M The subscript is intended to
H ,eq ( j ) h[n] exp( jnTs ). (8.74) distinguish H from its CT
n 0
counterpart Heq(j ).
Signals_and_Systems_Simon 77
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Signals_and_Systems_Simon 78
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
e jt0 / H c ( j ) , c c
H d ( j ) (8.75)
0, otherwise
be the frequency response we seek to approximate with H ,eq (j ). We
accomplish this task by using a variation of the window method of FIR filter
design, as summarized in Procedure 8.1.
Procedure 8.1 Summary of Window Method for the Design of an Equalizer.
Start with a specified order M, assumed to be an even integer. Then, for a given
sampling interval Ts, proceed as follows:
1. Set the constant time delay t0 M 2 Ts
2. Take the inverse Fourier transform of H d j to obtain a desired impulse
response hd t .
3. Set h[n] w[n]hd nTs , where is w[n] a window of length M 1 . Note that
the sampling operation does not cause aliasing of the desired response in the
band c c , since we chose Ts c .
Signals_and_Systems_Simon 79
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Example 8.8 Design of An equalizer for A First-Order Butterworth Channel
Consider a simple channel whose frequency response is described by the
first-order Butterworth response
1
H c ( j ) .
1 j /
Design an FIR filter with 13 coefficients (i.e., M = 12) for equalizing this channel
over the frequency band . Ignore the effect of channel noise.
<Sol.>
1. In this example, the channel equalization problem is simple enough for us to
solve without having to resort to the use of numerical integration.
2. With c = , the sampling interval is Ts = 1 s.
3. Now, from Eq. (8.75), we have
j j 6
,
H d ( j ) e
1
.
0, otherwis e
4. The nonzero part of the frequency response Hd(j ) consists of the sum of two
terms: unity and j /, except for a linear term.
Signals_and_Systems_Simon 80
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
5. These two terms are approximated as follow:
1) The term j / represents a scaled from of differentiation. The design of a
differentiator using an FIR filter was discussed in Example 8.6. Indeed,
evaluating the inverse Fourier transform of j / and then setting t = n for a
sampling interval Ts = 1 s, we get Eq. (8.59), scaled by 1/. Thus, using the
result obtained in that example, which incorporated the Hamming window of
length 13, and scaling it by 1/,we get the values listed in the second column of
Table 8.4.
2) The inverse Fourier transform of the unity term is sinc(t). Setting t = nTs = n
and weighting it with the Hamming window of length 13, we get the set of
values listed in column 3 of the table.
6. Adding these two sets of values, we get the Hamming-windowed FIR filter
coefficients for the equalizer listed in the last column of the table. Note that
this filter is antisymmetric about the mid point n = 6.
7. Figure 8.30 superposes of the magnitude responses of the channel, the FIR
equalizer, and the equalized channel. The responses are potted for the band
0 . From the figure, we see that the magnitude response of the
equalized channel is essentially flat over the band 0 2.5.
Signals_and_Systems_Simon 81
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Table 8.4 Filter Coefficients for Example 8.8 on Equalization
Hamming-windowed Hamming-windowed
n inverse Fourier inverse Fourier hd[n]
transform of j/ transform of j/
0 -0.0042 0 -0.0042
1 0.0090 0 0.0090
2 -0.0247 0 -0.0247
3 0.0573 0 0.0573
4 -0.1225 0 -0.1225
5 0.2987 0 0.2987
6 0 1 1.0000
7 -0.2987 0 -0.2987
8 0.1225 0 0.1225
9 -0.0573 0 -0.0573
10 0.0247 0 0.0247
11 -0.0090 0 -0.0090
12 0.0042 0 0.0042
Signals_and_Systems_Simon 82
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Signals_and_Systems_Simon 86
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
1.2
1
Resolution:
0.8 r = 0.01;
cutoff frequency:
c = 4
0.6
0.4
0.2
-0.2
-1.5 -1 -0.5 0 0.5 1 1.5
Fig.8.6 (a)
Signals_and_Systems_Simon 87
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
8.13.2 FIR Digital Filter
For designing FIR filters based on the window methods, two MATLAB
routines can be used: fir1 and fir2.
1. The command
b=fir1 (M,wc)
design an Mth-order low-pass digital filter and returns the filters coefficients
in vector b of length M + 1. The cutoff frequency wc is normalized so that it
lies in the interval [0,1], with 1 corresponding to one-half the sampling rate,
or = in discrete-time frequency. By default, fir1 uses a Hamming window;
it also allows the use of several other windows, including the rectangular and
Hanning windows. (In MATLAB, the rectangular window is referred to as the
boxcar). The use of a desired window can be specified with an optional
trailing argument .for example, fir(M,wc,boxcar (M + 1)) uses a rectangular
window. Note that, by default, the filter is scaled so that the center of the first
passband has a magnitude of exactly unity after windowing.
Signals_and_Systems_Simon 88
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
2. fir2 designs an FIR filter with arbitrary frequency response. The command
b=fir(M,F,K)
design a filter of order M with frequency response specified by vectors F and K.
the vector F specifies frequency points in the range [0,1], where 1 corresponds to
one-half the sample rate . or = . The vector K is a vector containing the
desired magnitude response at the points specified in F. the vectors F and K must
have the same length. As with fir1, by default fir2 uses a Hamming window; other
windows can be specified with an optional trailing argument.
fir1 was used to design the FIR filters considered in Examples 8.5 and 8.6.
Example 8.5 (Revisited)
1. Order of filter: M = 12.
2. Window methods: (a) a rectangular (boxcar) window, (b) a Hamming window.
3. MATLAB commands for designing these filters and evaluating their
frequency responses:
(a) Rectangular window:
b = fir1(12,0.2,boxcar(13));
[H,w]=freqz(b,1,512);
db=20*log10(abs(H));
plot(w,db);
Signals_and_Systems_Simon 89
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
(b) Hamming window: 0
b=fir1(12,0.2,hamming(13));
[H,w]=freqz(b,1,512);
db=20*log10(abs(H)); -20
plot(w,db)
-40
-60
Example 8.6 (Revisited)
1. The frequency response of
a discrete-time
-80
differentiator is defined as 0 1 2 3 4
H d (e j ) je jM / 2 .
2. MATLAB commands for designing the filters via the use of a rectangular
window and a Hamming window:
Signals_and_Systems_Simon 90
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
clear
load spk_sam
speech=tst1;
b=fir1(98,3000/8000,hamming(99));
filt_sp=filter(b,1,speech);
f=0:8000/127:8000;
subplot(2,1,1);
spect=fft(speech,256);
plot(f,abs(spect(1:128))/max(abs(spect(1:128))));
subplot(2,1,2)
filt_spect=fft(filt_sp,256);
plot(f,abs(filt_spect(1:128));
max(abs(filt_spect(1:128))));
[b,a]=butter(K,w)
This MATLAB command designs a low-pass IIR filter with a Butterworth response
of order k and returns the coefficients of the transfer functions numerator and
denominator polynomials in vectors a and b, respectively, of length.
3. The cutoff frequency w of the filter must be normalized so that it lies in the
interval [0,1], with 1 corresponding to = .
Example 8.7 (Revisited)
The commands for designing the IIR digital filter in Example 8.7 and evaluating
its frequency response are as follows:
[b,a]=butter(3,0.2);
[H,w]=freqz(b,a,512);
mag=20*log10(abs(H));
plot(w,mag)
phi=angle(H);
phi=(180/pi)*phi; % convert from radians to degrees
plot(w,phi)
Signals_and_Systems_Simon 93
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
8.13.5 Equalization
1. Consider the design of an FIR digital filter to equalize a channel with
frequency response
1
H c (j) .
1 (j / )
2. The desired frequency response of the equalizer is
j jM / 2
(1 )e ,
H d ( j ) ,
0, otherwise
where M + 1 is the length of the equalizer .
3. Note that the equalizer consists of two components connected in parallel:
an ideal low-pass filter and a differentiator.
4. Assuming a Hamming window of length M + 1, we may build on the
commands used for Example 8.1 and 8.6.
5. The corresponding set of commands for designing the equalizer and
evaluating its frequency response may thus be formulated as follows:
Signals_and_Systems_Simon 94
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
clear;clc;
taps=13;
M=taps-1;
n=0:M;
f=n-M/2;
a=cos(pi*f)./f; %Integration by parts eq.8.59
b=sin(pi*f)./(pi*f.^2);
h=a-b; %Inpulse resp. of window
k=isnan(h);h(k)=0; %Get rid of not a number
%Response of Equalizer
hh=(hamming(taps)'.*h)/pi;
k=fftshift(ifft(ones(taps,1))).*hamming(taps);
[Heq,w]=freqz(hh+k',1,512,2*pi);
%Response of Channel
den=sqrt(1+(w/pi).^2);
Hchan=1./den;
%Response of Equalized Channel
Hcheq=Heq.*Hchan;
%Plot
figure(1);clf
hold on
plot(w,abs(Heq),'b--')
plot(w,abs(Hchan),'g-.')
plot(w,abs(Hcheq),'r')
hold off
axis([0 3.5 0.7 1:4])
legend('Equalizer','Channel','Equalized Channel')
Signals_and_Systems_Simon 95
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
1.3
1.2
1.1
1
0.9
0.8
0.7
0 1 2 3 4
Signals_and_Systems_Simon 96
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Signals_and_Systems_Simon 97
Haykin & Barry Van Veen
CHAPTER
Application to Filters and equalizers
Signals_and_Systems_Simon 98
Haykin & Barry Van Veen