sPyNNaker neural_modelling 7.3.1
Loading...
Searching...
No Matches
Data Structures | Functions | Variables
neuron_model_izh_impl.h File Reference

Izhekevich neuron type. More...

#include "neuron_model.h"

Go to the source code of this file.

Data Structures

struct  neuron_params_t
 definition of neuron parameters More...
 
struct  neuron_t
 definition for LIF neuron state More...
 

Functions

static void neuron_model_initialise (neuron_t *state, neuron_params_t *params, uint32_t n_steps_per_timestep)
 
static void neuron_model_save_state (neuron_t *state, neuron_params_t *params)
 
static void rk2_kernel_midpoint (REAL h, neuron_t *neuron, REAL input_this_timestep)
 Midpoint is best balance between speed and accuracy so far.
 
static state_t neuron_model_state_update (uint16_t num_excitatory_inputs, const input_t *exc_input, uint16_t num_inhibitory_inputs, const input_t *inh_input, input_t external_bias, REAL current_offset, neuron_t *restrict neuron)
 primary function called in timer loop after synaptic updates
 
static void neuron_model_has_spiked (neuron_t *restrict neuron)
 Indicates that the neuron has spiked.
 
static state_t neuron_model_get_membrane_voltage (const neuron_t *neuron)
 get the neuron membrane voltage for a given neuron parameter set
 
static void neuron_model_print_state_variables (const neuron_t *neuron)
 
static void neuron_model_print_parameters (const neuron_t *neuron)
 

Variables

static const REAL SIMPLE_TQ_OFFSET = REAL_CONST(1.85)
 For linear membrane voltages, 1.5 is the correct value. However with actual membrane voltage behaviour and tested over an wide range of use cases 1.85 gives slightly better spike timings.
 
static const REAL MAGIC_MULTIPLIER = REAL_CONST(0.040008544921875)
 The original model uses 0.04, but this (1 ULP larger?) gives better numeric stability.
 

Detailed Description

Izhekevich neuron type.

Definition in file neuron_model_izh_impl.h.


Data Structure Documentation

◆ neuron_params_t

struct neuron_params_t

definition of neuron parameters

The state parameters of an Izhekevich model neuron.

definition for LIF neuron parameters

Definition at line 47 of file neuron_impl_stoc_exp.h.

Data Fields
UREAL tau_ms The tau value of the neuron.
UREAL time_step The timestep of the neuron being used.

The time step in milliseconds.

current timestep in ms

REAL bias The bias value.
uint32_t refract_init The initial refractory timer.
mars_kiss64_seed_t random_seed Random seed to use.
REAL v_init The initial membrane voltage.
REAL v_reset The reset membrane voltage after a spike.
UREAL tau The tau value of the neuron, multiplied by 2^v to get probability.
UREAL tau_refract The refractory period of the neuron in milliseconds.

The refractory period of the neuron, in ms.

REAL alpha The alpha value of the neuron prob = (2^(-2^(alpha x voltage)))
REAL V_init membrane voltage [mV]
REAL c_m membrane capacitance [nF]
REAL tau_m membrane decay time constant
REAL I_offset offset current [nA]
REAL V_reset post-spike reset membrane voltage [mV]
REAL T_refract_ms refractory time of neuron [ms]
int32_t refract_timer_init initial refractory timer value (saved)
REAL time_step The time step in milliseconds.

current timestep in ms

REAL A
REAL B
REAL C
REAL D
REAL V
REAL U
REAL next_h next value of this_h (saved)
REAL V_rest membrane resting voltage [mV]

◆ neuron_t

struct neuron_t

definition for LIF neuron state

The state variables of an Izhekevich model neuron.

Definition at line 53 of file neuron_model_if_trunc.h.

Data Fields
REAL V_membrane membrane voltage [mV]
REAL R_membrane membrane resistance [MOhm]
REAL I_offset offset current [nA]
int32_t refract_timer countdown to end of next refractory period [timesteps]
REAL V_reset post-spike reset membrane voltage [mV]
int32_t T_refract refractory time of neuron [timesteps]
REAL A
REAL B
REAL C
REAL D
REAL V
REAL U
REAL this_h current timestep
REAL reset_h timestep to reset to when not just spiked
REAL V_rest membrane resting voltage [mV]
REAL exp_TC

'fixed' computation parameter - time constant multiplier for closed-form solution exp(-(machine time step in ms)/(R * C)) [.]

Function Documentation

◆ neuron_model_initialise()

static void neuron_model_initialise ( neuron_t state,
neuron_params_t params,
uint32_t  n_steps_per_timestep 
)
inlinestatic

Definition at line 68 of file neuron_model_izh_impl.h.

◆ neuron_model_save_state()

static void neuron_model_save_state ( neuron_t state,
neuron_params_t params 
)
inlinestatic

Definition at line 81 of file neuron_model_izh_impl.h.

◆ rk2_kernel_midpoint()

static void rk2_kernel_midpoint ( REAL  h,
neuron_t neuron,
REAL  input_this_timestep 
)
inlinestatic

Midpoint is best balance between speed and accuracy so far.

From ODE solver comparison work, paper shows that Trapezoid version gives better accuracy at small speed cost

Parameters
[in]hthreshold
[in,out]neuronThe model being updated
[in]input_this_timestepthe input

Definition at line 129 of file neuron_model_izh_impl.h.

◆ neuron_model_state_update()

static state_t neuron_model_state_update ( uint16_t  num_excitatory_inputs,
const input_t exc_input,
uint16_t  num_inhibitory_inputs,
const input_t inh_input,
input_t  external_bias,
REAL  current_offset,
neuron_t *restrict  neuron 
)
inlinestatic

primary function called in timer loop after synaptic updates

Parameters
[in]num_excitatory_inputsNumber of excitatory receptor types.
[in]exc_inputPointer to array of inputs per receptor type received this timer tick that produce a positive reaction within the neuron in terms of stimulation.
[in]num_inhibitory_inputsNumber of inhibitory receptor types.
[in]inh_inputPointer to array of inputs per receptor type received this timer tick that produce a negative reaction within the neuron in terms of stimulation.
[in]external_biasThis is the intrinsic plasticity which could be used for ac, noisy input etc etc. (general purpose input)
[in,out]neuronthe pointer to a neuron parameter struct which contains all the parameters for a specific neuron
Returns
the value to be compared with a threshold value to determine if the neuron has spiked

Definition at line 166 of file neuron_model_izh_impl.h.

◆ neuron_model_has_spiked()

static void neuron_model_has_spiked ( neuron_t *restrict  neuron)
inlinestatic

Indicates that the neuron has spiked.

Parameters
[in,out]neuronpointer to a neuron parameter struct which contains all the parameters for a specific neuron

Definition at line 193 of file neuron_model_izh_impl.h.

◆ neuron_model_get_membrane_voltage()

static state_t neuron_model_get_membrane_voltage ( const neuron_t neuron)
inlinestatic

get the neuron membrane voltage for a given neuron parameter set

Parameters
[in]neurona pointer to a neuron parameter struct which contains all the parameters for a specific neuron
Returns
the membrane voltage for a given neuron with the neuron parameters specified in neuron

Definition at line 209 of file neuron_model_izh_impl.h.

◆ neuron_model_print_state_variables()

static void neuron_model_print_state_variables ( const neuron_t neuron)
inlinestatic

Definition at line 213 of file neuron_model_izh_impl.h.

◆ neuron_model_print_parameters()

static void neuron_model_print_parameters ( const neuron_t neuron)
inlinestatic

Definition at line 219 of file neuron_model_izh_impl.h.

Variable Documentation

◆ SIMPLE_TQ_OFFSET

const REAL SIMPLE_TQ_OFFSET = REAL_CONST(1.85)
static

For linear membrane voltages, 1.5 is the correct value. However with actual membrane voltage behaviour and tested over an wide range of use cases 1.85 gives slightly better spike timings.

Definition at line 91 of file neuron_model_izh_impl.h.

◆ MAGIC_MULTIPLIER

const REAL MAGIC_MULTIPLIER = REAL_CONST(0.040008544921875)
static

The original model uses 0.04, but this (1 ULP larger?) gives better numeric stability.

Thanks to Mantas Mikaitis for this!

Definition at line 119 of file neuron_model_izh_impl.h.