Stimulation

See code in GitLab.
Author: Gernot Plank gernot.plank@medunigraz.at

To run the experiments of this tutorial change directories as follows:

cd ${TUTORIALS}/02_EP_tissue/02_stimulation 

Extracellular stimulation

Transmembrane voltage can be changed by applying an extracellular field in the extracellular space. As outlined in Sec. electrical-stimulation, an electric field can be set up either by injection/withdrawal of currents in the extracellular space or by changing the extracellular potential with voltage sources.

For testing the various types of extracellular stimulation we generate a thin strand of tissue of 1 cm length. Electrodes are located at both caps of the strand with an additional auxiliary electrode in the very center of the strand. An illustration of the setup is given in fig-extra-stim-setup. Extracellular voltage and current stimuli are pre-configured to generate an extracellular voltage drop across the strand of about 2 V. This corresponds to an electric field magnitude of 2 V/cm which is sufficient to initiate action potential propagation under the cathode.

Simple setup for testing the various configurations for extracellular stimulation. Three electrodes are pre-defined, electrode A and B located at the left hand face and right hand face of the tissue strand, respectively, and an additional auxiliary electrode C sitting on top of the strand in its center.

Experiments

Several types of stimulation setups are predefined. Run

./run.py --help 

to see all exposed experimental parameters. The input parameter stimulus selects a stimulus configuration among the following available options:

--stimulus {extra_V,extra_V_bal,extra_V_OL,extra_I,extra_I_bal,extra_I_mono}
                      pick stimulus type

--grounded {on,off}   turn on/off use of ground wherever possible

The geometry of the three electrodes A, B and C are defined as follows:

# electrode A
stim[0].elec.p0[0] = -5050.
stim[0].elec.p1[0] = -4950. 
stim[0].elec.p0[1] = -100.
stim[0].elec.p1[1] = 100.
stim[0].elec.p0[2] = -100. 
stim[0].elec.p1[2] = 100. 

# electrode B
stim[1].elec.p0[0] = 4950.
stim[1].elec.p1[0] = 5050.
stim[1].elec.p0[1] = -100.
stim[1].elec.p1[1] = 100.
stim[1].elec.p0[2] = -100.
stim[1].elec.p1[2] = 100.

# electrode C
stim[2].elec.p0[0] = -10.
stim[2].elec.p1[0] = 10.
stim[2].elec.p0[1] = -5000.
stim[2].elec.p1[1] = 5000.
stim[2].elec.p0[2] = -5000.
stim[2].elec.p1[2] = 5000.

Experiment exp01 (extracellular voltage stimulation)

The stimulus option extra_V sets up stimulation through application of extracellular voltage corresponding to fig-extraV-wgnd. The potential electrode A is clamped to 2000 mV for a duration of 2 ms, electrode B is grounded, i.e., \(\phi_{\mathrm e} = 0\). Electrode C is not used here, electrodes A and B are configured as follows:

numstim = 2   # use two electrodes, A and B

# electrode A
stim[0].crct.type = 2        # extracellular voltage stimulus
stim[0].pulse.strength = 2e3      # voltage at A in mV 

# electrode B
stim[1].crct.type = 3        # extracellular ground

Run this experiment by executing

./run.py --stimulus extra_V --visualize

Experiment exp02 (balanced extracellular voltage stimulation)

As in experiment exp01, the stimulus option extra_V_bal sets up stimulation through the application of extracellular voltage. The potential on the left cap is clamped to 1000 mV for a duration of 2 ms and the right hand electrode to -1000mV. This stimulation circuit corresponds to the setup shown in fig-extraV-symm-wgnd.

numstim = 3   # use all three electrodes, A, B and C

# electrode A
stim[0].crct.type =  2       # extracellular voltage stimulus
stim[0].pulse.strength =  1e3     # voltage at A in mV 

# electrode B
stim[1].crct.type =  2       # extracellular voltage stimulus
stim[1].pulse.strength = -1e3     # voltage at B in mV

# electrode C
stim[2].crct.type =  3       # extracellular ground at C

Realize this experiment by running

./run.py --stimulus extra_V_bal --visualize

Experiment exp03 (extracellular voltage stimulation with circuit break)

As in experiment exp01, the stimulus option extra_V_OL sets up stimulation through the application of extracellular voltage. The extracellular potential at electrode A is clamped to 2000 mV for a duration of 2 ms. In contrast to the extra_V electrode A is disconnected from the source after stimulus delivery. Therefore, the potential at A is allowed to float after the end of the stimulus, that is, electrode A won't act as a ground after delivery of the voltage pulse. This stimulation circuit corresponds to the setup shown in fig-extraV-wgnd-switched.

numstim = 2   # use two electrodes, A and B

# electrode A
stim[0].crct.type = 5        # extracellular voltage stimulus, switched
stim[0].pulse.strength = 2e3      # voltage at A in mV 

# electrode B
stim[1].crct.type = 3        # extracellular ground

To realize this scenario, run

./run.py --stimulus extra_V_OL --visualize

Experiment exp04 (extracellular current stimulation)

The stimulus option extra_I sets up stimulation through the application of an extracellular current. The current is injected into electrode A in the extracellular medium and withdrawn at electrode B which, in turn, is grounded. The extracellular current strength is chosen to induce an extracellular potential drop of 2000 mV across the strand as before with extracellular voltage stimulation in extra_V. This configuration corresponds to the setup shown in fig-extraI-wGND. Electrode C is not used here, while electrodes A and B are configured as follows:

numstim = 2   # use two electrodes, A and B

# electrode A
stim[0].crct.type = 1        # extracellular current stimulus
stim[0].pulse.strength = 3.1e6    # current density at A in :math:`\mu A/cm^3`

# electrode B
stim[1].crct.type = 3        # extracellular ground

To see the result, run

./run.py --stimulus extra_I --visualize

Experiment exp05 (balanced extracellular current stimulation)

Similar to experiment exp04, the stimulus option extra_I_bal sets up stimulation through the injection of extracellular current with the difference being that B is not grounded. Extracellular current is injected into electrode A and the same amount is withdrawn from electrode B. As this constitutes a pure Neumann problem, two scenarios can be considered. Either electrode C is used as a grounding electrode corresponding to fig-extraI-symm-wgnd, or we refrain from defining an explicit grounding electrode and use a diffuse ground, that is, we apply an additional constraint to deal with the nullspace of the problem. The latter option corresponds to fig-extraI-symm-diffuse. Both configurations also induce an extracellular potential drop of 2000 mV across the strand, albeit in a symmetric way. Note that in both cases, the compatibility condition must be satisfied. This is taken care of by CARPentry internally by balancing the total current injected/withdrawn through electrodes A and B. If balancing is imperfect, a stimulation would also occur around electrode C as all the excess current would drain there.

In the setup with an explicit ground, electrodes are defined as:

numstim = 3   # use all three electrodes, A, B and C

# electrode A
stim[0].crct.type =  1       # extracellular voltage stimulus
stim[0].pulse.strength =  3.1e6   # current density at A in :math:`\mu A/cm^3` 

# electrode B
stim[1].crct.type =  1       # extracellular voltage stimulus
stim[1].crct.balance  =  0       # no strength prescribed, balance with stimulus[0]

# electrode C
stim[2].crct.type =  3       # extracellular ground at C

To solve the pure Neumann problem without an explicit ground, the input parameter grounded is set to on. In fact, CARPentry turns on this mode automatically if a pure Neumann configuration is detected.

numstim = 2   # use electrodes A and B 

# electrode A
stim[0].crct.type =  1       # extracellular voltage stimulus
stim[0].pulse.strength =  3.1e6   # current density at A in :math:`\mu A/cm^3` 

# electrode B
stim[1].crct.type =  1       # extracellular voltage stimulus
stim[1].crct.balance  =  0       # no strength prescribed, balance with stimulus[0]

In order to finally execute the last experiment, run

./run.py --stimulus extra_I_bal --visualize

© Copyright 2020 openCARP project    Supported by DFG    Contact    Imprint and data protection