0% found this document useful (0 votes)
35 views28 pages

Yn Ayn Aynn BXN BXNN: Recursive Filters

This document discusses infinite impulse response (IIR) filters, which are recursive filters with constant coefficients. IIR filters can be very selective with few parameters but generally have nonlinear phase and can be unstable. They are designed by discretizing analog filters using techniques like the Euler approximation and bilinear transformation to map the derivative operator "s" to the time shift operator "z" while maintaining stability. The bilinear transformation preserves the stability region when mapping the s-plane to the z-plane, unlike the Euler approximation. It is used to design digital filters from specifications of analogous analog filters. Butterworth filters have maximally flat magnitude and monotonic response.

Uploaded by

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

Yn Ayn Aynn BXN BXNN: Recursive Filters

This document discusses infinite impulse response (IIR) filters, which are recursive filters with constant coefficients. IIR filters can be very selective with few parameters but generally have nonlinear phase and can be unstable. They are designed by discretizing analog filters using techniques like the Euler approximation and bilinear transformation to map the derivative operator "s" to the time shift operator "z" while maintaining stability. The bilinear transformation preserves the stability region when mapping the s-plane to the z-plane, unlike the Euler approximation. It is used to design digital filters from specifications of analogous analog filters. Butterworth filters have maximally flat magnitude and monotonic response.

Uploaded by

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

Infinite - duration Impulse Response (IIR) Filters

Recursive Filters:

y (n)  a1 y (n  1) ... a N y (n  N )  b0 x (n) ...bN x (n  N )

with ak ,..., bk constant coefficients.

Advantages: very selective filters with a few parameters;


Disadvantages: a) in general nonlinear phase,
b) can be unstable.
Design Techniques: discretization of analog filters

analog digital


 
  

s-plane z-plane

H a ( s) H d ( z)

Problem: we need to map


the derivative operator “s” into the time shift operator “z”,
and make sure that the resulting system is still stable.
Two major techniques
• Euler Approximation (easiest),
• Bilinear Transformation (best).

Euler Approximation of the differential operator:

y (nT )  y (nT  T )
y (nT ) 
T
approximation of “s”
take the z-Transform of both sides:

Y ( z)  z 1Y ( z )  1  z 1 
Z y (nT )    Y ( z)
T  T 

1  z 1
s
T
Example:
2
take the analog filter with transfer function H a ( s)  and discretize it
s 1
with a sampling frequency Fs  5Hz .
By Euler’s approximation

2 0.333 z
Hd ( z )  
 1  z 1  z  0.833
  1
 0.2 

The filter is implemented by the difference equation

y (n)  0.833 y (n  1)  0.333x (n)

analog digital

 
s-plane z-plane
Problem with Euler Approximation:
it maps the whole stable region of the s-plane into a subset of the stable region in the z-plane

s-plane z-plane

s
since 
 1 

1 1 
s
1 1 T
z     
2 1  sT 2 2  s  1 1 1
 
  T T
 T 

 z
1
2

1
2
if Re[s]<0.
Main Property of the Bilinear Transformation: it preserves the stability regions.

s-plane z-plane

since: s

2
s
T
| z|   1 2 2
2 
s T T

T
Bilinear Transformation. It is based on the relationship

T
y (t )dt   y (nT )  y (nT  T )
nT
y (nT )  y (nT  T )  
nT  T
        2
area ABCD

Take the z-Transform of both sides:


B
T
1
2

Y ( z )  z Y ( z )  Y1 ( z )  z 1Y1 ( z )  A D
nT-T nT
which yields the bilinear transformation:

2
2 1  z 1 s
s z T
T 1  z 1 2
s
T
Mapping of Frequency with the Bilinear Transformation.

Magnitude: j 
2
j 
T
| e j |   1
2 
2 2
j  T T
T
Phase:
 2 
 j   
  phase  T
2    (  )  2 j
  j   
 T  2
T
where  T  
 tan 1  
 2   j

 T 
  2tg 
1
 2 
  2   
  tg  
T  2 
See the meaning of this:

 T 
  2tg  1
 2 
  2   
  tg  
T  2 

it is a frequency mapping between analog frequency and digital freqiency.

 c c 
 
0

   c 0 c  
Example: we want to design a digital low pass filter with a bandwith Fo  8kHz
and a sampling frequency Fs  24 kHz
. Use the Bilinear Transformation.

Solution:

• Step 1: specs in the digital freq. domain


c  (2 )(8 / 24)  2 / 3 rad
• Step 2: specs of the analog filter to be digitized:

 
 c  2 Fs tan c (2)(24 10 )tg ( / 3)83.13  10 rad / sec
3 3

 2 

or equivalently Fc  13.23kHz

• Step 3: design an analog low pass filter (more later) with a bandwithFc  13.23kHz ;
• Step 4: apply Bilinear Transformation to obtain desired digital filter.
Design of Analog Filters

| H ()|2
Specifications: 1
1  2

1
2

2 2

p c s 

pass transition stop


band band
band
Two Major Techniques: Butterworth, Chebychev

Butterworth:

• Maximally flat magnitude filter

• No ripples in passband & stop band

• Monotonic response
Poles of Butterworth Filter:

1 1
| H ()|  H ( s) H (  s) s j
2
 H ( s) H (  s)   
2N

s  2 N

1   1  2 
 c  
s  c 
j
which yields the poles as solutions

  k 2  
 s2

1 j j j ( 2 k 1)
 N
2  1 s  j c e 2N
 ce e 2 2N
, k  0,...,2 N  1
c

N=2
and choose the N poles in the stable region.
+ +
poles

+ +
s-plane
Example: design a low pass filter, Butterworth, with 3dB bandwith of 500Hz and 40dB
attenuation at 1000Hz.
Solution:  c  1000 ;  s  2000 ,

solve for N from the expression

1 1
 2 N  0.01
2

 s 
2N
1 2
1  
 c 
| H ( )|dB
log(104  1)
N  6.64  N  7
2 log(2)

poles at
sk  1000 e j (  / 2  ( 2 k 1)  /14 ) , k  0,...,6

Chebychev Filters.
Based on Chebychev Polynomials: TN ( x )  cos( Nt ) x  cos( t )
T0 ( x )  cos(0)  1, T3 ( x )

T1 ( x )  cos(t ) x  cos( t )  x ,
T2 ( x )  cos(2t )  2 cos2 (t )  1 x  cos( t )  2 x 2  1,

TN 1 ( x )  2 xTN ( x )  TN 1 ( x )
x
Property of Chenychev Polynomials:
within the interval  1  x  1 Chebychev polynomials have least maximum deviation
from 0 compared to polynomials of the same degree and same highest order coefficient

P ( x )  4 x 3  ax 2  bx  c

T3 ( x )  4 x 3  3x

x
Chebychev Filter:

1
| H ()| 
2

 
1   TN 
2 2

 p 
1
Since TN (1)  1 (easy to show from the definition), then | H ( p )|2 
1  2

| H ()|2 1
1  2


p
ELLIPTIC FILTER
IMPULSE INVARIANT METHOD
IIR filter design using Matlab
In Matlab there are three functions for each class of filters (Butterworth, Chebytchev1, Chebytchev2):
BUTTAP CHEB1AP CHEB2AP Poles and Zeros of Analog Prototype Filter
BUTTER CHEBY1 CHEBY2 Numerator and Denominator from N and c
BUTTORD CHEBY1ORD CHEBY2ORD N and 
from specifications
c

Example. We want to design an IIR Digital Filter with the following specifications:
Pass Band 0 to 4kHz, with 1dB ripple;
Stop Band > 8kHz with at least 40 dB attenuation
Sampling frequency 40kHz
Type of Filter: Butterworth.
Using Matlab:
>> [N, fc]=butterord(fp, fs, Rp, Rs); % fp, fs=passband and stopband freq relative to Fs/2
>> [B, A]=butter(N, fc); % B, A vectors of numerator and denominator coefficients.
In our case:
[N, fc]=butterord(4/20, 8/20, 1, 40), would yield N=7, fc=0.2291;
[B, A]=butter(7, 0.2291), would yield the transfer function B(z)/A(z).
Let’s verify these numbers:
Step 1: specifications in the digital frequency domain:

4 
 p  2  rad band pass freq
40 5
8 2
s  2  rad stop band freq
40 5

Step 2: specifications for analog filter from the transformation   2 Fs tan 
 2

 p  2(40  10 ) tan   26  103 rad / sec
3
 10 

 s  2(40  10 ) tan   58  103 rad / sec
3
 5
2 1
Step 3: choose (say) Butterworh Filter H ( )  2N
 
1   2

 p 

with  p  26  103 rad / sec and  from the ripple specification


1
 1  2
20 log10  2   1    0.5
 1   

Step 4: determine order N from attenuation of 40dB

1
10 log10 2N
 40
 s 
1  0.5 
2 
 
 p

 s 58
with  yields N=7
 p 26
Step 5: finally the cutoff frequency, from the equation

2 1 1
H ( c )  14 
 c  2
1  0.52  
 26  103 

Which yields  c  28.7  103 rad / sec , corresponding to a digital frequency

 28.7 
c  2atan   0.6889 radians
 2  40 

Step 6: the desired Filter is obtained by the function


[num, den] = butter( 7 , 0.6889/)
Magnitude and Phase Plots:

You might also like