1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Difference equation solution

  1. May 3, 2015 #1
    1. The problem statement, all variables and given/known data
    Given the following difference equation;
    x(k+2)-x(k+1)+0.25x(k)=u(k+2)

    where

    x(0)=1; x(1)=2; u(k)= 1 for k=1,2,3,…

    2. Relevant equations
    Z- transformation

    3. The attempt at a solution

    To be able to solve this difference equation, I think I need to transform it into z domain then after some manipulations I need to convert it back to discrete time signal.

    Here's my attemp

    z2 X(z) - z2 X(0) - zX(1) - [zX(z) - zX(0) ] + 0.25X(z) = z2 [z/(z-1)]

    u(k+2) is the step input. Transformation of step is z/(z-1). However, I'm not sure about the transformation of u(k+2)

    Even if it is z2 [z/(z-1)], I couldn't proceed further with the equation I obtained.

    I would appreciate any help
     
  2. jcsd
  3. May 3, 2015 #2

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Isn't u(k)=1 for k=0 too?

    Try applying the definition of the z-transform to u(k+2).
     
  4. May 3, 2015 #3
    Yes, it is. My mistake sorry.

    I think it should be z2 [z/(z-1)] but I'm not sure
     
  5. May 3, 2015 #4

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    That's why I'm suggesting you apply the definition of the z-transform and derive the result.
     
  6. May 3, 2015 #5
    If u is equal to 1 for every k values, it is a step function and then z/(z-1) should be the z-transform. Am I correct ?
     
  7. May 3, 2015 #6

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    By "u", do you mean u(k) or u(k+2)?
     
  8. May 3, 2015 #7
    Actually that's the point confusing me. u(k+2) is there in the equation. However, When I start plugging values for k, starting from 0, I will always get 1. So, I would treat u(k+2) as step function and take its inverse z transform as z/(z-1)
     
  9. May 3, 2015 #8

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    That's right. You have
    $$\sum_{k=0}^\infty u(k+2)z^{-k} = \sum_{k=0}^\infty z^{-k}.$$ Because you're using the unilateral z-transform, the shift ends up having no effect on the righthand side.
     
  10. May 7, 2015 #9

    rude man

    User Avatar
    Homework Helper
    Gold Member

    You may or may not be aware that there is also a "classical" way to solve finite-difference equations, analogous to the classical (non-transform) way to solve ODE's.
    However, I would stick with the z transform.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted