Você está na página 1de 165

Introduction to XPPAUT

Mathieu Desroches
mathieu.desroches@inria.fr
Session A3: Mathematics for oscillations
24-25 July
Introduction to XPPAUT
XPP- -AUT
...
Part I
(short) Introduction to
! (parametrised families of) ODEs
! their Bifurcations
! direct simulation of ODEs
! numerical continuation study
Part I
(short) Introduction to
! (parametrised families of) ODEs
! their Bifurcations
! direct simulation of ODEs
! numerical continuation study
Part I
(short) Introduction to
! (parametrised families of) ODEs
! their Bifurcations
! direct simulation of ODEs
! numerical continuation study
Part I
(short) Introduction to
! (parametrised families of) ODEs
! their Bifurcations
! direct simulation of ODEs
! numerical continuation study
Part I
(short) Introduction to
! (parametrised families of) ODEs
! their Bifurcations
! direct simulation of ODEs
! numerical continuation study

ODEs: variables, parameters, set of 1st order equations, ...

Equilibria: set the Right-Hand-Side (RHS) to 0

Stability: linearise and compute eig. of Jac. matrix. Different


topological type: (un)stable focus, (un)stable node, saddle ...

Bifurcations: change a parameter and the type of the solution


changes (from eq. to periodic, from periodic to quasi-
per., ...) ... structural stability is lost at bifurcation point.

Example of (local) bifurcations:


Theory

eq. 2 eq. : fold (LP), pitchfork (BP), transcritical (BP)

eq. 2 per. : Hopf (HB)

per. 2 per. : fold of periodic orbits, period-doubling, torus

ODEs: variables, parameters, set of 1st order equations, ...

Equilibria: set the Right-Hand-Side (RHS) to 0

Stability: linearise and compute eig. of Jac. matrix. Different


topological type: (un)stable focus, (un)stable node, saddle ...

Bifurcations: change a parameter and the type of the solution


changes (from eq. to periodic, from periodic to quasi-
per., ...) ... structural stability is lost at bifurcation point.

Example of (local) bifurcations:


Theory

eq. 2 eq. : fold (LP), pitchfork (BP), transcritical (BP)

eq. 2 per. : Hopf (HB)

per. 2 per. : fold of periodic orbits, period-doubling, torus

ODEs: variables, parameters, set of 1st order equations, ...

Equilibria: set the Right-Hand-Side (RHS) to 0

Stability: linearise and compute eig. of Jac. matrix. Different


topological type: (un)stable focus, (un)stable node, saddle ...

Bifurcations: change a parameter and the type of the solution


changes (from eq. to periodic, from periodic to quasi-
per., ...) ... structural stability is lost at bifurcation point.

Example of (local) bifurcations:


Theory

eq. 2 eq. : fold (LP), pitchfork (BP), transcritical (BP)

eq. 2 per. : Hopf (HB)

per. 2 per. : fold of periodic orbits, period-doubling, torus

ODEs: variables, parameters, set of 1st order equations, ...

Equilibria: set the Right-Hand-Side (RHS) to 0

Stability: linearise and compute eig. of Jac. matrix. Different


topological type: (un)stable focus, (un)stable node, saddle ...

Bifurcations: change a parameter and the type of the solution


changes (from eq. to periodic, from periodic to quasi-
per., ...) ... structural stability is lost at bifurcation point.

Example of (local) bifurcations:


Theory

eq. 2 eq. : fold (LP), pitchfork (BP), transcritical (BP)

eq. 2 per. : Hopf (HB)

per. 2 per. : fold of periodic orbits, period-doubling, torus

ODEs: variables, parameters, set of 1st order equations, ...

Equilibria: set the Right-Hand-Side (RHS) to 0

Stability: linearise and compute eig. of Jac. matrix. Different


topological type: (un)stable focus, (un)stable node, saddle ...

Bifurcations: change a parameter and the type of the solution


changes (from eq. to periodic, from periodic to quasi-
per., ...) ... structural stability is lost at bifurcation point.

Example of (local) bifurcations:


Theory

eq. 2 eq. : fold (LP), pitchfork (BP), transcritical (BP)

eq. 2 per. : Hopf (HB)

per. 2 per. : fold of periodic orbits, period-doubling, torus


Starting with 1D systems
x (state) variables
parameters
x = f(x, )

Starting with 1D systems


x (state) variables
parameters
x = f(x, )
Equilibria: nd all such that f( , )=0 x x
( is xed!)

Starting with 1D systems


x (state) variables
parameters
Stability: sign of f ( ) x
x = f(x, )
Equilibria: nd all such that f( , )=0 x x
( is xed!)

Starting with 1D systems


x (state) variables
parameters
Stability: sign of f ( ) x
f ( )<0: is stable
f ( )>0: is unstable
x x
x x
x = f(x, )
Equilibria: nd all such that f( , )=0 x x
( is xed!)

1D systems ... lets vary !


1D systems ... lets vary !

Nothing changes in terms of behaviour:


! structural stability
1D systems ... lets vary !

Nothing changes in terms of behaviour:


! structural stability

Sudden change of stability when one varies !:


! bifurcation
Example 1: transcritical bifurcation
x = x( x)
ODE :
Example 1: transcritical bifurcation
" Equilibria :
x = 0, x =
x = x( x)
ODE :
Example 1: transcritical bifurcation
" Equilibria :
x = 0, x =
" Stability :
f
0
(x) = 2x
x = x( x)
ODE :
Example 1: transcritical bifurcation
" Equilibria :
x = 0, x =
" Stability :
f
0
(x) = 2x
f
0
(0) = , f
0
() =

x = x( x)
ODE :
Example 1: transcritical bifurcation
" Equilibria :
x = 0, x =
" Stability :
f
0
(x) = 2x
f
0
(0) = , f
0
() =

SO 1) it depends on !
x = x( x)
ODE :
Example 1: transcritical bifurcation
" Equilibria :
x = 0, x =
" Stability :
f
0
(x) = 2x
f
0
(0) = , f
0
() =

SO 1) it depends on !
2) always opposite stability BUT at 0!
x = x( x)
ODE :
Bifurcation diagram

Bifurcation diagram

! = -0.6 < 0 x=! is unstable & x=0 is stable

Bifurcation diagram

! = 0.4 > 0 x=! is stable & x=0 is unstable


Bifurcation diagram

! = 0 one eq. point, half stable, half unstable


Bifurcation diagram

! = 0 one eq. point, half stable, half unstable


! Transcritical bifurcation point
Example 2: fold bifurcation
ODE : x = x
2
Example 2: fold bifurcation
ODE :
" Equilibria :
x = x
2
Example 2: fold bifurcation
ODE :
" Equilibria :
x =

when > 0
x = x
2
Example 2: fold bifurcation
ODE :
" Equilibria :
x =

when > 0
x = 0 when = 0
x = x
2
Example 2: fold bifurcation
ODE :
" Equilibria :
x =

when > 0
x = 0 when = 0
when < 0 no equilibrium
x = x
2
Example 2: fold bifurcation
ODE :
" Equilibria :
x =

when > 0
x = 0 when = 0
when < 0 no equilibrium
x = x
2
" Stability : f
0
(x) = 2x
Example 2: fold bifurcation
ODE :
" Equilibria :
SO 1) it depends on !>0
x =

when > 0
x = 0 when = 0
when < 0 no equilibrium
x = x
2
" Stability : f
0
(x) = 2x
Example 2: fold bifurcation
ODE :
" Equilibria :
SO 1) it depends on !>0
2) always opposite stability BUT at 0!
x =

when > 0
x = 0 when = 0
when < 0 no equilibrium
x = x
2
" Stability : f
0
(x) = 2x
Bifurcation diagram

x = x
2
Bifurcation diagram

! = -0.5 < 0 no equilibrium point!

x = x
2
Bifurcation diagram

! = 0.3 > 0 x="! is stable & x=-"! is unstable

x = x
2
Bifurcation diagram

! = 0 one eq. point, half stable, half unstable

x = x
2
Bifurcation diagram
! Fold bifurcation point

! = 0 one eq. point, half stable, half unstable

x = x
2

IF there is an equilibrium point, it is either stable or unstable

stable equilibrium: the system converges towards it as t#+#

unstable equilibrium: the system converges towards it as t#-#


Summary: 1D systems ...

IF there is an equilibrium point, it is either stable or unstable

stable equilibrium: the system converges towards it as t#+#

unstable equilibrium: the system converges towards it as t#-#


Summary: 1D systems ...

IF there is an equilibrium point, it is either stable or unstable

stable equilibrium: the system converges towards it as t#+#

unstable equilibrium: the system converges towards it as t#-#


Summary: 1D systems ...

IF there is an equilibrium point, it is either stable or unstable

stable equilibrium: the system converges towards it as t#+#

unstable equilibrium: the system converges towards it as t#-#


Summary: 1D systems ...

IF there is an equilibrium point, it is either stable or unstable

stable equilibrium: the system converges towards it as t#+#

unstable equilibrium: the system converges towards it as t#-#


Summary: 1D systems ...
However
The system is still nonlinear, so an exact
solution is unlikely to exist!
Same for equilibria!

IF there is an equilibrium point, it is either stable or unstable

stable equilibrium: the system converges towards it as t#+#

unstable equilibrium: the system converges towards it as t#-#


Summary: 1D systems ...
However
The system is still nonlinear, so an exact
solution is unlikely to exist!
Same for equilibria!
$ Need to be able to simulate the system ...
Numerical simulation of ODEs
x = f(x, )
(1)
Numerical simulation of ODEs
x = f(x, )
(1)
Idea
$ discretise time :
$ march in time :
Compute numerically approximate sol. to (1)?
x(t
0
) = x
0
x(t
1
) = ...?
t
0
t
1
= t
0
+ h, h = dt
Numerical simulation of ODEs
x = f(x, )
(1)
Idea
$ discretise time :
$ march in time :
Compute numerically approximate sol. to (1)?
x(t
0
) = x
0
x(t
1
) = ...?
t
0
t
1
= t
0
+ h, h = dt
Example 1: Euler scheme
$ Error:
uses the slope of f(x(t0)) at x(t0)
to approximate x(t1)
(Taylor)
x(t
1
) x(t
0
) + f(x(t
0
), )h
O(h
2
)
Numerical simulation of ODEs
x = f(x, )
(1)
Example 1: Euler scheme
$ Error:
uses the slope of f(x(t0)) at x(t0)
to approximate x(t1)
(Taylor)
x(t
1
) x(t
0
) + f(x(t
0
), )h
O(h
2
)
Example 2: 2nd order Runge-Kutta scheme
$ Error: (Taylor) O(h
3
)
takes a half Euler step to the point (t0+0.5h, x(t0)+0.5k )
[see gure next]
1
Numerical simulation of ODEs
x = f(x, )
(1)
x
x
x
x
x
x
2D systems ... (nD, n>2)
vector of (state) variables
vector of parameters
x

x = f (x, )
2D systems ... (nD, n>2)
vector of (state) variables
vector of parameters
x

x = f (x, )
Equilibria: nd all such that f( , )=0
x

is xed!)
2D systems ... (nD, n>2)
vector of (state) variables
vector of parameters
x

x = f (x, )
Stability: Jacobian matrix
J =

f
i
x
j

Equilibria: nd all such that f( , )=0


x

is xed!)
2D systems ... (nD, n>2)
vector of (state) variables
vector of parameters
x

x = f (x, )
Stability: Jacobian matrix
J =

f
i
x
j

! stability depends on the eigenvalues of J


Equilibria: nd all such that f( , )=0
x

is xed!)
2D systems : nullclines
x = f(x, y, )
y = g(x, y, )
2D systems : nullclines
x = f(x, y, )
y = g(x, y, )
Equilibria:
(x !=! )
0
f(x

, y

,
0
) = 0 & g(x

, y

,
0
) = 0
2D systems : nullclines
x = f(x, y, )
y = g(x, y, )
Equilibria:
(x !=! )
0
f(x

, y

,
0
) = 0 & g(x

, y

,
0
) = 0
! Geometrically:
{f(x, y,
0
) = 0}{g(x, y,
0
) = 0}
2D systems : nullclines
(example) FitzHugh-Nagumo
v = v v
3
/3 w + I
y = (v + a bw)
I = 1.5
= 0.08
a = 0.7
b = 0.8
2D systems : nullclines
(example) FitzHugh-Nagumo
v = v v
3
/3 w + I
y = (v + a bw)
I = 1.5
= 0.08
a = 0.7
b = 0.8
! f is cubic
! g is linear
2D systems : nullclines
(example) FitzHugh-Nagumo
v = v v
3
/3 w + I
y = (v + a bw)
I = 1.5
= 0.08
a = 0.7
b = 0.8
! f is cubic
! g is linear
2D systems : nullclines
(example) FitzHugh-Nagumo
v = v v
3
/3 w + I
y = (v + a bw)
I = 1.5
= 0.08
a = 0.7
b = 0.8
1 eq.
! f is cubic
! g is linear
2D systems : nullclines
(example) FitzHugh-Nagumo
v = v v
3
/3 w + I
y = (v + a bw)
= 0.08
a = 0.7
I = 0.4
b = 1.8
! f is cubic
! g is linear
2D systems : nullclines
(example) FitzHugh-Nagumo
v = v v
3
/3 w + I
y = (v + a bw)
= 0.08
a = 0.7
I = 0.4
b = 1.8

3 eq.
! f is cubic
! g is linear
Linear approximation: 2D case
source
sink
nodal sink nodal source hyperbolic centre

Re
Im
Linear approximation: 2D case
source
sink
nodal sink nodal source hyperbolic centre

- nonlinear dynamics -
Re
Im
Linear approximation: 2D case
source
sink
nodal sink nodal source hyperbolic centre

focus
- nonlinear dynamics -
Re
Im
Linear approximation: 2D case
source
sink
nodal sink nodal source hyperbolic centre

focus node
- nonlinear dynamics -
Re
Im
Linear approximation: 2D case
source
sink
nodal sink nodal source hyperbolic centre

focus node
saddle
- nonlinear dynamics -
Re
Im
Linear approximation: 2D case
source
sink
nodal sink nodal source hyperbolic centre

focus node
saddle
- nonlinear dynamics -
(un)stable eigenspaces
Re
Im
Linear approximation: 2D case
source
sink
nodal sink nodal source hyperbolic centre

focus node
saddle
- nonlinear dynamics -
(un)stable eigenspaces
! nonlinear equivalent: (un)stable manifolds
W
s,u
Re
Im
Linear systems: stability
Ref.: [Jordan & Smith, 4th ed., Oxford Uni. Press, 2007]
Bifurcations

Transcritical, fold, ... : similar to 1D systems


Bifurcations

Transcritical, fold, ... : similar to 1D systems


1D : Bifurcation when f (x) goes through 0
2D : Bifurcation when an eigenvalue goes through 0
Bifurcations

Transcritical, fold, ... : similar to 1D systems

Truly 2D effect : oscillatory dynamics


(complex eigenvalues)
1D : Bifurcation when f (x) goes through 0
2D : Bifurcation when an eigenvalue goes through 0
Bifurcations

Transcritical, fold, ... : similar to 1D systems

Truly 2D effect : oscillatory dynamics


(complex eigenvalues)
1 - Damped nonlin. oscillations: focus eq.
2 - Sustained nonlin. oscillations: limit cycle
1D : Bifurcation when f (x) goes through 0
2D : Bifurcation when an eigenvalue goes through 0
Bifurcations

Transcritical, fold, ... : similar to 1D systems

Truly 2D effect : oscillatory dynamics


(complex eigenvalues)
1 - Damped nonlin. oscillations: focus eq.
2 - Sustained nonlin. oscillations: limit cycle
Transition 1-2 : Hopf bifurcations
1D : Bifurcation when f (x) goes through 0
2D : Bifurcation when an eigenvalue goes through 0
stable focus
Hopf bifurcation

2D system : possibility for complex eig.

C
Re
Im
stable focus

unstable focus
Hopf bifurcation

2D system : possibility for complex eig.

C
Re
Im
stable focus


unstable focus
unstable focus
Hopf bifurcation

2D system : possibility for complex eig.

C
Re
Im
! focus eq. destabilises when eigenvalues cross Im
stable focus


unstable focus
unstable focus
Hopf bifurcation

2D system : possibility for complex eig.

C
Re
Im
! focus eq. destabilises when eigenvalues cross Im
stable focus


unstable focus
a stable
limit cycle
is created!
Hopf : bifurcation diagram

Measure of
the solution

H
Hopf : bifurcation diagram

Measure of
the solution

H
Before : stable equilibrium
Hopf : bifurcation diagram

Measure of
the solution

H
After : unstable equilibrium
Hopf : bifurcation diagram

Measure of
the solution

H
After : stable limit cycle
Hopf : bifurcation diagram

Measure of
the solution

H
After : stable limit cycle
Represented
in this diagram by
max. and min. values
Hopf : bifurcation diagram

Measure of
the solution

H
After : stable limit cycle
Represented
in this diagram by
max. and min. values
From stationary to periodic when varying !!
Hopf : bifurcation diagram
- 3D visualisation -

x
y
Transient dynamics
Long-term dynamics (attractors)

Goal is to compute families (branches) of solutions of


nonlinear equations of the form:
F(x) = 0, F : R
n+1
R
n
! under-determined system (one more unknowns than equations)
! away from singularities, solution set = 1-dim. manifold
embedded in (n+1)-dim. space
Numerical continuation : idea

F(x) = 0, F : R
n+1
R
n
! stationary problems (search for equilibria)
! Boundary Value Problems (BVP), including periodic orbits

Many problems can be put in this form

In particular, discretisation of parameterised ODEs:


This will rely on the application of the Implicit Function Theorem !
x = F(x, )
Numerical continuation : idea
Parameter continuation

Suppose we have one solution to the problem and wish to vary


one component to nd a new solution ...

In the I.F.T. holds at this point, then locally there is a branch


of solutions parameterised by $: (x($), $).
F(x
0
) = 0, x
0
= (x
0
,
0
) R
n
R

Small change in the parameter $ new point that is not a


solution of the problem but close to one!
x
#
1
= (x
0
,
0
+ s),
F(x
#
1
) 6= 0,
F(x
#
1
) 1

SO initial guess for the new solution is

New solution computed to a desired accuracy by using Newtons method


on the augmented problem

Note: additional equation is to ensure unique solution for Newtons


method
x
#
1
= (x
0
,
0
+ s)
F(x) = 0,
(
0
+ ) = 0
Parameter continuation
Tangent continuation

Improvement of the method: use higher order initial guess


such as the tangent to the curve

New solution computed with Newtons method on the same


augmented problem
x

1
F(x) = 0,
(
0
+ ) = 0
Problem at a fold !!
Kellers pseudo-arclength continuation

Problem at a fold: the parameter chosen to do the


continuation cannot parameterise the solution curve

Solution: parameterise by something that do not have this problem


!Arclength s along the curve !

The problem to be solved becomes


F(x) = 0,
(
0
)

0
+ (x x
0
) x
0
s = 0
Arclength measured along the tangent space !
Periodic orbit continuation

We look for periodic solutions of the problem :


! We seek for solutions of period 1 i.e. such that :
x = F(x(t), )
x
0
= TF(x(t), )
x(1) = x(0)
! The true period T is now an additional parameter

Note: the above equations do not uniquely specify x and T ...


... translation invariance !
! Necessity of a Phase condition

Example: Poincar orthogonality condition

In practice: Integral phase condition


Z
1
0
x
k
(t)

x
0
k1
dt = 0
(x
k
(0) x
k1
(0))

x
0
k1
(0)) = 0

Fix the interval of periodicity by the transformation t # t/T


such that :
Periodic orbit continuation

We look for periodic solutions of the problem :


! We seek for solutions of period 1 i.e. such that :
x = F(x(t), )
x
0
= TF(x(t), )
x(1) = x(0)
! The true period T is now an additional parameter

Note: the above equations do not uniquely specify x and T ...


... translation invariance !
! Necessity of a Phase condition

Example: Poincar orthogonality condition

In practice: Integral phase condition


Z
1
0
x
k
(t)

x
0
k1
dt = 0
(x
k
(0) x
k1
(0))

x
0
k1
(0)) = 0

Fix the interval of periodicity by the transformation t # t/T


such that :

... we then solve a large G(X) = 0 augmented by the


arclength-continuation equation:

Discretisation of the periodic orbits: using orthogonal


collocation (piecewise polynomials on mesh intervals)
! Solve exactly at mesh points (boundaries of mesh intervals)
Z
1
0
(x
k
(t) x
k1
(t))

x
k1
dt + (T
k
T
k1
)

T
k1
+(
k

k1
)

k1
s = 0
! Inside mesh intervals: well-chosen collocation points (good
convergence properties)

Well-posedness: n+1 unknowns (n components of x and period T)


for n+1 conditions ( periodicity + phase)
! varying 1 parameter will give a 1-parameter family of per. orbits
Periodic orbit continuation
Part II: XPPAUT
- main features & capabilities -
Equation file: FitzHugh-Nagumo
Equation file: FitzHugh-Nagumo
Differential Equations
Equation file: FitzHugh-Nagumo
Parameters: initialisation
Equation file: FitzHugh-Nagumo
State variables: initial conditions
Equation file: FitzHugh-Nagumo
Numerical accuracy

one simple example: the FitzHugh-Nagumo equation ... lets


learn how to use XPP on this example!

Equation le: equations, parameters, initialisation, numerical


accuracy, ...

launch it, run it ...

accuracy: choose the scheme, set the time step, the


integration time, the tolerances, ...

change: initial conditions, parameter(s) (sweep)

equilibria: can integrate until transient has passed & get


approx. of equilibria / alternatively, use the in-built routine to
nd eq. & assess stability & approximation of (un)stable mds

par. dependence: move par. & nd ass. eq. manually ... nd


interesting transitions like eq 2 per i.e. one has gone through
a Hopf bifurcation! ... Can do that more systematically!!
XPP-part

one simple example: the FitzHugh-Nagumo equation ... lets


learn how to use XPP on this example!

Equation le: equations, parameters, initialisation, numerical


accuracy, ...

launch it, run it ...

accuracy: choose the scheme, set the time step, the


integration time, the tolerances, ...

change: initial conditions, parameter(s) (sweep)

equilibria: can integrate until transient has passed & get


approx. of equilibria / alternatively, use the in-built routine to
nd eq. & assess stability & approximation of (un)stable mds

par. dependence: move par. & nd ass. eq. manually ... nd


interesting transitions like eq 2 per i.e. one has gone through
a Hopf bifurcation! ... Can do that more systematically!!
XPP-part

one simple example: the FitzHugh-Nagumo equation ... lets


learn how to use XPP on this example!

Equation le: equations, parameters, initialisation, numerical


accuracy, ...

launch it, run it ...

accuracy: choose the scheme, set the time step, the


integration time, the tolerances, ...

change: initial conditions, parameter(s) (sweep)

equilibria: can integrate until transient has passed & get


approx. of equilibria / alternatively, use the in-built routine to
nd eq. & assess stability & approximation of (un)stable mds

par. dependence: move par. & nd ass. eq. manually ... nd


interesting transitions like eq 2 per i.e. one has gone through
a Hopf bifurcation! ... Can do that more systematically!!
XPP-part

one simple example: the FitzHugh-Nagumo equation ... lets


learn how to use XPP on this example!

Equation le: equations, parameters, initialisation, numerical


accuracy, ...

launch it, run it ...

accuracy: choose the scheme, set the time step, the


integration time, the tolerances, ...

change: initial conditions, parameter(s) (sweep)

equilibria: can integrate until transient has passed & get


approx. of equilibria / alternatively, use the in-built routine to
nd eq. & assess stability & approximation of (un)stable mds

par. dependence: move par. & nd ass. eq. manually ... nd


interesting transitions like eq 2 per i.e. one has gone through
a Hopf bifurcation! ... Can do that more systematically!!
XPP-part

one simple example: the FitzHugh-Nagumo equation ... lets


learn how to use XPP on this example!

Equation le: equations, parameters, initialisation, numerical


accuracy, ...

launch it, run it ...

accuracy: choose the scheme, set the time step, the


integration time, the tolerances, ...

change: initial conditions, parameter(s) (sweep)

equilibria: can integrate until transient has passed & get


approx. of equilibria / alternatively, use the in-built routine to
nd eq. & assess stability & approximation of (un)stable mds

par. dependence: move par. & nd ass. eq. manually ... nd


interesting transitions like eq 2 per i.e. one has gone through
a Hopf bifurcation! ... Can do that more systematically!!
XPP-part

one simple example: the FitzHugh-Nagumo equation ... lets


learn how to use XPP on this example!

Equation le: equations, parameters, initialisation, numerical


accuracy, ...

launch it, run it ...

accuracy: choose the scheme, set the time step, the


integration time, the tolerances, ...

change: initial conditions, parameter(s) (sweep)

equilibria: can integrate until transient has passed & get


approx. of equilibria / alternatively, use the in-built routine to
nd eq. & assess stability & approximation of (un)stable mds

par. dependence: move par. & nd ass. eq. manually ... nd


interesting transitions like eq 2 per i.e. one has gone through
a Hopf bifurcation! ... Can do that more systematically!!
XPP-part

one simple example: the FitzHugh-Nagumo equation ... lets


learn how to use XPP on this example!

Equation le: equations, parameters, initialisation, numerical


accuracy, ...

launch it, run it ...

accuracy: choose the scheme, set the time step, the


integration time, the tolerances, ...

change: initial conditions, parameter(s) (sweep)

equilibria: can integrate until transient has passed & get


approx. of equilibria / alternatively, use the in-built routine to
nd eq. & assess stability & approximation of (un)stable mds

par. dependence: move par. & nd ass. eq. manually ... nd


interesting transitions like eq 2 per i.e. one has gone through
a Hopf bifurcation! ... Can do that more systematically!!
XPP-part

one simple example: the FitzHugh-Nagumo equation ... lets


learn how to use XPP on this example!

Equation le: equations, parameters, initialisation, numerical


accuracy, ...

launch it, run it ...

accuracy: choose the scheme, set the time step, the


integration time, the tolerances, ...

change: initial conditions, parameter(s) (sweep)

equilibria: can integrate until transient has passed & get


approx. of equilibria / alternatively, use the in-built routine to
nd eq. & assess stability & approximation of (un)stable mds

par. dependence: move par. & nd ass. eq. manually ... nd


interesting transitions like eq 2 per i.e. one has gone through
a Hopf bifurcation! ... Can do that more systematically!!
XPP-part
Lets launch it and try!
Lets launch it and try!
Were now going to learn XPP
with the FitzHugh-Nagumo
equation ...

initialise: grab an equilibrium point

launch AUTO: start the continuator ...

set up: accuracy, problem type, cont. par., ...

compute: 1-par. family of equilibria (branch)

detect: possible bif. like fold (LP) or Hopf (HB) ...

branch-switch at HB: extend the problem to compute the


emanating family of periodic orbits ...
AUT-part

initialise: grab an equilibrium point

launch AUTO: start the continuator ...

set up: accuracy, problem type, cont. par., ...

compute: 1-par. family of equilibria (branch)

detect: possible bif. like fold (LP) or Hopf (HB) ...

branch-switch at HB: extend the problem to compute the


emanating family of periodic orbits ...
AUT-part
AUTO
Lets launch it and try!
Lets launch it and try!
! !"# $ $"# %
%
$
!
$
%
I
v

HB
HB
stable
unstable
stable
max(v)
min(v)
FHN: 1-par. continuation results
b=0.8
! !"#$ !"$ !"%$ &
#
&
!
&
#
FHN: 1-par. continuation results
b=1.8
I
v

HB
HB
stable
unstable
stable

LP
LP

HO
HO
FHN: 2-par. continuation results
I & b
! ! " #$
$
#%!&
!%&
'%(&
&
I
b
HB
LP
0.8
1.8
1.25
2.5
FHN: 2-par. continuation results
I & b
I
b
LP
HB
0.8
1.8


Part III: XPPAUT
- practice it yourself -
Hindmarsh-Rose equation file
Hindmarsh-Rose equation file
D.E.
Hindmarsh-Rose equation file
D.E.
Par.
Hindmarsh-Rose equation file
D.E.
Par.
I.C.
Hindmarsh-Rose equation file
D.E.
Par.
I.C.
Num.

model system: Hindmarsh-Rose equation (3D)

task: try to reproduce alone what weve done together on


the Van der Pol system, that is,
Practice XPPAUT on your own!

integrate (try different schemes)

change initial conditions & parameters

nd eq. and their (un)stable manifolds

grab an eq. and continue it in parameter I

nd a HB and branch-switch to compute the family of


periodic solutions
Simulating the system for different values of I, you
should obtain time series that look like these ones
Simulating the system for different values of I, you
should obtain time series that look like these ones
Simulating the system for different values of I, you
should obtain time series that look like these ones
b
u
r
s
t
i
n
g
Simulating the system for different values of I, you
should obtain time series that look like these ones
b
u
r
s
t
i
n
g
b
u
r
s
t
i
n
g
Simulating the system for different values of I, you
should obtain time series that look like these ones
b
u
r
s
t
i
n
g
b
u
r
s
t
i
n
g
i
r
r
e
g
u
l
a
r
s
p
i
k
i
n
g
Simulating the system for different values of I, you
should obtain time series that look like these ones
b
u
r
s
t
i
n
g
b
u
r
s
t
i
n
g
i
r
r
e
g
u
l
a
r
s
p
i
k
i
n
g
r
e
g
u
l
a
r s
p
i
k
i
n
g
You should obtain a bifurcation
diagram that looks like this one
0 7 14 21 28
2
0.75
0.5
1.75
3
I
x

HB
HB HB
HB
References
XPPAUT
References
% Bard Ermentrout (University of Pittsburgh, USA):
XPPAUT
References
% Bard Ermentrout (University of Pittsburgh, USA):
XPPAUT
References
% Bard Ermentrout (University of Pittsburgh, USA):
XPPAUT
References
XPPAUT
References
% Other tutorials :
XPPAUT
http://www.math.ualberta.ca/~devries/math570-winter2008/XPPtutorial.pdf
http://people.uleth.ca/~roussel/nld/bifurc_analysis.pdf
http://www.math.osu.edu/~kao/Math865Lsourcecode/Handout/xppaut_tutorial.pdf
http://www.iiserpune.ac.in/~pgoel/XPP_Tutorial.pdf
References
% Other tutorials :
XPPAUT
http://www.math.ualberta.ca/~devries/math570-winter2008/XPPtutorial.pdf
http://people.uleth.ca/~roussel/nld/bifurc_analysis.pdf
http://www.math.osu.edu/~kao/Math865Lsourcecode/Handout/xppaut_tutorial.pdf
http://www.iiserpune.ac.in/~pgoel/XPP_Tutorial.pdf
% Examples of ode les :
http://mrb.niddk.nih.gov/sherman/gallery/index.html
http://www.math.fsu.edu/~bertram/software/
References ...
ODEs & Bifurcations
References ...
ODEs & Bifurcations
(Tutorials & Software sections)
(MathDoctorMitchells Channel)
References ...
ODEs & Bifurcations
(Tutorials & Software sections)
http://www.bio.vu.nl/thb/research/project/globif/
(MathDoctorMitchells Channel)
References ...
ODEs & Bifurcations
(Tutorials & Software sections)
http://www.bio.vu.nl/thb/research/project/globif/
(MathDoctorMitchells Channel)
Beyond XPPAUT!
Beyond XPPAUT!
Command-line AUTO: the proper way to do continuation!
Beyond XPPAUT!
Command-line AUTO: the proper way to do continuation!
! Allows to continue: equilibria, limit cycles
AND boundary-value problems
Beyond XPPAUT!
Command-line AUTO: the proper way to do continuation!
! Allows to continue: equilibria, limit cycles
AND boundary-value problems
Other continuation packages:
MatCont Matlab based !
CoCo
Beyond XPPAUT!
Command-line AUTO: the proper way to do continuation!
! Allows to continue: equilibria, limit cycles
AND boundary-value problems
Other continuation packages:
MatCont Matlab based !
!! mostly for ODEs !!
CoCo
Beyond XPPAUT!
Command-line AUTO: the proper way to do continuation!
! Allows to continue: equilibria, limit cycles
AND boundary-value problems
Other continuation packages:
MatCont Matlab based !
Beyond ODEs:
!! mostly for ODEs !!
CoCo
Beyond XPPAUT!
Command-line AUTO: the proper way to do continuation!
! Allows to continue: equilibria, limit cycles
AND boundary-value problems
Other continuation packages:
MatCont Matlab based !
Beyond ODEs:
%codes exist for PDEs ( ) and DDEs ( )
!! mostly for ODEs !!
CoCo
LOCA Knut
Beyond XPPAUT!
Command-line AUTO: the proper way to do continuation!
! Allows to continue: equilibria, limit cycles
AND boundary-value problems
Other continuation packages:
MatCont Matlab based !
Beyond ODEs:
%codes exist for PDEs ( ) and DDEs ( )
& on-going work for SDEs and equation-free problems ...
!! mostly for ODEs !!
CoCo
LOCA Knut
References
AUTO - 07p
References
% Eusebius Doedel (Concordia University, Montreal):
AUTO - 07p
References
% Eusebius Doedel (Concordia University, Montreal):
AUTO - 07p
References
% Eusebius Doedel (Concordia University, Montreal):
AUTO - 07p
References
% Eusebius Doedel (Concordia University, Montreal):
AUTO - 07p
http://www2.imperial.ac.uk/~jswlamb/LDSG/grad0506/auto_course.htm
Thanks for your attention!
... questions?

Você também pode gostar