There are many methods for converting ODEs and PDEs to difference equations [53,55,483]. As will be discussed in §7.3, a very simple, order-preserving method is to replace each derivative with a finite difference:
As a simple example, consider a mass driven along a frictionless surface by a driving force , as in Fig.1.1, and suppose we wish to know the resulting velocity of the mass , assuming it starts out with position and velocity 0 at time 0 (i.e., ). Then, from Newton's relation, the ODE is
and the difference equation resulting from the backward-difference substitution is
Solving for yields the following finite difference scheme:
A finite difference scheme is said to be explicit when it can be computed forward in time in terms of quantities from previous time steps, as in this example. Thus, an explicit finite difference scheme can be implemented in real time as a causal digital filter.
There are also implicit finite-difference schemes which may correspond to non-causal digital filters . Implicit schemes are generally solved using iterative and/or matrix-inverse methods, and they are typically used offline (not in real time) .
There is also an interesting class of explicit schemes called semi-implicit finite-difference schemes which are obtained from an implicit scheme by imposing a fixed upper limit on the number of iterations in, say, Newton's method for iterative solution . Thus, any implicit scheme that can be quickly solved by iterative methods can be converted to an explicit scheme for real-time usage. One technique for improving the iterative convergence rate is to work at a very high sampling rate, and initialize the iteration for each sample at the solution for the previous sample .
In this book, we will be concerned almost exclusively with explicit linear finite-difference schemes, i.e., causal digital filter models of one sort or another. That is, the main thrust is to obtain as much ``physical modeling power'' as possible from ordinary digital filters and delay lines. We will also be able to easily add memoryless nonlinearities where needed (such as implemented by table look-ups and short polynomial evaluations) as a direct result of the physical meaning of the signal samples.