You are on page 1of 24

DIGITAL SIGNAL PROCESSING

Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing


Lecture 11: Summary
• Discrete Time Filter Design From Continuous
Time Filters
• Filter Design by Impulse Invariance

Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing


Lecture 12: Outline
• Discrete Time Filter Design From Continuous
Time Filters
• Filter Design by Impulse Invariance
• Filter Design by Bilinear Transformation
• Design of FIR Filters by Windowing
• Properties of Commonly used Windows
• Kaiser Window Filter Design Method

Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing


Filter Design by Impulse
Invariance
Example: Impulse invariance applied to Butterworth
0.89125  H e j  1  0    0.2
He   0.17783
j
0.3    

• Since sampling rate Td cancels out we can assume


Td=1
• Map spec to continuous time

0.89125  Hj  1 0    0.2


Hj  0.17783 0.3    

Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing


Filter Design by Impulse
Invariance
Example: Impulse invariance applied to Butterworth
• Butterworth filter is monotonic, spec will be satisfied if
Hc j0.2  0.89125 and Hc j0.3  0.17783
1
Hc j  
2

1  j / j c 
2N

• Determine N and c to satisfy these conditions

Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing


Filter Design by Impulse
Invariance
Example: Impulse invariance applied to Butterworth
• Satisfy both constrains
2N 2N
æ 0.2p ö æ 1 ö
2
æ 0.3p ö æ 1 ö
2

1+ ç ÷ =ç ÷ and 1+ ç ÷ =ç ÷
è Wc ø è 0.89125 ø è Wc ø è 0.17783 ø
2N 2N
æ 0.2p ö æ 0.3p ö
ç ÷ = 0.2589 Eq (1) and ç ÷ = 31.622 Eq (2)
è Wc ø è Wc ø
• Divide Eq (1) by Eq (2)
2N
æ 0.2p ö
ç ÷ = 0.00845
è 0.3p ø

Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing


Filter Design by Impulse
Invariance
Example: Impulse invariance applied to Butterworth
• By taking log on both sides we can obtain N as
2N log10 ( 0.666) = log10 (0.00845)
N = 5.88 @ 6
• N must be an integer so we round it up to meet the
spec
• By putting value of N in Eq (1) and Eq (2) we get
Wc = 0.703 and Wc = 0.708

• Poles of transfer function


( jp /12)( 2k+11)
sk = (-1) ( c) c
= W for k = 0,1,...,11
1/12
jW e
Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing
Filter Design by Impulse
Invariance
Example: Impulse invariance applied to Butterworth
• Poles of transfer function
( jp /12)( 2k+11)
sk = (-1) ( c) c
= W for k = 0,1,...,11
1/12
jW e

Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing


Filter Design by Impulse
Invariance
Example: Impulse invariance applied to Butterworth
• The transfer function
WcN
H ( s) =
(s - s1)(s - s2)(s - s3)(s - s4)(s - s5)(s - s6)
0.12093
Hs 
  
s2  0.364s  0.4945 s2  0.9945s  0.4945 s2  1.3585s  0.4945 
• Mapping to z-domain
0.2871  0.4466z 1  2.1428  1.1455z 1
Hz   1 2

1  1.2971z  0.6949z 1  1.0691z 1  0.3699z  2
1.8557  0.6303z 1

1  0.9972z 1  0.257z 2
Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing
Filter Design by Impulse
Invariance
Example: Impulse invariance applied to Butterworth

Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing


Filter Design by Bilinear
Transformation
• Get around the aliasing problem of impulse invariance
• Map the entire s-plane onto the unit-circle in the z-
plane
• Nonlinear transformation
• Frequency response subject to warping
• Bilinear transformation
2  1  z 1 
s  
1 
Td 1  z 
• Transformed system function
 2  1  z 1 
Hz  Hc   
1 
 Td  1  z 
Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing
Filter Design by Bilinear
Transformation
• Again Td cancels out so we can ignore it
• We can solve the transformation for z as
1  Td / 2s 1  Td / 2  jTd / 2
z  s    j
1  Td / 2s 1  Td / 2  jTd / 2

• Maps the left-half s-plane into the inside of the unit-


circle in z
• Stable in one domain would stay in the other
• On the unit circle the transform becomes
1  jTd / 2
z  e j
1  jTd / 2
Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing
Filter Design by Bilinear
Transformation
• To derive the relation between  and 
2  1  e  j  2  2e  j / 2 j sin / 2 2 j  
s      j    j / 2  tan 
Td  j 
1  e  Td  2e cos / 2 Td 2

• which yields
2    Td 
 tan  or   2 arctan 
Td 2  2 

Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing


Filter Design by Bilinear
Transformation

Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing


Filter Design by Bilinear
Transformation
Example: Bilinear transform applied to Butterworth
 
0.89125  H e j  1 0    0.2
He   0.17783
j
0.3    

• Apply bilinear transformation to specifications


2  0.2 
0.89125  Hj   1 0   tan 
Td  2 
2  0.3 
Hj   0.17783 tan   
Td  2 

• We can assume Td=1 and apply the specifications to


1
Hc j  
2

1   /  c 
2N

Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing


Filter Design by Bilinear
Transformation
Example: Bilinear transform applied to Butterworth
• To get
2N 2 2N 2
 2 tan 0.1   1   2 tan 0.15   1 
1      and 1     
 c   0.89125   c   0.17783 

• Solve N and c
éææ 1 ö2 ö ææ 1 ö2 öù
log êççç ÷ -1÷÷ ççç ÷ -1÷÷ú
êëèè 0.17783 ø ø èè 0.89125 ø øúû c  0.766
N= = 5.305 @ 6
2 log ëtan ( 0.15p ) tan ( 0.1p )û
é ù

• The resulting transfer function has the following poles


sk   1 jc   cej / 122k 11
1 / 12
for k  0,1,...,11
Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing
Filter Design by Bilinear
Transformation
Example: Bilinear transform applied to Butterworth
• The resulting transfer function has the following poles
sk   1 jc   cej / 122k 11 for k  0,1,...,11
1 / 12

Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing


Filter Design by Bilinear
Transformation
Example: Bilinear transform applied to Butterworth
• Resulting in
WcN
H ( s) =
(s - s1)(s - s2)(s - s3)(s - s4)(s - s5)(s - s6)
0.20238
Hc s 
  
s2  0.3996s  0.5871 s2  1.0836s  0.5871 s2  1.4802s  0.5871 
• Applying the bilinear transform yields

0.00073781  z  1 6
Hz  
1  1.2686z 1
 0.7051z 1  1.0106z
2 1
 0.3583z 2 
1

1  0.9044z 1
 0.2155z 2 
Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing
Filter Design by Bilinear
Transformation
Example: Bilinear transform applied to Butterworth

Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing


FIR Filter Design by
Windowing
• Simplest way of designing FIR filters
• Method is all discrete-time no continuous-time
involved
• Start with ideal frequency response

   h ne hd n 
1
 


j jn
Hd e j   jn Hd e e d
n  
d
2  
• Choose ideal frequency response as desired
response
• Most ideal impulse responses are of infinite length

Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing


FIR Filter Design by
Windowing
• The easiest way to obtain a causal FIR filter from
ideal is
hd n 0  n  M
hn  
 0 else

• More generally
1 0  n  M
hn  hd nwn where wn  
0 else

Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing


FIR Filter Design by
Windowing
Windowing in Frequency Domain
• Windowed frequency response

He j

1

2  
Hd e  
j
W e 
j   
d

• The windowed version is smeared version of desired


response

• If w[n]=1 for all n,


then W(ej) is pulse
train with 2 period

Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing


FIR Filter Design by
Windowing
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
1  e jM1  jM / 2 sinM  1 / 2
  e
M
W e j   jn
  e
n0 1  e j sin / 2
Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing
FIR Filter Design by
Windowing
Properties of Windows

Muhammad Majid (m.majid@uettaxila.edu.pk) Digital Signal Processing

You might also like