Chapter 10 - Part 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 96

Dr.

Mohammed Abdel-Hafez
Department of Electrical Engineering
Lecture Outline
Proakis: Chapter 10, sections 10.1 and 10.2
(US Edition).
 Part 1 Design of FIR Filters
 Introduction
 Linear Phase
 Ideal Filters
 FIR filters design using Widowing

11/17/2020 ELEC 604, M. hafez 2


Lecture Outline
Proakis: Chapter 10, sections 10.3, 10.4 (US
Edition).
 Part 2 Design of IIR Filters
 Design of IIR from Analog Filters
 Bilinear Transformation
 Examples
 Frequency Transformations

11/17/2020 ELEC 604, M. hafez 3


Introduction

11/17/2020 ELEC 604, M. hafez 4


Performance Constraints

11/17/2020 ELEC 604, M. hafez 5


Performance Constraints

11/17/2020 ELEC 604, M. hafez 6


Filter Type Choice : FIR vs. IIR

11/17/2020 ELEC 604, M. hafez 7


FIR vs. IIR

11/17/2020 ELEC 604, M. hafez 8


Introduction

δ1 : Passband ripple
δ2 : Stopband ripple

11/17/2020 ELEC 604, M. hafez 9


FIR versus IIR Filters

11/17/2020 ELEC 604, M. hafez 10


Linear Phase

11/17/2020 ELEC 604, M. hafez 11


Linear Phase

11/17/2020 ELEC 604, M. hafez 12


Linear Phase

11/17/2020 ELEC 604, M. hafez 13


Linear Phase

11/17/2020 ELEC 604, M. hafez 14


DTFT Theorems and Properties

11/17/2020 ELEC 604, M. hafez 15


Group Delay

11/17/2020 ELEC 604, M. hafez 16


Linear Phase

11/17/2020 ELEC 604, M. hafez 17


Signal Magnitude versus Signal Phase

11/17/2020 ELEC 604, M. hafez 18


Linear Phase FIR Filters

11/17/2020 ELEC 604, M. hafez 19


Linear Phase FIR Filters: Example 1

11/17/2020 ELEC 604, M. hafez 20


Linear Phase FIR Filters: Example 1

11/17/2020 ELEC 604, M. hafez 21


Linear Phase FIR Filters: Example 1

11/17/2020 ELEC 604, M. hafez 22


Linear Phase FIR Filters: Example 1

11/17/2020 ELEC 604, M. hafez 23


Linear Phase FIR Filters: Example 1

11/17/2020 ELEC 604, M. hafez 24


Linear Phase FIR Filters: Example 1

11/17/2020 ELEC 604, M. hafez 25


Linear Phase FIR Filters: Example 2

11/17/2020 ELEC 604, M. hafez 26


Linear Phase FIR Filters: Example 2

11/17/2020 ELEC 604, M. hafez 27


Linear Phase FIR Filters: Example 2

11/17/2020 ELEC 604, M. hafez 28


Linear Phase FIR Filters: Example 2

11/17/2020 ELEC 604, M. hafez 29


Linear Phase FIR Filters: Example 2

11/17/2020 ELEC 604, M. hafez 30


Linear Phase FIR Filters: Example 2

11/17/2020 ELEC 604, M. hafez 31


11/17/2020 ELEC 604, M. hafez 32
Ideal Filters

11/17/2020 ELEC 604, M. hafez 33


Limitations of Practical Filters

11/17/2020 ELEC 604, M. hafez 34


Limitations of Practical Filters

11/17/2020 ELEC 604, M. hafez 35


Practical Frequency Selective Filters

11/17/2020 ELEC 604, M. hafez 36


Practical Frequency Selective Filters

11/17/2020 ELEC 604, M. hafez 37


magnitude response of
Check the fdatool
equivalent analog system
in matlab
Sometime we use this notation
𝛿𝑝 = 𝛿1 : 𝑝𝑎𝑠𝑠𝑏𝑎𝑛𝑑 𝑟𝑖𝑝𝑝𝑙𝑒
𝛿𝑠 = 𝛿2 : stopband ripple

passband
tolerance

3dB cutoff
frequency

1/ 2

stopband
tolerance monotonous descent

passband cc
 stopband
cutoff cutoff
frequency frequency
11/17/2020 38
ELEC 604, M. hafez
relative specifications:maximum magnitude in
passband is normalized to 1, viz. 0dB
𝐴𝑝 = −20 ∗ log10 ( 1 − 𝛿1 ) > 0 maximum attenuation in passband
𝐴𝑠 = −20 ∗ log10 𝛿2 > 0 minimum attenuation in stopband

𝛿𝑝 = 𝛿1 : 𝑝𝑎𝑠𝑠𝑏𝑎𝑛𝑑 𝑟𝑖𝑝𝑝𝑙𝑒
3dB cutoff frequency: 𝛿𝑠 = 𝛿2 : stopband ripple
j c
| H (e ) |= 1 / 2
j c
− 20 log10 | H (e ) |= 3dB
magnitude response of equivalent analog system:
 j 
 H ( e ) | = T |  |
H eff ( j ) =  T


0 |  |
 T
digital specification, finally:  p =  pT , s =  sT
11/17/2020 ELEC 604, M. hafez 39
Filter Specification
Lowpass (a) Highpass (b) Bandpass (c) Bandstop (d)
Specification • Up or down passband cutoff • up and down passband cutoff
frequency. frequency.
• Up or down stopband cutoff • up and down stopband cutoff
frequency. frequency.

𝛿𝑝 = 𝛿1 : 𝑝𝑎𝑠𝑠𝑏𝑎𝑛𝑑 𝑟𝑖𝑝𝑝𝑙𝑒
𝛿𝑠 = 𝛿2 : stopband ripple

11/17/2020 ELEC 604, M. hafez 40


Design steps:
1. decide specifications according to application.
2. decide type according to specification:generally , if the
phase is required , choose FIR.
3. approach specifications using causal and stable discrete-time
system.
4. choose a software or hardware realization structure, take
effects of limited word length into consideration.
5. Find ℎ(𝑛) or 𝐻(𝑧).

11/17/2020 ELEC 604, M. hafez 41


Desired Frequency Response

11/17/2020 ELEC 604, M. hafez 42


Design of Linear-Phase FIR Filters using
Windows

11/17/2020 ELEC 604, M. hafez 43


Example

11/17/2020 ELEC 604, M. hafez 44


Windowing Distortion

11/17/2020 ELEC 604, M. hafez 45


Windowing Distortion

11/17/2020 ELEC 604, M. hafez 46


Characteristics of Discrete Windows

11/17/2020 ELEC 604, M. hafez 47


Effects of Windowing in Frequency Domain

11/17/2020 ELEC 604, M. hafez 48


Design of Linear-Phase FIR Filters
using Windows

𝑀−1
Delay 𝜏 = We choose 𝑀 odd integer
2

11/17/2020 ELEC 604, M. hafez 49


Design of Linear-Phase FIR Filters using
Windows

11/17/2020 ELEC 604, M. hafez 50


Design of Linear-Phase FIR Filters using
Windows

11/17/2020 ELEC 604, M. hafez 51


Windows

11/17/2020 ELEC 604, M. hafez 52


Example
𝜋
• Lowpass filter of length 51 and 𝜔𝑐 =
2
Lowpass Filter Designed Using Hann window Lowpass Filter Designed Using Hamming window
0 0

Gain, dB
Gain, dB

-50 -50

-100 -100

0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1


/ /

Lowpass Filter Designed Using Blackman window


0
Check
>> fdatool
Gain, dB

-50
>> filterbuilder
-100 in matlab
0 0.2 0.4 0.6 0.8 1
/

11/17/2020 ELEC 604, M. hafez 53


Window Design Techniques
Basic window design idea
⚫ Choose a proper ideal frequency-selective filter (which
always has a noncausal, infinite-length impulse response);
⚫ Then truncate (window) its impulse response to obtain a
linear-phase and causal FIR filter.
The emphasis is on
⚫ Selecting an appropriate ideal filter;
⚫ Selecting an appropriate windowing function.

11/17/2020 ELEC 604, M. hafez 54


Window Design Techniques
Denote an ideal frequency-selective filter by H d (e j )

j  1  e − j
, ||  c
H d (e ) = 
0, c  ||  

1 c c sin[c (n −  )]
 e d =
j − j j n
hd (n) = F  H d (e )  =
−1
e
2 − c  c ( n −  )

w(n) = rect (n, M )

11/17/2020 ELEC 604, M. hafez 55


Window Design Techniques
hd (n), 0  n  M − 1
h(n) = hd (n) w(n) = 
 0, otherwise
M −1
=
2

 c sin c (n −  ) 
 , 0  n  M −1
h( n) =   c (n −  )

 0, otherwise

11/17/2020 ELEC 604, M. hafez 56


Window Design Techniques
➢ The effect of Window function
1 

j
H (e ) = H d (e j )W (e j ( − ) )d
2 −

M −1
W (e j ) =  w(n)e − jn
n =0

𝑀−1 𝜔𝑀
𝑀−1 sin 𝑀−1
𝑊𝑅 (𝑒 𝑗𝜔
)= ෍𝑒 −𝑗𝜔𝑛
= 𝑒
−𝑗𝜔 2 2 = 𝑊 (𝜔)𝑒 −𝑗𝜔 2
𝜔 𝑅
𝑛=0 sin
2

𝜔𝑀
sin
𝑊𝑅 (𝜔) = 2
𝜔
sin
2
11/17/2020 ELEC 604, M. hafez 57
Window Design Techniques
➢ The conclusion
⚫ Since the window w(n) has a finite length equal to M, its
response has a peaky main lobe whose width is
proportional to 1/M, and has side lobes of smaller heights.
⚫ The periodic convolution produces a smeared version of
the ideal response H d (e j )
j
⚫ The main lobe produces a transition band in H (e )
whose width is responsible for the transition width. This
width is then proportional to 1/M. The wider the main lobe,
the wider will be the transition width.
⚫ The side lobes produces ripples that have similar shapes
in both the passband and stopband.

11/17/2020 ELEC 604, M. hafez 58


Window Design Techniques
◼ Windowing functions
➢ Rectangular window
This is the simplest window function but provides the
worst performance from the viewpoint of stopband
attenuation. The width of main lobe is 4𝜋/𝑀
𝑀−1
−𝑗𝜔
𝑤(𝑛) = 𝑟𝑒𝑐𝑡(𝑛, 𝑀), 𝑊𝑅 (𝑒 𝑗𝜔 ) = 𝑊𝑅 (𝜔)𝑒 2

𝑀𝜔
sin
𝑊𝑅 (𝜔) = 2
𝜔
sin
2
4𝜋
The width of main lobe is:
𝑀
11/17/2020 ELEC 604, M. hafez 59
Window Design Techniques
➢ Gibbs phenomenon
The truncation of the infinite length hd (n) will
introduce ripples in frequency response H ( ) .
The oscillatory behavior near the band edge of the
filter is called the Gibbs phenomenon.

When the 𝑀 is increased:


• The transition band of the filter will decrease.
• But the relative amplitude of the peaky values will remain
constant.

11/17/2020 ELEC 604, M. hafez 60


Window Design Techniques
➢ Bartlett window
Since the Gibbs phenomenon results from the fact that the
rectangular window has a sudden transition from 0 to 1 (or 1 to
0), Bartlett suggested a more gradual transition in the form of a
triangular window. The width of main lobe is 8 / M

 2n M −1
 , 0n
w(n) =  M −1 2
2n M −1
2 − ,  n  M −1
 M −1 2
2
𝑀𝜔
2 sin 𝑀−1
𝑗𝜔
𝑊(𝑒 ) ≈ 4 𝑒
−𝑗 2 𝜔, (𝑀 >> 1, 𝑀 − 1 ≈ 𝑀)
𝑀 sin 𝜔
2

11/17/2020 ELEC 604, M. hafez 61


Window Design Techniques
➢ Hanning window
This is a raised cosine window function given by:

1  2π n 
w(n) = 1 − cos 
2  M − 1 
2𝜋 2𝜋
𝑊 𝜔 ≈ 0.5𝑊𝑅 𝜔 + 0.25 𝑊𝑅 𝜔− + 𝑊𝑅 𝜔 + (𝑀 >> 1)
𝑀 𝑀

The width of main lobe is:


8
M

11/17/2020 ELEC 604, M. hafez 62


Window Design Techniques
➢ Hamming window
This is a modified version of the raised cosine window.

  2π n 
w(n) = 0.54 − 0.46 cos 
  M − 1 
2𝜋 2𝜋
𝑊 𝜔 ≈ 0.54𝑊𝑅 𝜔 + 0.23 𝑊𝑅 𝜔− + 𝑊𝑅 𝜔 + (𝑀 >> 1)
𝑀 𝑀

8
The width of main lobe is:
M

11/17/2020 ELEC 604, M. hafez 63


Window Design Techniques
➢ Blackman window
This is a 2-order raised cosine window.

  2π n   4π n 
w(n) = 0.42 − 0.5 cos  + 0.08 cos 
  M −1   M − 1 

2𝜋 2𝜋
𝑊(𝜔) ≈ 0.42𝑊𝑅 (𝜔) + 0.25 𝑊𝑅 𝜔 − + 𝑊𝑅 𝜔 +
𝑀 𝑀
4𝜋 4𝜋
+0.04 𝑊𝑅 𝜔 − + 𝑊𝑅 𝜔 + (𝑀 >> 1)
𝑀 𝑀

12𝜋
The width of main lobe is:
𝑀
11/17/2020 ELEC 604, M. hafez 64
Window Design Techniques
➢ Kaiser window
This is one of the most useful and optimum windows.
  2n  
2

I 0  1 − 1 − 
  M −1  
w(n) =  
I 0 ( )

Where I 0 ()is the modified zero-order Bessel function, and  is a


parameter that can be chosen to yield various transition widths
and stopband attenuation. This window can provide different
transition widths for the same M.

 = 0 → rectangular window
 = 5.44 → Hamming window
 = 8.5 → Blackman window
11/17/2020 ELEC 604, M. hafez 65
Window Design Techniques
The design equations for Kaiser window
Given 𝜔𝑝 , 𝜔𝑠 , 𝑅𝑝 , 𝐴𝑠
𝑅𝑝 : maximum attenuation in passband (Ripple)
𝐴𝑠 : minimum attenuation in stopband
The norm transition width:  =  s −  p
As − 7.95
The filter order M: M 
2.286

 0.1102( As − 8.7) As  50dB



 = 0.5842( As − 21) 0.4 + 0.07886( As − 21) 21dB  As  50dB
 0 As  21dB

11/17/2020 ELEC 604, M. hafez 66
Window Design Techniques
➢ Summary of window function characteristics

Window function Filter


Window 𝑨𝒔
name Peak value The width of Transition
of side lobe main lobe width Min. stopband
attenuation
4 1.8
Rectangular -13 dB M M -21 dB
8 4.2
Bartlett -25 dB M M -25 dB
8 6.2
Hanning -31 dB M M -44 dB
8 6.6
Hamming -41 dB M M -53 dB
12 11
Blackman -57 dB M M -74 dB
11/17/2020 ELEC 604, M. hafez 67
Window Design Techniques
Design procedure
⚫ Given the ideal frequency response H d (e j )
⚫ Compute the impulse response hd (n) of ideal filter
⚫ Determine the window shape and M from the
minimum stopband attenuation As and the transition
width  = s −  p
⚫ Compute the impulse response of the designed filter
h(n) = hd (n) w(n)
⚫ Compute the frequency response H (e j ) of the
designed filter and verify the performance

11/17/2020 ELEC 604, M. hafez 68


Examples of FIR linear-phase
Lowpass filter design.

Example
Design a digital FIR lowpass filter:

 sample = 2 1.5 10 4 (rad / sec)


 p = 2 1.5 103 (rad / sec)
 s = 2  3 103 (rad / sec)
As = 50 dB

11/17/2020 ELEC 604, M. hafez 69


Solution
➢ Compute the digital frequencies
2 p 2 s
p = = 0.2 , s = = 0.4
 sample  sample
 p + s
c = = 0.3 ,  = s −  p = 0.2
2
➢ Derive the frequency response of ideal FIR lowpass filter

− j
j  e , |  | c  e − j
, |  | 0.3
H d (e ) =  =
0, c |  |  0, 0.3 |  | 

11/17/2020 ELEC 604, M. hafez 70


Solution
➢ Compute the impulse response of the ideal filter
1 c c sin[c (n −  )]
 e d =
− j j n
hd (n) = e
2 − c  c (n −  )
sin[0.3 (n −  )]
=
 (n −  )

➢ Determine the window shape and M


As = 50 dB Hamming Window satisfies it
6.6 M −1
 = = 0.2 ,  M = 33, = = 16
M 2

11/17/2020 ELEC 604, M. hafez 71


Solution
➢ Compute the impulse response of the designed
filter
  2π n 
w(n) = 0.54 − 0.46 cos  rect (n, M )
  M − 1 
  π n 
= 0.54 − 0.46 cos  rect (n,33)
  16 

sin[0.3 (n − 16)]
hd (n) =
 (n − 16)
h(n) = hd (n) w(n)
sin[0.3 (n − 16)]   π n 
=  0.54 − 0.46 cos    rect (n,33)
 (n − 16)   16  

11/17/2020 ELEC 604, M. hafez 72


Solution
➢ Compute the frequency response of the designed filter
j
H (e ) = DTFT[h(n)]

➢ Verify the performance of the designed filter using


fdatool in matlab 0.3

0.25

0.2

0.15

0.1

clear
0.05

clc
0

M=33;
-0.05

n=0:1:M;
-0.1
0 5 10 15 20 25 30 35

tau=(M)/2;
h=0.3*sinc(0.3*(n-tau)).*(0.54-0.46*cos(pi*n/tau));
stem(n,h)

11/17/2020 ELEC 604, M. hafez 73


Solution

11/17/2020 ELEC 604, M. hafez 74


Digital FIR highpass filter
An ideal FIR highpass filter can be obtained from two ideal
FIR lowpass filters, provided they have the same phase
response.

0  

0 c  

0 c  

11/17/2020 ELEC 604, M. hafez 75


Digital FIR highpass filter
The frequency response of an ideal FIR highpass filters
− j
j e , c  |  | 
H d (e ) = 
 0, |  | c
The impulse response of an ideal FIR highpass filters

1 

j j n
hd (n) = H ( e )e d
2 −
1  −c j ( n − )  j ( n − )

2  − c
= e d  + e d

sin[ (n −  )] sin[c (n −  )]
= −
 (n −  )  (n −  )
11/17/2020 ELEC 604, M. hafez 76
Digital FIR highpass filter
Example
s = 0.4 , As = 60 dB
Design a digital FIR highpass filter :
 p = 0.6 , R p = 0.5 dB

Solution:
➢ Compute the digital frequencies

s = 0.4 ,  p = 0.6
 p + s
c = = 0.5 ,  =  p − s = 0.2
2

11/17/2020 ELEC 604, M. hafez 77


Solution
➢ Determine the window shape and M
As = 60 dB Blackman
11 55 − 1
  = = 0.2 ,  M = 55, = = 27
M 2
Note: the M must be odd for FIR highpass filters

➢ Derive the impulse response of ideal FIR highpass filter

sin[ (n −  )] sin[c (n −  )]
hd (n) = −
 (n −  )  (n −  )
sin[ (n − 27)] sin[0.5 (n − 27)]
= −
 (n − 27)  (n − 27)
11/17/2020 ELEC 604, M. hafez 78
Solution
➢ Compute the impulse response of the designed filter

  2π n   4π n 
w(n) = 0.42 − 0.5 cos  + 0.08 cos  rect (n, M )
  M −1   M − 1 
  2π n   4π n 
= 0.42 − 0.5 cos  + 0.08 cos  rect (n,55)
  54   54 

h(n) = hd (n) w(n)


11/17/2020 ELEC 604, M. hafez 79
Solution
➢ Compute the frequency response of the designed filter
j
H (e ) = DTFT[h(n)]
➢ Verify the performance of the designed filter
R p = 0.0039 dB
As = 71 dB It is satisfied by this design

11/17/2020 ELEC 604, M. hafez 80


Digital FIR bandpass filter
An ideal FIR bandpass filter can be obtained from two
ideal FIR lowpass filters, provided they have the same
phase response.

0 c2  

0  c1 c2  

0 c  

11/17/2020 ELEC 604, M. hafez 81


Digital FIR bandpass filter
The frequency response of an ideal FIR bandpass filters

− j
j e , c1  |  | c 2
H d (e ) = 
 0, otherwise

The impulse response of an ideal FIR highpass filters


1 

j j n
hd (n) = H ( e )e d
2 −
1  −c1 j ( n − ) c 2 j ( n − )

2  −c 2 c1
= e d  + e d

sin[c 2 (n −  )] sin[c1 (n −  )]
= −
 (n −  )  (n −  )
11/17/2020 ELEC 604, M. hafez 82
Example
Design a digital FIR bandpass filter:

s1 = 0.2 , As1 = 60 dB  p 2 = 0.65 , R p 2 = 1 dB


 p1 = 0.35 , R p1 = 1 dB s 2 = 0.8 , As 2 = 60 dB

Solution:
➢ Compute the digital frequencies

 p1 + s1  p 2 + s 2
c1 = = 0.275 , c 2 = = 0.725
2 2
 = min[( p1 − s1 ), (s 2 −  p 2 )] = 0.15

11/17/2020 ELEC 604, M. hafez 83


Solution
➢ Determine the window shape and M

As = 60 dB Blackman

11𝜋 74 − 1
∵ Δ𝜔 = = 0.15𝜋, ∴ 𝑀 = 73, 𝜏= = 36
𝑀 2
➢ Derive the impulse response of ideal FIR bandpass filter

sin[c 2 (n −  )] sin[c1 (n −  )]
hd (n) = −
 (n −  )  (n −  )
sin[0.725 (n − 36.5)] sin[0.275 (n − 36.5)]
= −
 (n − 36.5)  (n − 36.5)

11/17/2020 ELEC 604, M. hafez 84


Solution
➢ Compute the impulse response of the designed filter

  2π n   4π n 
w(n) = 0.42 − 0.5 cos  + 0.08 cos  rect (n, M )
  M −1   M − 1 
  2π n   4π n 
= 0.42 − 0.5 cos  + 0.08 cos  rect (n,74)
  73   73 

h(n) = hd (n) w(n)


11/17/2020 ELEC 604, M. hafez 85
Solution
➢ Compute the frequency response of the designed filter
j
H (e ) = DTFT[h(n)]
➢ Verify the performance of the designed filter
R p1 = 0.003 dB, R p 2 = 0.003 dB
As1 = 73 dB, As 2 = 73 dB
It is satisfied by this design

11/17/2020 ELEC 604, M. hafez 86


Digital FIR bandstop filter
An ideal FIR bandstop filter can be obtained from three ideal
FIR lowpass filters, provided they have the same phase
response.

0  

0  c1 c2  
0 c2  

0  c1  
11/17/2020 ELEC 604, M. hafez 87
Digital FIR bandstop filter
The frequency response of an ideal FIR bandpass filters
− j
j  e , 0  |  | c1 , c 2  |  | 
H d (e ) = 
0, otherwise
The impulse response of an ideal FIR highpass filters

1 

j j n
hd (n) = H ( e )e d
2 −

1  −c 2 j ( n − ) c1 j ( n − )  j ( n − )

2  − −c1 c 2
= e d  + e d + e d

sin[ (n −  )] sin[c 2 (n −  )] sin[c1 (n −  )]
= − +
 (n −  )  (n −  )  (n −  )
11/17/2020 ELEC 604, M. hafez 88
Digital FIR bandstop filter
Example
Design a digital FIR bandstop filter:
 p1 = 0.3 , R p1 = 0.5 dB s 2 = 0.6 , As 2 = 40 dB
s1 = 0.4 , As1 = 40 dB  p 2 = 0.7 , R p 2 = 0.5 dB

Solution:
➢ Compute the digital frequencies

 p1 + s1  p 2 + s 2
c1 = = 0.35 , c 2 = = 0.65
2 2
 = min[(s1 −  p1 ), ( p 2 − s 2 )] = 0.1

11/17/2020 ELEC 604, M. hafez 89


Solution
➢ Determine the window shape and M

As = 40 dB Hanning

6.2 63 − 1
  = = 0.1 ,  M ' = 62, M = 63  = = 31
M' 2
Note: the M must be odd for FIR bandstop filters

➢ Derive the impulse response of ideal FIR bandstop filter

sin[ (n −  )] sin[c 2 (n −  )] sin[c1 (n −  )]


hd (n) = − +
 (n −  )  (n −  )  (n −  )
sin[ (n −  )] sin[0.65 (n −  )] sin[0.35 (n −  )]
= − +
 (n −  )  (n −  )  (n −  )
11/17/2020 ELEC 604, M. hafez 90
Solution
➢ Compute the impulse response of the designed filter

1  2π n 
w(n) = 1 − cos  rect (n, M )
2  N − 1 
1  2π n 
= 1 − cos  rect (n,63)
2  62 

h(n) = hd (n) w(n)


11/17/2020 ELEC 604, M. hafez 91
Solution
➢ Compute the frequency response of the designed filter
H (e j ) = DTFT[h(n)]
➢ Verify the performance of the designed filter
R p1 = 0.0884 dB, R p 2 = 0.0884 dB
As1 = 44 dB, As 2 = 44 dB
It is satisfied by this design

11/17/2020 ELEC 604, M. hafez 92


Can we get better filter performance?

11/17/2020 ELEC 604, M. hafez 93


FIR / IIR Pros and Cons

11/17/2020 ELEC 604, M. hafez 94


11/17/2020 ELEC 604, M. hafez 95
Practice Problems
Proakis (Chapter 10) US Edition.

10.1 to 10.10

11/17/2020 ELEC 604, M. hafez 96

You might also like