Z-Transforms - Impulse response

Discussion in 'Math' started by naickej4, Jul 8, 2016.

  1. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hi All,
    I started studying Z-transforms this week and was not sure about the below question.

    Question
    Work out the first 4 coefficients of the impulse response of the discrete time filter, which is characterized by a zero at +1 and a pole at -0.5 using only the power-series method.


    I have attempted to work out the solution but I am not certain about my answer and the initial Z transform function that is used. Please can someone check my answer and method of working.

    thank you all.

    upload_2016-7-8_7-54-19.png
     
  2. MrAl

    Well-Known Member

    Jun 17, 2014
    2,438
    492
    Hi,

    I checked the first two coefficients and they are correct, but did not check the last two of the four. But here we have another way to check the results...

    This ties in with your other Z transform question also, in that you can check this one and the previous one (with the more complicated expression) in the same manner.

    For this one at hand, first find the difference equation as you did in the previous question elsewhere in this forum. Then, using this sequence:
    x={0,0,0,0,1,0,0,0,0,0,0,0}
    for k=1 to N, where x[1]=1 there
    (that sequence is just x with a single '1' for k=1 and multiple zeros to make it work ok with terms like xn[k-3] )

    compute the first four results and compare to the coefficients of the long division. They should be the same if you did everything right.

    As to the other question in the other part of the forum, you can do the long division for that expression and test the same way, maybe calculate the first 6 values using both methods, then compare.
     
  3. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hi Sir, thank you very much. Let me now try the other way like you mentioned in the other question. I will most my findings if I do come right. This is what I wanted to know different ways to do the example and so check the example. Thanks a stack.
     
  4. MrAl

    Well-Known Member

    Jun 17, 2014
    2,438
    492

    Hi again,

    You're welcome.

    The results i got for more coeff's was:
    1/1*z^0
    -3/2*z^-1
    +3/4*z^-2
    -3/8*z^-3
    +3/16*z^-4
    -3/32*z^-5
    +3/64*z^-6
    -3/128*z^-7
    +3/256*z^-8
    -3/512*z^-9
    +3/1024*z^-10
    -3/2048*z^-11
    +3/4096*z^-12
    -3/8192*z^-13
    +3/16384*z^-14
    -3/32768*z^-15
    +3/65536*z^-16
    -3/131072*z^-17
    +3/262144*z^-18
    -3/524288*z^-19

    and as you can see this follows the rule:
    1*z^0, for {n=0}
    (3*(-1)^n)/(2^n*z^n), for {n from 1 to infinity}

    so each coeff is half of the previous and opposite in sign,
    and the discrete plot looks like this (although points in between integer values are not valid):

    DiscretePlot-01.gif

    We can do a transform on this and look at an equivalent in the continuous time domain, but im going to have to leave that for another time. One view is that it might look like the discrete wave highly 'smoothed out'.
     
    Last edited: Jul 10, 2016
    naickej4 likes this.
  5. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hi Sir, Thank you very much.
    So this mean for the denominator or Pole. I can not write it as (2z+1)?
    Do I have to write the denominator as (z+ 0.5) ?
    Since your answers follows the correct pattern and you used (z+0.5)

    Thank you.
     
    Last edited: Jul 11, 2016
  6. MrAl

    Well-Known Member

    Jun 17, 2014
    2,438
    492
    Hi,

    Oh yes i forgot to comment about that part.

    In any equation with N/D if you multiply D by m then you must multiply N by m also.
    So for general N/D we cant do this:
    N/D=N/(D*m)

    right?

    To maintain top and bottom equality we have to do this:
    N/D=(N*m)/(D*m)

    If we only do:
    N/D=N/(D*m)

    then all results will be divided by m.

    In your case you used m=2, so all of your results are 1/2 of what they should be.

    So you can use D=2*z+1 if you like, but then you must also multiply the numerator N times 2 also so if we start with:
    (z+1)/(z-1/2)

    and multiplying both top and bottom by 2 we get:
    (2*z+2)/(2*z-1)

    Try that and see what you get :)
     
  7. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hi Sir, you are really a life saver. Thank you very much for your help and time. I really appreciate it. Sir ,while i was studying( as we speak) I across something called recursive method or equations is it possible to test my answer using those recursive equations?
    Thank you.
     
  8. MrAl

    Well-Known Member

    Jun 17, 2014
    2,438
    492
    Hi,

    Well the recursive relation is just something like y[n+1]=y[n]/2
    which just means that once you have y[2] you can calculate as many coefficients as you want by just using that relationship, except for the first which is just 1.

    However, if you found another recursive type relationship in a book somewhere you can post it here and we can take a look. That may be a different solution. Also note that i gave a generator function of the coefficients in a previous post here in this thread.
     
  9. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hi Sir,
    Here is a pic from the Z transforms stuff that I am currently studying from.

    thanks.

    upload_2016-7-12_7-57-46.png
     
  10. MrAl

    Well-Known Member

    Jun 17, 2014
    2,438
    492
    Hello again,

    Ok good. It looks like they formed a recursive relationship from a breakdown of the long division form. Isolating the coefficients that way makes a nice little neat and tidy form.

    However, when applying that form and when making an example i think they messed up. If the following is what threw you then you may be able to get the result after this.

    The first and most obvious problem is that it looks like they swapped all the a's with all the b's in that formula with all the b's over all the a's. In the form shown:
    X(z)=(b0+b1*z^-1...)/(a0+a1*z^-1...)
    it looks like they swapped the a's and b's.
    Putting them back we get:
    X(z)=(a0+a1*z^-1...)/(b0+b1*z^-1...)
    and now all the calculations match the example, and the result they got looks correct in as far as they calculated it. So the top and bottom of that X(z) was swapped.
    What book was this from?

    To get the present example equation into the proper form however we have to first divide the top and bottom by z^2. Then the a's and b's can be plucked directly from the numerator and denominator, and use them in the recursion relationship they use. The results should match what they show.

    Another slight problem which may be insignificant here because they only calculated 2 points, is that their choice of estimate for 1/sqrt(2) was very poor. They chose to use 0.7071 and double that leads to 1.4142, and that enters into their expanded expression. The problem is that when we estimate an equation we like to maintain the same type of equation, and by making this number 1.4142 LESS than the actual square root of 2 then we cant use 0.5 for the next coeff on the bottom because that leads to a sequence that has a sinusoidal component, which the original equation did not have. So they estimated the sqrt(2) too low, and then used 1/sqrt(2)^2 for the next coeff which makes it look like they estimated one part and used the true result for the other, which leads to a different kind of function. To remedy this all they had to do was use 0.7072 which leads to 1.4144 which then allows the function to be just a falling exponential rather than a damped sinusoidal.
    Not a huge point for this example, but in a real life example that could easily make for a system that does not work right at all :)

    So if you like, try to replicate the example they gave.

    I have also read that the direct evaluation of the contour integral gets too complicated too fast even for small examples, so we probably should not bother with that. That is probably why you are being introduced to this method and others like this. You get results pretty quick like this.
     
    naickej4 likes this.
  11. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hi Sir, thanks once again for the detailed explanation.
    I will try to do it and lets see what I come up with.

    The name of the book were I found this, is called Digital Signal Processing a practical approach. (1st Edition)

    thank you.
     
  12. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hi Sir, Sorry to trouble you again.
    I was wondering also why some recursive equations they swapped the A and B around.
    But we should arrive at the same answer?

    thanks.
     
  13. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hi Sir, A quick question.

    Why is x(0) = 0
    where do they get the a0 and b0 values?
    Why is not a0 =1 and b0 =1 since they are the first terms?
    Thank you
     
  14. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hi Sir, I understand now, b0 =1 and a0 =0 so x(0) = 0

    my bad,
    thanks.
     
  15. MrAl

    Well-Known Member

    Jun 17, 2014
    2,438
    492
    Hi,

    Yes, you have to divide top and bottom by z^2 to get the equation into the right form for plucking the a's and b's out when needed.
    Glad you found it :)
     
  16. naickej4

    Thread Starter Member

    Jul 12, 2015
    182
    2
    Hi Sir,
    Thanks I attempted the question and was successful.

    thank you
     
Loading...