Current balance equations of multicompartment
Current balance equations of multicompartment
I am using XPPAUT/MATLAB to apply bifurcation analysis on a model with soma, dendrite and axon hillock. Then, I will compare/validate the results with ones in NEURON. So, I should use the currentbalance equations in XPPAUT/MATLAB same as ones use in NEURON.
As XPPAUT/MATLAB are kinds of advanced calculators in which all equations should be defined, I've tried to follow the NEURON approach in dealing with currentbalance equations (Chapter 5 of book and discussions in this forum), but I got different results for XPPAUT and NEURON. For XPPAUT, I use following currentbalance equations:
[img]
https://postimg.org/image/wcj6ddf0v/
[/img]
Where,
// Soma
L=48.8 and diam=48.8
// Dend
L=200 and diam=100
// AH
L=250 and diam=150
Also,
[img]
https://postimg.org/image/faqcba05r/
[/img]
Does NEURON use the same currentsbalance equations as above?
Thanks
As XPPAUT/MATLAB are kinds of advanced calculators in which all equations should be defined, I've tried to follow the NEURON approach in dealing with currentbalance equations (Chapter 5 of book and discussions in this forum), but I got different results for XPPAUT and NEURON. For XPPAUT, I use following currentbalance equations:
[img]
https://postimg.org/image/wcj6ddf0v/
[/img]
Where,
// Soma
L=48.8 and diam=48.8
// Dend
L=200 and diam=100
// AH
L=250 and diam=150
Also,
[img]
https://postimg.org/image/faqcba05r/
[/img]
Does NEURON use the same currentsbalance equations as above?
Thanks

 Site Admin
 Posts: 5410
 Joined: Wed May 18, 2005 4:50 pm
 Location: Yale University School of Medicine
 Contact:
Re: Current balance equations of multicompartment
The ODEs that govern membrane potential are correct as far as they go, but I don't see any scale factors related to the facts that, for NEURON, time is in ms and membrane potential is in mV. Also, what units do you plan to use for the injected current Iinj, and do they agree with the units of the other terms in that equation? How did you calculate the axial resistances, what are the units (and value) that you assume for cytoplasmic resistivity, are the resulting values in megohms, and do the axial currents agree with the units of the other terms? Finally, are any of your parameters temperature sensitive, and if so, what temperature are you assuming and have you made sure that NEURON's celsius has the same value?
Re: Current balance equations of multicompartment
Yes, there is a scale factor. I’ve multiplied the right side of the currentbalance equations to 1000 to have membrane potentials (Vs, Vd, and VAH) in millivolts.ted wrote:The ODEs that govern membrane potential are correct as far as they go, but I don't see any scale factors related to the facts that, for NEURON, time is in ms and membrane potential is in mV.
I used nA for Iinj. Other units are:ted wrote: Also, what units do you plan to use for the injected current Iinj, and do they agree with the units of the other terms in that equation?
cm >>> PF
Ri1 and Ri2 >>> Mohms
Ra >>> ohm.cm
Eion >>> mV
L and diam >>> um
Also,
gion(uS) = Gion(S/cm2)*L*diam*0.01
Ra = 70 (ohm.cm) for all three compartment. So,ted wrote: How did you calculate the axial resistances, what are the units (and value) that you assume for cytoplasmic resistivity, are the resulting values in megohms, and do the axial currents agree with the units of the other terms?
// coupling resistance between soma and dendrite
R_ia (Mohm)=R_i1 (Mohm)+R_i2 (Mohm)
// coupling resistance between soma and AH
R_ib (Mohm)=R_i1 (Mohm)+R_i3 (Mohm)
Yes, some of activation functions and time constants. All have same value, Celsius = 36.ted wrote:Finally, are any of your parameters temperature sensitive, and if so, what temperature are you assuming and have you made sure that NEURON's celsius has the same value?

 Site Admin
 Posts: 5410
 Joined: Wed May 18, 2005 4:50 pm
 Location: Yale University School of Medicine
 Contact:
Re: Current balance equations of multicompartment
Well, here's one problem: LHS of your ODEs is in pA (because pF*mV/ms = pF*V/s = pA). 1st term of the 1st ODE is in 1e3*nA = pA, which is good, but 2nd term is in 1e3*uS*V = nA.
Be sure to check the other terms as well and fix as necessary.
When you think everything is fixed, try these simple tests. Compare your simulation results with the analytic solutions and with the results produced by NEURON.
1. Assume a single compartment model cell with 100 um2 surface area and specific membrane capacitance 1 uF/cm2. No ion channels. Initial membrane potential = 0 mV. At t=1 ms inject a 1 nA current that lasts 1 ms. What is membrane potential at t=2 ms?
2. Assume same model cell and injected current, but now include an ion channel with conductance density 1 S/cm2 and reversal potential 0 mV. What is membrane potential at t=2 ms?
Be sure to check the other terms as well and fix as necessary.
When you think everything is fixed, try these simple tests. Compare your simulation results with the analytic solutions and with the results produced by NEURON.
1. Assume a single compartment model cell with 100 um2 surface area and specific membrane capacitance 1 uF/cm2. No ion channels. Initial membrane potential = 0 mV. At t=1 ms inject a 1 nA current that lasts 1 ms. What is membrane potential at t=2 ms?
2. Assume same model cell and injected current, but now include an ion channel with conductance density 1 S/cm2 and reversal potential 0 mV. What is membrane potential at t=2 ms?
Re: Current balance equations of multicompartment
Thanks for reply.ted wrote:Well, here's one problem: LHS of your ODEs is in pA (because pF*mV/ms = pF*V/s = pA). 1st term of the 1st ODE is in 1e3*nA = pA, which is good, but 2nd term is in 1e3*uS*V = nA.
Be sure to check the other terms as well and fix as necessary.
Actually, the initial conditions of membrane potentials are in mV (Vs = Vd = Vah = 70 mV). So, the 2nd term is also in 1e3*uS*mV=pA.
One more thing, for twocompartmental model (including soma and dendrite) using same method,
I get similar results for XPPAUT and NEURON. But for threecompartmental model, the results from XPPAUT and NEURON are different.
I checked all units and parameters. So, I think, the problem might be in axial resistance. Are following expressions correct?
Then,
coupling resistance between soma and dendrite
R_ia (Mohm) = R_soma (Mohm) + R_dend (Mohm)
coupling resistance between soma and AH
R_ib (Mohm) = R_soma (Mohm) + R_AH (Mohm)
Therefore,

 Site Admin
 Posts: 5410
 Joined: Wed May 18, 2005 4:50 pm
 Location: Yale University School of Medicine
 Contact:
Re: Current balance equations of multicompartment
Then I misinterpretedBob02 wrote:Actually, the initial conditions of membrane potentials are in mV (Vs = Vd = Vah = 70 mV). So, the 2nd term is also in 1e3*uS*mV=pA.
I’ve multiplied the right side of the currentbalance equations to 1000 to have membrane potentials (Vs, Vd, and VAH) in millivolts.
Maybe. Exactly what statements did you use to connect the compartments of your NEURON model to each other?for threecompartmental model, the results from XPPAUT and NEURON are different.
I checked all units and parameters. So, I think, the problem might be in axial resistance.
Only if nseg is 1.Are following expressions correct?
True if connections are made only at the ends of neurites, not to internal nodes.Then,
coupling resistance between soma and dendrite . . .
There are two ODEs for Vs, and none for Vah.
Suggest you reduce the problem to its simplest form. No voltagegated currentsmake everything as simple as possible so you can derive analytic results and use that to diagnose what's wrong with the numbers XPPAUT is generating from your model implementation.
Re: Current balance equations of multicompartment
Maybe. Exactly what statements did you use to connect the compartments of your NEURON model to each other?
Code: Select all
create soma,dend,AH
proc topol() {
soma {
connect dend(0), (0)
connect AH(0), (1)
}
}
proc geometry() {
soma{
nseg = 1
diam = 30
L = 10
}
dend {
nseg = 1
diam = 100
L= 200
}
AH {
nseg = 1
diam = 150
L= 250
}
}
In this model, all nseg=1.Only if nseg is 1.
Sorry, it is a typo. LHS of last line of equation is dVah/dt.There are two ODEs for Vs, and none for Vah.

 Site Admin
 Posts: 5410
 Joined: Wed May 18, 2005 4:50 pm
 Location: Yale University School of Medicine
 Contact:
Re: Current balance equations of multicompartment
With those anatomical sizes, that thing is for all practical purposes isopotentialunless cytoplasmic resistivity is at least 3000 ohm cm, i.e. 30 times larger than the typical 100 ohm cm that is usually assumed. But then this is really a mathematician's model anyway, so Ra can be whatever is needed to produce the desired result.
Re: Current balance equations of multicompartment
Yes. The original model has nseg=1 for soma with L=diam=48.8. For AH, nseg=11, L=20, diam1=13 (soma side), and diam2=3 (IS side)..........ted wrote:With those anatomical sizes, that thing is for all practical purposes isopotentialunless cytoplasmic resistivity is at least 3000 ohm cm, i.e. 30 times larger than the typical 100 ohm cm that is usually assumed. But then this is really a mathematician's model anyway, so Ra can be whatever is needed to produce the desired result.
I am trying to start from a simple model and then get to the original one. So, the model I discussed here is only a mathematical one.