0% found this document useful (0 votes)
24 views46 pages

SP Slides 5

Uploaded by

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

SP Slides 5

Uploaded by

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

Filter Specifications

Frequency Selective Lowpass Filters: Magnitude Response


Lowpass Filter Tolerance Scheme
I Passband and stopband edges
I 0 < ⌦p < ⌦s (continuous time)
I 0 < !p < !s < ⇡ (discrete time)
I Transition band between

I Passband ripple (assume ideal passband gain is 1)


I 1 1  |H|  1 + 1 for 0  ⌦  ⌦p or 0  !  !p
I In decibels, the maximum and minimum passband
gains are 20 log10 (1 ± 1 )
I If ripple is specified in dB, can obtain 1 :
RippledB = 20 log10 (1 + 1 ) 20 log10 (1 1)
Ripple/20
=) 1 = 10 1
10Ripple/20 +1
for 1 dB ripple, 1 = 0.0575

I Minimum stopband attenuation


I |H| < 2 for ⌦ ⌦s or ⇡ ! !s . In dB, 20 log10 2
Specifications for Discrete-Time Filter

Assuming the input, xa (t) is bandlimited and the sampling frequency is high
enough to avoid aliasing, then overall system behaves like an LTI system:
(
H(ej⌦T ), |⌦| < ⇡/T
He↵ (j⌦) =
0, |⌦| ⇡/T

We can use the frequency mapping ! = ⌦T to convert continuous-time filter


specifications for that of the discrete-time filter:
⇣ !⌘
H(ej! ) = He↵ j |!| < ⇡
T
Example: Specifications for a Discrete-Time Filter
Find the discrete-time filter specifications assuming sampling rate is 104
samples/sec (T = 10 4 sec) and the overall system has the following properties:
1. The gain |He↵ (ej⌦) | should be within ±0.01 of unity in the frequency band
0  ⌦  2⇡(2000).
2. The gain should be no greater than 0.001 in the frequency band 2⇡(3000)  ⌦
The mapping between continuous-time and discrete-time frequencies only a↵ects
the cuto↵ frequencies and not the tolerance on the magnitude:

1 = 0.01 !p = ⌦p T = 0.4⇡ radians


2 = 0.001 !p = ⌦s T = 0.6⇡ radians

Passband: Ideal gain: 20 log10 (1) = 0 dB, Max gain: 20 log10 (1.01) = 0.0864 dB
Min gain: 20 log10 (0.99) = 0.0873 dB; Max stopband: 20 log10 (0.001) = 60 dB
Common Analog Filters
Continous-Time Filter Design

The magnitude-squared frequency response for lowpass prototypes are all of the
form:
1
|H(j⌦)|2 =
1 + g(j⌦)
where g is a polynomial or ratio of polynomials.
I Lowpass prototypes can be converted to a di↵erent lowpass filter, or a
highpass/bandpass/bandstop filter by performing a frequency transformation
(either in the analog or digital domain)
I Commonly used analog filters: Butterworth, Chebyshev, Elliptic
Butterworth Lowpass Filters

1
|H(j⌦)|2 =
1 + (j⌦/j⌦c )2N

I cutto↵ frequency ⌦c (also called its -3 dB frequency)


I N is the order (number of poles)
I monotonic in both passband and stopband
I widest transition band for a given order
I as the order N increases, the filter becomes sharper
Butterworth Lowpass Filters (Continued)
Since H(s)H( s) evaluated at s = j⌦ is |H(j⌦)|2 :
1
H(s)H( s) =
1 + (s/j⌦c )2N

The roots of the denominator polynomial are the poles of the magnitude-square
response:
sk = ( 1)1/2N (j⌦c ) = ⌦c d(j⇡/2N )(2k+N 1)

I 2N poles equally spaced in angle on circle of radius ⌦c


I Poles of magnitude-squared always occur in pairs:
s = sk and s = sk
I Stable and causal H(s): choose all poles on left-half
of s-plane
Chebyshev Filters

Type I Chebyshev filter, equiripple in


passband and monotonic in stopband:
1
|H(j⌦)|2 =
1 + ✏2 VN2 (⌦/⌦c )

⇥ ⇤
I N th -order Chebyshev polynomial: VN (x) = cos N cos 1 (x)
I VN (x) oscillates between ±1 for |x|  1 and increases monotonically for |x| > 1
I |H(j⌦)|2 ripples between 1 and 1/(1 + ✏2 ) for 0  ⌦/⌦c  1
I |H(j⌦)|2 decreases monotonically for ⌦/⌦c > 1
I ✏ specified by allowable passband ripple, ⌦c is desired passband cuto↵
frequency, N is chosen so these specifications are met
Chebyshev Filters (Continued)
I Poles lie on an ellipse in the s-plane
I minor axis: 2a⌦c
I a = 12 (↵1/N ↵ 1/N )
p
I ↵=✏ 1+ 1+✏ 2
I major axis = 2b⌦c
I b = 12 (↵1/N + ↵ 1/N
)
I Identify points on major and minor circles
with symmetry (imaginary axis) and equal
angle spacing of ⇡/N
I Pole: horizontal distance from minor circle
and vertical distance from major circle
I Angle spacing corresponds to poles for
equivalent N th order Butterworth filter
Elliptic Filters

Equiripple error in the passband and the


stopband:
1
|H(j⌦)|2 = 2 (⌦/⌦ )
1+ ✏2 UN p

I Where UN (x) is a Jacobian elliptic function


I will have zeros on the j⌦ axis
I most efficient (smallest-order) filter for given specifcations
I equivalently, elliptic filter has smallest transition bandwidth
I phase response is more nonlinear in passband than a comparable
Butterworth/ or Chebyshev filter
IIR Filter Design: Approximation of Derivatives
Analog Filters
An analog filter can be described by its system function:
P
M
k
ks
B(s)
Ha (s) = = k=0
A(s) PN
↵k sk
k=0
where {↵k } and { k } are the coefficients. The impulse response, h(t), also
characterizes the filter; related to the system function by the Laplace transform:
Z 1
Ha (s) = h(t)e st dt
1
The rational system function can also be described by the linear
constant-coefficient di↵erential equation with x(t) the input and y(t) the output:
N
X M
dk y(t) X dk x(t)
↵k = k
dtk dtk
k=0 k=0
Converting From Analog to Digital

Various methods for converting an analog filter into the digital domain should
possess these desirable properties:
1. The j⌦ axis in the s-plane should map into the unit circle in the z-plane.
There will be a direct relationship between the two frequency variables in the
two domains.
2. The left-half plane (LHP) of the s-plane should map into the inside of the unit
circle in the z-plane. A stable analog filter will convert to a stable digital filter.
We specify the desired filter characteristics for the magnitude and then accept the
phase response that is obtained from the design method.
IIR Filter Design by Approximation of Derivatives
Substitute the backward di↵erence to find the derivative at time t = nT :

dy(t) y[nT ] y[nT T] y[n] y[n 1]


= ⌘
dt t=nT T T

Since analog di↵erentiator has system function H(s) = s and the digital system
that produces the output [y[n] y[n 1]] /T has the system function
H(z) = (1 z 1 )/T . Therefore, the frequency domain equivalent relationship is:

1 z 1
s=
T
The kth derivative of y(t) results in this equivalent frequency-domain relationship:
✓ 1
◆k
1 z
sk =
T
Disadvantages of Approximation of Derivatives
Given an analog filter with system function, Ha (s), the system function for a
digital IIR filter using approximation of derivatives by finite di↵erences:

H(z) = Ha (s) s=(1 z 1 )/T

The mapping from the s-plane to the z-plane is

1 z 1 1
s= =) z=
T 1 sT
Using s = j⌦:
1 1 ⌦T
z= = +j
1 j⌦T 1 + ⌦2 T 2 1 + ⌦2 T 2
As ⌦ varies from 1 to 1 the corresponding z-plane is a circle of radius 12 with
center z = 12 . So this is stable, but confined to relatively small frequencies.
IIR Filter Design: Impulse Invariance
Impulse Invariance Design

To transform continuous-time filter into a discrete-time filter, the impulse response


is chosen proportional to samples of the continuous-time impulse response:

h[n] = Td hc (nTd )

where Td is the sampling interval. Note that Td is not related to the sampling
period T if the discrete-time system has C/D or D/C conversion.
Relationship between between frequency responses of the discrete-time filter and
the continuous-time filter:
1
X ✓ ◆
j! ! 2⇡
H(e ) = Hc j +j k
Td Td
k= 1
Aliasing in Impulse Invariance Design
If the continuous-time filter is bandlimited:
Hc (j⌦) = 0 |⌦| ⇡/Td
then responses are related by scaling of frequency axis, ! = ⌦Td for |!|  ⇡
✓ ◆
j! !
H(e ) = Hc j |!|  ⇡
Td
Any practical filter can’t be bandlimited so aliasing will occur:

P
1 ⇣ ⌘
H(ej! ) = Hc j T!d + j 2⇡
Td k
k= 1
Impulse Invariance Design Procedure
Assuming that aliasing is negligible, the we use the frequency scaling to obtain the
continuous-time filter specifications from the desired discrete-time filter:

⌦ = !/Td

Then, the continuous-time system Hc (s) is transformed to H(z). We start with a


causal filter expressed using partial fractions (distinct poles):

XN
Ak
Hc (s) =
s sk
k=1
8
< P A e sk t ,
> N
k t 0
hc (t) = k=1
>
:0, t<0
Impulse Invariance Design Procedure (Continued)

Sampling the hc (t) provides the discrete-time impulse reponse:


N
X N
X
sk nTd
h[n] = Td hc [nTd ] = T d Ak e u[n] = Td Ak (esk Td )n u[n]
k=1 k=1

Using the z-transform provides the system function for the discrete-time system:

1 N
! N 1 N
X X X X X T d Ak
sk T d n n sk T d 1 n
H(z) = Td Ak (e ) z = T d Ak (e z ) =
1 e sk T d z 1
n=0 k=1 k=1 n=0 k=1

I Pole at s = sk in s-plane transforms to pole at z = esk Td in the z-plane.


IIR Filter Design: Bilinear Transformation
Bilinear Transformation
Consider approximating the integrator in discrete time:
Z t
y(t) = x(⌧ ) d⌧
1

Let t = nT , and using recursion:


Z nT
y(nT ) = y((n 1)T ) + x(⌧ ) d⌧
(n 1)T

An integral can be approximated using the trapezoid formula:


Z nT
T T
x(⌧ ) d⌧ ⇡ [x(nT ) + x((n 1)T )] = (x[n] + x[n 1])
(n 1)T 2 2
Bilinear Transformation (Continued)
Returning to the integrator:
Z nT
y(nT ) = y((n 1)T ) + x(⌧ ) d⌧
(n 1)T

With the trapezoid rule, the integrator equation is, in discrete time:
T
y[n] = y[n 1] + (x[n] + x[n 1])
2
Going to the z-domain:

1 T 1
Y (z) = z Y (z) +
X(z) + z X(z)
✓2 ◆
Y (z) T 1+z 1
H(z) = =
X(z) 2 1 z 1
Bilinear Transformation (Continued)
✓ 1

1 T 1+z
The continuous time integration is replaced by 1
for discrete time.
s 2 1 z

This mapping from the s-plane to the z-plane is the bilinear transformation (BLT):
✓ 1

2 1 z
s= 1
T 1+z

Given a continuous time system function, Hc (s), the corresponding discrete time
system function is: ✓ ◆
21 z 1
H(z) = Hc
T 1+z 1
Bilinear Transformation Properties
Properties of the Bilinear Transformation: Stability

21 z 1 1 + sT /2
s= 1
! z=
T 1+z 1 sT /2
Using s = + j⌦:

1 + ( + j⌦)T /2 1+( j⌦)T /2


|z|2 = ·
1 ( + j⌦)T /2 1 ( j⌦)T /2
8
2 >
<> 1, >0
1+ + ⌦2 T 2 /4 + T
= 2 + ⌦2 ) T 2 /4 = 1, =0
1+( T >
:
< 1, <0

A stable filter in the s-plane maps to a stable filter in the z-plane


Properties of the Bilinear Transformation: j⌦-axis onto Unit Circle
21 z 1 1 + sT /2
s= 1
! z=
T 1+z 1 sT /2
Using s = j⌦ ( = 0):
1 + j⌦T /2
z=
1 j⌦T /2
Therefore, |z| = 1 for all values of s on the j⌦ axis.
Properties of the Bilinear Transformation: Frequency Axis is Distorted
21 z 1
s= 1
T 1+z
Using the mapping from the j⌦ axis onto the unit circle:
" #
2 1 e j! 2 2e j!/2 ( 12 ej!/2 12 e j!/2 ) 2 j sin (!/2)
j⌦ = j!
= 1 1 =
T 1+e T 2e j!/2 ( 2 ej!/2 + 2 e j!/2 ) T cos (!/2)

Therefore frequency is warped:


2 ⇣! ⌘
⌦= tan
T 2
✓ ◆
1 ⌦T
! = 2 tan
2
Mapping of Frequency by Bilinear Transformation
⇣! ⌘ ✓ ◆
2 1 ⌦T
⌦ = tan ! = 2 tan
T 2 2
Prewarping Continuous-Time Cuto↵ Frequencies

Prewarping:
2 ⇣! ⌘
p
⌦p = tan
T 2
2 ⇣! ⌘
s
⌦s = tan
T 2
Design Procedure Using Bilinear Transformation

1. Decide on your continuous-time filter specs ⌦p and ⌦s . After sampling, the


corresponding discrete-time frequencies are !p = ⌦p Ts and !s = ⌦s Ts .

2. If you design a continuous filter with ⌦p and ⌦s and apply the BLT, the
resulting critical frequencies will be warped to values lower than desired. So
apply the inverse frequency warping to the desired !p and !s , resulting in
2 ⇣! ⌘
p,s
prewarped continuous filter specs ⌦0p,s = tan .
T 2

3. Design continuous filter Hc (s) with prewarped critical frequencies ⌦0p and ⌦0s .

4. Apply the BLT to get the discrete time filter H(z) = Hc (s) s= T2 1 z 1 .
1+z 1
The critical frequencies will be warped back to the desired values !p and !s .
Design Comparisons:
Discrete-Time Butterworth, Chebyshev, and Elliptic Filters
Example: Lowpass Filter Specifications To Compare

I Passband Edge Frequency: !p = 0.5⇡


I Stopband Edge Frequency: !s = 0.6⇡
I Maximum passband gain: 0 dB
I Minimum passband gain: 0.3 dB
I Maximum stopband gain: 30 dB

Corresponding tolerance limits in passband and stopband:

20 log10 (1 p) = 0.3 =) p = 0.0339

20 log10 ( s ) = 30 =) s = 0.0316
Butterworth Filter: 15th-order

I Minimum order to meet specs:


15th-order
I All zeros at z = 1
I Monotonic in all bands
Type I Chebyshev Filter: 7th-order

I Minimum order to meet specs:


7th-order
I All zeros at z = 1
I Equiripple in passband
I Monotonic in stopband
Type II Chebyshev Filter: 7th-order

I Minimum order to meet specs:


7th-order
I Zeros along the unit circle
I Monotonic in passband
I Equiripple in stopband
Elliptic Filter: 5th-order

I Minimum order to meet specs:


5th-order
I Zeros along the unit circle
I Equiripple in passband and stopband
Frequency Transformation of IIR Filters
Other Frequency Selective Filters

Converting lowpass prototypes to highpass, bandpass, and bandstop filters.


Example of multiband filter (bandstop):
Mapping From the Z-Plane to the z-Plane

I Start with a discrete-time lowpass system function Hlp (Z)


I with frequency variable ✓, so on the unit circle: Z = ej✓
I Transform lowpass prototype to new system function H(z)
I with frequency variable !, so on the unit circle: Z = ej!
I Another lowpass filter, or highpass, bandpass, or bandstop
I Mapping:
Z 1 = G(z 1 )
I New system function:

H(z) = Hlp (Z) Z 1 =G(z 1)


Example: 4th-order Chebyshev Lowpass Transformed to Highpass
Digital Frequency Transformations
Analog Frequency Transformations
I Start with continuous-time lowpass system function H(s), passband edge ⌦p
I Transform lowpass prototype to new continuous-time lowpass filter, or
highpass, bandpass, or bandstop
I Mappings:
⌦p
I Lowpass (new band edge: ⌦p ):
0
s ! s
⌦0p
0
⌦p ⌦p
I Highpass (new band edge: ⌦p ):
0
s !
s
s 2 + ⌦ l ⌦u
I Bandpass (new band edges: ⌦l , ⌦u ): s ! ⌦p
s(⌦u ⌦l )
s(⌦u ⌦l )
I Bandstop (new band edges: ⌦l , ⌦u ): s ! ⌦p
s 2 + ⌦ u ⌦l
Example: Transformation of Lowpass into Bandpass Filter
Transform the single-pole lowpass Butterworth filter with system function
⌦p
H(s) =
s + ⌦p

into a bandpass filter with upper and lower band edge frequencies ⌦u and ⌦l .

1
H(s) = s2 +⌦l ⌦u
s 2 + ⌦ l ⌦u s(⌦u ⌦l ) +1
s ! ⌦p
s(⌦u ⌦l ) (⌦u ⌦l )s
=
s2 + (⌦u ⌦l )s + ⌦l ⌦u
This filter has a zero at s = 0 and poles at
q
(⌦u ⌦l ) ± ⌦2u + ⌦2l 6⌦u ⌦l
s=
2

You might also like