In this article, I will go over the basics of ICD algorithms and existing approaches. Then I will discuss alternative approaches to current methods and the benefits/drawbacks of both.
Implantable Cardioverter Defibrillators (ICDs) are medical devices used to monitor heart rhythm and detect irregularities in rhythm. These devices both have low-energy pacing and higher-energy shock (ATP) abilities. The signals used in this study are electrograms (EGMs), which are obtained from the leads placed directly on the cardiac tissue. The specific device used is a dual-chamber ICD, which has one lead in the right atrium and another in the right ventricle. Near- and far-field electrograms were measured. Inappropriate device-delivered therapy activations are typically caused by supraventricular tachycardias (SVTs). Inappropriate therapy can be decreased by the use of a high heart-rate threshold or delayed therapy . This indicates that episodes of non-sustained ventricular tachycardia (NSVT) can be terminated under normal conditions without unnecessary therapy.
- Decrease inappropriate therapy by improving tachycardia discrimination by understanding ICDs and current approaches.
- Evaluate current ICD algorithms (Boston Scientific and Medtronic) to establish a baseline discriminator.
- Evaluate how changes to certain parameters affect the overall performance of the baseline algorithms.
Implementation of ICD Algorithms
Sensing algorithms are used to locate the peaks of each event, whereas detection algorithms are used to discriminate between the different classes of tachycardias (SVT/VT). Two main sensing and detection algorithms were explored: Boston Scientific and Medtronic.
Sensing in ICDs
Both sensing algorithms follow the same main steps:
- Difference amplifier — removes common noise from both input electrodes and amplifies the difference.
- Bandpass filter — removes lower frequency baseline signals and higher frequency noise.
- Rectifier — takes the absolute value of the entire signal.
- Threshold — dynamic threshold to capture each R-wave event.
- Blanking — time after sensing event occurs where peaks above threshold are ignored to make sure that each R-wave is only sensed once.
Active Gain Control
Fixed sensitivity leads to problems because some of the low-amplitude R-waves are not sensed; the discriminator would potentially classify the signal as normal when the low-amplitude parts might be in VT. Automatic Gain Control (AGC) corrects for this by increasing the gain the most for smaller input signals, so that these previously low-amplitude peaks are registered by the fixed sensitivity. An auto-adjusting threshold decreases the sensitivity after sensed ventricular events to better capture the low-amplitude peaks.
Dynamic Sensitivity Adjustments
- Longer blanking period — Blanking is used to avoid double-sensing of the R-peak. After a pacing pulse, there is a longer blanking period because an R-wave does not need to be measured immediately after the pacing pulse.
- Decay of sensing threshold — The sensing threshold is automatically adjusted and starts at the end of the blanking period with 75% of the magnitude of the most recently sensed R-peak (starts at some programmed value after a pacing event). The Medtronic algorithm has an exponential decay of the sensing threshold whereas the Boston Scientific algorithm decreases the sensing threshold in small steps, doubling the sensitivity every 200 ms after a sensing event.
The Boston Scientific and Medtronic algorithms are both highly sensitive to noise and pre-programmed parameter values. Because of the algorithm’s sensitivity to noise, the R-peaks are not always properly located. This leads to complications with morphology discrimination, which requires the waveforms to be centered about the R-peak.
QRS Detection Algorithm
The motivation behind this algorithm is to decrease false-positive sensed events and the number of patient-specific parameters present in the Boston Scientific and Medtronic algorithms. This algorithm is modeled after the Pan and Tomkins algorithm for real-time QRS detection in ECG signals, and adapted to detect R-peaks in electrogram signals for the purpose of this project . It can be used for pre-recorded signals as well as real-time signals.
- Bandpass filter — removes low frequency baseline signals and higher frequency noise.
- Differentiation — highlight segments with a large change in signal (QRS complex).
- Squaring — signal changes are emphasized and the signal is made positive.
- Integration — peaks are made more distinct, to eliminate false-positives.
- Peak identification — peaks of integrated signal are located using the Janko Slavic peak detection algorithm.
A low-cutoff of 1 Hz and a high-cutoff of 80 Hz was used to match the filtering effects of the Boston Scientific and Medtronic filtering steps. The filtered signal is then differentiated to highlight segments with a large change in signal, specifically the QRS complex. These changes are then squared to reduce false positives due to high-magnitude T waves and integrated to make them more distinct. Finally, the integrated signal is passed into a peak detection algorithm to identify possible peaks.
The peak detection algorithm takes three inputs: the data, expected spacing between peaks (in samples), and a peak threshold. This algorithm compares the signal at various time-points to iteratively eliminate false peaks, increasing the spacing from 1 to expected spacing between R-R peaks.
The previously detected peaks are then classified as either a QRS peak or a noise peak, depending on whether the signal is greater than a dynamically set threshold. The thresholds are real-time adjusted: a threshold in a given moment is based on the signal value of the previously detected QRS and noise peaks, accounting for changes in the noise level. After a valid QRS peak detection, there is an absolute refractory period of 200 ms.
For both EGM and ECG signals, the peak was not identified to be at the R-peak as desired, but rather at the end of the QRS complex. To compensate for this, the location of R-peak was identified by taking the location of maximum magnitude in a small window of 20 samples around the specified QRS peak. This allows for either positive or negative polarity peaks found in the atrial and ventricular lead electrograms.
This algorithm was evaluated with NSR, SVT, and VT samples. Because the peak detection algorithm relies on the expected spacing between peaks, the algorithm is highly sensitive to irregular R-R interval lengths, since if multiple events occur in a single window, they are suppressed. Therefore, the window-length parameter must be specified in a non-automated fashion.
Detection in ICDs
Dual-chamber implantable cardioverter defibrillators (ICDs) can utilize atrio-ventricular timing algorithms to discriminate between VT and SVT. These algorithms implement a series of rule-based discriminators to either apply or inhibit therapy. The detection algorithm for Boston Scientific consists of a series of rule-based discriminators analyzing ventricular and atrial rates as well as the morphology of individual event waveforms.
The morphology discriminator is one of the rule-based discriminators used for discrimination between SVT and VT. It compares the morphology of a single-event input waveform to a Normal Sinus Rhythm (NSR) template waveform. If the correlation between the waveforms is high, this indicates that the episode is more likely to be an SVT episode than a VT episode. The Medtronic morphology discriminator uses wavelet decomposition to return a correlation coefficient computed from the compared detail coefficients from decomposition. First, a template is generated from an input NSR episode. For the generation of the NSR beat template, an EGM containing at least 6 beats was input. A rolling window was passed over the input signal to isolate a certain number of beats, where each beat is matched to the current template (initially the first beat). If the average of the match ratios of the beats in the window is better than the existing match ratio, the template is replaced by the average of all beats in the window. Prior to matching, the beats are aligned by their R-peaks. To calculate the correlation, individual sensed events are input and matched to the template.
The algorithms were evaluated on a dataset of real electrogram episodes from the Ann Arbor Electrogram Libraries (AAEL) . Each episode is 5 seconds in duration and the episode consists only of events specified by the class label. To evaluate the performance of the Medtronic morphology discriminator on the dataset of real electrograms, the average Medtronic wavelet morphology correlation was computed for each episode in the dataset. Before running the discriminator on the episodes, each episode’s events were determined once using the standard BS/MEDsensing algorithm and once using the QRS detection algorithm to compare the performance of the two sensing methods. The AUROC was computed by varying the Medtronic morphology correlation threshold for SVT/VT classification.
I am still learning about ICD algorithms and how ICDs work, but this semester I was able to understand the basics and explore some of the existing approaches and evaluate potential new ones. Next, I will use the baseline algorithms discussed in this post to see how they perform with optimized parameters.
 Medical Computing Laboratory at the University of Michigan in Ann Arbor. Ann arbor electrogram libraries. Available from http://electrogram.com/index.html.
 Arthur J. Moss, Claudio Schuger, Christopher A. Beck, Mary W. Brown, David S. Cannom, James P. Daubert, N.A. Mark Estes, Henry Greenberg, W. Jackson Hall, David T. Huang, Josef Kautzner, Helmut Klein, Scott McNitt, Brian Olshansky, Morio Shoda, David Wilber, and Wojciech Zareba. Reduction in inappropriate therapy and mortality through icd programming. New England Journal of Medicine, 367(24):2275–2283, 2012. PMID: 23131066.
 J. Pan and W. J. Tompkins. A real-time qrs detection algorithm. IEEE Transactions on Biomedical Engineering, BME-32(3):230–236, 1985.