Developing an Algorithm for High-Resolution Detection of Drowsiness Using Electroencephalogram

Hassan, Ahnaf Rashik 1, 2 ; Kabir, Muammar 1, 2 ; Saha, Shumit 1, 2 ; Zhu, Kathy 1 ; Keshavarz, Behrang 1, 3 ; Yadollahi, Azadeh 1, 2

1 Toronto Rehabilitation Institute – University Health Network ; 2 Institute of Biomaterials and Biomedical Engineering, University of Toronto ; 3 Department of Psychology, Ryerson University

Background: In Ontario, 20-25% of all car accidents are related to drowsiness or fatigued driving. Existing drowsiness detection systems often yield poor detection performance and are expensive and reliant on various external factors such as vehicle type, lighting conditions, and road geometry. The purpose of this study is to develop an efficient, high-resolution, and reliable algorithm to detect drowsiness using electroencephalogram (EEG). To achieve this goal, we will primarily develop and validate an algorithm using EEG data collected from a sleep study. Subsequently, the developed algorithm will be tested and validated in a driving simulator study.

Methods: In the proposed framework, EEG signals collected from 53 subjects during an overnight sleep study were first filtered using a bandpass filter with cut-off frequencies of 0.5-35 Hz. Then the filtered signal was segmented on 3-s basis to obtain the highest possible temporal resolution. All awake and non-rapid eye movement stage 1 segments were used for drowsiness detection. Next, relative power of alpha (8-13 Hz), beta (13-30 Hz), and delta (0.5-4 Hz) were computed. Each of these features was subsequently fed into a sigmoid function, which provides smooth transition from wakefulness to sleep state and thus the probability of being awake. Subsequently, the sigmoid outputs were weighted and averaged to obtain the likelihood of wakefulness for each of the 3-s EEG segments. Lastly, three clusters, namely wakefulness, drowsiness, and sleep, have been identified by appropriately thresholding the probability of wakefulness values. For validation, 50% of the data were used as training and the remainder as testing. Statistical analyses and cluster quality evaluation metrics such as silhouette and Davies-Bouldin indices were used for validation. 

Results: The proposed method successfully separated the two most distinct cases of alertness, namely arousals and deep sleep (non-rapid eye movement stages 2 and 3). Furthermore, the three clusters consistently gave increasing high delta and low alpha and beta powers from wakefulness to sleep. Moreover, the mean silhouette value on the test data was 0.74 and the Davies-Bouldin index value was 0.43, which indicated that the three discovered clusters are compact and their centers are far from one another. Based on the silhouette value of each data point, the drowsiness detection accuracy of the proposed method was 93.21% on the test data. One-way repeated measures analysis of variance results suggested that the feature values are significantly different (p<0.0001) among the three discovered clusters. 

Conclusion: This work developed a high-resolution and efficient drowsiness detection algorithm using sleep-EEG data. The proposed method was able to detect short episodes of wakefulness, drowsiness, and sleep with high accuracy. Upon its successful validation in a driving study, the proposed model has the potential to lead to the development of a high-resolution and efficient drowsiness detection algorithm based on wearable EEG headbands.