Manual Mat Con Taug 2019
Manual Mat Con Taug 2019
Manual Mat Con Taug 2019
Utrecht University
The Netherlands
Belgium
The Netherlands
Contents
1 Introduction 5
1.1 Survey of functionalities supported by MatCOnt . . . . . . . . . . . . . . . 6
1.2 Testruns and how to start with Cl MatCont . . . . . . . . . . . . . . . . . 8
1.3 Computational routines in MatCont . . . . . . . . . . . . . . . . . . . . . . 11
1.4 Availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.5 Software requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.6 Disclaimer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2
4 The odefile of a dynamical system 33
4.1 Structure and construction of an odefile . . . . . . . . . . . . . . . . . . . . . 33
4.2 Handling auxiliary functions in the construction of the odefile . . . . . . . . . 38
4.3 Access to function and Jacobian values . . . . . . . . . . . . . . . . . . . . . . 38
4.4 Time integration using the odefile . . . . . . . . . . . . . . . . . . . . . . . . . 39
6 Equilibrium continuation 46
6.1 Mathematical definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
6.2 Initialization by time integration . . . . . . . . . . . . . . . . . . . . . . . . . 46
6.3 Bifurcations and their normal form coefficients . . . . . . . . . . . . . . . . . 46
6.3.1 Branch point locator . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.4 Equilibrium initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6.5 Bratu example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3
8.3 Period Doubling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
8.3.1 Mathematical definition . . . . . . . . . . . . . . . . . . . . . . . . . . 78
8.3.2 Output of a continuation of period doubling bifurcation points . . . . 79
8.3.3 Bifurcations along a flip curve . . . . . . . . . . . . . . . . . . . . . . . 79
8.3.4 Period doubling initialization . . . . . . . . . . . . . . . . . . . . . . . 80
8.3.5 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
8.4 Continuation of fold bifurcation of limit cycles . . . . . . . . . . . . . . . . . 82
8.4.1 Mathematical definition . . . . . . . . . . . . . . . . . . . . . . . . . . 82
8.4.2 Bifurcations along a fold of cycles curve . . . . . . . . . . . . . . . . . 83
8.4.3 Fold of cycles initialization . . . . . . . . . . . . . . . . . . . . . . . . 84
8.4.4 Example: the fast Morris-Lecar equations . . . . . . . . . . . . . . . . 85
8.5 Continuation of torus bifurcation of limit cycles . . . . . . . . . . . . . . . . . 89
8.5.1 Mathematical definition . . . . . . . . . . . . . . . . . . . . . . . . . . 89
8.5.2 Bifurcations along a Neimark-Sacker curve . . . . . . . . . . . . . . . 90
8.5.3 Torus bifurcation initialization . . . . . . . . . . . . . . . . . . . . . . 92
8.5.4 Example: an autonomous electronic circuit . . . . . . . . . . . . . . . 92
4
1 Introduction
The aim of MatCont is to provide a numerical tool for the study of parameterized dynamical
systems, in particular bifurcation studies. The first MatCont - related work was done in the
master theses [35] and [32]. The package was first announced in [10] and [11]. The present
(2019) GUI was described in [34].
The present manual on MatCont is based on version 7.1 of MatCont and the runs were
tested on Matlab[27] version 9.5 (R2018b). It is meant to be a practical guide for MatCont
users without undue discussion of the details of the used algorithms. Parts of this manual
can be used as tutorials since many explicit command line runs are discussed which are also
available in the directory Testruns of MatCont, see §1.2. There are separate tutorials for
the GUI version of MatCont.
MatCont is a GUI-matlab package that builds upon a collection of routines which
can also be used independently from the command line of matlab; we refer to this use as
the command-line package CL MatCont. The aim of MatCont and CL MatCont is to
provide a continuation and bifurcation toolbox which is compatible with the standard matlab
ODE representation of differential equations. The user can easily use his/her models without
rewriting them to a specific package. The matlab programming language makes the use and
extensions of the toolbox relatively easy.
This document is structured as follows. In Chapter 2 the underlying mathematics of
continuation is treated. Section 2.4 introduces how singularities (usually, but not necessarily,
bifurcations) are handled. The toolbox specification in Chapter 3 describes the general aspects
of numerically continuing a curve in MatCont, format of the output data etcetera.
In Chapter 4 the odefile of a dynamical system is introduced. It is the handle through
which MatCont accesses the dynamical system that is being studied. The user can also
access the dynamical system directly by calling the odefile from the Matlab command line.
Chapter 5 provides more details on time integration and, more specifically, on the computation
of Poincaré sections.
The first continuation application of the toolbox, namely the initialization and continua-
tion of equilibria, with the detection of bifurcations and the computation of their normal form
coefficients, is given in Chapter 6. Chapter 7 describes the initialization and continuation of
limit cycles with the detection of bifurcations and their normal form coefficients. A special
feature is the computation of the phase response curve and its derivative.
Chapter 8 describes the continuation of codim 1 bifurcations, i.e. limit points of equilibria,
Hopf bifurcation points of equilibria, period doubling bifurcation points of limit cycles, fold
bifurcation points of limit cycles and Neimark-Sacker bifurcation points of limit cycles. Their
bifurcations are detected and normal form coefficients are computed.
Chapter 9 describes the continuation of two codim 2 bifurcations, namely branch points
of equilibria and branch points of limit cycles.
Chapter 10 deals (rather briefly) with the initialization and continuation of homoclinic
and heteroclinic orbits.
The continuation routines can also be used outside the field of parameterized dynamical
systems. We provide two examples in the appendices. A simple example of drawing a ge-
ometric curve is given in Appendix A. The continuation of a solution to a boundary value
problem in a free parameter is described in Appendix B.
5
1.1 Survey of functionalities supported by MatCOnt
Upon the development of MatCont and CL MatCont, there were multiple objectives:
• Cover as many bifurcations in ODEs as possible (all standard bifurcations with two
control parameters are now covered).
• Allow easier data exchange between programs and with matlab’s standard ODE solvers.
• Implement robust and efficient numerical methods for all computations, using minimally
extended systems where possible.
• Represent results in a form suitable for standard control, identification, and visualiza-
tion.
codim O
0 EP LC
1 LP H LPC NS PD
Figure 1: The graph of adjacency for equilibrium and limit cycle bifurcations in MatCont
6
Table 1: Supported functionalities for ODEs in auto (a), content (c) and MatCont (m).
a c m
time-integration + +
Poincaré maps +
monitoring user functions along curves computed
by continuation + + +
continuation of equilibria + + +
detection of branch points and
codim 1 bifurcations (limit and Hopf points) of equilibria + + +
computation of normal forms
for codim 1 bifurcations of equilibria + +
continuation of codim 1 bifurcations of equilibria + + +
detection of codim 2 equilibrium bifurcations
(cusp, Bogdanov-Takens, fold-Hopf,
generalized and double Hopf) + +
computation of normal forms
for codim 2 bifurcations of equilibria +
continuation of codim 2 equilibrium bifurcations
in three parameters +
continuation of limit cycles + + +
computation of phase response curves and
their derivatives +
detection of branch points and
codim 1 bifurcations (limit points, flip and
Neimark-Sacker (torus)) of cycles + + +
continuation of codim 1 bifurcations of cycles + +
branch switching at equilibrium and cycle bifurcations + + +
continuation of branch points
of equilibria and cycles +
computation of normal forms for
codim 1 bifurcations of cycles +
detection of codim 2 bifurcations of cycles +
computation of normal forms for
codim 2 bifurcations of cycles +
continuation of orbits homoclinic to equilibria + +
continuation of orbits heteroclinic to equilibria + +
7
codim
0 LC
1 HHS HSN
Figure 2: The graph of adjacency for homoclinic bifurcations in MatCont; here * stands for
S or U.
The same interpretation applies to the arrows in Figure 2, where ‘*’ stands for either S
or U, depending on whether a stable or an unstable invariant manifold is involved.
In principle, the graphs presented in Figures 1 and 2 are connected. Indeed, it is known
that curves of codim 1 homoclinic bifurcations emanate from the BT, ZH, and HH codim 2
points. The current version of MatCont fully supports, however, only one such connection:
BT → HHS.
• testmymlPRC.m, discussed in §6.2 and §7.8 (finding a stable equilibrium by time inte-
gration, continuation of equilibria, detecting a Hopf point, starting a continuation of
limit cycles, computing the phase response curve and its derivative).
8
Type of object Label
Point P
Orbit O
Equilibrium EP
Limit cycle LC
Limit Point (fold) bifurcation LP
Hopf bifurcation H
Limit Point bifurcation of cycles LPC
Neimark-Sacker (torus) bifurcation NS
Period Doubling (flip) bifurcation PD
Branch Point BP
Cusp bifurcation CP
Bogdanov-Takens bifurcation BT
Zero-Hopf bifurcation ZH
Double Hopf bifurcation HH
Generalized Hopf (Bautin) bifurcation GH
Branch Point of Cycles BPC
Cusp bifurcation of Cycles CPC
1:1 Resonance R1
1:2 Resonance R2
1:3 Resonance R3
1:4 Resonance R4
Chenciner (generalized Neimark-Sacker) bifurcation CH
Fold–Neimark-Sacker bifurcation LPNS
Flip–Neimark-Sacker bifurcation PDNS
Fold-flip LPPD
Double Neimark-Sacker NSNS
Generalized Period Doubling GPD
Table 2: Equilibrium- and cycle-related objects and their labels within the GUI
9
Type of object Label
Limit cycle LC
Homoclinic to Hyperbolic Saddle HHS
Homoclinic to Saddle-Node HSN
Neutral saddle NSS
Neutral saddle-focus NSF
Neutral Bi-Focus NFF
Shilnikov-Hopf SH
Double Real Stable leading eigenvalue DRS
Double Real Unstable leading eigenvalue DRU
Neutrally-Divergent saddle-focus (Stable) NDS
Neutrally-Divergent saddle-focus (Unstable) NDU
Three Leading eigenvalues (Stable) TLS
Three Leading eigenvalues (Unstable) TLU
Orbit-Flip with respect to the Stable manifold OFS
Orbit-Flip with respect to the Unstable manifold OFU
Inclination-Flip with respect to the Stable manifold IFS
Inclination-Flip with respect to the Unstable manifold IFU
Non-Central Homoclinic to saddle-node NCH
Table 3: Objects related to homoclinics to equilibria and their labels within the GUI
• testadapt1.m, discussed in §7.7 (starting a curve of limit cycles from a Hopf point,
continuation of limit cycles, detection of fold and period doubling point of cycles)
10
• cstr1.m, cstr2 and cstr3, discussed in §9.1.4 (continuation of equilibria, detection of
LP points, continuation of an LP curve, detection of branch points with respect to two
different parameters, continuation of a BP curve with three free parameters)
• Some consist of a single initialization routine which can be very simple, e.g. init H EP
(starting an equilibrium curve from a Hopf point) or more complicated, e.g. init BT Hom
(starting a curve a homoclinic orbits from a Bogdanov-Takens point). We mention in
particular the quite useful initializers init LC Hom and init LC HSN in §10.3 to start
homoclinic orbits to saddle or to saddle node from a limit cycle with a long period.
• Two of the most useful initializers rely on the use of the integrator routines to find
either equilibrium points (usually stable, see §6.2) or limit cycles (usually stable, see
§7.4).
11
• Some initializers require a specific procedure, namely these for orbits homoclinic to
saddle, orbits homoclinic to saddle node and heteroclinic orbits, cf. §10.3. These have
their own dedicated directories in MatCont, cf §3.7.
1.4 Availability
This package is freely available for download at:
http://www.sourceforge.net/
Search for ’matcont’ and then preferably go to the latest release in the directory ’matcont’.
Unzipping the downloaded file creates a directory matcont with all necessary files (see section
3.7). Download also the readme.pdf file which contains information about the release such
as where to find tutorials and the manual.
1.6 Disclaimer
The packages MatCont and CL MatCont are freely available for non-commercial use on
an “as is” basis. In no circumstances can the authors be held liable for any deficiency,
fault or other mishappening with regard to the use or performance of MatCont and/or
CL MatCont.
For the best understanding of dynamical systems and bifurcation theory we refer to [25].
12
2 Mathematical aspects of numerical continuation and han-
dling of singularities
Consider a smooth function F : Rn+1 → Rn . We want to compute a solution curve of the
equation F (x) = 0. Numerical continuation is a technique to compute a consecutive sequence
of points which approximate the desired branch. Most continuation algorithms implement a
predictor-corrector method. The idea behind this method is to generate a sequence of points
xi , i = 1, 2, . . . along the curve, satisfying a chosen tolerance criterion: ||F (xi )|| ≤ ǫ for some
ǫ > 0 and an additional accuracy condition ||δxi || ≤ ǫ′ where ǫ′ > 0 and δxi is the last Newton
correction.
To show how the points are generated, suppose we have found a point xi on the curve.
Also suppose we have a normalized tangent vector vi at xi , i.e. Fx (xi )vi = 0, hvi , vi i = 1.
The computation of the next point xi+1 consists of 2 steps:
• prediction of a new point
2.1 Prediction
Suppose h > 0 which will represent a stepsize. A commonly used predictor is tangent predic-
tion:
X 0 = xi + hvi . (1)
The choice of the stepsize is discussed in section 2.3.
2.2 Correction
We assume that X 0 is close to the curve. To find the point xi+1 on the curve we use a
Newton-like procedure. Since the standard Newton iterations can only be applied to systems
with the same number of equations as unknowns, we have to append an extra scalar condition:
F (x) = 0,
(2)
g(x) = 0.
13
V0
X0
X1
V1
X2
vi
V2
xi+1
xi vi+1
Figure 3: Moore-Penrose continuation
(rank Fx (x) = n). Having found the new point xi+1 on the curve we need to compute the
tangent vector at that point:
Fx (xi+1 )vi+1 = 0 . (6)
Furthermore the direction along the curve must be preserved: hvi , vi+1 i = 1, so we get the
(n + 1)-dimensional appended system
Fx (xi+1 ) 0
T vi+1 = . (7)
vi 1
Upon solving this system, vi+1 must be normalized.
Let A be an N × (N + 1) matrix with maximal rank. Consider the following linear system
with x, v ∈ RN +1 , b ∈ RN :
Ax = b (8)
T
v x = 0 (9)
where x is a point on the curve and v its tangent vector with respect to A, i.e. Av = 0. Since
AA+ b = b and v T A+ b = hAv, (AAT )−1 bi = 0, a solution of this system is
x = A+ b. (10)
Suppose we have a predicted point X 0 using (1). We want to find the point x on the curve
which is nearest to X 0 , i.e. we are trying to solve the optimization problem:
14
So, the system we need to solve is:
F (x) = 0 (12)
T 0
w (x − X ) = 0 (13)
where w is the tangent vector at point x. In Newton’s method this system is solved using a
linearization about X 0 . Taylor expansion about X 0 gives:
F (x) = F (X 0 ) + Fx (X 0 )(x − X 0 ) + O(||x − X 0 ||2 ) (14)
T 0 T 0 0 2
w (x − X ) = v (x − X ) + O(||x − X || ) . (15)
So when we discard the higher order terms we can see using (8) and (10) that the solution of
this system is:
x = X 0 − Fx+ (X 0 )F (X 0 ) . (16)
However, the null vector of Fx (X 0 ) is not known, therefore we approximate it by V 0 = vi ,
the tangent vector at xi . Geometrically this means we are solving F (x) = 0 in a hyperplane
perpendicular to the previous tangent vector. This is illustrated in Figure 3. In other words,
the extra function g(x) in (2) becomes:
gk (x) = hx − X k , V k i, (17)
where Fx (X k−1 )V k = 0 for k = 1, 2, . . .. Thus, the Newton iteration we are doing is:
X k+1 = X k − Hx−1 (X k , V k )H(X k , V k ) (18)
k+1 k
V = V − Hx−1 (X k , V k )R(X k , V k ) (19)
F (X) Fx (X)
H(X, V ) = , Hx (X, V ) = (20)
0 VT
Fx (X)V
R(X, V ) = . (21)
0
One can prove that under the same conditions as for the pseudo-arclength continuation, the
Newton iterations (18) and (19) converge to a point on the curve xi+1 and the corresponding
tangent vector vi+1 , respectively. In the pseudo-arclength continuation, we had to compute
a tangent vector when a new point was found. In this case however, we already compute the
tangent vectors V k at each iterate (19), so we only need to normalize the computed tangent
vectors.
15
2.4 Singularity handling
This section explains the idea of singularities which can occur on a solution branch.
Having found two points xi and xi+1 one may want to locate the point x∗ where φ(x)
vanishes. A logical solution is to solve the following system
F (x) = 0 (25)
φ(x) = 0 (26)
using Newton iterations starting at xi . However, to use this method, one should be able to
compute the derivatives of φ(x) with respect to x, which is not always easy. To avoid this
difficulty we implemented by default a one-dimensional secant method to locate φ(x) = 0
along the curve. Notice that this involves Newton corrections at each intermediate point.
Also assume we have found, using a one-dimensional secant method, all zeros x∗j of the test
functions. In the ideal (exact) case all these zeros will coincide:
Since the continuation is not exact but numerical, we cannot assume this. However, the
locations of x∗j probably will be clustered around some center point xc . In this case we will
glue the points x∗j to x∗ = xc .
A cluster will be detected if ∀i, j ∈ [1, nt ] : ||x∗i − x∗j || ≤ ǫ for some small value ǫ. In this
case we define x∗ as the mean of all located zeroes:
nt
∗ 1 X
x = x∗j (29)
nt
j=1
16
2.4.3 Singularity matrix
Until now we have discussed singularities depending only on test functions which vanish.
Suppose we have two singularities S1 and S2 , depending respectively on test functions φ1
and φ2 . Namely, assume that φ1 vanishes at both S1 and S2 , while φ2 vanishes at only S2 .
Therefore we need a possibility to represent singularities using non-vanishing test functions.
To represent all singularities we will introduce a singularity matrix (as in [26]). This matrix
is a compact way to describe the relation between the singularities and all test functions.
Suppose we are interested in ns singularities and nt test functions which are needed to
detect and locate the singularities. Then let S be the ns × nt matrix, such that:
0 singularity i: test function j must vanish,
Sij = 1 singularity i: test function j must not vanish, (30)
otherwise singularity i: ignore test function j.
17
3 General software aspects of MatCont
3.1 System definition
The user defines his dynamical system in an odefile, using the framework as in the file
standard.m in the Systems directory.
In the function fun eval, the dynamical system is to be given, where the parameters
should be listed individually. Under init, the user can define some initialization parame-
ters, as the phase variable values, the timespan, etc. All phase variables and parameters
are expected to be scalar variables, not vectors or matrices. In the further functions, it is
possible to supply the symbolic derivatives of the system to various orders to increase the
speed and/or improve accuracy of the algorithm. Note that for the state variables derivatives
up to fifth order can be provided. For the parameters first order derivatives of fun eval
and of its state Jacobian can be provided. No other derivatives can be supplied through
the system definition file, since they are never used in (CL )MatCont. We recall that
the presence of symbolic derivatives, whenever necessary, typically will be stored in the sub-
fields cds.options.SymDerivate and cds.options.SymDerivativeP of cds.options. This
is done by the initializers to the curve description files. We note that 0 ≤ SymDerivative ≤ 5
denotes the order of the highest symbolically available derivative with respect to state vari-
ables; similarly 0 ≤ SymDerivativeP ≤ 2 denotes the order of the highest symbolically avail-
able derivative in which a derivative with respect to a parameter is involved. It is always
assumed that this implies the presence of the lower order derivatives.
Finally, the odefile can contain the description of any number of user functions, i.e. func-
tions that can be monitored along computed curves and whose zeros can be detected and
located. User functions can serve many purposes; an example of a sophisticated use of user
functions is given in §8.5.4.
Details and examples on the construction of the odefile of a dynamical system are given
in Chapter 4.
x and v are the points and their tangent vectors along the curve. Each column in x and
v corresponds to a point on the curve.
18
s is an array with structures containing information about the found singularities. Its
first and last elements always refer to the first and last points of the curve, respectively, since
for convenience these are also considered ”special”.
Each element of this structure array s has the following fields:
s.index index of the singularity point in x, so s(1).index is always equal to 1 and
s(end).index is the number of computed points.
s.label label of the singularity; by convention s(1).label is ”00” and s(end).label is
”99”.
s.msg a string that may contain any information which is useful for the user,
for example the full name of the detected special point.
s.data For each special point it contains fields with additional
information, depending on the type of point, and accumulating with increasing
codimension:
• Equilibrium: s.data.v = tangent vector at the bifurcation
• Limit cycle:
s.data.multipliers = multipliers at the bifurcation
s.data.timemesh = time mesh of the orbit at the bifurcation
s.data.ntst = number of test intervals
s.data.ncol = number of collocation points
s.data.parametervalues = parameter values at the bifurcation
s.data.T = period of the orbit at the bifurcation
s.data.phi = bordering vector for locating PD bifurcations
h contains some information on the continuation process. Its columns are related to the
computed points, and have the following components:
19
Stepsize Stepsize used to calculate this point (zero for initial
point and singular points)
Half the number of correction itera- For singular points this is the number of locator
tions, rounded up to the next integer iterations
User function values The values of all active user functions
Test function values The values of all active test functions
f contains different information, depending on the continuation run. For noncycle-related
continuations, the f-vector just contains the eigenvalues, if asked for. For limit cycle contin-
uations, it begins with the mesh points of the time- discretization, followed by, if they were
asked for, the PRC- and dPRC-values in all points of the periodic orbit (cf. section 7.8).
Then, if required, follow the multipliers.
It is also possible to extend the most recently computed curve with the same options (also
same number of points) as it was first computed. The syntax to extend this curve is:
x, v, s, h and f are the results of the previous call to the continuer and cds is the global
variable that contains the curve description of the most recently computed curve (note that
this variable has to be defined as global cds in the calling command). The function returns
the same output as before, extended with the new results.
In MatCont, all curves that have been computed using a specific system are stored
in separate .mat-files, in a directory called diagram, under a subdirectory named after the
system. For example, curves of the Connor system will be kept in .mat-files under the
subdirectory Systems/Connor/diagram/. For continuation runs, each such mat-file contains
the computed x,v,s,h,f arrays, plus the cds structure and a structure related to the curve
type. Also, it contains the variables point, ctype and num. To understand their meaning,
suppose that we are computing curves of limit cycles that we start from Hopf points. The
first such computed curve then gets the name ”H LC(1)”, point stores the string ”H” and
ctype stores the string ”LC”. Furthermore, num stores the index in s of the last selected
point of the curve (the default is 1). The second curve of the same type is called ”H LC(2)”
and so on. In fact, to save storage space, only a limited number of curves of a certain type is
stored. This number can be set by the user and the default is 2. To save a computed curve
permanently, the user must change its name.
For time integration runs, cf. §5.1 (Curve Type O), the mat-file contains ctype, option,
param, point, s, t, x. Here t is the vector of time points and x is the corresponding array
of computed points. s contains data on the first and last computed points. The meaning
of point,ctype is similar to the case of continuation curves. Finally, param is the vector of
parameters of the ODE (constant during time integration) and option is a structure that
contains optional settings for time integration.
20
MatCont also produces graphical output. 2D and 3D graphs are plotted in matlab fig-
ure windows. Such a graph can be handled as any other graph that is produced in matlab.
It can be selected using the arrow-function of the matlab figure, and the line width, line
style and colour can be altered. Markers can be set on the curve. It can be copy-pasted into
another matlab figure. In a figure, textboxes can be inserted and axes labels can be added.
Thus the user has a plethora of possibilities to combine different MatCont output graphs
into one figure.
Finally, we note that users often want to introduce new systems that are modifications of
existing systems, but with slightly different sets of state variables and/or parameters. The
best strategy to do this in MatCont is first to edit the existing system, change its name to a
new one and click ”OK” to build an m-file with a different name and no associated directory
of computed curves. Afterwards, one can edit the newly created system, make all desired
changes and click ”OK” again. For Cl MatCont see §4
• curve func: contains the evaluation of the right-hand side of that type of solution
branch.
• defaultprocessor: is called and executed after each point computed during a contin-
uation experiment.
• options: sets the default setting for the options-structure for this type of solution
branch (more details are given in section 3.4).
• jacobian: contains the evaluation of the jacobian of that type of solution branch.
• hessians: contains the evaluation of the hessians of that type of solution branch.
• testf: contains the test functions for detecting bifurcations along the branch.
• process: is called when a bifurcation point is detected, to handle any necessary output
messages and storage.
• singmat: defines the singularity matrix of the solution branch (cf. section 2.4.3).
• locate: here specific localisation functions can be defined for bifurcations (cf. section
2.4.4)
• done: handles any special actions needed at the end of continuing the solution branch.
• adapt: this is called after every n steps, where n is user-defined. It handles any adap-
tation of parameters, subspaces, etc.
21
3.4 Options
3.4.1 The options-structure
It is possible to specify various options for the continuation run. In the continuation we use
the options structure which is initially created with contset:
options = contset;
will initialize the structure. The continuer stores the handle to the options in the variable
cds.options. Options can then be set using
MinStepsize the minimum stepsize to compute the next point on the curve (default: 10−5 )
Increment the increment to compute first order derivatives numerically (default: 10−5 )
MoorePenrose boolean indicating the use of the Moore-Penrose continuation as the Newton-
like corrector procedure (default: 1)
FunTolerance tolerance of function values: ||F (x)|| ≤ FunTolerance is the first convergence
criterium of the Newton iteration (default: 10−6 )
Backward boolean indicating the direction of the continuation (sign of the initial tangent
vector) v0 (default: 0)
CheckClosed number of points indicating when to start to check if the curve is closed (0 =
do not check) (default: 50)
Adapt number of points after which to call the adapt-function while computing the curve
(default: 1=adapt always)
22
IgnoreSingularity vector containing indices of singularities which are to be ignored (default:
empty)
TSearchOrder numerical value that indicates if unit vectors are cycled in increasing order
of index (default: 1, increasing) or decreasing (set to a value different from 1), see
§3.4.10.
dPRC variable indicating the computation of the derivative of the phase response curve
(default: empty)
Input vector representing the input given to the system for the computation of the phase
response curve (default: 0)
This list is stored in the file contidx.m in the directory Continuer. However, options
also contains fields which are not set by the user but frozen or filled by calls to the curvefile,
namely:
SymDerivative the highest order symbolic derivative which is present (default: 0)
SymDerivativeP the highest order symbolic derivative with respect to the free parameter(s)
which is present (default: 0)
WorkSpace boolean indicating to initialize and clean up user variable space (default: 0)
Locators boolean vector indicating the user has provided his own locator code to locate
zeroes of test functions. Otherwise the default locator will be used (default: empty)
ActiveUParams
ActiveSParams
ActiveSParam
The last three fields are used only in the homotopy methods for the initialzation of con-
necting orbits.
Some more details follow now.
23
3.4.2 Derivatives of the defining system of the curve
In the defining system of the object that is to be continued, the derivates can be provided
that are needed for the continuation algorithm or other computations. The continuer stores
the handle to the derivatives in the variables cds.curve jacobian,cds.curve hessians.
If cds.symjac= 1, then a call to feval(cds.curve jacobian, x) must return the (n −
1) × n Jacobian matrix evaluated at point x.
If cds.symhess= 1, then a call to feval(cds.curve hessians, x) must return a 3-
2
dimensional (n − 1 × n × n) matrix H such that H(i, j, k) = ∂∂xFj ∂x
i (x)
k
.
In the present implementation in most cases cds.symhess= 0, so the ODE-file does not
provide second order derivatives, since they are not needed in the algorithms used.
3.4.4 Locators
It may be useful to have a specific locator code for locating certain singularities (cf. section
2.4.4). To use a specific locator you must set the option Locators. This is a vector in which
the index of an element corresponds to the index of a singularity. Setting the entry to 1 means
the presence of a user-defined locator. The continuer has stored the handles to the locators
in the variable cds.curve locator and will then make a call to
[x,v]=feval(cds.curve locate,i,x1,v1,x2,v2)
to locate singularity i which was detected between x1 and x2 with their corresponding tangent
vectors v1 and v2. It must return the located point and the tangent vector at that point. If
the locator was unable to find a point it should return x = [].
24
then must return the evaluation of all userfunctions ids, whose information is in the structure
UserInfo, at x (v is the tangent vector at x). As a second return argument it should return
an array of all user function id’s which could not be evaluated. If this array is not empty the
stepsize will be decreased.
A special point on a bifurcation curve that is specified by a user function has a structure
as follows:
s.index index of the detected singular point defined by the user function.
s.label a string that is in UserInfo.label, label of the singularity.
s.msg a string that is set in UserInfo.name.
s.data an empty tangent vector or values of the user functions in the singular point.
When a change of sign of a userfunction is detected, the userfunction i is processed at x.
This is the point where the results (values of the userfunction) can be saved in the structure
s.data which can be reused for further analysis.
3.4.6 Defaultprocessor
In many cases it is useful to do some general computations for every calculated point on
the curve. The results of these computations can then be used by for example the test-
functions. The continuer has stored the handle to the defaultprocessor in the variable
cds.curve defaultprocessor.
The defaultprocessor is called as
[failed,f,s] = feval(cds.curve defaultprocressor,x,v,s).
x and v are the point on the curve and it’s tangent vector. The argument s is only supplied
if the point is a singular point, in that case the defaultprocessor may also add some data to
the s.data field. If for some reason the default processor fails it should set failed to 1. This
will result in a reduction of the stepsize and a retry which should solve the problem. Any
information that is to be preserved, should be put in f. f must be a column vector and must
be of equal size for every call to the default processor.
3.4.8 Workspace
During the computation of a curve it is sometimes necessary to introduce variables and do
additional computations that are common to all points of the curve. The continuer has stored
the handle to the initialization and cleaning of the workspace in the variables cds.curve init
and cds.curve done. These can be relegated to a call of the type
feval(cds.curve_init,x,v).
This option has to be provided only if the variable WorkSpace in cds.options is switched
on. In this case a call
25
feval(cds.curve_done,x,v)
must clear the workspace. Variables in the workspace must be set global.
3.4.9 Adaptation
It is possible to adapt the problem while generating the curve. If Adapt has a value, say 5,
then after 5 computed points a call to [reeval,x,v]=feval(cds.curve adapt,x,v) will be
made where the user can program to change the system.
For some applications it is useful to change or modify the used test functions while com-
puting the curve (like in bordering techniques). In order to preserve the correct signs of the
test functions it is sometimes necessary to reevaluate the test functions after adaptation. To
do this reeval should be one, otherwise zero. The return variables x and v should be the
updated x and v which may have changed because of the changes made to the system.
3.4.11 Summary
In the following table we list calls that can be made to the continuation curve description cds
and which options are involved.
26
Syntax of call What it should do (options involved)
feval(cds.curve func,x) return F (x)
feval(cds.curve options) return option vector
feval(cds.curve jacobian,x) return Jacobian at x (SymDerivative≥ 1)
feval(cds.curve hessians,x) return Hessians at x (SymDerivative≥ 2)
feval(cds.curve init,x,v) initialize user variable space (WorkSpace)
feval(cds.curve done) destroy user variable space (WorkSpace)
feval(cds.curve defaultprocessor,x,v,s) initialize data for testfunctions and
set some general singularity data
feval(cds.curve testf,ids,x,v) return evaluation of testfunctions ids at x
(Singularities)
feval(cds.curve locate,i,x1,x2,v1,v2) return located singularity and tangent
vector(Locators)
feval(cds.curve userf,UserInfo,ids,x,v) return evaluation of userfunctions ids with
UserInfo at x (Userfunctions)
feval(cds.curve singmat) return singularity matrix (Singularities)
feval(cds.curve process,i,x) run processor code of singularity i
at x(Singularities)
feval(cds.curve adapt,x,v) run adaptation code of problem (Adapt)
27
ODE FILE
CURVE DEFINITION
ode-file. However, we do need the derivatives with respect to the parameters. It is also useful
to have higher-order symbolic derivatives available.
To overcome this problem, the package contains new versions of odeget and odeset which
support Jacobians with respect to parameters and higher-order derivatives. The new routines
are compatible with the ones provided by matlab.
To include the Jacobian with respect to parameters, the option JacobianP should contain
the handle of the subfunction jacobianp @jacobianp. A call to feval(@jacobianp, 0, x,
p1, p2, ...) should then return the Jacobian with respect to to parameter p1 , p2 , . . . .
To include Hessians in the ode-file the option Hessians should contain the handle of the
subfunction hessians @hessians. The software then assumes that a call to feval(@hessians,
0, x, p1, p2, ...) will return all Hessians in the same way as mentioned above. Setting
the option to [] indicates that there are no Hessians available from the ode-file (default
behaviour).
To include Hessians with respect to parameters in your ode-file the option HessiansP
should contain the handle of the subfunction hessiansp @hessiansp. The software then as-
sumes that a call to feval(@hessiansp, 0, x, p1, p2, ...) will return all Hessians with
respect to parameters in the same way as mentioned above. Setting the option to [] indicates
that there are no Hessians with respect to parameters available from the ode-file (default
behaviour).
To include the third order derivatives in your ode-file the option Der3 should contain the
handle of the subfunction der3 @der3. The software then assumes that a call to feval(@der3,
0, x, p1, p2, ...) will return all third order derivatives in the same way as mentioned
above. Setting the option to [] indicates that they are not available from the ode-file (default
28
behaviour)
Der4 and Der5 are values indicating the 4th and 5th order symbolic derivative, available
in the ode-file.
3.7 Directories
The files of the toolbox are organized in the following 23 directories
• BranchPoint
Here are all files stored needed to do a branch point continuation. This includes the
initializers and a branch point curve definition file. BranchPoint and BranchPointCycle
are the only continuation curve types with three free system parameters in MatCont.
• BranchPointCycle
Here are all files stored needed to do a branch point of cycles continuation. This inluded
the initializers and branch point of cycles definition files. BranchPoint and Branch-
PointCycle are the only continuation curve types with three free system parameters in
MatCont.
• Continuer
Here are all the main files stored for the continuer, which are needed to calculate and
plot any curve.
• Equilibrium
Here are all files stored needed to do an equilibrium continuation. This includes the
initializers and the equilibrium curve definition file.
• GUI
This directory contains all GUI-related files. However, some files in this directory are
also used in Cl MatCont.
• Help
Contains the help-files.
• Heteroclinc
Here are all files stored needed to do a continuation of heteroclinic orbits. This includes
the initializers and the curve definition file.
• Homoclinic
Here are all files stored needed to do a homoclinic-to-hyperbolic-saddle continuation.
This includes the initializers and the curve definition file.
• HomoclinicSaddleNode
Here are all files stored needed to do a homoclinic-to-saddle-node continuation. This
includes the initializers and the curve definition file.
• HomtopyHet
Here are all files stored needed to find a heteroclinic connection by the homotopy
method.
29
• HomotopySaddle
Here are all files stored needed to find an orbit homoclinic to saddle by the homotopy
method.
• HomotopySaddlenode
Here are all files stored needed to find an orbit homoclinic to saddle-node by the homo-
topy method.
• Hopf
Here are all files stored needed to do a Hopf point continuation. This includes the
initializers and the Hopf point curve definition file.
• LimitCycle
Here are all files stored needed to do a limit cycle continuation. This includes the
initializers and the limitcycle curve definition file.
• LimitCycleCodim2
This directory contains the routines that compute the normal form coefficients of codim2
bifurcations of limit cycles. Computing these coefficients reliably requires that compu-
tations are done to high precision and symbolic derivatives up to fifth order are used.
• LimitPoint
Here are all files stored needed to do a limitpoint continuation. This includes the
initializers and the limitpoint curve definition file.
• LimitPointCycle
Here are all files stored needed to do a fold bifurcation of limit cycles continuation. This
includes the initializers and limitpoint of cycles curve definition files.
• MultiLinearForms
Here are files stored needed to compute high-order derivatives of systems and normal-
form coefficients of bifurcations.
• NeimarkSacker
Here are all files stored needed to do a torus bifurcation of limit cycles continuation.
This includes the initializers and torus curve definition files.
• PeriodDoubling
Here are all files stored needed to do a period doubling bifurcation continuation. This
includes the initializers and perioddoubling curve definition files.
• SBML
This directory contains the routines that allow to import SBML (Systems Biology
Markup Language) systems into MatCont. These routines require an update and/or
revision.
• Systems
Here all system definition files and files related to computed curves are stored, except
those odefiles which are hard-stored in the directory Testruns/TestSystems because
these are used in the testruns. To avoid confusion, it is not recommended to use the
names of the odefiles that are present in Testruns/TestSystems.
30
• Testruns
Here are some example testruns stored which can be executed from the matlab com-
mand line. They can be used to run the examples described in this manual and to test
if everything is working correctly. The necessary odefiles are stored in the subdirectory
TestSystems.
• eds (equilibrium descriptor structure): this structure is global in the curve definition
file equilibrium.m and in the initializers for the continuation of equilibria.
• lpds (limit point descriptor structure): this structure is global in the curve definition
file limitpoint.m and in the initializers for the continuation of limit points.
• hds (Hopf descriptor structure): this structure is global in the curve definition file
hopf.m and in the initializers for the continuation of Hopf points.
• bpds (branch point descriptor structure): this structure is global in the curve definition
file branchpoint.m and in the initializers for the continuation of branch points.
• lds (limitcycle descriptor structure): this structure is global in the curve definition files
limitcycle.m, limitpointcycle.m, perioddoubling.m, neimarksacker.m, and also
in branchpointcycle.m, in the initializers for the continuation of limit cycles, their
codimension 1 bifurcations and branch points.
31
• homds (homoclinc descriptor structure): this structure is global in the curve definition
files homoclinic.m, homoclinicsaddlenode.m and in the initializers for the continua-
tion of orbits to saddle or to saddle-node.
• hetds (heteroclinc descriptor structure): this structure is global in the curve definition
file heteroclinic.m and in the initializers for the continuation of heteroclinic orbits.
These specific structures carry information that is collected or computed in the initializers
to the curve definition files in which they are global. In the initializers themselves other
specific structures can also be global, depending on the data that are used in the initializer.
For example, in the initializer init H LC not only lds and cds are global but also eds and
hds. Indeed, Hopf points can be detected on equilibrium curves or be taken from Hopf curves.
32
4 The odefile of a dynamical system
4.1 Structure and construction of an odefile
A solution curve must be initialized before doing a continuation. Each curve file has its own
initializers and in the case of dynamical systems the initializers typically use an odefile where
the ode is defined. An odefile (short for system definition file) contains at least the following
sections:
init, fun eval, jacobian, jacobianp, hessians, hessiansp, der3, der4 , der5.
An odefile may also contain one or more sections that describe user functions.
There is a variety of options to create such odefiles. In all cases users should avoid using
loops, conditional statements, or other specific programming constructions in the system
definition.
First, an odefile can be defined by simply using the Matlab editor (or, in fact, any text
editor). This is likely to lead to errors and therefore not encouraged if the matlab symbolic
toolbox is available and symbolic derivatives are desirable.
A second option is to use the GUI version of MatCont by defining the problem in
the ’System’ window and then choosing the options “symbolically” or “numerically” to use
symbolic or numeric (= finite difference) derivatives, respectively. The user functions can also
be added in the GUI of MatCont, using the menu ‘User function’.
From version 6.7 on MatCont provides another possibility to create odefiles. It is in fact
a shortcut to using the GUI version of MatCont. As an example we will study the Rössler
chaotic system:
ẋ = −y − z
ẏ = x + Ay
ż = Bx − Cz + xz,
where (x, y, z) are the phase variables, and (A, B, C) are the parameters.
An odefile can be created by calling SysGUI.new.
This opens a System window, which contains several fields and buttons. To identify the
system, type for example
Roessl
X’=-Y-Z
Y’=X+AA*Y
Z’=BB*X-CC*Z+X*Z
1
If the MATLAB Symbolic Toolbox is present, there will be buttons indicated ’symbolically’. The first-
order derivatives are used in some of the integration algorithms, the first- and second-order derivatives are
used in the continuation, while the third-order derivatives are employed in the normal form computations.
The derivatives of fourth and fifth order are only used in the normal form computations of some codimension
2 bifurcations.
33
Figure 5: Specifying a new model.
34
Avoid typical mistakes:
• Specify the right hand sides in the same order as the coordinates.
It is best not to add comma’s or semicolons after the equations. Now the System window
should look like in Figure 5, and you can press the OK button. Two new files will be created in
the Systems directory of MatCont, namely the odefile Roessl.m and a mat-file Roessl.mat.
The odefile can be edited later on by calling SysGUI.edit(@name) where name is the name
of an existing odefile. User functions can be added by calling SysGUI.userfunctions(@name).
See Figure 6.
We note that if state variables, parameters or user functions are added or deleted then
this constitutes another dynamical system. So either all computed data should be deleted or
ignored, or the name of the system should be changed. The last option is recommended, in
particular when the GUI is used.
A special point on a bifurcation curve that is specified by a user function has a structure
as follows:
35
s.index index of the detected singular point defined by the user function.
s.label a string that is in UserInfo.label, label of the singularity.
s.data an empty tangent vector, values of the test and user functions in
the singular point.
s.msg a string that is set in UserInfo.name.
We now give an odefile for the Rössler system using symbolic derivatives of all orders up
to three and including the userfunction x − 1. Note that we have returned to state variables
denoted by x, y, z and parameters A, B, C.
% --------------------------------------------------------------------------
function dydt = fun_eval(t,kmrgd,A,B,C)
dydt=[-kmrgd(2)-kmrgd(3);
kmrgd(1)+A*kmrgd(2);
B*kmrgd(1)-C*kmrgd(3)+kmrgd(1)*kmrgd(3);];
% --------------------------------------------------------------------------
function [tspan,y0,options] = init
y0=[0,0,0];
options = odeset(’Jacobian’,handles(3),’JacobianP’,handles(4),...
’Hessians’,handles(5),’HessiansP’,handles(6));
handles = feval(Roessl);
tspan = [0 10];
% --------------------------------------------------------------------------
function jac = jacobian(t,kmrgd,A,B,C)
jac=[ 0 , -1 , -1 ; 1 , A , 0 ; B + kmrgd(3) , 0 , kmrgd(1) - C ];
% --------------------------------------------------------------------------
function jacp = jacobianp(t,kmrgd,A,B,C)
jacp=[ 0 , 0 , 0 ; kmrgd(2) , 0 , 0 ; 0 , kmrgd(1) , -kmrgd(3) ];
% --------------------------------------------------------------------------
function hess = hessians(t,kmrgd,A,B,C)
hess1=[ 0 , 0 , 0 ; 0 , 0 , 0 ; 0 , 0 , 1 ];
hess2=[ 0 , 0 , 0 ; 0 , 0 , 0 ; 0 , 0 , 0 ];
hess3=[ 0 , 0 , 0 ; 0 , 0 , 0 ; 1 , 0 , 0 ];
hess(:,:,1) =hess1;
36
hess(:,:,2) =hess2;
hess(:,:,3) =hess3;
% --------------------------------------------------------------------------
function hessp = hessiansp(t,kmrgd,A,B,C)
hessp1=[ 0 , 0 , 0 ; 0 , 1 , 0 ; 0 , 0 , 0 ];
hessp2=[ 0 , 0 , 0 ; 0 , 0 , 0 ; 1 , 0 , 0 ];
hessp3=[ 0 , 0 , 0 ; 0 , 0 , 0 ; 0 , 0 , -1 ];
hessp(:,:,1) =hessp1;
hessp(:,:,2) =hessp2;
hessp(:,:,3) =hessp3;
%---------------------------------------------------------------------------
function tens3 = der3(t,kmrgd,A,B,C)
tens31=[ 0 , 0 , 0 ; 0 , 0 , 0 ; 0 , 0 , 0 ];
tens32=[ 0 , 0 , 0 ; 0 , 0 , 0 ; 0 , 0 , 0 ];
tens33=[ 0 , 0 , 0 ; 0 , 0 , 0 ; 0 , 0 , 0 ];
tens34=[ 0 , 0 , 0 ; 0 , 0 , 0 ; 0 , 0 , 0 ];
tens35=[ 0 , 0 , 0 ; 0 , 0 , 0 ; 0 , 0 , 0 ];
tens36=[ 0 , 0 , 0 ; 0 , 0 , 0 ; 0 , 0 , 0 ];
tens37=[ 0 , 0 , 0 ; 0 , 0 , 0 ; 0 , 0 , 0 ];
tens38=[ 0 , 0 , 0 ; 0 , 0 , 0 ; 0 , 0 , 0 ];
tens39=[ 0 , 0 , 0 ; 0 , 0 , 0 ; 0 , 0 , 0 ];
tens3(:,:,1,1) =tens31;
tens3(:,:,1,2) =tens32;
tens3(:,:,1,3) =tens33;
tens3(:,:,2,1) =tens34;
tens3(:,:,2,2) =tens35;
tens3(:,:,2,3) =tens36;
tens3(:,:,3,1) =tens37;
tens3(:,:,3,2) =tens38;
tens3(:,:,3,3) =tens39;
%---------------------------------------------------------------------------
function tens4 = der4(t,kmrgd,A,B,C)
%---------------------------------------------------------------------------
function tens5 = der5(t,kmrgd,A,B,C)
function userfun1=xis1(t,kmrgd,A,B,C)
userfun1=kmrgd(1)-1;
• Internally the names of the parameters are extended so that, e.g., “C” is replaced by
“par C”. This is done to avoid clashes with the symbolic toolbox in which certain
names are protected. This does not affect the use of the odefile since the parameters
are not referred to by name. If the user writes his own odefile then this precaution is
not necessary.
37
• The init function is called when performing a time integration in the GUI mode of
MatCont. It is of no use in the command line version. See §5.1.3 for a command line
example.
where z = 1 − x − y − s. When SysGUI.new is used to create the odefile of the system then
is not necessary to “expand” the auxiliary function for z. The system can be introduced as
z=1-x-y-s
x’=2*q1*z^2-2*q5*x^2-q3*x*y
y’=q2*z-q6*y-q3*x*y
z’=q4*z-k*q4*s
We note that the definition of the auxiliary functions must precede the definiton of the
right hand sides.
The corresponding odefile is cataloscill.m in the directory Testruns/TestSystems.
MyMLSystem=MyML
MyMLfunction=MyMLSystem{2}
MyMLjacobian=MyMLSystem{3}
MyMLjacobianp=MyMLSystem{4}
MyMLfunction(0,[0;0],30,10)
MyMLjacobian(0,[0;0],30,10)
MyMLjacobianp(0,[0;0],30,10)
MyMLSystem =
1 x 9 cell array
38
{@init} {@fun_eval} {@jacobian} {@jacobianp} {@hessians}
{@hessiansp} {0x0 double} {0x0 double} {0x0 double}
MyMLfunction =
@fun_eval
MyMLjacobian =
@jacobian
MyMLjacobianp =
@jacobianp
ans =
33.1953
0.0167
ans =
1.8282 -128.0000
0.0013 -0.0694
ans =
0.2000 0
0 -0.0013
39
hls = MyML;
[t,y] = ode45(hls{2},[0 1000],[0 0],OPTIONS,30,10);
x0 = y(end,:)’;
In this example the system MyML is integrated over the interval [0, 1000] starting with the
input vector [0, 0] and with parameters 30, 10 in that order. The integration is performed
with the integration routine ode45 with the defaults (OPTIONS=[]) in Matlab. The output
vector is placed in x0. More details are given in Chapter 5.
40
5 Time integration and Poincaré maps
matlab provides a suite of ODE-solvers. To create a combined integration-continuation
environment, we have made them all accessible in MatCont and added two new ones, ode78
and ode87. ode78 is an explicit Runge-Kutta method that uses 7th order Fehlberg formulas
[Fehlberg 1969]. This is a 7-8th-order accurate integrator, therefore the local error normally
expected is O(h9 ). ode87 is a Runge-Kutta method that uses 8-7th order Dorman and Prince
formulas. See [Prince and Dorman 1981]. This is a 8th-order accurate integrator therefore
the local error normally expected is O(h9 ). In MatCont the choice of the solver is made
via the Integrator window that is opened automatically when the curve type O (Orbit) is
chosen. We note that the Starter window has a SelectCycle button that allows to start the
continuation of periodic orbits from curves computed by time integration.
• within MatCont it is possible to define the number of points (npoints) after which
output is needed. Because the solver calls status = integplot (t,y) after each in-
tegration step, the number of calls to integplot and npoints does not correspond.
Therefore this part is divided into two parts. t contains points where output was gener-
ated during the step, and y is the numerical solution at the points in t. If t is a vector,
the i-th column of y corresponds to the i-th element of t. The output is produced ac-
cording to the Refine option. integplot must return a status output value of 0 or 1. If
status = 1, the solver halts integration. This part also handles the ”stop/pause/resume”
interactions.
41
• done: The solver calls integplot([],[],’done’) when integration is completed to
allow the output function to perform any cleanup chores. The stop-window is also
deleted.
Setting the OutputFcn property to the output function, integ prs, reduces the output time.
It only allows to interactively pause, resume and stop the integration.
2Y H2 + O2 + 2H + → 2Y H + + 2H2 O,
where Y H2 (N ADH) is a general electron donor. Under the proper conditions this reaction
yields oscillations in the concentrations of Y H2 , O2 and various reaction intermediates. Stein-
metz and Larter [Steinmetz and Larter 1991] derived the following system of four coupled
nonlinear differential rate equations:
Ȧ = −k1 ABX − k3 ABY + k7 − k−7 A,
Ḃ = −k1 ABX − k3 ABY + k8 ,
(32)
Ẋ = k1 ABX − 2k2 X 2 + 2k3 ABY − k4 X + k6 ,
Ẏ = −k3 ABY + 2k2 X 2 − k5 Y,
42
Variable Value Parameter Value Parameter Value
A 1.8609653 k1 0.1631021 k5 1.104
B 25.678306 k2 1250 k6 0.001
X 0.010838258 k3 0.046875 k7 0.71643356
Y 0.094707061 k4 20 k−7 0.1175
k8 0.5
Table 4: State and parameter values of a point on an NS- cycle in the Steinmetz-Larter model.
X0=[1.8609653;25.678306;0.010838258;0.094707061];
P0=[0.1631021;1250;0.046875;20;1.104;0.001;0.71643356;0.1175;0.5];
P0(7)=0.7167;
hls=feval(@SteLar);
options=odeset(’RelTol’,1e-8);
[t,y]=ode45(hls{2},[0,3000],X0,options,0.1631021,1250,0.046875,20,1.104,
0.001,0.7167,0.1175,0.5);
size(t)
size(y)
plot(t(100000:339000),y(100000:339000,2));
’press any key’
pause
plot(y(100000:339000,3),y(100000:339000,2));
After a transient the time-series exhibits modulated oscillations with two frequencies near
the original limit cycle (see Fig. 7). This is a motion on a stable two-dimensional torus that
arises from the Neimark-Sacker bifurcation. The commands can be executed by running the
testrun testtimeinteg.m. The total number of computed points is 339161.
26.4
26.2
26
B
25.8
25.6
25.4
25.2
500 1000 1500 2000 2500 3000
t
X0=[1.8609653;25.678306;0.010838258;0.094707061];
P0=[0.1631021;1250;0.046875;20;1.104;0.001;0.71643356;0.1175;0.5];
P0(7)=0.7167;
hls=feval(@SteLar);
43
options=odeset(’RelTol’,1e-8);
options = odeset(’Jacobian’,hls(3),’JacobianP’,hls(4),
’Hessians’,hls(5),’HessiansP’,hls(6));
[t,y]=ode45(hls{2},[0,3000],X0,options,0.1631021,1250,0.046875,20,
1.104,0.001,0.7167,0.1175,0.5);
size(t)
size(y)
plot(t(100000:325000),y(100000:325000,2));
’press any key’
pause
plot(y(100000:325000,3),y(100000:325000,2));
is a small modification of testtimeinteg.m in which the solver has access to the Jacobian
matrix. The graphical output is similar, but the number of computed points is now 328197.
• direction(i) = 0 if all zeros are to be computed (the default), +1 if only the zeros
are needed where the event function increases, and -1 if only the zeros where the event
function decreases.
44
Corresponding entries in TE, YE, and IE return, respectively, the time at which an event oc-
curs, the solution at the time of the event, and the index i of the event function that vanishes.
Example
Let a set of two event functions be introduced by defining the function testEV:
This event function requires that the system is at least two-dimensional and defines two
events, namely y(1) = 0.2 and y(2) = 0.3. The integration will not be terminated if an
event is detected and all zeros will be detected regardless of the direction of y (increasing or
decreasing).
We now consider the system adaptx in the directory Testruns/TestSystems of MatCont
with three state variables and two parameters. By runnning the script testPoincare:
TSTP=@testEV;
OPTIONS = odeset(’RelTol’,1e-8,’Events’,TSTP);
hls = adaptx;
[t,y,TE,YE,IE] = ode45(hls{2},[0 300],[0.3 0.5 -0.1],OPTIONS,1,0.8);
x0 = y(end,:);
[t,y,TE,YE,IE] = ode45(hls{2},[0 10],x0,OPTIONS,1,0.8);
we integrate the system adaptx from 0 to 300 and then further from 300 to 310 starting from
the point [0.3; 0.5; −0.1] with parameter values 1, 0.8 and we detect the points in the second
run where y(1) = 0.2 or y(2) = 0.3. The output is given by
TE =
5.6334
6.6979
YE =
IE =
2
1
45
6 Equilibrium continuation
This example will show how to continue an equilibrium of a differential equation defined in
a standard matlab ODE file. Furthermore, this example illustrates the detection, location,
and processing of singularities along an equilibrium curve.
with x = (u, α) ∈ Rn+1 . Denote by v ∈ Rn+1 the tangent vector to the equilibrium curve at
x.
• Hopf-point, denoted by H
The equilibrium curve can also have branch points. These are denoted with BP. To detect
these singularities, we first define 3 test functions:
Fx
φ1 (u, α) = det , (35)
vT
0
(2fu (u, α) ⊙ In ) w1 ...
φ2 (u, α) = T \
0
, (36)
v1 d
1 n+1
φ3 (u, α) = vn+1 , (37)
where ⊙ is the bialternate matrix product and v1 , w1 are n(n−1) 2 vectors chosen so that the
square matrix in (36) is non-singular. (the bialternate matrix product was introduced by C.
Stéphanos [36]; see [22] for details). Using these test functions we can define the singularities:
46
• BP: φ1 = 0
• H: φ2 = 0
• LP: φ3 = 0, φ1 6= 0
A proof that these test functions correctly detect the mentioned singularities can be found in
[25]. Here we only notice that φ2 = 0 not only at Hopf points but also at neutral saddles, i.e.
points where fx has two real eigenvalues with sum zero. So, the singularity matrix is:
0 − −
S= − 0 − (38)
1 − 0
For each detected limit point, the corresponding quadratic normal form coefficient is com-
puted:
1
a = pT fuu [q, q], (39)
2
where fu q = fuT p = 0, q T q = 1, pT q = 1. Mathematically, the limit point is nondegenerate
(i.e. the equilibrium branch looks locally like a parabola) if and only if a 6= 0. In practice,
because of round-off errors the computed a is always nonzero. So it is more important to
check if the testfunction φ3 changes sign. (In a cusp point (CP) a = 0 but this will not be
detected on a branch of equilibria since it is a codimension 2 phenomenon, see §8.1)
At a Hopf bifurcation point, the first Lyapunov coefficient is computed by the formula
1
l1 = Re pT fuuu [q, q, q̄] − 2fuu [q, Fu−1 fuu [q, q̄]] + fuu [q̄, (2iωIn − fu )−1 fuu [q, q]] , (40)
2
where fu q = iωq, q T q = 1, fuT p = −iωp, p̄T q = 1.
The first Lyapunov coefficient is quite important. If l1 < 0 then the Hopf bifurcation
is supercritical, i.e. within the center manifold on one side of the bifurcation only stable
equilibria exist, on the other side unstable equilibria coexist with stable periodic orbits. If
l1 > 0 then the Hopf bifurcation is subcritical, i.e. within the center manifold on one side
of the bifurcation stable equilibria coexist with unstable periodic orbits, on the other side
only unstable equilibria exist. (In a Generalized Hopf point (GH) l1 = 0 but this will not be
detected on a branch of equilibria since it is a codimension 2 phenomenon, see §8.2)
47
We solve this system by Newton’s method with initial data β = 0 and p : fuT p = µp where
µ is the real eigenvalue with smallest norm. A branch point (u, α) corresponds to a regular
solution (u, α, 0, p) of system (41) (see [3],p. 165). We note that the second order partial
derivatives (Hessian) of f with respect to u and α are required.
The tangent vector at the singularity is also computed here. This is related to the pro-
cessing of the branch point (computing the direction of the secondary branch).
48
The system is specified as
bratu.m
1 function out = bratu
2 out{1} = @init;
3 out{2} = @fun_eval;
4 out{3} = @jacobian;
5 out{4} = @jacobianp;
6 out{5} = @hessians;
7 out{6} = @hessiansp;
8 out{7} = [];
9 out{8} = [];
10 out{9} = [];
11 out{10}= @userf1;
12
13 end
14
15 % --------------------------------------------------------------------------
16 function dydt = fun_eval(t,kmrgd,a)
17 dydt = [ -2*kmrgd(1)+kmrgd(2)+a*exp(kmrgd(1));
18 kmrgd(1)-2*kmrgd(2)+a*exp(kmrgd(2)) ];
19
20 % --------------------------------------------------------------------------
21 function [tspan,y0,options] = init
22 tspan = [0; 10];
23 y0 = [0;0];handles = feval(@bratu)
24 options = odeset(’Jacobian’,handles(3),’JacobianP’, ’handles(4)’,...
25 ...,’Hessians’,handles(5), ’Hessiansp’,handles(6));
26 % --------------------------------------------------------------------------
27 function jac = jacobian(t,kmrgd,a)
28 jac = [ -2+a*exp(kmrgd(1)) 1
29 1 -2+a*exp(kmrgd(2)) ];
30
31 % --------------------------------------------------------------------------
32 function jacp = jacobianp(t,kmrgd,a)
33
34 jacp = [ exp(kmrgd(1))
35 exp(kmrgd(2)) ];
36
37 % --------------------------------------------------------------------------
38 function hess = hessians(t,kmrgd,a)
39 hess1=[[a*exp(kmrgd(1)),0];[0,0]];
40 hess2=[[0,0];[0,a*exp(kmrgd(2))]];
41 hess(:,:,1) = hess1;
42 hess(:,:,2) = hess2;
43
44 % --------------------------------------------------------------------------
45 function hessp = hessiansp(t,kmrgd,a)
46 hessp1=[[exp(kmrgd(1)),0];[0,exp(kmrgd(2))]];
47 hessp(:,:,1) = hessp1;
48
49 %---------------------------------------------------------------------------
60 function userfun1 = userf1(t,kmrgd,a)
61 userfun1 = a-0.2;
62
bratu.m
49
As seen above, a user function is defined to detect all points where a = 0.2. This system
has an equilibrium at (x, y, a) = (0, 0, 0) which we will continue with respect to a. We first
compute 50 points and then extend the curve with another 50 points.
global cds
p=[0];ap=[1];
[x0,v0]=init_EP_EP(@bratu,[0;0],p,ap);
opt=contset;
opt=contset(opt,’MaxNumPoints’,50);
opt=contset(opt,’Singularities’,1);
opt=contset(opt,’Userfunctions’,1);
UserInfo.name=’userf1’;
UserInfo.state=1;
UserInfo.label=’u1’;
opt=contset(opt,’UserfunctionsInfo’,UserInfo);
[x,v,s,h,f]=cont(@equilibrium,x0,[],opt);
[x,v,s,h,f]=cont(x,v,s,h,f,cds);
cpl(x,v,s,[3 1 2]);
The above computations can be done by running testbratu.m in the directory Testruns.
The output in the command window is as follows:
>> testbratu
first point found
tangent vector to first point found
label = u1, x = ( 0.259174 0.259174 0.200002 )
label = LP, x = ( 1.000001 1.000001 0.367879 )
a=3.535537e-01
Neutral saddle
label = H , x = ( 2.000000 2.000000 0.270671 )
label = u1, x = ( 2.542639 2.542639 0.200000 )
elapsed time = 0.4 secs
npoints curve = 50
start computing extended curve
label = BP, x = ( 3.000000 3.000000 0.149361 )
elapsed time = 0.1 secs
npoints curve = 100
We note that in the first continuation two zeros of the user function (label u1) were detected,
as well as a limit point (label LP) and a neutral equilibrium (label H). A neutral equilibrium
is an equilibrium with two real eigenvalues with sum zero.
In the extension of the run at (x, y, a) ≈ (3.0; 3.0; 0.15) the system has a branch point
(label BP).
cpl(x,v,s,[3 1 2]) plots a 3D-plot with the parameter a on the x-axis and the first and
second state variable on the y- and z-axes, respectively. The labels of the plot are changed
manually by the following commands:
50
Figure 8: Equilibrium curve of bratu.m with a branch point
To select the branch point the output s is used. Since the first and last points are also
treated as singular, the array of structures s has 7 components and the data concerning
the branch point are at s(6). To switch to another branch at the detected branch point, we
select that branch point and we use the starter init BP EP. We start a forward and backward
continuation from this point:
testbratu;
x1=x(1:2,s(6).index);
p(ap)=x(3,s(6).index);
[x0,v0]=init_BP_EP(@bratu,x1,p,s(6),0.01);
opt=contset(opt,’InitStepsize’,0.0001);
[x1,v1,s1,h1,f1]=cont(@equilibrium,x0,v0,opt);
cpl(x1,v1,s1,[3 1 2]);
opt=contset(opt,’Backward’,1);
[x2,v2,s2,h2,f2]=cont(@equilibrium,x0,v0,opt);
cpl(x2,v2,s2,[3 1 2]);
Note that p is a vector containing the initial values of all parameters. The above compu-
tations can be done by running testbratu2.m in the directory Testruns. The output in the
command window is as follows:
>> testbratu2
first point found
tangent vector to first point found
51
Figure 9: Equilibrium curve of bratu.m with new branches rooted in the branch point
We note that the branch point is ”discovered” a second time during the backward contin-
uation of the secondary branch that is rooted at the branch point. All computed curves are
plotted together in Figure 9.
52
7 Continuation of limit cycles
7.1 Mathematical definition
Consider the following differential equation
du
= f (u, α) (44)
dt
with u ∈ Rn and α ∈ R. A periodic solution with period T satisfies the following system
du
dt = f (u, α) . (45)
u(0) = u(T )
If u(τ ) is its solution then the shifted solution u(τ + s) is also a solution to (46) for any value
of s. To select one solution, a phase condition is added to the system. The complete BVP
(boundary value problem) is
du
dτ − T f (u, α) = 0
u(0) − u(1) = 0 (47)
R1
0 hu(t), u̇ old (t)idt = 0
where u̇old is the derivative of a previous solution. A limit cycle is a closed phase orbit
corresponding to this periodic solution.
53
The coarse mesh is adapted after each number of Adapt continuation points, cf §3.4.9. We
note that ntst and ncol are input arguments of the routines that initialize the continuation of
limit cycles but are not explicitly found in the output of the continuation; however, they are
preserved as fields in the global structure lds.
• If e=[e1,e2] one must have 1 ≤ e1, e2 ≤ nphase and a 2D plot will be generated in
which the projections of the orbits on the (e1, e2) coordinate plane are shown. The first
and last curves, and the curves with singulaties are in red.
• If e=[e1,e2,e3] then e1 must be the index of the active parameter, i.e. e1=size(x,1)
and one must have 1 ≤ e2, e3 ≤ nphase. Then a 3D plot will be generated in which the
projections of the orbits on the (e2, e3) coordinate plane are shown versus the active
parameter. The first and last curves, and the curves with singulaties are in red.
OPTIONS = [];
hls = adaptx;
OPTIONS=odeset(’RelTol’,1e-8);
[t,y] = ode45(hls{2},[0 300],[0.3 0.5 -0.1],OPTIONS,1,0.8);
x1 = y(end,:);
figure
54
0.5
0.4
0.3
0.2
0.1
-0.1
-0.2
-0.3
-0.4
-0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 0.6
plot(y(:,1),y(:,2))
p=[1;0.8];
ap=[2];
tolerance=1e-2;
[x0,v0]=initOrbLC(@adaptx,t,y,p,ap,20,4,tolerance);
opt=contset;
opt=contset(opt,’MaxNumPoints’,50);
%opt=contset(opt,’TSearchOrder’,0);
%opt=contset(opt,’Backward’,1);
[xlcc,vlcc,slcc,hlcc,flcc]=cont(@limitcycle,x0,v0,opt);
figure
axes
plotcycle(xlcc,vlcc,slcc,[size(xlcc,1) 1 2]);
In this script adaptx is the dynamical system (54) in §7.7 whose odefile adaptx.m is stored
in the directory Testruns/TestSystems. It has three state variables and two parameters.
Starting from the point (0.3; 0.5; −0.1) and with parameter values (1, 0.8) it is integrated over
the time span 300. The endpoint is called x1 and from this point another time integration
over the shorter span 10 is performed. It is then checked graphically that this new integration
contains a closed circle, see Figure 10 for a plot in a two-dimensional space.
The call
[x0,v0]=initOrbLC(@adaptx,t,y,p,ap,20,4,tolerance);
now initializes the continuation of limit cycles. Here t is a column vector whose entries are
the time points (between 0 and 10) and y is a matrix whose rows contain the coordinates of
the points computed along the orbit. Also, p = (1; 0.8) is the parameter vector and ap = [2]
contains the indices of the free parameters, so in this case the second parameter is free. Also,
the number of test functions is 20 and the number of collocation points in the discretization
55
0.4
0.2
y
0
-0.2
0.8
0.6 0.8
0.4 0.75
0.2 0.7
0 0.65
-0.2 0.6
x -0.4 0.55 alpha
of the limit cycle is 4. Finally, the tolerance is a threshold for accepting an initial part of the
computed orbit as an approximation to a limit cycle.
The last command plots the continuation of a branch of limit cycles with 50 computed
limit cycles in the state space, see Figure 11 (the axis labels were added manually).
Note: when the lines
%opt=contset(opt,’TSearchOrder’,0);
%opt=contset(opt,’Backward’,1);
in testselectcycle are made active, then the initialization of the continuation of limit
cycles involves a decreasing order of the unit vectors in continuation space instead of an
increasing order. This accidentally leads to a continuation in the opposite direction; therefore
cds.options.Backward is set to reverse the continuation.
• Fold, also known as Limit Point of Cycles, this will be denoted as LPC
The test function for the Period Doubling bifurcation is defined by the following system
v̇(τ ) − T fu (u, α)v(τ ) + Gϕ(τ ) = 0
v(0) + v(1) = 0 (48)
R1
0 hψ(τ ), v(τ )idτ = 1
here ϕ and ψ are so-called bordering vector-functions [25], see [15] for details on the im-
plementation. The system is discretized using orthogonal collocation and solved using the
56
standard matlab sparse system solver. The solution component G ∈ R of this system is the
test function and equals zero when there is a Period Doubling bifurcation.
The Fold bifurcation is detected in the same way as the Fold bifurcation of equilibria, the
last component of the tangent vector (the α component) is used as the test function.
The Neimark-Sacker bifurcation is detected by monitoring the eigenvalues of the mon-
odromy matrix for the cycle. The monodromy matrix is computed like in auto by a block
elimination in the discretized form of the Jacobian of (47).
BPC cycles are not generic in families of limit cycles, but they are common in the case of
symmetries, if the branch parameter is also the continuation parameter. CL MatCont uses
a strategy that requires only the solution of linear systems; it is based on the fact that in a
symmetry-breaking BPC cycle MD has rank defect two, where MD is the square matrix MD ,
obtained from the discretized form of the Jacobian of (47). To be precise, if h ∈ C 1 ([0, 1], IRn ),
then
ḣ − T fx (x(t), α)h
Mh = ,
h(0) − h(1)
and
(ḣ − T fx (x(t), α)h)dc
MD (h)dm = ,
h(0) − h(1)
where ()dm and ()dc denote discretization in mesh points and in collocation points, respectively.
Therefore we border MD with two additional rows and columns to obtain
MD w 1 w 2
MDbb = v1∗ 0 0 ,
∗
v2 0 0
so that MDbb is nonsingular in the BPC cycle. Then we solve the systems
ψ11 ψ12 0(N m+1)n 0(N m+1)n
MDbb gBP C11 gBP C12 = 1 0 ,
gBP C21 gBP C22 0 1
where ψ11 , ψ12 have (N m + 1)n components, and gBP C11 , gBP C12 , gBP C21 , and gBP C22 , are
scalar test functions for the BPC. In the BPC cycle they all vanish.
The singularity matrix is
0 0 0 0 − − − −
− − − − − 0 − −
S= − − − − − − 0 −
(49)
− − − − 1 − 1 0
The first row corresponds to the BPC. It contains 4 zeros which indicates that gBP C11 , gBP C12 ,
gBP C21 , and gBP C22 should vanish. The last row corresponds to the NS. Because we have to
exclude that all four testfunctions of the BPC are zeros, we introduce an extra testfunction
which corresponds to the norm of these four testfunctions. A NS is detected if this norm is
nonzero,the testfunction for the fold is nonzero and the testfunction for the NS is equal to
zero.
57
7.5.1 Branch Point Locator
The location of BPC points in the non-generic situation (i.e. where some symmetry is present)
as zeros of the test functions is numerically suspect because no local quadratic convergence
can be guaranteed. This difficulty can be avoided by introducing an additional unknown
β ∈ R and considering the minimally extended system:
dx
dt − T f (x, α) + βp1 =0
x(0) − x(1) + βp2 =0
R1 (50)
hx(t), ẋold (t)idt + βp3 = 0
0
G[x, T, α] =0
where G is defined as in (84) and [pT1 pT2 p3 ]T is the bordering vector [w01 ; w02 ; w03 ]T in (86).
We solve this system with respect to x, T, α and β by Newton’s method with initial β = 0. A
branch point (x, T, α) corresponds to a regular solution (x, T, α, 0) of system (50) (see [3],p.
165). We note, however that the second order partial derivatives (Hessian) of f with respect
to x and α are required. The tangent vector v1st at the BPC singularity is approximated as
v1st = v1 +v
2
2
where v1 is the tangent vector in the continuation point previous to the BPC
and v2 is the one in the next point.
where τ ∈ [0, T ], ξ is a real coordinate on the center manifold that is transverse to the limit-
cycle, a, b ∈ R, and dots denote nonautonomous T -periodic O(ξ 3 )-terms. For each detected
LPC point the normal form coefficient b is computed. If b 6= 0 then the LPC bifurcation is
nondegenerate, i.e., the cycle manifold is quadratically tangential to the hyperplane orthogo-
nal to the parameter direction. In practice, by round-off errors b is never zero, so it is better
to check if the testfunction changes sign. (for b = 0 the LPC degenerates to a cusp of cycles
(CP) but this will not be detected on a branch of limit cycles since it is a codimension 2
phenomenon.)
The periodic normal form at the Period Doubling (PD) bifurcation is
( dτ
dt = 1 + aξ 2 + · · · ,
dξ
(52)
3
dt = cξ + · · · ,
where τ ∈ [0, 2T ], ξ is a real coordinate on the center manifold that is transverse to the limit
cycle, a, c ∈ R, and dots denote nonautonomous 2T -periodic O(ξ 4 )-terms. The coefficient c
determines the stability of the period doubled cycle in the center manifold and is computed
during the processing of each PD point.
If c < 0 then the PD bifurcation is supercritical, i.e., within the center manifold on one
side of the bifurcation only stable cycles exist and on the other side unstable cycles coexist
58
with stable period-doubled cycles. If c > 0 the PD bifurcation is subcritical, i.e., within
the center manifold on one side of the bifurcation stable cycles coexist with unstable period-
doubled cycles and on the other side only unstable cycles exist. (for c = 0 the PD degenerates
to Generalized Period Doubling bifurcation (GPD) but this will not be detected on a branch
of limit cycles since this is a codimension 2 phenomenon).
The periodic normal form at the Neimark-Sacker (NS) bifurcation is
( dτ
dt = 1 + a|ξ|2 + · · · ,
dξ
(53)
iθ 2
dt = T ξ + dξ|ξ| + · · · ,
• the number of mesh and collocation points to use for the discretization.
Also an initial cycle x0 has to be known. All this information can be supplied using any of the
following three starting functions. All three return an initial cycle x0 as well as its tangent
vector v0.
59
• [x0,v0]=init BPC LC(@odefile, x, v, s, ap, ntst, ncol,h)
Calculates an initial cycle for starting a secondary cycle from a BPC detected on a pre-
vious calculated limit cycle. odefile, ap, ntst and ncol are the same as for init H LC.
x, v and s are here the x, v and s as returned by a previous limit cycle continuation
and h contains the value of the initial amplitude.
This system is introduced in the testruns of MatCont under the name adaptx. It has a
Hopf point at the origin for α = 1 and β = 1 as detected in the testrun testadapt.m.
From this Hopf point an initial cycle is calculated using the starter init H LC. The results
of the continuation are plotted using the plot function plotcycle(x,v,s,e) (see Figure 12).
This function plots the cycles x. e is an array whith either 2 or 3 elements for 2-dimensional
and 3-dimensional plotting respectively. Its entries must be indices of state variables or active
parameters in x. The index of the active parameter is size(x,1)
>> init;
>> [x0,v0]=init_EP_EP(@adaptx,[0;0;0],[-10;1],[1]);
>> opt = contset; opt = contset(opt,’Singularities’,1);
>> [x,v,s,h,f]=cont(@equilibrium,x0,[],opt);
first point found
tangent vector to first point found
label = H , x = ( 0.000000 0.000000 0.000000 1.000002 )
First Lyapunov coefficient = -3.000001e-001
60
>> [x0,v0]=init_H_LC(@adaptx,x1,p,[1],1e-6,20,4);
>> opt = contset(opt,’MaxNumPoints’,200);
>> opt = contset(opt,’Multipliers’,1);
>> opt = contset(opt,’Adapt’,1);
>> [xlc,vlc,slc,hlc,flc]=cont(@limitcycle,x0,v0,opt);
first point found
tangent vector to first point found
Limit point cycle (period = 6.283185e+000, parameter = 1.000000e+000)
Normal form coefficient = -1.306379e+000
Branch Point cycle(period = 6.283185e+000, parameter = 9.999996e-001)
Period Doubling (period = 6.364071e+000, parameter = 6.303020e-001)
Normal form coefficient = -4.267675e-002
Neimark-Sacker (period = 6.433818e+000, parameter = 1.895460e-008)
Neutral saddle
Period Doubling (period = 6.364071e+000, parameter = -6.303020e-001)
Normal form coefficient = 4.268472e-002
We note that xlc is a 245 × 200 matrix; each column corresponds to a computed limit
cycle and gives the coordinates of all points of the fine mesh, i.e. 243 = (20 × 4 + 1) × 3 values,
plus the period T as the 244 − th component and the value of the active parameter α as the
245 − th component.
The x-axis contains the active parameter, the y-axis the first state variable x and the
z-axis the second state variable y. This run can be tested by the statement testadapt1 (the
axis labels have to be set manually). If you run only this example, do not forget to execute
init init statement first.
We note that the Limit point cycle and Branch point cycle detected in this run are
degenerate: they reduce to the Hopf point itself. The Neimark-Sacker bifurcation is, in
reality, a Neutral Saddle, i.e. it is an unstable periodic orbit with two real multipliers whose
product is 1.
From the first Period Doubling bifurcation detected a limit cycle continuation of the nearby
double period cycle is started. First, an initial cycle and its tangent vector are calculated
using the starter init PD LC. The continuation is done using the standard continuer and the
result is plotted using the plotcycle function (see figure 13).
>> [x1,v1]=init_PD_LC(@adaptx,xlc,slc(4),40,4,1e-6);
>> opt=contset(opt,’MaxNumPoints’,250);
>> [xlc2,vlc2,slc2,hlc2,flc2]=cont(@limitcycle,x1,v1,opt);
first point found
tangent vector to first point found
Branch Point cycle(period = 1.272814e+001, parameter = 6.303020e-001)
Period Doubling (period = 1.273437e+001, parameter = 5.796299e-001)
Normal form coefficient = -5.579636e-002
Neimark-Sacker (period = 1.154609e+001, parameter = 2.806142e-010)
61
Figure 12: Computed limit cycle curve
Neutral saddle
Period Doubling (period = 1.106284e+001, parameter = -4.471966e-002)
Normal form coefficient = 6.970442e-003
Limit point cycle (period = 1.103168e+001, parameter = -4.494912e-002)
Normal form coefficient = 1.311327e+002
Neimark-Sacker (period = 1.076785e+001, parameter = -1.076152e-009)
Neutral saddle
Limit point cycle (period = 1.103169e+001, parameter = 4.494912e-002)
Normal form coefficient = -1.310582e+002
Period Doubling (period = 1.106284e+001, parameter = 4.471966e-002)
Normal form coefficient = -6.973392e-003
Neimark-Sacker (period = 1.154609e+001, parameter = 5.372279e-010)
Neutral saddle
Period Doubling (period = 1.273437e+001, parameter = -5.796298e-001)
Normal form coefficient = 5.580465e-002
62
Figure 13: Computed limit cycle curve started from a Period Doubling bifurcation
Cl MatCont supports the computation of the PRC and dPRC of limit cycles during
continuation, using the method described in [24]. The standard method, which uses numerical
integration of the adjoint system, was implemented in XPPAUT [17].
The use in MatCont is easy: before starting the actual limit cycle continuation, the user
can specify whether he wants to compute the PRC, dPRC or both, and he needs to indicate
the input vector used. When a scalar is given as input, then the vector has this scalar as first
entry and all other entries are zero. Then in separate plotting windows, for each computed
step in limit cycle continuation, the PRC and/or dPRC are computed and plotted. The
computed values are saved in the output f-array of the continuation.
63
To illustrate the use in CL MatCont, we here supply code that does a LC continuation
experiment in the Morris Lecar system (the odefile is called MyML.m and is located in the
directory Testruns/TestSystems), and also computes the PRC and dPRC of the system:
clear
global x v s h f opt
OPTIONS=[];
hls = MyML;
[t,y] = ode45(hls{2},[0 1000],[0 0],OPTIONS,30,10);
x0 = y(end,:)’;
opt=contset;opt=contset(opt,’Singularities’,1);
opt = contset(opt,’MaxStepsize’,10);
opt=contset(opt,’MaxNumpoints’,2500);
[x1,v1]=init_EP_EP(@MyML,x0,[30;6],[1]);
[x,v,s,h,f]=cont(@equilibrium,x1,[],opt);
x1=x(1:2,s(5).index);p=[x(end,s(5).index);6];
[x0,v0]=init_H_LC(@MyML,x1,p,[1],1e-6,40,4);
opt = contset(opt,’Multipliers’,0);
opt = contset(opt,’Adapt’,1);
opt = contset(opt,’MaxStepsize’,5);
opt = contset(opt,’FunTolerance’,1e-6);
opt = contset(opt,’VarTolerance’,1e-6);
opt = contset(opt,’PRC’,1);
opt = contset(opt,’dPRC’,1);
opt = contset(opt,’Input’,1);
opt = contset(opt,’MaxNumPoints’,100);
[xlc2,vlc2,slc2,hlc2,flc2]=cont(@limitcycle,x0,v0,opt);
fvector=flc2(:,100);
PRC10=fvector(42:202);
dPRC10=fvector(203:363);
plot(PRC10,’r’);
hold on
plot(dPRC10,’b’);
We note that the first 41 components (number of test intervals plus one) of the f vector
contain the coarse mesh points of the discretization. The next 161 components (number of
fine mesh points, i.e. number of test intervals times number of collocation points plus 1)
contain the values of the PRC in the fine mesh points. The next 161 components contain the
values of the dPRC in the fine mesh points.
This script is in the MatCont directory Testruns under the name testmymlPRC. The
output is:
>> testmymlPRC
first point found
tangent vector to first point found
64
0.015
0.01
0.005
PRC and dPRC
-0.005
-0.01
-0.015
-0.02
-0.025
0 20 40 60 80 100 120 140 160 180
Phase
Figure 14: Phase response curve in the Morris-Lecar system: red=PRC, blue=dPRC
[x0,v0]=init_EP_EP(@adaptx,[0;0;0],[-10;1],[1]);
opt=contset;opt=contset(opt,’Singularities’,1);
65
[x,v,s,h,f]=cont(@equilibrium,x0,[],opt);
x1=x(1:3,s(2).index);p=[x(end,s(2).index);1];
[x0,v0]=init_H_LC(@adaptx,x1,p,[1],1e-6,20,4);
opt = contset(opt,’MaxNumPoints’,10);
opt = contset(opt,’Multipliers’,1);
opt = contset(opt,’Adapt’,1);
[xlc,vlc,slc,hlc,flc]=cont(@limitcycle,x0,v0,opt);
par=slc(end).data.parametervalues;
[x1,v1] = init_LC_LC(@adaptx, xlc, vlc, slc(end), par, 1, 20, 4);
opt = contset(opt,’PRC’,1);
opt = contset(opt,’dPRC’,1);
opt = contset(opt,’Input’,1);
opt = contset(opt,’MaxNumPoints’,20);
[xlc1,vlc1,slc1,hlc1,flc1]=cont(@limitcycle,x1,v1,opt);
fvector=flc1(:,20);
plot(fvector(22:102),’r’)
hold on
plot(fvector(103:183),’b’)
We note that the first 21 components (number of test intervals plus one) of the f vector
contain the coarse mesh points of the discretization. The next 81 components (number of fine
mesh points, i.e. number of test intervals times number of collocation points plus 1) contain
the values of the PRC in the fine mesh points. The next 81 components contain the values
of the dPRC in the fine mesh points.
This script is in the MatCont directory Testruns under the name testadaptPRC. The
output is:
>> testadaptPRC
first point found
tangent vector to first point found
label = H , x = ( 0.000000 0.000000 0.000000 1.000002 )
First Lyapunov coefficient = -3.000001e-01
66
1.5
0.5
PRC and dPRC
-0.5
-1
-1.5
0 10 20 30 40 50 60 70 80 90
Phase
Figure 15: Phase response curve in the adaptx system: red=PRC, blue=dPRC
67
8 Continuation of codim 1 bifurcations
MatCont computes branches of codim 1 bifurcations of equilibria (namely, fold LP and
Hopf H) and of limit cycles (fold of cycles LPC, period doubling PD and Neimark-Sacker
NS). On these branches codimension 2 bifurcations of equilibria (CP,BT,ZH,HH,GH) and
of limit cycles (CPC,R1,R3,R4,CH,LPNS,PDNS,R2, NSNS,LPPD and GPD) are detected
and located, cf. the graph of adjacency in Figure 1.1. For the numerical methods used in
the computation of the normal form coefficients, but also for the meaning and use of these
coefficients we refer to [25] in the equilibrium case and to [9] in the limit cycle case. We note
that the MatCont directory LimitCycleCodim2 is exclusively devoted to the computation
of normal form coefficients of codim 2 bifurcations of limit cycles.
and wbor , vbor ∈ Rn are chosen such that the matrix in (56) is nonsingular. An advantage of
this method is that the derivatives of g can be obtained easily from the derivatives of fu (u, α):
gz = −wT (fu )z v
68
To detect these singularities, we first define bp + 3 test functions, where bp is the number of
branch parameters:
•
0
(2fu (u, α) ⊙ In ) w1 ...
φ2 (u, α) =
\
0
(58)
v1T d
1 n+1
• φ3 = wT fuu [v, v]
• φi = wT fβi (u, α)
In these expressions v, w are the vectors computed in (56) and(57) respectively, ⊙ is the
bialternate matrix product, v1 , w1 are n(n−1)
2 vectors chosen so that the square matrix in (58)
is non-singular, and βi (branch parameters) are components of α. The singularity matrix for
bp = 0 is:
0 0 −
S= 1 0 − (59)
− − 0
The number of branch parameters is not fixed. If the number of branch parameters is 2
then this matrix has two more rows and columns. This singularity matrix is automatically
extended:
0 0 − − −
1 0 − − −
S= − − 0 − −
− − − 0 −
− − − − 0
In this command xnew must be a vector that contains the values of the state variables.
p must contain the current values of all the parameters and ap must be the indices of
69
the 2 active parameters. In the most natural situation where x is the matrix returned
by the previous equilibrium curve continuation one starts to build xnew by the command
xnew=x(1:nphase,s(i).index), where nphase is the number of state variables and s(i) is
the special point structure of the detected fold point on the equilibrium curve continuation.
Next, the command p(ap old)=x(end,s(i).index); replaces the old value of the free pa-
rameter in the previous run by the newly found parameter p. odefile specifies the ode-file to
be used. bp are the optional indices of the branch parameters. It also works without entering
a value for this field.
MatCont provides four other initializers which allow to continue a fold curve from a
codim 2 equilibrium bifurcation, namely init BP LP.m, init BT LP.m, init CP LP.m and
init ZH LP.m. In fact, these initializers are only added for ease of use: they refer back to
init LP LP.m.
8.1.4 Adaptation
It is possible to adapt the problem while generating the fold curve. This call updates the
auxiliary variables used in the defining system of the computed branch. The bordering vectors
vbor and wbor may require updating since they must at least be such that the matrices in (56)
and (57) are nonsingular. Updating is done by replacing vbor and wbor by the normalized
vectors v, w computed in (56) and (57) respectively.
p=[2.5;2.204678;10;0.0675;1;0.1;0.4];
ap1=[2];
[x0,v0]=init_EP_EP(@cataloscill,[0.001137;0.891483;0.062345],p,ap1);
opt=contset;
opt=contset(opt,’MaxStepSize’,0.025);
opt=contset(opt,’MaxNumPoints’,78);
opt=contset(opt,’Singularities’,1);
[x,v,s,h,f]=cont(@equilibrium,x0,[],opt);
cpl(x,v,s,[4,1]);
This set of commands is run by executing the file testequilcataloscill in the Mat-
Cont directory Testruns. The command line output is the following:
>> testequilcataloscill
first point found
70
0.16
0.14
0.12
0.1
0.08 H
x
0.06 LP
0.04
LP
0.02 H
0
0.8 1 1.2 1.4 1.6 1.8 2 2.2
q2
Figure 16: Computed equilibrium curve in the catalytic oscillar system (60)
The results are plotted using the plot function cpl where the fourth argument selects the
fourth and first components of the solution which are the parameter q2 and the coordinate x.
The results can be seen in Figure 16 where the axes labels are added manually.
We now add a forward and a backward fold continuation from the first LP detected on
the previous equilibrium curve; q2 and k are free in both runs.
p=[2.5;2.204678;10;0.0675;1;0.1;0.4];
ap1=[2];
[x0,v0]=init_EP_EP(@cataloscill,[0.001137;0.891483;0.062345],p,ap1);
opt=contset;
opt=contset(opt,’MaxStepSize’,0.025);
opt=contset(opt,’MaxNumPoints’,78);
opt=contset(opt,’Singularities’,1);
[x,v,s,h,f]=cont(@equilibrium,x0,[],opt);
cpl(x,v,s,[4,1]);
’press any key’
71
pause
x1=x(1:3,s(3).index);
p(ap1)=x(end,s(3).index);
[x0,v0]=init_LP_LP(@cataloscill,x1,p,[2,7]);
[x2,v2,s2,h2,f2]=cont(@limitpoint,x0,v0,opt);
hold on;
cpl(x2,v2,s2,[4,1]);
’press any key’
pause
opt=contset(opt,’Backward’,1);
[x3,v3,s3,h3,f3]=cont(@limitpoint,x0,v0,opt);
hold on
cpl(x3,v3,s3,[4,1]);
This set of commands is run by executing the file testLPcataloscill in the MatCont
directory Testruns. The command line output is the following:
>> testLPcataloscill
first point found
tangent vector to first point found
label = H , x = ( 0.016357 0.523973 0.328336 1.051558 )
First Lyapunov coefficient = 1.070259e+01
label = LP, x = ( 0.024717 0.450257 0.375018 1.042049 )
a=-1.166509e-01
label = LP, x = ( 0.054030 0.302241 0.459807 1.052200 )
a=1.346534e-01
label = H , x = ( 0.077929 0.233063 0.492149 1.040991 )
First Lyapunov coefficient = 4.332247e+00
ans =
ans =
72
0.16
0.14
0.12 BT
0.1
0.08 H
x
0.06 LP
0.04 CP
LP
0.02 H BT
0
0.8 1 1.2 1.4 1.6 1.8 2 2.2
q2
Figure 17: Computed equilibrium and fold curves in the catalytic oscillator system (60)
The results are plotted in Figure 17, where, as usual, the axis labels are added manually.
73
where fu has eigenvalues ±iω, ω > 0, k = ω 2 and Vbor , Wbor ∈ Rn×2 are chosen such that the
matrix in (62) is nonsingular. i1 , j1 , i2 , j2 , Vbor and Wbor are auxiliary variables that can be
adapted. This method is implemented in the curve definition file hopf.m.
• φ1 = k
• φ2 = det(fu )
0
(2fu (u, α) ⊙ In ) w1 ...
• φ3 =
\
0
v1T d
1 n+1
74
Also an initial point x0 has to be known. All this information can be supplied using the
following command:
[x0,v0]=init H H(@odefile, xnew, p, ap).
The input arguments odefile, xnew, p, ap are built exactly as in init LP LP. The output
vector x0 consists of xnew extended with the free parameters and paramter k from (62).
MatCont provides four other initializers which allow to continue a Hopf curve by starting
from a codim 2 equilibrium point. These are init BT H.m, init GH H.m, init HH H.m and
init ZH H.m These initializers are added merely for ease of use since they refer back to
init H H.m. However, we note that two Hopf curves pass through a Hopf point. So it can
be necessary to specify the tangent vector to the desired Hopf curve.
8.2.4 Adaptation
It is possible to adapt the problem while generating the Hopf curve. This call updates
the auxiliary variables used in the defining system of the computed branch. The bordering
matrices Vbor and Wbor may require updating since they must at least be such that the matrix
in (62) is nonsingular. Updating of Vbor and Wbor is done exactly as in the LP case. Updating
of i1 , j1 , i2 , j2 is done in such a way that the linearized system of (61) is as well-conditioned
as possible.
8.2.5 Example
For this example we again use the system (60). The starting vector is calculated from the
first Hopf bifurcation point detected in the equilibrium continuation example (see 8.1.5). q2
and k are free.
p=[2.5;2.204678;10;0.0675;1;0.1;0.4];
ap1=[2];
[x0,v0]=init_EP_EP(@cataloscill,[0.001137;0.891483;0.062345],p,ap1);
opt=contset;
opt=contset(opt,’MaxStepSize’,0.025);
opt=contset(opt,’MaxNumPoints’,78);
opt=contset(opt,’Singularities’,1);
[x,v,s,h,f]=cont(@equilibrium,x0,[],opt);
cpl(x,v,s,[4,1]);
’press any key’
pause
x1=x(1:3,s(3).index);
p(ap1)=x(end,s(3).index);
[x0,v0]=init_LP_LP(@cataloscill,x1,p,[2,7]);
[x2,v2,s2,h2,f2]=cont(@limitpoint,x0,v0,opt);
hold on;
cpl(x2,v2,s2,[4,1]);
’press any key’
pause
opt=contset(opt,’Backward’,1);
[x3,v3,s3,h3,f3]=cont(@limitpoint,x0,v0,opt);
75
hold on
cpl(x3,v3,s3,[4,1]);
’press any key’
pause
x1=x(1:3,s(2).index);
p(ap1)=x(end,s(2).index);
[x0,v0]=init_H_H(@cataloscill,x1,p,[2 7]);
opt=contset;
opt=contset(opt,’Singularities’,1);
opt=contset(opt,’MaxStepsize’,0.1);
opt=contset(opt,’backward’,0);
[x4,v4,s4,h4,f4]=cont(@hopf,x0,v0,opt);
hold on;
cpl(x4,v4,s4,[4 1]);
This set of commands is executed by the file testLPHopfcataloscill.m in the directory
Testruns. The command line output is
>> testLPHopfcataloscill
first point found
tangent vector to first point found
label = H , x = ( 0.016357 0.523973 0.328336 1.051558 )
First Lyapunov coefficient = 1.070259e+01
label = LP, x = ( 0.024717 0.450257 0.375018 1.042049 )
a=-1.166509e-01
label = LP, x = ( 0.054030 0.302241 0.459807 1.052200 )
a=1.346534e-01
label = H , x = ( 0.077929 0.233063 0.492149 1.040991 )
First Lyapunov coefficient = 4.332247e+00
ans =
76
ans =
ans =
The results are plotted in Figure 18 using the standard plot function cpl where the fourth
argument is used to select the fourth and first components of the solution which are the
parameter q2 and the coordinate x.
We not that the BT points are detected twice, namely on both the fold curve and the Hopf
curve. Also, the Hopf curve is a closed curve but only the part between the two BT points that
intersects the equilibrium curve consists of Hopf points. The other part consists of neutral
saddle equilibria which have two real eigenvalues with sum zero.
77
0.16
0.14
0.12 BT
BT
0.1
0.08 H
x
GH
0.06 LP
0.04 CP
LP
0.02 GH H BT
BT
0
0.6 0.8 1 1.2 1.4 1.6 1.8 2 2.2
q2
Figure 18: Computed equilibrium, fold and Hopf curves in the catalytic oscillator model (60)
The first method (using system (64) and (65)) is implemented in the curve definition file
perioddoubling. The other method is implemented in perioddoubling2. We will not use
it further and it should not be confused with the continuation of the period doubled curve
that branches off in a PD point on a limit cycle curve.
78
8.3.2 Output of a continuation of period doubling bifurcation points
The x− output is in this case a matrix and each column corresponds to a computed period
doubling limit cycle. The last three components of each column contain the value of the
period T and the values of the two active parameters, in that order.
79
P N Pm R1 ∗
To normalize (v1∗ )W1 we require i=1
∗
j=1 |((v1 )W1 )ij |1 = 1. Then 0 hv1 (t), v1 (t)idt is
approximated by (v1∗ )TW1 LC×M v1M and if this quantity is nonzero, v1W ∗ is rescaled so that
R1 ∗ 1 ∗
0 hv1 (t), v1 (t)idt = 2 . We compute ψ1W by solving
∗ T D − T A(t)
(ψ1W ) =0
δ0 − δ1 disc
∗
P N Pm ∗)
R1 ∗
and normalize ψ1W 1
by requiring i=1 j=1 |((ψ 1 W 1 ) ij | 1 = 1. Then 0 hψ1 (t), F (u0,1 (t))idt
is approximated by (ψ1∗ )TW1 (F (u0,1 (t)))C and if this quantity is nonzero, ψ1W ∗ is rescaled so
R1 ∗ ∗ T
that 0 hψ1 (t), F (u0,1 (t))idt = 1. a1 can be computed as (ψW1 ) (B(t, v1M , v1M ))C . The
computation of (h2,1 )M is done by solving
(D − T A(t))C×M (h2,1 )M = (B(t; v1M , v1M ))C + 2a1 (F (u0,1 (t)))C , t ∈ [0, 1]
(δ(0) − δ(1))(h2,1 )M = 0,
∗ )T L
(ψW 1 C×M (h2,1 )M = 0.
8.3.5 Example
For this example the adaptive control system
ẋ = y
ẏ = z (69)
ż = −αz − βy − x + x2
80
from §7.7 is used again. The starting vector x0 is calculated from the Period Doubling
bifurcation detected in the limit cycle example (section 7.7) using init PD PD. Continuation
is done using a call to the standard continuer with perioddoubling as curve definition file.
The results are plotted using the standard plot function cpl where the fourth argument is
used to select the 245th and 246th component of the solution which are the parameters α and
β. The results can be seen in Figure 19. The labels of the plot are added manually. It can
be tested by the command testadapt3.
>> [x0,v0]=init_EP_EP(@adaptx,[0;0;0],[-10;1],[1]);
>> opt = contset; opt = contset(opt,’Singularities’,1);
>> [x,v,s,h,f]=cont(@equilibrium,x0,[],opt);
first point found
tangent vector to first point found
label = H , x = ( 0.000000 0.000000 0.000000 1.000002 )
First Lyapunov coefficient = -3.000001e-01
81
1.8
R2
1.6
1.4
1.2
0.8
R2
0.6
0.4
-1.5 -1 -0.5 0 0.5 1 1.5
We note that xpd is a 246 × 300 matrix; each column corresponds to a computed period
doubling limit cycle and gives the coordinates of all points of the fine mesh, i.e. 243 =
(20 × 4 + 1) × 3 values, plus the period T as the 244 − th component and the values of the
two active parameter α, β as the 245−th and 246−the components.
82
where G is defined by requiring
0
v 0
N1 S =
0 . (71)
G
1
Here v is a function, S and G are scalars and
D − T fu (u(t), α) − f (u(t), α) w01
δ1 − δ0 0 w02
N1 =
(72)
Intf (u(·),α) 0 w03
Intv01 v02 0
where the bordering functions v01 , w01 , vector w02 and scalars v02 and w03 are chosen so that
N 1 is nonsingular [15]. This method (using system (71) and (72)) is implemented in the curve
definition file limitpointcycle. The discretization is done using orthogonal collocation in
the same way as it was done for limit cycles.
83
By discretization we obtain
D − T A(t)
(ϕ∗1W )T = 0.
δ0 − δ1 disc
P Pm R1 ∗
To normalize (ϕ∗1 )W1 we require N i=1
∗
j=1 ((v1 )W1 )(i−1)m+j 1 = 1. Then 0 hϕ1 (t), v1 (t)idt
is approximated by (ϕ∗1 )TW1 LC×M v1M and if this quantity is nonzero, ϕ∗1W is rescaled so that
R1 ∗
0 hϕ1 (t), v1 (t)idt = 1.
So the third expression for the normal form coefficient b becomes
1
b = ((ϕ∗1W1 )T ((B(t; v1M , v1M )C + 2(A(t)v1 (t))C )).
2
In the fourth expression, M is the monodromy matrix.
In the fifth expression, M 2 is the (n − 2) × (n − 2) matrix that restricts the n × n matrix
M to the space orthogonal to the two-dimensional left eigenspace of the two multipliers that
are closest to 1.
The number of branch parameters is not fixed. If the number of branch parameters is 3
then this matrix has three more rows and columns. This singularity matrix is automatically
extended:
0 − − − −
− 0 − − −
S= − − 0 − − .
− − − 0 −
− − − 1 0
84
8.4.4 Example: the fast Morris-Lecar equations
We consider the following system
v̇ = y − 0.5(v + 0.5) − 2w(v + 0.7) − m∞ (v − 1)
(74)
ẇ = 1.15(w∞ − w)τ
p=[0.11047;0.1];ap1=[1];
[x0,v0]=init_EP_EP(@MLfast,[0.047222;0.32564],p,ap1);
opt=contset;
opt=contset(opt,’Singularities’,1);
opt=contset(opt,’MaxNumPoints’,65);
opt=contset(opt,’MinStepsize’,0.00001);
opt=contset(opt,’MaxStepsize’,0.01);
opt=contset(opt,’Backward’,1);
[x,v,s,h,f]=cont(@equilibrium,x0,[],opt);
cpl(x,v,s,[3 1]);
>> testEquilMLfast
first point found
tangent vector to first point found
label = H , x = ( 0.036756 0.294770 0.075658 )
First Lyapunov coefficient = 8.238955e+00
label = LP, x = ( -0.033738 0.136501 -0.020727 )
a=-1.036700e+01
Neutral saddle
label = H , x = ( -0.119894 0.045956 0.033207 )
label = LP, x = ( -0.244914 0.008514 0.083257 )
a=-2.697425e+00
We find a Hopf (H) bifurcation point at y = 0.075659, two limit points (LP) at y =
−0.020727 and y = 0.083257 and a neutral saddle (H) at y = 0.033207. There are stable
equilibria before the first H point and after the second LP point and unstable equilibria
85
0.05 H
0
LP
-0.05
-0.1
H
-0.15
-0.2
LP
-0.25
-0.3
-0.35
-0.04 -0.02 0 0.02 0.04 0.06 0.08 0.1 0.12
between the first H point and the second LP point. The Lyapunov coefficient in the first
Hopf point l1 = 8.234573 is positive which means that the periodic orbits are born unstable.
The results are plotted using the plot function cpl, cf. §3.9 where the fourth argument is
used to select the third and first component of the solution which are the parameter y and
the coordinate v. The results can be seen in Figure 20.
The detected Hopf point is used to start a limit cycle continuation. We choose N = 30
test intervals and m = 4 collocation points for the discretization.
testEquilMLfast
x1=x(1:2,s(2).index);p=[x(end,s(2).index);0.1];
[x0,v0]=init_H_LC(@MLfast,x1,p,ap1,0.0001,30,4);
opt=contset;
opt=contset(opt,’IgnoreSingularity’,1);
opt=contset(opt,’Singularities’,1);
opt=contset(opt,’MaxNumPoints’,50);
[x2,v2,s2,h2,f2]=cont(@limitcycle,x0,v0,opt);
plotcycle(x2,v2,s2,[1 2]);
>> testLCMLfast
first point found
tangent vector to first point found
label = H , x = ( 0.036756 0.294770 0.075658 )
First Lyapunov coefficient = 8.238955e+00
label = LP, x = ( -0.033738 0.136501 -0.020727 )
a=-1.036700e+01
label = H , x = ( -0.119894 0.045956 0.033207 )
label = LP, x = ( -0.244914 0.008514 0.083257 )
86
0.4
0.35
0.3
0.25
w
0.2
0.15
0.1
0.05
−0.1 −0.05 0 0.05 0.1
v
Figure 21: Computed limit cycle curve started from a Hopf bifurcation
a=-2.697425e+00
The periodic orbit is initially unstable. We detect a limit point of cycles LPC at y =
0.084569. At this point the stability is gained. Afterwards the stability is preserved but the
period tends to infinity and the periodic orbits end in a homoclinic orbit. The results can be
seen in Figure 21.
We now compute a curve of fold bifurcations of limit cycles. The starting vector x0 is cal-
culated from the LPC on the previously computed curve of limit cycles, using init LPC LPC.
Continuation is done using a call to the standard continuer with limitpointcycle as curve
definition file. We free both y and z to continue the LPC curve through this LPC point. The
computations are done by executing the script testLPCMLfast.m:
testEquilMLfast
87
x1=x(1:2,s(2).index);p=[x(end,s(2).index);0.1];
[x0,v0]=init_H_LC(@MLfast,x1,p,ap1,0.0001,30,4);
opt=contset;
opt=contset(opt,’IgnoreSingularity’,1);
opt=contset(opt,’Singularities’,1);
opt=contset(opt,’MaxNumPoints’,50);
opt=contset(opt,’FunTolerance’,0.0000001);
opt=contset(opt,’VarTolerance’,0.0000001);
[x2,v2,s2,h2,f2]=cont(@limitcycle,x0,v0,opt);
[x0,v0]=init_LPC_LPC(@MLfast,x2,s2(2),[1 2],30,4);
opt=contset;
opt=contset(opt,’FunTolerance’,0.0001);
opt=contset(opt,’VarTolerance’,0.0001);
opt=contset(opt,’MaxNumPoints’,30);
%opt=contset(opt,’Backward’,1);
opt=contset(opt,’Singularities’,1);
[x3,v3,s3,h3,f3]=cont(@limitpointcycle,x0,v0,opt);
plotcycle(x3,v3,s3,[1 2]);
>> testLPCMLfast
first point found
tangent vector to first point found
label = H , x = ( 0.036756 0.294770 0.075658 )
First Lyapunov coefficient = 8.238955e+00
label = LP, x = ( -0.033738 0.136501 -0.020727 )
a=-1.036700e+01
Neutral saddle
label = H , x = ( -0.119894 0.045956 0.033207 )
label = LP, x = ( -0.244914 0.008514 0.083257 )
a=-2.697425e+00
88
0.4
0.35
0.3
w
0.25
0.2
0.15
-0.08 -0.06 -0.04 -0.02 0 0.02 0.04 0.06 0.08 0.1 0.12
v
Figure 22: Computed fold of limit cycles curve started from a fold bifurcation of limitcycles
The results are plotted using the standard plot function plotcycle where the fourth
argument is used to select the coordinates. The results can be seen in Figure 22. We note
that it shrinks to a single point. The labels of the plot are added manually .
where
G11 G12
G=
G21 G22
89
is defined by requiring
0 0
v1 v2 0 0
N 3 G11 G12 =
. (76)
1 0
G21 G22
0 1
Here v 1 and v 2 are functions and G11 , G12 , G21 and G22 are scalars and
D − T fx (x(·), α) w11 w12
δ0 − 2κδ1 + δ2 w21 w22
N3 =
(77)
Intv01 0 0
Intv02 0 0
where the bordering functions v01 , v02 , w11 , w12 , vectors w21 and w22 are chosen so that N 3 is
nonsingular [15]. We note that an additional variable κ is introduced in (75). This method
(using system (76) and (77)) is implemented in the curve definition file neimarksacker.m.
The discretization is done using orthogonal collocation over the interval [0 2]. The additional
variable κ is introduced as the last continuation variable of neimarksacker.m, after the state
variables, the period and the two active system parameters.
• ψ2 = κ + 1
• ψ3 = κ − 1/2
• ψ4 = κ
• ψ6 = Re(d)
90
• ψ7 = det (M + In )
• ψ8 = det ((M 2 ⊙ M 2) − In )
where v1M is computed by solving
D − T A(t) + iθI
v1M = 0. (78)
δ0 − δ1 D
P Pm
The normalization of v1M is done by requiring N i=1 j=0 σj h(v1M )ij , (v1M )ij iti = 1 where
σj is the Gauss-Lagrange quadrature coefficient. By discretization we obtain
∗ H D − T A(t) + iθ
(v1W ) = 0.
δ0 + δ1 disc
P N Pm R1 ∗
To normalize (v1∗ )W1 we require i=1
∗
j=1 |((v1 )W1 )ij |1 = 1. Then 0 hv1 (t), v1 (t)idt is
approximated by (v1∗ )TW1 LC×M v1M and if this quantity is nonzero, v1W ∗ is rescaled so that
R1 ∗ ∗
0 hv1 (t), v1 (t)idt = 1. We compute ϕ1W by solving
∗ T D − T A(t)
(ϕ1W ) =0
δ0 − δ1 disc
P Pm R1 ∗
and normalize ϕ∗1W1 by requiring N i=1
∗
j=1 |((ϕ1 )W1 )ij |1 = 1. Then 0 hϕ1 (t), F (u0,1 (t))idt
is approximated by (ϕ∗1 )TW1 (F (u0,1 (t)))C and if this quantity is nonzero, ϕ∗1W is rescaled so
R1
that 0 hϕ∗1 (t), F (u0,1 (t))idt = 1. We compute h20,1M by solving
D − T A(t) + 2iθI B(t, v1M (t), v1M (t))
h20,1M = .
δ0 − δ1 disc
0
91
8.5.3 Torus bifurcation initialization
One way to start a continuation of torus bifurcations of cycles supported in the current version
is to start it from a torus bifurcation point or neimarksacker point (NS) on a limit cycle curve.
This can be done using the following command: [x0,v0]=init NS NS(@odefile, x, s, ap,
ntst, ncol). x should be the x as returned by the previous limit cycle continuation. s is
the special point structure of the detected torus bifurcation point on the limit cycle curve.
odefile specifies the ode-file to be used. ap is the array containing the two active parameters
and ntst and ncol are again the number of mesh and collocation points for the discretization.
MatCont provides seven other initializers to start the continuation of torus bifurcations
from codim2 bifurcations of limit cycles. These all have the form init XYX NS where XYX is
one of {CH,LP,PD,R1,R2,R3,R4}. They are introduced for ease of use since they all refer
back to init NS NS.m.
More interesting and indeed nontrivial initializers are init HH NS1.m, init HH NS2.m
and init ZH NS. Indeed, two different torus bifurcation curves can generically cross a HH
point. Computational methods to switch to nonhyperbolic cycles from codim 2 bifurcations
of equilibria are discussed in [29].
ż = y + ǫ
where ǫ is a new (artificial) parameter with initially ǫ = 0.001. The perturbed system is
introduced in MatCont in the odefile torBPC.m in the directory Testruns/TestSystems.
It contains a user function ǫ so that the zeroes of the user function correspond to solutions
of the unperturbed system (80).
The trivial solution is replaced by the equilibrium solution x = 0.00125, y = −0.001,
z = 0.00052502 of the perturbed system torBPC.m and we compute a branch of equilibria
with free parameter ν in the now standard way (note that ν is the sixth parameter, ǫ is the
seventh):
>> p=[0.5;-0.6;0.6;0.32858;0.93358;-0.9;0.001];
>> [x0,v0]=init_EP_EP(@torBPC,[0.00125;-0.001;0.00052502],p,[6]);
92
>> opt=contset; opt= contset(opt,’Singularities’,1);
>> opt=contset(opt,’MaxNumPoints’,10);
>> [x,v,s,h,f]=cont(@equilibrium,x0,[],opt);
first point found
tangent vector to first point found
label = H , x = ( 0.005604 -0.001000 0.002702 -0.589286 )
First Lyapunov coefficient = -4.548985e-001
A Hopf point is found for ν = −0.58928 for the state values x = 0.0056037, y = −0.001,
z = 0.0027021. We start a curve of periodic orbits from this Hopf point, using N = 25 test
intervals and m = 4 collocation points and choosing ν as the free parameter. The results can
be seen in Figure 23.
The previous computations are done by running the script testtorBPC1, including drawing
Figure 23 in which the Hopf point and the three bifurcations of limit cycles are clearly visible.
The axis labels were added manually.
In particular, we detect a torus bifurcation point at ν = −0.59575. To recover the torus
bifurcation point of (80) we continue the torus bifurcation in two parameters ν, ǫ. With the
aid of the user function ǫ we will now locate a NS bifurcation of (80). The starting vector x1
is calculated from the NS on this branch using init NS NS. Continuation is done using a call
to the standard continuer with neimarksacker as curve definition file:
p=[0.5;-0.6;0.6;0.32858;0.93358;-0.9;0.001];
x=[0.00125;-0.001;0.00052502];
[x0,v0]=init_EP_EP(@torBPC,x,p,[6]);
opt=contset;
93
0.1
0.05
y
-0.05
-0.1
Figure 23: Computed limit cycle curve started from a Hopf bifurcation
opt=contset(opt,’Singularities’,1);
opt=contset(opt,’MaxNumPoints’,10);
[x,v,s,h,f]=cont(@equilibrium,x0,[],opt);
x1=x(1:3,s(2).index);
p(6)=x(end,s(2).index);
[x0,v0]=init_H_LC(@torBPC,x1,p,[6],0.0001,25,4);
opt=contset;
opt=contset(opt,’Singularities’,1);
opt=contset(opt,’Multipliers’,1);
opt=contset(opt,’MaxNumPoints’,50);
[x,v,s,h,f]=cont(@limitcycle,x0,v0,opt);
[x1,v1]=init_NS_NS(@torBPC,x,s(3),[6 7],25,4);
opt=contset;
opt=contset(opt,’VarTolerance’,1e-4);
opt=contset(opt,’FunTolerance’,1e-4);
opt=contset(opt,’Userfunctions’,1);
UserInfo.name=’epsilon0’;
UserInfo.state=1;
UserInfo.label=’E0’;
opt=contset(opt,’UserfunctionsInfo’,UserInfo);
opt=contset(opt,’Backward’,1);
opt=contset(opt,’MaxNumPoints’,16);
[xns1,vns1,sns1,hns1,fns1]=cont(@neimarksacker,x1,v1,opt);
plotcycle(xns1,vns1,sns1,[1 2]);
This continuation is done by running the script testtorBPC2. The output is the following:
94
>> testtorBPC2
first point found
tangent vector to first point found
label = H , x = ( 0.005604 -0.001000 0.002702 -0.589286 )
First Lyapunov coefficient = -4.549030e-01
95
0.1
0.05
y
-0.05
-0.1
Figure 24: Computed torus bifurcation curve started from a torus bifurcation of limit cycles
opt=contset(opt,’Multipliers’,1);
opt=contset(opt,’MaxNumPoints’,50);
[x,v,s,h,f]=cont(@limitcycle,x0,v0,opt);
[x2,v2]=init_NS_NS(@torBPC,x,s(3),[1 6],50,4);
opt=contset; opt=contset(opt,’VarTolerance’,1e-4);
opt=contset(opt,’FunTolerance’,1e-4);
opt=contset(opt,’MaxNumPoints’,50);
[xns2,vns2,sns2,hns,fns]=cont(@neimarksacker,x2,v2,opt);
plotcycle(xns2,vns2,sns2,[1 2]);
The output is as follows:
>> testtorBPC3
first point found
tangent vector to first point found
label = H , x = ( 0.005604 -0.001000 0.002702 -0.589286 )
First Lyapunov coefficient = -4.549030e-01
96
0.1
0.05
y
-0.05
-0.1
Figure 25: Computed torus bifurcation curve that shrinks to a single point
Here xns2 is a 607 × 50 matrix. The last four components of each column are, in that order,
the period of the orbit, the values of the two free parameters, and the value of the additional
variable κ that is introduced in (75).
97
9 Continuation of codim 2 bifurcations
9.1 Branch Point Continuation
Although the predecessor CONTENT [26] of MatCont included the continuation of codi-
mension 2 bifurcations of equilibria in three free parameters, this is so far not included in
MatCont. Though the initialization and continuation itself would not be too difficult, the
computation and interpretation of the normal form coefficients of the codim3 bifurcations
would be unfeasible. Nevertheless, MatCont includes the continuation of branch points of
equilibria and limit cycles in three parameters since this appears to be useful in some studies
of models with equivariance.
9.1.2 Bifurcations
In the current version no bifurcations are detected.
98
9.1.4 Example
For this example we use a model of a continuous stirred tank reactor (cstr.m):
ẋ = α3 − (1 + λ)x + λα1 /(1 + λα2 ∗ e−α4 x/(1+x) ) (83)
p=[0;0;0;3];ap1=[1];
[x0,v0]=init_EP_EP(@cstr,[-0.9],p,ap1);
opt=contset;
opt=contset(opt,’VarTolerance’,1e-3);
opt=contset(opt,’FunTolerance’,1e-3);
opt=contset(opt,’MaxNumPoints’,50);
opt=contset(opt,’Singularities’,1);
[x,v,s,h,f]=cont(@equilibrium,x0,[],opt);
first point found
tangent vector to first point found
label = LP, x = ( -0.143564 1.250669 )
a=1.550147e+000
label = LP, x = ( 0.393180 0.377651 )
a=-7.370472e-001
cpl(x,v,s,[2,1]);
The results are plotted using the plot function cpl where the fourth argument is used to
select the second and first components of the solution which are the parameter λ and the
coordinate x. The resulting curve is a part of Figure 26. These computations can be done by
running the script cstr1.
We start a fold continuation from the second LP detected on the previous equilibrium
curve; λ and β are free in this run.
x1=x(1,s(3).index);
p(ap1)=x(end,s(3).index);
[x0,v0]=init_LP_LP(@cstr,x1,p,[1 2],[1 2 3 4]);
opt=contset(opt,’MaxNumPoints’,300);
[x2,v2,s2,h2,f2]=cont(@limitpoint,x0,v0,opt);
first point found
tangent vector to first point found
label = BP1, x = ( 2.018621 0.581081 -4.709219 )
label = CP , x = ( 0.259553 1.968966 -0.090655 )
c=-8.847089e-001
label = BP1, x = ( 0.030643 1.772454 -0.127542 )
label = BP4, x = ( -0.000009 1.707401 -0.124964 )
label = CP , x = ( -0.173872 0.405524 0.608093 )
99
2.5
BP1
2
1.5
0.5 LP
CP
BP4 BP1
BP4
0 CP LP
−0.5
−1
−0.5 0 0.5 1 1.5 2
c=-2.263137e+000
label = BP4, x = ( -0.000000 0.421692 0.528995 )
Closed curve detected at step 164
100
2.5
BP1
2
1.5
0.5 LP
CP
BP1
0 BP4 LP BP4
CP
−0.5
−1
−0.5 0 0.5 1 1.5 2 2.5 3 3.5
Figure 27: Computed BP curves started from Branch Points detected on a fold curve.
hold on;
cpl(x3,v3,s3,[2,1]);
x1=x2(1,s2(5).index);
p([1 2])=x2(end-1:end,s2(5).index);
[x0,v0]=init_BP_BP(@cstr,x1,p,[1 2 3],4);
opt=contset(opt,’Backward’,1);
[x3,v3,s3,h3,f3]=cont(@branchpoint,x0,[],opt);
first point found
tangent vector to first point found
101
point using the minimal extended system is
dx
dt − T f (x, α) =0
x(0) − x(1) =0
R1 (84)
hx(t), ẋold (t)idt =0
0
G[x, T, α] =0
where
G1
G=
G2
is defined by requiring
0 0
0 0
v1 v2
N =
0 0 .
(85)
G1 G2
1 0
0 1
Here v1 and v2 are functions, G1 and G2 are scalars and
D − T fx (x(·), α) − f (x(·), α) − T fβ (x(·), α) w01
δ 1 − δ 0 0 0 w02
N = Intẋold (·) 0 0 w03 (86)
v11 v12 v13 0
v21 v22 v23 0
where the bordering operators v11 , v21 , function w01 , vector w02 and scalars v12 , v22 , v13 , v23
and w03 are chosen so that N is nonsingular [15][16].
9.2.2 Bifurcations
In the current version no bifurcations are detected.
102
9.2.4 Example
In this section we discuss a non-generic situation, i.e. a case with a symmetry and a contin-
uation of BPC points that involves two effective parameters and one artificial parameter.
For this example the following model is used:
ẋ = (−(β + ν)x + βy − a3 x3 + b3 (y − x)3 )/r
ẏ = βx − (β + γ)y − z − b3 (y − x)3 (87)
ż = y
which is the same system as in the torus of cycles continuation. It has a trivial solution branch
x = y = z = 0 for all parameter values. Moreover, it has the Z2 - symmetry x → −x,y → −y.
To compute the branch of BPC points with respect to ν through the BPC point that we will
detect on a limitcycle continued with free parameters ν, β, we need to introduce an additional
free parameter that breaks the symmetry. There are many choices for this; we choose to
introduce a parameter ǫ and extend the system (87) by simply adding a term +ǫ to the first
right-hand-side. For ǫ = 0 this reduces to (87) while for ǫ 6= 0 the symmetry is broken.
We start by computing the trivial branch with fixed parameters γ = −0.6, r = 0.6,
a3 = 0.328578, b3 = 0.933578, β = 0.5,ǫ = 0 and free parameter ν with initially ν = −0.9.
On this branch a Hopf point is detected for ν = −0.58933644 and a branch point of equilibria
for ν = −0.5.
>> p=[0.5;-0.6;0.6;0.32858;0.93358;-0.9;0];
>> [x0,v0]=init_EP_EP(@torBPC,[0;0;0],p,[6]);
>> opt=contset; opt= contset(opt,’Singularities’,1);
>> opt=contset(opt,’MaxNumPoints’,50);
>> [x,v,s,h,f]=cont(@equilibrium,x0,[],opt);
first point found
tangent vector to first point found
label = H , x = ( 0.000000 0.000000 0.000000 -0.589336 )
First Lyapunov coefficient = -4.563631e-001
label = BP, x = ( 0.000000 0.000000 0.000000 -0.500000 )
103
0.2
0.15
0.1
0.05
0
y
-0.05
-0.1
-0.15
-0.2
-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5
x
Figure 28: Curve of limit cycles with LPC and branch points in the circuit example.
104
0.15
0.1
0.05
0
y
−0.05
−0.1
−0.15
105
0.8
0.6
0.4
0.2
0
y
-0.2
-0.4
-0.6
-0.8
106
10 Continuation of homoclinic and heteroclinic orbits
10.1 Homoclinic orbits: Mathematical definition
In dynamical systems theory, an orbit corresponding to a solution u(t) is called homoclinic
to the equilibrium point u0 of the dynamical system if u(t) → u0 as t → ±∞. There are
two types of homoclinic orbits with codimension 1, namely homoclinic-to-hyperbolic-saddle
(HHS), whereby u0 is a saddle, saddle-focus or bi-focus, and homoclinic-to-saddle-node (HSN),
whereby u0 is a saddle-node (i.e., exhibits a limit point bifurcation). We recall that auto
has a toolbox for homoclinic continuation, named HomCont [4], [5].
During the continuation, it is necessary to keep track of several eigenspaces of the equi-
librium in each step. To do this in an efficient way, MatCont incorporates the continuation
of invariant subspaces [7] into the defining system.
First, the infinite time interval is truncated, so that instead of [−∞, +∞] we use [−T, +T ],
which is scaled to [0, 1] and divided into mesh-intervals. The mesh is nonuniform and adap-
tive. Each mesh interval is further subdivided by equidistant fine mesh points. Also, each
mesh interval contains a number of collocation points. (This discretization is the same as
that in auto for boundary value problems.) The equation
f (x0 , α) = 0. (89)
Third, there is a so-called phase condition needed for the homoclinic solution, similar to
periodic solutions Z 1
∗
x
ė (t)[x(t) − x
e(t)]dt = 0. (90)
0
Here xe(t) is some initial guess for the solution, typically obtained from the previous continua-
tion step. We note that in the literature another phase condition is also used, see, for example
[13]. However, in the present implementation we employ the condition (90).
Fourth, there are the homoclinic-specific constraints to the solution. For these we need
access to the stable and unstable eigenspaces of the system in the equilibrium point after
each step. It is not efficient to recompute the spaces from scratch in each continuation-step.
Instead, we use the algorithm for continuing invariant subspaces, as described in [7]. This
method adds two small-sized vectors (YS and YU ) to the system variables, from which the
necessary eigenspaces (stable and unstable, respectively) can easily be computed in each step.
107
If Q(0) is an orthogonal matrix whose first m columns form a basis for the invariant sub-
space under consideration in the previous step, and A = fx (x0 , α) is the Jacobian at the new
equilibrium point, then we first compute the so-called Ricatti-blocks, Tij , by the formula
T11 T12
= Q(0)T A Q(0). (91)
T21 T22
If n is the number of state variables, then T11 is of size m × m and T22 is (n − m) × (n − m).
This is done for the stable and unstable eigenspaces separately. Now YS and YU are obtained
from the Ricatti equations
Now we can formulate constraints on the behavior of the solution close to the equilibrium
x0 . The initial vector of the orbit, (x(0) − x0 ), is placed in the unstable eigenspace of the
system in the equilibrium. We express that by the requirement that it is orthogonal to the
orthogonal complement of the unstable eigenspace. Using YU , we can compute the orthogonal
complement of the unstable eigenspace. If QU (0) is the orthogonal matrix from the previous
step, related to the unstable invariant subspace, then a basis for the orthogonal complement
in the new step Q⊥ U (s) is
⊥ −YUT
QU (s) = QU (0) .
I
Note that Q⊥
U (s) is not orthogonal. The full orthogonal matrix Q1U needed for the next step,
is computed separately after each step. The equations to be added to the system are (after
analogous preparatory computations for the stable eigenspace)
Q⊥ T
U (s) (x(0) − x0 ) = 0, (93)
⊥ T
QS (s) (x(1) − x0 ) = 0.
Finally, the distances between x(0) (resp., x(1)) and x0 must be small enough, so that
kx(0) − x0 k − ǫ0 = 0,
(94)
kx(1) − x0 k − ǫ1 = 0.
A system consisting of all equations (88), (89), (90), (92), (93) and (94), is overdetermined.
The basic defining system for the continuation of a HHS orbit in two free parameters consists
of (88), (89), (92), (93), and (94) with fixed ǫ0,1 , so that the phase condition (90) is not used.
The variables in this system are stored in one vector. It contains the values of x(t) in the
fine mesh points including x(0) and x(1), the truncation time T , two free system parameters,
the coordinates of the saddle x0 , and the elements of the matrices YS and YU . Alternatively,
the phase condition (90) can be added if T is kept fixed but ǫ0 and ǫ1 are allowed to vary.
It is also possible to fix T and ǫ0 , say, and allow ǫ1 to vary, again with no phase condition.
Other combinations are also possible, in particular, when the homotopy method [7] is used
to compute a starting homoclinic solution. For more details on the implementation of the
homoclinic continuation we refer to [19].
108
10.1.2 Homoclinic-to-Saddle-Node Orbits
For a homoclinic orbit to a saddle-node equilibrium, the extended defining system undergoes
some small changes. Now (x(0) − x0 ) has to be placed in the center-unstable subspace.
Analogously, (x(1) − x0 ) must be in the center-stable subspace. This again is implemented
by requiring that the vector is orthogonal to the orthogonal complement of the corresponding
space. So the equations (93) themselves do not really change; the changes happen in the
computation of the matrices Q. The defining system now has one equation less than in
the HHS case (ns + nu < n, with ns the dimension of the stable, and nu of the unstable
eigenspace); the number of equations is restored however, by adding the constraint that the
equilibrium must be a saddle-node. For this we use the bordering technique, as described in
section 4.2.1 of [22].
10.2 Bifurcations
During HSN continuation, only one bifurcation is tested for, namely the non-central homoclinic-
to-saddle-node orbit or NCH. This orbit forms the transition between HHS and HSN curves.
The strategy used for detection is taken from HomCont [5].
During HHS continuation, all bifurcations detected in HomCont are also detected in our
implementation. For this, mostly test functions from [5] are used.
Suppose that the eigenvalues of fx (x0 , α0 ) can be ordered according to
where ℜ() stands for ’real part of’, ns is the number of stable, and nu the number of unstable
eigenvalues. The test functions for the bifurcations are
ψ = ℜ(µ1 ) + ℜ(λ1 )
If both µ1 and λ1 are real, then it is a neutral saddle, if one is real and one consists of a
pair of complex conjugates, the bifurcation is a saddle-focus, and it is a bi-focus when
both eigenvalues consist of a pair of complex conjugates.
109
• Neutrally-divergent saddle-focus (unstable)
ψ = ℜ(µ1 ) − ℜ(µ3 )
ψ = ℜ(λ1 ) + ℜ(λ3 )
• Non-central homoclinic-to-saddle-node
ψ = ℜ(µ1 )
• Shil’nikov-Hopf
ψ = ℜ(λ1 )
• Bogdanov-Takens point
ℜ(µ1 )
ψ=
ℜ(λ1 )
For orbit- and inclination-flip bifurcations, we assume the same ordering of the eigenvalues
of fx (x0 , α0 ) = A(x0 , α0 ) as shown in (95), but also that the leading eigenvalues µ1 and λ1
are unique and real:
ℜ(µns ) ≤ ... ≤ ℜ(µ2 ) < µ1 < 0 < λ1 < ℜ(λ2 ) ≤ ... ≤ ℜ(λnu ) .
Then it is possible to choose normalised eigenvectors ps1 and pu1 of AT (x0 , α0 ) and q1s and q1u
of A(x0 , α0 ) depending smoothly on (x0 , α0 ), which satisfy
For the inclination-flip bifurcations, in [5] the following test functions are introduced:
110
• Inclination-flip with respect to the unstable manifold
where φ (φ ∈ C 1 ([0, 1], Rn )) is the solution to the adjoint system, which can be written as
φ̇(t) + 2 T AT (x(t), α0 ) φ(t) = 0
(L )T φ(1) = 0
s
(96)
(L u )T φ(0) = 0
R
1 eT e
0 φ (t)[φ(t) − φ(t)]dt = 0
where Ls and Lu are matrices whose columns form bases for the stable and unstable eigenspaces
of A(x0 , α0 ), respectively, and the last condition selects one solution out of the family cφ(t)
for c ∈ R. Lu is equivalent to QU from the mathematical definition of the system, and Ls to
QS . In the homoclinic defining system the orthogonal complements of QS and QU are used;
in the adjoint system for the inclination-flip bifurcation, we use the matrices themselves (or
at least, their transposed versions).
• the number of mesh and collocation points to use for the discretization.
Also, some initial information about the state variables is necessary. In the simplest cases
this is an initial cycle x0 with a large period and close to a homoclic orbit, or an already
known homoclinic orbit. This information can be supplied using an initializer:
111
• [x0,v0]=init Hom Hom(@odefile, x, s, p, ap, ntst, ncol, extravec, T, eps0,
eps1)
Calculates an initial homoclinic orbit from a homoclinic orbit obtained during a previous
continuation. All parameters are similar to the initialisations above.
These initializers return an initial homoclinic orbit x0 as well as its tangent vector v0.
It is also possible to start a homoclinic orbit from a Bogdanov-Takens equilibrium point.
The initialization of homoclinic orbits from a BT point has a long history. We refer in
particular to [30], [31] and [1] where further references can be found. This case is relegated
to the MatCont GUI tutorials.
The homotopy method even allows a start from any equilibrium point. For details and
examples we refer to [8]. This case is also relegated to the MatCont GUI tutorials.
>> init;
>> p=[0.11047;0.1];ap1=[1];
>> [x0,v0]=init_EP_EP(@MLfast,[0.047222;0.32564],p,ap1);
>> opt=contset;opt=contset(opt,’Singularities’,1);
>> opt=contset(opt,’MaxNumPoints’,65);
>> opt=contset(opt,’MinStepSize’,0.00001);
>> opt=contset(opt,’MaxStepSize’,0.01);
>> opt=contset(opt,’Backward’,1);
>> [x,v,s,h,f]=cont(@equilibrium,x0,[],opt);
first point found
tangent vector to first point found
label = H , x = ( 0.036756 0.294770 0.075659 )
First Lyapunov coefficient = 8.234573e+000
label = LP, x = ( -0.033738 0.136501 -0.020727 )
a=-1.036706e+001
label = H , x = ( -0.119894 0.045956 0.033207 )
Neutral saddle
label = LP, x = ( -0.244915 0.008514 0.083257 )
a=2.697414e+000
112
>> x1=x(1:2,s(2).index);p=[x(end,s(2).index);0.1];
>> [x0,v0]=init_H_LC(@MLfast,x1,p,ap1,0.0001,30,4);
>> opt=contset;
>> opt=contset(opt,’MaxStepSize’,1);
>> opt=contset(opt,’IgnoreSingularity’,1);
>> opt=contset(opt,’Singularities’,1);
>> opt=contset(opt,’MaxNumPoints’,200);
>> [x2,v2,s2,h2,f2]=cont(@limitcycle,x0,v0,opt);
first point found
tangent vector to first point found
Limit point cycle (period = 4.222011e+000, parameter = 8.456948e-002)
Normal form coefficient = -2.334576e-001
Limit point cycle (period = 5.653399e+001, parameter = 7.293070e-002)
Normal form coefficient = 1.132235e+000
Limit point cycle (period = 5.739877e+001, parameter = 7.293070e-002)
Normal form coefficient = 3.266287e+000
Limit point cycle (period = 8.938964e+001, parameter = 7.293071e-002)
Normal form coefficient = -1.537206e-001
The above computations can be done by running the script homoc1. The picture is pre-
sented in Figure 31. Similar tests can be done by using the testrun testmyml.
113
0.4
0.35
0.3
0.25
w
0.2
0.15
0.1
0.05
Figure 31: Computed curve of homoclinic-to-saddle orbits started from a limit cycle with
large period.
114
A Continuer example: a curve object
In this section a simple example is presented to illustrate the basic use of the continuer. This
example generates a curve g in the (x, y)-plane such that x2 + y 2 = 1. So if the user specifies
a point reasonably close to this curve we get the unit circle. The defining function is
F (x, y) = x2 + y 2 − 1 (97)
In the following listing this curve is implemented. Do note that while there are no options
needed, the curve file must return an option structure (see section 3.3).
curve.m
1 function out = curve
2 %
3 % Curve file of circle
4 %
5
6 out{1} = @curve_func;
7 out{2} = @defaultprocessor;
8 out{3} = @options;
9 out{4} = []; %@jacobian;
10 out{5} = []; %@hessians;
11 out{6} = []; %@testf;
12 out{7} = []; %@userf;
13 out{8} = []; %@process;
14 out{9} = []; %@singmat;
15 out{10} = []; %@locate;
16 out{11} = []; %@init;
17 out{12} = []; %@done;
18 out{13} = @adapt;
19 function f = curve_func(arg)
20 x = arg;
21 f = x(1)^2+x(2)^2-1;
22
23 function varargout = defaultprocessor(varargin)
24 if nargin > 2
25 s = varargin{3};
26 varargout{3} = s;
27 end
28 % no special data
29 varargout{2} = [];
30 % all done succesfully
31 varargout{1} = 0;
32
33 function option = options
34 option = contset;
35
36 function [res,x,v] = adapt(x,v)
37 res=[];
38
curve.m
115
0.8
0.6
0.4
x(2) 0.2
−0.2
−0.4
−0.6
−0.8
>> init;
>> [x,v,s]=cont(@curve,[1;0]);
first point found
tangent vector to first point found
Closed curve detected at step 70
>> cpl(x,v,s)
In this case x has dimension 2, so a 2D-plot is drawn with the first component of x (value of
the state variable x) on the x-axis and the second component of x (value of the state variable
y) on the y-axis. The above commands are also executed by running testdrawcurve; the file
testdrawcurve.m is in the directory Testruns.
116
B The Brusselator example: Continuation of a solution to a
boundary value problem in a free parameter
Discretized solutions of PDEs can also be continued in CL MatCont. We illustrate this
by continuing the equilibrium solution to a one-dimensional PDE. The curve type is called
’pde 1’. It is defined in the file pdf 1.m in the directory Equilibrium.
The Brusselator is a system of equations intended to model the Belusov-Zhabotinsky
reaction. This is a system of reaction-diffusion equations that is known to exhibit oscillatory
behavior. The unknowns are the concentrations X(x, t), Y (x, t), A(x, t) and B(x, t) of four
reactants. Here t denotes time and x is a one-dimensional space variable normalized so that
x ∈ [0, 1]. The length L of the reactor is a parameter of the problem. In our simplified setting
A and B are constants.
The system is described by two partial differential equations:
∂X Dx ∂2X
∂t = L2 ∂x2
+ A − (B − 1)X + X 2 Y
∂Y Dy ∂2Y (98)
∂t = L2 ∂x2
+ BX − X 2 Y
with x ∈ [0, 1], t ≥ 0. Here Dx , Dy are the diffusion coefficients of X and Y . At the boundaries
x = 0 and x = 1 Dirichlet conditions are imposed:
X(0, t) = X(1, t) = A
(99)
Y (0, t) = Y (1, t) = B
A
We are interested in equilibrium solutions X(x) and Y (x) to the system and their dependence
on the parameter L.
The approximate equilibrium solution is:
X(x) = A + 2 sin(πx)
(100)
Y (x) = B 1
A − 2 sin(πx)
bruss.m
117
1 function out = bruss
2 %
3 % Odefile of 1-d Brusselator model
4 %
5
6 out{1} = @init;
7 out{2} = @fun_eval;
8 out{3} = @jacobian;
9 out{4} = @jacobianp;
10 out{5} = [];%@hessians;
11 out{6} = [];%@hessiansp;
12 out{7} = [];
13 out{8} = [];
14 out{9} = [];
15
16
17
18 % --------------------------------------------------------------------------
19
20
21 function dfdt = fun_eval(t,y,N,L)
22
23 x = y(1:N);
24 y = y(N+1:2*N);
25
26 A = 2;
27 B = 4.6;
28 Dx = 0.0016;
29 Dy = 0.008;
30 x0 = A; x1 = A;
31 y0 = B/A; y1 = B/A;
32 L2 = L^2;
33 h = 1/(N+1);
34 cx = (Dx/L2)/(h*h);
35 cy = (Dy/L2)/(h*h);
36
37 dxdt = zeros(N,1);
38 dydt = zeros(N,1);
39
40 dxdt(1) = (x0-2*x(1)+x(2))*cx + A - (B+1)*x(1) + x(1)*x(1)*y(1);
41 dxdt(N) = (x(N-1)-2*x(N)+x1)*cx + A - (B+1)*x(N) + x(N)*x(N)*y(N);
42
43 dydt(1) = (y0-2*y(1)+y(2))*cy + B*x(1) - x(1)*x(1)*y(1);
44 dydt(N) = (y(N-1)-2*y(N)+y1)*cy + B*x(N) - x(N)*x(N)*y(N);
45
46 for i=2:N-1
47 dxdt(i) = (x(i-1)-2*x(i)+x(i+1))*cx + A - (B+1)*x(i) + x(i)*x(i)*y(i);
48 dydt(i) = (y(i-1)-2*y(i)+y(i+1))*cy + B*x(i) - x(i)*x(i)*y(i);
49 end
50
51 dfdt = [dxdt; dydt];
52
53 % --------------------------------------------------------------------------
54
55 function [tspan,y0,options] = init(N)
56 tspan = [0; 10];
57 A = 2;
118
58 B = 4.6;
59
60 y0 = zeros(2*N,1);
61
62 for i=1:N
63 y0(i) = A + 2*sin(pi*i/(N+1));
64 y0(N+i) = B/A - 0.5*sin(pi*i/(N+1));
65 end
66 handles = feval(@bruss);
67 options = odeset(’Vectorized’,’on’, ’Jacobian’, handles(3), ’JacobianP’, handles(4));
68
69 % --------------------------------------------------------------------------
70
71 function dfdxy = jacobian(t,y,N,L)
72 x = y(1:N);
73 y = y(N+1:2*N);
74 A = 2;
75 B = 4.6;
76 Dx = 0.0016;
77 Dy = 0.008;
78 x0 = A; x1 = A;
79 y0 = B/A; y1 = B/A;
80 L2 = L^2;
81 h = 1/(N+1);
82 cx = (Dx/L2)/(h*h);
83 cy = (Dy/L2)/(h*h);
84
85
86 %
87 % Sparse jacobian
88 %
89 A=zeros(2*N,3);
90 A(1:N-1,2)=cx;
91 A(1:N,3)=-2*cx -(B+1) + 2*x(1:N).*y(1:N);
92 A(1:N,4)=cx;
93
94 A(N+1:2*N,2) = cy;
95 A(N+1:2*N,3) = -2*cy -x(:).*x(:);
96 A(N+2:2*N,4) = cy;
97
98
99 A(1:N,1) = B - 2*x(:).*y(:);
100 A(N+1:2*N,5) = x(:).*x(:);
101
102 dfdxy = spdiags(A, [-N,-1:1,N] , 2*N, 2*N);
103 return
104
105 %
106 % Full matrix
107 %
108 dfxdx = zeros(N,N);
109 dfydy = zeros(N,N);
110 dfxdy = zeros(N,N);
111 dfydx = zeros(N,N);
112
113 for i=1:N
114 if i>1, dfxdx(i,i-1) = cx; end;
119
115 dfxdx(i,i) = -2*cx -(B+1) + 2*x(i)*y(i);
116 if i<N, dfxdx(i,i+1) = cx; end;
117 dfxdy(i,i) = x(i)*x(i);
118
119 if i>1, dfydy(i,i-1) = cy; end;
120 dfydy(i,i) = -2*cy -x(i)*x(i);
121 if i<N, dfydy(i,i+1) = cy; end;
122 dfydx(i,i) = B - 2*x(i)*y(i);
123 end
124
125 dfdxy = [ dfxdx, dfxdy; dfydx, dfydy ];
126
127 % --------------------------------------------------------------------------
128
129 function dfdp = jacobianp(t,y,N,L)
130 x = y(1:N);
131 y = y(N+1:2*N);
132 A = 2;
133 B = 4.6;
134 Dx = 0.0016;
135 Dy = 0.008;
136 x0 = A; x1 = A;
137 y0 = B/A; y1 = B/A;
138 L2 = L^2;
139 h = 1/(N+1);
140 cx = (Dx/L2)/(h*h);
141 cy = (Dy/L2)/(h*h);
142 kx = (-2/L)*cx;
143 ky = (-2/L)*cy;
144
145 Sx = zeros(N,1);
146 Sy = zeros(N,1);
147
148 Sx(1) = kx*(x0-2*x(1)+x(2));
149 Sy(1) = ky*(y0-2*y(1)+y(2));
150
151 Sx(N) = kx*(x(N-1)-2*x(N)+x1);
152 Sy(N) = ky*(y(N-1)-2*y(N)+y1);
153
154 i=2:N-1;
155 Sx(i) = kx*(x(i-1)-2*x(i)+x(i+1));
156 Sy(i) = ky*(y(i-1)-2*y(i)+y(i+1));
157
158 dfdp = [ zeros(2*N,1) [Sx;Sy] ];
159
160 % --------------------------------------------------------------------------
bruss.m
The model is implemented with 2 parameters: N and L; the values of A, B, Dx , Dy are hard-
coded. Note that N is a parameter that cannot vary during the continuation. Therefore it
does not have entries in Jacobianp. We should let the pde 1 curve know that bruss.m is the
active file, the initial values of the parameters N and L are respectively 20 and 0.06 and the
active parameter is L, i.e. the second parameter of bruss.m. So, first of all we have to get
the approximate equilibrium solution which is provided in a subfunction ’init’ of ’bruss.m’.
120
2.8
2.6
LP
2.4
x(20)
2.2
LP
1.8
1.6
0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 0.22 0.24 0.26
L
We first locate the handle to the subfunction init and call it.
It sets the number of state variables to 2N and makes an initial vector x0 of length 2N
containing the values of the approximate equilibrium solution. Now we inform the pde 1
curve that the second parameter of bruss.m is the active parameter and what the default
values of the other parameters are. We also set some options.
cpl(x,v,s,[41;20]);
we can plot the 20th component of x as a function of L (which is the 41th continuation
variable), see Figure 33.
The above test can be executed by running testbrusselator; this file is in the directory
Testruns.
121
References
[1] Bashir Al-Hdaibat, Willy Govaerts, Yuri A. Kuznetsov and Hil G.E.
Meijer, Initialization of homoclinic solutions near Bogdanov-Takens points:
Lindstedt-Poincaré compared with regular perturbation method, SIAM J. Appl.
Dyn. Syst. 15(2). p.952-980 (2016).
[2] E.L. Allgower and K. Georg, Numerical Continuation Methods: An introduc-
tion, Springer-Verlag, 1990 .
[3] W.J. Beyn, A. Champneys, E. Doedel, W. Govaerts, Yu.A. Kuznetsov,
and B. Sandstede, Numerical continuation and computation of normal forms. In:
B. Fiedler, G. Iooss, and N. Kopell (eds.) “Handbook of Dynamical Systems : Vol
2”, Elsevier 2002, pp 149 - 219.
[4] Champneys, A.R. and Kuznetsov Yu.A. 1994. Numerical detection and con-
tinuation of codimension-two homoclinic orbits. Int. J. Bifurcation Chaos, 4(4),
785-822.
[5] Champneys, A.R., Kuznetsov Yu.A. and Sandstede B. 1996. A numerical
toolbox for homoclinic bifurcation analysis. Int. J. Bifurcation Chaos, 6(5), 867-887.
[6] C. De Boor and B. Swartz, Collocation at Gaussian points, SIAM Journal on
Numerical Analysis 10 (1973), pp. 582-606.
[7] Demmel, J.W., Dieci, L. and Friedman, M.J. 2001. Computing connecting
orbits via an improved algorithm for continuing invariant subspaces. SIAM J. Sci.
Comput., 22(1), 81-94.
[8] V. De Witte, W. Govaerts, Yu. A. Kuznetsov and M. Friedman, In-
teractive Initialization and Continuation of Homoclinic and Heteroclinic Orbits in
MATLAB, ACM Transactions on Mathematical Software. Volume 38, Issue 3, Ar-
ticle Number: 18, DOI: 10.1145/2168773.2168776 Published: APR 2012
[9] V. De Witte, F. Della Rossa, W.Govaerts and Yu.A. Kuznetsov, Nu-
merical Periodic Normalization for Codim2 Bifurcations of Limit Cycles: Compu-
tational Formulas, Numerical Implementation, and Examples, SIAM J. Applied
Dynamical Systems 12,2 (2013) 722-788. DOI: 10.1137/120874904
[10] A. Dhooge, W. Govaerts and Yu. A. Kuznetsov, MATCONT : A matlab
package for numerical bifurcation analysis of ODEs, ACM Transactions on Mathe-
matical Software 29(2) (2003), pp. 141-164.
[11] A. Dhooge, W.Govaerts, Yu. A. Kuznetsov, H. G. E. Meijer and B.
Sautois: New features of the software MatCont for bifurcation analysis of dynam-
ical systems, Mathematical and Computer Modelling of Dynamical Systems, Vol.
14(2), pp. 147-175, Published: 2008.
https://doi.org/10.1080/13873950701742754.
[12] E. Doedel and J Kernévez, AUTO: Software for continuation problems in or-
dinary differential equations with applications, California Institute of Technology,
Applied Mathematics, 1986.
122
[13] Doedel, E.J. and Friedman, M.J.: Numerical computation of heteroclinic or-
bits, J. Comp. Appl. Math. 26 (1989) 155-170.
[15] Doedel, E.J., Govaerts W., Kuznetsov, Yu.A.: Computation of Periodic So-
lution Bifurcations in ODEs using Bordered Systems, SIAM Journal on Numerical
Analysis 41,2(2003) 401-435.
[16] Doedel, E.J., Govaerts, W., Kuznetsov, Yu.A., Dhooge, A.: Numerical
continuation of branch points of equilibria and periodic orbits, Int. J. Bifurcation
and Chaos, 15(3) (2005), 841-860.
[18] Freire, E., Rodriguez-Luis, A., Gamero E. and Ponce, E., A case study for
homoclinic chaos in an autonomous electronic circuit: A trip form Takens-Bogdanov
to Hopf- Shilnikov, Physica D 62 (1993) 230–253.
[19] Friedman, M., Govaerts, W., Kuznetsov, Yu.A. and Sautois, B. 2005.
Continuation of homoclinic orbits in matlab. Lecture Notes in Computer Science,
3514, 263-270.
[20] Genesio, R. and Tesi, A. Harmonic balance methods for the analysis of chaotic
dynamics in nonlinear systems. Automatica 28 (1992), 531-548.
[21] Genesio, R., Tesi, A., and Villoresi, F., Models of complex dynamics in
nonlinear systems. Systems Control Lett. 25 (1995), 185-192.
[23] Govaerts, W. and Sautois, B.: Phase response curves, delays and synchroniza-
tion in matlab. Lecture Notes in Computer Science, 3992 (2006), 391-398.
[24] Govaerts, W. and Sautois, B.: Computation of the phase response curve: a
direct numerical approach. Neural Comput. 18(4) (2006), 817-847.
123
[28] Yu. A. Kuznetsov, W. Govaerts, E.J. Doedel and A. Dhooge, Numerical
periodic normalization for codim 1 bifurcations of limit cycles, SIAM J. Numer.
Anal. 43 (2005) 1407-1435.
[30] Kuznetsov, Yu.A., Meijer H.G.E., Al Hdaibat, B. and Govaerts, W., Im-
proved homoclinic predictor for Bogdanov-Takens Bifurcation, International Jour-
nal of Bifurcations and Chaos, 24(4) (2014). Article Number: 1450057. DOI:
10.1142/S0218127414500576
[33] Morris, C., Lecar,H., Voltage oscillations in the barnacle giant muscle
fiber,Biophys J. 35 (1981) 193–213.
[36] C. Stéphanos, Sur une extension du calcul des substitutions linéaires, J. Math.
Pures Appl. 6 (1900) 73-128.
[37] Terman, D., Chaotic spikes arising from a model of bursting in excitable mem-
branes, Siam J. Appl. Math. 51 (1991) 1418–1450.
[38] Terman, D., The transition from bursting to continuous spiking in excitable mem-
brane models, J. Nonlinear Sci. 2, (1992) 135–182.
124