Re: The math behind extracellular mechanisms
Posted: Thu Oct 15, 2009 12:47 pm
Thank you for clearing this up for me.
Kind regards
Simon
Kind regards
Simon
The NEURON Forum
https://www.neuron.yale.edu/phpBB/
Trying to reproduce the equations using the picture in the documentation, I think there is an error in the second and one in the third equation.ted wrote: ↑Mon Jun 08, 2009 5:09 pm Proceeding from the outside in, the potentials at the ith nodes are vext[1]_i, vext_i, and v_i + vext_i.
(...)
- v_i * cm*D + vext_i * (cm + xc)*D - vext[1]_i * xc*D
= vext_i-1 * (1/xraxial_i) - vext_i * ((1/xraxial_i) + (1/xraxial_i+1)) + vext_i+1 * (1/xraxial_i+1) + g_pas * (v_i - e_pas) - xg * (vext_i - vext[1]_i)
- vext_i * xc*D + vext[1]_i * (xc + xc[1])*D
= vext[1]_i-1 * (1/xraxial[1]_i) - vext[1]_i * ((1/xraxial[1]_i) + (1/xraxial[1]_i+1)) + vext[1]_i+1 * (1/xraxial[1]_i+1) + xg * vext_i - xg[1] * (vext[1]_i - e_extracellular)
(...)
Although I have proofread this several times, it would not surprise me if these equations contain one or more errors (especially in the indices).
Code: Select all
(cm*D + gm + 2/Ra) * v[i]
= v[i-1]/Ra + v[i+1]/Ra
+ (cm*D + gm) * vext[0,i]
Code: Select all
cm*D(v[i]) - cm*D(vext[0,i])
= - (gm + 2/Ra) * v[i]
+ v[i-1]/Ra + v[i+1]/Ra
+ gm * vext[0,i]
Code: Select all
((xc[0] + cm)*D + (xg[0] + gm + 2/xraxial[0])) * vext[0,i]
= (cm*D + gm) * v[i]
+ (vext[0,i-1] + vext[0,i+1])/xraxial[0]
+ (xc[0]*D + xg[0]) * vext[1,i]
Code: Select all
-cm*D(v[i]) + (cm + xc[0])*D(vext[0,i]) - xc[0]*D(vext[1,i])
= gm * v[i]
- (gm + xg[0] + 2/xraxial[0]) * vext[0,i]
+ (vext[0,i-1] + vext[0,i+1])/xraxial[0]
+ xg[0] * vext[1,i]
Code: Select all
((xc[0] + xc[1])*D + (xg[0] + xg[1] + 2/xraxial[1])) * vext[1,i]
= (xc[0]*D + xg[0]) * vext[0,i]
+ (vext[1,i-1] + vext[1,i+1])/xraxial[1]
+ xg[1] * e_extracellular[i]
Code: Select all
-xc[0]*D(vext[0,i]) + (xc[0] + xc[1])*D(vext[1,i])
= xg[0] * vext[0,i]
- (xg[0] + xg[1] + 2/xraxial[1]) * vext[1,i]
+ (vext[1,i-1] + vext[1,i+1]) / xraxial[1]
+ xg[1] * e_extracellular[i]
Code: Select all
Ra
o/`--o--'\/\/`--o--'\/\/`--o--'\/\/`--o--'\o vext + v
| | | |
--- --- --- ---
| | | | | | | |
--- --- --- ---
| | | |
| | | | i_membrane
| xraxial | | |
/`--o--'\/\/`--o--'\/\/`--o--'\/\/`--o--'\ vext
| | | |
--- --- --- --- xc and xg
| | | | | | | | in parallel
--- --- --- ---
| | | |
| | | |
|xraxial[1]| | |
/`--o--'\/\/`--o--'\/\/`--o--'\/\/`--o--'\ vext[1]
| | | |
--- --- --- --- the series xg[1], e_extracellular
| | | | | | | | combination is in parallel with
| --- | --- | --- | --- the xc[1] capacitance. This is
| - | - | - | - identical to a membrane with
--- --- --- --- cm, g_pas, e_pas
| | | |
-------------------------------------------- ground
Code: Select all
Ra
o/`--o--'\/\/`--o--'\/\/`--o--'\/\/`--o--'\o vext + v intracellular layer
| | | |
--- --- --- ---
| | | | | | cm| |gm
--- --- --- ---
| | | |
| | | |
|xraxial[0]| | |
/`--o--'\/\/`--o--'\/\/`--o--'\/\/`--o--'\ vext[0] layer 0
| | | |
--- --- --- ---
| | | | | | xc[0]| |xg[0]
--- --- --- ---
| | | |
| | | |
|xraxial[1]| | |
/`--o--'\/\/`--o--'\/\/`--o--'\/\/`--o--'\ vext[1] layer 1
| | | |
--- --- --- ---
| | | | | | xc[1]| |xg[1]
| --- | --- | --- | ---
| - | - | - | - e_extracellular
--- --- --- ---
| | | |
-------------------------------------------- ground
OK. Did you write the first equation directly from inspection of the schematics? Then what is the physical meaning behind this arrangement?ted wrote: ↑Mon Oct 08, 2018 3:11 pm Begin by focussing on the intracellular nodes.which rearranges toCode: Select all
(cm*D + gm + 2/Ra) * v[i] = v[i-1]/Ra + v[i+1]/Ra + (cm*D + gm) * vext[0,i]
Code: Select all
cm*D(v[i]) - cm*D(vext[0,i]) = - (gm + 2/Ra) * v[i] + v[i-1]/Ra + v[i+1]/Ra + gm * vext[0,i]
Code: Select all
(v[i+1] + v[i-1] - 2*v[ i])/Ra - gm*v[i] - cm * D(v[i]) = 0
Code: Select all
cm * D(v[i])
= - (gm + 2/Ra)*v[i])
+ v[i+1]/Ra + v[i-1]/Ra
Hmmm... I still don't follow. Remember, I am just a physicist, so I need to stick to Kirchhoff. ;)ted wrote: ↑Mon Oct 08, 2018 3:11 pm Now shift to the nodes in layer 0.which rearranges toCode: Select all
((xc[0] + cm)*D + (xg[0] + gm + 2/xraxial[0])) * vext[0,i] = (cm*D + gm) * v[i] + (vext[0,i-1] + vext[0,i+1])/xraxial[0] + (xc[0]*D + xg[0]) * vext[1,i]
Code: Select all
-cm*D(v[i]) + (cm + xc[0])*D(vext[0,i]) - xc[0]*D(vext[1,i]) = gm * v[i] - (gm + xg[0] + 2/xraxial[0]) * vext[0,i] + (vext[0,i-1] + vext[0,i+1])/xraxial[0] + xg[0] * vext[1,i]
Code: Select all
cm * D(v[i]) + gm * v[i] + (vext[0,i+1] + vext[0,i-1] - 2*vext[0,i])/xraxial[0]
- (xg[0] + xc[0] * D) * (vext[0,i] - vext[1,i]) = 0
Code: Select all
-cm*D(v[i]) + xc[0]*D(vext[0,i]) - xc[0]*D(vext[1,i])
= gm * v[i]
+ (xg[0] - 2/xraxial[0]) * vext[0,i]
+ (vext[0,i+1] + vext[0,i-1])/xraxial[0]
+ xg[0] * vext[1,i]
Kirchhoff, help!ted wrote: ↑Mon Oct 08, 2018 3:11 pm Finally deal with the nodes in layer 1.which rearranges toCode: Select all
((xc[0] + xc[1])*D + (xg[0] + xg[1] + 2/xraxial[1])) * vext[1,i] = (xc[0]*D + xg[0]) * vext[0,i] + (vext[1,i-1] + vext[1,i+1])/xraxial[1] + xg[1] * e_extracellular[i]
Code: Select all
-xc[0]*D(vext[0,i]) + (xc[0] + xc[1])*D(vext[1,i]) = xg[0] * vext[0,i] - (xg[0] + xg[1] + 2/xraxial[1]) * vext[1,i] + (vext[1,i-1] + vext[1,i+1]) / xraxial[1] + xg[1] * e_extracellular[i]
Code: Select all
(xg[0] + xc[0] * D) * (vext[0,i] - vext[1,i]) + (vext[1,i+1] + vext[1,i-1] - 2*vext[1,i])/xraxial[1]
- xg[1] * (vext[1,i] - e_extracellular) - xc[1] * D(vext[1,i]) = 0
Code: Select all
-xc[0] * D(vext[0,i]) + (xc[0] + xc[1]) * D(vext[1,i])
= xg[0] * vext[0,i]
- (xg[0] + xg[1] + 2/xraxial[1]) * vext[1,i]
+ (vext[1,i+1] + vext[1,i-1])/xraxial[1]
+ xg[1] * e_extracellular[i]
and this diagram in the documentation shows the potential at the innercellular layer to be v+vext[0], I didn't get the different meaning of v.
You're right, that was a mistake. I'm sorry it exists, but glad that you caught it. I was so focussed on deriving and proofreading the equations that I didn't think to check the definition of terms. I'll correct that now, and leave a comment for the benefit of others who may read this thread.. . . in the post it was written
ted wrote: ↑Thu Jun 04, 2009 2:48 pm Considering the simplest case, which omits extracellular--
The equivalent circuit of a section with nseg==1 is a T circuit in which all membrane properties (capacitance and ion channels) are lumped into the vertical stem of the T. Read this
http://www.neuron.yale.edu/neuron/paper ... p2.htm#3.2