0% found this document useful (0 votes)
22 views

Module 3 - DSP

Uploaded by

stumiki
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Module 3 - DSP

Uploaded by

stumiki
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

Module 3

IIR Filter Design: Design of analog low pass and high pass
filters using Butterworth approximation, design of IIR digital
low pass and high pass filters using Bilinear transformation.
Introduction
● Filters are important class of LTI systems.
● The term frequency selective filter suggests a system that passes certain
frequency components of an input signal and totally rejects all others.
● Any system that modifies certain frequencies relative to others is also called a
filter.
● The design of discrete-time filters corresponds to determining the parameters
of a transfer function or difference equation that approximates a desired
impulse response or frequency response within specified tolerances.
● Discrete-time systems implemented with difference equations fall into two
basic categories : infinite impulse response (IIR) systems and finite-impulse
response (FIR) systems .
● Designing IIR filters implies obtaining an approximating transfer function that
is a rational function OF z, whereas designing FIR filters implies polynomial
approximation.
● Initially the designs of discrete-time filters were based on mapping
well-formulated and well-understood continuous time filter designs to
discrete-time designs through techniques such as impulse invariance and the
bilinear transformation.
● The most prevalent approaches to designing FIR filters are the use of
windowing and the class of iterative algorithms collectively referred to as the
Parks-McClellan algorithm.
Steps of designing filters
1. Specification of the desired properties of the system.
2. Approximation of the specifications using a causal discrete-time system.
3. Realization of the system.
● Primary focus on the second step.
● The first step is dependent on the application and the last on the technology
of implementation.
Filter specifications
Ideal Low pass Filter
● Unity gain in the passband.
● Zero gain in the stopband.
● A transition region from the passband edge frequency 𝜔p to the beginning of
the stopband frequency 𝜔s.
● The passband tolerance limits may vary symmetrically around unity gain in
which case 𝛿p1=𝛿p2 , or the passband may be constrained to have maximum
gain of unity in which case 𝛿p1=0.
● Many of the filters used in practice are specified by a tolerance scheme
similar to that shown with no constraints on the phase response other than
those imposed implicitly by requirements of stability and causality.
Butterworth Low Pass Filters
● Butterworth filters are defined by the property that the magnitude response is
maximally flat in the passband.
● For an Nth-order lowpass filter, this means that the first (2N-1) derivatives of
the magnitude-squared function are zero at Ω=0.
● Another property is that the magnitude response is monotonic in the
passband and the stopband.
● The magnitude-squared function for a continuous-time Butterworth lowpass
filter has the form :
● We observe by substituting j𝛀=s that Hc(s) and Hc(-s) must be of the form :

● The poles of the magnitude-squared function are therefore located at values


of s satisfying 1+(s/jΩ)2N=0 i.e.

sk=(-1)1/2N(jΩc)=Ωce(j𝛑/2N)(2k+N-1), k=0,1,...2N-1

● There are 2N poles equally placed in angle on a circle of radius Ωcin the
s-plane.
● The poles are symmetrically located with respect to the imaginary axis.
● A pole never falls on the imaginary axis.
● A pole occurs on the real axis for N odd, but not for N even.
● The angular spacing between the poles on the circle is 𝞹/N radians.
● For example for N=3, the poles are spaced by 𝞹/3 radians or 60 degrees as
shown below :
● The poles of the magnitude-squared function always occurs in pairs, i.e. If
there is a pole at s=sk, then a pole also occurs at s= -sk.
● To determine the system transfer function of the analog filter to associate with
the Butterworth magnitude-squared function, we perform the factorization
Hc(s)Hc(-s).
● To construct Hc(s) from the magnitude-squared function, we would choose the
one pole from each such pair.
● To obtain a stable and causal filter, we would choose all the poles on the
left-half of the s-plane.
● Therefore, Hc(s) for the above function is
● This is simplified to

● In general the numerator of Hc(s) would be ΩcN to ensure that |Hc(0)|=1.


Butterworth approximation of magnitude response
Design of Butterworth low pass filter
Determine the order of the filter N given :

● Maximum passband attenuation is 𝛼p(< 3 dB)


● Passband frequency is Ωp
● Passband frequency is Ωs
● Minimum stopband attenuation is 𝛼s
The magnitude function can be written as :

Taking logarithm on both sides, we have :


At Ω=Ωp, the attenuation is equal to 𝛼p, therefore, the above equation is written as

which gives :

Taking antilog and simplifying, we get :


At Ω=Ωs, the minimum stopband attenuation is equal to 𝛼s. Substituting these in
the gain equation, we get :

Or,
After simplification, we get :

Substituting for 𝜖, and simplifying, we get :


Rounding off to the next higher integer, we get :

Or,

Where
Define the parameters A and k as :

Therefore, the order equation for the low pass Butterworth analog filter is given by
Example 1
Given 𝛼p=1 dB, 𝛼s=30 dB, Ωp=200 rad/s and Ωs=600 rad/s. Determine the order of
the filter.

Solution : From expression of A and k, we have :

A=62.115, and k=⅓.

Therefore, N ≥ 3.758.

Rounding off N to the next higher integer, we get N=4.


Example 2
Determine the order and poles of lowpass Butterworth filter that has a 3 dB
attenuation at 500 Hz and an attenuation of 40 dB at 1000 Hz.
Solution : Given 𝛼p=3 dB, 𝛼s=40 dB, Ωp=2*𝜋*500 =1000𝜋 rad/s and
Ωs=2*𝜋*1000=2000𝜋 rad/s.
From the expression of N, we get N ≥ 6.6. Therefore, take N=7.
The poles of the filter are given by
sk=Ωcej𝜙k=1000𝜋 ej𝜙k k=1,2,...,7
Where 𝜙k=𝜋/2+(2k-1)𝜋/(2N), k=1,2,...,7
Cutoff frequency for Butterworth filter

The magnitude squared function of Butterworth analog lowpass filter is given by

We also know
Therefore,

Simplifying above we obtain

Further simplifying we get :


Also we have

Substituting for Ωp and simplifying we get another expression for Ωc:


Steps to design an analog Butterworth lowpass filter
1. From the given specifications find the order of the filter N.
2. Round off it to the next higher integer.
3. Find the transfer function H(s) for Ωc=1 rad/s for the value of N.
4. Calculate the value of the cut off frequency Ωc.
5. Find the transfer function Ha(s) for the above value of Ωc by substituting s →
s/Ωc in H(s)
Example
Design an analog Butterworth filter that has a -2 dB passband attenuation at a
frequency of 20 rad/s and at least -10 dB stopband attenuation at 30 rad/s.

Given ⍺p=2 dB ; Ωp=20 rad/s ; ⍺s=10 dB ; Ωs=30 rad/s

We have N=4. Therefore, H(s) for N=4 can be found from the table as :
Calculating Ωcwe have : Ωc=21.3868

Substituting s → s/Ωc in H(s) we have :


Lowpass to Highpass
Given a normalized lowpass filter one can design a highpass filter with cutoff
frequency Ωc with transformation s → Ωc/s.

Example :

For the given specifications ⍺p=3 dB ; Ωp=1000 rad/s ; ⍺s=15 dB ; Ωs=500 rad/s,
design a highpass filter.

Solution : First design a lowpass filter and then use suitable transformation to get
the transfer function of a highpass filter.
For lowpass filter For highpass filter

Ωc=Ωp=500 rad/s Ωc=Ωp=1000 rad/s

Ωs=1000 rad/s Ωs=500 rad/s

Lowpass filter specifications :

Ωc=Ωp=500 rad/s; ⍺p=3 dB

Ωs=1000 rad/s; ⍺s=15 dB

Finding N, we get N=3. H(s) for Ωc=1 rad/s and N=3 is


To get highpass filter having cutoff frequency Ωc=Ωp=1000 rad/s

Substitute

We have :
Design of IIR Filter using Bilinear Transformation
● Bilinear transformation is an algebraic transformation between the variables s
and z that maps the entire jΩ-axis in the s-plane to one revolution of the unit
circle in the z-plane.
● Since with this approach, -∞ ≤ Ω ≤ +∞ maps onto -𝜋 ≤ ⍵ ≤ +𝜋, the
transformation between the continuous-time and discrete-time frequency
variables is nonlinear.
● With Hc(s) denoting the continuous-time system function and H(z) the
discrete-time system function, the bilinear transformation corresponds to
replacing s by
● A “sampling parameter” Td is often included in the definition of bilinear
transformation.
● Solving for z we obtain :
● Substituting s = 𝜎 + jΩ, we obtain :

● If 𝜎 < 0, it follows that |z| < 1 for any value of Ω. Similarly if 𝜎 > 0, then |z| > 1
for all Ω.
● That is, if a pole of Hc(s) is in the left-half s-plane, its image in the z-plane will
be inside the unit circle.
● Therefore, causal stable continuous time-filters map into causal stable
discrete-time filters.
● Substituting s=jΩ into above equation, we obtain :

● From above equation, it is clear that |z|=1 for all values of s on the jΩ-axis.
● That is the jΩ-axis maps onto the unit circle. So the above equation takes the
form :
● To derive a relationship between ⍵ and Ω, return the original equation and
substitute z=ej⍵ , therefore,

Or
This gives :

Or
● The range of frequencies 0 ≤ Ω ≤ ∞ maps to 0 ≤ ⍵ ≤ 𝜋, while the range -∞ ≤ Ω
≤ 0 maps to -𝜋 ≤ ⍵ ≤ 0.
● The bilinear transformation avoids the problem of aliasing encountered with
the use of impulse invariance, because it maps the entire imaginary axis of
the s-plane onto the unit circle in the z-plane.
● The price paid for this is the nonlinear compression of the frequency axis.
This is known as the warping effect.
● Consequently, the design of discrete-time filters using the bilinear
transformation is useful only when this compression can be tolerated or
compensated for.
● The warping effect can be eliminated by prewarping the analog filter. This can
be done by finding the prewarping analog frequencies using the formula :
Therefore, we have :
Steps to design digital filter using bilinear transform
technique
1. From the given specifications, fine prewarping analog frequencies using
formula

2. Using the analog frequencies find H(s) of the analog filter.


3. Select the sampling rate of the digital filter, call it T seconds per sample.
4. Substitute

Into the transfer function found in step 2.


Example 1
Apply the bilinear transformation to the following transfer function with T=1 sec
and find H(z).

Solution :

Substitute

In H(s) to get H(z)


Given T=1 sec, we get :
Example 2
Using the bilinear transform, design a high pass filter, monotonic in passband with
cutoff frequency of 1000 Hz and down to 10 dB at 350 Hz. The sampling
frequency is 5000 Hz.

Solution : Given ⍺p=3 dB; ⍵c=⍵p=2*𝜋*1000=2000𝜋 rad/s.

⍺s=10 dB; ⍵s=2*𝜋*350=700𝜋 rad/s.

T=1/f=1/5000=2 ⨯ 10-4 sec.

The characteristics are monotonic in both passband and stopband. Therefore, the
filter is Butterworth filter.
Prewarping the digital frequencies we have
Ωp=(2/T)tan(⍵pT/2)=7265 rad/s
Ωs=(2/T)tan(⍵sT/2)=2235 rad/s
First we design a lowpass filter for the given specifications and use suitable
transformation to obtain transfer function of the high pass filter.
The order of the filter is N=0.932. Therefore, take N=1.
The first order Butterworth filter for Ωc=1 rad/s is H(s)=1/(s+1).
The high pass filter for Ωc=Ωp=7265 rad/s can be obtained by using the
transformation s → Ωc/s
The transfer function of the highpass filter

Using bilinear transformation

Or
Low pass to high pass
Substitute

Where

⍵p= passband frequency of lowpass filter

⍵p’= passband frequency of highpass filter

You might also like