Next  |  Prev  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Difference Equation to State Space Form

A digital filter is often specified by its difference equation (Direct Form I). Second-order example:

$\displaystyle y(n) = u(n) + 2u(n-1) + 3u(n-2) - \frac{1}{2}y(n-1) - \frac{1}{3}y(n-2)
$

Every $ n$ th order difference equation can be reformulated as a first order vector difference equation called the ``state space'' (or ``state variable'') representation:

\begin{eqnarray*}
\underline{x}(n+1) & = & \mathbf{A}\, \underline{x}(n) + \mathbf{B}\, u(n) \nonumber \\
y(n) & = & \mathbf{C}\, \underline{x}(n) + \mathbf{D}\, u(n)
\end{eqnarray*}

For the above example, we have, as we'll show,

\begin{eqnarray*}
\mathbf{A}&\isdef & \left[\begin{array}{cc} -\frac{1}{2} & -\frac{1}{3} \\ [2pt] 1 & 0 \end{array}\right] \quad \hbox{(state transition matrix)}\\
\mathbf{B}&\isdef & \left[\begin{array}{c} 1 \\ [2pt] 0 \end{array}\right] \quad \hbox{(matrix routing input to state variables)}\\
\mathbf{C}&\isdef & \left[\begin{array}{c} 3/2 \\ [2pt] 8/3 \end{array}\right] \quad \hbox{(output linear-combination matrix)}\\
\mathbf{D}&\isdef & 1 \quad \hbox{(direct feedforward coefficient)}
\end{eqnarray*}



Subsections
Next  |  Prev  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Download StateSpace.pdf
Download StateSpace_2up.pdf
Download StateSpace_4up.pdf

``Introduction to State Space Models'', by Julius O. Smith III, (From Lecture Overheads, Music 420).
Copyright © 2019-02-05 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA  [Automatic-links disclaimer]