Skip to main content

Difference Equation

Like continuous signal, there is a difference equation for discrete signal.

It's often in form of,

P(B)y[n]=x[n]P(\mathcal{B})y[n] = x[n]

However, in the signal analysis of continuous signals, we learnt that P(D)1P(D)^{-1} can be expanded into a infinite polynomial of DD, can when applied to certain functions, DD would result in zero, and thus we can truncate the polynomial. However, B\mathcal{B} doesn't have such property.

However, Δ\Delta has. Δ1=0\Delta 1 = 0. And better off, Δ=1B\Delta = 1 - \mathcal{B}, so we can always convert that equation into,

P(Δ)y[n]=x[n]P(\Delta)y[n] = x[n]

Eigen Decomposition

Similarly, we can decompose the solution into eigen solution and special solution, that is,

y[n]=y[n]+y[n]y[n] = \overline{y}[n] + y^*[n]

Eigen Solution

Where,

P(Δ)y[n]=0P(\Delta)\overline{y}[n] = 0

And,

P(Δ)y[n]=x[n]P(\Delta)y^*[n] = x[n]

We knew that, znz^n is the eigen function of Δ\Delta.

Thus, if we want P(Δ)x[n]=0P(\Delta)\overline{x}[n] = 0, we can decompose P(Δ)P(\Delta),

P(Δ)=i=1m(Δai)piP(\Delta) = \prod_{i=1}^{m} (\Delta - a_i)^{p_i}

Let's test,

(Δa)zn=(11za)zn=0(\Delta - a) z^n = (1 - \frac{1}{z} - a) z^n = 0

Which is to say,

(Δa)(\Delta - a)

Corresponds to the solution,

yi[n]=(11a)ny_i[n] = (\frac{1}{1-a})^n

For,

(Δa)p(\Delta - a)^p

We have,

(Δa)p(np1(11a)n)=(Δa)p1(Δa)(np1(11a)n)=(Δa)p1((1a)(p1)np2(11a)n)(\Delta - a)^p (n^{\underline{p - 1}} (\frac{1}{1-a})^n) \\ = (\Delta - a)^{p - 1} (\Delta - a) (n^{\underline{p - 1}} (\frac{1}{1-a})^n) \\ = (\Delta - a)^{p - 1} ((1-a)(p-1)n^{\underline{p-2}}(\frac{1}{1-a})^n)

That is to say,

np1(11a)nn^{\underline{p - 1}} (\frac{1}{1-a})^n

Yields λ(11a)n\lambda (\frac{1}{1-a})^n after (Δa)p(\Delta - a)^p. If we take into account that,

(Δa)pnq(11a)n=0q<p1(\Delta - a)^p n^{\underline{q}} (\frac{1}{1-a})^n = 0 \quad q < p - 1

So,

(Δa)p(\Delta - a)^p

Corresponds to the solution,

yi[n]=q=0q1Aiqnq(11a)n\overline{y_i}[n] = \sum_{q=0}^{q-1} A_{iq} n^{q} (\frac{1}{1-a})^n

We can remove the decrease factorial since every decrease factorial can be expressed into normal polynomials.

Special Solution

Just like what we did in the differential equation, a special solution is,

y[n]=P(Δ)1x[n]y^*[n] = P(\Delta)^{-1} x[n]

And P(Δ)1P(\Delta)^{-1} can be expanded into a infinite polynomial of Δ\Delta. It's usually hard to solve, but if x[n]x[n] is also a polynomial with highest degree nn, then we can truncate P(Δ)1P(\Delta)^{-1} and solve it.

Likewise, if x[n]x[n] had exponential terms, we can't do the truncate. But we had shifting theorem back then- and so it is now for the difference operator.

Because,

Δ(znx[n])=x[n]Δzn+zn1Δx[n]=x[n](11z)zn+1zznΔx[n]=zn(11z+1zΔ)x[n]\Delta (z^n x[n]) \\ = x[n] \Delta z^n + z^{n-1} \Delta x[n] \\ = x[n] (1 - \frac{1}{z}) z^n + \frac{1}{z} z^n \Delta x[n] \\ = z^n (1 - \frac{1}{z} + \frac{1}{z} \Delta) x[n]

So we have,

P(Δ)znx[n]=znP(11z+1zΔ)x[n]P(\Delta) z^n x[n] = z^n P(1 - \frac{1}{z} + \frac{1}{z} \Delta) x[n]

Example

8y[n]6y[n1]+y[n2]=n(12)n8y[n] - 6y[n - 1] + y[n - 2] = n (\frac{1}{2})^n

Can be converted using B=1Δ\mathcal{B} = 1 - \Delta

Δ2y+4Δy+3y=n(12)n\Delta^2 y + 4 \Delta y + 3y = n (\frac{1}{2})^n (Δ+3)(Δ+1)y=n(12)n(\Delta + 3)(\Delta + 1)y = n (\frac{1}{2})^n

The eigen solution is,

y[n]=A(14)n+B(12)n\overline{y}[n] = A (\frac{1}{4})^n + B (\frac{1}{2})^n

Then the special solution,

y[n]=1(Δ+3)(Δ+1)(n(12)n)=(12)n1(2Δ+2)(2Δ)n=14(12)n1(Δ+1)Δn=14(12)n(1Δ1Δ+1)n=14(12)n(12(n+1)2(1Δ)n)=14(12)n(12(n+1)2n+1)=18(12)n(n2+n2n+2)=18(12)n(n2n+2)y^*[n] = \frac{1}{(\Delta + 3)(\Delta + 1)} (n (\frac{1}{2})^n) \\ = (\frac{1}{2})^n \frac{1}{(2 \Delta + 2)(2 \Delta)}n \\ = \frac{1}{4} (\frac{1}{2})^n \frac{1}{(\Delta + 1)\Delta} n \\ = \frac{1}{4} (\frac{1}{2})^n (\frac{1}{\Delta} - \frac{1}{\Delta + 1}) n \\ = \frac{1}{4} (\frac{1}{2})^n (\frac{1}{2} (n + 1)^{\underline{2}} - (1 - \Delta) n) \\ = \frac{1}{4} (\frac{1}{2})^n (\frac{1}{2} (n+1)^{\underline{2}} - n + 1) \\ = \frac{1}{8} (\frac{1}{2})^n (n^2 + n - 2n + 2) \\ = \frac{1}{8} (\frac{1}{2})^n (n^2 - n + 2)

Thus we have the solution with two undecided constants based on initial conditions,

y[n]=18(12)n(n2n+2)+A(14)n+B(12)ny[n] = \frac{1}{8} (\frac{1}{2})^n (n^2 - n + 2) + A (\frac{1}{4})^n + B (\frac{1}{2})^n

Another Example

2y[n]y[n1]=u[n](19)n+δ[n]2y[n] - y[n - 1] = u[n] (\frac{1}{9})^n + \delta[n]

And be converted into,

(Δ+1)y[n]=u[n](19)n+δ[n](\Delta + 1)y[n] = u[n] (\frac{1}{9})^n + \delta[n]

Obviously,

y[n]=A(12)n\overline{y}[n] = A (\frac{1}{2})^n y[n]=1(Δ+1)(u[n](19)n+δ[n])y^*[n] = \frac{1}{(\Delta + 1)} (u[n] (\frac{1}{9})^n + \delta[n])

For the second term,

1Δ+1δ[n]=1211B2δ[n]=12k=0+(12)kBkδ[n]=12k=0+(12)kδ[nk]=12(12)nu[n]\frac{1}{\Delta + 1} \delta[n] \\ = \frac{1}{2} \frac{1}{1 - \frac{\mathcal{B}}{2}} \delta[n] \\ = \frac{1}{2} \sum_{k=0}^{+\infty} (\frac{1}{2})^k \mathcal{B}^k \delta[n] \\ = \frac{1}{2} \sum_{k=0}^{+\infty} (\frac{1}{2})^k \delta[n - k] \\ = \frac{1}{2} (\frac{1}{2})^n u[n]

For the first term,

1(Δ+1)(u[n](19)n)=(19)n19Δ+8u[n]=(19)n18u[n]\frac{1}{(\Delta + 1)} (u[n] (\frac{1}{9})^n) \\ = (\frac{1}{9})^n \frac{1}{9\Delta + 8} u[n] \\ = (\frac{1}{9})^n \frac{1}{8} u[n]

Thus,

y[n]=(18(19)n+12(12)n)u[n]y^*[n] = (\frac{1}{8}(\frac{1}{9})^n + \frac{1}{2} (\frac{1}{2})^n)u[n]