Mathematics    

DDE Solver

This section describes:

The DDE Solver

The function dde23 solves initial value problems for delay differential equations (DDEs) with constant delays. It integrates a system of first-order differential equations

on the interval , with and given history for .

dde23 produces a solution that is continuous on . You can use the function deval and the output of dde23 to evaluate the solution at specific points on the interval of integration.

dde23 tracks discontinuities and integrates the differential equations with the explicit Runge-Kutta (2,3) pair and interpolant used by ode23. The Runge-Kutta formulas are implicit for step sizes longer than the delays. When the solution is smooth enough that steps this big are justified, the implicit formulas are evaluated by a predictor-corrector iteration.

DDE Solver Basic Syntax

The basic syntax of the DDE solver is

ddefun

A function that evaluates the right side of the differential equations. The function must have the form

  • dydt = ddefun(t,y,Z)
    

where the scalar t is the independent variable, the column vector y is the dependent variable, and Z(:,j) is for = lags(j).

lags
A vector of constant positive delays .
history
Function of that evaluates the solution for . The function must be of the form
  • S = history(t)
    
where S is a column vector. Alternatively, if is constant, you can specify history as this constant vector.
If the current call to dde23 continues a previous integration to t0, use the solution sol from that call as the history.
tspan
The interval of integration as a two-element vector [t0,tf] with t0 < tf.

The output argument sol is a structure created by the solver. It has fields:

sol.x
Nodes of the mesh selected by dde23
sol.y
Approximation to at the mesh points of sol.x
sol.yp
Approximation to at the mesh points of sol.x
sol.solver
'dde23'

To evaluate the numerical solution at any point from [t0,tf], use deval with the output structure sol as its input.

Additional DDE Solver Arguments

For more advanced applications, you can also specify as input arguments solver options and additional parameters.

options
Structure of optional parameters that change the default integration properties. This is the fifth input argument.
  • sol = dde23(ddefun,lags,history,tspan,options)
    
Creating and Maintaining a DDE Options Structure tells you how to create the structure and describes the properties you can specify.
p1,p2...
Parameters that the solver passes to ddefun and the history function, and all functions specified in options.
  • sol = dde23(ddefun,lags,history,tspan,
                options,p1,p2...)
    
The solver passes any input parameters that follow the options argument to the functions every time it calls them. Use options = [] as a placeholder if you set no options. In the ddefun argument list, parameters follow the other arguments.
  • dydt = ddefun(t,y,Z,p1,p2,...)
    

Similarly, if history is a function, then

  •  S = history(t,p1,p2,...).
    


  Introduction to Initial Value DDE Problems Solving DDE Problems