### Difference Equations (Finite Difference Schemes)

There are many methods for converting ODEs and PDEs to difference equations [53,55,481]. As will be discussed in §7.3, a very simple, order-preserving method is to replace each derivative with a finite difference:

 (2.2)

for sufficiently small (the sampling interval). This is formally known as the backward difference operation for approximating differentiation. We will discuss a variety of such methods in §7.3 and Appendix D.

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:

 (2.3)

with . In general, the driving force could depend on the current state of the system (e.g., if a spring and/or dashpot were introduced). In such a case, Eq.(1.3) may not be computable. (A delay-free loop could appear in the signal flow diagram.) Also, a finite force at time cannot produce an instantaneous velocity at time , so Eq.(1.3) is not physical'' in that sense, since depends on . To address both of these issues, we can instead use the forward difference approximation to the derivative:

 (2.4)

As , the forward and backward difference operators approach the same limit (since is presumed continuous). Using this we obtain what is called an explicit finite difference scheme:

 (2.5)

with .

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 [449]. Implicit schemes are generally solved using iterative and/or matrix-inverse methods, and they are typically used offline (not in real time) [555].

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 [555]. 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 [555].

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.

Next Section:
State Space Models
Previous Section:
PDEs