Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Finding the frequency response of an IIR filter

  1. Jan 3, 2012 #1
    1. The problem statement, all variables and given/known data

    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

    3. 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. Im not sure how to treat the poles and zeroes in this form. (imaginary?)

    Any hints or help would be much appreciated it.

  2. jcsd
  3. Jan 3, 2012 #2

    I like Serena

    User Avatar
    Homework Helper

    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?
  4. Jan 4, 2012 #3
    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? Im not super confident on this answer though. Im 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)). Im 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,
  5. Jan 4, 2012 #4
    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.
  6. Jan 5, 2012 #5

    I like Serena

    User Avatar
    Homework Helper

    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).
  7. Jan 5, 2012 #6
    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?
  8. Jan 5, 2012 #7
    So If I were to apply my formula to the original question (hope Im not jumping the gun here)

    I would get

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

    Is this along the right lines by any chance?
  9. Jan 5, 2012 #8

    I like Serena

    User Avatar
    Homework Helper


    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?
  10. Jan 5, 2012 #9
    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.

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

    Is this how I should interpret it?
  11. Jan 5, 2012 #10

    I like Serena

    User Avatar
    Homework Helper

    Yep! :smile:

    Btw, this can be simplified.
  12. Jan 5, 2012 #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 dont see how to get this though.

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

    I this this works well but dont 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 dont see how to find the coefficient k utilizing the given gain at frequency 0.

    Im looking a little closer now...
  13. Jan 5, 2012 #12

    I like Serena

    User Avatar
    Homework Helper

    Yes, they cancel due to the opposite signs.

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

    You can find k by filling in |H(f=0)|=4 as you said before.
  14. Jan 5, 2012 #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 Im stuck now with my A(f). I have either exponentials or cosines and sins and some j's.

    Now that im 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:

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

    If this isnt 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 in to the H(z) to get my transfer function?
  15. Jan 5, 2012 #14

    I like Serena

    User Avatar
    Homework Helper

    Aaaaaaaaand... we're done! Congratulations! :wink:
  16. Jan 5, 2012 #15
    Awesome! Thanks for the help! Im 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 dont 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 [itex]\frac{z^{-2}}{z^{-2}}[/itex] to get the function into negative powers of z?

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


    Im not sure if I treated that 0.46 on the end correctly though.
  17. Jan 5, 2012 #16

    I like Serena

    User Avatar
    Homework Helper

    I like hearing that. :blushing:

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

    Time to learn more!
  18. Jan 5, 2012 #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 im 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!
  19. Jan 5, 2012 #18

    I like Serena

    User Avatar
    Homework Helper

    Let's see...

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


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

    Attached Files:

  20. Jan 5, 2012 #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 ?
  21. Jan 5, 2012 #20

    I like Serena

    User Avatar
    Homework Helper

    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)
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook