Human drowsiness refers to a physiological state of reduced mental or physical performance resulting from insufficient sleep, long duty periods or irregular work hours. It is attributed to millions of car crashes  , 4% - 7% of civil aviation incidents  , and 3% of maritime accidents  . Detecting the operator’s drowsiness in real-time is a key to prevent such kinds of tragedies.
Conventional optical methods for detecting fatigued driving are unreliably sensitive to lighting conditions  and difficult to be extended for drug and alcohol use. Existing studies in sleep science and psychology    are not suited to real-time applications in transportation. To classify the drowsiness, tra- ditional machine learning  requires a large amount of training data to tune the weights of an artificial neural network. The training data are dependent upon changes due to different test subjects. There is an urgent need to develop a formula (or algorithm) that is relatively invariant with test subjects and does not need a significant amount of training data such that it is ready to be used in real time for any random driver or operator. Another problem of existing methods is the low accuracy of predicting drowsiness   -  .
The main goal of this paper is to design a new polling algorithm for real-time determination of human drowsiness via an affordable brain-computer interface with the following features:
1) Real-time data acquisition: data sampling window is controlled within one second for computing drowsiness.
2) Real-time data processing: execution time of the algorithm alone is controlled within one millisecond.
3) General algorithm: a general-purposed polling formula is designed and is approximately invariant with test subjects. It does not need the tuning from training data, overcoming a major drawback of existing methods.
4) Affordability: the brain-computer interface is controlled under $200, excluding the cost of computer.
The rest of this paper is organized as follows. In Section 2, the materials and methods related to this study are provided. Next, experimental and computing results are given in Section 3 together with discussion. In Section 4, some conclusions and future work are presented.
2. Materials and Methods
In this study, two types of brain-computer interface devices were used:
1) A product from Open BCI (data sampling rate: 250 Hz).
2) A product from Emotiv (data sampling rate: 128 Hz).
Both companies sell products under $200, which are affordable to regular users, as shown in Figure 1.
Figure 1.Test devices. (a) OpenBCI device; (b) Emotiv device.
In details, the following main materials were used, as shown in Figure 1:
1) Gold-coated electrodes and conductive paste (Open BCI).
2) A data acquisition board (Open BCI).
3) A data wireless receiver (Open BCI).
4) A battery power unity (Open BCI).
5) Integrated electrodes and a data acquisition unit (Emotiv).
6) A data wireless receiver (Emotiv).
7) A bottle of all-purpose saline solution (Emotiv).
The outline of our approach is given in Figure 2(b). First, a brain-computer interface device was used to get the brain wave data of test subjects, as illustrated in Figure 2(a). Then, the data was input into the MATLAB software. In MATLAB, a general-purpose polling algorithm was implemented for computing the depth of drowsiness. Last, the computed depth of drowsiness was compared with the inquired depth of drowsiness and with one of the existing methods  .
10 - 20 system is an internationally recognized method to specify the location of scalp electrodes for electroencephalography (EEG) test  . In this paper, two ear positions (A1 and A2) were used as a reference and a bias position. Based on the previous studies in sleep science, P3 and C4 (or P7 and F4) were chosen as measurement points for obtaining brain waves of test subjects. Five frequency bands (delta, theta, alpha, beta and gamma) of brain waves are defined by Figure 3(b).
Figure 2. Outline of our approach. (a) A brain-computer interface; (b) Overall approach of our method.
Figure 3. Brain map, signal processing, and frequency bands. (a) Brain map (source: NR Sign Inc.); (b) Different frequency bands of brain waves; (c) Example of Fourier transform (source: Wikipedia.org).
Brain waves contain much random information that is difficult to be analyzed in time domain (Figure 3(b)). Fourier transform was used to convert the waves to frequency domain (Figure 3(c)) by using Equation (1). It is a tool to break a brain wave into a set of sine or cosine functions with different amplitudes and frequencies:
・ is a brain wave (time function)
・ is a frequency, ,
・ is the length of sampling window
・ Euler’s formula:
・ represents the amount of frequency in the breakup
In frequency domain, the norm of different frequency bands (delta, theta, alpha, beta and gamma) is defined as biometric markers for drowsiness:
where is the normalized amplitude of Fourier transform of the brain wave at frequency. The normalization is done by a division from sampling frequency Fs (128 or 250 Hz in this paper). Normalized band norms are defined as
A general-purpose polling formula was designed to predict the human drowsiness:
1) Traditionally, the drowsiness is quantified by a binary variable: Yes or No, which is not accurate enough to describe such a complex process. A real number variable, depth of drowsiness, is proposed to precisely describe the different levels of drowsiness ().
2) In computer graphics  , millions of different colors are represented by a linear combination of three basic components: RGB, where R, G, B represent red, green, and blue components, respectively. Inspired by this treatment, the drowsiness is represented by a linear combination of several basic frequency components.
3) In sleep science, different frequency channels are often used to investigate sleep patterns. In signal processing, Fourier transform  is an effective tool to convert signals from time domain to frequency domain, and the norm of frequency bands can be used as basic components to quantify human drowsiness. Thus, the norm of frequency bands of brain waves is considered as biometric markers for drowsiness in this paper.
4) Inspired by political voting, a new polling scheme, i.e., judging the drowsiness on the basis of the vote of frequency bands, is designed to express the relation between the depth of drowsiness and the norm of frequency bands:
, , ,
where Nδ, Nθ, Nα, Nβ, Nγ are normalized band norms for δ, θ, α, β, and γ channels, respectively., , , are the corresponding weights.
The derivation of the above formula is given in Appendix A.
For calibrating the sampling rate of the hardware, A stopwatch and the data acquisition software of the devices were used. Table 1 shows the test data of stopwatch and acquisition software of Open BCI. The timing data are quite close to each other.
Table 2 is the time acquisition result of Emotiv device in a period of 0.5 second. It indicates that the sampling rate is 128 Hz and sampling time is quite accurate. The absolute value of voltage does not matter in this study because our formula needs only the normalized band norm, which is invariant from voltage amplitude (Appendix B).
A Human Participant Form was approved by a local IRB in 2015 and each participant gave his/her permission before the experiment. Ten human subjects were measured with names replaced by pseudo identification numbers, with four of them tested only in waking states. The main test steps of this study are:
1) Assembling and calibration of the brain-computer interface devices.
2) Design and development of the biometric algorithm (i.e., a polling scheme) as well as the setup of the brain-computer interface device.
3) Collection of brain wave data by wearing a brain-computer interface device. Measurement last for about 6 - 7 seconds at a sampling frequency (Fs = 250 Hz). Drowsy state: a) Test time was chosen around midnight; b) Subjects were asked to click the “Data Collection” button once they felt drowsy. Waking state: a) Test time was chosen during daytime; b) Severe movement was avoided.
4) Inquiry of observed depth of drowsiness from test subjects. Drowsy stage: Extremely sleepy (0.95), Very sleepy (0.8), Moderately sleepy (0.65), Lightly sleepy (0.5).Waking stage: Extremely alert (0.05), Very alert (0.2), Moderately alert (0.35), Lightly alert (0.45).
Table 1. Calibration of sampling rate of the OpenBCI device.
Table 2. Time acquisition result of Emotiv device for a period of 0.5 second.
5) Conversion of brain data to MATLAB data format and execution of the designed polling algorithm for predicting the depth of drowsiness.
6) Analysis and validation of the algorithm.
3. Results and Discussions
3.1. Brain Waves and Normalized Frequency Bands
As shown in Figure 4, plot( ) function in MATLAB was used to draw brain waves in both time and frequency domains. Bar( ) function was used to draw the normalized band norms of five frequency bands (Delta, Theta, Alpha, Beta, and Gamma).
3.2. Impact of Sensor Channels
Our biometric markers for drowsiness are roughly invariant between C4 and P3 channels, as illustrated in Figure 5. This is an important feature that eliminates
Figure 4.Measured brain waves and their Fourir transformation.(a) Waking stage;(b)Drowsy stage.
Figure 5. Influence of sensor channels on the normalized frequency bands.
stringent requirement on the location of electrodes on human scalp. It is difficult to put a sensor at the exact location of a particular channel specified by the 10 - 20 electrode system.
3.3. Data Repetition
The depth of drowsiness varies more severely in waking stage than in drowsy stage. This may be due to the fact that test subjects are more likely influenced from environment during the waking stage. Even with the variation in the waking stage, there is a clear-cut between the two stages, as shown in Figure 6. This figure plots the drowsiness measured five times on a test subject.
3.4. Execution Time
The execution time of the MATLAB code is within 1 millisecond (not including the data acquisition time, which is 1 second for each estimate), as listed in Figure 7. The sum of these two costs supports real-time applications in transportation control.
Figure 6. Fluctuation of depth of drowsiness of a test subject.
Figure 7. Execution time of our algorithm without counting data acquisition and storage.
3.5. Age Effect
The computed depth of drowsiness is also generally invariant from ages of test subjects, as illustrated in Figure 8. This avoids the need of a large amount of training data in existing methods.
3.6. Accuracy Comparison
Figure 9 provides a comparison of our method with one recent study  and indicates that our algorithm provides a more accurate clear-cut between drowsy and waking stages. In details, Table 3 shows the results of some tests in this study. The thresholds 0.65 and 0.5 were used to determine the state predictions (w: waking; d: drowsy) in the fourth and sixth columns, respectively. Red color in the table represents the failed cases. Table 4 is a summary of the comparison, indicating 82% and 70% accuracy for our method and the recent method  , respectively. Furthermore, the threshold is not sensitive to our method because any value between 0.65 and 0.75 generates a similar accuracy.
The following concluding remarks can be drawn from this study:
1) In this paper, we proposed a new concept: depth of drowsiness, which can more precisely describe the drowsiness than existing binary description.
Figure 8. Age effect of our method.
Figure 9. Accuracy comparison between our method and one recent method  . (a) A recent method; (b) Our method.
Table 3. Accuracy comparison between our method and one recent method  .
Table 4. Summary of comparing our method with one existing method based on the results of 50 test cases.
2) After many attempts, we found a set of effective biometric markers for drowsiness: normalized band norms. These markers do not change with scaling the voltage amplitude of brain waves, eliminating the need for calibrating the voltage output of the brain-computer interface devices.
3) We designed and implemented a new polling algorithm for computing the depth of drowsiness. The time cost of data acquisition and processing for each estimate is about one second, which is well suited for real-time applications.
4) Test results show that the depth of drowsiness computed by the new method is generally invariant from ages of test subjects and sensor channels (P3 and C4). This eliminates the need of training data required by existing methods. Therefore, our method is better suited to a random driver than existing methods.
5) The cost of the brain-computer interface devices (not including the computer) can be under $200, which is affordable to regular users.
6) In comparison with a recent study  , our method increases the success rate of separating drowsy and waking stages from 70% to 82%.
Possible future work may include:
1) Apply the method to a large-scale investigation.
2) Investigate an optimal way to place scalp electrodes.
3) Test the impact of environment such as vehicle vibration.
4) Extend our polling algorithm to include signals from electromyography (EMG) and electrocardiogram (EKG or ECG).
5) Study on alcohol and drug influence, blackout, road rage, and medical emergency.
A. Derivation of a Polling Formula
1) First let sleep ® 1.0 and waking ® −1.0
2) Use a linear relation to represent (a variable for the state of brain)
where Nδ and Nβ are normalized frequency bands for δ and β channels, as defined in Equation (3). cδ and cβ are two coefficients.
3) From prior knowledge in sleep science, δ channel contributes to sleep, while β channel contributes to the waking stage. Then, we have
4) Expand the contributions of θ and α channels:
where Nθ and Nα are defined in Equation (3). Assume cθ = 0.5 and cα = −0.5 for their corresponding contributions to waking and sleep stages, respectively.
5) Consider Nγ’s contribution to the waking stage, we rewrite Equation (A2) as
6) Map to by letting
where and are coefficients. is the depth of drowsiness defined in this paper.
By solving the above two equations, we have
Thus, can be expressed as
B. Proof of No Need to Calibrate the Biosensor Voltage
Theorem: The computed depth of drowsiness is invariant from scaling the amplitude of brain waves.
Given a sequence of N sample, where, , assume that the Fourier transform of the function is expressed as
where,. is called the Fourier coefficient. Assume that because of some errors in signal magnification, N samples were multiplied by a scaling factor s, leading to another Fourier coefficient:
The substitution of in Equation (2) with and respectively leads to:
By using in Equation (A9), we have
By using in Equation (A10), we have
Since, where, θ, α, β, γ based on Equations (A11) and (A13), the computed depth of drowsiness in Equation (A8) remains unchanged due to the scaling factor s.
Submit or recommend next manuscript to SCIRP and we will provide best service for you:
Accepting pre-submission inquiries through Email, Facebook, LinkedIn, Twitter, etc.
A wide selection of journals (inclusive of 9 subjects, more than 200 journals)
Providing 24-hour high-quality service
User-friendly online submission system
Fair and swift peer-review system
Efficient typesetting and proofreading procedure
Display of the result of downloads and visits, as well as the number of cited articles
Maximum dissemination of your research work
Submit your manuscript at: http://papersubmission.scirp.org/
Or contact firstname.lastname@example.org