Suppose we begin with the simplest possible differential equation, that relating current and voltage in an inductor:

We assume that one of the quantities, say is provided by some source. We need to discretize this continuous time equation. First sample at regular intervals (in the simplest case), to obtain a sequence , and assume that we will be obtaining a voltage sequence from it. There are many ways of approximating the differentiation operator;

- set
. This yields the equation:

This is probably the simplest way of discretizing a derivative, and is called a

*backwards difference*. - a slightly more sophisticated discretization involves rewriting the equation for the inductor in the following way:

and thus

yielding the scheme:

- This is called the
*trapezoid rule*of numerical integration (or differentiation), and it can be seen as the basis for the WDF approach to filtering and numerical integration. - There are many other ways of performing this discretization;
in general we can imagine writing a general scheme:

which in some sense behaves like the original continuous time equation.

Download NumericalInt.pdf

Download NumericalInt_2up.pdf

Download NumericalInt_4up.pdf

Copyright ©

Center for Computer Research in Music and Acoustics (CCRMA), Stanford University

[Automatic-links disclaimer]