Difference Equations
This page is very much a work in progress on showing how to find impulse responses of systems modeled with difference equations.
For second order difference equations with real-valued coefficients, there are three different possible forms of the homogeneous solution (and thus the impulse response) depending on the nature of the solutions of the characteristic polynomial:
where $ |\gamma| $ is the magnitude of the solution to the characteristic polynomial and $ \angle \gamma $ is the angle it makes with the positive real axis. There will also be a step function involved depending on the relative most-shifted versions of the input and output.
For the last case, it is often easier to get $ K_1 $ and $ K_2 $ using initial conditions and then relate them to the first form of the solution with:
For instance, imagine something like $ y[n]-y[n-1]+1.69y[n-2]=x[n] $. The characteristic equation is $ \gamma^2-\gamma+1.69=0 $ which has roots of $ \gamma=0.5\pm 1.2j $. The magnitude of the root is $ |\gamma|=1.3 $ and the angle (picking the + version of the imaginary part) is $ \angle\gamma=\mbox{arctan(1.2/0.5)}=1.176 $. This means the form of the impulse response would be: