A delay can be approximated by using a finite-dimensional system of differential equations. This command provides the ability to automatically generate such an approximation from a differential delay equation.
The delay2ode command generates a new vector field file from an existing file that contains delays. The new vector field will be a system of ordinary differential equations in which the delays have been replaced by finite dimensional approximations.
Background.
Suppose
y1(t + δ/N) | = | x(t) |
y2(t + δ/N) | = | y1(t) |
. | ||
. | ||
. | ||
yN(t + δ/N) | = | yN-1(t) |
When p=1, we obtain
When p=2, we obtain
y1,k' | = | y2,k |
y2,k' | = | (2N/δ)(-y2,k + (N/δ)(y1,k-1 - y1,k)) |
y1,k' | = | y2,k |
y2,k' | = | y3,k |
y3,k' | = | (3N/δ) (-y3,k - (2N/δ)(y2,k - (N/δ)(y1,k-1 - y1,k))) |
p |
Order of the approximation. As explained above, this is the order
of the Taylor series retained in the approximation of a ``small'' delay.
Only p=1, p=2, and p=3 are allowed.
Default: p=1 |
N |
Number of grid points in the approximation to the delayed
expression in the delay interval.
Default: N=10 |
We consider the equation
We create a delayed copy of x(t) by defining an expression with the formula delay(x,h) Here is the vector field file simpledelay.vf. We create a new vector field with the command
We can now apply VFGEN to this new vector field to create a solver. The following commands create and compile a solver written in C that uses the GSL library. (See the GSL section for more information about using the GSL command of VFGEN.)
The Mackey-Glass equation is
We create a new vector field with the command
The following commands create and compile a solver for this approximation to the delay equation.
(Another example in which the delay2ode command is used to approximate the Mackey-Glass equation with a finite dimensional system is given in the VFGEN auto command documentation.)