# Digital IIR filters

• June 25th 2008, 05:18 AM
RyanW
Digital IIR filters
I need to design a number of digital IIR filters based upon transfer functions given in the s-domain. I have applied the bilinear transform to give the transfer functions in the Z-domain, however I need to expand and simplify the equations to place them in the form below:

Attachment 6961

Once the equations are in the above form I can get the IIR filter coefficients and implement them into my filters, however I'm not quite sure how to go about it. Would anybody like to take a crack for me?

The three equations are as follows;

An example is given below;

Attachment 6965

Any help would be very much appreciated!
• June 25th 2008, 05:56 AM
Isomorphism
Well it only involves expanding like this: $(1 \pm z^{-1})^2 = 1 + z^{-2} \pm 2z^{-1}$

Then you have to group coefficients with a common degree. I will work out the second one as an example:

Lets write $x = \frac{\omega_4 ^2}{\omega_3}, y = \frac{\omega_4}{Q_4}, w = \omega_4 ^2$ for ease of typing.

Now,

$H(z) = \dfrac{\dfrac{2x(1 - z^{-1}) + w (1 + z^{-1})}{1 + z^{-1}}}{\dfrac{4(1 - z^{-1})^2 + 2y(1 - z^{-1})(1 + z^{-1}) + w (1 + z^{-1})^2}{(1 + z^{-1})^2}}$

$H(z) = \dfrac{2x(1 - z^{-1})(1 + z^{-1}) + w (1 + z^{-1})^2}{4(1 - z^{-1})^2 + 2y(1 - z^{-1})(1 + z^{-1}) + w (1 + z^{-1})^2}$

$H(z) = \dfrac{2x(1 - z^{-2})+ w (1 + z^{-1})^2}{4(1 - z^{-1})^2 + 2y(1 - z^{-1})(1 + z^{-1}) + w (1 + z^{-1})^2}$

Now use $(1 \pm z^{-1})^2 = 1 + z^{-2} \pm 2z^{-1}$ to expand.

$H(z) = \dfrac{2x(1 - z^{-2})+ w(1 + z^{-2} + 2z^{-1})}{4(1 + z^{-2} - 2z^{-1}) + 2y(1 - z^{-2})+ w (1 + z^{-2} + 2z^{-1})}$

Group terms with common powers...

$H(z) = \dfrac{(w - 2x)z^{-2} + (2w)z^{-1} + (w + 2x)}{(4 - 2y + w) z^{-2} +(2w - 8)z^{-1} + (w + 2y +4)}$

Thus comparing it with your first image:

$b_2 = w - 2x, b_1 = 2w, b_0 = w + 2x, a_2 = w -2y + 4,a_1 = 2w - 8, a_0 = w + 2y +4$

So substitute back $x = \frac{\omega_4 ^2}{\omega_3}, y = \frac{\omega_4}{Q_4}, w = \omega_4 ^2$ and get the final answer...
• June 26th 2008, 12:01 AM
RyanW
Hi,

Thanks for that.

Things are a little clearer now, however I'm still a little bit unsure about what you did.
Is there any way you could break it down a little more?

Sorry, maths really isn't a strong point of mine (which is why I'm here).

Cheers!
• June 26th 2008, 02:39 AM
Isomorphism
Quote:

Originally Posted by RyanW
Hi,

Thanks for that.

Things are a little clearer now, however I'm still a little bit unsure about what you did.
Is there any way you could break it down a little more?

Sorry, maths really isn't a strong point of mine (which is why I'm here).

Cheers!

Well I think I am not sure what is it that you do not understand. Tell me the step that you dont understand and I will explain...
• June 26th 2008, 02:54 AM
RyanW
To be honest, the only part which I really get is the substitution at the end.
The rest I can sort of follow when its written in front of me, however I'm not confident I could come up with the same answer by myself, and I really need to be sure of my answers to make sure the filters are doing exactly what I want.
• June 26th 2008, 09:07 PM
CaptainBlack
Quote:

Originally Posted by RyanW
To be honest, the only part which I really get is the substitution at the end.
The rest I can sort of follow when its written in front of me, however I'm not confident I could come up with the same answer by myself, and I really need to be sure of my answers to make sure the filters are doing exactly what I want.

Unless this is course/home work get a computer algebra system (Maxima is opensource and free) and use the rational simplification tools on these expressions.

RonL
• June 26th 2008, 10:41 PM
RyanW
Quote:

Originally Posted by CaptainBlack
Unless this is course/home work get a computer algebra system (Maxima is opensource and free) and use the rational simplification tools on these expressions.

RonL

No its not course/home work, its work related, however obviously not something I do every day. I'll give Maxima a try and see how it goes.
Thanks for the tip!
• June 27th 2008, 03:47 AM
RyanW
Ok, I tried Maxima, and its just confused me further! (Doh)
When I try and simlify it seems to give huge answers which don't really resemble what I need. Any tips?
• June 27th 2008, 04:20 AM
CaptainBlack
Quote:

Originally Posted by RyanW
Ok, I tried Maxima, and its just confused me further! (Doh)
When I try and simlify it seems to give huge answers which don't really resemble what I need. Any tips?

The attachment is a Maxima session (you will need to divide top and bottom through by $z^2$ to finnish.

(the radscan function is accessible using the simplify (r) button, the ordinary simplify will also do the job)

RonL
• June 30th 2008, 07:04 AM
RyanW
Thanks for your help so far, however, I'm still not getting the correct answer when I input the example.