Linear Constant Coefficient Discrete Difference Equations
Introduction
This is a step-by-step guide for finding the impulse response for Linear Constant Coefficient Discrete Difference Equations (LCCDDE). Once you find the impulse response, you can find the response to any other input signal.
Basic First Difference
Let's start with a very simple case:
To find the impulse response $h[n]$ we want to solve:
where $$\delta[n]$$ is the discrete impulse, which is 1 when $$n=0$$ and 0 everywhere else. Assuming $$y[n]=0$$ for all $$n<0$$, we could make a table to see how the impulse response progresses:
As the pattern continues, it looks like we have:
or in other words:
General Homogeneous Solution
For LCCDDE problems, we can use a general homogeneous solution of $$y_h[n]=C\,\gamma^n$$, where $$\gamma$$ is some constant based on the coefficients. The impulse response for the basic first difference will generally be the same as the homogeneous response except for the $$h[0]=1$$ time. We can treat that more like an initial condition than a forcing function as follows:
To find the impulse response $$h[n]$$ we want to solve:
Substituting in $$h[n]=y_h[n]=C\,\gamma^n$$ for the $$n>0$$ equation gives:
For that second equation to work, we either need $$C=0$$ (trivial case), $$\gamma^n=0$$ impossible for all $$n$$ unless $$\gamma=0$$, or $$\gamma=-\frac{a_1}{a_0}$$.
To figure out $$C$$, we can look at the $$n=0$$ case: $$y_h[0] = C = \frac{1}{a_1}$$. Since $$h[n]=0$$ for $$n<0$$ we can put the homogeneous solution together with a step function to get:
From this point forward, we can use a technique that is very similar to using $$y_h(t)=C\,e^{st}$$ for differential equations; instead of getting a characteristic polynomial by replacing $$\frac{d^ky(t)}{dt^k}$$ with $$s^k$$, we will replace $$y[n-k]$$ with $$\gamma^{-k}$$. Instead of solving for $$s$$ as an exponent, we will solve for $$\gamma$$ as a geometric constant.
Example
Imagine you want to solve for the impulse response of
- Find $$\gamma$$ but replace all $$x[n]$$ with 0 and all $$y[n-k]$$ with $$\gamma^{-k}$$:
\(\begin{align*}3-2\gamma^{-1}&=0\\ \gamma&=\frac{2}{3}\end{align*}\) - Find $$C$$ by putting $$C\,\gamma^n\,u[n]$$ in for $$n=0$$ case:
\(\begin{align*}3\,C\,\left(\frac{2}{3}\right)^0\,u[0]-2\,C\,\left(\frac{2}{3}\right)^{-1}\,u[-1]&=1\\ 3\,C+0&=1\\ C&=\frac{1}{3}\end{align*}\) - $$h[n] =\frac{1}{3}\left(\frac{2}{3}\right)^n\,u[n]$$