4
Abstract—Removal of electrocardiographic (ECG) artifacts of QRS complexes from a single channel electroencephalography (EEG) and electro-oculography (EOG) can be problematic especially when no reference ECG signal is available. This study examined a simple estimation method excluding the possible QRS part of the EOG trace before spectrum estimation. The method was tested using a simple sleep classifier based on 0.5-30 Hz mean frequency of single channel sleep EOG, with the left EOG electrode referenced to the left mastoid (EOG L-M1). When QRS peaks were automatically excluded from the least square (LS) mean frequency estimation the average optimal mean frequency threshold decreased from 9.3 Hz to 8.8 Hz and agreement and Cohen's Kappa increased respectively from 89% to 90% and from 0.44 to 0.50 when compared to the traditional spectral estimation. I. INTRODUCTION LECTROCARDIOGRAPHIC artifacts in EEG, EMG and EOG represent a problem in, for instance, automatic sleep analysis [1]. When the ECG signal is available, adaptive filtering can be used for the elimination. When multiple signals are recorded a blind source separation is also an alternative. With a single EEG or EOG signal and without the ECG signal the methods available are limited [2, 3]. Park et al. [2] eliminated the QRS part from the EEG and estimated autoregressive (AR) model parameters from this partial data. Estimates were then used to reconstruct the signal without QRS artifacts using the AR model. Later Park et al. [3] used a modified ensemble average subtraction method. The subtraction process is sensitive to false positive Manuscript received April 2, 2007. This work was supported in part by the Finnish Work Environment Fund project ‘Computerized testing of railway traffic safety workers, assessment of vigilance and cognitive performance’ and National Technology Agency of Finland project ‘MICROSLEEP. Development of analysis methods for the dynamic structure of sleep’. Jussi Virkkala is with Sleep Laboratory, Brain Work Research Center, Finnish Institute of Occupational Health, Helsinki, Finland and Department of Clinical Neurophysiology, Medical Imaging Centre, Pirkanmaa Hospital District, Tampere, Finland, phone: +358-40-5680360, fax: +358-9-5884759, e-mail: [email protected], www: neuroupdate.com. Joel Hasan, Eero Huupponen and Sari-Leena Himanen are with Department of Clinical Neurophysiology, Medical Imaging Centre, Pirkanmaa Hospital District, Tampere, Finland, (e-mail [email protected], [email protected], [email protected]) Alpo Värri is with Institute of Signal Processing, Tampere University of Technology, Tampere, Finland (e-mail alpo.Vä[email protected]). Kiti Müller is with Brain Work Research Center, Finnish Institute of Occupational Health, Helsinki, Finland (e-mail kiti.Mü[email protected]) QRS detections. In this study, the power spectrum of EOG was estimated using least square (LS) estimation with and without the data portion during the possible QRS. No reconstruction was used. Numerous options exist for QRS detection from the ECG signal [4]. In this study a relatively simple method was used on EOG to demonstrate the principle of the proposed QRS reduction algorithm. Results were evaluated using the mean frequency of EOG L-M1 as an indicator of sleep depth [5]. EOG electrodes record frontal EEG activity together with eyelid and pupil movements. II. MATERIAL Subjects were selected among the participants of a previous study [6]. Polysomnographic recordings were sorted by the amount of visually scored slow wave sleep (SWS). The recordings of every tenth subject in the sorted validation list were further analyzed in this study. Recordings were visually scored according to a standard [7] by two experienced sleep technologists. Automatic analysis is based only on EOG Left (slightly lateral and 1 cm up from the outer canthus), referenced to the left mastoid M1 (EOG L-M1). III. METHODS The analysis, based on overlapping 2 s segments, was carried out in 0.5 s intervals resulting in 75% overlap. The analysis involved four steps: A) detection of QRS peaks from a single EOG channel, B) estimation of power spectrum of EOG with and without the data part during the possible QRS peaks, C) calculation of mean frequency, and D) evaluation using a simple sleep classifier based on mean frequency of EOG L-M1. A. QRS peak detection Two second EOG L-M1 segments were filtered with a 2nd order Butterworth infinite impulse response (IIR) filter. Zero phase 10-30 Hz filtering was obtained using the second filtering on reversed filtered signal. From the filtered signals, the absolute maximum value was used as an estimate of the first QRS peak in each segment. The second highest peak outside the 65 ms window of the first peak was used as an estimate of the second QRS peak. If the distance was at least 665 ms from the first peak (heart rate <90 bpm) it was also considered as a possible QRS peak. If the second peak was accepted, the third highest Reducing the Effects of Electrocardiographic Artifacts on Electro- oculography in Automatic Sleep Analysis Jussi Virkkala, Joel Hasan, Alpo Värri, Eero Huupponen, Sari-Leena Himanen, Kiti Müller E Proceedings of the 29th Annual International Conference of the IEEE EMBS Cité Internationale, Lyon, France August 23-26, 2007. ThP2A1.15 1-4244-0788-5/07/$20.00 ©2007 IEEE 590

[IEEE 2007 29th Annual International Conference of the IEEE Engineering in Medicine and Biology Society - Lyon, France (2007.08.22-2007.08.26)] 2007 29th Annual International Conference

  • Upload
    kiti

  • View
    213

  • Download
    0

Embed Size (px)

Citation preview

Page 1: [IEEE 2007 29th Annual International Conference of the IEEE Engineering in Medicine and Biology Society - Lyon, France (2007.08.22-2007.08.26)] 2007 29th Annual International Conference

Abstract—Removal of electrocardiographic (ECG) artifacts

of QRS complexes from a single channel electroencephalography (EEG) and electro-oculography (EOG) can be problematic especially when no reference ECG signal is available. This study examined a simple estimation method excluding the possible QRS part of the EOG trace before spectrum estimation. The method was tested using a simple sleep classifier based on 0.5-30 Hz mean frequency of single channel sleep EOG, with the left EOG electrode referenced to the left mastoid (EOG L-M1). When QRS peaks were automatically excluded from the least square (LS) mean frequency estimation the average optimal mean frequency threshold decreased from 9.3 Hz to 8.8 Hz and agreement and Cohen's Kappa increased respectively from 89% to 90% and from 0.44 to 0.50 when compared to the traditional spectral estimation.

I. INTRODUCTION LECTROCARDIOGRAPHIC artifacts in EEG, EMG and EOG represent a problem in, for instance, automatic

sleep analysis [1]. When the ECG signal is available, adaptive filtering can be used for the elimination. When multiple signals are recorded a blind source separation is also an alternative. With a single EEG or EOG signal and without the ECG signal the methods available are limited [2, 3].

Park et al. [2] eliminated the QRS part from the EEG and estimated autoregressive (AR) model parameters from this partial data. Estimates were then used to reconstruct the signal without QRS artifacts using the AR model. Later Park et al. [3] used a modified ensemble average subtraction method. The subtraction process is sensitive to false positive

Manuscript received April 2, 2007. This work was supported in part by the Finnish Work Environment Fund project ‘Computerized testing of railway traffic safety workers, assessment of vigilance and cognitive performance’ and National Technology Agency of Finland project ‘MICROSLEEP. Development of analysis methods for the dynamic structure of sleep’.

Jussi Virkkala is with Sleep Laboratory, Brain Work Research Center, Finnish Institute of Occupational Health, Helsinki, Finland and Department of Clinical Neurophysiology, Medical Imaging Centre, Pirkanmaa Hospital District, Tampere, Finland, phone: +358-40-5680360, fax: +358-9-5884759, e-mail: [email protected], www: neuroupdate.com.

Joel Hasan, Eero Huupponen and Sari-Leena Himanen are with Department of Clinical Neurophysiology, Medical Imaging Centre, Pirkanmaa Hospital District, Tampere, Finland, (e-mail [email protected], [email protected], [email protected])

Alpo Värri is with Institute of Signal Processing, Tampere University of Technology, Tampere, Finland (e-mail alpo.Vä[email protected]).

Kiti Müller is with Brain Work Research Center, Finnish Institute of Occupational Health, Helsinki, Finland (e-mail kiti.Mü[email protected])

QRS detections. In this study, the power spectrum of EOG was estimated using least square (LS) estimation with and without the data portion during the possible QRS. No reconstruction was used. Numerous options exist for QRS detection from the ECG signal [4]. In this study a relatively simple method was used on EOG to demonstrate the principle of the proposed QRS reduction algorithm. Results were evaluated using the mean frequency of EOG L-M1 as an indicator of sleep depth [5]. EOG electrodes record frontal EEG activity together with eyelid and pupil movements.

II. MATERIAL Subjects were selected among the participants of a

previous study [6]. Polysomnographic recordings were sorted by the amount of visually scored slow wave sleep (SWS). The recordings of every tenth subject in the sorted validation list were further analyzed in this study. Recordings were visually scored according to a standard [7] by two experienced sleep technologists. Automatic analysis is based only on EOG Left (slightly lateral and 1 cm up from the outer canthus), referenced to the left mastoid M1 (EOG L-M1).

III. METHODS The analysis, based on overlapping 2 s segments, was

carried out in 0.5 s intervals resulting in 75% overlap. The analysis involved four steps: A) detection of QRS peaks from a single EOG channel, B) estimation of power spectrum of EOG with and without the data part during the possible QRS peaks, C) calculation of mean frequency, and D) evaluation using a simple sleep classifier based on mean frequency of EOG L-M1.

A. QRS peak detection Two second EOG L-M1 segments were filtered with a

2nd order Butterworth infinite impulse response (IIR) filter. Zero phase 10-30 Hz filtering was obtained using the second filtering on reversed filtered signal.

From the filtered signals, the absolute maximum value was used as an estimate of the first QRS peak in each segment. The second highest peak outside the 65 ms window of the first peak was used as an estimate of the second QRS peak. If the distance was at least 665 ms from the first peak (heart rate <90 bpm) it was also considered as a possible QRS peak. If the second peak was accepted, the third highest

Reducing the Effects of Electrocardiographic Artifacts on Electro-oculography in Automatic Sleep Analysis

Jussi Virkkala, Joel Hasan, Alpo Värri, Eero Huupponen, Sari-Leena Himanen, Kiti Müller

E

Proceedings of the 29th Annual InternationalConference of the IEEE EMBSCité Internationale, Lyon, FranceAugust 23-26, 2007.

ThP2A1.15

1-4244-0788-5/07/$20.00 ©2007 IEEE 590

Page 2: [IEEE 2007 29th Annual International Conference of the IEEE Engineering in Medicine and Biology Society - Lyon, France (2007.08.22-2007.08.26)] 2007 29th Annual International Conference

peak was also evaluated similarly. New spectral estimates of EOG were used only when at

least two peaks were detected. Fig. 1 and 2 visualize the QRS detection in a case with some and a case with no QRS artifacts during SWS and SREM.

B. Estimation We used a least square (LS) representation of Discrete

Fourier Transform (DFT) to evaluate the power spectrum from 0.5 to 30 Hz. Spectrum P of y can be evaluated using (1) and (2) where f is from 0.5 to 30 Hz in 0.5 Hz steps and t is from 0 to 1995 ms in 5 ms steps and w is the Hann window.

=

)2exp(...)02exp(......

)02exp(...)002exp(

ntmfintfi

tmfitfiA

ππ

ππ (1)

2

)(1)( wyAATAP −= (2)

Using detected possible QRS peaks, a modified matrix B was created for each 2 s segment by removing 5 rows (25 ms) around each QRS peak. A modified spectrum Pm was then obtained by (3).

2

)(1)( mymwBBTBmP −= (3)

C. Calculation of mean frequency Mean frequencies were evaluated for both spectrum

estimation methods from 0.5 to 30 Hz by (4-5).

∑∑=

)()(fP

ffPM (4)

∑∑=

)()(fmP

ffmPmM (5)

D. Sleep detection Wakefulness and sleep were separated in 30 s epochs

using mean frequency of EOG L-M1. When the percentage of 2 s segments with a mean frequency below the fixed threshold during the 30 s epoch was above the set threshold then the epoch was labeled as sleep and otherwise as awake. This automatic detection was compared to the standard visual scoring based on EEG, EOG and submental EMG [7].

E. Statistical analysis Agreement and Cohen's Kappa [8] were used to evaluate

the sleep detection. Leave-one-out cross validation was done by calculating the agreement for each subject by training the system using data from the rest of subjects.

The Wilcoxon Signed Ranks Test was used for testing the variation in Cohen's Kappa between the two methods.

IV. RESULTS On average, 60% of segments had at least two possible

QRS peaks. In Fig. 3 mean frequency without QRS is shown as a function of mean frequency with QRS peak.

0 50 100 150 200 250 300 350 400-100

-50

0

50

100Some QRS peaks

a) E

OG

L-M

1 (u

V)

0 50 100 150 200 250 300 350 4000

10

20

30

40

50

b) F

ilter

ed 1

0-30

Hz

0 50 100 150 200 250 300 350 400-100

-50

0

50

100

c) Q

RS

rem

oved

(uV

)

Samples at 200 Hz

0 50 100 150 200 250 300 350 400-100

-50

0

50

100No QRS peaks

a) E

OG

L-M

1 (u

V)

0 50 100 150 200 250 300 350 4000

10

20

30

40

50

b) F

ilter

ed 1

0-30

Hz

0 50 100 150 200 250 300 350 400-100

-50

0

50

100

c) Q

RS

rem

oved

(uV

)

Samples at 200 Hz

Fig. 1. Two examples of QRS peak detection during SWS with a two second segment showing some QRS peaks (top) and no QRS peaks (bottom): a) raw EOG Left-M1 signal b) absolute filtered 10-30 Hz with peaks c) original signal with 25 ms (5 samples) removed around these peaks indicated by a circle.

591

Page 3: [IEEE 2007 29th Annual International Conference of the IEEE Engineering in Medicine and Biology Society - Lyon, France (2007.08.22-2007.08.26)] 2007 29th Annual International Conference

The average agreement for binary wakefulness, sleep

classification without QRS removal was 89% with Cohen's Kappa of 0.44. This was obtained with an average mean frequency of less than 9.3 Hz in more than 86% of segments in each 30 s epoch.

With QRS removal, the agreement was 90% and Cohen's Kappa was 0.50. This was obtained with an average mean frequency of less than 8.8 Hz in more than 85% of segments

in each 30 s epoch. The improvement in Cohen's Kappa was significant (p=0.002).

Classification results with mean frequencies during different sleep stages are shown in Table I. Individual results for all subjects are shown in Table II.

V. DISCUSSION The number of ECG elimination methods for single

channel analysis when no ECG reference signal is available is limited [2, 3]. In this study the ECG artifact part of an EOG channel was left out of the least square (LS) estimation of mean frequency. This improved the results of automatic sleep detection. In contrast to, for instance, the subtraction method the effects of QRS false positives can be assumed to be small.

0 50 100 150 200 250 300 350 400-100

-50

0

50

100Some QRS peaks

a) E

OG

L-M

1 (u

V)

0 50 100 150 200 250 300 350 4000

10

20

30

40

50

b) F

ilter

ed 1

0-30

Hz

0 50 100 150 200 250 300 350 400-100

-50

0

50

100

c) Q

RS

rem

oved

(uV

)

Samples at 200 Hz

0 50 100 150 200 250 300 350 400-100

-50

0

50

100No QRS peaks

a) E

OG

L-M

1 (u

V)

0 50 100 150 200 250 300 350 4000

10

20

30

40

50

b) F

ilter

ed 1

0-30

Hz

0 50 100 150 200 250 300 350 400-100

-50

0

50

100

c) Q

RS

rem

oved

(uV

)

Samples at 200 Hz

Fig. 2. Two examples of QRS peak detection during SREM with a two second segment showing some QRS peaks (top) and no QRS peaks (bottom): a) raw EOG Left-M1 signal b) absolute filtered 10-30 Hz with peaks c) original signal with 25 ms (5 samples) removed around these peaks indicated by a circle.

0 5 10 15 20 250

5

10

15

20

25

Mean frequency with QRS (Hz)

Mea

n fr

eque

ncy

with

out

QR

S (

Hz)

Segments with atleast two peaks

Fig. 3. Mean frequency without QRS is shown as a function of mean frequency with QRS peak. For clarity only every 60th point is plotted.

TABLE I TOTAL NUMBER OF EPOCHS CLASSIFIED AS WAKE , SLEEP AND MEAN FREQUENCY IN DIFFERENT SLEEP STAGES USING MEAN FREQUENCY

WITHOUT AND WITH QRS REMOVAL. Sleep stage

Without QRS removal Wake

Sleep

Hz

With QRS removal Wake

Sleep

Hz

MT 200 356 6.4 253 303 6.5 Wake 718 475 8.1 763 430 8.1 SREM 160 2615 4.8 108 2667 4.9 S1 359 1245 5.9 349 1255 5.9 S2 282 6653 4.4 270 6575 4.5 S3 17 847 3.1 16 848 3.4 S4 3 898 2.5 3 898 2.8

592

Page 4: [IEEE 2007 29th Annual International Conference of the IEEE Engineering in Medicine and Biology Society - Lyon, France (2007.08.22-2007.08.26)] 2007 29th Annual International Conference

Many different methods exist for automatic sleep

detection [9-12]. In this study, a simple method with two adjustable parameters was used to demonstrate the QRS elimination process. Modified analysis reduced the optimal mean frequency threshold from 9.3 Hz to 8.8 Hz. As the mean frequency increased with QRS removal, the decrease of the threshold is likely to be related to decreased variance. It is also possible that the QRS algorithm affected the EOG signal in some unknown way.

During wakefulness, large eye movements have low mean frequency in the corresponding segment. In the current algorithm at least 85% of 2 s segments during 30 s must have a mean frequency below the fixed threshold to indicate sleep. Thus some eye movements does not produce a problem.

Further separation of different sleep stages could be obtained by combining the EOG waveform analysis [13-17] with mean frequency calculation. The studied QRS removal can also be applied to other algorithms than the DFT (e.g. AR, matching pursuit) and other parameters than the mean frequency estimation of EOG examined here.

With noncephalic reference electrode the ECG removal from EOG and EEG would be even more important than in this study.

VI. CONCLUSION Simple exclusion of possible QRS artifacts from single

channel EOG improved the automatic wakefulness and sleep detection based on the mean frequency of EOG L-M1. Use of disposable EOG electrodes enables self-applicable methods for the ambulatory monitoring of wakefulness and sleep in shift work and in screening studies of sleep disorders.

ACKNOWLEDGMENT We thank Riitta Velin, Nina Lapveteläinen and Susan Pihl

for their work in recording and scoring the material.

REFERENCES [1] P. Anderer, S. Roberts, A. Schlogl, G. Gruber, G. Klosch, W.

Herrmann, P. Rappelsberger, O. Filz, M. J. Barbanoj, G. Dorffner, and B. Saletu, "Artifact processing in computerized analysis of sleep EEG - a review," Neuropsychobiology, vol. 40, pp. 150-157, 1999.

[2] H.-J. Park, H. Joo-Man, J. Do-Un, and P. Kwang-Sun, "A study on the elimination of the ECG artifact in the polysomnographic EEG and EOG using AR model," Conf Proc IEEE Eng Med Biol Soc, vol. 20, pp. 1632-1635, 1998.

[3] H. J. Park, D. U. Jeong, and K. S. Park, "Automated detection and elimination of periodic ECG artifacts in EEG using the energy interval histogram method," IEEE Trans Biomed Eng, vol. 49, pp. 1526-1533, 2002.

[4] B. U. Kohler, C. Hennig, and R. Orglmeister, "The principles of software QRS detection," IEEE Eng Med Biol Mag, vol. 21, pp. 42-57, 2002.

[5] E. Huupponen, S. L. Himanen, J. Hasan, and A. Värri, "Sleep depth oscillations: an aspect to consider in automatic sleep analysis," J Med Syst, vol. 27, pp. 337-345, 2003.

[6] J. Virkkala, J. Hasan, A. Värri, S. L. Himanen, and K. Müller, "Automatic detection of slow wave sleep using two channel electro-oculography," J Neurosci Methods, vol. 160, pp. 171-177, 2007.

[7] A. Rechtschaffen and A. Kales, "A manual of standardized terminology, techniques and scoring system for sleep stages of human subjects," No. 204 in National Institutes of Health Publications. U.S. Government Printing Office, Washington DC 1968.

[8] J. Cohen, "A coefficient of agreement for nominal scales," Educational Psyhol Meas, vol. 20, pp. 37-46, 1960.

[9] J. Hasan, "Past and future of computer-assisted sleep analysis and drowsiness assessment," J Clin Neurophysiol, vol. 13, pp. 295-313, 1996.

[10] T. Penzel and R. Conradt, "Computer based sleep recording and analysis," Sleep Med Rev, vol. 4, pp. 131-148, 2000.

[11] P. Anderer, G. Gruber, S. Parapatics, M. Woertz, T. Miazhynskaia, G. Klosch, B. Saletu, J. Zeitlhofer, M. J. Barbanoj, H. Danker-Hopfe, S. L. Himanen, B. Kemp, T. Penzel, M. Grozinger, D. Kunz, P. Rappelsberger, A. Schlogl, and G. Dorffner, "An E-health solution for automatic sleep classification according to Rechtschaffen and Kales: validation study of the Somnolyzer 24 x 7 utilizing the Siesta database," Neuropsychobiology, vol. 51, pp. 115-133, 2005.

[12] R. Agarwal and J. Gotman, "Computer-assisted sleep staging," IEEE Trans Biomed Eng, vol. 48, pp. 1412-1423, 2001.

[13] E. Magosso, M. Ursino, A. Zaniboni, F. Provini, and P. Montagna, "Visual and computer-based detection of slow eye movements in overnight and 24-h EOG recordings," Clin Neurophysiol, In press.

[14] A. Värri, K. Hirvonen, V. Häkkinen, J. Hasan, and P. Loula, "Nonlinear eye movement detection method for drowsiness studies," Int J Biomed Comput, vol. 43, pp. 227-242, 1996.

[15] R. Agarwal, T. Takeuchi, S. Laroche, and J. Gotman, "Detection of Rapid-Eye Movements in Sleep Studies," IEEE Transactions on biomedical engineering, vol. 52, pp. 1390-1396, 2005.

[16] J. Virkkala, J. Hasan, A. Värri, S. L. Himanen, and M. Härmä, "The use of two-channel electro-oculography in automatic detection of unintentional sleep onset," J Neurosci Methods, vol. 163, pp. 137-144 2007.

[17] J. Virkkala, J. Hasan, A. Värri, S. L. Himanen, and K. Müller, " Automatic sleep stage classification using two-channel electro-oculography," Submitted

TABLE II SUBJECT NO, SLEEP EFFICIENCY, PERCENTAGE OF SEGEMENTS WITH

ATLEAST TWO QRS PEAKS, AGREEMENT AND COHEN'S KAPPA FOR AUTOMATIC WAKEFULNESS AND SLEEP BINARY CLASSIFICATION BASED

ON MEAN FREQUENCY WITHOUT AND WITH QRS REMOVAL. No

Sleep effici.

QRS

Without QRS removal Agree- ment

CK

With QRS removal Agree- ment.

CK

216 89% 84% 79.5% 0.37 85.5% 0.48 261 94% 61% 90.4% 0.52 89.8% 0.51 169 84% 49% 82.5% 0.51 82.4% 0.52 194 85% 74% 93.2% 0.67 93.6% 0.72 82 79% 55% 86.0% 0.57 86.5% 0.60 262 94% 64% 94.4% 0.29 94.5% 0.30 213 96% 60% 97.1% 0.56 97.0% 0.59 131 84% 34% 86.9% 0.41 88.0% 0.49 31 81% 51% 87.2% 0.49 89.3% 0.60 20 91% 63% 92.9% 0.59 94.7% 0.71 181 81% 79% 79.9% 0.53 82.8% 0.58 196 98% 66% 97.5% 0.18 97.6% 0.35 24 84% 53% 86.6% 0.23 87.1% 0.27 195 96% 50% 94.7% 0.24 94.9% 0.36

593