IzhikevichRef#
- class brainpy.dyn.IzhikevichRef(size, sharding=None, keep_size=False, mode=None, spk_fun=InvSquareGrad(alpha=100.0), spk_dtype=None, spk_reset='soft', detach_spk=False, method='exp_auto', name=None, init_var=True, scaling=None, V_th=30.0, p1=0.04, p2=5.0, p3=140.0, a=0.02, b=0.2, c=-65.0, d=8.0, tau=10.0, R=1.0, V_initializer=OneInit(value=-70.0), u_initializer=None, tau_ref=0.0, ref_var=False)[source]#
The Izhikevich neuron model.
Model Descriptions
The dynamics of the Izhikevich neuron model [1] [2] is given by:
\[ \begin{align}\begin{aligned}\frac{d V}{d t} &= 0.04 V^{2}+5 V+140-u+I\\\frac{d u}{d t} &=a(b V-u)\end{aligned}\end{align} \]\[\begin{split}\text{if} v \geq 30 \text{mV}, \text{then} \begin{cases} v \leftarrow c \\ u \leftarrow u+d \end{cases}\end{split}\]References
Examples
There is a simple usage example:
import brainpy as bp neu = bp.dyn.IzhikevichRef(2) # section input with wiener process inp1 = bp.inputs.wiener_process(500., n=1, t_start=100., t_end=400.).flatten() inputs = bp.inputs.section_input([0., 22., 0.], [100., 300., 100.]) + inp1 runner = bp.DSRunner(neu, monitors=['V']) runner.run(inputs=inputs) bp.visualize.line_plot(runner.mon['ts'], runner.mon['V'], plot_ids=(0, 1), show=True)
Model Examples
Model Parameters
Parameter
Init Value
Unit
Explanation
a
0.02
It determines the time scaling of the recovery variable \(u\).
b
0.2
It describes the sensitivity of the recovery variable \(u\) to the sub-threshold fluctuations of the membrane potential \(v\).
c
-65
It describes the after-spike reset value of the membrane potential \(v\) caused by the fast high-threshold \(K^{+}\) conductance.
d
8
It describes after-spike reset of the recovery variable \(u\) caused by slow high-threshold \(Na^{+}\) and \(K^{+}\) conductance.
tau_ref
0
ms
Refractory period length. [ms]
V_th
30
mV
The membrane potential threshold.
Model Variables
Variables name
Initial Value
Explanation
V
-65
Membrane potential.
u
1
Recovery variable.
input
0
External and synaptic input current.
spike
False
Flag to mark whether the neuron is spiking.
refractory
False
Flag to mark whether the neuron is in refractory period.
t_last_spike
-1e7
Last spike time stamp.
- Parameters:
size (
TypeVar
(Shape
,int
,Tuple
[int
,...
])) – int, or sequence of int. The neuronal population size.sharding (
Union
[Sequence
[str
],Device
,Sharding
,None
]) – The sharding strategy.keep_size (
bool
) – bool. Keep the neuron group size.spk_fun (
Callable
) – callable. The spike activation function.detach_spk (
bool
) – bool.method (
str
) – str. The numerical integration method.spk_type – The spike data type.
spk_reset (
str
) – The way to reset the membrane potential when the neuron generates spikes. This parameter only works when the computing mode isTrainingMode
. It can besoft
andhard
. Default issoft
.tau_ref (
Union
[float
,TypeVar
(ArrayType
,Array
,Variable
,TrainVar
,Array
,ndarray
),Callable
]) – float, ArrayType, callable. Refractory period length (ms).has_ref_var – bool. Whether has the refractory variable. Default is
False
.