# Thread: Find Equation of Sequence with Z-transform

1. ## Find Equation of Sequence with Z-transform

I have the following sequence: $\displaystyle a_{n+1}=a_n i - p$ where i and p are constants. I need to find an equation for the sequence that is independent of the previous elements except $\displaystyle a_0$.

The Z-transform gives: $\displaystyle Z^{-1}A - Z^{-1}a_0=iA - \frac{p}{1-Z^{-1}}$ or $\displaystyle A = \frac{p}{i}\frac{1}{(1-Z^{-1})(1-i^{-1}Z^{-1})} - \frac{a_0}{i}\frac{Z^{-1}}{1-i^{-1}Z^{-1}}$.

Doing partial fractions yields: $\displaystyle A = \frac{p}{i-1}\frac{1}{1 - Z^{-1}} - \frac{p}{i(i-1)}\frac{1}{1 - i^{-1}Z^{-1}} - \frac{a_0}{i}\frac{Z^{-1}}{1-i^{-1}Z^{-1}}$

Now when I take the reverse Z-transform with $\displaystyle \frac{1}{1-i^{-1}Z^{-1}} \rightarrow i^{-n}$ gives me the wrong answer. If I substitute $\displaystyle \frac{1}{1-i^{-1}Z^{-1}} \rightarrow i^{n}$ instead, I get the correct answer. Any ideas what I've done wrongly?

P.S.
I thought I had made a mistake and it should be $\displaystyle i$ instead of $\displaystyle i^{-1}$, but I double checked everything and cannot find any mistakes. That would suggest I've probably made a mistake in the Z-transform.

2. ## Re: Find Equation of Sequence with Z-transform

It's been a long time since I played with Z transforms but the formula you started with appears incorrect.

I have that the advance theorem shows

$\displaystyle a_{n+1}\to zA[z]-za_0$

not

$\displaystyle a_{n+1}\to z^{-1}A[z]-z^{-1}a_0$ as you have listed.

3. ## Re: Find Equation of Sequence with Z-transform

were you able to solve this? I worked it through and your approach works if you correct that small error.

one small note. Don't use $\displaystyle i$ as a constant unless it's an iterator. It's just too easily mistaken for sqrt{-1}

4. ## Re: Find Equation of Sequence with Z-transform

Yes, it worked out. $\displaystyle i\in \mathbb{R}$ is just a constant. In engineering we generally use $\displaystyle j^2 = -1$ so that is why I used $\displaystyle i$.

5. ## Re: Find Equation of Sequence with Z-transform

yeah, don't use j either :P