You are on page 1of 5

Analysis of diaphragm EMG signals: comparison of gating

vs. subtraction for removal of ECG contamination


A. BARTOLO, C. ROBERTS, R. R. DZWONCZYK, AND E. GOLDMAN
Biomedical Engineering Center, The Ohio State University, and Department of Anesthesiology,
The Ohio State University Hospitals, Columbus, Ohio 43210

Bartolo, A., C. Roberts, R. R. Dzwonczyk, and E. A major problem encountered in EMGdi analysis is
Goldman. Analysis of diaphragm EMG signals: comparison contamination by the electrocardiogram (ECG) signal.
of gating vs. subtraction for removal of ECG contamination. For EMGdi signals recorded by esophageal electrodes,
J. AppZ. PhysioZ. 80(6): 1898-1902, 1996.-The diaphragm this artifact has been shown to introduce a considerable
electromyogram (EMGdi) conveys information relating to the increase in the overall power content of the signal,
mechanisms of respiration; however, electrocardiogram (ECG) particularly at lower frequencies (9). The extent of the
contamination can compromise the accuracy of data derived
ECG distortion has not been studied in the case of
from this signal. We examine the EMGdi recorded from
anesthetized spontaneously breathing dogs via implanted EMGdi signals recorded through implanted electrodes.
electrodes to assess the extent of the error introduced by the Generally, the EMG-to-ECG power ratio is consider-
ECG contamination and the effectiveness of ECG gating in ably larger for these signals, and hence the ECG is
reducing this error. Because ECG subtraction has been shown expected to have a smaller effect on the EMG signal.
to generate accurate results for such applications, it is used as The two methods currently employed for the reduc-
the gold standard. Analysis of variance methods are employed tion of ECG contamination are the gating technique (9)
to compare results derived from the EMGdi data after ECG and the subtraction technique (1, 2, 6). The gating
subtraction with corresponding results derived from the technique involves the removal of sections of EMG
original data and from the data after ECG gating. Estimates overlying ECG waveforms. Analysis of the signal is
of EMGdi variables obtained by using subtraction and gating carried out under the assumption that the gated data
techniques were not significantly different, indicating that
gating can be employed on these signals to reduce ECG are redundant and the effect of their removal is elimi-
contamination without affecting the accuracy of the derived nated by averaging over a number of inspirations. The
data. Results also show that at EMG-to-ECG power ratios validity of this assumption has not been proven, and
X3.3 dB, ECG contamination does not significantly affect hence it is not known whether the technique produces
estimates of the EMGdi variables. accurate results despite its widespread use. The subtrac-
tion technique involves the subtraction of an ECG
digital signal processing; signal analysis; artifact removal;
respiratory electromyogram; implanted electrodes; electrocar- template from the EMGdi signal at each occurrence of
diogram an ECG waveform. This method is more difficult to
implement and requires more computation than the
gating technique; however, it has the advantage of
conserving the EMGdi signal underlying the ECG
THE DIAPHRAGM ELECTROMYOGRAM (EMGdi)can convey waveform. The subtraction technique has been shown
useful information regarding the mechanisms of respi- to effectively reduce the ECG contamination to nonsig-
ration, and it is commonly measured in studies involv- nificant levels; hence, it enables the derivation of
ing diaphragm function and control. Changes in ampli- accurate results from the EMGdi signal (1).
tude of the EMGdi give a good indication of the In this study, we use the subtraction technique as the
corresponding variations in diaphragm activity (3, 7), gold standard and compare the results derived by using
whereas shifts in the frequency content of the signal this technique with the corresponding results derived
convey information about changes in motoneuron re- from the original signals and those obtained by using
cruitment patterns (5,9). Analysis of the EMGdi signal the gating technique. The comparison of the subtracted
generally involves the assessment of changes in EMG- data with the original data assessesthe extent of the
derived variables either between inspirations (inter- errors introduced by the ECG contamination, whereas
breath) or within single inspirations (within-breath). the comparison of the subtracted data with the gated
In the case of interbreath analysis, the values of one or data tests the validity of the gating technique as an
more variables calculated from whole inspirations are accurate method of ECG removal.
used to quantify changes in the EMGdi signal. For
within-breath analysis, several estimates of each vari- METHODS
able are calculated during progression within a single
Signal collection and processing. EMGdi signals were
inspiration, and the resultant within-breath variations
collected from four mongrel dogs of 18-25 kg body wt
under different experimental conditions are compared. undergoing an experimental protocol at Notre Dame Hospi-
In both cases, values averaged over a number of tal, University of Montreal, Canada. Surgical anesthesia was
consecutive inspirations are often used to compensate induced intravenously by ketamine at the start of the experi-
for the variability between successive inspiratory sig- ment and supplemented throughout with small doses to just
nals. maintain the cornea1 reflex. Bipolar silver-coated hook elec-

1898 0161-7567/96 $5.00 Copyright o 1996 the American Physiological Society

Downloaded from www.physiology.org/journal/jappl by ${individualUser.givenNames} ${individualUser.surname} (128.252.067.066) on August 8, 2018.


Copyright © 1996 American Physiological Society. All rights reserved.
GATING VS. SUBTRACTION FOR REMOVAL OF ECG CONTAMINATION 1899

trodes were attached to crural muscle fibers on the abdominal


surface of the diaphragm via a midline abdominal incision.
EMGdi recordings were made during spontaneous breathing
before and during the infusion of the neuromuscular blocking
agent atracurium and during a rebreathing period. The
signals were stored on an 8-channel FM recorder, then played
back through an anti-aliasing filter, and digitized. Sequences
of the digitized signals corresponding to between 16 and 50
respiratory cycles were selected and saved on disk. The
recorded data files were later transformed into binary format
for interpretation by the signal-processing software, which
was written and executed on an IBM-compatible 80486 PC by
using a commercial software-development package (ASYST,
version 4.0, Keithley Instruments, Taunton, MA).
The data used in the study consist of a sequence of the
EMGdi signal from each animal. The four sequences were
selected to represent a wide range of EMG-to-ECG power
ratios extending from -2.75 dB to 13.3 dB. Sections from
each sequence are shown in Fig. 1. Sixteen consecutive
inspiratory sections were selected from each sequence, and
the subtraction and gating techniques were applied to each
section to reduce the ECG contamination (Fig. 2). A detailed
description of the algorithm for the subtraction technique is Fig. 2. A typical inspiratory section from data sequence I. A: original
given in Bartolo et al. (1). In short, the procedure involves 1) version; B: subtracted version; C gated version.
creation of an ECG template by averaging a number of QRS
complexes occurring during expiration; 2) alignment of the
template to each QRS complex occurring during the inspira- versions of the signals. The following are the EMG variables
tory section; and 3) point-by-point subtraction of the ECG and their definitions.
template from the EMGdi signal at each position of alignment Mean rectified EMG (mrEMG) is the mean amplitude of
(Fig. 2B). A similar procedure was adopted for the gating the rectified EMGdi section x(i) of length 2v (3)
technique, except that in step 3 the part of the signal underly-
ing the ECG template was substituted by zeroes (Fig. 2C).
SignaZ analysis. Both interbreath and within-breath analy- mrEMG = (1)
ses were performed to compare estimates of six EMG vari-
ables calculated from the original, subtracted, and gated Normalized power (nPWR) is the mean power calculated
from the power spectrum P( f > between the low- and high-
frequency limits (fL and fH) (9), normalized by the section
length 2v

1 1
nPwR = iv fH - fL 2 l I
fXfL p
cf> (2)
I I
I I Zero-crossing frequency (ZC) (4) is defined as

zc = - 1 (no. of times signal crosses 0 level) (3)


2N
I
I I
Median frequency (MF) is the frequency that divides P( f>
into two halves of equal area (4), such that

I 5 P(f)= 5 P(f) (4)


I f=MF
I ’ I I f =flJ

Mean power frequency (MPF) is calculated as the ratio of


the first spectral moment of P( f > to the 0th spectral moment
(4), also called the centroid frequency (9)

Fig. 1. Typical diaphragm electromyogram (EMGdi) waveforms from


each of 4 data sequences in the study. Inspiratory part of each breath MPF = (5)
is characterized by a high-amplitude EMGdi signal attributed to
active contraction of diaphragm, whereas passive elongation of
muscle during expiration results in a signal of much lower amplitude
consisting almost entirely of background noise. ECG waveforms may
be observed periodically throughout entire section. PR, EMG-to-ECG Expected zero-crossing frequency (E [ZC]), calculated as the
power ratio. square root of the ratio of the second spectral moment of P( f )

Downloaded from www.physiology.org/journal/jappl by ${individualUser.givenNames} ${individualUser.surname} (128.252.067.066) on August 8, 2018.


Copyright © 1996 American Physiological Society. All rights reserved.
1900 GATING VS. SUBTRACTION FOR REMOVAL OF ECG CONTAMINATION

to the 0th spectral moment (4) estimated from each window. Finally, the mean values of the
. . variables for each group of eight sections were calculated by
averaging the estimates from corresponding windows in the
%f’.P(f)lia group.
E[ZC] = ““, 6) Analysis of variance and the Tukey pairwise comparison
were used to compare the results obtained from correspond-
CP(f) ing original, subtracted, and gated sections for each of the
. f=fL
four data sequences. Statistical analyses were performed on a
In the case of interbreath analysis, the sections were VAX Station 4000-60 using SAS (version 6.08, SAS Institute,
preprocessed according to the following procedure. For the Cary, NC), and statistical significance was considered at P <
gated version, the zeroed out parts of the section were 0.05 throughout.
removed, making these sections shorter than the correspond-
ing original and subtracted versions. Each section was band- RESULTS
pass filtered to reduce low-frequency motion artifact and Interbreath analysis. The results from the inter-
high-frequency noise. The length 2v of the section was deter-
mined, and the data were zero padded to 1,024 points. The breath analysis are shown in Fig. 3. For all six vari-
fast Fourier transform and P(f) were computed after applica- ables, the statistical analyses indicate that in the case
tion of a Hanning window. fL was set at 20 Hz, and fH was of the data sequences I, II, and III, as well as for the
chosen so that the bandwidth between fL and fH contained combined data, there are no significant differences
95% of the total power between 20 and 475 Hz. This method between the subtracted and gated versions, whereas
enabled the exclusion of the upper band of frequencies at both versions are significantly different from the origi-
which the signal power level is comparably very low (8). nal version. In the case of data sequence IV, the means
Finally, estimates of the EMG variables were calculated from for the three versions are similar, and there are no
each inspiratory section. significant differences between them.
For the within-breath analysis, the sixteen inspiratory Within-breath analysis. The results from the within-
sections from each data sequence were split into two groups of
eight sections. Each section was partitioned into six windows breath analysis are shown in Fig. 4. The statistical
of equal length with 10% overlap between consecutive sec- analyses for the combined data indicate that for all six
tions. In the case of the gated sections, windows that had variables there are no significant differences between
>35% of the window length zeroed out were discarded. The the subtracted and gated versions while both versions
windows were preprocessed by using the same method as for are significantly different from the original data. The
the interbreath analysis, and the six EMG variables were same trend may be observed for data sequencesI, II and

200
200
180

G ‘N‘
3 180 +
3 160 TT
k a 160
140
c s
120 140

100
CD I II III N CD CD
DATA SEQUENCE DATA SEQUENCE DATA SEQUENCE

220

200

180

160
0 0.8
140
c
w
120
g 0.6
100
N CD
DATA SEQUENCE DATA SEQUENCE DATA SEQUENCE
Fig. 3. Results from interbreath analysis. Bars for data sequences I-IV represent means and SD values, whereas
bars for combined data (CD) represent average of means and SDS from 4 corresponding data sequences. MF, median
frequency; MPF, mean power frequency; E [ZC], expected zero-crossing frequency; nPWR, normalized power;
mrEMG, mean rectified EMG; ZC, zero-crossing frequency. Open bars, original technique; closed bars, subtracted
technique; hatched bars, gated technique. +, Original significantly different from subtracted and gated (P < 0.05).

Downloaded from www.physiology.org/journal/jappl by ${individualUser.givenNames} ${individualUser.surname} (128.252.067.066) on August 8, 2018.


Copyright © 1996 American Physiological Society. All rights reserved.
GATING VS. SUBTRACTION FOR REMOVAL OF ECG CONTAMINATION 1901

53
X 180

R 160
w
140

CD II Ill N CD I II III IV CD
DATA SEQUENCE DATA SEQUENCE DATA SEQUENCE

‘+
/IT G’
s
180

160
8
140

100 l-
III N CD N CD I II III N CD
DATA SEQUENCE DATA SEQUENCE DATA SEQUENCE
Fig. 4. Results from within-breath analysis. Bars for data sequences 1-N represent average of means and SDS for
each of 6 corresponding data windows. Bars for CD represent average of values from 4 individual data sequences.
Open bars, original technique; closed bars, subtracted technique; hatched bars, gated technique. +, Original
significantly different from subtracted and gated (P < 0.05).

III, with the differences between the original version reduction of ECG contamination is not necessary. The
and the other two versions attaining significant levels finding suggests that by careful selection of the position
in all cases except for nPWR in data sequence II. In the and orientation of the recording electrodes it may be
case of data sequence IV, there are no significant possible to record EMGdi signals that are relatively
differences among the three versions. free of ECG contamination. This would avoid the need
Both the interbreath and within-breath results show to employ an ECG reduction technique and would make
that subtraction and gating cause an increase in value the analysis of the EMGdi signal more straightforward.
of the four frequency variables and a decrease in value The statistical comparison between the subtracted
of nPWR and mrEMG for all data sequences except and gated data for sequences I, II, and III showed that
data sequence ZV, in which case they introduce no there were no significant differences between the corre-
significant change. sponding estimates of the EMG variables in the case of
DISCUSSION AND CONCLUSIONS both the interbreath and the within-breath analyses.
This means that gating is as effective as subtraction in
The statistical comparison between the subtracted reducing errors caused by the ECG contamination to
and original data for sequences 1, 11, and III showed nonsignificant levels. Because the gating technique
significant differences between corresponding esti- involves a simpler algorithm, it will thus probably
mates of the EMG variables for both the interbreath remain the method of choice for ECG reduction in most
and within-breath analyses. This demonstrates that at
cases. The subtraction technique may still be useful for
levels of EMG-to-ECG power ratio in the region of 5 dB
cases where the information lost in the gated portions
and less the ECG introduces significant errors in
EMGdi signals recorded through implanted electrodes. is not recoverable by averaging. Examples include
A method of reducing the ECG contamination is there- signals in which the interbreath EMG characteristics
fore necessary to obtain accurate estimates of the EMG are varying rapidly, making it undesirable to average
variables at these power ratios. over successive inspirations, and signals with short
This conclusion does not apply to data sequence IV, intervals between successive QRS complexes, in which
since in this case there were no statistical differences case the EMGdi data left after gating may not be
between the values obtained from the subtracted and enough to allow for accurate analysis. The subtraction
original versions. This implies that at levels of EMG-to- technique is also more suitable to examine trends
ECG power ratio around 13.3 dB the ECG contamina- within single inspirations, since it conserves the whole
tion is too low to introduce significant errors, and EMG signal for analysis after ECG reduction.

Downloaded from www.physiology.org/journal/jappl by ${individualUser.givenNames} ${individualUser.surname} (128.252.067.066) on August 8, 2018.


Copyright © 1996 American Physiological Society. All rights reserved.
1902 GATING VS. SUBTRACTION FOR REMOVAL OF ECG CONTAMINATION

The observed increase in value of the frequency ables. This is because variations in the diaphragm
variables and the decrease in nPWR and mrEMG after length during respiration result in changes in the
aPPl ication of either of the ECG reduction techniques interelectrode distance that alter the input characteris-
are expected and are in accordance with previous tics of the electrode (8). This occurrence should not
findings for esophageal EMGdi signals (6, 9). Because affect the results of this study, because we do not look at
the frequency distribution of the ECG waveform is shifts in the absolute value of the EMG variables as a
concentrated in the lower frequencies, mostly ~100 Hz result of some exogenous factor. Rather, we compare
(9), removal of the ECG contamination causes a reduc- values of the EMG variables derived from the original,
tion of the overall power content of the signal, mainly at subtracted, and gated versions of the same EMGdi
the lower frequencies. This results in the observed sequences. Any inaccuracy introduced by the electrodes
changes in the estimates of the EMG variables. is present in all three versions and does not affect the
It may be noted from Eqs. 1 and 2 that both mrEMG accuracy of the comparison. The results from this study
and nPWR are normalized to compensate for the shorter may thus be applied for any EMGdi signal recorded via
window lengths of the gated sections relative to the implanted electrodes, irrespective of the type of elec-
corresponding original and subtracted sections. There trode used.
is an important distinction between the unnormalized
power, which is more commonly used (1,6,8,9) and is a Address for reprint requests: C. Roberts, Biomedical Engineering
measure of the total power content of the inspiratory Center, 270 Bevis Hall, 1080 Carmack Road, Columbus, OH 43210.
Email: roberts@bmel.bme.ohio-state.edu.
EMG signal irrespective of its duration, and nPWR,
which is a measure of the average power content of the Received 4 October 1995; accepted in final form 10 January 1996.
inspiratory section. Statistical analyses showed that
the values of power calculated from gated sections were REFERENCES
generally significantly lower than the corresponding 1. Bartolo, A., R. R. Dzwonczyk, C. Roberts, and E. Goldman.
values from subtracted sections. This implies that Description and validation of a technique for the removal of ECG
power estimates calculated from gated data may be contamination from the diaphragmatic EMG signal. Med. BioZ.
Eng. Comput. 34: 76-81,1996.
inaccurate, and the use of this variable with gated data 2. Bloch, R. Subtraction of electrocardiographic signal from respira-
should be avoided. tory electromyogram. J. Appl. Physiol. 55: 619-623, 1983.
The procedure used in this study to determine the 3. Evanich, M. J., E. Bruce, F. L. Eldridge, M. Goldman,
position of successive ECG waveforms involves cross- M. Lopata, R. V. Lourenco, J. Mead, L. D. Partridge, and J. T.
correlation of an ECG template with the recorded EMG Sharp. Workshop on assessment of respiratory control in hu-
mans. II. Measurement of the electrical activity in respiratory
signal (1). This is different from the method generally muscles.Am. Rev. Respir. Dis. 115: 541-544,1977.
used with gating, which involves detection of the peaks 4. Hligg, G. M. Comparison of different estimators of electromyo-
of the R waves from an independent ECG recording or graphic spectral shifts during work when applied on short test
from the recorded EMGdi signal itself. This method contractions. Med. BioZ. Eng. Comput. 29: 511-516, 1991.
may introduce an offset of a few data points in the 5. Hiigg, G. M. Interpretation of EMG spectral alterations and
alteration indexes at sustained contraction. J. AppZ. Physiol. 73:
position of the waveform, resulting in substantial er- 1211-1217,1992.
rors during template subtraction. Hence it is not accu- 6. Levine, S., J. Gillen, P. Weiser, M. Gillen, and E. Kwatny.
rate enough for purposes of the subtraction technique. Description and validation of an ECG removal procedure for
In the case of gating, the precise location the ECG EMGdi power spectrum analysis. J. AppZ. Physiol. 60: 1073- 1081,
waveforms is not as crucial and requires only that the 1986.
7. Lynne-Davies, P. Diaphragmatic electromyographic studies: the
portion of the signal gated out includes the ECG application of frequency domain and time domain analysis. Am.
waveform. The results from the study can therefore be Rev. Respir. Dis. 119: 169-173,1979.
applied to any gated data as long as the gating tech- 8. Petrozzino, J. J., A. T. Scardella, J. K.-J. Li, N. Krawciw,
nique used satisfies this condition. N. H. Edelman, and T. V. Santiago. Effect of naloxone on
spectral shifts of the diaphragm EMG during inspiratory loading.
A final consideration involves the type of electrodes
J. AppZ. PhysioZ. 68: 1376-1385,199O.
used in the study and their possible impact on the 9. Schweitzer, T. W., J. W. Fitzgerald, J. A. Bowden, and
results. Bipolar hook electrodes are suboptimal for P. Lynne-Davies. Spectral analysis of human inspiratory dia-
studies involving absolute values of certain EMG vari- phragmatic electromyograms. J. AppZ. Physiol. 46: 152-165,1979.

Downloaded from www.physiology.org/journal/jappl by ${individualUser.givenNames} ${individualUser.surname} (128.252.067.066) on August 8, 2018.


Copyright © 1996 American Physiological Society. All rights reserved.

You might also like