forked from nest/nestml
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaeif_cond_exp.nestml
125 lines (94 loc) · 3.61 KB
/
aeif_cond_exp.nestml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
"""
aeif_cond_exp - Conductance based exponential integrate-and-fire neuron model
#############################################################################
Description
+++++++++++
aeif_cond_exp is the adaptive exponential integrate and fire neuron
according to Brette and Gerstner (2005), with post-synaptic
conductances in the form of truncated exponentials.
This implementation uses the embedded 4th order Runge-Kutta-Fehlberg
solver with adaptive stepsize to integrate the differential equation.
The membrane potential is given by the following differential equation:
.. math::
C dV/dt= -g_L(V-E_L)+g_L*\Delta_T*\exp((V-V_T)/\Delta_T)-g_e(t)(V-E_e) \\
-g_i(t)(V-E_i)-w +I_e
and
.. math::
\tau_w * dw/dt = a(V-E_L) - W
Note that the spike detection threshold :math:`V_{peak}` is automatically set to
:math:`V_th+10` mV to avoid numerical instabilites that may result from
setting :math:`V_{peak}` too high.
References
++++++++++
.. [1] Brette R and Gerstner W (2005). Adaptive Exponential
Integrate-and-Fire Model as an Effective Description of Neuronal
Activity. J Neurophysiol 94:3637-3642.
DOI: https://doi.org/10.1152/jn.00686.2005
See also
++++++++
iaf_cond_exp, aeif_cond_alpha
"""
neuron aeif_cond_exp:
initial_values:
V_m mV = E_L # Membrane potential
w pA = 0 pA # Spike-adaptation current
end
equations:
inline V_bounded mV = min(V_m, V_peak) # prevent exponential divergence
kernel g_in = exp(-1/tau_syn_in*t)
kernel g_ex = exp(-1/tau_syn_ex*t)
# Add aliases to simplify the equation definition of V_m
inline exp_arg real = (V_bounded-V_th)/Delta_T
inline I_spike pA = g_L*Delta_T*exp(exp_arg)
inline I_syn_exc pA = convolve(g_ex, spikeExc) * ( V_bounded - E_ex )
inline I_syn_inh pA = convolve(g_in, spikeInh) * ( V_bounded - E_in )
V_m' = ( -g_L*( V_bounded - E_L ) + I_spike - I_syn_exc - I_syn_inh - w + I_e + I_stim ) / C_m
w' = (a*(V_bounded - E_L) - w)/tau_w
end
parameters:
# membrane parameters
C_m pF = 281.0 pF # Membrane Capacitance
t_ref ms = 0.0 ms # Refractory period
V_reset mV = -60.0 mV # Reset Potential
g_L nS = 30.0 nS # Leak Conductance
E_L mV = -70.6 mV # Leak reversal Potential (aka resting potential)
# spike adaptation parameters
a nS = 4 nS # Subthreshold adaptation.
b pA = 80.5 pA # Spike-trigg_exred adaptation.
Delta_T mV = 2.0 mV # Slope factor
tau_w ms = 144.0 ms # Adaptation time constant
V_th mV = -50.4 mV # Threshold Potential
V_peak mV = 0 mV # Spike detection threshold.
# synaptic parameters
E_ex mV = 0 mV # Excitatory reversal Potential
tau_syn_ex ms = 0.2 ms # Synaptic Time Constant Excitatory Synapse
E_in mV = -85.0 mV # Inhibitory reversal Potential
tau_syn_in ms = 2.0 ms # Synaptic Time Constant for Inhibitory Synapse
# constant external input current
I_e pA = 0 pA
end
internals:
# refractory time in steps
RefractoryCounts integer = steps(t_ref)
# counts number of tick during the refractory period
r integer
end
input:
spikeInh nS <- inhibitory spike
spikeExc nS <- excitatory spike
I_stim pA <- current
end
output: spike
update:
integrate_odes()
if r > 0: # refractory
r -= 1 # decrement refractory ticks count
V_m = V_reset # clamp potential
elif V_m >= V_peak: # threshold crossing detection
r = RefractoryCounts + 1
V_m = V_reset # clamp potential
w += b
emit_spike()
end
end
end