Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

104 108


Published on

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

104 108

  1. 1. ISSN: 2277 – 9043 International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 6, August 2012 EEG BASED DROWSINESS ESTIMATION USING MAHALANOBIS DISTANCE Ms. Pranjali Deshmukh, Mr. S. B. Somani, Ms. Shivangi Mishra, Mr. Daman Soni and to the side of, the vehicle equipped with the system; Abstract— In the last years, the traffic accidentsstudy is become important because they produce several died distance detection systems for vehicles ahead; and laneand hurt around the world. Drowsiness is a safety hazard in departure prevention support systems .BMI systems givecommercial vehicle driving. The conditions to which drivers areexposed put them at higher risk. Driver drowsiness detection warning information or other information in the event of antechnologies have the ability to avoid a catastrophic accident bywarning the driver of his/her drowsiness. To help in reducing emergency. But the current systems are not alwaysthis fatality, in this paper, a new Algorithm for automatic driver-friendly because they give warnings independently ofdriver’s drowsiness detection based on EEG using MahalanobisDistance is proposed. This uses physiological data of drivers to the state of the driver. To realize driving support systems thatmeasure or detect drowsiness. These include the measurementof brain wave or EEG and approaches based on EEG signals are friendly to drivers, it is essential to give information thathave the advantages in making accurate and quantitative depends on the seriousness or urgency level of theassessment of alertness levels. Hence under the assumption thatthe EEG power spectrum in an alert state can be reasonably information after the drivers slate has been detected.modeled using a multivariate normal distribution, Detection of Examples of driver states to be detected includethe drowsiness present in the signal with known awake signal isthe subject of this paper. consciousness degradation through drowsiness, inattentiveIndex Terms—BMI-Brain Machine Interface, EEG-Electro driving and physical or mental fatigue. There are number ofEncephalograph, MD - Mahalanobis Distance. methods to detect drowsiness. They can be categorized into two main approaches [3]. I. INTRODUCTION The first approach focuses on physical changes during Electroencephalograph (EEG) is the spontaneous fatigue, such as the inclination of the driver’s head, saggingactivity along the scalp. EEG signals are measured by posture, and decline in gripping force on the steering wheel.placing several electrodes on the head around the brain. Since these techniques allow noncontact detection ofBetween certain electrodes, a potential difference is drowsiness, they do not give the driver any discomfort.measured and converted into a waveform (EEG signal). However, these parameters easily vary in different vehicle Driving support systems to assist drivers play a central types and driving conditions [3] [4] [5].role in ITS (lnte1ligent Transportation Systems). Examples The second approach focuses on measuringof such systems include forward / side obstacle detection physiological changes of drivers, such as eye activitysystems to detect vehicles driving in front of, or in front of measures, heart beat rate, skin electric potential, and electroencephalographic (EEG) activities. These parameters Manuscript received July 15, 2012. are sensitive to fatigue effects [4] [6]Pranjali Deshmukh, Pursuing M.E. from Dept of E&TC, MIT COEPune (India), Hence Drowsiness detection algorithm for EEG-basedProf. S.B. Somani, is associated with E & TC Department brain–machine interface (BMI) system is proposed asMIT COE Pune, University of Pune, India, EEG-based method can use a shorter moving-averagedShivangi Mishra, Pursuing M.E. from Dept of E&TC, MIT COEPune (India), window to track second-to-second fluctuations in the subjectDaman Soni , Pursuing M.E. from Dept of E&TC, MIT COE performance.Pune (India),email: 104 All Rights Reserved © 2012 IJARCSEE
  2. 2. ISSN: 2277 – 9043 International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 6, August 2012 II. METHODOLOGY thought of as a generalized moving average. Savitzky-Golay smoothing filters are typically used to "smooth out" a noisy EEG is described in terms of rhythmic activity, which is signal. This filter is also called a digital smoothingdivided into bands of frequency. polynomial filter or a least-squares smoothing filter. The Savitzky-Golay filtering method is often used with TYPE Frequency(Hz) Normally frequency data or with spectroscopic (peak) data. Delta Up to 4 Deep sleep Theta 4-7 Appears as consciousness B. Mahalanobis Distance slips into Drowsiness Mahalanobis distance of a multivariate vector Alpha 8-12 Relaxed awareness and in attention from a group of values with Beta 13-26 Associated with active mean and covariance matrix thinking S is defined as: Table 1: EEG Rhythms As EEG spectra in theta rhythm (4–7 Hz) and alpharhythm (8–11 Hz) usually shows the changes the cognitive The Mahalanobis transformation is a powerful toolstate and memory performance, these rhythms are used to for studying the multivariate normal distribution as it oftenderive the drivers’ alert models and detect their cognitive allows :state from EEG spectra in theta and alpha rhythms [8]. * To transform a given multinormal distribution into the Under the assumption that the driver will be in an alert simple standard (spherical) multinormal distribution.state during the first few minutes of driving, the driver’s alert * To solve the problem at hand on this very simplestate can be derived by the first few minutes of EEG distribution.recording. If the driver is under an alert state, his EEG * Then to carry this solution back to the originalspectra in theta and alpha rhythm will follow a multivariate distribution using the "reverse" Mahalanobis transformation.normal distribution. Then the deviation of the driver’s For example, it can be used :current state will be assessed continuously from the alert * For calculating the marginal distributions of themodel by using Mahalanobis distance (MD). If the driver multinormal distribution.remains alert, his EEG spectra in theta and alpha rhythm will * For studying the distributions and conditions ofmatch the alert model. Otherwise, if the driver becomes independence of quadratic forms in multivariate normaldrowsy, then his EEG spectra will deviate from the alert variables.model, and hence, MD will increase. C.Work flow A. EEG data acquisition The complete flow of the implemantation is given below. The implementation process is carried out using thedatabase available in the physonet website. The availabledatabase was in EDF format, for compatibility it is convertedin to ascii format for the MATLAB 7.9.The raw signal is thensegemented according to the Rechtschaen and Kales [1968]sleep stage classification standard [9]. The segmentedAwake stage and stage I signal is filtered using 3rd orderSavitzky-Golay Filter. Savitzky-Golay filtering can be 105 All Rights Reserved © 2012 IJARCSEE
  3. 3. ISSN: 2277 – 9043 International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 6, August 2012 the alert model. The alert model can be represented and characterized by a multivariate normal distribution N (µ, Σ2), where µ is the mean vector and Σ is the covariance matrix. After the alert model is built, the preprocessed EEG spectra in alpha and theta rhythms will be directly calculated to obtain the Mahalanobis distance for alpha rhythm (MDA) and for theta rhythm (MDT), respectively. Then, a linear combination MDC of MDT and MDA is used to compute a combined measure of deviation. MDA, MDT, and MDC can be taken as an indicator of drowsiness. Finally, the threshold of Mahalanobis distance for drowsiness can be defined. If the value of MDC is larger than the threshold, the cognitive state of the driver can be viewed as drowsy state. In order to classify alert and drowsy states effectively, F-measure is used to find out the threshold of MD for drowsiness. Fig. 1- Flowchart of the drowsiness detection algorithm The F-measure is the harmonic mean of precision and recall, First, a low-pass filter (moving average filter) with a and its value F can be calculated as follows:cutoff frequency of 32Hz is used to remove power-line noise F= 2 × (Precision ×recall )and other high-frequency noise. Next, EEG data will be (Precision+ recall)down sampled to a sampling rate of 64 Hz to reduce the Where Precision means positive predictive value (PPV) andcomputation load. Finally, EEG spectra in alpha rhythm and recall means sensitivity which is related to percentage oftheta rhythm are extracted [8] [1] . Drowsy people identified as having drowsy condition [2]. Alpha Rhythm is associated with relaxed awareness and III. RESULTin attention state of mind and Theta rhythm is associated with There are many algorithms available for Drowsinessconsciousness slips into Drowsiness state of mind. Hence Detection. But as EEG-based method can use a shorterAlpha and Theta rhythms are only extracted from EEG moving-averaged window to track second-to-secondspectra. Moreover Wakefulness EEG contains low voltage, fluctuations in the subject performance, a new algorithm formixed frequency activity whereas Drowsy EEG marks the drowsiness detection using EEG signal is proposed. Thistransition from wakefulness to drowsiness. Drowsy EEG is algorithm can be implemented by using uClinux systemdefined by a relatively low voltage, mixed frequency activity kernel or by using MATLAB software. But by using-with a prominence of alpha and theta band shown in Fig.2 MATLAB we can write a separate code for each step of[1]. algorithm independently. Hence to provide better flexibility and performance MATLAB is preferred. The raw sleep signal is segemented according to the Rechtschaen and Kales[ 1968] sleep stage classification standard[9]. The same can be implemented by using Fig. 2- Wakefulness and Drowsy EEG spectra MATLAB. A new alert model for every subject in every drivingsession will be constructed under the assumption that thedriver should be in an alert state during the first few minutesof driving. First 3-min EEG spectral data are used to derive 106 All Rights Reserved © 2012 IJARCSEE
  4. 4. ISSN: 2277 – 9043 International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 6, August 2012Fig 3:- Total sleep signal,awake EEG signal, Drowsy EEG signal Fig 5:- Alpha and Theta signal for drowsy EEG signal After gating Awake and Drowsy stage signal, Noise is After alpha, theta extraction Mardia’s test of multivariateremoved using bandstop and Golay filters. Then by using normal distribution is applied to EEG signal to check itsDWT Alpha, Theta rhythms are extracted from processed validity to act as alertness model. Then MD for Alpha, MDsignal as below. for Theta and Hence MDtotal is calculated for different values of constant as in the formula of MDC.Once MDC is calculated the threshold for each value of MDC at each constant value is calculated [1]. F- measure will give the value of percentage of drowsiness. Percentage of drowsiness against the constant value is plotted as below. 300 250 200 150 100 % Drowsiness 50 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Constant Drowsiness Percentage for Subject 1 MDA=0.1129 and MDT=0.1535 Fig 4:- Alpha and Theta signal for awake EEG signal Drowsiness percentage for Subject 2 MDA=0.2260 and MDT=0.1858 Drowsiness percentage for Subject 2 MDA=0.2026 and MDT=0.1368 Fig 6:- Graph of Percentage of drowsiness against the constant 107 All Rights Reserved © 2012 IJARCSEE
  5. 5. ISSN: 2277 – 9043 International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 6, August 2012 IV. CONCLUSION service, U.S. Government printing office, Washington EEG based Drowsiness Detection Algorithm is best D.C. 1968.suited for detecting Drowsiness due to high computationspeed and portability. It can be easily used into real timeapplications as long term monitoring is possible. Hence it canbe easily used for car driving application. V. REFERENCES[1] Shivangi R.Mishra, Prof. S. B. Somani, Pranjali Deshmukh, Daman Soni, ―EEG Signal Processing and Classification of Sensorimoter rhythm-based BCI‖, International Journal of Engineering Research & Technology (IJERT), Vol. 1 Issue 4, June – 2012.[2] Chin – Teng Lin and Che-Jui Chang,‖A Real Time Wireless Brain Computer Interface System for Drowsiness Detection‖, IEEE Transaction on Biomedical Circuits and Systems,Vol.4, No.4,August 2010.[3] M. J. Flores, J.M. Armingol and A. Escalera, ― Real Time Drowsiness Detection System for an intelligent vehicle‖, in Proc. IEEE Intelligent Vehicles Symp.,pp.637-642,2008[4] A. Eskandarian and A. Mortazavi, ―Evaluation of a smart algorithm for commercial vehicle driver drowsiness detection‖, in Proc. IEEE Intelligent Vehicles Symp.,pp.553-559,2007.[5] T. Hong and H. Qin, ―Drowsiness detection in embedded system‖, in Proc. IEEE Int. Conf. Vehicular Electronics and Safety, pp 1-5,2007.[6] J. Qiang, Z. Zhiwei, and P. Lan, ―Real-time nonintrusive monitoring and prediction of driver fatigue,‖ IEEE Trans. Vehic. Technol., vol. 53, no. 4, pp. 1052–1068, Jul. 2004.[7] Desney S. Tan and Anton Nijholt, ―Brain Computer Interfaces Applying our Minds to Human Computer Interaction Human Computer Interaction Series‖.[8] Saeid Sanei and J.A.Chambers, ―EEG Signal Processing‖.[9] A. Rechtschaffen and A. Kales, A manual of standardized terminology, techniques and scoring system for sleep of human subjects, U.S. Public health 108 All Rights Reserved © 2012 IJARCSEE