State Space Filter Realization Example Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search


State Space Filter Realization Example

The digital filter having difference equation

$\displaystyle y(n) = u(n-1) + u(n-2) + 0.5\, y(n-1) - 0.1\, y(n-2) + 0.01\, y(n-3)
$

can be realized in state-space form as follows:6.11
$\displaystyle \left[\begin{array}{c} x_1(n+1) \\ [2pt] x_2(n+1) \\ [2pt] x_3(n+1)\end{array}\right]$ $\displaystyle =$ $\displaystyle \left[\begin{array}{ccc}
0 & 1 & 0\\ [2pt]
0 & 0 & 1\\ [2pt]
0.01...
...\right] +
\left[\begin{array}{c} 0 \\ [2pt] 0 \\ [2pt] 1\end{array}\right] u(n)$  
$\displaystyle \underline{y}(n)$ $\displaystyle =$ $\displaystyle \left[\begin{array}{ccc} 0 & 1 & 1\end{array}\right]
\left[\begin{array}{c} x_1(n) \\ [2pt] x_2(n) \\ [2pt] x_3(n)\end{array}\right]
\protect$ (6.13)

Thus, $ {\underline{x}}(n) = [x_1(n), x_2(n), x_3(n)]^T$ is the vector of state variables at time $ n$, $ B = [0,0,1]^T$ is the state-input gain vector, $ C = [0,1,1]$ is the vector of state-gains for the output, and the direct-path gain is $ D=0$.

This example is repeated using matlab in §E.7.8 (after we have covered transfer functions).

A general procedure for converting any difference equation to state-space form is described in §E.7. The particular state-space model shown in Eq. (5.13) happens to be called controllable canonical form, for reasons discussed in Appendix E. The set of all state-space realizations of this filter is given by exploring the set of all similarity transformations applied to any particular realization, such as the control-canonical form in Eq. (5.13). Similarity transformations are discussed in §E.8, and in books on linear algebra [58].

Note that the state-space model replaces an $ N$th-order difference equation by a vector first-order difference equation. This provides elegant simplifications in the theory and analysis of digital filters. For example, consider the case $ B=C=I$, and $ D=0$, so that Eq. (5.12) reduces to

$\displaystyle \underline{y}(n+1) = A \underline{y}(n) + \underline{u}(n), \protect$ (6.14)

where $ A$ is the $ N\times N$ transition matrix, and both $ \underline{u}(n)$ and $ \underline{y}(n)$ are $ N\times 1$ signal vectors. (This filter has $ N$ inputs and $ N$ outputs.) This vector first-order difference equation is analogous to the following scalar first-order difference equation:

$\displaystyle y(n+1) = a y(n) + u(n)
$

The response of this filter to its initial state $ y(0)$ is given by

$\displaystyle y(n) = a^n y(0), \quad n=0,1,2,3,\ldots\,.
$

(This is the zero-input response of the filter, i.e., $ u(n)\equiv 0$.) Similarly, setting $ \underline{u}(n)=0$ to in Eq. (5.14) yields

$\displaystyle \underline{y}(n) = A^n \underline{y}(0), \quad n=0,1,2,3,\ldots\,.
$

Thus, an $ N$th-order digital filter ``looks like'' a first-order digital filter when cast in state-space form.


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

[How to cite this work] [Order a printed hardcopy]

``Introduction to Digital Filters with Audio Applications'', by Julius O. Smith III, (August 2006 Edition).
Copyright © 2007-02-02 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA  [Automatic-links disclaimer]