# XPPAUT

 Bard Ermentrout (2007), Scholarpedia, 2(1):1399. doi:10.4249/scholarpedia.1399 revision #136177 [link to/cite this article]
Post-publication activity

Curator: Bard Ermentrout

Figure 1: XPPAUT interface with AUTO window

XPPAUT is a general numerical tool for simulating, animating, and analyzing dynamical systems. These can range from

The program evolved from a DOS program that was originally written so that John Rinzel and Bard Ermentrout could easily illustrate the dynamics of a simple model for an excitable membrane. The DOS program, PHASEPLANE, became a commercial project and was used for many years by a number of patient folks.

## Current Status

The current version of XPPAUT runs under the X-window graphical environment and is distributed under the GNU public license. There are binary versions available for most Linux distributions as well as for Mac OS X, iOS and various flavors of Windows.

## Features

XPPAUT contains many different integrators for

In addition, there are tools for analyzing the system such as the plotting of Poincare sections, delayed embeddings, stability analysis, computation of one-dimensional invariant manifolds, nullclines, and vector fields. Some statistical/data analysis is also incorporated, e.g. spectral analysis, auto- and cross-correlation, histograms, mean, and variance. As XPPAUT was developed as a research tool for the author, it incorporates a number of specialized features such as the ability to compute the adjoint of a linearization about a stable limit cycle, a built in implementation of the Gillespie algorithm, and built-in averaging.

XPPAUT also includes a frontend to AUTO, a continuation and bifurcation package written by Eusebius Doedel. This self-contained version of AUTO communicates seamlessly with XPP making it easy to continue the solutions to boundary value problems as well as equilibria, fixed points and limit cycles.

## Examples

• Ordinary differential equations.

The Morris-Lecar model has the form$C \frac{dV}{dt} = I-g_L(V-E_L)-g_K w (V-E_K)-g_{Ca} m_\infty(V)(V-E_{Ca})$

$$\frac{dw}{dt} = \phi (w_\infty(V)-w)/\tau_w(V)$$

The XPPAUT code for this set of equations is:

# Morris-Lecar model Methods Chapter
dv/dt = ( I - gca*minf(V)*(V-Vca)-gk*w*(V-VK)-gl*(V-Vl))/c
dw/dt = phi*(winf(V)-w)/tauw(V)
# initial data
v(0)=-16
w(0)=0.014915
# functions
minf(v)=.5*(1+tanh((v-va)/vb))
winf(v)=.5*(1+tanh((v-vc)/vd))
tauw(v)=1/cosh((v-vc)/(2*vd))
# parameters
param vk=-84,vl=-60,vca=120
param i=0,gk=8,gl=2,c=20
param va=-1.2,vb=18
param vc=2,vd=30,phi=.04,gca=4.4
# parameter sets for different variants of the model
set hopf {vc=2,vd=30,phi=.04,gca=4.4}
set snic  {vc=12,vd=17.4,phi=.06666667,gca=4}
set homo {vc=12,vd=17.4,phi=.23,gca=4}
# some numerical settings
@ total=150,dt=.25,xlo=-75,xhi=75,ylo=-.25,yhi=.5,xp=v,yp=w
done


• Delay equations

The Mackey-Glass equation has the form$\frac{dx}{dt} = -x(t) + \frac{A}{1+x(t-\tau)^p}$

and the XPPAUT code for this is:

x'=-x+a/(1+delay(x,tau)^p)
par a=5,p=2,tau=3
@ delay=10,total=200,xlo=0,xhi=200,ylo=0,yhi=5
done


The penultimate line in the code contains  delay=10  which tells XPPAUT how much storage to allocate for the delay. It must be larger than the largest delay in your model.

• Networks
Figure 2: Synaptic activity in a network of 100 cells

A network of quadratic integrate and fire models with synaptic coupling and adaptation can be written as$x_i' = x_i^2+a + \sum_{j=1}^N w(i-j) s_j(t) - g z_j$

$$s_i' = -s_i/\tau_s + \sum_m \delta(t-t_i^m)$$

$$z_i' = -z_i/\tau_z + \sum_m \delta(t-t_i^m)$$

Each time $$x_j$$ reaches the "spiking" value, it is reset and the synapses, $$s_j$$ and adaptation $$z_j$$ are incremented. The XPPAUT code for this network is

# chain of QIF with adaptation
# weight matrix
table w % 25 -12 12 gsyn*exp(-abs(t)/sigma)/(2*sigma)
par sigma=4
# define the discrete convolution structure
special k=conv(even,100,12,w,s0)
# ODEs
x[0..99]'=x[j]^2+a+k([j])-g*z[j]
s[0..99]'=-s[j]/taus
z[0..99]'=-z[j]/tauz
# look for events
global 1 x[0..99]-xspike {x[j]=xreset;s[j]=1;z[j]=z[j]+1}
# parameters
par a=-.04,gsyn=1,taus=5,tauz=30,g=.1,xreset=-2,xspike=20
# start them at rest and set a few off
init x[4..99]=-.2
init x[0..3]=1
# set up plots
@ total=200,xhi=200,yp=x50,ylo=-5,yhi=20
done


A sample simulation is shown at the right. Time is vertical and space is horizontal. A wave propagates producing several spikes before terminating. The synaptic variables are shown in color code. An animation is also shown in figure 3. The code for this is

fcircle [0..99]/100;(x[j]+8)/30;.015;z[j]/4
end


Figure 3: Animation of the potential colored according to the degree of adaptation

## References

Bard Ermentrout, Simulating, Analyzing, and Animating Dynamical Systems: A Guide to XPPAUT for Researchers and Students, SIAM 2002, Philadelphia, USA.

Internal references