brian2
brian2 copied to clipboard
how to deal with delay differential equation
I met a problem when I use Brian2 to build a time delay synapses such as the synapse‘s ion have the following form: Isyn =g*w*(E-v(t-tau))
[ dv/dt=-Iion-IL-Isyn+Iapp
, and w depends on the voltage of pre-neuron].
I can't find algorithm in Brian2 to handle such delay differential equation.
I am wondering whether there exit algorithm to solve DDE in Brian2. If I have to define my algorithm to deal with it, could you give me some suggestions about how to record or get the past value of v in the numerical difference scheme?
thank you.
Hi. Unfortunately Brian does not currently have mechanism for continuous interactions between neurons with a delay (it would need an implementation of #467 first). There are some workarounds, e.g. if your delay is just 1 or very few timesteps, you could manually buffer the values from the previous step(s). It is also possible to use a network_operation
, or (more complicated) a user-defined function to implement this.
All that said, I have to say that your equations are a bit curious. A typical synaptic current would be e.g. Isyn = g*(E-v)
(where g
is increased with each spike and then decays), but here v
would refer to the voltage of the post-synaptic neuron, not the pre-synaptic one. Also you say that " w depends on the voltage of pre-neuron", what exactly does that mean?