Cm Analysis


Starting in jClamp version 17.0 Cm analysis is more easily available from the CC window; now it is also referred to as Frequency domain cell parameter estimation. You may toggle between Time and Frequency mode on the fly. All selections in CC are enabled during CC data collection, for example, in Frequency mode you may change analysis type (Single , Dual, eCm), or Sample Resolution, or holding potential or Vpul size on the fly. 3 sine analysis is something in progress.  Place the mouse pointer over the values of Rs, Rm and Cm and a pop up shows the RMS value. Capacitance measures can also be made within ordinary protocols -- see Command Utility.  Now, CC Frequency domain analysis and protocol analysis work together to get clean Cm measurements. Below is a description of sine wave analysis in jClamp and more details about the new features.

For all methods except dithering, it is imperative that you calibrate your system! Things will not work otherwise! See below!





Patch/cell model



Single sine analysis

The current that is measured under voltage clamp is the current through Rs, namely IRs. In the single sine method a single sinusoidal voltage or current stimulus is delivered and the parameter values (Rs, Rm, Cm) of the patch/cell model (shown above) are estimated. This method of Cm estimation is based on evaluation of the changes of the capacitive current component of IRs, and arose from the initial work of Marty and Neher (1981), who tracked current at a phase angle that approximated the angle of ∂Y/∂Cm. This method was subsequently modified by Joshi and Fernandez (1988) to use the angle of ∂Y/∂Rs. See their paper for the reasoning behind this choice.

The method I employ here I devised by careful inspection of the phase tracking techniques above, and determination that the equivalent results are obtained by evaluating the imaginary component of IRs, B. Cm is estimated by using the gain factor (Hc) of 1/∂Y/∂Cm, which is approximated (Gillis, 1995) by


Hc = 1+ tan2 (90oY) ω-1,

where Y is the admittance at the angular frequency ω.

Cm= BHc .

A resistive measure (Rs) is estimated from the real component of Y, namely A, and scaled with abs(Y^2) Unlike typical phase tracking paradigms, a point-by-point analysis is performed. However, since the gain is approximated, the Cm estimate suffers from interference from resistive changes in the model. This interference is alleviated by two additional methods that I have devised, the dual sine and eCm methods listed below.


---- Phase Sensitive Detector (PSD) is exposed!

When single sine analysis is selected a check box is displayed which allows you to use the phase sensitive detector. The method is detailed by Gillis, 1995, but instead of integrating over a full cycle, I use the FFT to get at the real and imaginay component at any selected angle. Any angle can be chosen by moving the slider. Right clicking increments by 1.57 radians. The angle of ∂Y/∂Cm (derived from two sinusoids – see Santos-Sacchi, 2004) or the angle ∂Y/∂Gs – 90o can be set or toggled on for tracking.  Zeroing and scale selection of the in phase (Y1) and quadrature (90o, Y2) response is possible. Pressing the left and right arrow keys will increment or decrement the PSD angle. You can use this see what angle is returned by dithering either the Rs or Cm compensation controls. The buttons on the right side implement angle estimation from dithering either the resistance or capacitance. Step one button is pressed to begin the process; then either RS compensation or Cm compensation controls need to be changed a small amount – no need to modulate the changes, just change a steady amount – then press step 2 button. 

There is now a dither feature in the main CC window, which lets you repetitively dither Cm, Rs, or Rm when the math model is chosen or dither a digital pulse when hardware is turned on. The pulse could be used to dither Cm or Rs altering circuits. However, in the PSD mode there is a more simple dither technique to get at the right angle for Cm measurement which follows.

For Rs dithering, jClamp will calculate the angle at which currents are unchanged by Rs changes. For Cm dithering, jClamp will calculate the angle at which currents are unchanged by Cm changes. Cm dithering is not really dithering the cell capacitance, so it is a rough estimate. Rs dithering will correct for changes in Rs, but Rm may change. Thus, obtaining an angle to measure true Cm is not possible with this type of dithering calibration. Using two sines, changes in all parameters can theoretically be separated. In any case, this traditional single sine approach can be used and if after obtaining an angle for Cm analysis you collect single sine data using a Command Utility protocol, the angle is saved with the data and can be used to analyze current magnitude at that angle and 90 degrees from it in the Analysis window. You might also use the digital out in a protocol to step a capacitance jump circuit in your patch clamp amplifier to roughly calibrate the Cm (Mag0 and Mag90) measurements.


Dual sine Analysis

In 1991, I devised a method to use two voltage sine waves simultaneously to enhance the parameter estimation method of Pusch and Neher (1988). A poster on the subject was presented at the Yale Neuroscience Retreat in 1992.

The following description is taken verbatim from by funded NIH grant proposal (R01 DC02003, submitted in 1992). Also, see the Detrending technical note supplied with jClamp, accessible from Windows Start menu. It is very important to detrend the data when sinusoidal stimulation is superimposed on rapidly changing voltage commands, as would be the case for investigation of voltage dependent capacitance. Starting in version 17.11, a new method of detrending is used which does not add any additional noise to the analyzed data. When you check the detrend button during Cm analysis a widow pops up below the checkbox. The choices are auto and a range of numbers (detrending iterations) from 1-20. The auto feature chooses the correct number of detrend iterations, but there may be a number below that which has less noise in the Cm trace, so you can choose the number of iterations manually. Detrending removes rapidly changing currents (without filtering the 2-sine response) prior to FFT analysis. See the Detrending technical note supplied with jClamp.


…. In the present experiment, a discrete frequency analysis will be attempted. Pusch and Neher (1988) have used a single “tone” (sine wave, actually) technique to determine cell characteristics under whole cell voltage clamp. By injecting a sinusoidal voltage into a cell, and measuring the current response, they calculated from the system’s impedance, the cell capacitance, resistance and electrode resistance.

Rs=(A-b) / (A2 + B2 - A* b)

Rm=1/b* ((A-b)2 + B2) / (A2 + B2 – A* b)

Cm=(1 / (ω * B))) ((A2 + B2 – A* b)2 / ((A-b)2 + B2))

where,

b=1/(Rs+Rm)

Y=1 / Zin

A=Re(Y)

B=Im(Y)

ω=2 π f

As can be seen, with the use of one “tone” (ω), it is necessary to obtain an independent estimate of the input resistance (b). However, the utilization of a “two tone” (ω1 and ω2) stimulus allows one to determine all parameters, given the signal and response. That is, b need not be determined independently, and can be solved for, since, for example, Rs is the same at any two frequencies. The evaluations should work under voltage clamp or current clamp. …

The implementation in jClamp allows the use of several different time resolutions which depend on the selected clock. It is best to use the default settings, since only these have been checked to work effectively, but feel free to try different settings and verify with electrical models. Real and imaginary components of the current responses are obtained through Fast Fourier Transform. Remember the analysis is model dependent (see model above), although the technique has now been extended to fusion event (and junctional coupling) analysis – see help on Analysis.


jClamp now uses two approaches for 2 sine stimulation, one being the original implementation where f2=2*f1 (index into the FFT array being 1 and 2) – the Fi2 checkbox is unchecked, and the other f2<>f1*2 (index into the FFT being 2 and 3) – the Fi2 checkbox is checked. By making the latter stimulus we avoid possible two-tone distortions such as sums and difference frequencies that can be generated in a nonlinear system. Thus, for the original implementation, f1 of 390Hz and f2 of 781 Hz could generate distortion components at f2-f1 which would sum with the f1 response and potentially interfere with measurement of cell parameters. Other distortion components, e.g. harmonics, could also interact with the primary frequencies causing problems. Now I introduce a 2-sine signal that is immune from these effects. Since the indices are not harmonically related, distortion components of an f1 of 390Hz and f2 of 585Hz will not interact as before. The new implementation will provide a few differences from the old one. For example, the old implementation at 10 usec,  would produce six resolutions at 0.16, 0.32, 0.64, 1.28, 2.56, 5.12 ms or correspondingly an f1 at ~ 6250, 3125, 1562, 781, 390, and 195 Hz, with f2 at 2*f1. On the other hand, the new implementation at 10 usec, will produce the same six time resolutions at 0.16, 0.32, 0.64, 1.28, 2.56, 5.12 ms but correspondingly f1 at ~12500,  6250, 3125, 1562, 781, and 390 Hz, and f2 at ~18750,  9375, 4687,2343,1171, and 585 Hz. Two cycles of f1 and 3 cycles of f2 are used for each measurement of cell parameters.


In the method window, the dropdown box (selection 1,2, or 3) permits the extraction of Cm based solely on ω1, ω2 or the average of the two, respectively. While using a math model produces equivalent results, real world conditions (e.g., different noise levels at each frequency, changes in stray capacitance, nonlinear distortion) may produce different results. Using 1 is probably best. Averaging was internally set for jClamp versions 12.0 – 12.5.

eCm Analysis

This method estimates all parameters based on an exact solution of ∂Y/∂Cm and its angle. Though the method uses two sinusoids to get at the angle of ∂Y/∂Cm, all parameters are determined from inspection of only the low frequency response. The manuscript (Santos-Sacchi, Biophysical Journal, 2004) is in the jClamp directory and is accessible from the Windows Start menu..


----------------------------------------------------------------------------------------------------------------------------------------------------

Single sine analysis is performed on the lower frequency, f1. For command protocols, the number of frequencies can be set in the command window and is saved with protocols, so you can make and run either 2 sine or single sine commands.



Notes on Calibration -- read this whole section!


Description: Description: Description: Description: Description: Description: cm_cal_load
Calibration can be initiated by clicking the ruler icon Description: Description: Description: Description: Description: Description: cm_CALIB_offin CC or in the Main Menu Bar, or by simply running the <accalib.prm> protocol from the command window. In order to make accurate AC measures, the frequency response of the system needs to be corrected for. When the calibrate button (ruler icon) is pressed, a window appears and allows you to either load an existing calibration file, or run a calibration. Upon calibration the red icon turns green. Any changes in the stimulus settings which require a new calibration will require a new calibration file. The user must also recalibrate after changing the clock or external filters. Filters should be set to a cutoff frequency (fc) less than that indicated. Calibrations can be saved to or loaded from disk (ascii file named filename.cal) using the file command buttons.

Calibration depends on the pure resistivity of the calibration resistor, and in the case of the dither technique, the pure resistivity of the whole dithering unit. Unfortunately, stray capacitance and inductance accompanies these components. I find it best to work with low frequency stimulation, sine 1 at @ 390 Hz and sine 2 @ 781 Hz, the default setting at a clock of 10 us. At these relatively low frequencies reactance and inductance errors are not so great. Nevertheless, you should always check the reliability of the measures with an electrical cell model.

The method for calibration is to use a resistor between headstage and ground. A value of 10 Mohm is typical. During calibration, a window opens (see below) to allow entry of the exact value of the resistor and the sample clock rate. The protocol file accalib.prm (accalibi.prm for current clamp) is used for calibration and is run automatically during calibration. It can also be run manually from the command utility (in which case it will simply open up the calibration window). The voltage magnitude, in the protocol can be increased as long as saturation is not evidenced in the current response. The protocol generates a correction file for the real and imaginary components of the system for 5 time resolutions (which correspond to different frequencies in the frequency domain). The resultant calibration file has calibration data for a given clock and filter cutoff; if either are changed another calibration file is necessary. Remember that when used to measure cell capacitance the magnitude should be as small as possible (I use 10 mV -- peak). See Takahashi S, Santos-Sacchi J, Distortion component analysis of outer hair cell motility-related gating charge.  J MEMBRANE BIOL 169: (3) 199-207, 1999 for potential problems with the technique. The non-harmonic protocol now implemented in jClamp can overcome these distortion problems if you have significant distortion. See description of the non-harmonic technique above.



A new approach


I have devised a new way to get around some problems with stray capacitance, which heretofore had to be removed by compensation at the amplifier. Now, although it is useful to balance out stray capacitance to limit potential saturation of the amplifier, jClamp can automatically remove stray capacitance during calibration and prior to cell recording.






Now the calibration resister is measured automatically.


Follow instruction in above windows.



For current clamp the procedure differs, and an alternate window will appear – you must compensate capacitance. The current clamp calibration window will open if CC is set in current clamp mode, else it will open for voltage clamp calibration. Cm measures under current clamp are very tricky, and I am still working on how best to do this.


In current clamp mode the resistor should be grounded and the voltage response to a short current pulse should be squared by using the capacitance compensation. Then calibrate by pressing OK button. Current clamp calibration and measurement are still under development. Beware!

Save the calibration data file and note that it can be reloaded (as default set in the ini file or at any time with the file command buttons or menu bar button) and used only when the clock and filter settings in CC and protocols match the original calibration settings. Remember, voltage and current clamp frequency responses within the same amplifier unit may differ, so each may require using unique calibration files.

Each channel must be calibrated if you want to use them together or individually. You can calibrate channel 0 first and save the data file, then calibrate channel 1 and resave the same file. The channel is selected in the calibration window. When you calibrate, channel 0 is defined as channel 0 out with channel 0 in, and channel 1 is defined as channel 1 out with channel 1 in. Check the goodness of the calibration with an electrical model. You will need to balance out the model series resistance's stray capacitance first which you can now do under whole cell conditions using the MD/Cs method – see below. You can look at the calibration file in a text editor. The calibration values are listed for each channel. If a channel is not calibrated, the list contains all zeros. At the end is a comment section where comments on filter frequency, etc. can be added from the calibration window text box or in a text editor. The default capacitance tracking calibration files (vClamp and iClamp) are set in the ini file.

Here is another point to remember. The Cm determination is model dependent and assumes no stray pipette capacitance. This is also true when you use a model cell. If you have a commercial cell model, typically (in the past) you cannot really balance out the stray capacitance of the series resistance under whole cell conditions. Now this can be done suing the MD/Cs method below. Additonally, you could not rely on balancing out in the patch condition – the MD/Cs method should work here, as well. To confirm things, I have made a simple cell model in which I can manually disconnect the series resistance from the cell parallel resistance and capacitance. Balance out the series resistance stray capacitance when it is disconnected into the air as you do during calibration. Then connect the rest of the model and the measured values will be quite accurate and should match those you obtain with the MD/Cs method.


If you create a calibration file using a 10 usec clock, and a 10 kHz filter between the amp and A/D board, you may collect data at any of the 6 time resolutions (5 useable) noted above. The calibration file that is loaded will be used and automatically chooses the appropriate resolution correction factors for the data analysis. So, if you run only 10 usec data collections with that 10 kHz filter, then you only need this calibration file for all data collections. If you change the clock to 20 usec or any other rate, or if you change the filter, then you need to create a new calibration file with these settings that you must use (have loaded) prior to collecting data with these new settings.


I suggest that you make a bunch of calibration files that are saved with different filenames, for example.


Amp1_10us_10kHz.cal --  Amplifier number 1 with 10 kHz filter collected with <accalib*.prm> set to 10 usec clock


Amp1_5us_10kHz.cal --  Amplifier number 1 with 10 kHz filter collected with <accalib*.prm> set to 5 usec clock


Amp2_10us_10kHz.cal --  Amplifier number 2 with 10 kHz filter collected with <accalib*.prm> set to 10 usec clock


Amp1_10us_3kHz.cal --  Amplifier number 1 with 3 kHz filter collected with <accalib*.prm> set to 10 usec clock


For calibration, if you want to make alterations, say, to voltage, the altered file <accalib*.prm>   must be saved in order to use the changes.


If you have any other changeable equipment that could alter the system response, such as an analog switch or multiplexer in the path, then any changes may require a new calibration file.


Each time you collect data at a given clock and filter frequency setting you must use the appropriate calibration file. The resolution of the measurement that you select does not dictate the calibration file to be used. This depends only on the clock and filter. jClamp automatically uses the appropriate corrections from the calibration file to analyze at the selected time resolution.


After you make a calibration file, you should load it either by default on startup (set in the ini file), or within a script file (before running a command protocol requiring the calibration file) or manually during jClamp execution.


For command protocol data collections, the loaded calibration file is saved with the abf data file and is automatically used for correction in the Analysis window (if enabled for use in the Data load window). So, <abf> data files are saved raw and analyzed each time the file is opened. This means that for <abf> files, different calibration files can be used to analyze the data, and therefore better estimates of the system response can be used to correct the data post hoc.



Finally, be careful to understand how you might interfere with valid correction using a given calibration. The calibration simply “flattens” out an “unflat” system response; it removes the system response from the equation so you can accurately gauge the cell’s physiological response. Let’s review the calibration procedure. When you place a pure resister between headstage and ground (and balance out the stray capacitance), the response that you measure which deviates from a purely resistive response should be due to the amplifier, filter, D/A characteristics and any other influential component that you have in the path between that resister and the recorded response.  If everything is done correctly with the calibration (pure resistivity, accurate entry of resistance magnitude) then we get correction factors (for all the resolutions at the given clock rate) that can be used to remove the effect of the equipment, and thus measure the cell’s impedance correctly. In order to validly use the correction factors, you have to make sure that after the formation of a gigohm seal, stray capacitance is balanced out (but see MD/Cs method below) because the evaluation of the cell’s characteristics is model dependent and does not include a pipette capacitance. Additionally, any manipulation of the amplifier after whole cell configuration could potentially introduce changes to the state of the system that could invalidate the calibration. For example, series resistance compensation may involve (in some amplifiers) an introduction of a lag in the system. This could invalidate the correction values in the calibration file. You can check the effect of series resistance compensation or other amplifier manipulations with an electrical model cell. I routinely will not use this feature if I am doing capacitance measures. The best thing that I can say is that you should check everything you might do with a model cell before trying on a real cell.



In-cell stray capacitance neutralization with software assistance


Although you may have made efforts to remove stray electrode capacitance prior to popping into a cell, things may change during the course of an experiment. For example, fluid level may rise or fall around the electrode and additional stray capacitance may interfere with Cm measures. I now provide simultaneous multi dual (MD) sine wave analysis to handle this problem. In CC, select the MD checkbox and 5 dual f1/f2 frequency analyses will provide a plot of Cm versus frequency index (low f to high f). Simply flatten the line with electrode capacitance compensation circuitry on the patch amplifier to correct for stray capacitance at all frequencies. Color of the line changes towards green as the correct compensation is reached. An accurate calibration file is essential to use this feature. With this technique, you need not worry if you pop into a cell before adequately compensating stray capacitance. It must be emphasized that this procedure demands that cell capacitance must be linear, i.e., surface area dependent only. If a nonlinear capacitance exists, this must be performed in a state where it is absent.


A Capacitance Compensation window is now available to aid in stray capacitance (Cs) compensation. It is opened by checking the Cs checkbox in the CC window in Calibrate sub frame. Some amplifiers (e.g. Axon Multiclamp) may not have enough compensation to flatten out the Cm vs F curve in MD. Additional compensation is provided by moving the mouse with.the left button pressed when over the text boxes. . Finer control is afforded by the mouse wheel scroll alone. Right click on text box to set 10X gain changes. Start with the Cs0/Rcs0 slider first. One could do all compensation with the software controls but it is better to balance fully with hardware if possible. This software compensation works only under Frequency domain, but hardware compensation works under all stimulation conditions since it is at the amplifier. One could compensate Cs  in Freq domain and switch back to Time domain knowing that the compensation remains in effect. It is really impossible to balance out stray capacitance under the Time domain when inside the cell, thus the MD/Cs method is very useful even if you do not do Cm measurements.


Under some conditions, it may be possible to compensate automatically in software. First adjust hardware compensation just below compensation as shown in the red line below. Then press the fit button. The success of this depends on many factors, including the initial guess result prior to minimizing to a slope of Cm vs F of zero. Now jClamp gets an initial guess for Cs magnitude from a 4 parameter fit of the model with just a Cs (+Rs,Rm, Cm), and no Rcs. This quick accurate estimate allows fitting to be done very quickly.


For the Multiclamp and EPC10, fitted paramaters can be sent to the patch clamp directly. Additionally, for the Multiclamp, checking the MC box will fit the parameters solely in MC Commander. If the passed fit is not accurate, hit <Alt> to show a button [C] that will calibrate the transfer of jClamp fitted parameters to Multiclamp. MD mode must be in effect.


The One last note, the Cs corrections are saved with the data file and utilized during analysis – there is a Cs checkbox in the Analysis window which enables/disable the corrections so that you can see the effect of having successful stray Cs compensation. Each new cell must be compensated, and probably during an experiment with one cell you should check compensation. The actual voltage delivered to the cell during MD stimulation is larger than a 2 sine stimulus because 5 sines of equal magnitude are summed. Thus, you may want to consider the effect of the stimulus on your cell. If necessary, you could reduce the stimulus size during compensation.


Description: Description: Description: Description: Description: Description: Cs_cal








Now you can view Rs, Rm, Cm, and raw current when in CC MD mode. As  before you can balance out Cm across frequency to avoid stray capacitance effects. Additionally, selecting Cs bal plots a single line of Rs relative to Cm across frequency, and when the line is flat near zero across frequency using the amplifier's fast capacitance controls, stray capacitance will be removed, since each component, Rs and Cm must be frequency independent. This works for linear models only.