Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/303772868

Real-time sleep detection and warning system to ensure driver's safety based on
EEG

Conference Paper · April 2016


DOI: 10.1109/DDECS.2016.7482475

CITATIONS READS
5 719

4 authors, including:

Micheal Saleab Mohamed Abd El Ghany


Technische Universität München The German University in Cairo
6 PUBLICATIONS 34 CITATIONS 103 PUBLICATIONS 662 CITATIONS

SEE PROFILE SEE PROFILE

Klaus Hofmann
Technische Universität Darmstadt
151 PUBLICATIONS 567 CITATIONS

SEE PROFILE

All content following this page was uploaded by Micheal Saleab on 18 December 2020.

The user has requested enhancement of the downloaded file.


Real-Time Sleep Detection and Warning System to
Ensure Driver’s Safety Based on EEG

Michael S. Saleab*, Mohamed A. Abd El Ghany**, Ramez M. Toma*, Klaus Hofmann***


Electronics Engineering Dept., German University Cairo, Egypt*
Electronics Engineering Dept., German University Cairo, Egypt, TU Darmstadt, Germany**
Integrated Electronics Systems Lab, TU Darmstadt, Germany***
Emails: micheal.salib@student.guc.edu.eg, mohamed.abdel-ghany@guc.edu.eg,
ramez.toma@student.guc.edu.eg, klaus.hofmann@ies.tu-darmstadt.de

Abstract—A Real-Time Sleep Detection and Warning System hospital or being under supervision[9]. Although different
for Driver’s Safety Based on EEG is proposed and implemented researches had been issued In Sleep Detection and Warning
to ensure the safety for the drivers and pilots. This system is System, non of them provided vital signs monitoring system.
implemented to estimate and measure the driver attention, the
percentage of oxygen in the blood of the driver and to check if
driver is failing a sleep. The design and implementation of oxygen The main focus of this paper is to present an efficient Sleep
saturation sensor is also provided. In addition this system Detection and Warning System using brain sensor. It operates
contains a Real time vital signs monitoring system to measure the with low power and fully wearable that can be used outdoors.
vital signs values. The proposed system achieved an Accuracy of The oxygen saturation sensor is proposed to make an
96.3%, 100% of sensitivity, 92.4% of Predictability and 93% integrated efficient and wearable system. The system also
Specificity. The accuracy, predictability and specificity of the provides Electrocardiography, Electrical conductance of the
vital signs monitoring system is increased by 2%, 3% and 1%, skin which can be used to detect the driver emotional status. It
respectively. is critical to implement a system that can be used outdoors
without the need of personal computer. In addition a Real-time
Keywords-brain sensor; monitoring system; wearable device; Vital Signs monitoring system is added to the system to check
avionics; real-time; vital signs; drowsiness; pilot; driver; EEG the driver medical status The architecture of the proposed
system is shown in Figure 1.
I. INTRODUCTION
Sleep Detection and Warning System to Ensure Driver’s
Safety is a system which measures the driver attention and
check if driver is sleeping as described in[1][2][3][4]. It also
sends alerts to the driver if the driver is not concentrated in
driving or if the driver is sleeping.

Real-time Vital Signs monitoring system[5][6][7][8] is a


system which monitors the vital signs of the driver on a real-
time scale which can be viewed by the driver anywhere and
anytime and can be transmitted to his supervisor over Internet
[9]. The Real-time Vital Signs monitoring system is added to
the Sleep Detection and Warning System to ensure that the
driver medical status is in good condition and to check that the
driver is eligible to drive. The vital signs of any driver are
very critical and essential to be monitored. As any changes
that may happen may affect the driver health. Driver vital
signs and emotional parameters are mainly Heart Rate (HR), The paper is organized as follows: In Section II, an
Blood Pressure (BP), Oxygen Saturation (SPO2)[10][11], architecture of the efficient Real-time Vital Signs Monitoring
Glucose Level, Body Temperature (T) and Muscle System is proposed. Data collection from the sensors and
Stamina(M). These parameters are critical to be reported for devices to the control unit is presented in Section III. In
some drivers that are exposed to some diseases. As the change Section IV, the designing and implementation of the oxygen
in any of these parameters may affect drivers health saturation sensor is provided. Some implementation results of
negatively. The System allows the doctor (Supervisor) to view the Sleep Detection System is presented in Section V. In
and save these parameters at any time over Internet on a section VI, the implementation of the Vital Signs Monitoring
database[12]. The real time system which patient can monitor System is presented. Finally, some conclusions are provided in
their vital sign at home or anywhere without remains at the Section VII.
II. VITAL SIGNS MONITORING SYSTEM 2) Oxygen saturation sensor: In the proposed and
implemented system an Oxygen saturation sensor is
The Real-time Vital Signs monitoring system is consist of designed. The sensor measures the signal and transmits it
sensors, control/processing unit, bluetooth module, driver to the control unit. The oxygen saturation sensor process
monitoring and supervisor monitoring devices as shown in is described in details in section IV.
Figure 2. The medical sensors are to send the vital activities
measurements to the control unit. This control unit analyze the 3) Body Temperature sensor: This sensor contains a
data and transmits it via Bluetooth module. variable resistance. The variable resistance is very
sensitive to the temperature. [13] An algorithm is
designed to convert the value of resistance to
temperature using control unit. A process is designed to
measure the voltage and current. The variable resistance
is provided which is used to detect the exact value of
temperature.

4) Galvanic skin response (GSR) sensor kit: GSR, stand-ing


for galvanic skin response. It is a method of measuring
the electrical conductance of the skin. Using the
electrical conductance of the skin, the emotional status
can be measured. The Galvanic skin response transmits
the change of electrical conductance of the skin in the
The Bluetooth module sends this data to the driver devices. form of voltage to the control unit. The emotional status
This project contains two applications for the driver; one on is detected using this voltage graph.
the driver smart phone and another one on the driver personal
computer. The driver devices give the driver alarm if there is
problem in his vital activities. The driver devices send all the 5) Muscle sensor kit: This sensor measures the muscle
vital activities measurements to the server. activity by detecting its electric potential, referred to as
electromyography (EMG). The sensor transmits the
The server receives the vital activities measurements to the measured signal to the control unit. This signal used to
server from all the driver and put this data in organized format measure the Muscle stamina. An amplified, rectified, and
and saves it in a text file. Then it sends the information’s to the smoothed signal is proceed and converted to digital
supervisor devices. The system contains two applications for signal using ADC (Analog to Digital converter) in the
the supervisor; one on his smart phone and another one on his control unit block.
personal computer. The supervisor can choose which driver he
wants to see his data from his personal applications. The This system consists of 2 devices, these 2 devices are
supervisor can send his recommendations to this driver. In described below. In addition, an infrared device is used to
section III data collection process will be described. transmit data.

III. DATA COLLECTION FROM THE SENSORS AND DEVICES TO 1) ACCU-CHEK Performa: Wireless infrared connected
THE CONTROL UNIT device which records the blood glucose level.

The system consists of 5 sensors and 2 devices. All of these 2) ACCU-CHEK Smart Pix: Infrared device that collects
sensors send the data to the control unit. The control unit the data from ACCU-CHEK Performa and transmits this
collects this data as an input. The control unit has an algorithm data to personal computer or the control unit.
that receives the signals from the sensors and processes the
signals to get vital activities values. The sensors are used to 3) BOSO-Medicus prestige: A Blood pressure monitor that
measure the exact values of the vital activities as follows: measures and saves the data. Then the data is transmits
via Bluetooth.
1) Pulse sensor: Is a very small sensor which provides
measurements at user defined time intervals. It measures The control unit of the proposed design receives the measured
heart rate, inter-beat interval and electrocardiography. signals from all these sensors, process these signal, converts it
The pulse sensor transmits a signal to the control unit. to digital data and puts this data in the form that can be
First the resolution of the signal must be high enough to transmitted using bluetooth. In this design AVR Atmega328p
make the difference between the beats clear and chip is used as a control unit. The control unit is responsible to
observable. A beat to beat timing resolution of 2 convert the signals from the sensors to real vital activities
milliseconds is achieved with sample rate of 500 Hz. In values. Figure 3 is a diagram shows the transmission of the
addition a real time sample counter is established to data to the control unit and the conversation of the signals to
receive the signal from the sensor in real time with
almost no time delay. vital activity measurements using the control unit.
As shown in Figure 4, the transmitter circuit transmits the
optical signal to the receiver. The receiver unit consists of
optical receiver to receive the signal and processing unit to
convert the optical signal to analog signal. The receiver unit
transmits the analog signal to the control unit. The control
unit converts the analog signal to digital and transmits the
oxygen saturation value to the system.

A. Oxygen Saturation Transmitter Circuit

The transmitter circuit is responsible to transmit the light to


the blood vessels. Hemoglobin and Deoxy-Hemoglobin are
sensitive to light with wave length 650nm and 1000nm. The
red light has a wave length range between 620nm and 750nm
and infrared light has a wave length close to 1000nm. So these
IV. OXYGEN SATURATION SENSOR two light sources LED’s can be used as emitter sources; the
red LED for Deoxy-Hemoglobin and the infrared LED for
The main objective of the proposed system is to make it Hemoglobin.
wearable system. The sensors are used instead of devices to
reduce the total power consumption. The control unit is B. Oxygen Saturation Receiver Circuit
responsible for the process operations for all the sensors. The
oxygen saturation sensor is proposed to detect the exact value The receiver circuit is implemented to receive the light from
of oxygen in the blood. The real time value is measured and the transmitter and convert this optical signal to analog signal
transmitted to the system and the system updates this value that can be transmitted to the control unit. The core of this
immediately. circuit is the OPT-101 IC which is responsible to receive the
optical signal and converts this signal to analog signal. The
The core theory behind the oxygen saturation sensor is the analog signal is received by the control unit, that will convert
variance of absorption of photons. These photons go to the the analog signal to digital signal.
human tissues with different wavelengths. The vessels under
the tissues carry two types of blood; Deoxy-Hemoglobin and C. Oxygen saturation control unit
Hemoglobin. The Hemoglobin is oxygenated and the Deoxy-
Hemoglobin is deoxygenated. The control unit is the brain of the sensor. The control unit is
responsible to sent a square wave signal to the transmitter
These two types of blood are used to measure the percentage LEDs (Red LED and Infrared LED). In addition, it receives
of oxygen in the blood. When a light have a wave length range the output from the receiver circuit. This control unit converts
from 650nm-1000nm[10][11], it is most probably to be the received optical signal to analog signal. Then the
absorbed by the oxygen. The other tissues in the body, have a processing operation is achieved to estimate the percentage of
very low absorption coefficient compared with Hemoglobin oxygen in blood as shown in eq. 1 and 2.
and Deoxy-Hemoglobin. When a light with wavelength
around 650nm is emitted to human blood, it will be absorbed
by Deoxy-Hemoglobin. When a light with wavelength around
1000nm is emitted to human blood, it will be absorbed by
Hemoglobin. The ratio between the light absorbed by
Hemoglobin and Deoxy-Hemoglobin is used to calculate the
oxygen percentage in blood as shown in Equations 1 and 2 in
section V part C .

The Parameters of the above Equations:

• ARED is the rate of absorb of the light from the Red LED.

• AIR is the rate of absorb of the light from the IR LED.

• BloodOx is percentage of oxygen in the blood.


V. SLEEP DETECTION SYSTEM IMPLEMENTATION • B is the threshold of high alpha.

A Real-Time Sleep Detection and Warning System is • b1 and b2 are constants, this constants are derived by
proposed and implemented using an EEG headset. This system comparing the baseline signal to the signal amplitude
can be used for drivers and pilots to check their concentration. during sleeping.
The system will sends alarms to the drivers when they are
beginning to fall asleep. The concept of this system is an • B1 is high alpha mean.
algorithm designed to filter the signal from EEG to 4
categories low Beta, high Beta, low alpha and high alpha[14]. • B2 is high alpha standard deviation.
The Neurosky Mindset headset EEG is used in this system as
an EEG electrode. The Neurosky Mindset headset estimate the
alpha, beta, theta and gamma waves comes from the brain and
transmits their values using Bluetooth technology. The
measurements from the Neurosky Mindset headset is processed
using an algorithm in the control unit. This algorithm based on
dividing the signal into 30 seconds baseline signal, and divide
this 30 seconds signal into 15360 baseline signal.
Incase of falling asleep the driver smartphone will produce a Using Neurosky brains sensor headset the proposed Sleep
warning alarm, eq.3 and eq.5 is for calculating low alpha Detection System is implemented shows an accuracy of 97.4%
threshold and high alpha threshold respectively. And eq.4 for and the Kappa value is 91%. Using the calculation methods
comparing low alpha threshold with the low alpha signal from in[15], given the collecting 20 data sets from 30 driver to have
the brain-sensor. Also eq.6 is for comparing high alpha a total 600 drivers data, the performance parameters are
threshold with the high alpha signal from the brain-sensor. calculated. By comparison with others Sleep Detection
Systems as conducted in table I the proposed and implemented
system shows a positive values. In addition this system uses
If the case of eq.4 and eq.6 is confirmed this means that low power, wearable and can be used outdoors. Also the
driver is sleeping. proposed system estimate the concentration percentage and
the sleeping status and transmit it to the driver smartphone. As
conducted in table I.

• A is the threshold of low alpha.


• a1 and a2 are constants, this constants are derived by
comparing The baseline signal to the signal amplitude
during sleeping. VI. VITAL SIGNS MONITORING SYSTEM
IMPLEMENTATION
• A1 is low alpha mean.

• A2 is low alpha standard deviation. The Vital Signs Monitoring System consists of two parts;
hardware part and software. The hardware part consists of 5
sensors, 2 small devices and control unit as described in
section III. The control unit is implemented using micro-
controller chip (AVR Atmega328p). The printed circuit board
(PCB) is designed using Eagle tool and implemented in a very
small scale.

The software of the Vital Signs Monitoring System consists


of 4 applications, 2 Android applications and 2 applications
for the personal computer. The driver has Android application
on his smart phone and another one on his personal computer.
The supervisor has also one on his personal computer and
another one on his smart phone. These applications are
provided to present the vital activities of the drivers;
Electrocardiography, Electrical conductance of the skin, Heart
Rate (HR), Inter-beat interval (IBI), Blood Pressure (BP),
Oxygen Saturation (SPO2), Glucose Level, Body Temperature application will sent S.M.S to the emergency calling for
(T) and Muscle Stamina(M). In addition, the emotional status ambulance, in addition to another S.M.S to his supervisor as
could be provided. This applications will notify the driver in shown in Figure 5.
real time if he has any vital problem or emotional problem. If
there is any parameter has a value more than or less than the
average value the driver applications will notify the driver and
also will sent a notification to the driver supervisor to make
him view this driver data.

The software of the Vital Signs Monitoring System consists


of 4 applications, 2 Android applications and 2 applications
for the personal computer. The driver has Android application
on his smart phone and another one on his personal computer.
The supervisor has also one on his personal computer and
another one on his smart phone. These applications are
provided to present the vital activities of the drivers;
Electrocardiography, Electrical conductance of the skin, Heart
Rate (HR), Inter-beat interval (IBI), Blood Pressure (BP),
Oxygen Saturation (SPO2), Glucose Level, Body Temperature Using Biomedical sensors, devices and server the proposed
(T) and Muscle Stamina(M). In addition, the emotional status Real-time Vital Signs Monitoring System is implemented. The
could be provided. This applications will notify the driver in accuracy of the proposed system is 97% and the Kappa value
real time if he has any vital problem or emotional problem. If is 93%. Using the calculation methods in [15], given the
there is any parameter has a value more than or less than the collecting 10 data sets from 90 driver to have a total 900
average value the driver applications will notify the driver and drivers data, the performance parameters are calculated. The
also will sent a notification to the driver supervisor to make proposed system improves the performance as compared to
him view this driver data. the conventional system. In addition, the proposed system is
fully wearable no need to a personal computer. It consumes
The average value for the temperature is 37 degree celsius. low power as it is mostly dependent on reduced power sensors
A normal resting heart rate for adults ranges from 60 to 100 instead of the devices used in the previous work. This feature
beats a minute, and if there is a workouts the normal will be makes the system outdoors-friendly. A comparison between
120. The blood pressure perfect value is (120/80). Oxygen different systems is conducted in Table II.
saturation percentage should be higher than 95%.
In addition the proposed system has user-friendly
The average value of the glucose percentage in blood during applications and interface, no need for an expert to use it. It
fasting should range between 70 to 100, and less than 140 could be used by any one in no time. It also works in real time
after eating. [16] shown the average values stated by Missouri so the measurements are always synchronized. The accuracy
State University. And if there is a problem in the muscle is the degree to which the result of a measurement,
stamina the stamina value will be lower than 500. If the calculation, or specification conforms to the correct value or
system shows negative results which means results out of this the standard. Sensitivity is is an absolute quantity, the smallest
range the system will contact the emergency and will sent absolute amount of change that can be detected by a
alarm to the driver supervisor. The emotional status is measurement. Predictability is the degree to which a correct
estimated according to change of the signal. As if the signal prediction of a system’s state can be made either qualitatively
shows steady graph this means that the driver is in relaxation or quantitatively. Specificity relates to the test’s ability to
status, and if there is disturbance in the signal this means that correctly detect drivers without a problem.
the driver is hungry, and if there is sudden change in the signal
this means that the driver is under stress.

This server saves the data of each driver in a text file that
shows all the parameters and time. Thus there is a file that
saves the data of each driver, the supervisor can view this log
at any time. If there is a problem in server, this file will be
saved immediately on the supervisor personal computer. The
supervisor has Android application on his smart phone, and
another one on his personal computer. The supervisor can sent
his recommendations to the driver through the server. The Vital Signs Monitoring System achieves an Accuracy of 97%,
driver can read this recommendations using the driver 100% of sensitivity, 93% of Predictability and 94% of
applications. In the implementation of the proposed system a Specificity. The accuracy of the proposed system is increased
feature is added to the proposed system to integrate the by 2% as compared to the conventional monitoring system.
proposed system with the hospital and the emergency. If the The predictability and specificity of the Vital Signs
driver has a problem in his vital activities, the driver android Monitoring System are increased by 3% and 1%, respectively.
VII. CONCLUSION Technologies (CISTI), 6th Iberian Conference on, pp. 1-6, September
2011.

In this paper the Real-Time Sleep Detection and Warning [6] A.E. Tan K.K.M. Chan and K. Rambabu. ”Circularly Polarized Ultra-
System to Ensure Driver’s Safety Based on EEG is proposed Wideband Radar System for Vital Signs Monitoring”. IEEE Transactions
and implemented. The oxygen saturation is also implemented on Microwave Theory and Techniques, vol. 61, no. 5, May 2013.
to estimate the oxygen percentage in the blood. The proposed
system is fully wearable system. First every system is [7] J. Dominguez G. Boothby A. Das V. Lopez-J. Nguyen T. ; Banister R.E. ;
Lie D.Y.C. Hall, T. Tsay. ”Robust Phased Array Non-Contact Vital Signs
implemented separately to compare the system with others Monitoring in an Office Cubicle Setting”. Intelligent Green Building
implemented to system to make sure that the system accuracy and Smart Grid (IGBSG), pp. 1-4, April 2014.
and efficiency is acceptable. Then both systems the Real-Time
Sleep Detection and the Vital Signs Monitoring System is [8] H. Nor N.M. Ibrahim T. Nyamasvisva T.E. Gulcharan, N.F.I. Daud.
integrated together on the same control unit. ”Investigation and Development of Remote Vital Signs Monitoring
Device Using Wireless Communication”. Intelligent and Advanced
Systems (ICIAS), 2014 5th, pp. 1-6, June 2014.
The warning system (Vital Signs Monitoring System) shows
positive results The system performs Accuracy of 97%, 100% [9] M. M. Baig and H. GholamHosseini. ”Wireless remote patient moni-
of sensitivity, 93% of Predictability and 94% Specificity. The toring in older adults”. Engineering in Medicine and Biology Society
accuracy of the proposed system is increased by 2% as (EMBC), 35th Annual International Conference of the IEEE, pp. 2429-
compared to the conventional monitoring system. The 2432, July 2013.
predictability and specificity of the proposed system are
[10] Yong-Su Seo Young-Dong Lee, Sang-Joong Jung and Wan-Young
i n c r e a s e d b y 3 % a n d 1 % , r e s p e c t i v e l y. A l s o Chung. ”Measurement of Motion Activity during Ambulatory Using
Electrocardiography and Electrical conductance of the skin is Pulse Oximeter and Triaxial Accelerometer”. Third International
added to the system. The Real-Time Sleep Detection system Conference on Convergence and Hybrid Information Technology pp.
shows also positive results it shows an accuracy of 97.4%, 436 - 441, November 2008.
100% of Sensitivity and 96% of Specificity.
[11] Mike McEvoy. ”Oxymoron: Our Love-Hate Relationship with Oxygen”.
16th Annual Respiratory Care Symposium Rising to the Challenge: A
The Vital Signs Monitoring System and the Real-Time Sleep Pulmonary Medicine Update, March 2010.
Detection system is integrated on the same system using the
same control unit to implement a new system. This new [12] M. Rajarajan D. Weerasinghe and V. Rakocevic. ”Device Data Protection
system can ensure 100% of safety for the drivers and pilots as in Mobile Healthcare Applications Electronic Healthcare”. Springer
all the vital signs parameters in addition to the emotional Berlin Heidelberg, vol. 0001, pp. 82-89, September 2008.
status and the electrocardiogram is measured. Also the Real-
[13] ”advanced industrial systems”. http://www.advindsys.com/ApNotes/
Time Sleep Detection system is added to measure the driver YSI400SeriesProbesRvsT.htm.
concentration percentage also to produce warning if the driver
is start to falling asleep. [14] Sotelo M.A. Barea R. Lopez M.E Bergasa L.M., Nuevo J. ”Real-Time
system for monitoring driver vigilance”. IEEE Trans. Intell. Transp.
Post the integration the two system into one system. The Syst, 2006.
system performs Accuracy of 96.3%, 100% of Sensitivity,
[15] H. L. Kundel and M. Polansky. ”Measurement of observer agreement”.
92.4% of Predictability and 93% Specificity. Radiology journal, vol. 228, pp. 303-308, August 2003.

REFERENCES [16] https://shp.missouri.edu/pt/pdf/emergency.pdf. Missouri State Univer-


sity.
[1] Ruei-Cheng Wu Sheng-Fu Liang Wen-Hung Chao Yu-Jie Chen Chin- Teng
Lin, Fellow and Tzyy-Ping Jung. ”EEG-Based Drowsiness Estimation [17] M. J. Connolly M. M. Baig, H. Gholamhosseini and G. Kashfi. ”Real-
for Safety Driving Using Independent Component Analysis”. IEEE time Vital Signs Monitoring and Interpretation System for Early
trasnactions on circuits and systems, regular papers, vol.52, no.12, Detection of Multiple Physical Signs in Older Adults”. Biomedical and
December 2005. Health Informatics (BHI) IEEE-EMBS International Conference pp. 355
- 358, June 2014.
[2] Bryan Van Hal. ”Real-time Stage 1 Sleep Detection and Warning System
Using a Low-Cost EEG Headset”. MSC thesis in GRAND VALLEY [18] M. M. Baig. ”Smart Vital Signs Monitoring and Novel Falls Prediction
STATE UNIVERSITY Partial Fulfillment of the Requirements For the System for Older Adults”. PHD thesis Auckland University of Tech-
Degree of Masters of Science in Engineering, April 2014. nology in fulfilment of the requirements for the degree of Doctor of
Philosophy (PhD), 2014.
[3] Chung W-Y Lee B-G, Lee B-L. ”Mobile Healthcare for Automatic Driving
Sleep-Onset Detection Using Wavelet-Based EEG and Respi- ration [19] C. Saez M. Guarini A. Cipriano B. Garayar G. Lema R. Canessa C.
Signals ”. Sensors (Basel, Switzerland), September 2014. Sacco C. Oberli, J. Urzua and M. Irarrazaval. ”An expert system for
monitor alarm integration”. Journal of Clinical Monitoring and
[4] Mikaili M Mardi Z, Ashtiani SNM. ”EEG-based Drowsiness Detection for Computing, vol. 15(1), pp. 29- 35, January 1999.
Safe Driving Using Chaotic Features and Statistical Tests ”. Journal of
Medical Signals and Sensors., May 2011.

[5] Guimaraes J.A. Fernandes, B. and R. Simoes. ”Vital Signs Monitoring and
Management using Mobile Devices”. Information Systems and

View publication stats

You might also like