Lesson 9

Difference-Equation Models

LTI discrete-time systems are usually modeled by linear difference equations with constant coefficients. For example, a digital filter is modeled by a difference equation.

An example of a difference equation is:

\begin{displaymath}y[n] = x[n] + x[n-1] + x[n-2]. \end{displaymath}

A general $N$th order $(N \ge M)$ linear difference equation with constant coefficients (LCCDE) is:

\begin{displaymath}a_0 y[n] + a_1 y[n-1] + \dots + a_{N-1} y[n-N+1] + a_N y[n-N] = \end{displaymath}

\begin{displaymath}b_0 x[n] + b_1 x[n-1] + \dots + b_{M-1} x[n-M+1] +b_Mx[n-M] \end{displaymath}

which we can write as:

\begin{displaymath}\sum_{k=0}^{N}a_k y[n-k] = \sum_{k=0}^M b_k x[n-k]\end{displaymath}

where $a_k$ and $b_k$ are real constants.



An important case to be familiar with is the first-order system

\begin{displaymath}y[n] = a y[n-1] + bx[n] \end{displaymath}


in which the output is a function of a delay of only one time unit.


The Classical method for the solution is to express the output $y[n]$ as the sum of complementary or natural ($y_c[n]$) and particular or forced ($y_p[n]$) solutions:

\begin{displaymath}y[n] = y_c[n] + y_p[n] \end{displaymath}

Natural response

The natural response is the solution to the homogeneous equation:

\begin{displaymath}\sum_{k=0}^N a_k y[n-k] = 0\end{displaymath}

where $a_0 \ne 0$.

We assume solutions of the form $y_c[n] = C z^n$.



We can see that:

\begin{displaymath}y_c[n] = Cz^n,
y_c[n-1] = Cz^{n-1} = C z^{-1} z^n, \dots\end{displaymath}


\begin{displaymath}y_c[n-N] = Cz^{n-N} = Cz^{-N}z^n \end{displaymath}

and substituting in the homogeneous equation yields:

\begin{displaymath}(a_0 z^N + a_1 z^{N-1} + \dots + a_{N-1} z + a_N)C z^{-N}z^n = 0\end{displaymath}

and we get the characteristic equation:

\begin{displaymath}a_0 z^N + a_1 z^{N-1} + \dots + a_{N-1} z + a_N =
a_0 (z-z_1) (z-z_2) \dots (z-z_N) = 0.\end{displaymath}

Clearly, $N$ values of $z$ satisfy this equation.

The solution is of the form:


\begin{displaymath}y_c[n] = C_1 z_1^n + C_2 z_2^n + \dots + C_N z_N^n \end{displaymath}

assuming there are no repeated roots (which is all we will cover).

\fbox{Ex.} Given a first-order difference equation

\begin{displaymath}y[n]+ .2 y[n-1] = x[n] \end{displaymath}

find its homogeneous solution. Your answer should be in terms of a constant $C$.

Forced response

The forced response $y_p[n]$ solves the equation

\begin{displaymath}\sum_{k=0}^{N}a_k y_p[n-k] = \sum_{k=0}^M b_k x[n-k].\end{displaymath}

The form of the solution is determined by the input $x[n]$. For an exponential input $x[n] = A a^n$, the solution would be $y_p[n] = P a^n$ where $A, a,$ and $P$ are constants.

\fbox{Ex.} For the previous example, given an input $x[n] = 9 (.7)^n$, find the particular solution $y_p[n]$.


\fbox{Ex.} Now, assuming that the system is initially at rest, i.e., initial conditions of 0 ($y[0]=0$), solve for the constant $C$ in your overall solution $y[n] = y_c[n] + y_p[n]$.

.

\fbox{Ex.} Given

\begin{displaymath}y[n] - .3y[n-1] = x[n]\end{displaymath}

with $y[-1]=0$ and $x[n] = (.6)^n$, find $y[n]$.