0% found this document useful (0 votes)
52 views89 pages

Ch10 - FIr - Filter Design - Structure - Lecture

This document discusses digital signal processing and FIR filter design. It begins with an introduction to digital signal processing and covers topics such as FIR and IIR transfer functions, output response of linear time-invariant systems, zero-phase filters, linear phase filters, classification of FIR filters, window functions, and filter design techniques including windowing and least mean squares error. It includes examples of calculating amplitude and phase responses for different FIR transfer functions. It also provides problems and solutions related to FIR filter design specifications and window functions.

Uploaded by

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

Ch10 - FIr - Filter Design - Structure - Lecture

This document discusses digital signal processing and FIR filter design. It begins with an introduction to digital signal processing and covers topics such as FIR and IIR transfer functions, output response of linear time-invariant systems, zero-phase filters, linear phase filters, classification of FIR filters, window functions, and filter design techniques including windowing and least mean squares error. It includes examples of calculating amplitude and phase responses for different FIR transfer functions. It also provides problems and solutions related to FIR filter design specifications and window functions.

Uploaded by

Praneeth Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 89

Digital Signal Processing

FIR Digital Filter


Design
EEE & ECE Department
BITS-Pilani, Hyderabad campus
August 9, 2016

Digital Signal Processing

FIR Transfer Function

August 9, 2016

Digital Signal Processing

IIR Transfer Function

August 9, 2016

Digital Signal Processing

Output response of LTID system

August 9, 2016

Digital Signal Processing

Zero-phase Filters
h(n)

Transform into z-domain

August 9, 2016

Digital Signal Processing

H ( z ) z 1 z 0 z 1
H ( z ) 2 ( z1 z 1 ) / 2
j

H (e ) 2 cos
How do we realize the above non-causal function ?

August 9, 2016

Digital Signal Processing

Phase
(1) Find the phase of

1
H ( z ) 1 z 1
2

and plot

and plot

(2) Find the phase of

1
H ( z ) 1 z 1
2
August 9, 2016

Digital Signal Processing

(3) Find the phase of

h(n)

1
1
2

and plot

August 9, 2016

Digital Signal Processing

Linear Phase filters (FIR filters)

h[n] h[ N n]
Impulse response : symmetric / Antisymmetric
Length (N+1) must be even or odd

August 9, 2016

Digital Signal Processing

Linear Phase filters (FIR filters)


If real impulse response is h[n], then transfer
function H(z) is

H ( z ) h[n] z

n 0

H(z) is required to have a linear Phase, its phase


function () must be in the form
August 9, 2016

Digital Signal Processing

10

Linear Phase filters (FIR filters)

c ,
where c and are constants
Frequency response of H(z) is H(ej)

He

August 9, 2016

j c

Digital Signal Processing

11

Linear Phase filters (FIR filters)


For real impulse response, the magnitude
response H(ej) is an even function of , that is

H e

He
Since,

He
August 9, 2016

Digital Signal Processing

12

The amplitude response is either an even or odd


function of

i.e., H H
Hence, we get

h[n] h[ N n]
August 9, 2016

Digital Signal Processing

13

Classification of FIR Filters

August 9, 2016

Digital Signal Processing

14

LINEAR PHASE

h[n] h[ N n]

N=6

H ( z 1 ) h(0) h(1) z 1 h(2) z 2 h(3) z 3 h(4) z 4


h(5) z 5 h(6) z 6

August 9, 2016

Digital Signal Processing

15

Magnitude Response

At = 0 and = , magnitude 0, hence


designing all types of filters is possible
August 9, 2016

Digital Signal Processing

16

N=7

August 9, 2016

Digital Signal Processing

17

At = 0, magnitude 0 and = , magnitude


= 0, hence designing high-pass filters is not
possible
August 9, 2016

Digital Signal Processing

18

N=6

August 9, 2016

Digital Signal Processing

19

At = 0, magnitude = 0 and = , magnitude


= 0, hence designing only band-pass filters is
possible
August 9, 2016

Digital Signal Processing

20

August 9, 2016

Digital Signal Processing

21

At = 0, magnitude = 0 and = , magnitude


0, hence designing Low-pass filters is not
possible
August 9, 2016

Digital Signal Processing

22

Phase Response

August 9, 2016

Digital Signal Processing

23

Problems
(1) Consider the causal TYPE 1 FIR transfer
function
1

H ( z ) 1 2 z 3z 6 z 3z 2 z z

(i) Find its amplitude response and


(ii) phase response

August 9, 2016

Digital Signal Processing

24

Linear Phase filters (FIR filters)


Answer

H 6 6 cos 4 cos 2 2 cos 3

August 9, 2016

Digital Signal Processing

25

Problems
(2) Consider the causal TYPE 1 FIR transfer
function
1

H ( z ) 1 2 z 3z 6 z 3z 2 z z

(i) Find its amplitude response and


(ii) phase response

August 9, 2016

Digital Signal Processing

26

Answer

H 6 6 cos 4 cos 2 2 cos 3

August 9, 2016

Digital Signal Processing

27

Problems
(3) Consider the causal TYPE 3 FIR transfer
function
1

H ( z ) 1 2 z 3z 3z 2 z z

(i) Find its amplitude response and


(ii) phase response

August 9, 2016

Digital Signal Processing

28

Answer

H 6 sin 4 sin 2 2 sin 3



3
2

August 9, 2016

Digital Signal Processing

29

August 9, 2016

Digital Signal Processing

31

Hermanns Formula

August 9, 2016

Digital Signal Processing

32

August 9, 2016

Digital Signal Processing

33

Bellangers Formula

August 9, 2016

2 log10 (10 p s )
2 s p / 2

Digital Signal Processing

34

Problem
Estimate the order of a linear phase
lowpass FIR filter with the following
specifications: passband edge F p = 1.8
kHz , stopband edge Fs= 2 kHz,
passband ripple p =0.00114469,
stopband ripple s =0.01778279 and
sampling rate FT=12 kHz
Using Kaisers, Hermanns and
Bellangers Formula
August 9, 2016

Digital Signal Processing

35

Problem
N = 98.2730
Bellangers Formula

N = 106.6525 107

August 9, 2016

Digital Signal Processing

36

FIR Filter design based on


windowed Fourier Series

August 9, 2016

Digital Signal Processing

37

August 9, 2016

Digital Signal Processing

38

August 9, 2016

Digital Signal Processing

39

ht[n] = Truncated filter response

August 9, 2016

Digital Signal Processing

40

Least integral-squared error design of


FIR filters

August 9, 2016

Digital Signal Processing

41

August 9, 2016

Digital Signal Processing

42

August 9, 2016

Digital Signal Processing

43

Impulse Response of Ideal Filters

August 9, 2016

Digital Signal Processing

44

Impulse Response of Ideal Filters

August 9, 2016

Digital Signal Processing

45

Impulse Response of Ideal Filters

August 9, 2016

Digital Signal Processing

46

August 9, 2016

Digital Signal Processing

47

August 9, 2016

Digital Signal Processing

48

August 9, 2016

Digital Signal Processing

49

August 9, 2016

Digital Signal Processing

50

August 9, 2016

Digital Signal Processing

51

August 9, 2016

Digital Signal Processing

52

August 9, 2016

Digital Signal Processing

53

August 9, 2016

Digital Signal Processing

54

August 9, 2016

Digital Signal Processing

55

August 9, 2016

Digital Signal Processing

56

M n M
otherwise

1,
Rectangular : w[n]
0

Bartlett : w[n] 1

n
M 1

M n M

1
2n
Hann : w[n] 1 cos

2
2M 1

M n M

2n
Hamming : w[ n] 0.54 0.46 cos

2M 1
2n
4n
Blackman : w[ n] 0.42 0.5 cos
0.08 cos

2M 1
2M 1
August 9, 2016

Digital Signal Processing

M n M

M n M
57

August 9, 2016

Digital Signal Processing

58

August 9, 2016

Digital Signal Processing

59

August 9, 2016

Digital Signal Processing

60

August 9, 2016

Digital Signal Processing

61

August 9, 2016

Digital Signal Processing

62

August 9, 2016

Digital Signal Processing

63

August 9, 2016

Digital Signal Processing

64

August 9, 2016

Digital Signal Processing

65

August 9, 2016

Digital Signal Processing

66

August 9, 2016

Digital Signal Processing

67

August 9, 2016

Digital Signal Processing

68

August 9, 2016

Digital Signal Processing

69

Where c is a constant and to be obtained


from the table after the specific window has
been selected.
August 9, 2016

Digital Signal Processing

70

August 9, 2016

Digital Signal Processing

71

August 9, 2016

Digital Signal Processing

72

August 9, 2016

Digital Signal Processing

73

August 9, 2016

Digital Signal Processing

74

August 9, 2016

Digital Signal Processing

75

August 9, 2016

Digital Signal Processing

76

August 9, 2016

Digital Signal Processing

77

Problems
(1) A low-pass filter is to be designed with the following
desired frequency response
j

e j 2 ,

4 4

0,

H d (e )

Determine the filter coefficients hd[n] if the window function is defined


as

1,
w(n)
0,

0n4
otherwise

Also, determine the frequency response of the designed filter


August 9, 2016

Digital Signal Processing

78

solution

First Step :

August 9, 2016

Find hd[n]

Digital Signal Processing

79

1
hd [n]
2
1
hd [n]
2

/4

j 2

j n

/4

j
jn
H
e
e
d
d

/ 4

/4

hd [n]
sin n 2 ,
( n 2)
4

1
hd [n]
2

/4

j ( n 2 )
e
d

/ 4

n2

1
For n 2, hd [2]
4
August 9, 2016

Digital Signal Processing

80

The other filter coefficients are

1
hd [0]
hd [4]
2

1
hd [1]
hd [3]
2

August 9, 2016

Digital Signal Processing

81

Multiply the generated FIR filter coefficients by


the selected sequence

ht[n] = hd[n]w[n]

ht[n] = hd[n]

since w[n] = 1 (from n = 0 to 4)

August 9, 2016

Digital Signal Processing

82

The frequency response


4

H (e j ) h[n]e jn
n 0

H (e ) e

August 9, 2016

j 2

2
1
cos cos 2

Digital Signal Processing

83

Design FIR filter for a given ideal frequency


response

for

H d [ e j ]

0 for

for N = 11, using Hanning window and


realize the transfer function
1
2n
Hann : w[n]

August 9, 2016

1 cos

2
2M

Digital Signal Processing

M n M

84

1
hd [n]
[
2

/ 4

j
jn
H
e
e
d
d

1
hd [n]
[
2

/ 4

jn

j
jn
H
e
e
d ]
d

/4

jn

d ]

/4

1
n
hd [n]
sin n sin

n
4
August 9, 2016

Digital Signal Processing

85

3
For n 0, hd [0]
4

For n 1, hd [1] hd [1] 0.225


For n 2, hd [2] hd [2] 0.159
For n 3, hd [3] hd [3] 0.075
For n 4, hd [4] hd [4] 0
For n 5, hd [5] hd [5] 0.045
August 9, 2016

Digital Signal Processing

86

1
2n
Hann : w[n] 1 cos

2
2M

M n M

For N = 11
n
Hann : w[n] 0.5 0.5 cos
5

August 9, 2016

Digital Signal Processing

87

n
Hann : w[n] 0.5 0.5 cos
5
w[0] 0.5 0.5 1

w[1] w[1] 0.5 0.5 cos 0.9045


5
2
w[2] w[2] 0.5 0.5 cos
0.655
5
3
w[3] w[3] 0.5 0.5 cos
0.345
5
4
w[4] w[4] 0.5 0.5 cos
0.0945
5

w[5] w[5] 0.5 0.5 cos 0.0945


5
August 9, 2016

Digital Signal Processing

88

ht [n] hd [n]W [n]


ht [0] hd [0]w[0] 0.75 X 1 0.75
ht [1] ht [1] hd [1]w[1] 0.225 X 0.905 0.204

August 9, 2016

Digital Signal Processing

89

H (e j ) h[0] h[n] z n z n
n 0

August 9, 2016

Digital Signal Processing

90

You might also like