NPB 163/PSC 128
Simulating differential equations
Discrete-time systems
and
to represent summation and differences over continuous time, which is infinitely
divisible.
by sampling at discrete points in time:
is the sampling interval and n is the sample number (an integer).
Thus,
represents a sample of
at time
. Note that the sampling interval
must be picked sufficiently small so as to capture the significant time-varying
structure in
, otherwise aliasing will result (this is what makes wagon wheels
and propellers look like they’re sometimes moving backwards in movies).
, this relationship becomes an equality (by definition).
. Re-expressing this as a discrete-time difference equation, we have
.
and set X to a fraction
of its previous value at each iteration. Note however that if we pick
too large, then the system will not decay to zero but rather explode to
. In this case, we must have
<1 since
.
and
. Note again though that in order for this simulation to work we must have
, and so
must be picked to be small relative to
.
then the next value of X is 90% of its current value plus 10% of
the current value of F. It is easy to show that this recursive computation
is equivalent to taking an expontentially decaying weighted sum of the present
and past values of F.
must be picked very small to obtain accurate simulations. A small
means that many iterations are required, which demands more time. More
efficient methods for simulating differential equations, such as the Runge-Kutta
method, achieve the same degree of accuracy with larger time steps and
hence fewer iterations.