1526 IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 49, NO. 12, DECEMBER 2002
Automated Detection and Elimination of
Periodic ECG Artifacts in EEG Using
the Energy Interval Histogram Method
Hae-Jeong Park , Do-Un Jeong, and Kwang-Suk Park, Member, IEEE
Abstract—An automatedmethod for electrocardiogram (ECG)-
artifact detection and elimination is proposed for application to
a single-channel electroencephalogram (EEG) without a separate
ECG channel for reference. The method is based on three char-
acteristics of ECG artifacts: the spike-like property, the period-
icity and the lack of correlation with the EEG. The method in-
volves a two-step process: ECG artifact detection using the energy
interval histogram (EIH) method and ECG artifact elimination
using a modification of ensemble average subtraction. We applied
a smoothed nonlinear energy operator to the contaminated EEG,
which significantly emphasized the ECG artifacts compared with
the background EEG. The EIH method was initially proposed to
estimate the rate of false positives (FPs) and false negatives (FNs)
that were necessary to determine the optimal threshold for the de-
tection of the ECG artifact. As a postprocessing step, we used two
types of threshold adjusting algorithms that were based on the pe-
riodicity of the ECG R-peaks. The technique was applied to four
whole-night sleep EEG recordings from four subjects with severe
obstructive sleep apnea syndrome, from which a total of 132878
heartbeats were monitored over 31.8 h. We found that ECG arti-
facts were successfully detected and eliminated with FP
0.074 for the epochs where the elimination process is
Index Terms—Electrocardiogram (ECG) artifacts, energy
interval histogram, ensemble average subtraction, nonlinear
HE need for ambulatory electroencephalographic moni-
toring has increased in both clinical practice and research,
in areas such as sleep/wake state or epilepsy monitoring , .
However, long-term recordings are vulnerable to various arti-
facts. In particular, cardiac activity may have pronounced ef-
fects on the electroencephalogram (EEG) because of its rela-
tively high electrical energy, especially upon the noncephalic
reference recordings of EEG.
Manuscript received March 20, 2001; revised July 2, 2002. This work was
the result of research activity of the Advanced Biometric Research Center sup-
ported by the Korea Science and Engineering Foundation. Asterisk indicates
H.-J. Park was with the Advanced Biometric Research Center, Seoul Na-
tional University College of Medicine, Seoul, Korea. He is now with the De-
partment of Psychiatry, Harvard Medical School, Boston, MA 02115 USA.
D.-U. Jeong is with the Department of Psychiatry, Seoul National University
College of Medicine and the Clinical Research Institute, Seoul National Uni-
versity Hospital, Seoul 110-744, Korea.
K.-S. Park is with the Department of Biomedical Engineering, Seoul
National University College of Medicine, Seoul 110-744, Korea (e-mail:
Digital Object Identifier 10.1109/TBME.2002.805482
Algorithms have been proposed to eliminate electrocardio-
gram (ECG) artifacts from the EEG. Nakamura and Shibasaki
 proposed an ECG artifact elimination algorithm, which we
call the ensemble average subtraction (EAS) method, whereby
ECG-contaminated EEG series are synchronously segmented
with respect to the timing of consecutive ECG R-peaks. By
subtracting the ensemble average across EEG segments from
the contaminated EEG, the algorithm eliminates ECG artifacts.
EAS is based on the strict assumptions of homogeneity across
segments and Gaussian property of the EEG , .
Using a different concept, the independent component anal-
ysis (ICA) method was also applied to eliminate ECG artifacts
using multichannel signals . Previously, we adopted adaptive
noise canceling theory  to eliminate such ECG artifacts using
a reference ECG channel .
It should be noted that these algorithms use consecutive
R-waves in a separate ECG channel as a reference, and there-
fore, cannot be applied when an ECG channel is not available.
Several ambulatory monitoring systems used for studying
sleep/wake states do not record ECG waveforms. Ambulatory
sleep/wake recordings use a reduced number of essential
channels, compared with the laboratory polysomnographic
units. EEG, electrooculogram (EOG), and chin electromyo-
gram (EMG) are necessary to assess the brain state, and nasal
airflow, respiratory effort, oxygen saturation, and heart rate
to monitor respiration and circulation. Recording heart rate is
frequently preferred to recording the ECG waveform in order
to reduce the data size when the ECG waveform is not a main
concern. Therefore, a new method of eliminating ECG artifacts
from the EEG is required when an ECG channel is unavailable.
In this paper, we propose an automated method for detecting
ECG artifacts in a single-channel EEG, and a method for elim-
ATERIALS AND METHODS
The proposed method for elimination of ECG artifacts in-
volves a two-step process: 1) ECG artifact detection using the
energy interval histogram (EIH) method, and 2) ECG artifact
elimination using a modification of the EAS method. In this
paper, we will focus primarily on the ECG artifact detection
method and then briefly deal with ECG artifact elimination.
A. Detection Procedure: Energy Interval Histogram Method
The smoothednonlinear energyoperator (SNEO) was used to
emphasize the ECG R-waves that corrupt the pure EEG signals,
0018-9294/02$17.00 © 2002 IEEE
PARK et al.: AUTOMATED DETECTION AND ELIMINATION OF PERIODIC ECG ARTIFACTS 1527
and the EIH technique was developed to estimate the optimal
threshold using threshold-adjusting algorithms.
Step 1: Emphasizing the ECG Artifacts Using SNEO: The
SNEO , which uses the Teager–Kaiser Energy Operator
–, is regarded as an efficient tool for detecting spike-like
signals because of its sensitivity to instantaneous changes in
For a discrete-time series, the nonlinear energy operator
and SNEO can be defined as follows :
is the convolution operator and is a smoothing
window function. SNEO is dependent on the square of both the
amplitude and the frequency of the signal, and shows high en-
ergy for a high-frequency spike. For a linear combination of
and spike artifact , i.e., ,
and are uncorrelated, the expected energy applying
is expressed by (3) (for detailed derivation, refer to
For spike-dominant positions,
while for nonspike positions, ,
. Using this property of SNEO, the problem
of detecting an ECG spike in the presence of the EEG back-
ground is reduced to finding an appropriate threshold
separates the spike regions from background signal regions by
Mukhopadhyay and Ray , defined the threshold of SNEO
as the mean energy multiplied by a scaling factor
The scaling factor
is initially determined by experiment
and used as a constant thereafter. This threshold method cannot
be adapted to nonstationary situationswhere the spike energy of
the ECG artifacts in the EEG is variable and no precise knowl-
edge is available on the energy distributions of the spikes and
the background activities. Therefore, we developed a new auto-
mated threshold-selection and threshold-adjusting algorithm, as
described in the following steps.
Step 2: EIH for Estimating the Optimal Threshold: For de-
tection problems in general, the optimal threshold is determined
to minimize false negatives (FNs) while maintaining false pos-
itives (FPs) within a reasonably low limit . In the present
application, FPs are more crucial than FNs, because the subse-
quent EAS procedure can be severely disrupted by false alarms.
Therefore, an optimal threshold should be chosen to minimize
FPs at a reasonable FN level. However, it is not easy to derive
the FP and FN rates and the corresponding optimal threshold
mathematically, because we have no exact knowledge on the a
priori probability density functions of the EEG and ECG arti-
fact energy. Therefore, we used a heuristic approach to estimate
FP and FN rates.
After detecting peaks from the smoothed signal energy (
we applied a series of thresholds (
) to these peaks (denoted as
Fig. 1. An illustration of energy intervals. Intervals between peaks were
calculated from the instantaneous energy distribution
emphasized using the SNEO of contaminated EEG (upper figure). The circle
) in the upper figure and square marks ( ) in the lower figure indicate
the real R-peak positions on the ECG. Only peaks above the threshold
used for interval calculation. Neighboring peak intervals h3 and h4 fall within
normal heart beat interval range
while h1, h2 fall within half the normal
heart beat interval range
, and h5 falls within twice the normal heart
beat interval range
at a threshold .
), whereby was varied from the maximal value of
to its minimal value. Only the peaks higher than the resulting
threshold value of
were used to calculate a histogram of peak
intervals. We called this histogram the EIH and have denoted
, i.e., as a function of the threshold . An example
of energy intervals is illustrated in Fig. 1, where an ECG-con-
taminated EEG and its SNEO energy are also displayed. The
energy peaks above the threshold
form a series of intervals
Histogram bins of
were divided into three ranges:
normal heart beat interval range
, twice the normal heart
beat interval range
, and half the normal heart beat
. These ranges are defined with respect
to the expected normal heart beat range
In case of multiepoch signals,
was initially given with
an arbitrary normal range value for the first epoch and was esti-
mated for subsequent epochs by the mean heart beat interval of
the previous epochs.
In Fig. 1, the intervals h3 and h4 fall within
h1 and h2 fall within
, and h5 falls within , at the
The numbers of intervals that fall into the aforementioned
, ,and .
At a high value of
, most intervals of the peaks fall in .
decreases, the intervals fall more into and
increases while decreases. As is reduced further
toward the minimal value, most intervals fall within
is maximized. For practical purposes, we counted
the number of intervals directly within the three ranges of (5)
instead of calculating the intervals in smaller-sized bins. Fig. 2
illustrates the course of EIH according to the threshold, at (a)
1528 IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 49, NO. 12, DECEMBER 2002
Fig. 2. An illustration of the energy intervalhistogram according to the
, (b) , (c) , and
. As the threshold decreases, increases while
decreases. At , the relative number of intervals within is the
same as that within
, i.e., .
is the threshold that maximizes , i.e., divided by the
total number of intervals.
, (b) , (c) , and
. In this figure,
The relative histograms
, , and
indicate the ratios of , ,
with respect to the number of total inter-
vals within all three intervals of (5), which is denoted by
is highly correlated with the number of missed peaks (an
estimate of FN, abbreviated as eFN) and
correlated with the number of false alarms (an estimate of FP,
implies true positives (eTP). Using the
estimated values for
, , and ,
we considered four criteria for selecting the optimal threshold
represents the threshold at which the false alarm
rate eFP and the miss rate eFN have the same value.
is a threshold chosen to minimize eFP while maintaining eFN
within a reasonable limit
(0.1 in this study).
is the threshold that maximizes the eTP. Fig. 3 shows the EIH
function derived using the procedures previously described
and shows the relative number of intervals according to the
Step 3: Postprocessing of Detection: STEP 3-1: Reducing
false alarms using the next-spike selection algorithm.
Since random high-frequency noise frequently disturbed the
detection of periodicECG spikes, we reducedthese false alarms
using the nonperiodic characteristics of random noise. When
multiple peaks were detected within 1.5 times the mean heart-
Fig. 3. A relative energy interval histogram
as a function of threshold
. are functions of the relative number of intervals that fall within
predetermined ranges at the threshold
. The dark solid line is
the dash-dotted line is
, and the dashed line is . These
functions were derived by normalizing
, , and
with respect to .
beat interval from the reference spike, the most
likely position of the following spike was considered to be the
position delayed by
from the reference spike, due to the
periodic characteristic of ECG spike trains. The peak nearest
the expected position was selected as a new reference. With the
exception of this selected peak, other peaks within
of the reference peak were regarded as false alarms. When no
spikes were found within
from the reference, a new
reference was selected using an interval mask ranging from two
afterthe current peakwith amask gapof
as follows: , .By
shiftingthis maskto consecutive peaksand countingthe number
of peaks that fall within the mask, the peak with the highest co-
incident number was selected as a new reference on theassump-
tion of periodicity.
Fig.4 illustratesthis procedure.Thepeaks detectedby thresh-
olding are marked with plus signs (
). Within from
, the most likely ECG-peak position is
represented by the peak that is closest to the expected peak po-
. In Fig. 4, shows the nearest
and is selected as a new spike
. can be calculated using the same
procedure with the reference being
STEP 3-2: Reducing misses using the threshold-adjusting
In order to redetect missed spikes, we applied a threshold-ad-
justing technique around the expected spike regions with a
threshold window. This window has a triangular shape with
a minimal peak value equal to a constant multiplied by the
PARK et al.: AUTOMATED DETECTION AND ELIMINATION OF PERIODIC ECG ARTIFACTS 1529
Fig. 4. An illustration of the next-spike selection algorithm. In the energy plot
of ECG-contaminated EEG, all intervals from the reference
( , , , and ) are displayed with arrows. The plus ( )
and circle (
) signed peaks are spike candidates higher than the threshold; the
circles indicate true spikes. Within
from the reference ,
the most probable position is the peak nearest the expected peak position,
. Of the intervals, the peak delayed by
the expected heart beat peak and is regarded as a new spike.
considered to be false alarms and rejected. The peak located at
will be recalculated with a new reference and will be rejected as a
Fig.5. The threshold-adjustingalgorithm.Whenaspike ismissed, a triangular
window with a minimum of
at the mid-way position between spikes is
applied in an effort to redetect the missed spike. The square marks (
peaks detected by the thresholding method initially, while the circle mark (
indicates a missed spike, to be re-detected by lowering the threshold.
threshold in the expected region. This is shown in
STEP 3-3: Reducing false alarms by removing points neigh-
boring the expected beats.
During STEP 3-2, a lowered threshold may cause the re-de-
tection of artifacts and increase the number of FPs. Therefore,
re-application ofSTEP 3-1 is requiredto reduce these extra FPs.
Fig. 6is an illustrationof the resultof each detectionstep, and
was obtained by plotting heart beat intervals versus the detected
heartbeats. Beat intervals much shorter than the mean beat in-
can be regarded as false alarms while beat inter-
vals two or three times longer than
can be regarded as
indicating misses. After thresholding spike energies in STEP 2,
in this example [Fig. 6(a)]. The first postprocessing step STEP
3-1 removed the false alarms of STEP 2 using the next-spike
selection algorithm [Fig. 6(b)]. STEP 3-2 redetected the misses
using the threshold-adjusting algorithm [Fig. 6(c)], using a tri-
Fig. 6. Results at four detection steps. The estimated beats and the intervals
between neighboring beats are plotted on the
and axes, respectively. (a)
Shows peaks thresholded by an optimal threshold which is derived from EIH
in STEP 2. (b) Shows the resultant peaks after application of the next-spike
selection algorithm, which reduced false alarms in STEP 3-1. (c) Result of the
threshold-adjusting algorithm for reducing misses in STEP 3-2. The final result
of STEP 3-3, in which the (d) next-spike selection algorithm reduces the false
alarms caused by STEP 3-2.
angle-weighted threshold window when the heart beat intervals
were longerthantwo orthree times
.STEP 3-3 reducedthe
false alarms generated by STEP 3-2 to give a final FP of 0.006
and a final FN of 0.006 [Fig. 6(d)].
B. Elimination of ECG Artifacts: EAS
We adopted EAS  with a small modification. For ECG-
, where is the
original EEG and
is the ECG spike, the R-peaks of the
reference ECG can be used as triggering points for averaging.
All EEG signals were segmented onto the time range between
200 ms prior to the current triggering point and 200 ms prior
to the next triggering point. By averaging these segments, an
estimate of the ECG artifact waveform can be derived by the
is the number of the segments and denotes the seg-
ment index. On the assumption that the EEG has a zero-mean
Gaussian distribution, the first term of the equation can be re-
duced tozero, leavingonly thesecond term.The remainder [i.e.,
] is an ensemble average and indi-
cates an estimation of the ECG artifact. By subtracting this en-
semble average from the contaminated EEG
, the original
can be estimated using
.Forthe nonstationarycasewhen theECG waveformvaries
with time or there are multiepoch events, the previously cal-
culated ECG ensemble average can be added, with a weight
, in a new averaging process as shown by the following
1530 IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 49, NO. 12, DECEMBER 2002
Fig. 7. Detection and elimination of simulated ECG-artifacts.
Thisensemble averageacross EEGsegmentsiscomputed, as-
suming that only ECG artifacts and no true cerebral activity are
time-locked to the R-wave in the recorded EEG. In this paper,
the bias errors between the exact spike peaks and the detected
peaks cannot be disregarded, and therefore, the EAS algorithm
ofNakamuraand Shibasakiabovewasmodified. Beforesub-
tracting the averaged ECG component from the EEG, we re-
aligned the averaged ECG artifact segment to the real EEG seg-
ment with a time delay. The time delay
was derived to make
the cross-correlation between both segments maximal and can
be described as follows:
is the length of the averaged ECG waveform and is
the maximum time shift around the peak. The resultant EEG is
Fig. 7 illustrates the complete process used for ECG artifact
detection and elimination in the simulated signals. Artifact-free
EEG signals [Fig. 7(a)] and the time-synchronized ECG arti-
facts [Fig. 7(b)] were added to generate the simulated EEG
ECG [Fig. 7(c)]. Fig. 7(d) shows the energy of the EEG ECG
derived from the SNEO. The estimated EEG (eEEG) using our
algorithm is shown in Fig. 7(e). Fig. 7(f) shows the estimated
ECG artifacts derived by subtracting the eEEG from the simu-
ECG (top) and the difference between the original
EEG and estimated EEG (bottom).
VALUATIONS AND RESULTS
A. Evaluation Sets
In order to evaluate the performance of the artifact detection
and eliminationalgorithm, we acquired six8-h EEGs (C3-A2 or
O2-A1) during sleep from one normal subject and five subjects
with obstructive sleep apnea syndrome (OSAS). One OSAS
recording was used for determining the optimal detection pa-
rameters, one normal recording was used for evaluating ECG
elimination performance, and the other four recordings were
used for evaluating the overall performance of our method.
All recordings of the OSAS subjects contained ECG artifacts
in the EEG, but no ECG artifacts were present in the normal
recording. In all cases, the ECG was recorded simultaneously
with the EEG, as a reference. Both ECG and EEG signals were
sampled at a frequency of 250 Hz. R-peaks of the reference
ECG, detected using a general R-peak detection algorithm 
were used as a target for evaluating the detection performance.
B. Performance Indexes
Spike-to-Background Signal Energy Ratio (SBR): SBR was
defined to be a function of mean spike energy normalized with
respect to the background signal energy. In practice, we defined
SBR as the ratio of the mean energy of the spike region to that
of the background signal as follows:
PARK et al.: AUTOMATED DETECTION AND ELIMINATION OF PERIODIC ECG ARTIFACTS 1531
Fig. 8. Detection performance versus SBR in OSAS recordings (total 3814 epochs and 132 878 heartbeats during 3814 30 s). (a) Illustrates mean FP and FN
in the epochs of the given SBR. (b) Mean FP and FN in the epochs having higher SBR than the given SBR. (c) Relative number of epochs having higher SBR than
the given SBR. SBRs higher than 20, whereby FP and FN reached 0.02 and 0.1, accounted for 60% of the total epochs.
where and indicate the instantaneous
signal energy of the spike region and of the nonspike region
th segment, with segment sizes of and ,
respectively. Each segment is composed of samples located
around the R-peak and
is the number of total segments in
FN Ratio : FN was defined as the ratio of the number of
missed spikes to the number of actual spikes.
FP Ratio: FP was defined as the ratio of the number of false
alarm spikes to the number of actual spikes.
In the cases of both FP and FN, the R-peaks of the ECG ref-
erence were regarded as actual spikes.
C. Performance Evaluation
Bartlett, Hamming, and rectangular windows were tested as
a smoothing window for the SNEO, and a rectangular window
of length of seven samples was found to produce the best results
in emphasizing spike-to-signal ratio maximally.
The Detection Performance According to Detection
Steps: We optimized the detection parameters by applying the
current method toECG-contaminated EEG samples (1068 heart
beats with mean heart rate 71.2 beats/min within a duration
of 15 min) derived from the EEG recording of one OSAS
subject, including sleep stage 1, stage 2, REM, and wakefulness
state. In order to evaluate the validity of threshold selection
by EIH at STEP2, we compared the estimated thresholds
, , and ) with an exper-
imentally determined optimal threshold, which was chosen
to minimize FP and FN using real ECG R-peak references.
The FP and FN of the ECG-referenced results were 0.08 and
0.09, respectively, and these values were equal to the maximal
performance that can be achieved by the thresholding method.
The high correlation
between the ECG-referenced,
the experimental optimal threshold and one type of estimated
derived by EIH supported the use of
EIH for estimating the optimal threshold.
Though FP and FN at STEP2 were dependent on the
threshold type, no significant differences were evident after
postprocessing. We selected
as an optimally esti-
mated threshold because
requires less calculation
time than the other thresholds. However, in particular situ-
could not be obtained, we used the
average value of the other threshold types, i.e.,
STEP3-1 reduced FP at the cost of a slight increase in FN.
STEP3-2 then decreased FN while STEP 3-3 readjusted the FP.
Due to the postprocessing algorithms, FP and FN were reduced
to 0.008 from 0.0763 and to 0.008 from 0.0109, respectively,
The Elimination Performance: The performance of elimi-
nation using EAS was evaluated using simulated signals that
were generated by adding weighted ECG spike trains to the ar-
tifact-freenormal EEG.Themean power errorbetween theorig-
inal signals and the ECG-eliminated signals, normalized to the
original signal power, was 10%. The elimination procedure re-
duced the SBR of the contaminated EEG from 25.3 to 3.1.
Applicationto the OSASRecordings: FourOSAS recordings
were used to evaluate the overall performance of the algorithm.
The mean sleep time of each subject was 7.94 h (i.e., on the
average 953.5 epochs of 30s each) and the total number of heart
beats was 132878 during a total period of 31.8 h with a mean
heart rate of 69.7 beats/min. The mean respiratory disturbance
index(RDI) was49.9 (counts/h),indicating severeOSAS. Sleep
stages were scored according to Rechtschaffen and Kales’ sleep
staging criteria  by a sleep expert. The total epoch numbers
of stage 1, stage 2, REM, and wakefulness were 530, 2244, 555,
and 485, respectively. Mean FP was 0.0424 and FN was 0.1504
for total epochs.
Fig.8 illustratesthe relationshipbetween SBRand theperfor-
mance indices FP and FN. Fig. 8(a) shows the mean FP and FN
in the epochs with the given SBR, and Fig. 8(b) shows the mean
FP andFNin theepochs havingSBR higherthan thegiven SBR.
Fig. 8(c) indicatesthe relative number, i.e., frequency, ofepochs
havingSBR higherthan thegivenSBR. As is shown inFig. 8(a),
an SBR value higher than 20 was required for FP and FN to
reach 0.02 and 0.1, respectively. Epochs having an SBR higher
than 20 account for 60% of the total epochs in Fig. 8(c). Inspec-
tion of epochs with SBR around 20 indicated that the EEG sig-
nalscontained othertypes ofartifact-bursts suchas EMG,which
made itdifficultto identify someECG artifacts. For epochs with
an SBR below ten, ECG artifacts could not be discriminated
easily due to other types of artifacts present, or due to a rela-
tively small ECG effect on the EEG. Therefore, ECG artifact
elimination in these epochs
was not thought to be
1532 IEEE TRANSACTIONS ON BIOMEDICAL ENGINEERING, VOL. 49, NO. 12, DECEMBER 2002
ERFORMANCE ACCORDING TO THE SLEEP STAGES IN OSAS RECORDINGS
necessary. These epochs accounted for as much as 20% of the
epochs and it would make sense to exclude these epochs in the
performance evaluation. The detection performance at epochs
was and in Fig. 8(b).
For epochs of
, which was regarded as the boundary
of obviousness for ECG artifacts by visual inspection, the algo-
and [Fig. 8(b)].
In Table I, results of the performance are listed according to
sleep stages. Wakefulness states showed the lowest SBR and
the highest FP and FN. This result can be explained by the fact
that in the sleep of OSAS, a wakefulness state usually follows
apneic events with deep exhalation, which is associated with
severe movement and muscle artifacts. During REM stages, the
SBR was at its highest and the number of FPs and FNs at their
lowest. Upon applying the algorithm, the SBR decreased from
59.2 to 6.5 on the average, which confirms the efficiency of the
We propose an ECG artifact detection and elimination
method for EEG without the need for an additional ECG
channel. The method is based on the following three charac-
teristics of ECG artifacts: that the ECG R-peak occurs as a
spike, that the ECG R-peak has periodicity, and that the ECG
is uncorrelated with the EEG.
The SNEO showed excellent performance in emphasizing
spike components by a simple calculation. The EIH method uti-
lized ECG periodicity when estimating FP and FN to determine
an optimal threshold. Moreover, the EIH method allowed the
experimentally obtained optimal threshold to be approximated.
It should be noted that the detection performance with the
experimental optimal threshold derived by using an ECG ref-
erence was much lower than that obtained by using the pro-
cedures of EIH method. This indicates the intrinsic limitation
associated with the fixed thresholding method, due to the pres-
ence of the changing environment caused by the background
EEG. In some ECG spike regions, the original EEG activity
may be of the opposite phase to the ECG activity and, thus,
may degrade the spike energy. Conversely, the original EEG ac-
tivity may be in-phase, which would increase the ECG spike
energy. These situations explain the diverse instantaneous en-
ergy distribution of ECG spikes. In addition, SNEO is rela-
tively sensitive to high-frequency noise, such as EMG signals
that arefrequently present in EEGsignals. Therefore, additional
algorithmic adjustment is required to overcome the degrada-
tion of ECG detection caused by the various environments. In
order to decrease the number of misses and false alarms, two
threshold-adjusting procedures wereapplied. One procedure in-
volved rejecting spikes of shorter interspike duration than the
expected heart beat interval. The other procedure redetected
missedeventsbyadjusting thethresholdin theexpectedpeak re-
gion using ECG periodicity information. These adjusting steps
increased the detection performance significantly.
The application to OSAS data produced satisfactory results.
According to the results obtained, the performance of our al-
gorithm was mainly dependent on SBR. In the low-SBR cases,
ECG artifacts tend to be immersed in other artifacts or are not
easily distinguished from the EEG and in such cases, there is no
need to apply the ECG-artifact elimination algorithm.
We did not evaluate the performance of the method system-
atically according to heart rate variability and ECG waveform
changes. However, recordings of OSAS involving various sleep
stages can be considered to present a somehow extreme case of
heart-rate variability and ECG waveform changes which may
be exacerbated in the presence of several types of heart dis-
orders. In the case of OSAS signals where the standard devi-
ation of heart beat intervals was extended to almost 25 % of the
mean heart beatinterval, we foundno significant correlation be-
tween the standard deviation of heart beat intervals and FP or
FN within the same SBR range. Therefore, we believe that the
algorithm has enough redundancy, provided the cardiac activity
maintains periodicity within the normal ranges.
ECG waveform variability, due to, for example, amplitude
variation of R-peaks, may not severely disrupt the detection
performance, if such variability remains within normal limits,
considering that the ECG waveform change is equivalent to a
change in the background EEG in the sense of additive energy.
However, the artifact-elimination performance of the EAS algo-
rithm is believed to be dependent on the ECG waveform vari-
ability even if the algorithm uses the adaptive averaging method
We believe that the elimination algorithm is worth examining
further, even though this is not the main concern of this paper.
Some intrinsic limitations were found in the EAS algorithm of
, which was based on the assumption that the beat-to-beat
QRS waveform is constant and every beat is averaged with a
triggering reference of time-locked R peaks. In order to satisfy
the time-locking assumption, the bias between the estimated
R-peaks and the accurate position of R-peaks should be mini-
mized. However, in the non-ECG reference case, the bias may
be unavoidable, and, therefore, we used a temporal realignment
technique, using template matching in order to reduce the bias
One merit of the proposed method is its excellent detection
performance in terms of real contaminated signals. In epochs
where the elimination process is thought to be necessary
, the average FP was 0.017 and the average FN
was 0.074 (Table I), which is an acceptable result for clinical
signals. The other merit of the method is that it uses only one
channel of contaminated EEG. The simplicity of the algorithm
is another merit for successful implementation in practical
real-time situations. If this algorithm is applied to multichannel
PARK et al.: AUTOMATED DETECTION AND ELIMINATION OF PERIODIC ECG ARTIFACTS 1533
EEGs, and if the time synchronization information between
channels were used, we would expect increased detection and
elimination performance in the low-SBR situation.
This paper proposes an efficient method for detecting and
eliminating periodic artifacts, and we believe that it has the po-
tential for more general application in systems that involve pe-
riodic or semiperiodic spike artifacts.
 R. Broughton, J. Fleming, and J. Fleetham, “Home assessment of sleep
disorders by portable monitoring,” J. Clin. Neurophys., vol. 13, no. 4,
pp. 272–284, 1996.
 B. Van Sweden, M. Koenderink, G. Windau, M. Van de Bor, F. Van Bel,
J. G. Van Dijk, and A. Wauquier, “Long-term EEG monitoring in the
early premature: Developmental and chronobiological aspects,” Elec-
troencephalogr. Clin. Neurophys., vol. 79, pp. 94–100, 1991.
 M. Nakamura and H. Shibasaki, “Elimination of EKG artifacts from
EEG records: Anew method of noncephalic referential EEGrecording,”
Electroencephalogr. Clin. Neurophys., vol. 66, pp. 89–92, 1987.
 J. L. Kenemans, P. C. M. Molenaar, and M. N. Verbaten, “Models
for estimation and removal of artifacts in biological signals,” in
Digital Biosignal Processing, Techniques in the Behavioral and Neural
Sciences, R. Weitkunat, Ed. Amsterdam, The Netherlands: Elsevier,
1991, vol. 5, ch. 9.
 B. Widrow and S. D. Stearns, “Adaptive interference canceling,” in
Adaptive Signal Processing. Upper Saddle River, NJ: Prentice-Hall,
1985, ch. 12, pp. 302–367.
 H. Park,J. Han, D.Jeong,and K.Park, “A studyon the eliminationof the
ECG artifact in the polysomnographic EEG and EOG using AR model,”
in Proc. 20th Ann. Int. Conf. IEEE Engineering Medicine Biology Soc.,
vol. 3, 1998, pp. 1632–1635.
 R. Everson and S. J. Roberts, “Independent component analysis,” in Ar-
tificial Neural Networks in Biomedicine, P. J. G. Lisboa, E. C. Ifeachor,
and P. S. Szczepaniak, Eds. New York: Springer-Verlag, 2000, ch. 12.
 S. Mukhopadhyay and G. C. Ray, “A new interpretation of nonlinear
energyoperatorand itsefficacy inspikedetection,” IEEETrans. Biomed.
Eng., vol. 45, pp. 180–187, Feb. 1998.
 J. F. Kaiser, “On a simple algorithm to calculate the energy of a
signal,” in Proc. IEEE Int. Conf. Acoustic Speech Signal Processing,
Albuquerque, NM, 1990, pp. 381–384.
 R. B. Dunn, T. F. Quatieri, and J. F. Kaiser, “Detection of transient sig-
nals using energy operator,” in Proc. IEEE Int. Conf. Acoustic Speech
Signal Processing, vol. 3, 1993, pp. 145–148.
 P.Maragos,J. F.Kaiser,and T.F. Quatieri, “Onamplitudeandfrequency
demodulation using energy operators,” IEEE Trans. Signal Processing,
vol. 41, pp. 1532–1550, Apr. 1993.
 H. L. Van Trees, Detection, Estimation, and Modulation Theory: Part
I. New York: Wiley, 1968.
 O. Pahlm and L. Sornmo, “Software QRS detection in ambulatory mon-
itoring,” Med. Biol. Eng. Comput., pp. 289–297, 1984.
 A. Rechtschaffen and A. Kales, Eds., “A manual of standardized termi-
nology,” in Techniques and Scoring System for Sleep Stages of Human
Subjects. Los Angeles, CA: BIS/BRI, UCLA, 1968.
Hae-Jeong Park was born in KyungNam, Korea, in
1970. He received the B.S. degree in electrical engi-
neeringand theM.S.and Ph.D.degrees inbiomedical
engineering, from Seoul National University, Seoul,
Korea, in 1993, 1995, and 2000, respectively.
He is currently working as a Research Fellow
at the Clinical Neuroscience Division, Labora-
tory of Neuroscience, Boston VA Health Care
System—Brockton Division, Department of Psy-
chiatry and Surgical Planning Laboratory, MRI
Division, Department of Radiology, Brigham and
Women’s Hospital, Harvard Medical School, Boston, MA. His research
interests include biomedical signal processing, biomedical image analysis, and
Do-Un Jeong received the M.D. and Ph.D. degrees
from the Seoul National University, Seoul, Korea, in
1976 and 1988, respectively.
He is currently a Professor of Psychiatry at the
Seoul National University and a Researcher at the
Clinical Research Institute of the Seoul National
University Hospital and at the Neuroscience Re-
search Institute of the Seoul National University.
He was trained in sleep medicine and physiology
and is a Diplomat of the American Board of Sleep
Medicine. He is the Director of Division of Sleep
Studies at the Seoul National University Hospital and doing research in sleep
disorders, chronobiology, and signal processing.
Dr. Jeong is a Fellow of the American Academy of Sleep Medicine and is
currently President of the Korean Academy of Sleep Medicine.
Kwang-SukParkwas bornin Seoul, Korea, in 1957.
He receivedthe B.S., M.S., and Ph.D degrees inelec-
tronic engineering, especially for biomedical engi-
neering, from the Seoul National University, Seoul,
Korea, in 1980, 1983, and 1985 respectively.
He is currently the Professor and Chairman
of the Department of Biomedical Engineering,
Seoul National University College of Medicine.
His research interests include biomedical signal
processing, biomedical image analysis, and medical