A drug and cells that harm each other can only switch. An activator that amplifies itself and makes its own inhibitor can also oscillate. With the inhibitor frozen, the activator is a bistable switch, and its bifurcation diagram is an S with two folds. Let the inhibitor move, and it drives the activator round the hysteresis loop of the S by itself. A trapping region and the Poincaré–Bendixson theorem make this a closed orbit: an oscillation. Move the steady state just past a fold and the system rests instead, but it is excitable: it ignores small kicks and answers every large one with the same large pulse.
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import solve_ivp
from scipy.optimize import fsolve
plt.rcParams.update({"figure.dpi": 130, "font.size": 9, "axes.spines.top": False,
"axes.spines.right": False})
C_EXACT, C_OUTER, C_INNER, C_COMP = "#111111", "#0072B2", "#D55E00", "#009E73"
C_GREY = "#999999"
c = lambda v: v - v**3 / 3 # the cubic: fast nullcline is w = c(v)
def fhn(t, y, eps, a):
v, w = y
return [(v - v**3 / 3 - w) / eps, v + a]
def solve(y0, T, eps, a, n=2000, **kw):
t = np.linspace(0, T, n)
s = solve_ivp(fhn, (0, T), y0, args=(eps, a), t_eval=t, rtol=1e-9,
atol=1e-11, method="LSODA", **kw)
return s.t, s.y
def mark(ax, x, y, stable, ms=6):
style = dict(color=C_COMP) if stable else dict(mfc="white", mec=C_EXACT)
ax.plot([x], [y], "o", ms=ms, zorder=6, **style)
VV = np.linspace(-2.3, 2.3, 400)
mid, outer_l, outer_r = np.abs(VV) <= 1, VV <= -1, VV >= 1
def cubic(ax, lw=1.8, color=C_OUTER):
"""The fast nullcline, drawn with w across and v up: stable outer branches
solid, unstable middle branch dashed."""
ax.plot(c(VV[outer_l]), VV[outer_l], color=color, lw=lw)
ax.plot(c(VV[outer_r]), VV[outer_r], color=color, lw=lw)
ax.plot(c(VV[mid]), VV[mid], color=color, lw=lw * 0.7, ls="--")
def phase_plane(ax, F, G, xlim, ylim, trajs=(), t_max=20.0, n_grid=200,
density=1.2, flow_color="thistle", null_colors=(C_INNER, C_OUTER),
lw_null=2.0, lw_traj=1.0, null=True, fixed_points=True):
"""Phase portrait of x' = F(x, y), y' = G(x, y), after
A. Buttenschoen, NumericalPDEs/de (2019): streamlines whose width grows
with the speed, nullclines as zero contours (x-nullcline in the first
colour), trajectories from the points in trajs (squares), and steady
states found by fsolve from a grid of guesses and classified by the
eigenvalues of a finite-difference Jacobian (filled: stable, open:
unstable). F and G must accept numpy arrays. Returns the steady states."""
X, Y = np.meshgrid(np.linspace(*xlim, n_grid), np.linspace(*ylim, n_grid))
U, V = F(X, Y), G(X, Y)
speed = np.hypot(U, V)
ax.streamplot(X, Y, U, V, density=density, color=flow_color, arrowsize=1.0,
linewidth=0.4 + 1.6 * np.sqrt(speed / np.nanmax(speed)), zorder=1)
if null:
for Z, col in zip((U, V), null_colors):
ax.contour(X, Y, Z, [0], colors=[col], linewidths=lw_null, zorder=3)
rhs = lambda t, z: [F(*z), G(*z)]
for z0 in trajs:
s = solve_ivp(rhs, (0, t_max), z0, rtol=1e-9, atol=1e-11,
method="LSODA", dense_output=True)
t = np.concatenate([np.linspace(0, 0.02 * t_max, 400),
np.linspace(0.02 * t_max, t_max, 1600)])
ax.plot(*s.sol(t), color=C_EXACT, lw=lw_traj, zorder=4)
ax.plot(*z0, "s", color=C_EXACT, ms=3, zorder=4, clip_on=False)
fps = []
if fixed_points:
f2 = lambda z: [F(*z), G(*z)]
for gx in np.linspace(*xlim, 12):
for gy in np.linspace(*ylim, 12):
z, _, ier, _ = fsolve(f2, [gx, gy], full_output=True)
inside = (xlim[0] - 1e-9 <= z[0] <= xlim[1] + 1e-9
and ylim[0] - 1e-9 <= z[1] <= ylim[1] + 1e-9)
if ier == 1 and inside and not any(np.allclose(z, p, atol=1e-6) for p in fps):
fps.append(z)
e = 1e-6
for x0, y0 in fps:
J = np.array([[F(x0 + e, y0) - F(x0 - e, y0), F(x0, y0 + e) - F(x0, y0 - e)],
[G(x0 + e, y0) - G(x0 - e, y0), G(x0, y0 + e) - G(x0, y0 - e)]]) / (2 * e)
stable = np.all(np.linalg.eigvals(J).real < 0)
style = dict(color=C_COMP) if stable else dict(mfc="white", mec=C_EXACT)
ax.plot([x0], [y0], "o", ms=6, zorder=6, clip_on=False, **style)
ax.set_xlim(*xlim); ax.set_ylim(*ylim)
return fpsWhat it takes to oscillate¶
By Proposition 3 in Drug and Bacteria in the Plane, cross effects of the same sign give real eigenvalues, so nothing circles. Circling needs cross effects of opposite signs, promoting and suppressing : a negative feedback loop.
| what it can do | example | |||
|---|---|---|---|---|
| mutual harm | switch: nodes and saddles | drug and cells | ||
| mutual help | switch: nodes and saddles | two genes that activate each other | ||
| activator and inhibitor | spirals, oscillations | FitzHugh–Nagumo |
For the spiral to wind outward the trace must also be positive (Proposition 5), which needs a positive diagonal entry: a variable that amplifies itself. The recipe for an oscillator is self-amplification plus delayed negative feedback.
A nerve cell at rest keeps a voltage across its membrane. A small push to that voltage dies away. A push past a threshold opens channels that let charge in, which pushes the voltage further and opens more channels: a self-amplifying runaway. The voltage spikes to the same size however far past threshold the push was (all or none). More slowly, other channels let charge out and the voltage returns to rest; for a while afterwards the cell cannot fire again (it is refractory). Hodgkin and Huxley described this with four equations in 1952. FitzHugh FitzHugh, 1961 reduced them to two, a fast voltage-like variable and a slow recovery variable, and Nagumo and colleagues built the same equations as a circuit Nagumo et al., 1962.
The model¶
Definition 1 (FitzHugh–Nagumo model)
with . Time is measured on the slow scale; is the fast activator, the slow inhibitor.
| term | in words | sign in the Jacobian |
|---|---|---|
| in | the activator amplifies itself | on the diagonal |
| the amplification saturates | keeps bounded | |
| the inhibitor suppresses the activator | ||
| the activator drives the inhibitor up; below the inhibitor decays | ||
| small | the activator is fast, the inhibitor slow | the delay in the feedback |
The cross effects have opposite signs at every point, and the self-term is positive for .
FitzHugh–Nagumo is not derived from a list of molecules, as the drug model was. It is the simplest pair of equations with the right shape: a cubic fast nullcline and a slow negative feedback. What carries over to real systems is the geometry, not the numbers.
Remark 1 (FitzHugh’s version)
FitzHugh wrote , , with an applied current and a small rate . Measuring time in units of gives (1) with and . We drop the decay term to keep the algebra short; then only shifts , and the parameter that matters is .
The small is used twice. First we freeze the slow inhibitor and study the activator alone: it is a switch. Then we let the inhibitor move and watch it flip the switch back and forth.
The inhibitor frozen: a switch¶
Since is small, the activator moves much faster than the inhibitor. Freeze the inhibitor at a value . The activator then obeys a phase line with one parameter,
The activator grows exactly when . This is the graphical method of Saddle-Node Bifurcation: The Inoculum Effect, with in place of the tolerated dose : draw the graph of and a horizontal line at height . The activator grows where the graph lies above the line, and the steady states are the crossings. At a crossing the slope of the right-hand side is
so by the slope test (Proposition 1) a crossing where falls is stable and one where rises is unstable. The factor makes both fast: the activator settles long before the inhibitor has moved.
The cubic is odd. It falls on , rises on and falls again on , with a minimum and a maximum , and it takes these values once more at . A horizontal line therefore meets it three times if and once if .
Proposition 1 (The fast equation is bistable)
Fix in the fast equation (2).
If , there are three steady states, one in each of , and . The outer two are stable and the middle one is unstable. Initial values below the middle state tend to the lower state; initial values above it tend to the upper state.
If , there is one steady state, with if and if . It is stable, and every initial value tends to it.
There are saddle-node bifurcations at , where the upper and middle states meet at , and at , where the lower and middle states meet at .
Proof 1
On an interval where is monotone, it takes every value between its end values exactly once. On , falls from to ; on it rises from to ; on it falls from to . For each interval contains one solution of , and since and , the outer two lie in and . For only the first interval reaches height , and since , its solution has ; the case is its mirror image, since is odd. At the middle and the right interval both end at the maximum , so their two solutions meet at ; at the left and the middle interval meet at .
Stability is (3): for and for . For the basins, is positive below the lowest state (since as ) and changes sign at each simple crossing, so the arrows point toward the outer states and away from the middle one. A solution that starts between two neighbouring steady states is monotone and cannot cross either, so it converges to the one its arrow points to.
w0 = 0.2
roots0 = sorted(x.real for x in np.roots([-1 / 3, 0, 1, -w0]) if abs(x.imag) < 1e-9)
def phase_arrows(ax, w, roots, vertical, color=C_INNER, lo=-2.4, hi=2.4, g=0.12):
"""Arrows of eps v' = c(v) - w between the steady states, drawn along the
line at height w (vertical=False) or up the line at w (vertical=True)."""
pts = [lo] + list(roots) + [hi]
for x0, x1 in zip(pts[:-1], pts[1:]):
if x1 - x0 < 3 * g:
continue
u, v = (x0 + g, x1 - g) if c(0.5 * (x0 + x1)) > w else (x1 - g, x0 + g)
xy, xyt = ((w, v), (w, u)) if vertical else ((v, w), (u, w))
ax.annotate("", xy=xy, xytext=xyt,
arrowprops=dict(arrowstyle="-|>", color=color, lw=1.1))
fig, axs = plt.subplots(1, 2, figsize=(7.4, 3.3))
ax = axs[0]
ax.plot(VV[outer_l], c(VV[outer_l]), color=C_OUTER, lw=1.8)
ax.plot(VV[outer_r], c(VV[outer_r]), color=C_OUTER, lw=1.8)
ax.plot(VV[mid], c(VV[mid]), color=C_OUTER, lw=1.26, ls="--")
ax.fill_between(VV, w0, c(VV), where=c(VV) > w0, color=C_COMP, alpha=0.15, lw=0)
for y in (2 / 3, -2 / 3):
ax.axhline(y, color=C_GREY, lw=0.7, ls=":")
ax.axhline(w0, color=C_INNER, lw=1.0)
phase_arrows(ax, w0, roots0, vertical=False)
for x in roots0:
mark(ax, x, w0, abs(x) > 1, ms=5)
ax.text(-0.6, w0 + 0.08, f"$w = {w0}$", fontsize=8, color=C_INNER, ha="center")
ax.text(-2.35, 0.73, "$2/3$", fontsize=8, color=C_GREY)
ax.text(-2.35, -0.6, "$-2/3$", fontsize=8, color=C_GREY)
ax.set_xlim(-2.4, 2.4); ax.set_ylim(-1.5, 1.5)
ax.set_xlabel("activator $v$"); ax.set_ylabel("$c(v)$")
ax.set_title("graphical method: $w$ is a horizontal line", fontsize=8.5)
ax = axs[1]
cubic(ax)
ax.fill_betweenx(VV, w0, c(VV), where=c(VV) > w0, color=C_COMP, alpha=0.15, lw=0)
ax.axvline(w0, color=C_INNER, lw=1.0)
phase_arrows(ax, w0, roots0, vertical=True)
for x in roots0:
mark(ax, w0, x, abs(x) > 1, ms=5)
ax.set_xlim(-1.5, 1.5); ax.set_ylim(-2.4, 2.4)
ax.set_xlabel("inhibitor $w$"); ax.set_ylabel("activator $v$")
ax.set_title("axes swapped: $w$ is a vertical phase line", fontsize=8.5)
fig.tight_layout();
The same picture twice, at . Left: the graph of and the line at height . Where the graph lies above the line (shaded) the activator grows; the arrows of the phase line are drawn along the line, with filled circles for stable steady states and an open one for the unstable state. Dotted: the special heights . Right: the axes swapped. The graph of lies on its side, the line at stands up, and its arrows are the phase line at that . Repeating the right panel for every gives the bifurcation diagram below: the curve is the same for every , and only the vertical line moves.
The bifurcation diagram is an S¶
The steady states satisfy , which gives the parameter as a function of the state. There is no need to solve the cubic for : letting run and plotting the points , with across and up, traces out the diagram. It is the graph of turned on its side, an S. The outer branches lean back, where , and are stable; the middle branch leans forward and is unstable. The turning points of become the rightmost and leftmost points of the S, , where and (Remark 4). There a stable and the unstable branch meet and disappear: two saddle-node bifurcations, or folds.
fig, axs = plt.subplots(1, 2, figsize=(7.4, 3.3), sharey=True)
for ax in axs:
ax.set_xlim(-1.5, 1.5); ax.set_ylim(-2.4, 2.4)
ax.set_xlabel("inhibitor $w$ (frozen: a parameter)")
ax = axs[0]
ax.fill_betweenx(VV, -1.5, c(VV), color=C_COMP, alpha=0.12, lw=0, zorder=0)
cubic(ax)
for w in (-0.9, w0, 0.9):
roots = sorted(x.real for x in np.roots([-1 / 3, 0, 1, -w]) if abs(x.imag) < 1e-9)
ax.plot([w, w], [-2.4, 2.4], color="0.85", lw=0.8, zorder=1)
phase_arrows(ax, w, roots, vertical=True)
for x in roots:
mark(ax, w, x, abs(x) > 1, ms=5)
ax.plot([2 / 3, -2 / 3], [1, -1], "o", color=C_INNER, ms=5, zorder=7)
ax.annotate("fold at $(2/3, 1)$", xy=(2 / 3, 1), xytext=(0.75, 1.6), fontsize=8,
color=C_INNER, arrowprops=dict(arrowstyle="-", color=C_INNER, lw=0.6))
ax.annotate("fold at $(-2/3, -1)$", xy=(-2 / 3, -1), xytext=(-1.45, -1.75), fontsize=8,
color=C_INNER, arrowprops=dict(arrowstyle="-", color=C_INNER, lw=0.6))
ax.set_ylabel("activator $v$")
ax.set_title("steady states and phase lines", fontsize=8.5)
ax = axs[1]
cubic(ax, color=C_GREY)
up, lo_ = VV[VV >= 1], VV[VV <= -1]
ax.plot(c(up), up, color=C_INNER, lw=2.2)
ax.plot(c(lo_), lo_, color=C_INNER, lw=2.2)
for xy0, xy1 in (((c(1.85), 1.85), (c(1.6), 1.6)), # w up along the upper branch
((2 / 3, 0.85), (2 / 3, -1.85)), # jump down
((c(-1.6), -1.6), (c(-1.35), -1.35)), # w down along the lower branch
((-2 / 3, -0.85), (-2 / 3, 1.85))): # jump up
ax.annotate("", xy=xy1, xytext=xy0,
arrowprops=dict(arrowstyle="-|>", color=C_INNER, lw=1.5))
ax.text(-0.45, 1.35, "$w$ up", fontsize=8, color=C_INNER)
ax.text(0.75, -0.4, "jump\ndown", fontsize=8, color=C_INNER)
ax.text(0.05, -1.3, "$w$ down", fontsize=8, color=C_INNER)
ax.text(-1.05, 0.2, "jump\nup", fontsize=8, color=C_INNER)
ax.annotate("", xy=(-2 / 3, 2.32), xytext=(2 / 3, 2.32),
arrowprops=dict(arrowstyle="<->", color="#777777", lw=0.9))
ax.text(0.72, 2.25, "bistable", fontsize=8, color="#777777")
ax.set_title("hysteresis", fontsize=8.5)
fig.tight_layout();
Bifurcation diagram of the fast equation (2) in the inhibitor . Left: solid branches are stable, the dashed middle branch unstable, and the activator grows in the shaded region to the left of the S; the vertical arrows are the phase lines at , 0.2 and 0.9. The middle branch meets the upper one at the fold and the lower one at the fold . Right: raising slowly, the activator follows the upper branch until the fold at and drops to ; lowering again, it follows the lower branch until the fold at and jumps up to . Between the folds (double arrow) both outer branches are stable.
Between the folds, which branch holds the activator depends on its history: the hysteresis loop of Saddle-Node Bifurcation: The Inoculum Effect, in the right panel. There an experimenter had to turn the dose to go round the loop. In FitzHugh–Nagumo nobody has to. By , the inhibitor rises while and falls while . If , it rises on the whole upper branch, where , and falls on the whole lower branch, where : exactly the motion that drives the activator round the loop. Whether the loop really closes into an oscillation is what the rest of the page settles.
The S is also the -nullcline of the full model (1), the critical manifold of Quasi-Steady State. The fast nullcline is the bifurcation diagram of the fast equation, with the slow variable as the parameter. This holds for every fast/slow system (Remark 3); in the drug model the diagram had no folds.
Remark 2 (Where the critical manifold attracts)
The pull toward the critical manifold is . It is negative on the outer branches , which attract in the sense of (4), positive on the middle branch, which repels, and zero at the folds . For the drug it was , never zero. So Proposition 4 and Tikhonov’s theorem Theorem 1 apply on each outer branch, away from the folds, and break down at them.
The phase plane¶
Now let the inhibitor move. We draw the phase plane with across and up, as in the bifurcation diagram, so that the fast motion is vertical. The nullclines (Definition 2) are the S, , on which the arrows are horizontal, and the line , on which they are vertical. They cross once, at the steady state . It lies on the middle branch of the S if and on an outer branch if .
Directions. Left of the S the activator rises, and right of it it falls. Above the line the inhibitor grows and the state moves right; below it the state moves left. So the state moves right above the steady state, down to its right, left below it and up to its left: the flow turns clockwise. This is the rotation that opposite-sign cross effects allow (What it takes to oscillate); in the drug model the arrows sent the state toward a steady state or away from it, but never around it.
Speeds. The vertical velocity carries the factor , the horizontal one does not. Away from the S the arrows are nearly vertical, and only within a distance of order of the S do the two velocities become comparable.
eps, a = 0.05, 0.5
gw, gv = np.meshgrid(np.linspace(-1.3, 1.3, 14), np.linspace(-2.4, 2.4, 15))
U, V = gv + a, (c(gv) - gw) / eps # (w', v')
L = np.hypot(U / 2.8, V / 5.0) # length in axis fractions
fig, ax = plt.subplots(figsize=(5.4, 3.6))
ax.quiver(gw, gv, 0.045 * U / L, 0.045 * V / L * 5 / 2.8, color="0.65",
angles="xy", scale_units="xy", scale=1, width=0.004)
cubic(ax)
ax.axhline(-a, color=C_INNER, lw=1.8)
mark(ax, c(-a), -a, False)
ax.plot([2 / 3, -2 / 3], [1, -1], "o", color=C_OUTER, ms=4, zorder=6)
for w, v, s in ((-1.05, 1.6, "$\\dot v > 0,\\ \\dot w > 0$"),
(0.55, 1.95, "$\\dot v < 0,\\ \\dot w > 0$"),
(0.55, -1.15, "$\\dot v < 0,\\ \\dot w < 0$"),
(-1.25, -2.2, "$\\dot v > 0,\\ \\dot w < 0$")):
ax.text(w, v, s, fontsize=7.5, bbox=dict(fc="white", ec="none", alpha=0.85, pad=1))
ax.text(1.0, -a + 0.1, "$\\dot w = 0$", fontsize=8, color=C_INNER)
ax.text(0.74, 0.62, "$\\dot v = 0$", fontsize=8, color=C_OUTER,
bbox=dict(fc="white", ec="none", alpha=0.85, pad=1))
ax.set_xlim(-1.4, 1.4); ax.set_ylim(-2.5, 2.5)
ax.set_xlabel("inhibitor $w$"); ax.set_ylabel("activator $v$")
fig.tight_layout();
Nullclines and directions of (1) for , . Blue: the -nullcline, the S (dashed between the folds, marked by dots). Orange: the -nullcline . Grey: the direction of the arrow at a grid of points, all drawn the same length. Away from the S they are nearly vertical; near it they turn horizontal. The signs label the four regions; around the steady state (open circle) the arrows turn clockwise.
So a trajectory drops or rises almost vertically onto the S, then moves slowly along it. Where the steady state sits on the S decides what happens next.
The steady state¶
Proposition 2 (Stability of the steady state)
At the Jacobian of (1), ordered as , is
The steady state is never a saddle, and
for it is stable; it lies on an outer, stable branch of the S;
for it is unstable; it lies on the middle branch;
it is a spiral when , that is, close to the folds (for : );
at it sits exactly on a fold, , and the eigenvalues are .
Proof 2
The partial derivatives of are and ; those of are 1 and 0. At this gives (4). Since , the classification of Proposition 5 gives stability for , instability for , and complex eigenvalues when , which is . At the eigenvalues solve .
The steady state is unstable exactly when it sits on the middle branch, where the frozen switch is unstable too.
An oscillation¶
For trajectories leave the steady state, and there is no other one to go to. Two steps show that they settle on a closed orbit: a region they cannot leave, and the Poincaré–Bendixson theorem.
A trapping region¶
The arrows turn clockwise, but that alone does not keep a trajectory from spiralling out to infinity. We need a bounded region that the flow never leaves. A box does not work: the inhibitor has no decay, so on the right side of any box, above the line , the inhibitor grows and the flow leaves. But there the state is also right of the S, where falls at a speed of order , so a side that leans slightly to the left is crossed inward. The same holds, mirrored, on the left.
Proposition 3 (A trapping hexagon)
Let and . There are hexagons of the shape in the figure below, as large as we like, such that no trajectory of (1) that starts in leaves it. In particular every trajectory stays bounded.
Proof 3
Choose , and with
and let be the hexagon with corners, in the plane,
We check that on each side the arrows point into or along the side.
Top, , . Here , so : the arrows point down.
Bottom, , . Here , so : up.
Right, lower part, , : , so the arrows point left or along the side.
Left, upper part, , : , right.
Right, slanted part, from to . On it , while for , so ; and . A normal pointing out of is , in components . The velocity has with it the product by (5): the arrows point in.
Left, slanted part, from to : the same with all signs reversed, using for .
For large hexagons, take . Then the last condition in (5) reads , which holds once is large compared with , and the second condition allows to grow like .
For and , the numbers , , satisfy (5). The hexagon is far larger than any orbit; its job is only to show that nothing escapes.
eps, a = 0.05, 0.5
Vh, Wh, sh = 3.0, 5.0, 0.25
hexagon = np.array([(-Wh, Vh), (Wh - sh, Vh), (Wh, -a), (Wh, -Vh),
(-Wh + sh, -Vh), (-Wh, -a), (-Wh, Vh)])
fig, ax = plt.subplots(figsize=(6.2, 3.4))
phase_plane(ax, lambda w, v: v + a, lambda w, v: (c(v) - w) / eps,
(-5.6, 5.6), (-3.5, 3.5), trajs=[(-4.9, 2.5), (4.95, -2.5), (4.9, 1.0),
(-4.95, -1.5), (0.0, 2.95), (0.0, -2.95)],
t_max=12, density=1.0, null=False)
cubic(ax, lw=1.4)
ax.plot(*hexagon.T, color=C_INNER, lw=1.6, zorder=5)
ax.set_xlabel("inhibitor $w$"); ax.set_ylabel("activator $v$")
fig.tight_layout();
The trapping hexagon of Proposition 3 (orange) for , , with , , . The two slanted sides, above the line on the right and below it on the left, lean only slightly. Trajectories from points on the boundary (squares) all move inward, drop onto the S and settle on a loop around it, the closed orbit of Proposition 4.
Poincaré–Bendixson¶
In the plane, a trajectory trapped in a bounded region that never comes to rest cannot cross its own earlier laps, so the laps line up like the grooves of a record and close in on a loop.
Theorem 1 (Poincaré–Bendixson)
Let be a closed, bounded region of the plane that contains no steady state. If a trajectory starts in and stays in for all later times, then it is a closed orbit or it approaches one.
For a proof see Strogatz §7.3 Strogatz, 2015. The hexagon traps trajectories; to keep the steady state out of the region, we cut a small hole around it.
Proposition 4 (FitzHugh–Nagumo oscillates)
If , then for every the model (1) has a closed orbit, and every trajectory except the steady state approaches a closed orbit.
Proof 4
For both eigenvalues of (4) have positive real part (Proposition 2), whatever is. So there is a small ellipse around the steady state that every trajectory crosses outward: for the linearized flow, take a level curve of a quadratic form that grows along it, and near the steady state the nonlinear terms are too small to change the direction of crossing. Let be a trapping hexagon of Proposition 3 with the inside of removed, chosen to contain both the ellipse and the starting point. Trajectories that start in cannot leave through the hexagon, nor enter the ellipse, so they stay in . The only steady state is inside , so contains none, and Theorem 1 applies.
In the trapping-hexagon figure above, the trajectories end on a closed orbit that runs round the hysteresis loop of the fast equation: right along the upper branch of the S to its fold, a drop to the lower branch, left along it to the lower fold, and a jump back up. The same trip, made once, is the pulse of an excitable system.
Excitability: just past the fold¶
Take slightly larger than 1. The steady state lies on the lower branch just past the fold and is stable (Proposition 2). Nothing oscillates. Now kick the activator. A small kick that leaves below the middle branch dies away: the state falls back to the lower branch and to rest. A large kick that puts above the middle branch is carried up to the upper branch, and the state makes the trip of the closed orbit once: crawl right to the upper fold, jump down to , crawl left back to rest. One full pulse.
a = 1.3 # exaggerated, so the gap shows
ws = c(-a) # rest: (w*, v*) = (c(-a), -a)
root = np.sqrt(12 - 3 * a**2)
vm, vu = (a - root) / 2, (a + root) / 2 # middle and upper states at w*
def arrow(ax, p, q, fast, color=C_EXACT, lw=1.4):
"""Arrow from p to q: two heads for a fast move, one for a slow one."""
head = dict(arrowstyle="-|>", color=color, lw=lw, shrinkA=0, shrinkB=0,
mutation_scale=11)
ax.annotate("", xy=q, xytext=p, arrowprops=head)
if fast:
m = (0.5 * (p[0] + q[0]), 0.5 * (p[1] + q[1]))
ax.annotate("", xy=m, xytext=p, arrowprops=head)
def along(ax, v0, v1, color=C_EXACT, lw=2.2):
"""Slow crawl along the S from v0 to v1, with one head in the middle."""
v = np.linspace(v0, v1, 200)
ax.plot(c(v), v, color=color, lw=lw, solid_capstyle="round", zorder=4)
k = len(v) // 2
arrow(ax, (c(v[k - 1]), v[k - 1]), (c(v[k]), v[k]), False, color, lw=1.4)
fig, ax = plt.subplots(figsize=(6.0, 3.8))
cubic(ax, color="0.65", lw=1.4)
ax.axhline(-a, color=C_INNER, lw=1.0, alpha=0.7)
# small kick: stays below the threshold and falls back
ax.annotate("", xy=(ws, vm - 0.22), xytext=(ws, -a),
arrowprops=dict(arrowstyle="-|>", color=C_OUTER, lw=1.1, ls=":",
shrinkA=0, shrinkB=0))
ax.annotate("", xy=(ws - 0.02, -a + 0.04), xytext=(ws - 0.02, vm - 0.22),
arrowprops=dict(arrowstyle="-|>", color=C_OUTER, lw=1.2, shrinkA=0,
shrinkB=0, connectionstyle="arc3,rad=0.6"))
# large kick: crosses the threshold, then the pulse
kick = vm + 0.3
ax.plot([ws + 0.035, ws + 0.035], [-a, kick], color=C_EXACT, lw=1.2, ls=":")
arrow(ax, (ws + 0.035, kick), (ws + 0.035, vu - 0.04), True) # jump up
along(ax, vu, 1.0) # crawl right
arrow(ax, (2 / 3, 1.0), (2 / 3, -1.96), True) # drop
along(ax, -2.0, -a - 0.02) # crawl back
mark(ax, ws, -a, True, ms=7)
ax.plot([ws], [vm], "o", ms=6, mfc="white", mec=C_EXACT, zorder=6)
ax.plot([2 / 3], [1], "o", color="0.65", ms=4, zorder=5)
txt = dict(fontsize=8, bbox=dict(fc="white", ec="none", alpha=0.85, pad=1))
ax.annotate("threshold:\nthe middle branch", xy=(ws, vm), xytext=(-1.25, 0.2),
arrowprops=dict(arrowstyle="-", color="#555555", lw=0.6), **txt)
ax.text(ws - 0.3, -a - 0.3, "rest", **txt)
ax.text(-1.25, -0.95, "small kick:\nfalls back", color=C_OUTER, **txt)
ax.text(-0.42, 0.45, "large kick:\njump up", **txt)
ax.text(0.05, 2.15, "crawl right (slow)", **txt)
ax.text(0.72, -0.45, "drop\n(fast)", **txt)
ax.text(-0.15, -2.35, "crawl back: refractory", **txt)
ax.text(1.0, -a + 0.08, "$\\dot w = 0$", fontsize=8, color=C_INNER)
ax.set_xlim(-1.3, 1.3); ax.set_ylim(-2.45, 2.45)
ax.set_xlabel("inhibitor $w$"); ax.set_ylabel("activator $v$")
fig.tight_layout();
A sketch of excitability for small , with the steady state (filled) just past the lower fold, drawn at so that the gap shows. Double arrows are fast, single arrows slow. A small kick (blue) stays below the middle branch, the threshold, and falls straight back to rest. A large kick (dotted) crosses it: the activator jumps up to the upper branch, crawls right to the upper fold, drops to the lower branch and crawls back to rest. On the way back the threshold is further away than at rest: the system is refractory.
Definition 2 (Excitable)
A system with a stable steady state is excitable if small perturbations of the steady state decay directly, while every perturbation beyond a threshold produces a large excursion of the same stereotyped shape before the state returns to rest (all or none).
Why does the threshold sit at the middle branch, and why does a kick beyond it always make the whole trip? A kick changes at once and leaves at its rest value . Right after the kick the fast equation (2) at this frozen takes over, and Proposition 1 decides: below its middle state returns to the lower state, which is the rest state; above it, rises to the upper branch. The next proposition says how large the threshold is and how fast the decision is made.
Proposition 5 (The threshold just past the fold)
Let . With frozen at , the fast equation has the rest state , the middle state and an upper state. So as a kick from rest fires exactly when
The threshold rises from 0 at to 3 at . Just past the fold, with small,
and the rest state attracts and the middle state repels at the rate , to leading order.
Proof 5
For any , . With , the other solutions of solve , that is , real for . The minus sign gives a value between -1 (at ) and 1 (at ), the middle state; the plus sign gives one above 1. At , , so and . By (3) the rates are at the rest state and at the middle state.
At the threshold is 0.20. A kick beyond it can only end in a full pulse: on the upper branch and there is no steady state, so the state must crawl to the upper fold and come round. Nothing on this trip depends on the size of the kick. The response is set by the S, not by the kick, and that is the all-or-none response.
The proposition also says why excitability lives just past the fold. First, the threshold grows with the distance from the fold, to 3 at ; beyond , , the fast equation at has only the lower state, and no kick of the activator alone produces a pulse. Second, the decision between returning and firing is made at the rate . The threshold is sharp only when this is fast compared with the inhibitor, that is when is large compared with . Closer to the fold a kicked state hesitates near the middle branch long enough for to move, and the threshold blurs.
eps, a = 0.05, 1.1
v0, w0 = -a, c(-a)
def kicked(kicks, T=10.0, n=5000):
"""Kick v by dv at the given times; return t, v, w."""
ts, vs, ws = [], [], []
y, t0 = [v0, w0], 0.0
for tk, dv in list(kicks) + [(T, 0.0)]:
if tk > t0:
t, (v, w) = solve(y, tk - t0, eps, a, n=max(2, int(n * (tk - t0) / T)))
ts.append(t + t0); vs.append(v); ws.append(w)
y = [v[-1], w[-1]]
y = [y[0] + dv, y[1]]
t0 = tk
return np.concatenate(ts), np.concatenate(vs), np.concatenate(ws)
def fires(dv):
t, v, w = kicked([(0.0, dv)], T=4.0, n=2000)
return v.max() > 0.5
lo, hi = 0.0, 1.0
for _ in range(30):
m = 0.5 * (lo + hi)
lo, hi = (lo, m) if fires(m) else (m, hi)
thr = hi
fig, axs = plt.subplots(1, 2, figsize=(7.4, 3.1), gridspec_kw={"width_ratios": [1, 1.3]})
ax = axs[0]
cubic(ax)
ax.axhline(-a, color=C_INNER, lw=1.0, alpha=0.7)
for dv, col in ((thr - 0.03, C_OUTER), (thr + 0.03, C_EXACT)):
t, v, w = kicked([(0.0, dv)], T=6.0)
ax.plot(w, v, color=col, lw=1.1)
ax.plot([w0, w0], [v0, v0 + dv], color=col, lw=1.1, ls=":")
mark(ax, w0, v0, True)
ax.set_xlim(-1.0, 1.2); ax.set_ylim(-2.4, 2.4)
ax.set_xlabel("inhibitor $w$"); ax.set_ylabel("activator $v$")
ax.set_title(rf"$a = {a}$: excitable")
ax = axs[1]
for dv, col, lab in ((thr - 0.03, C_OUTER, "kick below threshold"),
(thr + 0.03, C_EXACT, "kick above threshold")):
t, v, w = kicked([(0.5, dv)], T=10.0)
ax.plot(t, v, color=col, lw=1.2, label=lab)
t, v, w = kicked([(0.5, 0.8), (2.6, 0.8), (5.6, 0.8)], T=10.0)
ax.plot(t, v, color=C_INNER, lw=1.0, alpha=0.8, label="three kicks of 0.8")
for tk in (0.5, 2.6, 5.6):
ax.annotate("", xy=(tk, -1.6), xytext=(tk, -2.3),
arrowprops=dict(arrowstyle="-|>", color=C_INNER, lw=0.8))
ax.set_xlabel("time"); ax.set_ylabel("activator $v$"); ax.set_xlim(0, 10)
ax.set_ylim(-2.4, 2.4)
ax.legend(frameon=False, fontsize=7.5, loc="upper right")
fig.tight_layout();
print(f"threshold kick at eps = {eps}: {thr:.3f}")threshold kick at eps = 0.05: 0.332

Excitability at , . Left: kicks from rest (dotted) just below and just above threshold; the first returns at once, the second makes a full excursion around the S. Right: the same kicks in time, and, in orange, three equal kicks of size 0.8 (arrows). The second comes during the pulse, while the inhibitor is still high, and does nothing: the system is refractory.
For the threshold kick is about 0.33, larger than the value 0.2, because moves while moves: at the middle branch repels at a rate of only about . The threshold is not perfectly sharp: kicks in a very narrow band give intermediate responses.
Remark 3 (Refractoriness from the phase plane)
During the crawl back along the lower branch, is larger than at rest. The threshold is the middle branch at the current , which rises as increases, so a larger kick is needed. Right after the upper fold, at , the lower and middle branches are at and : a kick of 3 is needed. The refractory period is the time it takes to come back down.
Summary¶
FitzHugh–Nagumo has three behaviours, set by where the slow nullcline crosses the S: on the middle branch it oscillates, just past a fold it is excitable, and far past a fold it is simply stable. The first two are side by side below, in the plane and in time.
eps, T = 0.05, 8.0
C_TRAJ = (C_EXACT, "#CC79A7") # one colour per starting point
cases = ((0.5, [(-0.38, -0.3), (-1.2, 2.3)], r"$a = 0.5$: steady state on the middle branch"),
(1.1, [(0.6, 2.2), (-0.62, -0.55)], r"$a = 1.1$: just past the lower fold"))
fig, axs = plt.subplots(2, 2, figsize=(7.4, 5.6), sharey=True,
gridspec_kw={"height_ratios": [1.3, 1]})
for k, (a, starts, title) in enumerate(cases):
F = lambda w, v: v + a
G = lambda w, v: (c(v) - w) / eps
ax, axt = axs[0, k], axs[1, k]
phase_plane(ax, F, G, (-1.4, 1.4), (-2.5, 2.5))
t = np.linspace(0, T, 4000)
for z0, col in zip(starts, C_TRAJ):
s = solve_ivp(lambda t, z: [F(*z), G(*z)], (0, T), z0, rtol=1e-9,
atol=1e-11, method="LSODA", dense_output=True)
w, v = s.sol(t)
ax.plot(w, v, color=col, lw=1.1, zorder=4)
ax.plot(*z0, "s", color=col, ms=4, zorder=5)
axt.plot(t, v, color=col, lw=1.1)
axt.axhline(-a, color=C_INNER, lw=0.8, alpha=0.7)
ax.set_xlabel("inhibitor $w$"); ax.set_title(title, fontsize=8.5)
axt.set_xlabel("time"); axt.set_xlim(0, T)
axs[0, 0].set_ylabel("activator $v$"); axs[1, 0].set_ylabel("activator $v$")
axs[0, 0].plot([], [], color=C_OUTER, lw=2, label=r"$\dot v = 0$")
axs[0, 0].plot([], [], color=C_INNER, lw=2, label=r"$\dot w = 0$")
axs[0, 0].legend(loc="lower left", frameon=False, fontsize=7.5)
fig.tight_layout();
Top: phase planes of (1) with . Blue: the S. Orange: the -nullcline . Pale lines: streamlines, thicker where the flow is faster. Squares mark the two starting points, black and pink. Bottom: the activator against time for the same two trajectories, in the same colours, with the level of the steady state in orange. Left, : the steady state is on the middle branch and unstable. The black trajectory starts next to it, the pink one far away, and both end on the same closed orbit (Proposition 4): pulses that repeat for ever. Right, : the steady state is just past the lower fold and stable. Both trajectories make one excursion around the S, a single pulse, and then rest at (Proposition 5).
Two kinds of threshold¶
| drug and cells | FitzHugh–Nagumo, excitable | |
|---|---|---|
| what decides | which side of the separatrix you start on | whether the kick crosses the middle branch of the S |
| steady states | two stable, one saddle | one, stable |
| the threshold is | the stable manifold of a saddle | a repelling branch of the fast nullcline |
| after the decision | stays at a different steady state forever | returns to the same rest state after a pulse |
| sharpness | exactly sharp | sharp up to an exponentially small band |
| memory | permanent: a switch | none after the pulse; brief refractoriness |
The switch remembers which side it was put on. The excitable system forgets, and only reports, with a stereotyped pulse, that something large enough happened.
- FitzHugh, R. (1961). Impulses and physiological states in theoretical models of nerve membrane. Biophysical Journal, 1(6), 445–466. 10.1016/S0006-3495(61)86902-6
- Nagumo, J., Arimoto, S., & Yoshizawa, S. (1962). An active pulse transmission line simulating nerve axon. Proceedings of the IRE, 50, 2061–2070.
- Strogatz, S. H. (2015). Nonlinear Dynamics and Chaos (2nd ed.). Westview Press.