Comments to common questions and mistakes
Important notice: users of DDE-BIFTOOL are
assumed to have a basic knowledge on bifurcation analysis
of dynamical systems and on the nature of delay equations.
The manual on the package does not replace the corresponding text books!
To avoid trivial questions and mistakes, users must read the
manual carefully and run the demo example(s)
before analyzing their own DDE systems.
Results obtained with DDE-BIFTOOL "contradict" to the ones obtained
with a time integration software (e.g., dde23, XPPAUT)
- The accuracy of results depends on the accuracy of the used numerical
method
and/or the software package. Usually, the accuracy is
determined by a default value of the minimal step size of the
discretization or by default values of certain tolerances. These default
values are available to users. To be sure that
the obtained result is correct, one has to decrease the default values
and redo the computations.
- It is practically impossible to obtain bifurcation points
(i.e. bifurcation
values of the model parameters) accurately using time integration.
In a neighborhood of a bifurcation point, jumps of the computed trajectory
to a "more" stable solution usually occur.
Furthermore, the result of time integration depends on the initial data,
the accuracy used and on the time of integration as well.
- With respect to stability of stationary solutions, DDE-BIFTOOL gives
two sets of the rightmost (dominant) characteristic roots:
(1) the computed roots and (2) their corrections
(by a Newton iteration on the associated characteristic matrix).
If you are in doubt, you can check whether the roots
satisfy the characteristic equation for your DDE system. Be sure that
the analytical derivatives, which you use in the characteristic equation,
are CORRECT.
"TIME_H warning: h_min is reached"
- Such warnings indicate that the time integration step required to obtain
good approximations to the requested rightmost characteristic roots is
too small. By default, characteristic roots are computed up to the roots
with real part greater than -1/(maximal delay), cf. p. 23,24 of the manual.
DDE-BIFTOOL gives two sets of the rightmost characteristic roots:
(1) the computed roots and (2) their corrections
(by a Newton iteration on the associated characteristic matrix).
If, in your case, the corrected dominant roots are close to the
corresponding computed roots (as in the first demo example, see the manual),
just accept this warning "as is", the corrected roots are correct,
no doubt.
- If the most dominant (the first few) roots were computed with a very
bad accuracy, i.e., their corrections were not computed
at all, or the corrected dominant roots are not close to the computed roots,
you can try the following. First, be sure that all analytical derivatives,
which you defined in sys_deri.m, are correct and that your system
is properly scaled (see below). Then, you can decrease the value of
the minimal time integration
step, say h, to obtain a better approximation to the rightmost
characteristic roots, as follows.
The default value of h is 0.01. Decrease h, e.g., by setting
h=0.005;
and define
method.stability.minimal_time_step=h;
in your running code, after the line
method=df_mthod('stst');
Note that the smaller h, the larger the size of the
required memory and the computational time.
If this procedure does not help and you are sure that there are no mistakes in
your files,
mail all
your system definition files (all "sys" files) and the code you run, so
that we can reproduce your results and try to help you.
System is not properly scaled
Be sure that the system parameters and unknowns are properly scaled, i.e.
the ratio of their maximal and minimal values is not too large.
Otherwise, you can encounter difficulties while computing stability
of stationary
and periodic solutions and branches of these solutions
via continuation. For example, avoid a situation where the values of
the system
unknowns are about 10000 and the free parameter (you compute a branch
of solutions w.r.t. this parameter) varies in the interval [0,1].
Problems due to differentiation of algebraic or integral
equations
When a model is described by a system of differential
equations coupled with algebraic or integral equations,
differentiation of the latter is used, by some researchers,
to analyze the obtained DDE system with DDE-BIFTOOL.
However, due to the differentiation, an
isolated solution of the original system is not an isolated solution
of the resulting DDE system. The algebraic (or integral) equations form
an invariant set
for the latter and they must be taken into account when analyzing
the obtained DDE system. For this, one has to program
the corresponding
(to the invariant set) algebraic conditions in the code sys_cond.m which
is specifically designed for algebraic conditions.
In case of stationary solutions, this can be done
analogously to the cases described in p. 52 of the manual. In case of
periodic solutions, one has to
program, in sys_cond.m, a collocation equation. This is a nontrivial
task and it is not recommended to users who are not familiar with
routines of the package. Note also that, due to the differentiation,
the characteristic equation and the monodromy operator for the DDE have extra
zero roots, respectively multipliers at 1, the number of which equals
to the number of the algebraic equations.
How to compute and plot stability along a branch of periodic solutions?
Analogously to the case of a branch of steady state solutions, explained
in p.21,22 of the manual, namely,
branch4=br_stabl(branch4,0,1);
[xm,ym]=df_measr(1,branch4);
figure(1);clf;
br_plot(branch4,xm,ym,'b');
Here branch4 is the computed branch of periodic solutions. Note that
computing stability of all periodic solutions along a branch
takes considerably more
computational time than in the case of stationary solutions. Look at the
meaning of the 2-nd and 3-rd input parameters of the code br_stabl.m.
You can decrease the cost by computing stability of some solutions only.
The first point along a branch
Note that the first point (only the first point!) along a branch
(branch1 here) is defined as
branch1.point=stst;
The definition
branch1.point(1)=stst;
works in older versions of Matlab and it does not work in the latest versions.
Comments to certain parts of the demo examples
- The line
branch1.parameter.min_bound(4,:)=[4 0];
in the first demo example has the following meaning.
Let the system under study has three delays (as in the first demo example).
As it is implemented in the package, the first (here three) "minimal bounds"
correspond to the delays (they are set to 0 by default).
The next "minimal bound", here the 4-th one,
is specified by the user for the free parameter.
The second "4" in the line indicates the number of the free parameter.
That is, these two "4" have different meaning.
Some recommendations
- When you compute (correct) steady state and periodic solutions, you
can use
format long e;
method.point.print_residual_info=1;
method.point.newton_max_iterations=10;
method.point.newton_nmon_iterations=3;
to be sure that the corrections
converge, i.e. that your computations are
correct. If there is no convergence (the residual values are increasing),
check your codes for a mistake.
- If "something" goes wrong, check whether all analytical derivatives,
which you defined in sys_deri.m code, are correct. For this, you can compare
the "output" of your sys_deri.m with the corresponding "output" of the
default routine df_deriv.m, where the derivatives are computed numerically,
by finite difference formulas, cf. p. 6,7 of the manual.
Note that, to avoid typing mistakes, it is not very important to define
second order analytical derivatives, you can use numerical derivatives
instead.
- In case you met a problem and (a) you checked all your system definition
files ("sys" files) for mistakes, (b) the above comments have not helped
you to solve the problem, then
mail us all
your system definition files and the code you run, so
that we can reproduce your results and try to help you.