How Do You Solve a Difference Equation Using Z-Transforms?

zoom1
Messages
63
Reaction score
0

Homework Statement


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,…

Homework Equations


Z- transformation

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
 
Physics news on Phys.org
zoom1 said:

Homework Statement


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,…
Isn't u(k)=1 for k=0 too?

Homework Equations


Z- transformation

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
Try applying the definition of the z-transform to u(k+2).
 
vela said:
Isn't u(k)=1 for k=0 too?

Yes, it is. My mistake sorry.

vela said:
Try applying the definition of the z-transform to u(k+2).

I think it should be z2 [z/(z-1)] but I'm not sure
 
That's why I'm suggesting you apply the definition of the z-transform and derive the result.
 
vela said:
That's why I'm suggesting you apply the definition of the z-transform and derive the result.

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 ?
 
By "u", do you mean u(k) or u(k+2)?
 
vela said:
By "u", do you mean u(k) or u(k+2)?

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)
 
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.
 
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.
 
Back
Top