Electrodes
The excitability of tissue is sensitive to the stimulus current amplitude and waveshape [32]. The lower the impedance of electrodes interfacing with the tissue, the smaller the power requirement will be for a similar current amplitude. Silver/silver chloride electrodes were interfaced with the rt-SRS preamplifier as they have relatively low impedance, are good transducers of biopotentials, and also relatively non-polarizable [33]. A MappingLab electrode array with 64 electrodes arranged in an 8 × 8 matrix was interfaced with the preamplifier of the rt-SRS. Each electrode on the MappingLab array is made of silver, has a diameter of 0.1 mm and 0.43 mm spacing between two adjacent electrodes (Fig. 2c for photo). Before every experiment, the electrodes were chloridized if required so that all the electrodes had impedance under 10 kΩ using previously established procedures at the institute [33].
Analog preamplification and voltage protection circuitry
The analog preamplifier clips any signal outside ± 3.3 V transduced by the electrodes, then amplifies and filters signals before digitizing them (Fig. 1). All the electronics were assembled on custom-built printed circuit boards (PCBs). Each PCB had preamplifiers for eight channels. A standard cage housed 12 PCBs with a custom backplane and battery rack to power the 96 preamplifier channels. Two 18-V 5.0-Ah rechargeable batteries (Makita BL1850B) were used to power the preamplifiers and provide ± 18 V. When the batteries powered all 96 channels of preamplifiers, they consumed 760 mA current, and the batteries lasted for about 6.5 h on one full charge. Two voltage regulators (LM317K and LM320N, Fig. 7a) were used to provide a constant ± 15 V power supply to the instrumentation amplifiers and the operational amplifiers. Two Zener diodes (MM3Z3V0ST1G) were used to drop ± 15 V to ± 3.3 V (Fig. 7b) and provided the reference voltage to the voltage clipping block.
The input of the preamplifier, in addition to interfacing with the electrode, interfaces with the current source through current routing instrumentation (see Fig. 7c). A constant current source converter converts any waveshape of ± 10 V (with frequency spectra 0-10 kHz) to ± 10 mA of the same waveshape. The current source provides up to ± 150 V. The ± 150 V limit implies that if the electrode impedance were 20 kΩ, the stimulator could source a maximum of 7.5 mA through that electrode. The stimulator was custom designed by RDM-Apps, CO, USA. A computer-controlled ‘reed relay switching matrix module’ is used to route the current signal to any of the 96 channels (see Fig. 7c).
The voltage at the electrode tips can rise to ± 150 V, especially while pacing. The preamplifier’s instrumentation amplifier (INA2128, Fig. 2d) may be damaged if exposed to voltages greater than ± 40 V. A voltage clipping circuit preceding the instrumentation amplifier clips any electrode signal bigger than ± 3.3 V. The voltage clipping circuit for each channel consists of 4 general-purpose diodes (CMDD3003TR, Fig. 7d). Each channel’s instrumentation amplifier interfaces with the electrode and the reference signal and provides a gain of 5× with high common-mode rejection to the input signal. The signal gets high-pass filtered through a 2nd-order Sallen Key filter with a cut-off frequency set at 0.39 Hz, and Q-factor of 1. The signal gets low-pass filtered through 2nd-order low-pass filter with a cut-off frequency set at 2.14 kHz, and Q-factor of 0.5 (Fig. 7e). The bandpass filter and the instrumentation amplifier provide an overall gain of 162×. The overall preamplifier bandwidth is 2.14 kHz, with a center frequency at 28.88 Hz, and a Q-factor of 0.013. The preamplifier’s input-referred noise is 100 µV.
Data acquisition, processing, real-time visualization design
The output of each preamplifier channel connects to a channel of the data acquisition card. Two NI 6345 (National Instruments, Austin, TX) data acquisition cards are used to acquire up to 96 channels of data at 4096 Hz at 16-bit resolution. Of the 96 channels, one NI 6345 module converts 80 channels of preamplified analog data to digital data, and the second NI-6345 module converts the remaining 16 channels of analog data to digital signals. Each NI 6345 module can sample multichannel data at a maximum rate of 500k sample/second. Therefore, the rt-SRS can acquire data at up to 6.25 kHz per channel. The computer-controlled ‘reed relay switching matrix module’ uses three NI 2834A (National Instruments, Austin, TX) switches, which are stacked together to route constant current signals to any of the 96 channels (Fig. 7c). A NI-8840 (National Instruments, Austin, TX) remote controller establishes and handles communication with the data acquisition cards and current routing switches. A gigabit ethernet port on NI-8840 establishes the communication between the remote controller and a host computer. The host computer can interrupt the remote machine processes or provide a platform to visualize data the remote controller acquired in real-time.
Software for rt-SRS
The data acquisition hardware and the current routing/switching hardware were organized using codes developed in LabView (National Instruments, Austin, TX). A host computer was connected to the remote controller through ethernet ports on both ends to deploy and monitor the software on the remote machine. LabVIEW programs are called virtual instruments (VIs) because the appearance and operation are similar to physical instruments like an oscilloscope or a multimeter. Every VI consists of a front panel and a block diagram. The front panel is the user interface of the VI and consists of controls and indicators. The controls are similar to the input to an instrument and feed into the block diagram of the VI. The indicators are similar to an instrument’s output device and display the data that the block diagrams acquire or generate. The block diagram consists of algorithms and functions implemented using a graphical representation. The block diagram acts upon the controls and displays the data generated or acquired on the indicators.
The block diagram of our application has an event-structured producer/consumer design (see Fig. 8) [34]. The design consists of two main loops, namely the producer loop and the consumer loop. The producer loop of the block diagram has four ‘event’ states: initialize, data acquisition/recording, rate detection/stimulation, and stop. The consumer loop has two ‘event’ states: one to visualize the raw data in real-time and the other to calculate and visualize the spatial derivative of the raw data in real-time. Upon starting the VI, the producer loop starts in the initialize event state while one can initialize the controls for data acquisition sampling rate and data storage folder names. Other constants for data acquisition include voltage range, output voltage range for voltage-controlled constant current stimulator, data acquisition hardware, analog output hardware for voltage to current stimulator also get initialized while the producer loop is in the initialize event state. If any hardware configuration fails, the application will abort and show an error. After ascertaining the initialization controls, the data acquisition begins by clicking the start control button on the front panel. The producer loop is now in the data acquisition/recording state. The consumer loop is in the raw data state by default, but does not perform any function when the producer loop is not in the data acquisition/recording state. While the producer loop is in the data acquisition state, it acquires the raw data, records the data if the front panel record button is checked, and uses LabVIEW’s enqueue element feature to queue the data to a buffer for consumption in the consumer loop. Every time data gets queued in the producer loop, the consumer loop deques the enqueued data, unpacks each channel of electrical information, and displays it on a scrolling graph on the front panel. If the spatial derivative (described later) control on the front panel was selected, the consumer loop would be in the spatial derivative event state. Here, it not only unpacks each channel of electrical information, but also manipulates each channel’s electrical information using the other channel’s electrical information and displays this new information on a scrolling graph indicator on the front panel. The spatial derivative of electrical information is very useful in identifying electrodes directly on the HB.
Spatial derivatives highlight the electrical activity underneath the central electrode by subtracting the common electrical activity between the surrounding electrodes [25, 29]. The raw data or the spatial derivative data of up to 96 channels can be visualized in real-time on the front panel of the remote application on the host machine. When a matrix of the regularly spaced electrode array is used to measure electrical activity, the spatial derivate of an electrode is given by:
$$V{\text{c}} - \frac{{\left( {V{\text{w}} + V{\text{e}} + V{\text{n}} + V{\text{s}}} \right)}}{\text{count}},$$
(1)
where V is the voltage, subscript ‘c’ is for the central electrode, subscripts ‘w’, ‘e’, ‘n’, and ‘s’ are for electrodes west, east, north, and south of the central electrode. If the electrode has all the neighbors, then the count value is 4. However, edge electrodes have three neighbors, and corner electrodes have two neighbors. Therefore, the count value is 3 and 2, respectively, for the edge and the corner electrodes. Once the matrix of electrodes is placed over the region of HB, all the raw data channels are scanned for channels with the strongest HB signal. Later, the spatial derivates of the channels with the strongest HB signals are observed, and the channels with the strongest selective HB signal during sinus rhythm are chosen as candidates for selective HB stimulation. The spatial derivative of the electrode which has the strongest HB signal during sinus rhythm also has the strongest signal during ventricular fibrillation [25].
The producer loop of the block diagram enters the detection/stimulation event state upon selecting the sensing electrode, and the stimulation electrode controls on the front panel. The current routing hardware takes 1.89 s to configure the current route to the stimulation channel. Therefore, while in the detection/stimulation event state, the switching hardware gets configured while 3 s of data from the sensing electrode and its surrounding electrodes are acquired. An interactive graph on the front panel displays the spatial derivative of the sense electrode or the raw electrogram of the sense electrode. The graph has a horizontal line that can be dragged vertically to adjust the threshold to detect peaks. The peak detector function in LabVIEW was used to detect the intrinsic activation rate. Since the activation time coincides with a very sharp deflection, the peak width was set to 3 samples. During VF, the signal-to-noise ratio was lower for the LabVIEW’s peak detection function to accurately select the HB activations every time only using a threshold value and peak width value. Therefore, a custom function was built for cases when multiple peaks are detected, which are closer than a refractory period for cardiac tissue [35]. The refractory period is a duration within which another activation cannot occur. When the peak detector function detects multiple peaks, the custom function only keeps the biggest peak within the specified refractory period, and the algorithm excludes any remaining peaks. For experiments conducted in rabbit hearts, the refractory period was set to 30 ms [19]. If the threshold is set too close to zero, the peak detector function can choose too many peaks (> 50 picks per second), and the custom function will fail to remove the too many peaks within a reasonable time frame (< 2 s). Therefore, if the custom function fails to exclude over-picks within 2 s, the user can manually enter the activation rate or have a pre-assigned value to use as the pacing rate.
For a stimulation pulse to control cardiac tissue, it needs to pace at a rate faster than the intrinsic activation rate of the tissue [35]. Therefore, immediately after the HB activation rate was determined, current pulses were sent through the stimulation electrode at a rate of 5% faster than the intrinsic activation rate. The ability to pace immediately after detecting the HB activation rate is critical during VF as the activation rates vary a lot more during VF [25].
The stimulation waveform consisted of a 1-ms positive pulse, followed by a 0.2-ms blank period (or inter-pulse period), followed by a 1-ms negative pulse, followed by a blank period determined by the pace-rate (Fig. 9) [35]. If the pacing rate and the stimulation electrode were both set manually, and the rate detection algorithm were completely skipped, the rt-SRS takes 1.91 s (1.89 s to configure the current route and switching time was 20 ms) to deliver stimulation pulses after choosing the stimulation electrode.