Hi @Maryidea . Sorry about theexc/ecs confusion, that was my mistake. I’ll edit my earlier comment to avoid other people being confused by it.
Regarding your error: you seem to have added a noise term with the variable \xi (i.e. xi) to your equations. The rk4 integration method cannot deal with stochastic equations. You can either chose a method that can deal with this type of equation (euler, heun and milstein should probably all work in your case), or reformulate the noise in a way that is mathematically slightly less correct in general (the noise is a value that only changes in between time steps), but is exactly equivalent to the way it gets evaluated with the euler integration algorithm. For a noise code like this (your equation is obviously longer, but this focusses only on the noise part):
dv/dt = tau**-0.5*sigma*xi: volt
you replace it like this:
dv/dt = noise: volt
noise = sigma*randn()/(sqrt(tau)*sqrt(dt)) : volt/second (constant over dt)
You can then use an integration algorithm like rk4, which will integrate the deterministic part of the equation with better accuracy than euler.