🟒 Neural mass equation

The following model is taken from [Cortes]:

\[\left\{\begin{array}{l} \tau \dot{E}=-E+g\left(J u x E+E_{0}\right) \\ \dot{x}=\tau_{D}^{-1}(1-x)-u E x \\ \dot{u}=U_0 E(1-u)-\tau_{F}^{-1}(u-U_0) \end{array}\right.\]

with

\[g(y):=\alpha\log(1+exp(y/\alpha)).\]

We use this model as a mean to introduce the basics of BifurcationKit.jl, namely the continuation of equilibria.

It is easy to encode the ODE as follows

using Revise, Plotsimport BifurcationKit as BKimport BifurcationKit: @optic# vector fieldfunction TMvf(z, p)	(;J, Ξ±, E0, Ο„, Ο„D, Ο„F, U0) = p	E, x, u = z	SS0 = J * u * x * E + E0	SS1 = Ξ± * log(1 + exp(SS0 / Ξ±))	[		(-E + SS1) / Ο„,		(1.0 - x) / Ο„D - u * x * E,		(U0 - u) / Ο„F +  U0 * (1.0 - u) * E	]end# parameter valuespar_tm = (Ξ± = 1.5, Ο„ = 0.013, J = 3.07, E0 = -2.0, Ο„D = 0.200, U0 = 0.3, Ο„F = 1.5, Ο„S = 0.007)# initial conditionz0 = [0.238616, 0.982747, 0.367876]# Bifurcation Problemprob = BK.ODEBifProblem(TMvf, z0, par_tm, (@optic _.E0);	record_from_solution = (x, p; k...) -> (E = x[1], x = x[2], u = x[3]),)

We first compute the branch of equilibria

# continuation options, we limit the parameter range for E0opts_br = BK.ContinuationPar(p_min = -4.0, p_max = -0.9)# continuation of equilibriabr = BK.continuation(prob, BK.PALC(), opts_br;	# we want to compute both sides of the branch of the initial	# value of E0 = -2	bothside = Val(true))scene = plot(br, legend=:topleft)
Example block output

With detailed information:

br
 β”Œβ”€ Curve type: EquilibriumCont
 β”œβ”€ Number of points: 61
 β”œβ”€ Type of vectors: Vector{Float64}
 β”œβ”€ Parameter E0 starts at -4.0, ends at -0.9
 β”œβ”€ Algo: PALC [Secant]
 └─ Special points:

β”Œβ”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”
β”‚ Nb β”‚    type    β”‚     E0      β”‚          interval          β”‚ precision β”‚   status    β”‚    Ξ΄     β”‚ step β”‚
β”œβ”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€
β”‚  1 β”‚   endpoint β”‚ -4.00000000 β”‚                            β”‚           β”‚             β”‚          β”‚    0 β”‚
β”‚  2 β”‚         bp β”‚ -1.46309794 β”‚ (-1.46309794, -1.46302753) β”‚     7e-05 β”‚   converged β”‚ ( 1,  0) β”‚   30 β”‚
β”‚  3 β”‚       hopf β”‚ -1.85075293 β”‚ (-1.85075293, -1.84970242) β”‚     1e-03 β”‚   converged β”‚ ( 2,  2) β”‚   40 β”‚
β”‚  4 β”‚         bp β”‚ -1.86522340 β”‚ (-1.86522340, -1.86494948) β”‚     3e-04 β”‚   converged β”‚ (-1,  0) β”‚   42 β”‚
β”‚  5 β”‚       hopf β”‚ -1.14947379 β”‚ (-1.15202958, -1.14947379) β”‚     3e-03 β”‚   converged β”‚ (-2, -2) β”‚   57 β”‚
β”‚  6 β”‚   endpoint β”‚ -0.90000000 β”‚                            β”‚           β”‚             β”‚          β”‚   60 β”‚
β””β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”˜

If you only want to compute the branch without the bifurcations (more information is provided Detection of bifurcation points of Equilibria ), change the continuation options to

opts_br = BK.ContinuationPar(p_min = -4.0, p_max = -0.9,	detect_bifurcation = 0)# continuation of equilibriabr = BK.continuation(prob, BK.PALC(), opts_br;	# we want to compute both sides of the branch of the initial	# value of E0 = -2	bothside = Val(true))scene = plot(br, plotfold=true)
Example block output

References

  • Cortes

    Cortes, Jesus M., Mathieu Desroches, Serafim Rodrigues, Romain Veltz, Miguel A. MuΓ±oz, and Terrence J. Sejnowski. Short-Term Synaptic Plasticity in the Deterministic Tsodyks–Markram Model Leads to Unpredictable Network Dynamics.” Proceedings of the National Academy of Sciences 110, no. 41 (October 8, 2013): 16610–15. https://doi.org/10.1073/pnas.1316071110.