HOME
PDF letter size
PDF legal size

## IIR digital filter design for low pass filter based on impulse invariance and bilinear transformation methods using butterworth analog filter

May 5, 2010 compiled on — Thursday January 12, 2017 at 08:14 PM

### Contents

A low pass digital filter (IIR) is designed based on given specifications. Butterworth analog filter is designed first, then it is converted to digital filter

Analytical procedure is illustrated below and simplified to allow one to more easily program the algorithm. 4 numerical examples are used to illustrate the procedure.

### 1 Introduction

This report derives a symbolic procedure to design a low pass IIR digital filter from an analog Butterworth filter using 2 methods: impulse invariance and bilinear transformation. Two numerical examples are then used to illustrate using the symbolic procedure. There are a total of 13 steps.

A Mathematica program with GUI is written to enable one to use this design for different parameters. A Matlab script is being written as well.

#### 1.1 Filter specifications

Filter specifications are 5 parameters. The frequency specifications are analog frequencies, while the attenuation for the passband and the stopband are given in db

 The sampling frequency in Hz The passband cutoff frequency in Hz The stopband corner frequency in Hz The attenuation in db at The attenuation in db at

This diagram below illustrates these specifications

The frequency specifications are in and they must be first converted to digital frequencies where before using the attenuation specifications, The sampling frequency is used to do this conversion since corresponds to on the digital frequency scale.

### 2 The design steps

1. Convert specifications from analog to digital frequencies
2. Based on design method (impulse invariance of bilinear) apply the attenuation criteria to determine and (the filter order)
3. Using and find the locations of the poles of the butterworth analog filter .
4. Find from . The method of doing this depends if we are using impulse invariance or bilinear. This step is much simpler for the bilinear method as it does not require performing partial fractions decomposition on

Now we begin the analytical design procedure.

#### 2.1 Impulse invariance method

We first convert analog specifications to digital specifications: , hence and

Convert the criteria relative to the digital normalized scale:

Therefore

Notice that we added the scaling factor. Now, Butterworth analog filter squared magnitude Fourier transform is given by

hence equations (A) and (B) above are now written in terms of the analog Butterworth amplitude frequency response and become

Therefore the above becomes

Now, for impulse invariance,  and .

Change inequalities to equalities and simplify

Divide the above 2 equations

We need to round the above to then nearest integer using the Ceiling function

Now for impulse invariance method, use equation (1) above to solve for

Now that we found and , next find the poles of Since the butterworth magnitude square of the transfer function is

Hence poles are found by setting the denominator of the above to zero

We only need to find the LHS poles, which are located at , because these are the stable poles. Hence the pole is

For example for , we get

Now we can write the analog filter generated based on the above selected poles, which is, for impulse invariance

 (3)

is found by solving  hence

Now we need to write poles in non-polar form and plug them into (3)

Hence,

 (4)

Where

and

Now that we have found we need to convert it to

We need to make sure that we multiply poles of complex conjugates with each others to make the result simple to see.

Now that we have , we do the conversion. I.e. obtain from the above . When using impulse invariance, we need to perform partial fraction decomposition on (4) above in order to write in this form

For example, to obtain , we write

Once we find all the , we now write as follows

This completes the design. We can try to convert the above form of to a rational expression as

#### 2.2 bilinear transformation method

We first convert analog specifications to digital specifications: , hence and

Convert the criteria relative to the digital normalized scale:

Hence

Butterworth analog filter squared magnitude Fourier transform is given by

hence equations (A) and (B) above are now written in terms of the analog Butterworth amplitude frequency response and become

Now we assign values for and as follows,,

Change inequalities to equalities and simplify

Divide the above 2 equations

We need to round the above to then nearest integer using the Ceiling function. i.e.

Now for bilinear transformation we used equation (2) above to find Hence we now solve for

Now that we found and we find the poles of . Since for bilinear the magnitude square of the transfer function is

Hence poles are found by setting the denominator of the above to zero

We only need to find the LHS poles, which are located at , because these are the stable poles. Hence the pole is

For example for , we get

For bilinear, is given by

 (3)

is found by solving , hence we obtain

We see that the same expression results for for both cases.

Now we need to write poles in non-polar form and plug them into (3)

then

 (4)

Where

and

Now that we have found we need to convert it to . After finding as shown above, we simply replace by . This is much simpler than the impulse invariance method. Before doing this substitution, make sure to multiply poles which are complex conjugate of each others in the denominator of . After this, then do the above substitution

#### 2.3 Summary of analytical derivation method

We will now make a table with the derivation equations to follow to design in either bilinear or impulse invariance. Note that the same steps are used in both designs except for step . This table make it easy to develop a program.

### 3 Numerical design examples

#### 3.1 Example 1

Sampling frequency , passband frequency , stopband frequency , with and

##### 3.1.2 bilinear method

Using the above design table, these are the numerical values:

#### 3.2 Example 2

Sampling frequency , passband corner frequency , stopband corner frequency , with criteria and

##### 3.2.2 Using bilinear

Mathematica GUI program is written to implement the above. It can be downloaded from here

Also a Matlab script nma_filter.m.txt was written (no GUI) to implement this design.

This script (written on Matlab 2007a). This script does not handle the conversion from H(s) to H(z) well yet, need to work more on this... ofcourse, one can just use Matlab butter() function for this.

Example output of the above Matlab script is matlab_output.txt

### 4 IIR design for minmum order filter

This is another small note on IIR design for minmum order filter.

This document describes how to design an IIR digital filter given a specification in which the filter order is specified.

Given the following digram, the specifications for the design will be

1. Digital filter order (N)
2. , the passband corner frequency (or the cutoff frequency) at . This means

#### 4.1 Impulse invariance method

We first convert analog specifications to digital specifications: , hence

Then the cutoff frequency for impulse invariance.

Next find the poles of Since the butterworth magnitude square of the transfer function is

Hence poles are found by setting the denominator of the above to zero

And as I did in the earlier document, the poles of  are found at

We only need to find the LHS poles, which are located at , because these are the stable poles. Hence the pole is

Now we can write the analog filter generated based on the above selected poles, which is, for impulse invariance

 (3)

is found by solving  hence

Now we need to write poles in non-polar form and plug them into (3)

Hence,

 (4)

Now that we have found we need to convert it to

We need to make sure that we multiply poles of complex conjugates with each others to make the result simple to see.

Now that we have , we do the conversion. I.e. obtain from the above . When using impulse invariance, we need to perform partial fraction decomposition on (4) above in order to write in this form

For example, to obtain , we write

Once we find all the , we now write as follows

This completes the design. We can try to convert the above form of to a rational expression as

#### 4.2 bilinear transformation method

We first convert analog specifications to digital specifications: , hence

Now

Now that we have and we find the poles of . Since for bilinear the magnitude square of the transfer function is

Hence poles are found by setting the denominator of the above to zero

Which leads to poles at . We only need to find the LHS poles, which are located at , because these are the stable poles. For bilinear, is given by

 (3)

is found by solving , hence we obtain

We see that the same expression results for for both cases.

Now we need to write poles in non-polar form and plug them into (3)

then

 (4)

Now that we have found we need to convert it to . After finding as shown above, we simply replace by . This is much simpler than the impulse invariance method. Before doing this substitution, make sure to multiply poles which are complex conjugate of each others in the denominator of . After this, then do the above substitution

### 5 References

1. Alan Oppenheim, Ronald Schafer, Digital Signal Processing,  Prentice-Hall, inc. 1975, Chapter 5.
2. Mostafa Shiva, Electrical engineering department, California state university, Fullerton, Lecture notes, handout H.
3. John Proakis, Dimitris Manolakis, digital signal processing, 3rd edition, section 8.3.