Skip to content

Commit

Permalink
Merge pull request #203 from DimitriPlotnikov/master
Browse files Browse the repository at this point in the history
new neuron model
  • Loading branch information
Plotnikov authored Jul 1, 2016
2 parents 4d468f6 + 47f130c commit 471091a
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 38 deletions.
116 changes: 79 additions & 37 deletions models/iaf_cond_beta.nestml
Original file line number Diff line number Diff line change
@@ -1,56 +1,103 @@
/* Name: iaf_cond_beta - Simple conductance based leaky integrate-and-fire neuron model.

Description:
iaf_cond_beta is an implementation of a spiking neuron using IAF dynamics with
conductance-based synapses. Incoming spike events induce a post-synaptic change
of conductance modelled by an beta function. The beta function
is normalised such that an event of weight 1.0 results in a peak current of 1 nS
at t = tau_syn.

Parameters:
The following parameters can be set in the status dictionary.
E_L double - Leak reversal potential in mV.
C_m double - Capacity of the membrane in pF
t_ref double - Duration of refractory period in ms.
V_th double - Spike threshold in mV.
V_reset double - Reset potential of the membrane in mV.
E_ex double - Excitatory reversal potential in mV.
E_in double - Inhibitory reversal potential in mV.
g_L double - Leak conductance in nS;
tau_ex_rise double - Rise time of the excitatory synaptic beta function in ms (rise time).
tau_ex_decay double - Time constant of the excitatory synaptic exponential function in ms (decay time).
tau_in_rise double - Rise time of the inhibitory synaptic beta function in ms (rise time).
tau_in_decay double - Time constant of the excitatory synaptic exponential function in ms (decay time).
I_e double - Constant input current in pA.
F_E double - Constant External input conductance in nS (excitatory).
F_I double - Constant External input conductance in nS (inhibitory).

Sends: SpikeEvent

Receives: SpikeEvent, CurrentEvent, DataLoggingRequest

References:
Meffin, H., Burkitt, A. N., & Grayden, D. B. (2004). An analytical
model for the large, fluctuating synaptic conductance state typical of
neocortical neurons in vivo . J. Comput. Neurosci., 16, 159-175.
Bernander, O ., Douglas, R. J., Martin, K. A. C., & Koch, C. (1991).
Synaptic background activity influences spatiotemporal integration in
single pyramidal cells. Proc. Natl. Acad. Sci. USA, 88(24),
11569-11573.
Kuhn, Aertsen, Rotter (2004) Neuronal Integration of Synaptic Input in
the Fluctuation- Driven Regime. Jneurosci 24(10) 2345-2356
Author: Schrader, Plesser
SeeAlso: iaf_cond_exp, iaf_cond_beta_mc, iaf_cond_alpha */

neuron iaf_cond_beta_neuron:


state:
# membrane potential
V_m mV
V_m mV = E_L
# inputs from the inh conductance
GI nS = 0
# inputs from the exc conductance
GE nS = 0

alias I_syn_exc pA = (F_E + GE) * ( V_m - E_ex )
alias I_syn_inh pA = (F_I + GI) * ( V_m - E_in )
alias I_leak pA = g_L * ( V_m - E_L )
end

equations:
# Implicit
GI'' = -GI'/tau_syn_rise_I
GI' = GI' - GI/tau_syn_decay_I
GI'' = -GI'/tau_syn_rise_I
GI' = GI' - GI/tau_syn_decay_I

GE'' = -GE'/tau_syn_rise_E
GE' = GE' -GE/tau_syn_decay_E
GE'' = -GE'/tau_syn_rise_E
GE' = GE' -GE/tau_syn_decay_E

V_m' = -1/Tau * (V_m - E_L) - 1/C_m * ( GI * (V_m-V_reversalI) + GE * (V_m-V_reversalE) - (I_e + I_stim))
V_m' = (-I_leak - I_syn_exc - I_syn_inh + I_stim + I_e ) / C_m
end

parameter:
V_th mV = -55.0 # Threshold Potential in mV
V_reset mV = -60.0 # Reset Potential in mV
t_ref ms = 2.0 # Refractory period in ms
g_L ms = 16.6667 # Leak Conductance in nS
C_m pF = 250.0 # Membrane Capacitance in pF
alias Tau ms = (1 / g_L) * C_m
V_reversalE mV = 0 # Excitatory reversal Potential in mV
V_reversalI mV = -85.0 # Inhibitory reversal Potential in mV
E_L mV = -70.0 # Leak reversal Potential (aka resting potential) in mV
tau_syn_rise_I ms = 0.2 # Synaptic Time Constant Excitatory Synapse in ms
tau_syn_decay_I ms = 2.0 # Synaptic Time Constant for Inhibitory Synapse in ms
tau_syn_rise_E ms = 0.2 # Synaptic Time Constant Excitatory Synapse in ms
tau_syn_decay_E ms = 2.0 # Synaptic Time Constant for Inhibitory Synapse in ms
I_e pA = 0 # Constant Current in pA

# Input current injected by CurrentEvent.
# This variable is used to transport the current applied into the
# _dynamics function computing the derivative of the state vector.
I_stim pA = 0
E_L mV = -85.0mV # Leak reversal Potential (aka resting potential) in mV
C_m pF = 250.0pF # Capacity of the membrane
t_ref ms = 2.0ms # Refractory period in ms
V_th mV = -55.0mV # Threshold Potential in mV
V_reset mV = -60.0mV # Reset Potential in mV
E_ex mV = 0mV # Excitatory reversal Potential in mV
E_in mV = -85.0mV # Inhibitory reversal Potential in mV
g_L nS = 16.6667nS # Leak Conductance in nS
tau_syn_rise_I ms = 0.2ms # Synaptic Time Constant Excitatory Synapse in ms
tau_syn_decay_I ms = 2.0ms # Synaptic Time Constant for Inhibitory Synapse in ms
tau_syn_rise_E ms = 0.2ms # Synaptic Time Constant Excitatory Synapse in ms
tau_syn_decay_E ms = 2.0ms # Synaptic Time Constant for Inhibitory Synapse in ms
I_e pA = 0pA # Constant Current in pA
F_E nS = 0nS # Constant External input conductance in nS (excitatory).
F_I nS = 0nS # - Constant External input conductance in nS (inhibitory).
# Input current injected by CurrentEvent.
# This variable is used to transport the current applied into the
# _dynamics function computing the derivative of the state vector.
I_stim pA = 0pA
end

internal:
r integer

# Impulse to add to DG_EXC on spike arrival to evoke unit-amplitude
# Impulse to add to GE' on spike arrival to evoke unit-amplitude
# conductance excursion.
PSConInit_E real = 1.0 * e / tau_syn_rise_E # TODO why only one?
PSConInit_E real = 1.0 * e / tau_syn_rise_E #

# Impulse to add to DG_INH on spike arrival to evoke unit-amplitude
# Impulse to add to GI' on spike arrival to evoke unit-amplitude
# conductance excursion.
PSConInit_I real = 1.0 * e / tau_syn_rise_I

Expand All @@ -67,13 +114,8 @@ neuron iaf_cond_beta_neuron:
output: spike

update:
if r == 0: # not refractory
# TODO intagrate

else:
r = r - 1
end

integrate(V_m)
if r != 0: # not refractory
r = r - 1
V_m = V_reset # clamp potential
Expand All @@ -85,8 +127,8 @@ neuron iaf_cond_beta_neuron:

end

# TODO DGE = DGE + spikeExc.getSum() * PSConInit_E;
# TODO DGI = DGI + spikeInh.getSum() * PSConInit_I;
GE' += spikeExc.getSum() * PSConInit_E;
GI' += spikeInh.getSum() * PSConInit_I;
I_stim = currents.getSum()
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public void testIzhikevich() {
@Ignore("Don't run this tests on github")
@Test
public void testManually() {
final List<String> modelName = Lists.newArrayList("models/iaf_cond_exp_implicit.nestml");
final List<String> modelName = Lists.newArrayList("models/iaf_cond_beta.nestml");
modelName.forEach(this::checkCocos);
modelName.forEach(this::invokeCodeGenerator);
final List<ASTNESTMLCompilationUnit> roots = modelName.stream()
Expand Down

0 comments on commit 471091a

Please sign in to comment.