|

Spatial discretization reduced the cable equation, a partial
differential equation with derivatives in space and time, to a set of ordinary
differential equations with first order derivatives in time. Selection of an
integration method to solve these equations is guided by concerns of stability,
accuracy, and efficiency (Hines and Carnevale 1995).
NEURON offers the user a choice of two stable implicit integration methods:
backward Euler, and a variant of Crank-Nicholson (C-N). Backward Euler is the
default because of its robust numerical stability properties. Backward Euler
can be used with extremely large time steps in order to find the steady-state
solution for a linear ("passive") system. It produces good qualitative results
even with large time steps, and it works even if some or all of the equations
are strictly algebraic relations among states.
A method which is more accurate for small time steps is available by setting
the global parameter secondorder to 2. NEURON then uses a variant of
the C-N method, in which numerical error is proportional to
.
Both of these are implicit integration methods, in which all current balance
equations must be solved simultaneously. The backward Euler algorithm does not
resort to iteration to deal with nonlinearities, since its numerical error is
proportional to
anyway. The special feature of the C-N variant
is its use of a staggered time step algorithm to avoid iteration of nonlinear
equations (see 3.3.1 Efficiency). This converts the current
balance part of the problem to one that requires only the solution of
simultaneous linear equations.
Although the C-N method is formally stable, it is sometimes plagued by
spurious large amplitude oscillations (see Fig. 7 in Hines and Carnevale
(1995)). This occurs when
is too large, as may occur in models
that involve fast voltage clamps or that have compartments which are coupled by
very small resistances. However, C-N is safe in most situations, and it can be
much more efficient than backward Euler for a given accuracy.
These two methods are almost identical in terms of computational cost per time
step (see 3.3.1 Efficiency). Since the current balance equations
have the structure of a tree (there are no current loops), direct gaussian
elimination is optimal for their solution (Hines 1984). This takes exactly thesame number of computer operations as would be required for an unbranched cable
with the same number of compartments.
For any particular problem, the best way to determine which is the method of
choice is to compare both methods with several values of
to see
which allows the largest
consistent with the desired accuracy.
In performing such trials, one must remember that the stability properties of a
simulation depend on the entire system that is being modeled. Because
of interactions between the "biological" components and any "nonbiological"
elements, such as stimulators or voltage-clamps, the time constants of the
entire system may be different from those of the biological components alone.
A current source (perfect current clamp) does not affect stability because it
does not change the time constants. Any other signal source imposes a load on
the compartment to which it is attached, changing the time constants and
potentially requiring use of a smaller time step to avoid numerical
oscillations in the C-N method. The more closely a signal source approximates
a voltage source (perfect voltage clamp), the greater this effect will be.
|