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

The Finite Difference Approximation

In the musical acoustics literature, the normal method for creating a computational model from a differential equation is to apply the so-called finite difference approximation (FDA) in which differentiation is replaced by a finite difference (see Appendix D) [483,314]. For example

$\displaystyle {\dot y}(t,x)\approx \frac{y(t,x)-y(t-T,x)}{T} \protect$ (C.2)


$\displaystyle y'(t,x)\approx \frac{y(t,x)-y(t,x-X)}{X} \protect$ (C.3)

where $ T$ is the time sampling interval to be used in the simulation, and $ X$ is a spatial sampling interval. These approximations can be seen as arising directly from the definitions of the partial derivatives with respect to $ t$ and $ x$ . The approximations become exact in the limit as $ T$ and $ X$ approach zero. To avoid a delay error, the second-order finite-differences are defined with a compensating time shift:

$\displaystyle {\ddot y}(t,x) \approx \frac{y(t+T,x) - 2 y(t,x) + y(t-T,x) }{T^2} \protect$ (C.4)

$\displaystyle y''(t,x) \approx \frac{y(t,x+X) - 2 y(t,x) + y(t,x-X) }{X^2} \protect$ (C.5)

The odd-order derivative approximations suffer a half-sample delay error while all even order cases can be compensated as above.

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 © 2015-05-22 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University