Development of Drowsiness Detection System using Random Forest Classifier on Electrocardiogram Signals

  • nuryani nuryani Jurusan Fisika, Universitas Sebelas Maret
  • Khoirun Nisak Universitas Sebelas Maret
  • Artono Dwijo Sutomo Universitas Sebelas Maret


Drowsiness is suggested as the most frequent factor in traffic and manufacture accidents. Therefore, a system which can early detect drowsiness is important for an effort to reduce accident number. This article presents a new method for drowsiness detection. The method uses electrocardiogram (ECG) and a Random Forest. Features of normal-to-normal interval (NNI) from ECG for the input of the detection system are investigated. The features include NNI characteristics in terms of time domain i.e the statictics of NNI, and in terms of frequency domain i.e. NNI signal characteristics in VLF until HF band. The level of drowsiness is categorized using Karolinska Sleepiness Scale (KSS) becoming two groups i.e. drowsy and awake. Classification algorithm used is the detection is Random Forest. In the Random Forest, the effect of the number of estimator and maximum feature to the detection performance is evaluated. The detection system is tested using data of drowsy study. The test show that the detection system performs 94.61%, 96.67% and 91.67% in terms of accuracy, sensitivity and specificity, respectively.


WHO, Global Status Report on Road Safety 2018, Geneva, Switzerland: World Health Organization, 2018.

J. He, W. Choi, Y. Yang, J. Lu, X. Wu, dan K. Peng, “Detection of Driver Drowsiness Using Wearable Devices: A Feasibility Study of the Proximity Sensor,” Applied Ergonomics, Vol. 65, hal. 473-480, Nov. 2017.

J.D. Slater, “A Definition of Drowsiness: One Purpose for Sleep?” Med. Hypotheses, Vol. 71, No. 5, hal. 641-644, Nov. 2008.

K. Kaida, M. Takahashi, T. Åkerstedt, A. Nakata, Y. Otsuka, T. Haratani, dan K. Fukasawa, “Validation of the Karolinska Sleepiness Scale against Performance and EEG Variables,” Clin. Neurophysiol., Vol. 117, No. 7, hal. 1574-1581, Jul. 2006.

A. Shahid, K. Wilkinson, S. Marcu, dan C.M. Shapiro, Eds., STOP, THAT and One Hundred Other Sleep Scales, New York, USA: Springer Science & Business Media, 2012.

J. Vicente, P. Laguna, A. Barta, dan R. Bailón, “Drowsiness Detection Using Heart Rate Variability,” Med. Biol. Eng. Comput., Vol. 54, No. 6, hal. 927-937, Jan. 2016.

B. Singh dan N. Bharti, “Software Tools for Heart Rate Variability Analysis,” Int. J. Recent Sci. Res., Vol. 6, No. 4, hal. 3501-3506, Apr. 2015.

G.S. Wagner dan D.G. Strauss, Marriott’s Practical Electrocardiography, Philadelpia, USA: LWW, 2013.

O. Maftukhaturrizqoh, “Deteksi Kantuk Menggunakan Jaringan Saraf Tiruan dengan Fitur Statistik RR Elektrokardiogram,” Skripsi, Universitas Sebelas Maret, Surakarta, Indonesia, Jul. 2018.

A. Shalihah, “Sistem Deteksi Kantuk Menggunakan Jaringan Saraf Tiruan (JST) dan Particle Swarm Optimization,” Skripsi, Universitas Sebelas Maret, Surakarta, Indonesia, Sep. 2019.

A. Liaw dan M. Wiener, “Classification and Regression by randomForest,” R News, Vol. 2/3, hal. 18-22, Des. 2002.

Q. Massoz, T. Langohr, C. François, dan J.G. Verly, “The ULg Multimodality Drowsiness Database (Called DROZY) and Examples of Use,” 2016 IEEE Winter Conf. Appl. Comput. Vis. (WACV), 2016, hal. 1-7.

P. Hamilton, “Open Source ECG Analysis,” Comput. Cardiol., 2002, hal. 101-104.

K.K. Parhi dan M. Ayinala, “Low-complexity Welch Power Spectral Density Computation,” IEEE Trans. Circuits Syst. I: Regul. Pap., Vol. 61, No. 1, hal. 172-182, Jun. 2013.

P. Gomes, P. Margaritoff, dan H. Silva, “pyHRV: Development and Evaluation of an Open-source Python Toolbox for Heart Rate Variability (HRV),” Proc. Int. Conf. Electric., Electron. Comput. Eng. (IcETRAN), 2019, hal. 822-828.

Y. Isler, “Discrimination of Systolic and Diastolic Dysfunctions Using Multi-layer Perceptron in Heart Rate Variability Analysis,” Comput. Biol. Med., Vol. 76, hal. 113-119, Sep. 2016.

A. Sarica, A. Cerasa, dan A. Quattrone, “Random Forest Algorithm for the Classification of Neuroimaging Data in Alzheimer's Disease: A Systematic Review,” Front. Aging Neurosci., Vol. 9, hal. 1-12, Okt. 2017.

M. Ghaderzadeh, R. Fein, dan A. Standring, “Comparing Performance of Different Neural Networks for Early Detection of Cancer from Benign Hyperplasia of Prostate,” Appl. Med. Inform., Vol. 33, No. 3, hal. 45-54, Sep. 2013.

How to Cite
nuryani, nuryani, Khoirun Nisak, & Artono Dwijo Sutomo. (2021). Development of Drowsiness Detection System using Random Forest Classifier on Electrocardiogram Signals. Jurnal Nasional Teknik Elektro Dan Teknologi Informasi, 10(3), 265-271.