Finding the frequency response of an IIR filter

AI Thread Summary
The discussion revolves around calculating the frequency response H(f) and the difference equation for an IIR filter with specified poles and zeros. Participants express confusion about how to derive H(z) from the given poles and zeros, particularly in handling complex components. They clarify that the transfer function can be expressed as H(z) = k[(z - (0.2 ± j0.7)) / (z - (0.7 ± j0.2))], leading to simplifications that eliminate the imaginary parts. The final steps involve determining the coefficient k using the DC gain and correctly formulating the difference equation, which participants refine through collaborative discussion. The conversation highlights the learning process and the importance of algebraic manipulation in filter design.
Evo8
Messages
168
Reaction score
0

Homework Statement



IIR filter with poles at .7±j0.2 and zeros at 0.2±j0.7

Calculate H(f) and the Differance Equation when the DC gain |H(f=0)|=4



The Attempt at a Solution



I know to find H(f) I can evaluate H(z) along the unit circle. so H(z) evaluated at z=exp(j2pifT)

However I am unsure how to find H(z) from the givens. I am not sure how to treat the poles and zeroes in this form. (imaginary?)

Any hints or help would be much appreciated it.

Thanks,
 
Physics news on Phys.org
Evo8 said:

Homework Statement



IIR filter with poles at .7±j0.2 and zeros at 0.2±j0.7

Calculate H(f) and the Differance Equation when the DC gain |H(f=0)|=4

The Attempt at a Solution



I know to find H(f) I can evaluate H(z) along the unit circle. so H(z) evaluated at z=exp(j2pifT)

However I am unsure how to find H(z) from the givens. I am not sure how to treat the poles and zeroes in this form. (imaginary?)

Any hints or help would be much appreciated it.

Thanks,

Happy new year, Evo8! :smile:Say you have a transfer function like H(z) = (z-a)(z-b) / (z-c).

What are its poles and zeroes?
 
Happy New year I Like Serena! Thanks for the wishes.

With the transfer function H(z) = (z-a)(z-b) / (z-c)

I think it would have one zero at z? For poles it would be just one at -c? I am not super confident on this answer though. I am looking in the section in my book about poles and zeroes but its not much help to me right now.

However I also have this equation... H(z) = k((z-z1)(z-z2))/((z-p1)(z-p2)). I am not sure about the coefficient k but from my notes its something to do with a gain at a frequency. I do have the given DC gain of |H(f=0)|=4

As always thanks for the help,
 
Evo8 said:
Happy New year I Like Serena! Thanks for the wishes.

With the transfer function H(z) = (z-a)(z-b) / (z-c)

I think it would have one zero at z? For poles it would be just one at -c? ,

This is 0/3 correct.

The numerator and denominator are polynomials with base z.

The roots of the polynomials (the z values when the polynomials are equal to zero) determine the poles and zeros.

The poles are the roots of the denominator (bottom) and the zeros are the roots of the numerator.
 
Evo8 said:
However I also have this equation... H(z) = k((z-z1)(z-z2))/((z-p1)(z-p2)). I am not sure about the coefficient k but from my notes its something to do with a gain at a frequency. I do have the given DC gain of |H(f=0)|=4

As always thanks for the help,

In this formula z1 is short for "zero 1" and p1 is short for "pole 1".

A zero of H(z) is a value of z for which H(z) takes on the value zero.
A pole of H(z) is a value of z for which H(z) is undefined (due to division by zero).
 
Ok the poles and zeros make a little more sense now.

So I would have one pole at c and two zeroes at a and b?
 
So If I were to apply my formula to the original question (hope I am not jumping the gun here)

I would get

H(z)=\frac{k[(z-0.2)(z-0.7)]}{(z-0.7)(z-0.2)}

Is this along the right lines by any chance?
 
Evo8 said:
Ok the poles and zeros make a little more sense now.

So I would have one pole at c and two zeroes at a and b?

Yes.


Evo8 said:
So If I were to apply my formula to the original question (hope I am not jumping the gun here)

I would get

H(z)=\frac{k[(z-0.2)(z-0.7)]}{(z-0.7)(z-0.2)}

Is this along the right lines by any chance?

It is along the right lines, but it is not right yet.
Your first zero is at z=0.2+j0.7.
What happened to j0.7?
 
Good point. The section that speak about this form shows part of an example and i didnt see the j so I guess I dropped it? Doesnt make sense to me though.

H(z)=\frac{k[(z-(0.2+j0.7))(z-(0.2-j0.7))]}{(z-(.7+j0.2))(z-(.7-j0.2))}

Is this how I should interpret it?
 
  • #10
Yep! :smile:

Btw, this can be simplified.
 
  • #11
]I figured it could be simplified but this is where i usually get royally screwed up.

So this is what I get using my TI-89. I don't see how to get this though.

H(z)=\frac{k(z^{2}-0.4z+0.53)}{z^{2}-1.4z+0.53)}

I this this works well but don't see how the j's really disappear? Are they canceling out because of the opposite signs? I have to look at it a bit closer I think.

On another note don't see how to find the coefficient k utilizing the given gain at frequency 0.

Im looking a little closer now...
 
  • #12
Evo8 said:
I figured it could be simplified but this is where i usually get royally screwed up.

So this is what I get using my TI-89. I don't see how to get this though.

H(z)=\frac{k(z^{2}-0.4z+0.53)}{z^{2}-1.4z+0.53)}

I this this works well but don't see how the j's really disappear? Are they canceling out because of the opposite signs? I have to look at it a bit closer I think.

Yes, they cancel due to the opposite signs.

Perhaps you could work it out algebraically and use that j2=-1.


Evo8 said:
On another note don't see how to find the coefficient k utilizing the given gain at frequency 0.

Im looking a little closer now...

You can find k by filling in |H(f=0)|=4 as you said before.
 
  • #13
Ok so upon closer inspection and some messing around with the numbers I see how the simplificaiton works. Pretty simple actually i guess I just had to write it out. Maybe one of these days I will just be able to see it like others do.

Anyway I am stuck now with my A(f). I have either exponentials or cosines and sins and some j's.

Now that I am looking at it again...I see in my exponential I have an f. In this problem f=0 so all of my exponentials are now 1 correct? This is if the f in the H(f) formula for exp(2pifT) equals the frequency 0.

So if this is the case it makes things much cleaner I get:

\frac{k(1.13)}{0.13}=4
Solving for k i get k=0.460177

If this isn't true then I have a mess of sines and cosines with some j's to deal with...

If it is what do I use this k for? just plug it back into the H(z) to get my transfer function?
 
  • #14
Aaaaaaaaand... we're done! Congratulations! :wink:
 
  • #15
I like Serena said:
Aaaaaaaaand... we're done! Congratulations! :wink:

Awesome! Thanks for the help! I am glad things kind of clicked after I played with the algebra a little bit. Its good for me to see that. I think you have a great teaching style. You don't give the answer away but ask questions and push in the right direction.

As for finding the difference equation. I think I have to multiply by \frac{z^{-2}}{z^{-2}} to get the function into negative powers of z?

Then I can see from inspection (if I've done it correctly) the following:

y(k)=1.4y(k-1)-0.53y(k-2)-0.184x(k-1)+0.244x(k-2)+0.46

Im not sure if I treated that 0.46 on the end correctly though.
 
  • #16
Evo8 said:
Awesome! Thanks for the help! I am glad things kind of clicked after I played with the algebra a little bit. Its good for me to see that. I think you have a great teaching style. You don't give the answer away but ask questions and push in the right direction.

I like hearing that. :blushing:


Evo8 said:
As for finding the difference equation. I think I have to multiply by \frac{z^{-2}}{z^{-2}} to get the function into negative powers of z?

Then I can see from inspection (if I've done it correctly) the following:

y(k)=1.4y(k-1)-0.53y(k-2)-0.184x(k-1)+0.244x(k-2)+0.46

Im not sure if I treated that 0.46 on the end correctly though.

Apparently everything clicked.
That's all proper and good.

Time to learn more!
 
  • #17
Is the time to learn more at the end of your post referring to my difference equation having an error? Or just in general to learn more?

As I mentioned I am still unsure if I treated the 0.46 at the end correctly. I just kind of tacked it on the end. I had an example that was somewhat similar in my book but there were a few small differences.

Thanks again for all of your help!
 
  • #18
Let's see...

Can you calculate the transfer function H(z) and the recursive relation for this block diagram?

attachment.php?attachmentid=42487&stc=1&d=1325798890.gif


Btw, that smiley is not part of the block diagram.
It's just to make the whole thing look less grumpy.
 

Attachments

  • transferfunction.gif
    transferfunction.gif
    12.1 KB · Views: 665
  • #19
If I were to calculate the difference equation from your flow diagram I would get what I had before. Maybe I would add an x to the 0.46 term.

y(k)=1.4y(k−1)−0.53y(k−2)−0.184x(k−1)+0.244x(k−2)+0.46x ?
 
  • #20
Yeah... that should be x(k), so:

y(k)=1.4y(k−1)−0.53y(k−2)−0.184x(k−1)+0.244x(k−2)+ 0.46x(k)
 
  • #21
Makes sense. I knew something was off with it. It makes sense though. Thank you so much for the help. I really appreciate it!
 

Similar threads

Back
Top