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

FDTD State Space Model

Let $ \underline{x}_K(n)$ denote the FDTD state for one of the two subgrids at time $ n$ , as defined by Eq.$ \,$ (E.10). The other subgrid is handled identically and will not be considered explicitly. In fact, the other subgrid can be dropped altogether to obtain a half-rate, staggered grid scheme [55,148]. However, boundary conditions and input signals will couple the subgrids, in general. To land on the same subgrid after a state update, it is necessary to advance time by two samples instead of one. The state-space model for one subgrid of the FDTD model of the ideal string may then be written as

$\displaystyle \underline{x}_K(n+2)$ $\displaystyle =$ $\displaystyle \mathbf{A}_K\, \underline{x}_K(n) + \mathbf{B}_K\, \underline{u}(n+2)$  
$\displaystyle \underline{y}(n)$ $\displaystyle =$ $\displaystyle \mathbf{C}_K\, \underline{x}_K(n).
\protect$ (E.24)

To avoid the issue of boundary conditions for now, we will continue working with the infinitely long string. As a result, the state vector $ \underline{x}_K(n)$ denotes a point in a space of countably infinite dimensionality. A proper treatment of this case would be in terms of operator theory [328]. However, matrix notation is also clear and will be used below. Boundary conditions are taken up in §E.4.3.

When there is a general input signal vector $ \underline{u}(n)$ , it is necessary to augment the input matrix $ \mathbf{B}_K$ to accomodate contributions over both time steps. This is because inputs to positions $ m\pm1$ at time $ n+1$ affect position $ m$ at time $ n+2$ . Henceforth, we assume $ \mathbf{B}_K$ and $ \underline{u}$ have been augmented in this way. Thus, if there are $ q$ input signals $ \underline{\upsilon}(n)\isdeftext [\upsilon _i(n)]$ , $ i=1,\ldots,q$ , driving the full string state through weights $ \underline{\beta}_m\isdeftext [\beta_{m,i}]$ , $ m\in{\bf Z}$ , the vector $ \underline{u}(n)=$ is of dimension $ 2q\times 1$ :

\begin{displaymath}
\underline{u}(n+2) =
\left[\!
\begin{array}{c}
\underline{\upsilon}(n+2)\\
\underline{\upsilon}(n+1)
\end{array}\!\right]
\end{displaymath}

When there is only one physical input, as is typically assumed for plucked, struck, and bowed strings, then $ q=1$ and $ \underline{u}$ is $ 2\times 1$ . The matrix $ \mathbf{B}_K$ weights these inputs before they are added to the state vector for time $ n+2$ , and its entries are derived in terms of the $ \beta_{m,i}$ coefficients below.

$ \mathbf{C}_K$ forms the output signal as an arbitrary linear combination of states. To obtain the usual displacement output for the subgrid, $ \mathbf{C}_K$ is the matrix formed from the identity matrix by deleting every other row, thereby retaining all displacement samples at time $ n$ and discarding all displacement samples at time $ n-1$ in the state vector $ \underline{x}_K(n)$ :

\begin{displaymath}
\underbrace{\left[\!
\begin{array}{c}
\vdots \\
y_{n,m-2} \\
y_{n,m} \\
y_{n,m+2} \\
y_{n,m+4}\\
\vdots
\end{array}\!\right]}_{\underline{y}(n)}
\!=\!
\underbrace{\left[\!
\begin{array}{ccccccccccc}
& \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots\\
\cdots & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & \cdots\\
\cdots & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & \cdots\\
\cdots & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & \cdots\\
\cdots & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & \cdots\\
& \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots
\end{array}\!\right]}_{\mathbf{C}_K}
\underbrace{\left[\!
\begin{array}{c}
\vdots \\
y_{n,m-2} \\
y_{n-1,m-1} \\
y_{n,m} \\
y_{n-1,m+1} \\
y_{n,m+2} \\
y_{n-1,m+3} \\
y_{n,m+4}\\
\vdots
\end{array}\!\right]}_{\underline{x}_K(n)}
\end{displaymath}

The state transition matrix $ \mathbf{A}_K$ may be obtained by first performing a one-step time update,

$\displaystyle y_{n+2,m} = y_{n+1,m-1}+y_{n+1,m+1}-y_{n,m}+\underline{\beta}_m^T \underline{\upsilon}(n+2),
$

and then expanding the two $ n+1$ terms in terms of the state at time $ n$ :
$\displaystyle y_{n+1,m-1}$ $\displaystyle =$ $\displaystyle y_{n,m-2}+y_{n,m}-y_{n-1,m-1}+\underline{\beta}_{m-1}^T\underline{\upsilon}(n+1)$  
$\displaystyle y_{n+1,m+1}$ $\displaystyle =$ $\displaystyle y_{n,m}+y_{n,m+2}-y_{n-1,m+1}+\underline{\beta}_{m+1}^T\underline{\upsilon}(n+1)$  
    $\displaystyle \protect$ (E.25)

The intra-grid state update for even $ m$ is then given by
$\displaystyle {y_{n+2,m}}$
  $\displaystyle =$ $\displaystyle y_{n,m-2} - y_{n-1,m-1} + y_{n,m} - y_{n-1,m+1} + y_{n,m+2}$  
    $\displaystyle \quad +\; \underline{\beta}_m^T \underline{\upsilon}(n+2) + (\underline{\beta}_{m-1}+\underline{\beta}_{m+1})^T\underline{\upsilon}(n+1)$  
  $\displaystyle =$ \begin{displaymath}\begin{array}{c}
\left[1, -1, 1, -1, 1\right]\\
\vspace{0.5in}
\end{array}\left[\!
\begin{array}{l}
y_{n,m-2}\\
y_{n-1,m-1}\\
y_{n,m}\\
y_{n-1,m+1}\\
y_{n,m+2}\\
y_{n-1,m+3}\\
\end{array}\!\right]\end{displaymath}  
    \begin{displaymath}+ \left[\underline{\beta}_m^T \quad (\underline{\beta}_{m-1}+\underline{\beta}_{m+1})^T \right]
\left[\!
\begin{array}{l}
\underline{\upsilon}(n+2)\\
\underline{\upsilon}(n+1)
\end{array}\!\right].
\protect\end{displaymath} (E.26)

For odd $ m$ , the update in Eq.$ \,$ (E.25) is used. Thus, every other row of $ \mathbf{A}_K$ , for time $ n+2$ , consists of the vector $ [1,-1,1,-1,1]$ preceded and followed by zeros. Successive rows for time $ n+2$ are shifted right two places. The rows for time $ n+1$ consist of the vector $ [1,-1,1]$ aligned similarly:

\begin{displaymath}
\underbrace{\left[\!
\begin{array}{l}
\qquad\vdots\\
y_{n+1,m-1}\\
y_{n+2,m}\\
y_{n+1,m+1}\\
y_{n+2,m+2}\\
\qquad\vdots
\end{array}\!\right]}_{\underline{x}_K(n+2)}
\!\leftarrow\!
\underbrace{\left[\!
\begin{array}{rrrrrrrrrrr}
& \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \\
\cdots & 1 & -1 & 1 & 0 & 0 & 0 & 0 & \cdots\\
\cdots & 1 & -1 & 1 & -1 & 1 & 0 & 0 & \cdots\\
\cdots & 0 & 0 & 1 & -1 & 1 & 0 & 0 & \cdots\\
\cdots & 0 & 0 & 1 & -1 & 1 & -1 & 1 & \cdots\\
& \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots
\end{array}\!\right]}_{\mathbf{A}_K}
\!
\underbrace{\left[\!
\begin{array}{l}
\qquad\vdots\\
y_{n,m-2}\\
y_{n-1,m-1}\\
y_{n,m}\\
y_{n-1,m+1}\\
y_{n,m+2}\\
y_{n-1,m+3}\\
\qquad\vdots
\end{array}\!\right]}_{\underline{x}_K(n)}
\end{displaymath}

From Eq.$ \,$ (E.26) we also see that the input matrix $ \mathbf{B}_K$ is given as defined in the following expression:

\begin{displaymath}
\underbrace{\left[\!
\begin{array}{l}
\qquad\vdots\\
y_{n+1,m-1}\\
y_{n+2,m}\\
y_{n+1,m+1}\\
y_{n+2,m+2}\\
y_{n+1,m+3}\\
y_{n+2,m+4}\\
y_{n+1,m+5}\\
\qquad\vdots
\end{array}\!\right]}_{\underline{x}_K(n+2)}
\leftarrow
\underbrace{\left[\!
\begin{array}{cc}
\vdots & \vdots \\
0 & \underline{\beta}_{m-1}^T \\ [5pt]
\underline{\beta}_m^T & \quad \underline{\beta}_{m-1}^T + \underline{\beta}_{m+1}^T \\ [5pt]
0 & \underline{\beta}_{m+1}^T \\ [5pt]
\underline{\beta}_{m+2}^T & \underline{\beta}_{m+1}^T + \underline{\beta}_{m+3}^T \\ [5pt]
0 & \underline{\beta}_{m+3}^T \\ [5pt]
\underline{\beta}_{m+4}^T & \underline{\beta}_{m+3}^T + \underline{\beta}_{m+5}^T \\ [5pt]
0 & \underline{\beta}_{m+5}^T \\ [5pt]
\vdots & \vdots
\end{array}\!\right]}_{\mathbf{B}_K}
\underbrace{\left[\!
\begin{array}{c}
\underline{\upsilon}(n+2)\\
\underline{\upsilon}(n+1)
\end{array}\!\right]}_{\underline{u}(n+2)}.
\end{displaymath}


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

[How to cite this work]  [Order a printed hardcopy]  [Comment on this page via email]

``Physical Audio Signal Processing'', by Julius O. Smith III, W3K Publishing, 2010, ISBN 978-0-9745607-2-4.
Copyright © 2014-06-11 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA