0% found this document useful (0 votes)
13 views

DSP BEC502 Module-4

The document discusses the characteristics of practical frequency-selective filters, highlighting that ideal filters are noncausal and not physically realizable. It explains the design of FIR filters, including symmetric and antisymmetric types, and the importance of passband and stopband ripples. Additionally, it covers the design of linear-phase FIR filters using windowing techniques to achieve desired frequency responses.

Uploaded by

swathigandhi21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

DSP BEC502 Module-4

The document discusses the characteristics of practical frequency-selective filters, highlighting that ideal filters are noncausal and not physically realizable. It explains the design of FIR filters, including symmetric and antisymmetric types, and the importance of passband and stopband ripples. Additionally, it covers the design of linear-phase FIR filters using windowing techniques to achieve desired frequency responses.

Uploaded by

swathigandhi21
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/ 32

Module-4

Characteristics of practical frequency-selective filters


We know that, ideal filters are noncausal and hence physically unrealizable
for real-time signal processing applications. Causality implies that the
frequency response characteristic 𝐻(𝜔) of the filter cannot be zero, except at
a finite set of points in the frequency range. In addition, 𝐻(𝜔) cannot have
an infinitely sharp cut off from passband to stopband, that is, 𝐻(𝜔) cannot
drop from unity to zero abruptly. Although the frequency response
characteristics possessed by ideal filters may be desirable, they are not
absolutely necessary in most practical applications. If we relax these
conditions, it is possible to realize causal filters that approximate the ideal
filters as closely as we desire. In particular, it is not necessary to insist that
the magnitude |𝑯(𝝎)| to be constant in the entire passband of the filter. A
small amount of ripple in the passband, as illustrated in figure 1, is usually
tolerable. Similarly, it is not necessary for the filter response |𝑯(𝝎)| to be
zero in the stopband. A small, nonzero value or a small amount of ripple in
the stopband is also tolerable.

Figure 1: Magnitude characteristics of physically realizable filters.

The transition of the frequency response from passband to stopband defines


the transition band or transition region of the filter, as illustrated in figure
1. The band-edge frequency 𝝎𝒑 , defines the edge of the passband while the
frequency 𝝎𝒔 , denotes the beginning of the stopband. Thus the width of the
transition band is 𝝎𝒔 − 𝝎𝒑 . The width of the passband is usually called the
bandwidth of the filter. For example, if the filter is lowpass with a passband
edge frequency 𝝎𝒑 , its bandwidth is 𝝎𝒑 .

If there is ripple in the passband of the filter, its value is denoted as 𝜹𝟏 , and
the magnitude |𝑯(𝝎)| varies between the limits 𝟏 ± 𝜹𝟏 . The ripple in the
stopband of the filter is denoted as 𝜹2 . To accommodate a large dynamic
range in the graph of the frequency response of any filter, it is common
practice to use a logarithmic scale for the magnitude |𝑯(𝝎)|. Consequently,
the ripple in the passband is 𝟐𝟎𝒍𝒐𝒈𝟏𝟎 𝜹𝟏 decibels, and that in the stopband is
𝟐𝟎𝒍𝒐𝒈𝟏𝟎 𝜹2 . In any filter design problem we can specify (1) the maximum
tolerable passband ripple, (2) the maximum tolerable stopband ripple, (3)
the passband edge frequency 𝝎𝒑 , and (4) the stopband edge frequency 𝝎𝑠 .

Design of FIR filters

1. Symmetric and Antisymmetric FIR Filters

An FIR filter of length 𝑴 with input 𝒙(𝒏) and output 𝒚(𝒏) is described by the
difference equation

𝒚(𝒏) = 𝒃𝟎 𝒙(𝒏) + 𝒃𝟏 𝒙(𝒏 − 𝟏) + ⋯ + 𝒃𝑴−𝟏 𝒙(𝒏 − 𝑴 + 𝟏)


𝑴−𝟏

𝒚(𝒏) = ∑ 𝒃𝒌 𝒙(𝒏 − 𝒌) − − − (𝟏)


𝒌=𝟎

where {𝒃𝒌 } is the set of filter coefficients. Alternatively, we can express the
output sequence as the convolution of the unit sample response 𝒉(𝒏) of the
system with the input signal. Thus we have,
𝑴−𝟏

𝒚(𝒏) = ∑ ℎ(𝑘) 𝒙(𝒏 − 𝒌) − − − (2)


𝒌=𝟎

where the lower and upper limits on the convolution sum reflect the
causality and finite-duration characteristics of the filter. Clearly, equations
(1) and (2) are identical in form and hence it follows that 𝒃𝒌 = 𝒉(𝑘),
𝒌 = 𝟎, 𝟏, . . . , 𝑴 − 𝟏. The filter can also be characterized by its system function
𝑴−𝟏

𝐻(𝑍) = ∑ 𝒉(𝒌) 𝑍 −𝑘 − − − (3)


𝒌=𝟎

which we view as a polynomial of degree 𝑀 − 1 in the variable 𝒁−1 . The roots


of this polynomial constitute the zeros of the filter. An FIR filter has linear
phase if its unit sample response satisfies the condition

𝒉(𝒏) = ±𝒉(𝑴 − 𝟏 − 𝒏) − − − (4)

where 𝒏 = 𝟎, 𝟏, … , 𝑴 − 𝟏.

If 𝐡(𝐧) = 𝐡(𝐌 − 𝟏 − 𝐧) then FIR filter is symmetric and if 𝒉(𝒏) = −𝒉(𝑴 − 𝟏 − 𝒏)


then FIR filter is Antisymmetric.

When 𝐡(𝐧) = 𝐡(𝐌 − 𝟏 − 𝐧), 𝑯(𝝎) can be expressed as,


𝑴−𝟏
−𝒋𝝎( )
𝟐
𝑯(𝝎) = |𝑯(𝝎)|𝒆 − − − (5)

The magnitude can be expressed as,


𝑴−𝟑
𝟐
𝑴−𝟏 𝑴−𝟏
|𝑯(𝝎)| = 𝒉 ( ) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎 ( − 𝒏) ; 𝑴 𝑶𝒅𝒅
𝟐 𝟐
𝒏=𝟎

𝑴
−𝟏
𝟐
𝑴−𝟏
|𝑯(𝝎)| = 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎 ( − 𝒏) ; 𝑴 𝑬𝒗𝒆𝒏
𝟐
𝒏=𝟎

The phase characteristic of the filter for both M odd and M even is

𝑴−𝟏
−𝝎 (
), |𝑯(𝝎)| > 𝟎
∠𝑯(𝝎) = 𝝋(𝝎) = { 𝟐
𝑴−𝟏
−𝝎 ( ) + 𝝅, |𝑯(𝝎)| < 𝟎
𝟐

When 𝐡(𝐧) = −𝐡(𝐌 − 𝟏 − 𝐧), 𝑯(𝝎) can be expressed as,


𝑴−𝟏 𝝅
𝒋[−𝝎( )+ ]
𝟐 2
𝑯(𝝎) = |𝑯(𝝎)|𝒆 − − − (5)

The magnitude can be expressed as,


𝑴−𝟑
𝟐
𝑴−𝟏 𝑴−𝟏
|𝑯(𝝎)| = 𝒉 ( ) + 𝟐 ∑ 𝒉(𝒏)𝑠𝑖𝑛𝝎 ( − 𝒏) ; 𝑴 𝑶𝒅𝒅
𝟐 𝟐
𝒏=𝟎

𝑴
−𝟏
𝟐
𝑴−𝟏
|𝑯(𝝎)| = 𝟐 ∑ 𝒉(𝒏)𝑠𝑖𝑛𝝎 ( − 𝒏) ; 𝑴 𝑬𝒗𝒆𝒏
𝟐
𝒏=𝟎

The phase characteristic of the filter for both M odd and M even is

𝝅 𝑴−𝟏
− 𝝎( ), |𝑯(𝝎)| > 𝟎
∠𝑯(𝝎) = 𝝋(𝝎) = { 𝟐 𝟐
𝟑𝝅 𝑴−𝟏
− 𝝎( ) + 𝝅, |𝑯(𝝎)| < 𝟎
𝟐 𝟐
These general frequency response formulas can be used to design linear
phase F'IR filters with symmetric and antisymmetric unit sample responses.

2. Design of Linear-Phase FIR Filters Using Windows

The design of linear-phase FIR filters using windows start with the desired
frequency response specification 𝐻𝑑 (𝜔) and determining the corresponding
unit sample response ℎ𝑑 (𝑛). 𝐻𝑑 (𝜔) and ℎ𝑑 (𝑛) are related by the Fourier
transform relation

𝑯𝒅 (𝝎) = ∑ 𝒉𝒅 (𝒏)𝒆−𝒋𝝎𝒏 − − − (𝟏)


𝒏=𝟎
𝟏 𝝅
where, 𝒉𝒅 (𝒏) = ∫ 𝑯 (𝝎)𝒆−𝒋𝝎𝒏 𝒅𝝎 − − − (𝟐)
𝟐𝝅 −𝝅 𝒅

In general, the unit sample response ℎ𝑑 (𝑛) obtained from (1) is infinite
in duration and must be truncated at some point, say at 𝒏 = 𝑴 − 𝟏, to yield
an FIR filter of length M. Truncation of ℎ𝑑 (𝑛) to a length M - 1 is equivalent
to multiplying 𝒉𝒅 (𝒏) by a "rectangular window 𝜔(𝑛)", defined as

𝟏, 𝒏 = 𝟎, 𝟏, … … , 𝑴 − 𝟏
𝝎(𝒏) = { − − − (𝟑)
𝟎, 𝑶𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆

Thus the unit sample response of the FIR filter becomes

𝒉(𝒏) = 𝒉𝒅 (𝒏)𝝎(𝒏) − − − (𝟒)

𝒉𝒅 (𝒏), 𝒏 = 𝟎, 𝟏, … … , 𝑴 − 𝟏
𝒉(𝒏) = { − − − (𝟓)
𝟎, 𝑶𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆

The multiplication of the window function 𝝎(𝒏) with 𝒉𝒅 (𝒏) is equivalent to


convolution of 𝑯𝒅 (𝝎) with 𝑾(𝝎), where 𝑾(𝝎) is the frequency-domain
representation (Fourier transform) of the window function, that is,
𝑴−𝟏

𝑾(𝝎) = ∑ 𝝎(𝒏)𝒆−𝒋𝝎𝒏 − − − (𝟔)


𝒏=𝟎

Thus the convolution of 𝑯𝒅 (𝝎) with 𝑾(𝝎) yields the frequency response of
the (truncated) FIR filter. That is,
𝝅
𝟏
𝑯(𝝎) = ∫ 𝑯𝒅 (𝒗)𝑾(𝝎 − 𝒗)𝒅𝒗 − − − (𝟕)
𝟐𝝅
−𝝅

The Fourier transform of the rectangular window is


𝑴−𝟏

𝑾(𝝎) = ∑ 𝝎(𝒏)𝒆−𝒋𝝎𝒏
𝒏=𝟎

𝑴−𝟏

= ∑ (𝟏)𝒆−𝒋𝝎𝒏
𝒏=𝟎

𝑴−𝟏

= ∑ (𝒆−𝒋𝝎 )𝒏
𝒏=𝟎

𝟏 − 𝒆−𝒋𝝎𝑴
=
𝟏 − 𝒆−𝒋𝝎

𝒆−𝒋𝝎𝑴/𝟐 𝒆𝒋𝝎𝑴/𝟐 − 𝒆−𝒋𝝎𝑴/𝟐 𝒆−𝒋𝝎𝑴/𝟐


=
𝒆−𝒋𝝎/𝟐 𝒆𝒋𝝎𝑴/𝟐 − 𝒆−𝒋𝝎/𝟐 𝒆−𝒋𝝎/𝟐
𝒆−𝒋𝝎𝑴/𝟐 [𝒆𝒋𝝎𝑴/𝟐 − 𝒆−𝒋𝝎𝑴/𝟐 ]
=
𝒆−𝒋𝝎/𝟐 [𝒆𝒋𝝎𝑴/𝟐 − 𝒆−𝒋𝝎/𝟐 ]
𝝎𝑴
𝒆−𝒋𝝎𝑴/𝟐 [𝟐𝒋𝒔𝒊𝒏 ( 𝟐 )]
= 𝝎
𝒆−𝒋𝝎/𝟐 [𝟐𝒋𝒔𝒊𝒏 ( 𝟐 )]

𝒋𝝎𝑴 𝒋𝝎 𝝎𝑴
𝒆− −
𝟐 𝒆 𝟐 [𝒔𝒊𝒏 ( )]
= 𝟐
𝝎
[𝒔𝒊𝒏 ( 𝟐 )]

𝒋𝝎 𝝎𝑴
𝒆− 𝟐 (𝑴−𝟏) [𝒔𝒊𝒏 ( 𝟐 )]
𝑾(𝝎) = 𝝎 − − − (𝟖)
[𝒔𝒊𝒏 ( 𝟐 )]

This window function has a magnitude response

𝝎𝑴
𝒔𝒊𝒏 ( 𝟐 )
|𝑾(𝝎)| = | 𝝎 | ; −𝝅 ≤ 𝝎 ≤ 𝝅 − − − (𝟗)
𝒔𝒊𝒏 ( 𝟐 )

and a piecewise linear phase

𝑴−𝟏
−𝝎 ( ) ; 𝑤hen 𝒔𝒊𝒏(𝝎𝑴/𝟐) ≥ 𝟎
𝚽(𝝎) = { 𝟐 − − − (𝟏𝟎)
𝑴−𝟏
−𝝎 ( ) + 𝝅; when 𝒔𝒊𝒏(𝝎𝑴/𝟐) < 𝟎
𝟐
The magnitude response of the window functions illustrated in Figure 2 for
M=31 and 61. The width of the main lobe [width is measured to the first
zero of 𝑾(𝝎)] is 𝟒𝝅/𝑴.

Figure 2: Frequency response for rectangular window of lengths (a) M = 31, (b) M =61.

Hence, as M increases, the main lobe becomes narrower. However, the side
lobes of I 𝑾(𝝎) are relatively high and remain unaffected by an increase in
M.

The characteristics of the rectangular window play a significant role in


determining the resulting frequency response of the FIR filter obtained by
truncating 𝒉𝒅 (𝒏) to length M. Specifically, the convolution of 𝑯𝒅 (𝝎) with
𝑾(𝝎) has the effect of smoothing 𝑯𝒅 (𝝎). AS M is increased, 𝑾(𝝎)becomes
narrower, and the smoothing provided by 𝑾(𝝎) is reduced. On the other
hand, the large sidelobes of 𝑾(𝝎) result in some undesirable ringing effects
in the FIR filter frequency response 𝑯(𝝎), and also in relatively larger side
lobes in 𝑯(𝝎). These undesirable effects are reduced by the use of windows
that do not contain abrupt discontinuities in their time-domain
characteristics, and have correspondingly low sidelobes in their frequency-
domain characteristics.

Table 1 lists several window functions that possess desirable frequency


response characteristics. Figure 3 illustrates the time-domain
characteristics of the windows.

Table 1: Window functions for FIR filter design

Time domain sequence


Name of window
𝒉(𝒏), 𝟎 ≤ 𝒏 ≤ 𝑴 − 𝟏
𝑴−𝟏
Bartlett (Triangular) 𝟐 |𝒏 − |
𝟏− 𝟐
𝑴−𝟏
𝟐𝝅𝒏
Hamming 𝟎. 𝟓𝟒 − 𝟎. 𝟒𝟔 𝒄𝒐𝒔 ( )
𝑴−𝟏
𝟏 𝟐𝝅𝒏
Hanning (𝟏 − (𝒄𝒐𝒔 ))
𝟐 𝑴−𝟏
𝟐𝝅𝒏 𝟒𝝅𝒏
Blackman 𝟎. 𝟒𝟐 − 𝟎. 𝟓 𝒄𝒐𝒔 ( ) + 𝟎. 𝟎𝟖 𝒄𝒐𝒔 ( )
𝑴−𝟏 𝑴−𝟏

Figure 3: Shapes of several window functions.

The frequency response characteristics of the Hanning, Hamming and


Blackman windows are illustrated in figure 4, 5 and 6.
Figure 4: Frequency response of Hanning window for (a) M = 31 and (b) M =61.

Figure 5: Frequency response of Hamming window for (a) M = 31 and (b) M =61.

Figure 6: Frequency response of Blackman window for (a) M = 31 and (b) M =61.

All of these window functions have significantly lower sidelobes compared


with the rectangular window. However, for the same value of M, the width of
the main lobe is also wider for these windows compared to the rectangular
window. Consequently, these window functions provide more smoothing
through the convolution operation in the frequency domain, and as a result,
the transition region in the FIR filter response is wider. To reduce the width
of this transition region, we can simply increase the length of the window
which results in a larger filter. Table 2 summarizes these important
frequency domain features of the various window functions.

Table 2: Important frequency-domain characteristics of some window


functions

Approximate transition width of Peak side


Type of window
main lobe lobe (dB)
Rectangular 𝟒𝝅/𝑴 -13
Bartlett 𝟖𝝅/𝑴 -27
Hanning 𝟖𝝅/𝑴 -32
Hamming 𝟖𝝅/𝑴 -43
Blackman 𝟏𝟐𝝅/𝑴 -58

The window technique is best described in terms of a specific example. Suppose


that we want to design a symmetric low pass linear-phase FIR filter having a
desired frequency response

𝒆−𝒋𝝎𝝉 , 𝟎 ≤ |𝝎| ≤ 𝝎𝒄
𝑯𝒅 (𝝎) = {
𝟎, 𝑶𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
𝑴−𝟏
Where, 𝝉 = ( )
𝟐
The corresponding unit sample response is given by
𝟏 𝝎𝒄 𝒋𝝎(𝒏−𝝉)
𝒉𝒅 (𝒏) = ∫ 𝒆 𝒅𝝎
𝟐𝝅 −𝝎𝒄

After solving the integral we get,

𝒔𝒊𝒏𝝎𝒄 (𝒏 − 𝝉)
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 ≠ 𝝉
𝝅(𝒏 − 𝝉)

and
𝝎𝒄
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 = 𝝉
𝝅
The unit sample response ℎ𝑑 (𝑛) obtained from the above equations is infinite in
duration and must be truncated at some point, say at 𝒏 = 𝑴 − 𝟏, to yield an FIR
filter of length M. Thus the unit sample response of the FIR filter becomes
𝒉(𝒏) = 𝒉𝒅 (𝒏)𝝎(𝒏)
Where, 𝜔(𝑛) represents the rectangular window function.

The magnitude of the frequency response 𝑯(𝝎) of the above filter design is
illustrated in Figure 6 for M = 61 and M = 101. We observe that relatively
large oscillations or ripples occur near the band edge of the filter. The
oscillations increase in frequency as M increases, but they do not diminish
in amplitude. These large oscillations are the direct result of the large
sidelobes existing in the frequency characteristic 𝑾(𝝎) of the rectangular
window. The oscillatory behavior near the band edge of the filter is called the
Gibbs phenomenon.

Figure 7: Low pass filter designed with a rectangular window (a) M = 61 and
(b) M = 101

To reduce the presence of large oscillations in both the passband and the
stopband, we should use a window function that contains a taper and
decays toward zero gradually, instead of abruptly, as it occurs in a
rectangular window. Figures 8, illustrate the frequency response of the
resulting filter when hamming window function is used to taper 𝒉𝒅 (𝒏). As
illustrated in figure 8, the window functions do indeed eliminate the ringing
effects at the band edge and do result in lower sidelobes at the expense of an
increase in the width of the transition band of the filter.

Figure 8: Lowpass filter designed with rectangular window (M=61)


Figure 9: Lowpass filter designed with Hamming window (M=61)

Problem: A lowpass filter is to be designed with the following frequency


response
𝝅
𝒆−𝒋𝟐𝝎 , 𝝎<
𝑯𝒅 (𝝎) = { 𝟒
𝝅
𝟎, <𝝎 <𝝅
𝟒

Determine the filter coefficient 𝒉𝒅 (𝒏) and impulse response 𝒉(𝒏). If 𝒘(𝒏) is
𝟏, 𝟎 ≤ 𝒏 ≤ 𝟒
rectangular window defined as 𝒘𝑹 (𝒏) = { . Find the frequency
𝟎, 𝑶𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
response of the resulting FIR filter.
𝝅
𝒆−𝒋𝟐𝝎 , 𝝎< 𝟒
Solution: Given 𝑯𝒅 (𝝎) = { 𝝅
𝟎, <𝝎 <𝝅
𝟒

and it represents the desired frequency responses of a lowpass filter.


𝑴−𝟏 𝝅
Here, 𝝉 = 𝟐
= 𝟐 𝒂𝒏𝒅 𝑴 = 𝟓, 𝝎𝒄 = 𝟒

The unit sample response is given by

𝒔𝒊𝒏𝝎𝒄 (𝒏 − 𝝉)
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 ≠ 𝝉
𝝅(𝒏 − 𝝉)

and
𝝎𝒄
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 = 𝝉
𝝅
Therefore,
𝝅
𝒔𝒊𝒏 (𝒏 − 𝟐)
𝒉𝒅 (𝒏) = 𝟒 𝒇𝒐𝒓 𝒏 ≠ 𝟐
𝝅(𝒏 − 𝟐)

and
𝝅
𝟏
𝒉𝒅 (𝒏) = 𝟒 = 𝒇𝒐𝒓 𝒏 = 𝟐
𝝅 𝟒
The unit sample response of the FIR filter is given by

𝒉(𝒏) = 𝒉𝒅 (𝒏)𝒘𝑹 (𝒏)

n 𝒉𝒅 (𝒏) 𝒘𝑹 (𝒏) 𝒉(𝒏)


0 0.1592 1 0.1592
1 0.2251 1 0.2251
2 0.25 1 0.25
3 0.2251 1 0.2251
4 0.1592 1 0.1592

𝒉(𝒏) = {𝟎. 𝟏𝟓𝟗𝟐, 𝟎. 𝟐𝟐𝟓𝟏, 𝟎. 𝟐𝟓, 𝟎. 𝟐𝟐𝟓, 𝟎. 𝟏𝟓𝟗𝟐}

The calculated ℎ(𝑛), represents symmetric FIR filter with M odd. Therefore,
the frequency response of the filter is given by
𝑴−𝟑
𝟐
𝑴−𝟏 𝑴−𝟏 𝑴−𝟏
𝑯(𝝎) = 𝒉 ( ) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎 ( − 𝒏) 𝒆−𝒋( 𝟐 )𝝎
𝟐 𝟐
𝒏=𝟎
{ }
𝟓−𝟑
𝟐
𝟓−𝟏 𝟓−𝟏 𝟓−𝟏
= 𝒉( ) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎 ( − 𝒏) 𝒆−𝒋( 𝟐 )𝝎
𝟐 𝟐
𝒏=𝟎
{ }
𝟏

= {𝒉(𝟐) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎(𝟐 − 𝒏)} 𝒆−𝒋𝟐𝝎


𝒏=𝟎

= {𝒉(𝟐) + 𝟐(𝒉(𝟎)𝒄𝒐𝒔𝝎(𝟐 − 𝟎) + 𝒉(𝟏)𝒄𝒐𝒔𝝎(𝟐 − 𝟏))}𝒆−𝒋𝟐𝝎

= {𝒉(𝟐) + 𝟐(𝒉(𝟎)𝒄𝒐𝒔𝟐𝝎 + 𝒉(𝟏)𝒄𝒐𝒔𝝎)}𝒆−𝒋𝟐𝝎

= {𝟎. 𝟐𝟓 + 𝟐(𝟎. 𝟏𝟓𝟗𝟐𝒄𝒐𝒔𝟐𝝎 + 𝟎. 𝟐𝟐𝟓𝟏𝒄𝒐𝒔𝝎)}𝒆−𝒋𝟐𝝎

𝑯(𝝎) = {𝟎. 𝟐𝟓 + 𝟎. 𝟑𝟏𝟖𝟒𝒄𝒐𝒔𝟐𝝎 + 𝟎. 𝟒𝟓𝟎𝟐𝒄𝒐𝒔𝝎}𝒆−𝒋𝟐𝝎

Problem: Find 𝒉𝒅 (𝒏), 𝒉(𝒏) 𝒂𝒏𝒅 𝑯(𝝎) for


𝟑𝝅
𝒆−𝒋𝟑𝝎 , |𝝎| <
𝟒
𝑯𝒅 (𝝎) = { 𝟑𝝅 using Hamming Window.
𝟎, < |𝝎| < 𝝅
𝟒
Solution:

Given
𝟑𝝅
𝒆−𝒋𝟑𝝎 , |𝝎| <
𝑯𝒅 (𝝎) = { 𝟒
𝟑𝝅
𝟎, < |𝝎| < 𝝅
𝟒
and it represents the desired frequency responses of a lowpass filter.
𝑴−𝟏 𝟑𝝅
Here, 𝝉 = 𝟐
= 𝟑 𝑎𝑛𝑑 𝑴 = 𝟕, 𝝎𝒄 = 𝟒

The unit sample response is given by

𝒔𝒊𝒏𝝎𝒄 (𝒏 − 𝝉)
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 ≠ 𝝉
𝝅(𝒏 − 𝝉)

and
𝝎𝒄
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 = 𝝉
𝝅
Therefore,
𝟑𝝅
𝒔𝒊𝒏 𝟒 (𝒏 − 𝟑)
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 ≠ 𝟑
𝝅(𝒏 − 𝟑)

and

𝟑𝝅
𝟑
𝒉𝒅 (𝒏) = 𝟒 = 𝒇𝒐𝒓 𝒏 = 𝟑
𝝅 𝟒
The unit sample response of the FIR filter is given by

𝒉(𝒏) = 𝒉𝒅 (𝒏)𝒘𝑯 (𝒏)


𝟐𝝅𝒏
Where 𝒘𝑯 (𝒏) = 𝟎. 𝟓𝟒 − 𝟎. 𝟒𝟔𝒄𝒐𝒔 (𝑴−𝟏)

n 𝒉𝒅 (𝒏) 𝒘𝑯 (𝒏) 𝒉(𝒏)


0 0.075 0.08 0.006
1 -0.159 0.31 -0.0493
2 0.225 0.77 0.1732
3 0.75 1 0.75
4 0.225 0.77 0.1732
5 -0.159 0.31 -0.0493
6 0.075 0.08 0.006

𝒉(𝒏) = {𝟎. 𝟎𝟎𝟔, −𝟎. 𝟎𝟒𝟗𝟑, 𝟎. 𝟏𝟕𝟑𝟐, 𝟎. 𝟕𝟓, 𝟎. 𝟏𝟕𝟑𝟐, −𝟎. 𝟎𝟒𝟗𝟑, 𝟎. 𝟎𝟎𝟔}
The calculated ℎ(𝑛), represents symmetric FIR filter with M odd. Therefore,
the frequency response of the filter is given by
𝑴−𝟑
𝟐
𝑴−𝟏 𝑴−𝟏 𝑴−𝟏
𝑯(𝝎) = 𝒉 ( ) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎 ( − 𝒏) 𝒆−𝒋( 𝟐 )𝝎
𝟐 𝟐
𝒏=𝟎
{ }
𝟕−𝟑
𝟐
𝟕−𝟏 𝟕−𝟏 𝟕−𝟏
= 𝒉( ) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎 ( − 𝒏) 𝒆−𝒋( 𝟐 )𝝎
𝟐 𝟐
𝒏=𝟎
{ }
𝟐

= {𝒉(𝟑) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎(𝟑 − 𝒏)} 𝒆−𝒋𝟑𝝎


𝒏=𝟎

= {𝒉(𝟑) + 𝟐(𝒉(𝟎)𝒄𝒐𝒔𝝎(𝟑 − 𝟎) + 𝒉(𝟏)𝒄𝒐𝒔𝝎(𝟑 − 𝟏) + 𝒉(𝟐)𝒄𝒐𝒔𝝎(𝟑 − 𝟐))}𝒆−𝒋𝟑𝝎

= {𝒉(𝟑) + 𝟐(𝒉(𝟎)𝒄𝒐𝒔𝟑𝝎 + 𝒉(𝟏)𝒄𝒐𝒔𝟐𝝎 + 𝒉(𝟐)𝒄𝒐𝒔𝝎)}𝒆−𝒋𝟑𝝎

= {𝟎. 𝟕𝟓 + 𝟐(𝟎. 𝟎𝟎𝟔𝒄𝒐𝒔𝟑𝝎 + (−𝟎. 𝟎𝟒𝟗𝟑)𝒄𝒐𝒔𝟐𝝎 + 𝟎. 𝟏𝟕𝟑𝟐𝒄𝒐𝒔𝝎)}𝒆−𝒋𝟑𝝎

𝑯(𝝎) = {𝟎. 𝟕𝟓 + 𝟎. 𝟎𝟏𝟐𝒄𝒐𝒔𝟑𝝎 − 𝟎. 𝟎𝟗𝟖𝟔𝒄𝒐𝒔𝟐𝝎 + 𝟎. 𝟑𝟒𝟔𝟒𝒄𝒐𝒔𝝎}𝒆−𝒋𝟑𝝎

Problem: Find 𝒉𝒅 (𝒏), 𝒉(𝒏) 𝒂𝒏𝒅 𝑯(𝝎) for


𝝅
𝟎, |𝝎| ≤
𝟔
𝑯𝒅 (𝝎) = { −𝒋𝟒𝝎 𝝅 using Rectangular Window.
𝒆 , |𝝎| >
𝟔

Solution:

Given
𝝅
𝟎, |𝝎| ≤
𝑯𝒅 (𝝎) = { 𝟔
𝝅
𝒆−𝒋𝟒𝝎 , |𝝎| >
𝟔

and it represents the desired frequency responses of a high pass filter.


𝑴−𝟏 𝝅
Here, 𝝉 = 𝟐
= 𝟒 𝑎𝑛𝑑 𝑴 = 𝟗, 𝝎𝒄 = 𝟔

The unit sample response is given by

𝒔𝒊𝒏𝝅(𝒏 − 𝝉) − 𝒔𝒊𝒏𝝎𝒄 (𝒏 − 𝝉)
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 ≠ 𝝉
𝝅(𝒏 − 𝝉)

and
𝟏
𝒉𝒅 (𝒏) = (𝝅 − 𝝎𝒄 ) 𝒇𝒐𝒓 𝒏 = 𝝉
𝝅
Therefore,
𝝅
𝒔𝒊𝒏𝝅(𝒏 − 𝟒) − 𝒔𝒊𝒏 𝟔 (𝒏 − 𝟒)
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 ≠ 𝟒
𝝅(𝒏 − 𝟒)

and

𝟏 𝝅 𝟏 𝟓𝝅 𝟓
𝒉𝒅 (𝒏) = (𝝅 − ) = ( ) = 𝒇𝒐𝒓 𝒏 = 𝟒
𝝅 𝟔 𝝅 𝟔 𝟔
The unit sample response of the FIR filter is given by

𝒉(𝒏) = 𝒉𝒅 (𝒏)𝒘𝑹 (𝒏)

Where 𝒘𝑹 (𝒏) is the rectangular window.

n 𝒉𝒅 (𝒏) 𝒘𝑹 (𝒏) 𝒉(𝒏)


0 -0.0689 1 -0.0689
1 -0.1061 1 -0.1061
2 -0.1378 1 -0.1378
3 -0.1591 1 -0.1591
4 0.8333 1 0.8333
5 -0.1591 1 -0.1591
6 -0.1378 1 -0.1378
7 -0.1061 1 -0.1061
8 -0.0689 1 -0.0689

𝒉(𝒏) = {−𝟎. 𝟎𝟔𝟖𝟗, −𝟎. 𝟏𝟎𝟔𝟏, −𝟎. 𝟏𝟑𝟕𝟖, −𝟎. 𝟏𝟓𝟗𝟏, 𝟎. 𝟖𝟑𝟑𝟑, −𝟎. 𝟏𝟓𝟗𝟏, −𝟎. 𝟏𝟑𝟕𝟖
− 𝟎. 𝟏𝟎𝟔𝟏, −𝟎. 𝟎𝟔𝟖𝟗}

The calculated ℎ(𝑛), represents symmetric FIR filter with M odd. Therefore,
the frequency response of the filter is given by
𝑴−𝟑
𝟐
𝑴−𝟏 𝑴−𝟏 𝑴−𝟏
𝑯(𝝎) = 𝒉 ( ) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎 ( − 𝒏) 𝒆−𝒋( 𝟐 )𝝎
𝟐 𝟐
𝒏=𝟎
{ }
𝟗−𝟑
𝟐
𝟗−𝟏 𝟗−𝟏 𝟗−𝟏
= 𝒉( ) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎 ( − 𝒏) 𝒆−𝒋( 𝟐 )𝝎
𝟐 𝟐
𝒏=𝟎
{ }
𝟑

= {𝒉(𝟒) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎(𝟒 − 𝒏)} 𝒆−𝒋𝟒𝝎


𝒏=𝟎
= {𝒉(𝟒) + 𝟐(𝒉(𝟎)𝒄𝒐𝒔𝝎(𝟒 − 𝟎) + 𝒉(𝟏)𝒄𝒐𝒔𝝎(𝟒 − 𝟏) + 𝒉(𝟐)𝒄𝒐𝒔𝝎(𝟒 − 𝟐)
+ 𝒉(𝟑)𝒄𝒐𝒔𝝎(𝟒 − 𝟑))}𝒆−𝒋𝟒𝝎

= {𝒉(𝟒) + 𝟐(𝒉(𝟎)𝒄𝒐𝒔𝟒𝝎 + 𝒉(𝟏)𝒄𝒐𝒔𝟑𝝎 + 𝒉(𝟐)𝒄𝒐𝒔𝟐𝝎 + 𝒉(𝟑)𝒄𝒐𝒔𝝎)}𝒆−𝒋𝟒𝝎

= {𝟎. 𝟖𝟑𝟑𝟑 + 𝟐((−𝟎. 𝟎𝟔𝟖𝟗)𝒄𝒐𝒔𝟒𝝎 + (−𝟎. 𝟏𝟎𝟔𝟏)𝒄𝒐𝒔𝟑𝝎 + (−𝟎. 𝟏𝟑𝟕𝟖)𝒄𝒐𝒔𝟐𝝎


+ (−𝟎. 𝟏𝟓𝟗𝟏)𝒄𝒐𝒔𝝎)}𝒆−𝒋𝟒𝝎

𝑯(𝝎) = {𝟎. 𝟖𝟑𝟑𝟑 − 𝟎. 𝟏𝟑𝟕𝟖𝒄𝒐𝒔𝟒𝝎 − 𝟎. 𝟐𝟏𝟐𝟐𝒄𝒐𝒔𝟑𝝎 − 𝟎. 𝟐𝟕𝟓𝟔𝒄𝒐𝒔𝟐𝝎


− 𝟎. 𝟑𝟏𝟖𝟐𝒄𝒐𝒔𝝎}𝒆−𝒋𝟒𝝎

Problem: Design a HPF using Hamming window. Given that cut-off


frequency the filter coefficients 𝒉𝒅 (𝒏) for the desired frequency response of a
low pass filter given by 𝝎𝒄 = 1 rad/sec, and take M=7. Also plot the
magnitude response.
Solution:

Given, 𝑴 = 𝟕
𝑴−𝟏 𝟕−𝟏
𝝉= 𝟐
= 𝟐
= 𝟑 𝑎𝑛𝑑 𝑴 = 𝟗, 𝝎𝒄 = 𝟏

The unit sample response is given by

𝒔𝒊𝒏𝝅(𝒏 − 𝝉) − 𝒔𝒊𝒏𝝎𝒄 (𝒏 − 𝝉)
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 ≠ 𝝉
𝝅(𝒏 − 𝝉)

and

𝟏
𝒉𝒅 (𝒏) = (𝝅 − 𝝎𝒄 ) 𝒇𝒐𝒓 𝒏 = 𝝉
𝝅
Therefore,
𝒔𝒊𝒏𝝅(𝒏 − 𝟑) − 𝒔𝒊𝒏𝟏(𝒏 − 𝟑)
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 ≠ 𝟑
𝝅(𝒏 − 𝟑)

and

𝟏
𝒉𝒅 (𝒏) = (𝝅 − 𝟏) = 𝟎. 𝟔𝟖𝟏𝟔 𝒇𝒐𝒓 𝒏 = 𝟒
𝝅
The unit sample response of the FIR filter is given by

𝒉(𝒏) = 𝒉𝒅 (𝒏)𝒘𝑯 (𝒏)

Where 𝒘𝑯 (𝒏) is the rectangular window given by

𝟐𝝅𝒏
𝒘𝑯 (𝒏) = 𝟎. 𝟓𝟒 − 𝟎. 𝟒𝟔𝒄𝒐𝒔 ( )
𝑴−𝟏
n 𝒉𝒅 (𝒏) 𝒘𝑯 (𝒏) 𝒉(𝒏)
0 -0.0149 0.08 -0.00119
1 -0.1447 0.31 -0.00448
2 -0.2678 0.77 -0.2062
3 𝟎. 𝟔𝟖𝟏𝟔 1 0.6816
4 -0.2678 0.77 -0.2062
5 -0.1447 0.31 -0.00448
6 -0.0149 0.08 -0.00119

𝒉(𝒏) = {−𝟎. 𝟎𝟎𝟏𝟏𝟗, −𝟎. 𝟎𝟎𝟒𝟒𝟖, −𝟎. 𝟐𝟎𝟔𝟐, 𝟎. 𝟔𝟖𝟏𝟔, −𝟎. 𝟐𝟎𝟔𝟐, −𝟎. 𝟎𝟎𝟒𝟒𝟖, −𝟎. 𝟎𝟎𝟏𝟏𝟗}

The calculated ℎ(𝑛), represents symmetric FIR filter with M odd. Therefore,
the frequency response of the filter is given by
𝑴−𝟑
𝟐
𝑴−𝟏 𝑴−𝟏 −𝒋(
𝑴−𝟏
)𝝎
𝑯(𝝎) = 𝒉 ( ) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎 ( − 𝒏) 𝒆 𝟐
𝟐 𝟐
𝒏=𝟎
{ }
𝟕−𝟑
𝟐
𝟕−𝟏 𝟕−𝟏 𝟕−𝟏
= 𝒉( ) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎 ( − 𝒏) 𝒆−𝒋( 𝟐 )𝝎
𝟐 𝟐
𝒏=𝟎
{ }
𝟐

= {𝒉(𝟑) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎(𝟑 − 𝒏)} 𝒆−𝒋𝟑𝝎


𝒏=𝟎

= {𝒉(𝟒) + 𝟐(𝒉(𝟎)𝒄𝒐𝒔𝝎(𝟑 − 𝟎) + 𝒉(𝟏)𝒄𝒐𝒔𝝎(𝟑 − 𝟏) + 𝒉(𝟐)𝒄𝒐𝒔𝝎(𝟑 − 𝟐))}𝒆−𝒋𝟑𝝎

= {𝒉(𝟑) + 𝟐(𝒉(𝟎)𝒄𝒐𝒔𝟑𝝎 + 𝒉(𝟏)𝒄𝒐𝒔𝟐𝝎 + 𝒉(𝟐)𝒄𝒐𝒔𝝎)}𝒆−𝒋𝟑𝝎

= {𝟎. 𝟔𝟖𝟏𝟔 + 𝟐((−𝟎. 𝟎𝟎𝟏𝟏𝟗)𝒄𝒐𝒔𝟑𝝎 + (−𝟎. 𝟎𝟎𝟒𝟒𝟖)𝒄𝒐𝒔𝟐𝝎 + (−𝟎. 𝟐𝟎𝟔𝟐)𝒄𝒐𝒔𝝎)}𝒆−𝒋𝟑𝝎

𝑯(𝝎) = {𝟎. 𝟔𝟖𝟏𝟔 − 𝟎. 𝟎𝟎𝟐𝟑𝟖𝒄𝒐𝒔𝟑𝝎 − 𝟎. 𝟎𝟎𝟖𝟗𝟔𝒄𝒐𝒔𝟐𝝎 − 𝟎. 𝟓𝟓𝟏𝟐𝒄𝒐𝒔𝝎}𝒆−𝒋𝟑𝝎


Realization of FIR system
The difference equation is a formula for computing an output sample at time n based on past
and present input samples and past output samples in the time domain. The general, causal,
LTI difference equation is as follows:

y (n) = b0 x(n) + b1 x(n − 1) + . . . bk x(n − k) − a1 y (n − 1) − a2 y (n − 2) . . . − ak y (n − k)


M
X N
X
= bk x(n − k) − ak y (n − k)
k=0 k=1

where x is the input signal, y is the output signal ak and bk are called the coefficients.
The second term in this equation is usually termed as feedback for the system. This is the
equation used to represent Infinite Impulse Response (IIR) system.
If the feedback term is absent then this equation is used to represent Finite Impulse
Response (FIR) system.
XM
y (n) = bk x(n − k)
k=0
LTI systems are represented by the following difference equation.
N
X M
X
y (n) = − ak y (n − k) + bk x(n − k)
k=1 k=0

By taking z-transform on both sides


N
X M
X
Y (z) = − ak z −k Y (z) + bk z −k X (z)
k=1 k=0

N M
" #
X X
Y (z) 1 + ak z −k = bk z −k X (z)
k=1 k=0

The system function H(z) is defined as


Y (z)
H(z) =
X (z)

M
−k
P
bk z
k=0
H(z) =
N
ak z −k
P
1+
k=1
An FIR system does not have feedback. Hence y (n − k) term is absent in the system. FIR
output is expressed as
M
X
y (n) = bk x(n − k)
k=0

If there are M coefficients then


M−1
X
y (n) = bk x(n − k)
k=0

By taking z-transform on both sides


M
X
Y (z) = bk z −k X (z)
k=0

System function H(z) is defined as


M−1
Y (z) X
H(z) = = bk z −k
X (z) k=0

By taking inverse z transform



bn for 0≤n ≤M −1
h(n) =
0 otherwise
Direct form Structure of FIR System
Structures in which the multiplier coefficients are precisely the coefficients of the transfer
function are called direct form structure.
Since h(n) = bn then y(n) is
M−1
X
y (n) = h(k)x(n − k)
k=0

Expanding the summation

y (n) = h(0)x(n) + h(1)x(n − 1) + h(2)x(n − 2) + . . . h(M − 1)x(n − M + 1)

x ( n)
Z-1 Z-1 Z-1 Z-1
h(M-1)
h(0) h(1) h(2) h(M-2)
h( M − 1) x(n − M + 1)
h(1) x( n − 1) h(2) x( n − 2)
x(n)h(0)
+ + x(n)h(0) + + + M −1
x(n)h(0)
+ h(1) x(n − 1) y ( n) = ∑ h( k ) x( n − k )
+ h(1) x(n − 1) k =0
+ h(2) x(n − 2)

Figure : Direct form realization of FIR system


Realize a direct form FIR filter for the following impulse response.
1 1 1
h(n) = δ(n) + δ(n − 1) − δ(n − 2) + δ(n − 4) + δ(n − 3)
2 4 2

Solution: h(n) = δ(n) + 12 δ(n − 1) − 14 δ(n − 2) + 12 δ(n − 3) + δ(n − 4)

1 −1 1 1
H(z) = 1 + z − z −2 + z −3 + z −4
2 4 2

 
1 1 1
Y (z) = X (z)H(z) = 1 + z −1 − z −2 + z −3 + z −4 X (z)
2 4 2
1 −1 1 −2 1 −3
= X (z) + z X (z) − z X (z) + z X (z) + z −4 X (z)
2 4 2
1 1 1
y (n) = x(n) + x(n − 1) − x(n − 2) + x(n − 3) + x(n − 4)
2 4 2

x ( n) x( n − 1) x(n − 2) x( n − 3) x(n − 4)
Z-1 Z-1 Z-1 Z-1

h(0) = 1 1 −1 1 h(4) = 1
h(1) = h(2) = h(3) =
2 4 2
y(n)
+ + + +
DEC-2010 EE
Realize the system function H(z) = 1 + 32 z −1 + 45 z −2 + 59 z −3 + 19 z −4 using direct form II
Solution:
3 4 5 1
H(z) = 1 + z −1 + z −2 + z −3 + z −4
2 5 9 9

 
3 4 5 1
Y (z) = X (z)H(z) = 1 + z −1 + z −2 + z −3 + z −4 X (z)
2 5 9 9
3 −1 4 −2 5 −3 1
= X (z) + z X (z) + z X (z) + z X (z) + z −4 X (z)
2 5 9 9
3 4 5 1
y (n) = x(n) + x(n − 1) + x(n − 2) + x(n − 3) + x(n − 4)
2 5 9 9

x ( n)
Z-1 Z-1 Z-1 Z-1

h(0) = 1 3 4 5 1
h(1) = h(2) = h(3) = h(4) =
2 5 9 9
y(n)
+ + + +
June 2012 EC
A FIR filter is given by y (n) = x[n] + 25 x[n − 1] + 34 x[n − 2] + 13 x[n − 3] draw the direct form.
Solution:

x ( n)
Z-1 Z-1 Z-1

h(0) = 1 2 3 1
h(1) = h(2) = h(3) =
5 4 3
y(n)
+ + +
Determine a direct form realization for the following linear phase filters

h(n) = [1, 2, 3, 4, 3, 2, 1]

Solution:
h(n) = δ(n) + 2δ(n − 1) + 3 δ(n − 2) + 4 δ(n − 3) + 3 δ(n − 4)+ 2δ(n − 5) + δ(n − 6)

H(z) = 1 + 2z −1 + 3z −2 + 4z −3 + 3z −4 + 2z −5 + 1z −6 ]

X (z)H(z) = 1 + 2z −1 + 3z −2 + 4z −3 + 3z −4 + 2z −5 + 1z −6 X (z)
 
Y (z) =
= X (z) + 2z −1 X (z) + 3z −2 X (z) + 4z −3 X (z) + 3z −4 X (z) + 2z −5 X (z) + 1z −6 X (z)
y (n) = x(n) + 2x(n − 1) + 3x(n − 2) + 4x(n − 3) + 3x(n − 4) + 2x(n − 5) + 1x(n − 6)

x ( n)
Z-1 Z-1 Z-1 Z-1 Z-1 Z-1

h(0) = 1 h(1) = 2 h(2) = 3 h(3) = 4 h(4) = 3 h(5) = 2 h(6) = 1

y(n)
+ + + + + +
Determine a direct form realization for the following linear phase filters

h(n) = [1, 2, 3, 3, 2, 1]

Solution: h(n) = δ(n) + 2δ(n − 1) + 3 δ(n − 2) + 3 δ(n − 3) + 2 δ(n − 4) + δ(n − 5)

H(z) = 1 + 2z −1 + 3z −2 + 3z −3 + 2z −4 + 1z −5 ]

X (z)H(z) = 1 + 2z −1 + 3z −2 + 3z −3 + 2z −4 + 1z −5 X (z)
 
Y (z ) =
= X (z) + 2z −1 X (z) + 3z −2 X (z) + 3z −3 X (z) + 2z −4 X (z) + 1z −5 X (z)
y (n) = x(n) + 2x(n − 1) + 3x(n − 2) + 3x(n − 3) + 2x(n − 4) + 1x(n − 5)

x ( n)
Z-1 Z-1 Z-1 Z-1 Z-1

h(0) = 1 h(1) = 2 h(2) = 3 h(3) = 3 h(4) = 2 h(5) = 1

y(n)
+ + + + +
For the following FIR filter system function sketch a direct form

H(z) = 1 + 2.88z −1 + 3.4048z −2 + 1.74z −3 + 0.4z −4

Solution:

x ( n)
Z-1 Z-1 Z-1 Z-1

h(0) = 1 h(1) = 2.88 h(2) = 3.4048 h(3) = 1.74 h(4) = 0.4

y(n)
+ + + +
Realize direct form FIR filter with impulse response h(n) is given
h(n) = 4δ(n) + 5δ(n − 1) + 6δ(n − 2) + 7δ(n − 3). With input x(n) = [1, 2, 3] calculate output
y (n)
Solution:
h(n) = 4δ(n) + 5δ(n − 1) + 6δ(n − 2) + 7δ(n − 3)
H(z) = 4 + 5z −1 + 6z −2 + 7z −3

X (z)H(z) = 4 + 5z −1 + 6z −2 + 7z −3 X (z)
 
Y (z) =
= 4X (z) + 5z −1 X (z) + 6z −2 X (z) + 7z −3 X (z)
y (n) = 4x(n) + 5x(n − 1) + 6x(n − 2) + 7x(n − 3)

x ( n)
3

2 x ( n) x( n − 1) x(n − 2) x(n − 3)
Z-1 Z-1 Z-1

h(0) = 4 h(1) = 5 h(2) = 6 h(3) = 7


1
y(n)
n + + +
0 1 2 3

Figure 4: Input x(n) to the FIR filter


y (n) = 4x(n) + 5x(n − 1) + 6x(n − 2) + 7x(n − 3)
y (0) = 4x(0) + 5x(0 − 1) + 6x(0 − 2) + 7x(0 − 3) = 4 × 1 = 4
y (1) = 4x(1) + 5x(0) = 4 × 2 + 5 × 1 = 13
y (2) = 4x(2) + 5x(1) + 6x(0) = 4 × 3 + 5 × 2 + 6 × 1 = 28
y (3) = 4x(3) + 5x(2) + 6x(1) + 7x(0) = 4 × 0 + 5 × 3 + 6 × 2 + 7 × 1 = 34
y (4) = 4x(4) + 5x(3) + 6x(2) + 7x(1) = 0 + 0 + 6 × 3 + 7 × 2 = 32
y (5) = 4x(5) + 5x(4) + 6x(3) + 7x(2) = 0 + 0 + 0 + 7 × 3 = 21

y (n) = [4, 13, 28, 34, 32, 21]


y ( n)
34 32
28
21
x ( n) x( n − 1) x(n − 2) x(n − 3)
13 Z-1 Z-1 Z-1

4 h(0) = 4 h(1) = 5 h(2) = 6 h(3) = 7


n
y(n)
0 1 2 3 4 5 + + +
Figure 5: Output y(n) of the FIR
filter
June 2015 Obtain the direct form realization of linear phase FIR system given by

2 −1 15 −2
H(z) = 1 + z + z
3 8

Solution:

x ( n)
Z-1 Z-1

h(0) = 1 2 15
h(1) = h(2) =
3 8
y(n)
+ +
(ascade frs shutre
we Kmod that
Htz)=
K-o
fnto H) as a
systng
Fauteiz toe
Hhat
K

whee

whe Kz 0,) - - m
bko t bk)+b522
Xx(>) bkiz'l+bka~ XR()
bkoX<l2)+
Yklz) =
Aprly invuse 2-hanifos

bKo

is
yorested as
So the casado steutee
ORealize the folowig sytes tunion in catcode for

23

Fatovizmg the numatr polyoonil


H): 2t)(2+0st +1)

a(i)(5
(t*?)to.f4)

Hl)= (1+21)((+o.s?)
HI

Hml2)

Hal)
Casade fms tute
Kalise the follcJng Systtrn funciun in
H(2)-(r4i+)(ri':)
Sol9:

Hhb)
Hat)

You might also like