---
# System prepended metadata

title: Fitzhugh-Nagumo ODEs

---

# Fitzhugh-Nagumo ODEs

We consider the Fitzhugh-Nagumo ODEs as an example.


$$ \dot V = c\Big(V - \frac{V^3}{3} + R \Big),$$
$$ \dot R = -\frac{V - a + bR }{c}.$$

The goal here is to recover the parameters $a, b,$ and $c$ from observations of $R$ and $V$. We obtain $N = 200$ observations from the solution field from random (uniform) time points between $t=0$ and $t=20$. Independent Gaussian-distributed noise of variance 0.5 is then added onto the measurements.

[posterior density plot]

In standard HMC, this gradient of the potential energy requires the sensitivies of the solution with respect to the parameters, which reads

[enter sensitivity equations]

By defining $X = [V ; R]$, in constrained HMC the constrained equations are defined is 

$$ c_i(a,b,c,\eta) = X_i(a,b,c) + \sigma \eta - Y_i = 0, \qquad i = 1,...,N$$

The corresponding manifold defined by the constraint functions read

$$\mathcal{M} = \{ a,b,c, \frac{Y-X(a,b,c)}{\sigma} : Y = X(a,b,c) + \sigma \eta \}$$

