Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2....

31
1

Transcript of Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2....

Page 1: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

1

Page 2: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

LOGO

[email protected]

Digital Filters - IIR

Part 2

Page 3: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

3

Design a digital IIR filter by using

bilinear transformation

IIR digital filter is derived from analog filter

Steps:1. Filter Design Specifications

2. Analog Filter Design

3. Digital Filters from Analog Prototypes

Page 4: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

From the given values design

a prototype lowpass filter

4

Design IIR Digital Filter with

the following specifications

H(z) ???

H(p)

Convert the lowpass prototype

filter to the wanted analog filter

H(S)

Design an analog filter with

the following specifications.

H(s) ???

2tan

2T

2 1

1

zs

T z

AnalogDigital

Page 5: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

From the given values design

a prototype lowpass filter

5

Design IIR Digital Filter with

the following specific values.

H(z) ???

H(p)

Convert the lowpass prototype

filter to the wanted analog filter

H(S)

Design an analog filter with

the following specific values.

H(s) ???

2tan

2T

2 1

1

zs

T z

AnalogDigital

Page 6: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

6

digital filter frequency

analog filter frequency

analog LP prototype filter frequency

Page 7: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

7

IIR Filters

-Design a digital lowpass filter to satisfy the following:

(1) monotonic stopband and passband(Butterworth)

(2) -3dB cutoff frequencies of θp= 0.5π rad

(3) magnitude down at least -15dB at 0.75π rad

(4) Max magnitude =0dBTs=1sec

Design this IIR filter by using bilinear transformation

Page 8: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

8

| ( ) |dBH j

0dB

15dB

0.5p

0.75s 3dB

digital filter

Page 9: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

9

0.5 , 0.75

0.52 tan 2

2

0.752 tan 4.82

2

p s

p

s

2 1

1

zs

T z

2tan

2

2tan

2

T

T

: analog frequency

: digital frequency

change

change

Page 10: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

10

| ( ) |dBH j

0dB

15dB

2p

3dB

analog filter

4.82s

Page 11: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

11

3

15

p

s

A

A

to find LP prototype filter:

:

4.82 = , = 1 , = 2.41

2

p p sp s

p p p

normalization

Page 12: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

12

3dB

0

15dB

LP prototype analog filter

1p 2.41s

| ( ) |dBH j

Page 13: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

13

0.1 0.1(3)

0.1

2

0.1(15)

2

For Butterworth filter:

ripple factor:

10 1 10 1 1

10 1log

: N = 2 log( )

10 1log

1 = =2

2log(2.41)

p

s

A

A

s

order

Page 14: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

14

(

1/

( 2

(2)1/2

1

( (2) 2

(2)1/2

2

1,2

: = e ,

1 e

1 e

1 1P = ± j

2 2

2k +N 1)j

N 2N

k

2+ 1)j

2

2 + 1)j

2

Poles P k = 1, 2

P

P

Page 15: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

15

To restore the magnitude scale

2

(0/20)

2

H(p) = 1.414 1

10 1

11

1

1H(p) =

1.414 1

o

o

o

H

P P

H(p = 0)

H

H

P P

Page 16: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

16

2 2

2

1 2

21

21

restor the frequency:

1 4H(S) =H(p) |

2.828 41.414 1

2 2

1 2H(z) =H(s) |

3.414 0.5857

p

S

z

z

to

Sp

S SS S

Z Z

Z

Page 17: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

17

1 2

2

1 2

2

1 2H(z)

3.414 0.5857

1 2H( )=H(z) |

3.414 0.5857

:

|H( ) |

j

j j

jz e

Z Z

Z

e e

e

check

plot

Page 18: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

18

IIR Filters

-The specified magnitude response of a maximally flat

bandpass digital filter has:

- maximum value of 1.0 in its passband

- cutoff frequencies θ1 = 0.4π and θ 2 = 0.5π.

- the magnitude at cutoff frequencies to be no less

than 0.93

- the stopband frequency θs= 0.7π

-the magnitude at stopband frequency to be no

more than 0.004Ts=1sec

Design this IIR filter by using bilinear transformation

Page 19: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

0.4 0.5 0.7

s

| ( ) |H j

1 2

digital filter

s

Page 20: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

20

1 2

1

2

0.4 , 0.5 , 0.7

0.42 tan 1.453

2

0.52 tan 2

2

0.72 tan 3.925

2

s

s

2 1

1

zs

T z

2tan

2

2tan

2

T

T

: analog frequency

: digital frequency

change

change

Page 21: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

211.453 2 3.925

s

analog filter

| ( ) |H j

Page 22: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

22

20log 0.93 0.63

20log 0.004 48

p

s

A dB

A dB

2 1

1 2

bandwidth: 0.547 rad/s

Center freqency: =1.705 rad/so

B

to find LP prototype filter:

:

= , = 1 , =p p s

p s

p p p

normalization

Page 23: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

23

1.705 3.925 1.705

0.547 1.705 3.925

5.82

5.82

=

3.9250.6743 rad/sec

5.82

o okk

o k

o s os

o s

s

s

ss

p

sp

s

jj

B

j jj

B

j j

Page 24: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

24

0

LP prototype analog filter

1p 5.84s

0.63dB

48dB

| ( ) | |dB

H j

Page 25: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

25

0.1 0.1(0.63)

0.1

2

0.1(48)

2

For Butterworth filter:

ripple factor:

10 1 10 1 0.395

10 1log

: N = 2 log( )

10 1log

0.395 = =4

2log(5.82)

p

s

A

A

s

order

Page 26: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

26

(

1/

( 4

(4)1/4

1

( (2) 4

(4)1/4

2

( (3) 4

(4)1/4

3

( (4) 4

(4)1/4

4

1,4

: = e , 3,4

0.395 e

0.395 e

0.395 e

0.395 e

P = 0.4827 ±

2k +N 1)j

N 2N

k

2+ 1)j

2

2 + 1)j

2

2 + 1)j

2

2 + 1)j

2

Poles P k = 1,2,

P

P

P

P

2,3

j1.1654

P = 1.1654 ± j0.4827

Page 27: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

27

the transfer function of the normalized prototype filter

4 3 2

1H(p) =

3.296 5.4325 5.24475 2.5317P P P P

Page 28: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

28

To restore the magnitude scale

4 3 2

(0/20)

(5/20)

4 3 2

H(p) = 3.296 5.4325 5.24475 2.5317

10 1

=10 12.5317

2.5317

2.5317H(p) =

3.296 5.4325 5.24475 2.5317

o

o

o

H

P P P P

H(p = 0)

H

H

P P P P

Page 29: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

29

2 2

2 2 2 2

0

1 1.705

0.547

12

1

restor the frequency:

1 1 1.705

0.547

H(S) =H(p) | ...

H(z) =H(s) | ...

S

S

z

z

to

S Sp

B S S

Page 30: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

30

Page 31: Digital Filters - IIRsite.iugaza.edu.ps/masmar/files/dsp_disc_digital-filters... · 2012. 2. 20. · 18 IIR Filters-The specified magnitude response of a maximally flat bandpass digital

31

DIGITAL SPECTRAL TRANSFORMATION

Digital LP prototype filter