Automatic EOG and EMG Artifact Removal Method for Sleep Stage Classification
- 1k Downloads
In this paper, a new algorithm is proposed for artifact removing of sleep electroencephalogram (EEG) with application in sleep stage classification. Rather than other works which used artificial noise, in this study real EEG data contaminated with electro-oculogram (EOG) and electromyogram (EMG) are used for evaluating the proposed artifact removal algorithm’s efficiency using classification accuracy. The artifact detection is performed by thresholding the EEG-EOG and EEG-EMG cross correlation coefficients. Then, the segments considered contaminated are denoised by normalized least-mean squares (NLMS) adaptive filtering technique. Using a single EEG channel, four sleep stages consisting of Awake, Stage1 + REM, Stage 2 and Slow Wave Stage (SWS) are classified. A wavelet packet (WP) based feature set together with artificial neural network (ANN) are deployed for sleep stage classification purpose. Simulation results show that artifact removed EEG allows a classification accuracy improvement of around 14 %.
KeywordsSleep stage classification Wavelet packet Adaptive filtering Artifact removing Artifact detection
Sleep is an essential part of a human’s daily life that significantly affects his/her health, productivity, mental and moral states. Therefore, the diagnosis of sleep related disorders is of great importance in sleep research. Sleep scoring with the use of polysomnographic (PSG) recordings is one of the principal requirements of diagnosis procedure of sleep disorders. PSG recordings include electroencephalogram (EEG), electromyogram (EMG), electro-oculogram (EOG), electrocardiogram (ECG), snoring and other physiological signals to detect body movements. Currently sleep scoring is mainly done by a domain expert who visually analyses PSG data, diagnoses and prescribes treatment. However, this process is time consuming, tedious and highly subjective. Therefore, several algorithms for automatic sleep scoring have been proposed to assist the expert and increase the reliability of the results .
EEG is widely adopted for the automatic detection of sleep stages and neuronal activity evaluation during sleep. However, EEG is usually contaminated with several artifacts such as power line noise, EMG, EOG and electrode movements. Removal or attenuation of the noise and unwanted signals is a prerequisite for most of the EEG signal processing applications. The presence of artifacts makes the EEG analysis difficult, since it may introduce spikes that can be confused with original EEG trend decreasing the reliability of the subsequent processing stages.
The basics for the artifact removing are diverse and are closely related to the specific application in which the algorithm is going to be used. A commonly used method for avoiding artifacts is rejecting the contaminated segments of the recorded EEG . This method although simple, results in huge data loss. Instead, denoising the contaminated EEG segments would not only preserve the amount of data, but also would probably contribute to the increase of accuracy in the automatic sleep stage classification . Following this idea, an extensive number of studies have tried to extract the clean EEG out of the contaminated recording in different research areas but still no optimal method is agreed upon .
Considering the fact that nowadays portable devices for patient monitoring and automatic sleep stage classification could be a helpful assistance for experts on the analysis of sleep signals, the main motivation for the current work is the lack of a systematic method for automatic artifact detection and cancellation which leads to an improvement in the automatic stage classification accuracy compared to the original acquired data. In view of this gap, the following research question emerges:
What would be a suitable methodology to detect, identify and remove the EOG and EMG artifacts from EEG in EEG-based sleep analysis, so that the overall artifact level is decreased and the automatic sleep stage classification accuracy is positively influenced?
In the rest of the paper we will try to answer this question. The paper is organized as follows: Sect. 2 explains how the proposed automatic artifact removal system can benefit cyber-physical systems. Section 3 gives a brief overview of how EEG artifact removal problem is treated in the literature. Section 4 provides detailed description of the proposed algorithm, and simulation results. Section 5 presents the results discussion and Sect. 6 finalizes the paper with the conclusions and future work directions.
2 Relationship to Cyber-Physical Systems
Cyber-physical systems (CPS) are an emerging technology that attracted a lot of attention in recent years. CPS can be regarded as the next generation computing systems that monitor, coordinate, control and integrate communication and computation abilities to interact with physical systems . CPS are assumed to have a wide range of applications in several areas including defense, transportation, agriculture, energy, healthcare, etc.
In the healthcare area there are currently a limited number of CPS available (such as bedside monitors) and many of their components still work isolated. With the extensive use of CPS, all these components will be integrated to a networked closed loop system together with the human . Wearable health monitoring systems, that allow the subject to continue normal life while his/her vital signs are recorded and analyzed, are a good example of such solutions. In most of the cases a whole night PSG signal is necessary for diagnosing a sleep related problem. This data is usually recorded in a hospital or sleep clinic while the change of sleeping environment and noise may distract the subject and induce significant alterations in the recorded data. Medical CPS like wearable sleep monitoring systems seem to be the perfect solution for recording whole night data while the subject is saved from any change in the sleeping environment. The medical data recorded this way is the main indicator of the subject’s health status and its reliability is very important for further signal processing. Therefore, denoising of biological data is one of the most important requirements for improved medical CPS [7, 8]. This work is developed in such a context to support the relation between CPS and sleep monitoring.
3 State of the Art
EEG is mainly intended for recording cerebral activity, yet other extra electrical activities are also recorded. These extra activities are usually considered harmful artifacts that can be either physiological like EOG, EMG and ECG or extra physiological like power line interference. EOG measures are captured mainly by frontal electrodes, but they are strong enough to also affect other electrodes. About the EMG, the degree and type of contamination depends on the contracted muscle, the recording purpose and the environment .
Some of these artifacts are easily removed by a finite impulse response (FIR) or infinite impulse response (IIR) filter if their power spectrum doesn’t have overlap with the EEG power spectrum. However, EMG and EOG, which have significant power spectrum overlap with EEG are not easy to remove requiring careful consideration .
The state of the art in EEG denoising is quite broad. The most classic methods used in the last years are regression (especially for ocular interferences), blind source separation or component base techniques  and Wiener and Bayes filtering methods . Also adaptive filtering , wavelet denoising  and empirical mode decomposition (EMD)  are among the most widely used denoising techniques. A great range of studies pay particular attention to the improvement of existing methods or using more objective performance criteria .
In the context of sleep stage classification, Estrada et al.  proposed a denoising method based on applying a predefined threshold to the wavelet coefficients of noisy EEG with the objective of finding the best threshold defining rule and value. The noisy signal is constructed by adding white noise and 50 Hz power line sinusoidal noise. The coefficients that contribute to the noise components are zeroed out using a threshold discrimination filter. They use Mean Squared Error (MSE) and signal-to-noise ratio (SNR) as criteria for evaluating the performance of the proposed de-noising scheme.
4 Materials and Methods
In this study, PSG records of 22 Caucasian males and females with the duration of nine hours each were used from the Sleep EDF Database . Except for a slight difficulty in falling asleep, subjects were healthy and without any medication. All EEG (from Fpz-Cz and Pz-Oz electrode locations), EOG (horizontal) and submental chin EMG recordings were performed with a sampling rate of 100 Hz. All PSGs are divided into 30 s epochs and annotated by well-trained technicians according to the Rechtschaffen and Kales (R&K) manual. In this study, Pz-Oz EEG channel, horizontal EOG and submental chin EMG recordings of all the subjects are used.
Visual inspection of the data reveals that occasionally there exist one or more consecutive epochs in which the energy of the signal is zero probably due to hardware failure. These epochs are removed in order to eliminate the confusion that they could introduce on the sleep stage classification algorithm.
Following the AASM manual  recommendations for the scoring of sleep, the EEG and EOG signals are filtered with a band-pass filter with lower cut-off of 0.3 Hz and higher cut-off of 35 Hz. In this work we use WP based decomposition and reconstruction as a filter for removing unwanted frequency band of physiological data .
4.3 Artifact Detection and Removal
Conventionally, it is assumed that the measured EEG is a linear combination of cerebral activity with one or more kind of artifacts. Therefore, in this paper, for detecting the EOG and EMG contamination, the filtered EEG, EOG and EMG recordings are divide into 1000-sample segments and then the cross correlation of each EEG segment is calculated with the corresponding EOG and EMG segment. If the absolute value of the EEG-EOG cross correlation coefficients or EEG-EMG cross correlation coefficients is more than threshold 1 or threshold 2 respectively, the corresponding segment will be fed to an artifact removal block which is based on NLMS adaptive filtering. Adaptive filtering  has been extensively used in EEG artifact removal algorithms. It uses a recorded reference of the artifact (in our case horizontal EOG and submental chin EMG) to adjust a vector of weights that models the contamination according to an optimization algorithm.
If the thresholding conditions for cross correlation coefficients are not satisfied, the relevant EEG segment will be copied to the output without any change.
4.4 Feature Extraction
Energy of the WP coefficients for each frequency band (F1–F6)
Total Energy (F7)
Mean of the absolute values of WP coefficients for all frequency bands (F8)
Standard deviation of WP coefficients for all frequency bands (F9)
Energy ratio of various frequency bands (F10 to F14)
F10 is the ratio between the energy in the Alpha band and the sum of the energy in the Delta and Theta bands. F11 is the ratio between the energy in the Delta band and the sum of the energy in the Alpha and Theta bands. F12 is the ratio between the energy in the Theta band and the sum of the energy in the Alpha and Delta bands. F13 is the ratio between the energy in the Alpha band and the energy in the Theta band and F14 is the ratio between the energy in the Delta band and the energy in the Theta band.
5 Experimental Results and Discussion
The performance of the proposed method was assessed using the six subjects selected from the dataset mentioned in Sect. 4.1. In our experiment for wavelet packet based filtering Daubechies order 20 (db20) was used as mother wavelet. In the artifact detection stage a threshold of 0.5 (Threshold 1) for EEG-EOG cross correlation coefficients and 0.25 (Threshold 2) for EEG-EMG cross correlation coefficients were selected. These thresholds are selected empirically considering highest classification accuracy. Three different result validation approaches including subjective and objective methods were applied.
The cross correlation coefficients for EEG-EOG and EEG-EMG which were detected by thresholding before and after applying the artifact removal algorithm are shown in Fig. 2. A significant reduction in the correlation coefficients is noticeable after artifact removal.
Results of the statistical analysis for comparison of each stage and overall accuracy.
REM + S1 (%)
6 Conclusions and Future Work
To the best of our knowledge there is a lack of EEG artifact removing studies in the sleep stage classification context that simultaneously removes the EOG and EMG artifact from EEG without rejecting epochs and also evaluates the performance of the classifier for de-noised data. This paper is a contribution in this regard. In conclusion our findings show that the proposed method for artifact cancelation is reliable for sleep stage classification giving a promising accuracy improvement.
Due to the database available at the moment for this research, EOG and EMG channels were utilized for cancellation of their contamination in EEG. The performance of proposed method can be improved in the future using other PSG channels like ECG.
This work was partially funded by FCT Strategic Program UID/EEA/00066/203 of UNINOVA, CTS.
- 1.Niedermeyer, E., da Silva, F.H.L.: Electroencephalography: Basic Principles, Clinical Applications, and Related Fields. Williams & Wilkins, Baltimore (1999)Google Scholar
- 2.Devuyst, S., Dutoit, T., Ravet, T., Stenuit, P., Kerkhofs, M., Stanus, E.: Automatic processing of EEG-EOG-EMG artifacts in sleep stage classification. In: IFMBE Proceedings, pp. 146–150 (2009)Google Scholar
- 5.Wang, J., Abid, H., Lee, S., Shu, L., Xia, F.: A secured health care application architecture for cyber-physical systems. J. Control Eng. Appl. Inform. 13(3), 101–108 (2011)Google Scholar
- 6.Philip, A., Broman, D., Lee, E.A., Torngren, M., Sunder, S.S.: Cyber-physical systems - a concept map. http://cyberphysicalsystems.org/
- 12.Safieddine, D., Kachenoura, A., Albera, L., Birot, G., Karfoul, A., Pasnicu, A., Biraben, A., Wendling, F., Senhadji, L., Merlet, I.: Removal of muscle artifact from EEG data: comparison between stochastic (ICA and CCA) and deterministic (EMD and wavelet-based) approaches. EURASIP J. Adv. Signal Process. 2012, 127 (2012)CrossRefGoogle Scholar
- 14.Estrada, E., Nazeran, H., Sierra, G., Ebrahimi, F., Setarehdan, S.K.: Wavelet-based EEG denoising for automatic sleep stage classification. In: CONIELECOMP Proceedings of 2011 - 21st International Conference on Electronics, Communication and Computing, pp. 295–298 (2011)Google Scholar
- 15.The Sleep-EDF Database [Expanded]. http://www.physionet.org/physiobank/database/sleep-edfx/
- 16.The AASM Manual for the Scoring of Sleep and Associated Events - Rules, Terminology and Technical Specifications. http://www.aasmnet.org/scoringmanual/
- 19.Ebrahimi, F., Mikaeili, M., Estrada, E., Nazeran, H.: Automatic sleep stage classification based on EEG signals by using neural networks and wavelet packet coefficients. In: Conference Proceedings of IEEE Engineering in Medicine and Biology Society, pp. 1151–1154 (2008)Google Scholar