Page 1 of 1

### Impedance vs Frequency Plot- DC & AC Current - Gap Junctions

Posted: Thu Jul 12, 2012 3:14 pm
Hi,

I was using the GUI tool to plot Impedance vs Frequency spectrum for a number of models:
(a) a simple passive cell
(b) two of these same cells connected via gap junctions (Gap Junctions were modeled in NMODL as purely resisitive - as described in NEURON book)
(c) two of these same cells connected via a resistor using Linear Circuit Builder (basically equivalent to above but different approach)
[As expected results for models (b) and (c) turned out to be pretty identical]
(d) two of these same cells connected via a resistor and capacitor in parallel using Linear Circuit Builder (a gap junction having both a resistive and capacitive component)

Then just for verification, I tried testing for a few values of f (10hz, 100hz, 1000hz) using a sinusoidal input (used Izap.mod with f0=f1) and for f=0Hz, (i.e. DC) by using IClamp - Zin calculated in all cases as as v(x)/i(x) at the peak/steady state. For the latter I supposed that as f tends to 0Hz (f->0Hz) on the Impedance spectrum, Zin converges to a finite value and this would be equivalent to Rin. All the values matched pretty perfectly for the model of a simple passive cell. But there were significant differences for f (10hz, 100hz, 1000hz) when gap junctions came into the picture. And there was a bigger difference in Zin as (f->0Hz) and Rin(IClamp) (33 Mohms vs 1838 MOhms).

I was wondering why this difference takes place in the models having gap junctions. In the NEURON documentation, under Impedance -> Compute -> Bugs, it states: "The calculation is incomplete in the presence of nonlocal mechanisms such as gap junctions". I can list down my questions from here as:

1> What does that statement exactly mean (why is there an issue with mechanims such as gap junctions) and does it have something to do with whats observed in the above models?
2> If yes, then does it mean that the Impedance vs Frequency plot obtained for models with gap junctions is incorrect?
3> If yes, what alternative would you suggest to obtain an Impedance spectrum for such models using gap junctions as point processes?
4> The Impedance spectrum for models (c) and (d) were identical (right to the last decimal); even for absurdly large values of gap junctional capacitance. Found it surprising that the presence of a capacitor (even when given large values) failed to produce any effect on the Impedance spectrum. Why so? Am I missing something?

I was trying to have a go and look through the code where Impedance Class was implemented. But I was unable to locate the same. I was having one other query, but it seemed more appropriate to post it separately as it wasn't entirely related.

Thanks,
Shailesh Appukuttan

### Re: Impedance vs Frequency Plot- DC & AC Current - Gap Junct

Posted: Fri Jul 13, 2012 1:50 pm
I'm sorry to say that the Impedance class is limited to tree structures. There should be an error message when LinearMechanism or extracellular is present.
It may accidentally work under some conditions if you have one LinearMechanism resistive gap juction connecting two distinct cells but it is not worth going into the conditions.
The problem with NMODL implemented gap junctions is that, although the diagonal elements of the impedance matrix are correct, the relevant off diagonal elements are
missing, so the impedance calculated is only approximate.
The implementation in nrn/src/nrniv/impedance.cpp needs to be augmented to create and solve a general complex sparse matrix. This kind of matrix is used in
nrn/src/ivoc/nonlinz.cpp which includes dstate/dt contributions and it should be straightforward to take into account LinearMechanism additions. I'm trying to understand why the
error message in nonlinz.cpp
"Impedance calculation with LinearMechanism not implemented"
did not appear when I checkmarked the "include dstate/dt contribution" of the ImpedanceRatio tool.

### Re: Impedance vs Frequency Plot- DC & AC Current - Gap Junct

Posted: Sat Jul 14, 2012 1:21 am
Thanks a lot for pointing that out. So as using the Impedance class is ruled out in my case, would the alternative be to inject sinusoidal currents, over a range of frequencies, and then calculate Zin=peak[v(x)]/i(x) in each case. Would plotting this Zin vs f give me the correct Impedance-Frequency plot? As a basic test, it did confirm that Zin at (f=0.01Hz) = Rin(IClamp). This method, even though much slower, does seem to give accurate results. Do point me to a better alternative, if available.

Thanks again!
Shailesh Appukuttan

### Re: Impedance vs Frequency Plot- DC & AC Current - Gap Junct

Posted: Sat Jul 14, 2012 8:57 pm
Yes. Injecting small sinusoidal currents is a practical way to measure the impedance.
It helps of course if one is in a steady state. An intriguing alternative is to measure
impedance by voltage clamping to a small sinusoidal clamp potential. They should
give the same result but could differ if the the system is not in a stable state.
Perhaps Ted could break in here, but it seems to me there is often a difference between
an operationally measurable impedance and the instantaneous theoretical impedance calculated from
the jacobian.

### Re: Impedance vs Frequency Plot- DC & AC Current - Gap Junct

Posted: Mon Jul 16, 2012 2:06 pm
The voltage clamp method that you suggested does provide an interesting potential alternative. But I decided to play it safe and went about following the former method and it did provide me consistent results (there wasn't much to go wrong there I suppose), though did end up taking quiet long for really low frequencies.

Thanks again,
Shailesh Appukuttan