0% found this document useful (0 votes)
149 views30 pages

Ec8553-Discrete Time Signal Processing-972819887-Unit 3 Notes

FIR filters have linear phase if their impulse response is symmetric. There are two cases for linear phase FIR filters: 1) Symmetric impulse response for odd N: The frequency response is the sum of the symmetric impulse response terms and a single term for the center point of symmetry. 2) Anti-symmetric impulse response for even N: The frequency response is the difference of the anti-symmetric impulse response terms. This results in a constant group delay but not a constant phase delay. Linear phase FIR filters have applications in signal processing where phase linearity is required. The impulse response symmetry conditions ensure the phase delay is directly proportional to frequency, independent of filter coefficients.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
149 views30 pages

Ec8553-Discrete Time Signal Processing-972819887-Unit 3 Notes

FIR filters have linear phase if their impulse response is symmetric. There are two cases for linear phase FIR filters: 1) Symmetric impulse response for odd N: The frequency response is the sum of the symmetric impulse response terms and a single term for the center point of symmetry. 2) Anti-symmetric impulse response for even N: The frequency response is the difference of the anti-symmetric impulse response terms. This results in a constant group delay but not a constant phase delay. Linear phase FIR filters have applications in signal processing where phase linearity is required. The impulse response symmetry conditions ensure the phase delay is directly proportional to frequency, independent of filter coefficients.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 30

UNIT – III FINITE IMPULSE FILTERS

Design of FIR filters - symmetric and Anti-symmetric FIR filters - design of linear phase FIR filters using
Fourier series method - FIR filter design using windows (Rectangular, Hamming and Hanning window),
Frequency sampling method. FIR filter structures - linear phase structure, direct form realizations

Introduction:
 A digital filter is just a filter that operates on the digital signals.
Types:
 FIR filter design
 IIR filter design
FIR filter:
The digital filter which designed using finite number of response co-efficient is called as finite impulse
response filters.
ho (n),h1 (n)....................h(N−1) (n)
Advantages:
1. FIR filters have exact linear phase.
2. FIR filters are always stable.
3. FIR filters can be realized in both recursive and non-recursive structure.
4. FIR filters with any arbitrary magnitude response can be tackled using FIR sequence.
Disadvantages:
1. For the same filter specification the order of the FIR filter design can be as high as 5 to 10 times that
of an IIR filter.
2. Large storage requirement needed.
3. Powerful computational facilities required for the implementation.
Linear Phase (LP) FIR Filters:
Derive the condition for Linear Phase (LP) FIR Filters. [Nov/Dec-2009]

The transfer function of a FIR causal filter is given by


N 1
H (z)   h(n)z  n
n 0

Where h(n) is the impulse response of the filter.


The Fourier transform of h(n) is
N 1
H (e j )   h(n)e  j n
n 0,
Which is periodic in frequency with period 2  .
H (e j )   | H (e j ) | e  j   
j
Where H (e ) is magnitude response and  (  ) is phase response.
We define the phase delay and group delay of a filter as
    d   
p  and ; g 
 d ---------------------------------------->(1)
For FIR filters with linear phase we can define
 ( )   ;      ------------------------------------------------>(2)
Where  is a constant phase delay in samples.

1
Substitute: equation 2 in 1, we have  p =  g=  , which means that  is independent of frequency. We can
write,
N 1

 h(n)e
n 0
 j n
  | H (e j ) | e  j   

Which gives us,


N 1

 h(n) cos n   | H (e j
) | cos  ( )
n 0 ------------------------------->(3)
N 1
 h(n) sin  n   | H (e j ) | sin  ( )
and n 0 ---------------------------------->(4)
By taking ratio of equation (3) to equation (4), we obtain
N 1

 h(n) sin  n sin 


n0
N 1
 ;[ ( )   ]
cos 
 h(n) cos  n
n 0 ------------------------------>(5)
After simplifying equation (5) we have
N 1

 h(n) sin(  n)  0


n 0 ------------------------------------------------->(6)
Equation (6) will be zero when
h(n)  h( N  1  n) ------------------------------------------------------->(7)
N 1

And 2 ------------------------------------------------------------------>(8)
Therefore, FIR filters will have constant phase and group delays when the impulse response is symmetrical
N 1

about 2
The impulse response satisfying equation (7) & (8) for odd and even values of N. When N=7 the centre of
1
2
symmetry of the sequence occurs at third sample and when N=6, the filter delay is 2 samples.
If only constant group delay is required, and not the phase delay we can write
 (  )=  -  
j j j    
Now we have H (e )   | H (e ) | e
Equation (9) can be expressed as
N 1

 h(n)e  j n
  | H (e j ) | e j    
n 0 -------------------------------------->(9)

which gives us
N 1

 h(n) cos  n   | H (e  ) | cos(   )


j

n 0 ---------------------------->(10)
N 1
 h(n)sin  n   | H (e j ) | sin(    )
and n 0 ------------------------------>(11)
By taking ratio of equation (11) to (10), we get

2
N 1
 h(n) sin  n
sin(    )
n0
N 1

cos(    )
 h(n) cos  n
n 0

From which we obtain


N 1

 h(n)sin    (  n)   0
n0 ------------------------------------------>(12)


If 2 , Equation (12) becomes,
N 1

 h(n) cos(  n)  0


n 0 ------------------------------------------------->(13)
The equation 13 will be satisfied when h(n)  h( N  1  n)
N 1

And 2
g
Therefore, FIR filters have constant group delay, and not constant phase delay when the impulse response
N 1

is anti-symmetrical about 2 .
Example:
N −1 6−1 1
α= = =2 (centre of symmetry )
For N=6 2 2 2

( centre of symmetry )

0 1 2 2.5 3 4 5
For N=7
N −1 7−1
α= = =3( centre of symmetry )
7 2 2
For N=
centre of symmetry

0 1 2 3 4 n
Linear Phase FIR Filter:
An FIR filter has linear phase if its unit sample response satisfies the condition
h(n )=±h( M−1−n ); n=0,1,2 . . .. .. .. N −1
Case (i): Symmetric impulse response for “N is ODD”:
Determine the frequency response of FIR filter with symmetric impulse response and the order
of the filter is “N is Odd”.
3
The frequency response of impulse response can be written as,
M −3
2 jω ( M −1) M −1
M−1 −

H ( e )= ∑ h(n )e
n=0
− jωn
+h
2
e ( ) 2
+
n=

N +1
h(n )e− jωn
2 -------------------------->(1)
jω jω jω
Let n=M−1−n, where z=e |H (e )=H ( z )|z=e
M−3 M −3
2 jω ( M −1) 2

( M2−1 ) e

H ( e jω )= ∑ h(n )e− jωn+ h 2
+ ∑ h( M −1−n) e− jω ( M −1−n )
n=0 --------->(2) n=0

For a symmetrical impulse response, h(n )=h( M −1−n ), substituting this relation in above equation (2 )
M−3 M−1


H ( e )=e

jω( M−1)
2
[ 2
∑ h(n )e
n=0

M−3

M−1
( )+
2−n
2
∑ h(n) e
n=0

jω ( M−1 )
2−n
+h ( M−12 ) ]

H ( e )=e

jω( M −1)
2


[ 2
2

n=0
h(n )cosω ( M−1
2 )−n + h (
M−1
2 ) ] ]
The polar form of H (e ) can be expressed as
jω )
jω jω j∠ H( e
H ( e )=|H ( e )|e
M −3
2

∴ Magnitude of H (e ) is given as
|H ( e jω )|=h ( M2−1 )+2 ∑ h( n) cos ω ( M2−1 −n)
n=0

M−1

Angle of H (e ) is given as
============================================================================
∠H(e =¿ −ω
2
jω)
{( )
, for |H(e jω )|>0 ¿ ¿¿¿

Case (ii) : Symmetric Impulse Response For –“N is EVEN”:


Determine the frequency response of FIR filter with symmetric impulse response and the
order of the filter N is Even. [Nov/Dec-2013]

The frequency response of impulse response can be written as,


M −2 M−2
2 2
H ( e jω) = ∑ h (n)e− jωn + ∑ h(n )e− jωn
n=0 n=0 ---------------------------------------------->(1)
jω jω jω
Let n=M−1−n, where z=e |H (e )=H ( z )|z=e
M−2 M−2
2 2
H ( e jω ) = ∑ h (n)e− jωn + ∑ h( M−1−n) e− jω ( M−1−n )
n=0 ------------------------------>(2)
n=0

For a symmetrical impulse response, h(n )=h( M −1−n ), substituting this relation in above equation (2 )
M−3 M−1
2 jω ( M−1) 2

( M−1

2 )
H ( e jω )= ∑ h(n )e− jωn+h e 2
+ ∑ h(n) e− jω ( M−1−n )
n=0 n=0 ---------------->(3)

4
M−2 M−2


H ( e )=e

jω( M−1)
2
[ 2
∑ h(n )e
n=0
M−2

M−1
2( −n )+ 2
∑ h(n ) e
n=0
− jω ( M−12−n)
]
H ( e jω )=e

jω( M−1)
2


[ 2
2
∑ h(n )cos ω( M−1
n=0 2
−n )


] jω j∠ H( e
jω )
The polar form of H (e ) can be expressed as H ( e )=|H ( e )|e
M−2
2
∴ Magnitude |H (e jω )|=2 ∑
n=0
h(n )cos ω ( M−1
2
−n )

M−1

Angle of H (e ) is given as
∠H(e jω)=¿ −ω
=============================================================================
{( ) 2
, for |H(e jω )|>0 ¿ ¿¿¿

Case (iii) : Antisymmetric for “N is ODD”:


Determine the frequency response of FIR filter with Antisymmetric impulse response and the order
of the filter N is Odd.

For this type of sequence

h ( M2−1 )=0
M−1
H (e )= ∑ h(n )e− jωn

n=0
The frequency response of impulse response can be written as,
M−3 M−3
2 2
H ( e jω )= ∑ h(n )e− jωn+ ∑ h( M−1−n)e− jω( M−1−n )
n=0 n=0

for antisymmetric impulse response, h(n )=−h( M−1−n )


M−3 M−3
2 2
jω = ∑ h(n )e− jωn− ∑ h (n)e− jω ( M −1−n )
H (e ) n=0 n=0
M−3 M−3

=e
− jω
M −1
( )2
[ 2
∑ h(n )e
n=0
M−3
jω ( M−1
2
−n )− 2
∑ h(n)e
n=0
− jω ( M−12 −n)
]
=e
− jω
M −1
( )j
2
[ 2
2 ∑ h(n)sin ω
n=0
M−3
( M−1
2
−n ) ]
=e
− jω
M −1
( )e
2
j
π
2
[ 2
2
∑ h(n )sin ω ( M2−1 −n )
n=0
]
5
M−3

H ( e jω )
=e
j
π
2
M−1
2
[
[ ( )] 2 ∑ h(n )sin ω M −1 −n
−ω 2

n=0
( 2 )
M −3
]
2

Magnitude of H ( e ) is given as,


jω |H (e jω )|=2 ∑
n=0
h( n ) sin ω ( M2−1 −n)
π M−1

Angle of H (e ) is given as,
============================================================================
∠H(e jω )=¿ −ω
2 2 {( )
for |H(e jω )|>0 ¿ ¿¿¿

Case (iv) : Antisymmetric For –“N is EVEN”:


Determine the frequency response of FIR filter with Antisymmetric impulse response and
the order of the filter N is Even. [Nov/Dec-2013]

The frequency response of impulse response can be written as,


M−2 M−2
2 2
H ( e jω ) = ∑ h (n)e− jωn + ∑ h( M−1−n)e− jω( M−1−n)
n=0 n=0

for antisymmetric impulse response, h(n )=−h( M−1−n )


M−2 M−2
2 2
jω = ∑ h(n )e− jωn− ∑ h( n)e− jω ( M−1−n )
H (e ) n=0 n=0
M−2

=e
− jω ( M 2−1 ) j
[ 2
2
∑ h(n )sin ω( M−1
n=0 2
M−2
−n ) ]
H ( e jω )
=e
− jω
M −1
2( )e j
π
2
[ 2

M−2
2
∑ h(n )sin ω ( M2−1 −n )
n=0
]
H ( e jω )
=e
π
j −ω
2
M−1
2
[
[ ( )] 2 ∑ h(n)sin ω M −1 −n
M−2
2

n=0
( 2 ) ]
=e
− jω
M −1
2 ( )j
[ 2
2
∑ h(n )sin ω( M−1
n=0
M−2
2
−n ) ]
=e
j
π
2
M−1
2
[
[ ( )] 2 ∑ h(n)sin ω M −1 −n
−ω 2

n=0
( 2 ) ]
M −2
2

Magnitude of H ( e ) is given as,


jω |H (e jω )|=2 ∑
n=0
h(n )sin ω ( M−1
2
−n )

6
π M−1

Angle of H (e ) is given as,
∠H(e jω )=¿ −ω
2 2 {( )
for |H(e jω )|>0 ¿ ¿¿¿
=============================================================================
Structures of FIR Filters:
Explain with neat sketches the Structure of FIR filters. [Nov/Dec-2012]

The realization of FIR filter is given by


 Transversal structure.
 Linear phase realization
 Polyphase realization.
Transversal structure:
It contains two forms of realization such as,
 Direct form realization
 Cascade form realization.
Direct form realization:
The system function of an FIR filter can be written as
N 1
H (z)   h(n) z  n
n 0

 h(0)  h(1) z 1  h(2) z 2  ..........  h(N  1) z  (N 1) eq(1)


Y(z)=h(0)X(z)+h(1)z 1 X (z)  h(2)z 2 X (z)  .......  h(N  1) z  (N 1) X (z) eq(2)
This structure is known as direct form realization. It requires N multipliers, N-1 adders, and N-1 delay
elements.

z 1 z 1 z 1 z 1
X(z)

h(1) h(2) h(N-2) h(N-1)


h(0)

+ + + +
Y(z)
Cascade Realization:
Problem 1: Determine the direct form Realization of the following system function. (Nov/Dec-14)
−1 −2 −3 −4 −5
H ( z)=1+2 z +6 z +4 z +5 z +8 z
Solution:
−1 −2 −3 −4 −5
Given: The system function is H ( z)=1+2 z +6 z +4 z +5 z +8 z
Y ( z)
H( z )= =1+2 z −1 +6 z−2 +4 z −3 +5 z−4 +8 z −5
X ( z)
Y ( z)= X (z )+2 z−1 X ( z )+6 z −2 X ( z)+4 z −3 X ( z)+5 z−4 X (z )+8 z −5 X ( z)

7
X(z)
1 1 1 1 Z-
z z z z 1

2 6 4 5
1

+ + + +

Y(z)

1 2 1
Problem 2: Obtain the cascade realization of system function H (z)  (1  2 z  z )(1  z  z 2 )
(May/June-12) (Nov/Dec-10)
Solution:
H (z)  H1 (z) H 2 (z)
Where H1 (z)  1  2 z 1  z 2 and H 2 (z)  1  z 1  z 2
Y1 (z)
H1 (z)   Y1 (z)  X 1 (z)  2 z 1 X 1 (z)  z 2 X (z) eq(1)
X 1 (z)
Y2 (z)
H 2 (z)   Y2 (z)  X 2 (z)  z 1 X 2 (z)  z 2 X (z) eq(2)
X 2 (z)
The equation (1) and equation (2) can be realized in direct form and can be cascaded as shown in figure.

H.W 1 : Obtain the direct form realization for the following system function.
1. H ( z)= 1+2z−1−3 z−2 −4 z−3 +5 z−4
1 3 1 1
2. ( 4 8 8 )(
H ( z)= 1− z−1 + z −2 1− z−1− z−2
2 )
H.W 2: Obtain the cascade form realization for the following system function.
5
1. H ( z)=1+ z−1 +2 z−2 +2 z−3
2
1
(
2. H ( z )=( 1+2z−1 ) 1+ z−1 +z−2
2 )
Obtain the linear phase realization of the system function. [Nov/Dec-10]
1 1 1 1 1 1
H  z   z  z 2  z 3  z 4  z 5  z 6
2 3 4 3 2

Solution:
By inspection we find system function H(z) is that of a linear phase FIR filter and,
h(n)=h(N-1-n)
Therefore, we can realize the system function as shown in Figure.

8
Lattice Structure:
The lattice structure formulas are,
α m( 0)=1
α m( m)=k m
α m( k )=α m−1 (k )+α m (m)α m−1 (m−1)
****************************************************************************************
1 1 1
K 1 = ;K 2= ; K 3=
Consider an FIR lattice filter with co-efficients 2 3 4 . Determine the FIR filter for the
direct form structure. [Nov/Dec-2013] [Nov/Dec-2015]

Solution:
1 1 1
K 1 = ;K 2= ; K 3=
Given: The FIR lattice filter with co-efficients are 2 3 4
1
α 3 (0 )=1 ; α 3 (3 )=K 3 =
4
1 1
α 2 (2)=K 2= ; α 1 (1 )=K 1 =
3 2
We know,
α m( k)=α m−1 (k)+α m (m)α m−1 (m−1)
For m=2 and K=1
α 2 (1)=α 1 (1)+α 2 (2)α 1 (1)
1 1 1 2
= + . =
2 3 2 3
For m=3 and K=1
α 3 (1)=α 2 (1)+α 3 (3 )α2 (2 )
2 1 1 3
= + . =
3 4 3 4
For m=3 and K=2
α 3 (2)=α 2 (2)+α 3 (3 )α 2 (1 )
1 1 2 1
= + . =
3 4 3 2
3 1 1
∴ The lattice filter coeficients are α 3 (0)=1;α 3 (1 )= ;α 3 (2)= ;α 3 (3)=
4 2 4
---------------------------------------------------------------------------------------------------
H.W: Realize the following system in lattice form. [May/June-07]
4 3 2
y (n)  2 x( n)  x( n  1)  x(n  2)  x(n  3)
5 2 3
Design of FIR Filter:
FIR Filter can be designed using three following techniques.

9
1. Fourier series method
2. Windowing technique
3. Frequency sampling method.
Filter design using windowing technique:
Explain the designing of FIR filters using windows. [April/May-2011]

The desired frequency response of any digital filter is periodic in frequency and can be expanded in a
Fourier series.


H d (e )= ∑ hd (n)e− jω n
n=−∞ ------------------------------------------------------>(1)
Where,
1 π
hd (n )= ∫ H (e jω )e jωn d ω
2π −π
------------------------------------------------>(2)
Gibb’s Phenomenon:

One possible way of finding an FIR filter that approximates H (e ) would be truncate the infinite Fourier

series at
n=± ( M−1
2 ). Abrupt truncation of the series will lead to oscillation both pass band and stop
band. This phenomenon is known as Gibbs phenomenon.
Types of window:
 Rectangular window.
 Hanning window.
 Hamming window.

Rectangular window:
The rectangular window sequence is given by,

M−1 M−1
w R (n)=¿ 1 { ( ) ( ) for −
2
≤n≤
2
¿ ¿¿¿
Hanning window:
The hanning window sequence can be obtained by

2 πn M−1 M−1
{
w Hn (n)=¿ 0 .5+0.5cos
M−1
for − ( ) ( )
2
≤n≤
2
¿ ¿¿¿
Hamming window:
The hamming window can be obtained by

2πn M−1 M−1


{
w Hm(n)=¿ 0 .54+0.46cos
M−1
Filter coefficient (hd(n) ) for different types of Filters:
for − ( ) ( )
2
≤n≤
2
¿ ¿¿¿

Type of Filter hd(n)


LPF ωC
hd (n )= for n=α
π
sin ω C (n−α )
hd (n )= for n≠α
π (n−α )

10
HPF ωC
hd (n )=1− for n=α
π
1
hd (n )= [ sin(n−α )π −sin(n−α )ωC ] for n≠α
π (n−α )
BPF ω −ω
hd (n )= C 2 C 1 for n=α
π
1
hd (n )= [ sin ωC 2 (n−α)−sin ωC 1( n−α )] for n≠α
π (n−α )
BSF ω C2 −ω C 1
hd (n )=1− [ π ] for n=α
1
hd (n )= [ sin ωC 1 (n−α )−sin ωC 2( n−α )+sin (n−α ) π ] for n≠α
π (n−α )

Design an ideal low pass filter with a frequency response

π π
Solution:
Given:

{
H d (e )=¿ 1 for − ≤ω≤ ¿ ¿¿¿
2 2
π π
Find the values of h(n) for M=11 using hanning window. Find H(z). Plot the magnitude and frequency response. (May/June-14)

{
H d (e jω )=¿ 1 for − ≤ω≤ ¿ ¿¿¿
(Nov/Dec-14) (April/May 2011)(April/May-08) (Nov/Dec-09) (Nov/Dec-10)

2 2
Step 1: To find filter coefficient.
Hence
π
ω = .
2 C

1 π
hd (n ) = ∫ H (e jω )e jωn d ω
2π −π
π
1
= ∫ 2 π 1 . e jωn d ω
2π −2
sin (n−α)ω C
= ; ∵ α=0
π (n−α )
π
sin n
2
hd (n ) = ; −5≤n≤5
πn
π
sin (0 )
2
=
For n=0 ; hd (0) π (0)
πn
sin
1 2
=
2 πn
2
∴ lim sinθθ =1
θ−¿ 0
1
hd (0) =
2
π
sin (1)
2 1
hd (1 )=hd (−1)= = =0 . 3183
For n=1 ; π (1 ) π

11
sin π
hd (2 )=h d (−2 )= =0
For n=2; 2π

sin
2
hd (3 )=h d (−3 )= =−0 .106
For n=3; 3π
sin 2 π
hd ( 4 )=h d (−4 )= =0
For n=4; 4π

sin
2
hd (5 )=h d (−5 )= =0 .06366
For n=5; 5π
Step 2: To find hanning window:

2 πn M−1 M−1
{
w Hn (n)=¿ 0 .5+0.5cos
M−1
2 πn
for − ( ) ( )
2
≤n≤
2
¿ ¿¿¿

=0 . 5+0 . 5cos for −5≤n≤( 5 )


10
π (0 )
w Hn (0 )=0 . 5+0 . 5 cos =1
For n=0; 5
π (1)
w Hn (1 )=w Hn (−1 )=0 .5+0 .5 cos =0 . 9045
For n=1 ; 5
π (2)
w Hn (2 )=w Hn (−2 )=0 . 5+0 .5 cos =0 . 6545
For n=2; ` 5
π (3 )
w Hn (3 )=w Hn (−3 )=0. 5+0 . 5 cos =0 .3454
For n=3 ; 5
π (4 )
w Hn ( 4 )=w Hn (−4 )=0 . 5+0 .5 cos =0 . 0954
For n=4 ; 5
π (5 )
w Hn (5 )=w Hn (−5 )=0 . 5+0 . 5 cos =0
For n=5 ; 5
Step 3: To find filter coefficients using hanning window are
h(n )=h d (n)∗w Hn (n) for −5≤n≤5
h(0 )=h d (0)∗w Hn (0)=(0 .5 )∗1=0.5
h(1)=hd (1 )∗w Hn (1 )=0. 3183∗0. 9045=0 .2879
h(2 )=hd (2 )∗wHn (2)=0∗0 . 6545=0
h(3 )=h d (3)∗w Hn (3)=−0 .106∗0.3454=0.0366

12
Step 4: The transfer function of the filter is given by
M−1
2
H ( z)=h( 0)+ ∑ [ h(n) ( z n +z −n ) ]
n=1
5
n −n
= 0 .5+ ∑ h(n ) ( z +z )
n=1
= 0 .5+h(1) ( z 1 +z−1 ) +h(2) ( z 2 +z−2 ) +h(3) ( z 3 +z−3 ) +h( 4 ) ( z 4 +z−4 ) +h(5 ) ( z5 +z−5 )
= 0 .5+0 .287 z 1 +0 . 287 z−1 +0 . 0366 z3 +0 . 0366 z −3 +0 .006 z 4 +0 . 006 z−4
Step 5: The transfer function of the realizable filter is
( M −1 )

2
H ' ( z)=z H ( z)
= z−5 [ 0 . 5+0 .287 z 1 +0. 287 z−1 +0 . 0366 z3 +0 . 0366 z−3 +0 . 006 z 4 +0 . 006 z−4 ]
H ' ( z)=0 . 5 z−5 +0 . 287 z −4 +0. 287 z−6 +0. 0366 z−2 +0 . 0366 z−8 +0 . 006 z−1 +0 . 006 z−9
The filter coefficients of causal filter are given by
h(0 )=h (3)=h(7 )=h(10 )== 0,h(1)=h(9 )=0 . 006;h(2 )=h(8 )=0. 0366;h (4 )=h (6)=0 . 287 ;h(5 )=0 . 5

Step 6: The frequency response is given b y


− 5

H (e )=∑ a(n )cosωn
n=0
where ,

(2M−1 )=h(5)=0 .5
a(0)=h

M−1
a(n)=2h ( −n )
2
a(1)=2h(5−1)=2h( 4)=2(0. 006)=0 .12
a(2)=2h(5−2)=2h (3)=0
a(3)=2h (5−3 )=2h(2)=2* 0.036=0. 072
a(4 )=2h(5−4)=2h (1)=2* 0. 006=0.12
a(5)=2h(5−5 )=2h(0)=0
− 5

H (e )= ∑ a (n)cosωn
n=0
= a(0 )+a(1)cos ω+a (2 )cos2ω+a(3 )cos3 ω+a (4 )cos 4ω+a(5)cos5 ω
=0 .5+0 .12 cosω+0.072 cos3 ω+0. 12 cos4 ω
Magnitude in dB is calculated by varying 0 to 10 and tabulated below.
ω(in degree ) 0 1 2 3 4 5
− 0.812 0.8115 0.810 0.8083 0.8054 0.8018
H (e jω )
jω -1.8 -1.814 -1.83 -1.85 -1.88 -1.91
|H (e )|dB
====================================================================================

π
Design an ideal high pass filter with a frequency response
Find the values of h(n) for N=11 using hanning window. (May/June-16)(April/May-08)

4{
Hd (e )=¿ 1 for ≤|ω|≤π ¿ ¿¿¿
13
Solution:
Given :
π
π ωC =

{
H d (e jω )=¿ 1 for ≤|ω|≤π ¿ ¿¿¿
4
Hence 4

Step 1: To find filter coefficient.


1 π
hd (n ) = ∫ H (e jω )e jωn d ω
2π −π
π
1
¿ ∫ 2 π 1. e jωn d ω
2π −2
1
hd (n )
=
π (n−α )
[ sin(n−α )π −sin(n−α )ωC ] for n≠α
1 nπ
hd (n )
=
πn [
sin nπ −sin
4 ]
; −5≤n≤5

Step 2:
1 (0) π
For n=0
hd (0 )=
π (0)[sin(0 )π −sin
4 ]
1
hd (0 )=1− =0 . 75
U sin g , L'hospital rule 4
1
For n=1;
hd (1 )=hd (−1)= [
π (1 )
sin(1 )π−sin
(1 )π
4 ]
=−0 . 225

1
For n=2;
hd (2 )=h d (−2 )=
π (2 ) [
sin(2 )π −sin
(2)π
4 ]
=−0 .159

1
For n=3 ;
hd (3 )=h d (−3 )=
π (3) [
sin(3 )π−sin
(3 )π
4 ]
=−0 .075

1
For n=4 ;
hd ( 4 )=h d (−4 )=
π(4) [
sin (4 )π −sin
(4 )π
4
=0 ]
1
For n=5 ;
hd (5 )=h d (−5 )=
π (5) [
sin(5) π−sin
(5 )π
4 ]
=0 . 045

Step 2: Using Hanning window:

2 πn M−1 M−1
{
w Hn (n)=¿ 0 .5+0.5cos ,
M−1 2( ) ( )
≤n≤
2
¿ ¿¿¿
w Hn (0)=0.5+0. 5=1
π (1 )
w Hn (1 )=w Hn (−1 )=0 .5+0 .5 cos ( ) 5
=0 . 9045

π (2 )
(−2 )=0 . 5+0 .5 cos (
5 )
w Hn (2 )=w Hn =0 . 655

14
w Hn (3 )=w Hn (−3 )=0. 5+0 . 5 cos ( π (3)5 )=0 .345
π (4 )
(−4 )=0 . 5+0 .5 cos (
5 )
w Hn ( 4 )=w Hn =0. 0945

π (5)
(−5 )=0 . 5+0 . 5 cos (
5 )
w Hn (5 )=w Hn =0

Step 3: The filter coefficients using hanning window are,


h(n )=h d (n)w Hn ( n) for −5≤n≤5
h(0)=h d (0)w Hn (0)=(0.75)(0)=0
h(1)=hd (1)w Hn (1)=(−0.225 )( 0.905 )=−0.204
h(2)=hd (2)w Hn (2)=(−0.159 )(0.655 )=−0 .104
h(3)=h d (3)w Hn (3)=(−0.075)(0.345)=−0.026
h( 4 )=hd ( 4 )w Hn (4 )=(0)(0. 8145 )=0
h(5 )=h d (5 )w Hn (5 )=(0 . 045 )( 0)=0
Step 4: The transfer function of the filter is given by
The transfer function of the realizable filter is

H'( z) =z
− ( M−1
2 )
H ( z)
= z−5 [ 0. 75−0 . 204z−1−0.204 z 1−0 . 104 z−2−0. 104 z 2 −0 .026 z−3 −0 .026 z3 ]
−5 −6 −4 −7 −3 −8 −2
= 0 . 75z −0 . 204z −0. 204 z −0. 104 z −0 . 104 z −0. 026 z −0 . 026 z H
M 1

 h( n) z 
2
n
 h(0)   zn
H( z) n 1
5
= h(0 )+ ∑ h(n ) [ z −n + z n ]
n=1

= 0 . 75+h(1 )[ z−1 +z 1 ]+h(2) [ z−2 +z 2 ] +h(3 ) [ z −3 +z 3 ] +h( 4 ) [ z−4 +z 4 ] +h(5 ) [ z−5 + z5 ]


= 0 . 75−0. 204z−1 −0 .204 z 1 −0 .104 z −2 −0 . 104 z 2−0. 026 z−3 −0 . 026 z 3
The causal filter coefficients are
h(0 )=h(1)=h (9)=h(10 )=0;
h(2)=h(8 )=−0. 026
h(3 )=h(7 )=−0 .104
h( 4)=h(6 )=−0. 204
h(5 )=0 . 75
M −1
2

H (e )=∑ a(n)cos ωn
n=0

a(0 )=h ( M−1


2 )
=h(5 )=0 . 75

M−1
a(n )=2 h
[ 2 ]
−n =2 h(5−n)

a(1 )=2h (5−1 )=2h( 4 )=−0 . 408

15
a(2 )=2h (5−2 )=2h(3 )=−0. 208
a(3 )=2h ( 5−3 )=2 h(2)=−0 .052
a( 4 )=2h (5−4 )=2h (1 )=0
a(5 )=2h ( 5−5 ) =2 h(0)=0

H (e jω )=0. 75−0 . 408 cosω−0 .208 cos 2 ω−0 . 052 cos 3 ω
ω(in degrees ) 0 1 2 3 4 5

H (e jω ) 0.082 0.0822 0.083 0.08433 0.08615 0.08848

|H (e )|dB -21.72 -21.70 -21.61 -21.480 -21.29 -21.11

b) Using Hamming window:


The hamming window sequence is given by

2πn M−1 M −1
{ ( ) ( ) ( )
w Hm (n)=¿ 0 .54+0.46cos
M−1
; for −
2
≤ n≤
2
¿ ¿¿¿

πn
Hm {
w (n)=¿ 0 .54+0.46cos ( ); for −5≤n≤5 ¿ ¿¿¿
5
w Hm (0)=1
w Hm (1)=w Hm (−1)=0.912
w Hm (2)=w Hm (−2)=0.682
w Hm (3)=w Hm (−3)=0.398
w Hm (4 )=w Hm (−4)=0.1678
w Hm (5)=w Hm (−5)=0. 08
The coefficients using hamming window sequence are,
h(n)=h d (n)∗w Hm (n); −5≤n≤5
h(0 )=h d (0)∗w Hm (0)=1∗0. 75=0 .75
h(1)=hd (1)∗w Hm (1)=(−0.225 )∗(0.912 )=−0.2052
h(2 )=hd (2)∗wHm (2)=(−0.159 )∗(0.682 )=−0.1084
h(3)=h d (3)∗w Hm (3)=(−0.075 )∗( 0.398 )=−0.03
h( 4 )=hd ( 4 )∗w Hm (4 )=(0 )∗(0. 16787 )=0
h(5 )=h d (5 )∗w Hm(5)=(−0 .045 )∗(0.08 )=0. 0036
The transfer function of the filter is given by
M−1
2

=h ( 0)+ ∑ h( n ) [ z−n + zn ]
H ( z) n=1
5
= h(0 )+ ∑ h(n ) [ z −n + z n ]
n=1

=0 . 75+h(1 ) [ z−1 +z 1 ]+h(2) [ z−2 +z 2 ] +h(3 ) [ z −3 +z 3 ] +h( 4 ) [ z−4 +z 4 ] +h(5 ) [ z−5 + z5 ]


= 0 . 75−0. 2052z−1−0. 2052 z1 −0 . 1084 z−2−0. 1084 z 2 −0 .03 z−3 −0 . 03 z 3 +0 .0036 z −5 +0 .0036 z 5

16
The transfer function of the realizable filter is

H'( z) =z
− ( M−1
2 )
H ( z)
= z−5 [ 0. 75−0 . 2052z−1 −0 .2052 z 1−0. 1084 z−2 −0 .1084 z 2 −0 . 03 z −3 −0 . 03 z3 +0 . 0036 z−5 +0 . 0036 z 5 ]
−5 −6 −4 −7 −3 −8 −2 −10
H ' ( z)= 0 .75z −0.2052z −0.2052 z −0.1084 z −0.1084 z −0.03 z −0. 03 z +0 .0036 z +0 .0036
The filter coefficients of causal filter are
h(0 )=h (10 )=0 . 0036;h(1)=h(9 )=0;h(2)=h(8 )=−0 . 03;h(3 )=h (7 )=−0 .1084;h(4 )=h(6 )=−0 . 2052;
h(5 )=0 . 75
M −1
2
H ( e jω )= ∑ a( n ) cos ωn
n=0

a(0 )=h ( M2−1 )=h (5)=0. 75


M−1
a(n )=2 h ( −n) =2 h(5−n )
2
a(1)=2 h(5−1 )=2 h( 4)=−0 . 4104
a(2 )=2 h(5−2)=2 h(3 )=−0. 2168
a(3 )=2 h(5−3)=2h (2)=−0. 06
a( 4)=2 h(5−4)=2 h(1)=0
a(5 )=2 h(5−5)=2h (0)=0 .0072

H (e jω )=0. 75−0 . 4104 cosω−0 . 2168 cos 2 ω−0. 06 cos 3 ω+0 . 0072cos 5 ω
ω(in degrees ) 0 30 60 90 120 150 180

0.07 0.28 0.7168 0.9668 1 1.003 1.0108
H (e jω )
jω -23.1 -11 -2.89 -0.29 0 0.028 0.093
|H (e )| dB
=====================================================================================

π π
H.W: 1. Design a filter with
{
H d (e jω )=¿ e−j3ω , − ≤ω≤ ¿ ¿¿¿
4 4 . Using a Hamming & Hanning
window with N=7

π π
2. Design a filter with

H d (e )=¿ e{ −j5ω ,

.
− ≤ω≤ ¿ ¿¿¿
2 2
Using a Hamming & Hanning window
with N=11.
3. Design an FIR filter for the ideal frequency response using hamming window with N=7.

π
{
H d (e jω )=¿ e−j3ω , |ω|≤ ¿ ¿¿¿
8
For a FIR linear phase digital filter approximating the ideal frequency response

π
{
***************************************************************************************
H d (e jω )=¿ 1 , |ω|≤ ¿ ¿¿¿
6
Determine the coefficients of a 5 tap filter using rectangular window. 17
Solution:
Given:

π
{
H d (e jω )=¿ 1 , |ω|≤ ¿ ¿¿¿
Step 1: To find filter coefficient.
6 Hence
π
ωC = ; N =5.
6

1 π
hd (n ) = ∫ H (e jω )e jωn d ω
2π −π
π
1
= ∫ 2 π 1 . e jωn d ω
2π −2
sin (n−α)ω C
= ;
π (n−α ) ∵ α=0
π
sin n
6
hd (n ) = ;
πn −2≤n≤2
π
sin (0 )
6
=
For n=0: hd (0) π (0)
πn
sin
1 6
=
6 πn
6

hd (0 )
1
= =0 . 16
6
∴ lim sinθθ =1
θ−¿ 0

π
sin (1)
6 0.5
hd (1 )=hd (−1)= = =0 .159
for n=1 π (1 ) π
π (2 )
sin
6
hd (2 )=h d (−2 )= =0 .1379
For n=2; 2π
Step 2: Using Rectangular window:

M−1 M−1
w R (n )
=¿ 1 { ( ) ( )
for −
2
≤n≤
2
¿ ¿¿¿
= 1 for −2≤n≤2
w R (0 )=w R (1 )=w R (2 )=1
Step 3: To find filter coefficients using rectangular window are
h(n)=h d (n)∗w Hn (n) for −2≤n≤2

18
h(0)=h d (0)∗w Hn (0)=(0.16)∗1=0.16
h(1)=hd (1)∗w Hn (1)=0.59∗1=0.59
h(2 )=hd (2)∗wHn (2)=0 .137∗1=0. 137
Step 4: The transfer function of the filter is given by
M−1
2
=h (0)+ ∑ [ h(n ) ( z n + z−n ) ]
H ( z) n=1
2
= 0 . 5+ ∑ h(n ) ( z n +z−n )
n=1

= 0 .16+h(1 )( z 1 +z −1 ) +h(2 )( z 2 +z −2 )
= 0 . 16+0 . 59 z 1 +0. 59 z−1 +0 .137 z −2 +0 .137 z 2
Step 5: The transfer function of the realizable filter is
( M −1 )

H ' ( z) =z 2
H ( z)
= z−2 [ 0 .16+0. 59 z 1 +0 .59 z−1 +0 .137 z−2 +0 . 137 z 2 ]
H ' ( z) =0 . 16 z−2 +0 .59 z−1 +0. 59 z−3 +0 . 137 z −4 +0 . 137
The filter coefficients of causal filter are given by
h(0 )=h (4 )=0 . 137 ,h(1)=h(3 )=0 . 59;h(2)=0. 1 6;h(5 )=0
M −1
2
jω = ∑ a( n )cos ωn
H (e ) n=0

a(0 )=h ( M2−1 )=h (2)=0. 32


M−1
a(n )=2 h ( −n)=2 h(2−n )
2
a(1)=2h(2−1)=2h(1)=1.18
a(2 )=2 h(2−2)=2 h(0 )=0 . 274
H (e jω )=0. 32+1 .18 cosω+0 .274 cos2 ω
0 30 60 90 120 150 180
ω(in degrees )
− 1.774 1.47 0.773 0.046 -0.407 -0.564 -0.586
H (e jω )
=====================================================================
Design an ideal band pass filter with a frequency response

π 3π
4 {
H d (e jω )=¿ 1 , ≤|ω|≤ ¿ ¿¿¿
4
Find the values of h(n) for N=11 using rectangular window.

Solution:
Given:

π 3π
{
H d (e jω )=¿ 1 , ≤|ω|≤ ¿ ¿¿¿
4 4
π 3 π Step 1: Filter coefficients are,
ωC 1 = and ω C2 =
4 4

19
1
hd (n )= [ sin ωC 2 (n−α)−sin ωC 1( n−α )] for n≠α Step 2: Using rectangular window
π (n−α )
1 3 πn πn
=
πn [ sin
4
−sin
4]
For n=0;
hd (0 )=0 . 5
3 π (1 ) π (1)
sin −sin
4 4
hd (1 )=hd (−1)= =0
π (1)
3 π (2) π (2 )
sin −sin
4 4
hd (2 )=h d (−2 )= =−0. 3183
π (2)
3 π (3 ) π (3)
sin −sin
4 4
hd (3 )=h d (−3 )= =0
π (3 )
3 π (4 ) π(4)
sin −sin
4 4
hd ( 4 )=h d (−4 )= =0
π (4 )
3 π (5) π (5)
sin −sin
4 4
hd (5 )=h d (−5 )= =0
π (5 )

M−1 M−1
{ ( )( )
wR (n)=¿ 1 for − ≤n≤
2 2
¿ ¿¿¿ ¿
¿
Step 3: Filter coefficients using rectangular window
h(n )=w R( n)∗hd (n ); −5≤n≤5
h(0 )=w R( 0)∗hd (0 )=1∗0. 5=0 .5
h(1)=w R (1)∗hd (1)=1∗0=0
h(2 )=w R (2)∗hd (2 )=1∗−0 .3183=−0 .3183
h(3 )=w R (3 )∗h d (3)=1∗0=0
h( 4 )=w R (4 )∗hd ( 4 )=1∗0=0
h(5 )=w R (5 )∗h d (5)=1∗0=0
Step 4: The transfer function of the filter is
M−1
2
H (z )=h(0 )+ ∑ h( n) [ z−n +z n ] Step 5: The transfer function of the realizable filter is
n=1
=0 .5−0 . 3183z 2 −0 .3183 z−2

20
H' (z )=z−5 ( 0 . 5−0 . 3183z 2 −0 .3183 z−2 )
=0 . 5z−5 −0 . 3183z−3 −0 .3183 z−7
The filter coefficients of the causal filers are
h(0 )=h (10 )=h( 9)=h(2)=h(8 )=h( 4 )=h(6 )=0
h(3 )=h(7 )=−0 . 3183
h(5 )=0 . 5
M−1
2
H (e jω )= ∑ a(n )cosωn
n=0

a(0 )=h (2M−1 )=h (5)=0. 5


M−1
a(n )=2 h ( −n)=2 h(5−n )
2
a(1 )=2 h(5−1)=2 h( 4 )=0
a(2 )=2 h(5−2)=2 h(3 )=−0. 6366
a(3 )=2 h(5−3)=2h (2)=0
a( 4 )=2 h(5−4 )=2 h(1 )=0
a(5 )=2 h(5−5)=2h (0)=0

H (e jω )=0. 5−0 .6366 cos 2ω
ω(in degrees ) 0 30 60 90 120 150 180

-0.1366 0.1817 0.818 1.1366 0.818 0.1817 -0.1366
H (e jω )
jω -17.3 -14.8 -1.74 1.11 -1.74 -14.8 -17.3
|H (e )| dB
====================================================================
Design an ideal band Reject filter with a frequency response Find the values of h(n) for N=11 using rectangular window.

π 2π1
{
H d (e jω )=¿ 1 , for|ω|≤ andhd|ω|≤
3
(n )= ¿ ¿¿¿ [ sin ωC 1 (n−α )−sin ωC 2 ( n−α )+sin (n−α ) π ]
3π (n−α )
1 πn 2 πn
(May/June-14)(Nov/Dec-12)(Nov/Dec-2011)
=
πn [sin −sin
3 3 ]
+sin nπ
Solution:
For n=0;
hd (0 )=0 . 667 Given:

πn 2 πn
sin −sin +sin nπ Step 1: Filter
3 3
hd (1 )=hd (−1)= =0 coefficients
π (1) are,
π 2π πn 2 πn
ωC 1 = and ω C2 = sin −sin +sin nπ
3 3 3 3
hd (2 )=h d (−2 )= =0 .2757 Step 2:
π (2)
πn 2 πn Using
sin −sin +sin nπ rectangular
3 3
hd (3 )=h d (−3 )= =0 window
π (3 )
πn 2 πn
sin −sin +sin nπ
3 3
hd ( 4 )=h d (−4 )= =−0 .1378
π (4 )
πn 2 πn
sin −sin +sin nπ
3 3 21
hd (5 )=h d (−5 )= =0
π (5 )
Step 3: Filter coefficients using rectangular window
h(n )=w R ( n)∗hd (n ); −5≤n≤5
h(0 )=w R ( 0)∗hd (0 )=1∗0. 667=0 . 667
h(1)=w R (1)∗hd (1)=1∗0=0
h(2 )=w R (2)∗hd (2 )=1∗0. 2757=0 .2757
h(3 )=w R (3 )∗h d (3)=1∗0=0
h( 4 )=w R (4 )∗hd ( 4 )=1∗−0 .1378=−0 .1378
h(5 )=w R (5 )∗h d (5)=1∗0=0

Step 4: The transfer function of the filter is


M −1
2
H (z )=h(0 )+ ∑ h( n) [ z−n +z n ]
n=1
=0 .667 +0 .2757 z 2 + 0. 2757 z−2 −0 .1378 z−4 −0 . 1378 z 4

22
Step 5: The transfer function of the realizable filter is
H'(z )=z−5 ( 0.667+0.2757z 2+0 .2757 z−2 −0.1378 z−4−0.1378 z 4 )
=0 .667 z −5 +0.2757 z−3+0.2757 z−7−0 .1378 z−9−0.1378 z−1
The filter coefficients of the causal filers are
h(0)=h (10)=h(2)=h(8)=h(4)=h(6)=0
h(1)=h(9)=−0.1378
h(3)=h(7)=0.2757
h(5)=0 .667
M−1
2
H (e jω )= ∑ a(n )cos ωn
n=0

a(0 )=h (2M−1 )=h (5)=0. 667


M−1
a(n )=2 h ( −n)=2 h(5−n )
2
a(1 )=2 h(5−1 )=2 h( 4 )=0
a(2 )=2 h(5−2)=2 h(3 )=0 . 5514
a(3 )=2 h(5−3)=2h (2)=0
a( 4 )=2 h(5−4 )=2 h(1 )=−0 . 2756
a(5 )=2 h(5−5)=2h (0)=0

H (e jω )=0. 667+0. 5514 cos 2 ω−0 . 2756 cos4 ω
ω(in degrees ) 0 30 60 90 120 150 180

0.9428 1.08 0.526 16 0.529 1.08 0.9428
H (e jω )
jω -0.5 0.67 -5.53 -15.9 -5.53 0.67 -0.5
|H (e )|dB
============================================================================
Design a high pass filter using window, with a cut-off frequency of 1.2 radians/sec and N=9. [Nov/Dec-2016]
Solution:
Given
 c  1.2radians / sec
if T =1 sec
c  cT  1.2 radians
The impulse response of a high pass filter with a cut off frequency c is
 sin c n
hd (n)  n 0


1- c for n=0

c  1.2

23
1.2
hd (0)  1   0.618

 sin1.2
hd (1)  hd (1)   0.2966

 sin 2.4
hd (2)  hd (2)   0.1075
2
 sin 3.6
hd (3)  hd (3)   0.0469
3
 sin 4.8
hd (4)  hd (4)   0.0719
4
Hamming window for 4  n  4 is

2 n
wH (n)  0.54  0.46 cos for -4  n  4
8
n
=0.54+0.46cos
4
wH (0)  1
wH (1)  wH (1)  0.865
wH (2)  wH (2)  0.54
wH (3)  wH (3)  0.215
wH (4)  wH (4)  0.08
h(n)  h d (n) w H (n)
h(0)  (0.618)(1)  0.618
h(1)  h(1)  (0.2966)(0.865)  0.256
h(2)  h(2)  0.058
h(3)  h(3)  0.01
h(4)  h(4)  0.0057
The casual filter coefficients are
h(0)  (0.618)(1)  0.618
h(1)  h(1)  (0.2966)(0.865)  0.256
h(2)  h(2)  0.058
h(3)  h(3)  0.01
h(4)  h(4)  0.0057
=====================================================================
H.W: Design an ideal differentiator with frequency response H (e j )  j;      using hamming window with
N=8. (April/May-15)
=============================================================================
Frequency Sampling Method:( April/May-15)
Discuss the design procedure of FIR filters using frequency sampling method. [May/June-2013]

Generally, FIR filter can be specified by giving impulse response coefficients h(n) (or) DFT coefficients
H(k).

24
N−1 j 2π kn
1 N
h(n )= ∑ H ( k)e
N k=0 -------------------------------> (1)
N−1 j 2 π kn

N
H (k )= ∑ h (n)e
n=0 ----------------------------------> (2)
H (k )=DFT samples
H (k )=H ( z )| j 2 π kn
z=e N
--------------------------------------> (3)
N−1
H ( z)= ∑ h(n )z−n
and n=0 --------------------------------------> (4)
N−1 N −1 j2 π kn

Put (1) in (4)


jω jω
H ( z )= ∑
n=0
[ 1
N
∑ H (k )e
k=0
N
] z −n

If z=e H (e )=H (z )
2 πk
ω k= ( ) N where ω k−−¿ sampling frequency .
General steps to design FIR filter using frequency sampling method [type-I design]:
Step 1: Draw the filter graph, as in FIR design using window function.
Step 2: Draw the unit circle and mark the points, if k-0,1…N-1.
o
360
θk = ∗k
N
0
360
θ1 = ∗1
if k=1; N
2πk
ω by
Step 3: To find H(k), replace N is the given equation.

jω −jαω
Hd(e )=¿ {e , 0≤ω≤ωC ¿ ¿¿¿ ¿
¿
Step 4: Find h(n)
If 'N' =odd
N −1

If 'N' =Even:
1
{ 2
h(n)= H (0 )+ ∑ 2 Re H (k )e N
N k=1
(
j2 π kn
) } ∴ H (0 )=1

{ }
−1 j2 π kn
2
1
h(n)= H (0)+ ∑ 2 Re H (k )e N
N
( )
k=1
Step 5: Find H(z):

25
N−1
H ( z )= ∑ h(n )z−n
n=0

Design LPF which has the following specifications, N=7 using frequency sampling Technique. [Nov/Dec-2016][Nov/Dec-
15]

π
{
H d(e jω )=¿ e−j 3ω ,0≤ω≤ ¿ ¿¿¿
2
Solution:

π
Given:

H d(e )=¿ e { −j3ω
,0≤ω≤ ¿ ¿¿¿
2
Step 1: From a unit circle, mark points from
o
360
θk = ∗k
N
θ1 =51. 420
θ2 =102. 80
θ3 =154 . 260
θ 4=205 . 680
θ5 =257 .1 0
θ6 =308 .52 0

Step 2:
N−1
H(k)=¿ {e
(−j
N ) πk
¿
for k=0,1,6 ¿¿¿
N=7.
6πk
H(k)=¿ e { −j
7 ¿
for k=0,1,6 ¿¿¿

26
N−1

1
{
h(n )= H (0)+ ∑ 2 Re H (k )e N
N k =1
2
(
6 πk j 2 π kn
j2 π kn
) } ∴ H (0)=1

3
1
{ −j
= 1+ ∑ 2 Re e 7 . e 7
7 k=1
(
jπk( 2n−6)
)}
3
1
{
= 1+2 ∑ Re .e
7 k =1
7
}
3
πk (2 n−6 )
h(n )=
1
7 {
1+2 ∑ cos
k=1 7 ( )}
π (2 n−6 )
h(n )=
1
7 { (
1+2 cos
7 ( ))} for k=1 .

h(0 )=−0. 114;h(1 )=0 . 079;h(2)=0 . 321;h (3 )=0. 4286;h( 4 )=h(2 );h(5)=h(1);h(6 )=h (0)
=======================================================================

Solution:
Step 1:

N −1 N−1
(H(k)=¿{1.e ) ,k=0,12,3¿{0.4e ( ) ,k=4¿¿ ¿
−j πk
N
−j πk
N
Find coefficient of LP FIR with N=15 and it has symmetric unit sample response. It satisfies the following condition.

2πk
¿ H ()
15
=¿ {1 , k=0,1,2,3 ¿ {0.4 ,k =4¿¿¿¿
Step 2:
N−1

1
{
h(n )= H (0)+ ∑ 2 Re H (k)e
N k =1
2
(
j2 π kn
N ) } ∴ H (0)=1

j 14 πk j14 πk j2 π kn
h(n )=
1
15 { −
1+ ∑ 2 Re e 15
k =1
7
(( +0 . 4 e

15 )e )15
}
j 2πk ( n−7) j 2 πk

{ [∑ }
3
=
1
15
1+2 Re
k=1
15
e
] + 2( 0 . 4 ) ∑ e
k=4
15
(n−7)

1 2 π (n−7 ) 4 π (n−7 ) 6 π ( n−7 ) 8 π (n−7 )


=
15 { [
1+2 cos
15
+cos
15
+ cos
15
+0 .8 cos
15 ] ( )}
27
h(0 )=−0.0141 ;h(1)=−0 .0195 ;h (2)=0 .04;h (3 )=0.0122
h( 4 )=−0 .0913;h(5)=−0 . 01809;h (6)=0 .313 ;h(7 )=0. 52.
========================================================================================
Determine the coefficients {h (n)} of a linear phase FIR filter of length M =15 has a symmetric unit sample response and a frequency

 2 k  1 for k  0,1, 2,3


Hr  
response that satisfies the condition  15  0 for k  4,5, 6, 7 (May/June-13) (April/May-11)(Nov/Dec-09)

Solution:

H (k)  1 for 0  k  3 and 12  k  14


=0 for 4  k  11
N 1
 (k)  ( ) k
N
=-14/15  k 0  k  7
and
14 k
 (k)=14 - for 8  k  14
15
H (k)  e  j14 k /15 for k=0,1,2,3
=0 for 4  k  11
=e  j14 (k 15)/15 for 12  k  14
 N 1 
1 2 
h(n)   H (0)  2  Re( H (k) e j 2 nk /15 ) 
n k 1 
 
1 7 
= 1  2  Re(e j14 k /15e j 2 nk /15 
5 k 1 
1 3 2 k (7  n) 
= 1  2  cos 
15  k 1 15 
1 2 (7  n) 4 (7  n) 6 (7  n) 
= 1  2cos  2cos  2cos
15  15 15 15 

`
h(0)  h(14)  0.05; h(1)  h(3)  0.041; h(4)  h(10)  0.1078
h(2)  h(12)  0.0666; h(3)  h(11)  0.0365; h(5)  h(9)  0.034

28
h(6)  h(8)  0.3188; h(7)  0.466 .
Using frequency sampling method, design BPF with the following specifications. [May/June-2016]
Sampling frequency F=8000Hz
Cut off frequencies fc1=1000Hz
Cut off frequencies fc2=3000Hz Determine the filter coefficients for N=7.

Solution:
2 πf c 2 π ( 1000 ) π
ωc =2 πf c T = 1
= =
1 1 F 8000 4
2 πf c 2 π ( 3000 ) 3π
ωc =2 πf c T = 2
= =
2 2 F 8000 4
H ( K )=H d ( e jω )| 2π
ω= k
7 k=0,1,…6
0 for k=0,3
|H ( k )|
= { 1 for k=1,2
N−1 N −1
θ (k )
¿− ( ) N
π for 0≤k ≤
2
6
¿− πk for 0≤k≤3
7
0 for

|H ( k )| e
=
{for
− j 6 πk
7
k =0,3
k =1,2
The filter coefficients are given by
N−1

h(n)
1
[
= H (0 )+ ∑ 2. Re H (k). e
N k=1
2
[
j2 π kn
N
] ]
N−1

1
[
= 2 ∑ Re e
7 k=1
2

N−1
[
j6 πk
7
e
j 2 π kn
7 ] ]
2 2π
=
1
[
2 ∑ cos
7 k =1

7
2
2 πk
( ( 3−n ) ) ]
7
cos ( 3−n ) +cos
7
=
[7
( 3−n ) ]
h(0)=h (6)=−0 .07928 .
h(1)=h(5)=−0. 321
h(2 )=h( 4 )=−0 . 11456
h(3)=0.57
*************************************************************************************
H.W:1. Design a linear phase FIR high pass filter using hamming window, with a cutoff frequency, ω c=0.8π
rad/sample and N=7.
2. Design a FIR low pass filter with cutoff frequency of 1KHz and sampling frequency of 4 kHz with 11 samples
using Fourier series method. Determine the frequency responses and verify the design by sketching the
magnitude responses

29
3. Using a rectangular window technique design a low pass filter with pass band gain of unity,  cutoff frequency of 1000Hz
and working at a sampling frequency of 5kHz.the length of the impulse response should be 7.
**********************************************************************************************

30

You might also like