DSP BEC502 Module-4
DSP BEC502 Module-4
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 𝝎𝑠 .
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,
𝑴−𝟏
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
𝑴−𝟏
where 𝒏 = 𝟎, 𝟏, … , 𝑴 − 𝟏.
𝑴
−𝟏
𝟐
𝑴−𝟏
|𝑯(𝝎)| = 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎 ( − 𝒏) ; 𝑴 𝑬𝒗𝒆𝒏
𝟐
𝒏=𝟎
The phase characteristic of the filter for both M odd and M even is
𝑴−𝟏
−𝝎 (
), |𝑯(𝝎)| > 𝟎
∠𝑯(𝝎) = 𝝋(𝝎) = { 𝟐
𝑴−𝟏
−𝝎 ( ) + 𝝅, |𝑯(𝝎)| < 𝟎
𝟐
𝑴
−𝟏
𝟐
𝑴−𝟏
|𝑯(𝝎)| = 𝟐 ∑ 𝒉(𝒏)𝑠𝑖𝑛𝝎 ( − 𝒏) ; 𝑴 𝑬𝒗𝒆𝒏
𝟐
𝒏=𝟎
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.
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
∞
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 convolution of 𝑯𝒅 (𝝎) with 𝑾(𝝎) yields the frequency response of
the (truncated) FIR filter. That is,
𝝅
𝟏
𝑯(𝝎) = ∫ 𝑯𝒅 (𝒗)𝑾(𝝎 − 𝒗)𝒅𝒗 − − − (𝟕)
𝟐𝝅
−𝝅
𝑾(𝝎) = ∑ 𝝎(𝒏)𝒆−𝒋𝝎𝒏
𝒏=𝟎
𝑴−𝟏
= ∑ (𝟏)𝒆−𝒋𝝎𝒏
𝒏=𝟎
𝑴−𝟏
= ∑ (𝒆−𝒋𝝎 )𝒏
𝒏=𝟎
𝟏 − 𝒆−𝒋𝝎𝑴
=
𝟏 − 𝒆−𝒋𝝎
𝒋𝝎𝑴 𝒋𝝎 𝝎𝑴
𝒆− −
𝟐 𝒆 𝟐 [𝒔𝒊𝒏 ( )]
= 𝟐
𝝎
[𝒔𝒊𝒏 ( 𝟐 )]
𝒋𝝎 𝝎𝑴
𝒆− 𝟐 (𝑴−𝟏) [𝒔𝒊𝒏 ( 𝟐 )]
𝑾(𝝎) = 𝝎 − − − (𝟖)
[𝒔𝒊𝒏 ( 𝟐 )]
𝝎𝑴
𝒔𝒊𝒏 ( 𝟐 )
|𝑾(𝝎)| = | 𝝎 | ; −𝝅 ≤ 𝝎 ≤ 𝝅 − − − (𝟗)
𝒔𝒊𝒏 ( 𝟐 )
𝑴−𝟏
−𝝎 ( ) ; 𝑤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.
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.
𝒆−𝒋𝝎𝝉 , 𝟎 ≤ |𝝎| ≤ 𝝎𝒄
𝑯𝒅 (𝝎) = {
𝟎, 𝑶𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
𝑴−𝟏
Where, 𝝉 = ( )
𝟐
The corresponding unit sample response is given by
𝟏 𝝎𝒄 𝒋𝝎(𝒏−𝝉)
𝒉𝒅 (𝒏) = ∫ 𝒆 𝒅𝝎
𝟐𝝅 −𝝎𝒄
𝒔𝒊𝒏𝝎𝒄 (𝒏 − 𝝉)
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 ≠ 𝝉
𝝅(𝒏 − 𝝉)
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.
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
𝝎𝒄
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 = 𝝉
𝝅
Therefore,
𝝅
𝒔𝒊𝒏 (𝒏 − 𝟐)
𝒉𝒅 (𝒏) = 𝟒 𝒇𝒐𝒓 𝒏 ≠ 𝟐
𝝅(𝒏 − 𝟐)
and
𝝅
𝟏
𝒉𝒅 (𝒏) = 𝟒 = 𝒇𝒐𝒓 𝒏 = 𝟐
𝝅 𝟒
The unit sample response of the FIR filter is given by
The calculated ℎ(𝑛), represents symmetric FIR filter with M odd. Therefore,
the frequency response of the filter is given by
𝑴−𝟑
𝟐
𝑴−𝟏 𝑴−𝟏 𝑴−𝟏
𝑯(𝝎) = 𝒉 ( ) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎 ( − 𝒏) 𝒆−𝒋( 𝟐 )𝝎
𝟐 𝟐
𝒏=𝟎
{ }
𝟓−𝟑
𝟐
𝟓−𝟏 𝟓−𝟏 𝟓−𝟏
= 𝒉( ) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎 ( − 𝒏) 𝒆−𝒋( 𝟐 )𝝎
𝟐 𝟐
𝒏=𝟎
{ }
𝟏
Given
𝟑𝝅
𝒆−𝒋𝟑𝝎 , |𝝎| <
𝑯𝒅 (𝝎) = { 𝟒
𝟑𝝅
𝟎, < |𝝎| < 𝝅
𝟒
and it represents the desired frequency responses of a lowpass filter.
𝑴−𝟏 𝟑𝝅
Here, 𝝉 = 𝟐
= 𝟑 𝑎𝑛𝑑 𝑴 = 𝟕, 𝝎𝒄 = 𝟒
𝒔𝒊𝒏𝝎𝒄 (𝒏 − 𝝉)
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 ≠ 𝝉
𝝅(𝒏 − 𝝉)
and
𝝎𝒄
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 = 𝝉
𝝅
Therefore,
𝟑𝝅
𝒔𝒊𝒏 𝟒 (𝒏 − 𝟑)
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 ≠ 𝟑
𝝅(𝒏 − 𝟑)
and
𝟑𝝅
𝟑
𝒉𝒅 (𝒏) = 𝟒 = 𝒇𝒐𝒓 𝒏 = 𝟑
𝝅 𝟒
The unit sample response of the FIR filter is given by
𝒉(𝒏) = {𝟎. 𝟎𝟎𝟔, −𝟎. 𝟎𝟒𝟗𝟑, 𝟎. 𝟏𝟕𝟑𝟐, 𝟎. 𝟕𝟓, 𝟎. 𝟏𝟕𝟑𝟐, −𝟎. 𝟎𝟒𝟗𝟑, 𝟎. 𝟎𝟎𝟔}
The calculated ℎ(𝑛), represents symmetric FIR filter with M odd. Therefore,
the frequency response of the filter is given by
𝑴−𝟑
𝟐
𝑴−𝟏 𝑴−𝟏 𝑴−𝟏
𝑯(𝝎) = 𝒉 ( ) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎 ( − 𝒏) 𝒆−𝒋( 𝟐 )𝝎
𝟐 𝟐
𝒏=𝟎
{ }
𝟕−𝟑
𝟐
𝟕−𝟏 𝟕−𝟏 𝟕−𝟏
= 𝒉( ) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎 ( − 𝒏) 𝒆−𝒋( 𝟐 )𝝎
𝟐 𝟐
𝒏=𝟎
{ }
𝟐
Solution:
Given
𝝅
𝟎, |𝝎| ≤
𝑯𝒅 (𝝎) = { 𝟔
𝝅
𝒆−𝒋𝟒𝝎 , |𝝎| >
𝟔
𝒔𝒊𝒏𝝅(𝒏 − 𝝉) − 𝒔𝒊𝒏𝝎𝒄 (𝒏 − 𝝉)
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 ≠ 𝝉
𝝅(𝒏 − 𝝉)
and
𝟏
𝒉𝒅 (𝒏) = (𝝅 − 𝝎𝒄 ) 𝒇𝒐𝒓 𝒏 = 𝝉
𝝅
Therefore,
𝝅
𝒔𝒊𝒏𝝅(𝒏 − 𝟒) − 𝒔𝒊𝒏 𝟔 (𝒏 − 𝟒)
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 ≠ 𝟒
𝝅(𝒏 − 𝟒)
and
𝟏 𝝅 𝟏 𝟓𝝅 𝟓
𝒉𝒅 (𝒏) = (𝝅 − ) = ( ) = 𝒇𝒐𝒓 𝒏 = 𝟒
𝝅 𝟔 𝝅 𝟔 𝟔
The unit sample response of the FIR filter is given by
𝒉(𝒏) = {−𝟎. 𝟎𝟔𝟖𝟗, −𝟎. 𝟏𝟎𝟔𝟏, −𝟎. 𝟏𝟑𝟕𝟖, −𝟎. 𝟏𝟓𝟗𝟏, 𝟎. 𝟖𝟑𝟑𝟑, −𝟎. 𝟏𝟓𝟗𝟏, −𝟎. 𝟏𝟑𝟕𝟖
− 𝟎. 𝟏𝟎𝟔𝟏, −𝟎. 𝟎𝟔𝟖𝟗}
The calculated ℎ(𝑛), represents symmetric FIR filter with M odd. Therefore,
the frequency response of the filter is given by
𝑴−𝟑
𝟐
𝑴−𝟏 𝑴−𝟏 𝑴−𝟏
𝑯(𝝎) = 𝒉 ( ) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎 ( − 𝒏) 𝒆−𝒋( 𝟐 )𝝎
𝟐 𝟐
𝒏=𝟎
{ }
𝟗−𝟑
𝟐
𝟗−𝟏 𝟗−𝟏 𝟗−𝟏
= 𝒉( ) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎 ( − 𝒏) 𝒆−𝒋( 𝟐 )𝝎
𝟐 𝟐
𝒏=𝟎
{ }
𝟑
Given, 𝑴 = 𝟕
𝑴−𝟏 𝟕−𝟏
𝝉= 𝟐
= 𝟐
= 𝟑 𝑎𝑛𝑑 𝑴 = 𝟗, 𝝎𝒄 = 𝟏
𝒔𝒊𝒏𝝅(𝒏 − 𝝉) − 𝒔𝒊𝒏𝝎𝒄 (𝒏 − 𝝉)
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 ≠ 𝝉
𝝅(𝒏 − 𝝉)
and
𝟏
𝒉𝒅 (𝒏) = (𝝅 − 𝝎𝒄 ) 𝒇𝒐𝒓 𝒏 = 𝝉
𝝅
Therefore,
𝒔𝒊𝒏𝝅(𝒏 − 𝟑) − 𝒔𝒊𝒏𝟏(𝒏 − 𝟑)
𝒉𝒅 (𝒏) = 𝒇𝒐𝒓 𝒏 ≠ 𝟑
𝝅(𝒏 − 𝟑)
and
𝟏
𝒉𝒅 (𝒏) = (𝝅 − 𝟏) = 𝟎. 𝟔𝟖𝟏𝟔 𝒇𝒐𝒓 𝒏 = 𝟒
𝝅
The unit sample response of the FIR filter is 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
𝑴−𝟑
𝟐
𝑴−𝟏 𝑴−𝟏 −𝒋(
𝑴−𝟏
)𝝎
𝑯(𝝎) = 𝒉 ( ) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎 ( − 𝒏) 𝒆 𝟐
𝟐 𝟐
𝒏=𝟎
{ }
𝟕−𝟑
𝟐
𝟕−𝟏 𝟕−𝟏 𝟕−𝟏
= 𝒉( ) + 𝟐 ∑ 𝒉(𝒏)𝒄𝒐𝒔𝝎 ( − 𝒏) 𝒆−𝒋( 𝟐 )𝝎
𝟐 𝟐
𝒏=𝟎
{ }
𝟐
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
N M
" #
X X
Y (z) 1 + ak z −k = bk z −k X (z)
k=1 k=0
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
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)
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
y(n)
+ + + + + +
Determine a direct form realization for the following linear phase filters
h(n) = [1, 2, 3, 3, 2, 1]
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
y(n)
+ + + + +
For the following FIR filter system function sketch a direct form
Solution:
x ( n)
Z-1 Z-1 Z-1 Z-1
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
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
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)