Docsity

Filter Design-Digital Signal Processing-Lecture Slides, Slides of Digital Signal Processing

Toggle sidebar
bg1
1
Filter Design Techniques
(Chapter 7)
Instructor: Dr Muhammad Fasih Uddin Butt
EEE324 Digital Signal
Processing
IIR Filter design techniques
Thedesignofafilterstartswithspecifyingthedesiredparam eters:
The passband isthefrequencyrangewherewewantto
approximateagainofone.
Thestopband isthefrequencyrangewherewewantto
approximateagainofzero.
Theorderofafilteristhenumberofpolesitusesinthez‐
domain,andequivalentlythenumberofdelayelements
necessarytoimplementit.
Bothpassband andstopband willinpracticenothavegainsof
exactlyoneandzero,respectively,butmayshowseveral
deviationsfromtheseidealvalues,andtheseripplesmayhave a
specifiedmaximumquotientbetweenthehighestandlowest
gain.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13

Partial preview of the text

Download Filter Design-Digital Signal Processing-Lecture Slides and more Slides Digital Signal Processing in PDF only on Docsity!

Filter Design Techniques

(Chapter 7)

Instructor: Dr Muhammad Fasih Uddin Butt

EEE324 Digital Signal

Processing

IIR Filter design techniques

The design of a filter starts with specifying the desired parameters:

„ The passband is the frequency range where we want to

approximate a gain of one.

„ The stop band is the frequency range where we want to

approximate a gain of zero.

„ The order of a filter is the number of poles it uses in the z‐

domain, and equivalently the number of delay elements

necessary to implement it.

„ Both passband and stopband will in practice not have gains of

exactly one and zero, respectively, but may show several

deviations from these ideal values, and these ripples may have a

specified maximum quotient between the highest and lowest

gain.

„ There will in practice not be an abrupt change of gain between

passband and stopband, but a transition band where the

frequency response will gradually change from its passband to

its stopband value.

„ The designer can then trade off conflicting goals such as a small

transition band, a low order, a low ripple amplitude, or even an

absence of ripples.

Butterworth filters

Have no ripples, gain falls monotonically

across the pass and transition band.

Chebyshev type I filters

Distribute the gain error uniformly

throughout the passband (equiripples)

and drop off monotonically outside.

Chebyshev type II filters

Distribute the gain error uniformly

throughout the stopband (equiripples)

and drop off monotonically in the

passband.

Elliptic filters

Distribute the gain error as equiripples both in

the passband and stopband. This type of filter

is optimal in terms of the combination of the

passband‐gain tolerance, stopband‐gain

tolerance, and transition‐band width that can

be achieved at a given filter order.

Analog Filter Design

Filter Design Techniques

„ We have already studied the use of discrete‐time systems to

implement a continuous‐time system

If our specifications are given in continuous time we can use:

It can be noted that the specifications for filters are typically given in

frequency domain

Chapter 7: Filter Design Techniques 7

x c(t) C/D H(e D/C y r (t) jω )

x [ ]n y [n ] (^ )^ (^ / )

j H e Hc j T

ω ω

ω π

Filter Specifications

„ Specifications

Passband

Stopband

„ Parameters

„ Specs in dB

Ideal passband gain

=20log(1) = 0 dB

Max passband gain =

20log(1.01) = 0.086dB

Max stopband gain =

20log(0.001) = ‐60 dB

Chapter 7: Filter Design Techniques 8

0.99 ≤ H eff ( j Ω ) = 1.01 0 ≤ Ω ≤ 2 π ( 2000 )

H eff ( j Ω ) ≤ 0.001 2 π ( 3000 )≤ Ω

1

2

2 2000

2 3000

p

s

δ

δ

π

π

=

=

Ω =

Ω =

Chapter 7: Filter Design Techniques 9

7.1 Discrete-Time IIR Filter Design from

Continuous-Time Filters

7.1.1 Filter Design by Impulse Invariance

„ Remember impulse invariance

Mapping a continuous‐time impulse response to discrete‐time

Mapping a continuous‐time frequency response to discrete‐time

„ If the continuous‐time filter is bandlimited to

„ In this design procedure:

Start with discrete‐time spec in terms of ω (T (^) d has no role in the process)

Go to continuous‐time Ω= ω /T and design continuous‐time filter

Use impulse invariance to map it back to discrete‐time ω= ΩT

„ Works best for practical filters due to possible aliasing

Chapter 7: Filter Design Techniques 10

[ ] ( ) ( )

j^2 d c d c k (^) d d

h n T h nT H e H j j k T T

ω ω^ π

∞

=−∞

∑

( )

( )

c d

j c d

H j T

H e H j T

ω

π

ω ω π

Example 7.2 Cont’d

„ Satisfy both constrains

„ Solve these equations to get N = 5.8858 and Ω

c

„ N must be an integer so we round it up to N=6, hence

c

= 0.7032 in order to meet the passband specifications.

„ Poles of transfer function

The six poles on the Left hand side s‐plane are:

Pole pair 1: ‐0.182±j(0.679)

Pole pair 2: ‐0.497±j(0.497)

Pole pair 3: ‐0.679±j(0.182)

13

(^2 2 ) 0.2 1 0.3 1 1 and 1 0.89125 0.

N N

c c

⎛ (^) π⎞ (^) ⎛ ⎞ ⎛ (^) π⎞ ⎛ ⎞

  • (^) ⎜ ⎟ = + (^) ⎜ ⎟ = ⎜ ⎟ ⎜ ⎟ ⎝ Ω^ ⎠ ⎝^ ⎠^ ⎝ Ω ⎠ ⎝^ ⎠

( 1 ) ( ) fork 0,1,...,2N- 1

2 ( /^2 )(^21 ) (/^2 /^2 / )

1

  • − j − N + k N c

j N kN c c

N k

s j e e

π π π π

fork 0,1,...,

( / 2 / 12 / 6 ) ( 5 / 12 / 6 )

π −π +π j π + k π c

j k k c

s e e

Example 7.2 Cont’d

„ The transfer function

where (Ωc ) N = (0.7032) 6 = 0.

„ After applying partial fraction expansion, perform the transformation to

z‐domain using Equation (7.12) and combining complex conjugate

terms (an important step to convert a continuous‐time filter to discrete‐

time filter, therefore, practice it from exam point of view)

1 1

1 2 1 2

1

1 2

0.2871 0.4466 2.1428 1.

1 1.2971 0.6949 1 1.0691 0.

1.8557 0.

1 0.9972 0.

z z H z z z z z

z

z z

− −

− − − −

−

− −

− − + = + − + − +

−

− +

( )( )( )

2 2 2

0.364 0.4945 0.9945 0.4945 1.3585 0.

H s s s s s s s

=

1

k

N

k

N c c

s s

H s

∏

Example Cont’d

Chapter 7: Filter Design Techniques 15

Filter Design by Bilinear Transformation

„ Avoids the aliasing problem of impulse invariance

„ Maps the entire s‐plane onto the unit‐circle in the z‐plane

Nonlinear transformation

Frequency response subject to warping

„ Bilinear transformation

„ Transformed system function

(7.21)

„ Again T

d

cancels out so we can ignore it

„ We can solve the transformation for z as

„ Maps the left‐half s‐plane into the inside of the unit‐circle in z

Stable in one domain would stay in the other

Chapter 7: Filter Design Techniques 16

1

1

d

z s T z

−

−

( )

1

1

c d

z H z H T z

−

−

⎣ ⎝^ ⎠⎦

( )

( )

d (^) d d

d d d

T s (^) T j T z T s T j T

σ

σ

s = σ+ j Ω

Example 7.3 (Also consult the book)

„ Bilinear transform applied to Butterworth

„ Apply bilinear transformation to specifications

„ We can assume T

d

=1 and apply the specifications to

„ To get

Chapter 7: Filter Design Techniques 19

( )

( )

0.89125 1 0 0.

0.17783 0.

j

j

H e

H e

ω

ω

ω π

π ω π

≤ ≤ ≤ ≤

≤ ≤ ≤

2 0. 0.89125 1 0 tan 2

2 0. 0.17783 tan 2

d

d

H j T

H j T

π

π

⎛ ⎞ ≤ Ω ≤ ≤ Ω ≤ (^) ⎜ ⎟ ⎝ ⎠

⎛ ⎞ Ω ≤ (^) ⎜ ⎟≤ Ω < ∞ ⎝ ⎠

2 2

1

1 /

c N c

H j Ω =

  • Ω Ω

(^2 2 ) 2 tan 0.1 1 2 tan 0.15 1 1 and 1 0.89125 0.

N N

c c

⎛ (^) π⎞ (^) ⎛ ⎞ ⎛ (^) π⎞ ⎛ ⎞

  • (^) ⎜ ⎟ = + (^) ⎜ ⎟ = ⎜ ⎟ ⎜ ⎟ Ω (^) ⎝ ⎠ Ω ⎝ ⎠ ⎝ ⎠ ⎝ ⎠

„ Solve N and Ωc

„ Substituting N=6 in Eq 7.34b, we obtain Ωc =0.766 in order to exactly meet the stopband specifications

„ The resulting transfer function has the following poles

„ Resulting in

where (Ω c )N^ = (0.766) 6 = 0.

2 2 1 1 log 1 1 0.17783 0. 5.305 6 2 log tan 0.15 tan 0.

N π π

⎡ (^) ⎛ ⎞ ⎛ ⎞⎤ ⎛ ⎞ ⎛ ⎞ ⎢ ⎜ −^ ⎟ ⎜ −⎟⎥ ⎜ ⎜^ ⎟^ ⎟ ⎜ ⎜^ ⎟ ⎟ ⎢ ⎝^ ⎠^ ⎝^ ⎠ ⎥ ⎣⎝ ⎠^ ⎝^ ⎠⎦ = = ≅ ⎡ ⎤ ⎣ ⎦

  1. 766 c Ω =

( ) ( )( )( )

2 2 2

c H s s s s s s s

( 1 ) ( ) fork 0,1,...,2N- 1

2 ( /^2 )(^21 ) (/^2 /^2 / )

1

  • − j − N + k N c

j N kN c c

N k

s j e e

π π π π

fork 0,1,...,

( / 2 / 12 / 6 ) ( 5 / 12 / 6 )

π −π +π j π + k π c

j k k c

s e e

„ Applying the bilinear transform Eq. (7.21)

with T d =1, yields (an important step to convert a continuous‐time

filter to discrete‐time, therefore, practice it from exam point of view)

( )

( )( )

( )

6 1

1 2 1 2

1 2

0.0007378 1

1 1.2686 0.7051 1 1.0106 0.

1

1 0.9044 0.

z H z z z z z

z z

−

− − − −

− −

= − + − +

× − +

1

1

d

z

s

T z

−

−

Example Cont’d

Chapter 7: Filter Design Techniques 22

Windowing in Frequency Domain

„ Windowed frequency response

„ The windowed version is smeared version of desired

response

„ If w[n]=1 for all n, then W(e

jω

) is pulse train with 2π period

Chapter 7: Filter Design Techniques 25

( ) ( )

( ) ( )

j j j H e H (^) d e W e d

π ω ω ω θ

π

−

−

∫

Properties of Windows

„ Prefer windows that concentrate around DC in frequency

Less smearing, closer approximation

„ Prefer window that has minimal span in time

Less coefficient in designed filter, computationally efficient

„ So we want concentration in time and in frequency

Contradictory requirements

„ Example: Rectangular window

Chapter 7: Filter Design Techniques 26

( )

( )

( )

[ ]

1

0

/ 2

sin 1 / 2

sin / 2

M^ j^ M j j n j n

j M

e W e e e

M

e

ω ω ω ω

ω

− + − − =

−

∑

Rectangular Window

Chapter 7: Filter Design Techniques 27

„ Narrowest main lobe

4 π/(M+1)

Sharpest transitions at

discontinuities in frequency

„ Large side lobes

‐13 dB

Large oscillation around

discontinuities

„ Simplest window possible

[ ]

n M w n else

⎧^ ≤^ ≤

Bartlett (Triangular) Window

„ Medium main lobe

8 π/M

„ Side lobes

‐25 dB

„ Hamming window

performs better

„ Simple equation

Chapter 7: Filter Design Techniques 28

[ ]

n M n M

w n n M M n M

else

Blackman Window

„ Large main lobe

12 π/M

„ Very good side lobes

‐57 dB

„ Complex equation

Chapter 7: Filter Design Techniques 31

[ ]

0.42 0.5cos

0.08cos

n

M

n M

w n (^) n

M

else

⎪ ⎜^ ⎟

⎪ ⎜^ ⎟

Incorporation of Generalized Linear Phase

„ Windows are designed with linear phase in mind

Symmetric around M/

„ So their Fourier transform are of the form

„ Will keep symmetry properties of the desired impulse

response

„ Assume symmetric desired response

„ With symmetric window

Periodic convolution of real functions

Chapter 7: Filter Design Techniques 33

[ ]

[ ] 0

w M n n M w n else

( ) ( ) ( )

/ 2 where is a real and even

j j j M j e e W e W e e W e

ω ω −ω ω

( ) ( )

j j j M / 2 H (^) d e H (^) e e e

ω ω −ω

( ) ( )

( ) ( )

j j^ j e e e A e H e W e d

π ω θ ω^ θ

π

−

−

∫

Linear Phase Lowpass filter

„ Desired frequency response

„ Corresponding impulse

response

„ Desired response is even

symmetric, use symmetric

window

Chapter 7: Filter Design Techniques 34

( )

/ 2

j M j c lp c

e H e

ω ω

− ⎧⎪ (^) < = ⎨

⎪ <^ ≤ ⎩

[ ]

( )

( )

sin / 2

c lp

n M h n n M

[ ]

( )

( )

[ ]

sin / 2

c n M h n w n n M

Example: Kaiser Window Design of a Lowpass Filter

„ Specifications

„ Window design methods assume

„ Determine cut‐off frequency

Due to the symmetry we can choose it to be

„ Compute

„ And Kaiser window parameters

„ Then the impulse response is given as

Chapter 7: Filter Design Techniques 37

1 2

p s

δ = min( δ δ 1 , 2 ) =0.

ω c = 0.5π

s p

Δ ω = ω − ω = π A = −20 log 10 δ= 60

β = 5.653 M = 37

[ ]

( )

( ) ( )

2

0

0

sin 0.5 18.5 18. 0 18.5 5.

n I

n h n n M n I

else

= ⎨ ⎣^ ⎦^ ⎣^ ⎦