Automatic sleep stage classification V.Sheeba Dept. Electronics and Instrumentation VJEC, Chemperi, Kerala sheebav@vjec.ac.in Marymol Paul Dept. Electronics and Instrumentation VJEC, Chemperi, Kerala Abstract—Electroencephalogram (EEG) is a complex signal resulting from postsynaptic potentials of cortical pyramidal cells and an important brain state indicator with specific state dependent features. It provides information related to the brain activity based on measurements of electrical recordings taken on the scalp of the subjects. EEG spectral analysis is an important method to investigate the hidden properties and hence the brain activities. Spectral analysis of sleep EEG signal provides acute insight into the features of different stages of sleep which can be utilized to differentiate between normal and pathological conditions. Sleep scoring by a human expert is a very time consuming task and normally require hours to classify a whole night recording (6 hours). Every 30 seconds epochs are classified in different sleep stages, according to the structure of the signal and rules defined by Rechtschaffen and Kales [11]. This paper describes the process of extracting features of sleep EEG signals through the use of Power Spectral Density and Fast Fourier Transform. Keywords- Electroencephalogram (EEG), Power Spectral Density (PSD) , Fast Fourier Transfor (FFT). I. INTRODUCTION The EEG (Electroencephalogram) signal indicates the electrical activity of the brain. The electrical activity of a brain (EEG) exhibits significant complex behavior with strong non-linear, random and non-stationary properties. The communication in the brain cells take place through electrical impulses. It is measured by placing the electrodes on the scalp of the subject. A typical EEG signal, measured from the scalp, will have amplitude of about 10 μV to 100 μV and a frequency roughly in the range of 0.25 Hz to about 100 Hz. EEG, as a noninvasive testing method, plays a key role in diagnosing diseases and is useful for both physiological research and medical application. It helps in diagnosing many neurological diseases, such as epilepsy, tumor, cerebrovascular lesions, breathing disorders associated with sleep, depressions and problems associated with trauma. It is very difficult to get useful information Akhil Jose Dept. Electronics and Instrumentation VJEC, Chemperi, Kerala akhiljose@vjec.ac.in Avinashe K.K Dept. Electronics and Instrumentation VJEC, Chemperi, Kerala from these signals directly in the time domain just by observing them. EEG signals are highly non-Gaussian, non stationary and non-linear in nature. Hence, important features can be extracted for the diagnosis of different diseases using advanced signal processing techniques. The objective of this paper is to analyze features of human sleep EEG signals using Power spectral density (PSD) and Fast Fourier Transform (FFT). These characteristics features can be used to identify any disorder and thus can play important roles in diagnosing disorders and pathological conditions. II. EEG SLEEP STAGES In humans, 5 sleep stages and the stage awake are defined [11], [12]. Each sleep stage is characterized by a specific pattern of frequency content. The EEG spectrum is divided in 5 bands Delta 0 - 4 Hz Theta 4 - 8 Hz Alpha 8 - 13 Hz Beta1 13 - 22 Hz Beta2 22 – 35 Hz Stage awake: Signal with alpha activity. Stage 1: No presence of alpha activity, low beta and theta activity, Stage 2: Less than 20 % of delta activity and presence of Kcomplexes and spindles. K complexes are low frequency waves near 1.0 Hz, with amplitude of at least 75 mV. Spindles are well defined waves in the range 11-15 Hz with time duration of more than 0.5 seconds. There is no criterion about the amplitude of a spindle. Stage 3: More than 20 % and less than 50 % of delta activity, Stage 4: More than 50 % of delta activity. Stage REM: Low amplitude waves with little Theta activity and often saw tooth waves. REM and awake signals might have a similar shape, but REM has little alpha activity. In natural conditions a sleep starts by slow wave phase ranging from shallow sleep stage 1 to deepest stages 3 or 4 and then is replaced suddenly by fast sleep phase. That forms a single sleep cycle which lasts 90-120 minutes. During a whole night 4-5 such cycles can be observed for healthy persons. The duration of fast sleep is minimal at the sleep onset but gradually increases toward morning. In contrary, the duration of deep sleep (stages 3 and 4) is maximal at the 2nd and 3rd sleep cycle and diminishes toward the sleep end. III. METHOD For automatic sleep stage classification we have used signals from three channels, EEG, EOG and EMG. All channels were sampled at 1000 Hz. 30 second epochs were taken for the analysis. The average EOG power and average EMG power were used to identify the REM and NREM stages. A. Feature selection and Extraction The power spectral density of the signal, using parametric methods, is computed as the frequency response of an autoregressive model of the signal, based on previous values of the signal. In [8] was found that the order of this model is very important to obtain an accurate estimation of the spectrum. The order of the model is selected based on several criteria. The Akaike's final prediction error (FPE) criterion was use in [13] and the results show that orders as low as five can be used to model shorts segments of the EEG signal; however an order ten is suggested because it shows better results. The parametric method selected was the one proposed by Welch; this method always produce a stable model that minimizes the error on backward and forward directions and has a good resolution for large datasets. Figure 1 shows the identified REM stage, slow wave sleep stage and the Wake stage. Fig.1.b SWS stage Fig1.c Wake stage The fast Fourier transform of the above signals are obtained as shown in figure2. Fig2. fft of the selected signals Fig1.a REM stage The Welch algorithm is used to identify the stages .The power spectral density of the EEG signals using the Welch algorithm is shown in figure 3. Fig.4.c.Spectrogram of Wake stage Fig.3.PSD using Welch The spectrogram of the identified stages of REM sleep, slow wave sleep and the Wake stage is shown in figure4. The EOG power of the identified sleep stages were calculated using the Welch algorithm and is shown in figure5. Fig.4. a. Spectrogram of REM sleep Fig.5.a.EOG power of REM stage Fig.4.b.Spectrogram of SWS stage Fig.5.b.EOG power of SWS stage REFERENCES [1] [2] [3] [4] Fig.5.c.EOG power of Wake stage [5] IV. CONCLUSIONS EEG signal processing is one of the important areas of research in biomedical signal processing. Medical science along with the modern engineering techniques can provide useful information and solution in this field. This paper used the signal processing techniques of Power spectral density and Fast Fourier Transform to classify the various stages of sleep associated with the rat for every 30 s epoch. Automatic sleep analysis is faster than manual scoring. Machine processing of 6 hours record takes less than 2 minute but it might take several hours for expert to evaluate the same record. Automatic analysis is objective because classification results are not tied with any subjective experience of human expert. This system can be used in hospitals for sleep disturbance diagnosis as well as for fundamental sleep research. [6] [7] [8] [9] [10] [11] [12] ACKNOWLEDGMENT The authors wish to thank NIMHANS Bangalore for the database and Dr. Laxmi T.Rao, NIMHANS, for the fruitful discussion s on the scoring techniques. [13] Edgar Oropesa , Hans L. Cycon , Marc Jober,’ Sleep Stage Classification using Wavelet Transform and Neural Network’,March 30, 1999. Rakesh Kumar Sinha J Med Syst ,’Artificial Neural Network and Wavelet Based Automated Detection of Sleep Spindles, REM Sleep and Wake States’, 2008. L.G.Doroshenkov1, V.A.Konyshev 2 ,1Department of Biomedical Systems, Moscow State Institute of Electronics Technology (Technical University),2 Neurobotics Ltd. ‘Usage of Hidden Markov Models for automatic sleep stages classification’. Md. Riyasat Azim, Md. Shahedul Amin, Shah Ahsanul Haque, Mir Nahidul Ambia, Md. Asaduzzaman Shoeb,’Feature Extraction of Human Sleep EEG Signals using Wavelet Transform and Fourier Transform’,2010 ICSPS. Edson Estrada, Homer Nazeran, Gustavo Sierra, Farideh Ebrahimi, S. Kamaledin Setarehdan,‘Wavelet-based EEG denoising for automatic sleep stage classification’. Jaime f. delgado saa, miguel sotaquirá gutierrez, ‘EEG signal classification using power spectral features and linear discriminant analysis: a brain computer interface application’, June 2010. K. Šušmáková, A. Krakovská, ‘Selection of Measures for Sleep Stages Classification’, 2009. L.A. Papale, M.L. Andersen, I.B. Antunes, T.A.F. Alvarenga, S. Tufik,’ Sleep pattern in rats under different stress modalities’,AUG 2005. Thomas Seidenbecher, T. Rao Laxmi, Oliver Stork, Hans-Christian Pape,’ Amygdalar and Hippocampal Theta Rhythm Synchronization During Fear Memory Retrieval’, Aug 2003. Bruce J. Swihart, Brian Caffo, Ph.D., Karen Bandeen-Roche, Ph.D., Naresh M. Punjabi, M.D., Ph.D., ‘Characterizing Sleep Structure Using the Hypnogram’,2008. Rechtschaffen, A., and Kales, A., A Manual of Standardized Terminology, Technique and Scoring System for Sleep Stages of Human Subjects, Public Health Service, U.S, Government Printing Office, Washington, DC, 1968 N. Berbaumer, R.F. Schmidt, Biologische Psychologie, Springer Verlag, 1991 Autoregressive Estimation of Short Segment Spectra for Computerized EEG Analysis Jansen, Ben H. Bourne, John R. Ward, James W. Department of Electrical and Biomedical Engineering, School of Engineering, School of Medicine, Vanderbilt University.