|
| 1 | +# iaf_psc_exp - Leaky integrate-and-fire neuron model |
| 2 | +# ################################################### |
| 3 | +# |
| 4 | +# Description |
| 5 | +# +++++++++++ |
| 6 | +# |
| 7 | +# iaf_psc_exp is an implementation of a leaky integrate-and-fire model |
| 8 | +# with exponentially decaying synaptic currents according to [1]_. |
| 9 | +# Thus, postsynaptic currents have an infinitely short rise time. |
| 10 | +# |
| 11 | +# The threshold crossing is followed by an absolute refractory period |
| 12 | +# during which the membrane potential is clamped to the resting potential |
| 13 | +# and spiking is prohibited. |
| 14 | +# |
| 15 | +# The general framework for the consistent formulation of systems with |
| 16 | +# neuron like dynamics interacting by point events is described in |
| 17 | +# [1]_. A flow chart can be found in [2]_. |
| 18 | +# |
| 19 | +# Critical tests for the formulation of the neuron model are the |
| 20 | +# comparisons of simulation results for different computation step |
| 21 | +# sizes. |
| 22 | +# |
| 23 | +# .. note:: |
| 24 | +# |
| 25 | +# If tau_m is very close to tau_syn_exc or tau_syn_inh, numerical problems |
| 26 | +# may arise due to singularities in the propagator matrics. If this is |
| 27 | +# the case, replace equal-valued parameters by a single parameter. |
| 28 | +# |
| 29 | +# For details, please see ``IAF_neurons_singularity.ipynb`` in |
| 30 | +# the NEST source code (``docs/model_details``). |
| 31 | +# |
| 32 | +# |
| 33 | +# References |
| 34 | +# ++++++++++ |
| 35 | +# |
| 36 | +# .. [1] Rotter S, Diesmann M (1999). Exact simulation of |
| 37 | +# time-invariant linear systems with applications to neuronal |
| 38 | +# modeling. Biologial Cybernetics 81:381-402. |
| 39 | +# DOI: https://doi.org/10.1007/s004220050570 |
| 40 | +# .. [2] Diesmann M, Gewaltig M-O, Rotter S, & Aertsen A (2001). State |
| 41 | +# space analysis of synchronous spiking in cortical neural |
| 42 | +# networks. Neurocomputing 38-40:565-571. |
| 43 | +# DOI: https://doi.org/10.1016/S0925-2312(01)00409-X |
| 44 | +# .. [3] Morrison A, Straube S, Plesser H E, Diesmann M (2006). Exact |
| 45 | +# subthreshold integration with continuous spike times in discrete time |
| 46 | +# neural network simulations. Neural Computation, in press |
| 47 | +# DOI: https://doi.org/10.1162/neco.2007.19.1.47 |
| 48 | +# |
| 49 | +# |
| 50 | +# See also |
| 51 | +# ++++++++ |
| 52 | +# |
| 53 | +# iaf_psc_delta, iaf_psc_alpha, iaf_cond_exp |
| 54 | +# |
| 55 | +# |
| 56 | +# Copyright statement |
| 57 | +# +++++++++++++++++++ |
| 58 | +# |
| 59 | +# This file is part of NEST. |
| 60 | +# |
| 61 | +# Copyright (C) 2004 The NEST Initiative |
| 62 | +# |
| 63 | +# NEST is free software: you can redistribute it and/or modify |
| 64 | +# it under the terms of the GNU General Public License as published by |
| 65 | +# the Free Software Foundation, either version 2 of the License, or |
| 66 | +# (at your option) any later version. |
| 67 | +# |
| 68 | +# NEST is distributed in the hope that it will be useful, |
| 69 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 70 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 71 | +# GNU General Public License for more details. |
| 72 | +# |
| 73 | +# You should have received a copy of the GNU General Public License |
| 74 | +# along with NEST. If not, see <http://www.gnu.org/licenses/>. |
| 75 | +# |
| 76 | +# |
| 77 | +model iaf_psc_exp_neuron: |
| 78 | + |
| 79 | + state: |
| 80 | + V_m mV = E_L # Membrane potential |
| 81 | + refr_t ms = 0 ms # Refractory period timer |
| 82 | + I_syn_exc pA = 0 pA |
| 83 | + I_syn_inh pA = 0 pA |
| 84 | + |
| 85 | + equations: |
| 86 | + I_syn_exc' = -I_syn_exc / tau_syn_exc |
| 87 | + I_syn_inh' = -I_syn_inh / tau_syn_inh |
| 88 | + V_m' = -(V_m - E_L) / tau_m + (I_syn_exc - I_syn_inh + I_e + I_stim) / C_m |
| 89 | + refr_t' = -1e3 * ms/s # refractoriness is implemented as an ODE, representing a timer counting back down to zero. XXX: TODO: This should simply read ``refr_t' = -1 / s`` (see https://github.com/nest/nestml/issues/984) |
| 90 | + |
| 91 | + parameters: |
| 92 | + C_m pF = 250 pF # Capacitance of the membrane |
| 93 | + tau_m ms = 10 ms # Membrane time constant |
| 94 | + tau_syn_inh ms = 2 ms # Time constant of inhibitory synaptic current |
| 95 | + tau_syn_exc ms = 2 ms # Time constant of excitatory synaptic current |
| 96 | + refr_T ms = 2 ms # Duration of refractory period |
| 97 | + E_L mV = -70 mV # Resting potential |
| 98 | + V_reset mV = -70 mV # Reset value of the membrane potential |
| 99 | + V_th mV = -55 mV # Spike threshold potential |
| 100 | + |
| 101 | + # constant external input current |
| 102 | + I_e pA = 0 pA |
| 103 | + |
| 104 | + input: |
| 105 | + exc_spikes <- excitatory spike |
| 106 | + inh_spikes <- inhibitory spike |
| 107 | + I_stim pA <- continuous |
| 108 | + |
| 109 | + output: |
| 110 | + spike |
| 111 | + |
| 112 | + update: |
| 113 | + if refr_t > 0 ms: |
| 114 | + # neuron is absolute refractory, do not evolve V_m |
| 115 | + integrate_odes(I_syn_exc, I_syn_inh, refr_t) |
| 116 | + else: |
| 117 | + # neuron not refractory |
| 118 | + integrate_odes(I_syn_exc, I_syn_inh, V_m) |
| 119 | + |
| 120 | + onReceive(exc_spikes): |
| 121 | + I_syn_exc += exc_spikes * pA * s |
| 122 | + |
| 123 | + onReceive(inh_spikes): |
| 124 | + I_syn_inh += inh_spikes * pA * s |
| 125 | + |
| 126 | + onCondition(refr_t <= 0 ms and V_m >= V_th): |
| 127 | + # threshold crossing |
| 128 | + refr_t = refr_T # start of the refractory period |
| 129 | + V_m = V_reset |
| 130 | + emit_spike() |
0 commit comments