
==== Front
Sci Rep
Sci Rep
Scientific Reports
2045-2322
Nature Publishing Group UK London

39294177
72357
10.1038/s41598-024-72357-4
Article
Internet of things based smart framework for the safe driving experience of two wheelers
Chhabra Gunjan 12
Kaushik Keshav 3
Singh Pardeep 4
Bathla Gourav 5
Almogren Ahmad 6
Bharany Salil salil.bharany@gmail.com

7
Altameem Ayman 8
Ur Rehman Ateeq 202411144@gachon.ac.kr

9
1 https://ror.org/01bb4h160 0000 0004 5894 758X Department of Computer Science and Engineering, Graphic Era Hill University, Dehradun, Uttarakhand India
2 https://ror.org/02k949197 grid.449504.8 0000 0004 1766 2457 Department of Computer Science and Engineering, Graphic Era Deemed to be University, Dehradun, Uttarakhand India
3 https://ror.org/02n9z0v62 grid.444644.2 0000 0004 1805 0217 Amity School of Engineering and Technology, Amity University, Mohali, Punjab India
4 https://ror.org/02w8ba206 grid.448824.6 0000 0004 1786 549X Department of Computer Science and Engineering, Galgotias University, Greater Noida, India
5 https://ror.org/05fnxgv12 grid.448881.9 0000 0004 1774 2318 Department of Computer Science and Engineering, GLA University, Mathura, India
6 https://ror.org/02f81g417 grid.56302.32 0000 0004 1773 5396 Department of Computer Science, College of Computer and Information Sciences, King Saud University, 11633 Riyadh, Saudi Arabia
7 grid.428245.d 0000 0004 1765 3753 Institute of Engineering and Technology, Chitkara University, Chitkara University, Rajpura, Punjab India
8 https://ror.org/02f81g417 grid.56302.32 0000 0004 1773 5396 Department of Natural and Engineering Sciences, College of Applied Studies and Community Services, King Saud University, 11543 Riyadh, Saudi Arabia
9 https://ror.org/03ryywt80 grid.256155.0 0000 0004 0647 2973 School of Computing, Gachon University, Seongnam-si, 13120 Republic of Korea
18 9 2024
18 9 2024
2024
14 2183017 3 2024
5 9 2024
© The Author(s) 2024
2024
https://creativecommons.org/licenses/by-nc-nd/4.0/ Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
Several parameters affect our brain's neuronal system and can be identified by analyzing electroencephalogram (EEG) signals. One of the parameters is alcoholism, which affects the pattern of our EEG signals. By analyzing these EEG signals, one can derive information regarding the alcoholic or normal stage of an individual. Many road accident cases around the world, including drinking and driving scenarios, which result in loss of life, have been reported. Another reason for such incidents is that riders avoid wearing helmets while driving two-wheelers. Many road accident cases involving two-wheelers, including drinking, driving, overspeeding, and nonwearing helmets, have been reported. Therefore, to solve such issues, the present work highlights the features of an intelligent model that can predict the alcoholism level of the subject, wearing of a helmet, vehicle speed, location, etc. The system is designed with the latest technologies and is smart enough to make decisions. The system is based on multilayer perceptron, histogram of oriented gradients (HoG) feature extraction, and random forest to make decisions in real time. The accuracy of the proposed method is approximately 95%, which will reduce the fatality rate due to road accidents. The system is tested under different working environments, i.e., indoor and outdoor, and satisfactory outcomes are observed.

Keywords

Machine learning
Internet of things
Smart devices
EEG signal analysis
Data analysis
Subject terms

Energy science and technology
Engineering
Mathematics and computing
Nanoscience and technology
issue-copyright-statement© Springer Nature Limited 2024
==== Body
pmcIntroduction

In India, two-wheelers are the first choice for small families and young people due to their affordability. Two-wheelers remain popular due to their low price, which makes commuting easy where public transport is unreliable, easy to handle in dense traffic, and has a lower maintenance cost. Even for women, two-wheelers are much more convenient than waiting for buses and using unsafe roads and sidewalks. According to data from government bodies, almost 70% of all vehicles on roads in large cities are two-wheelers1. The analysis of transportation sales revealed that sales doubled from 2011 to 2019, but COVID-19 significantly impacted current sales. However, market experts have predicted that sales of two-wheelers will increase by 2025. The demand for two-wheelers is increasing, as is its demand for technology. Large large companies compete to launch different two-wheeled models, such as e-bikes, racing bikes, sports bikes, and scooters. These vehicles have many advanced features to improve their riding experience and safety. Additionally, one can observe the launch of electric vehicles (EVs), making them more affordable for every class. Analyzing all these factors, India has become the world’s largest two-wheeler market, i.e., almost every second person owns at least one two-wheeler vehicle2.

On the other hand, one cannot hide the risk factors associated with two-wheeled vehicles. Indian roads are among the most dangerous roads in the world. Therefore, much research is required to safeguard two-wheeler riders. In contrast, two-wheelers are 30 times more prone to accidents than cars are, and riders suffer a high rate of death and disability. Based on the statistical data available on the internet, the number of road accidents involving these factors is also growing3. According to a report published by the Ministry of Road Transport and Highways, more than 40% of those who were killed in road accidents were two-wheeler riders. The reason behind this, reported by the experts, is the body vitals change, and the approx. values lack of proper licensing laws, faulty roads, unsafe helmets, poor training, rash driving, and many others. The government has imposed new regulations for the safety of two-wheelers, such as heavy fines, mandatory helmets with ISI or BSI certification, and many other amendments introduced in the Motor Vehicle Act 2019. However, based on the analysis, much more needs to be done. To make Indian roads safer, better vehicle design, infrastructure, smart technologies, and awareness camping are needed. The analysis reports provide an overview of the causes of death in road accidents yearly.

A few factors to highlight, such as the influence of alcohol, not wearing a helmet, overspeeding, using mobile phones, being physically unfit, and other improper actions of drivers, apply equally to two-wheeler riders. Furthermore, data from government sites prove that the fatality rate is greater for two-wheelers than for any other mode of transport during road accidents. Hence, the scope of improvement in this domain is very high, and much research is required to control these road accidents and safeguard the lives of riders. The present research uses a hybrid framework, including machine learning and the Internet of Things (IoT). Specifically, machine learning classifiers such as multilayer perceptron (MLP), support vector machine (SVM), k-nearest neighbors (KNN), and naïve Bayes have been compared; a detailed comparison is provided in the results section. These classifiers are used to classify alcoholic and nonalcoholic alcoholism based on electroencephalogram (EEG) signals. To measure the EEG signals of a person, a wearable EEG device, which is based on the IoT concept, was implanted inside the helmet. The device is connected wirelessly to the user’s vehicle to control the ignition in real time. Hence, the overall setup is designed for real-time monitoring and safeguarding against road accidents due to drinking and driving.

Previously, researchers have concentrated on design issues, fuel injection technologies, braking systems, pollution control systems, and the security of two-wheelers. Later, a few researchers also worked on antitheft technologies using IoT-based systems; many have designed smart helmets and used sensor-based technologies to improve the riding experience and safety of riders4–6. However, their research is limited and primarily focused on addressing a single issue. A robust and viable solution that must solve most of these issues has yet to be presented. The existing solutions do not consider alcoholism, state of mind, intelligent decision-making, or a real-time rider's health assessment system. Henceforth, motivated by the abovementioned factors, a smart approach is required to monitor, alert, and save two-wheel riders by monitoring and detecting the rider's activities, state of mind (alcoholic or nonalcoholic), heart rate, SPO2, and location. The system will then generate an alert, suggesting that the rider is not fit for riding, and will control the vehicle's ignition. The family member or guardian will be warned by sharing the rider's live location via text messages for help. The Indian market is now growing in technology design, and every individual is adopting smart devices; thus, to overcome these issues, technological amalgamation is needed.

The present research emphasizes a remedy for two-wheeler rider safety. With advancements in technology, wearables, IoT-based smart devices, and other intelligence techniques deployed for their safety and security, this article highlights one such intelligent system. When the user drunk, the innovative wearable helmet generated alert and warning signals. It will help decrease unforeseen accidents, minimize severe injuries to users, and potentially lower the rate of premature deaths. The contributions of this research include the following:Designing a framework to control the ignition of a vehicle in real time

Multiparameter-based real-time analysis of a rider's health parameters

Real-time helmet detection to maintain the riding law

An integrated system for better accuracy

The current work is organized in the following section. The preliminary work is detailed in “Literature review”. The workflow of the planned work is explained in more detail in the “Proposed methodology”. “Experiment setup” and “Results and discussion” address the experimental setup and outcomes, respectively. The realization and accomplishment of the suggested job are finally concluded in “Conclusion and future scope”.

Literature review

Several researchers have employed the IoT and machine learning for a safe riding experience. This section summarizes the advantages and limitations of existing research in the literature. Currently, the focus is on designing and developing smart vehicles, i.e., e-bikes and safe driving experiences. For the same purpose, the smart helmet is a key component with advanced features such as Bluetooth and sensors. These features can provide the wearer with various benefits, including making hands-free phone calls, listening to music, and receiving navigation instructions while riding a motorcycle or scooter. Some smart helmet designs include rearview cameras, emergency notification systems, and augmented reality displays. These features can help to improve rider safety and enhance the overall riding experience. Smart helmet technology is still in its early stages, and the availability and functionality of different models can vary widely.

Several studies have been conducted on the effectiveness of smart helmet technology in improving rider safety. One study published in Transportation Research Part F: Traffic Psychology and Behavior found that smart helmet features such as rearview cameras and head-up displays can help to reduce the risk of accidents by improving a rider's situational awareness7. Other research has shown that using hands-free phone communication and navigation systems can help reduce rider distraction and improve decision-making while on the road. However, evidence suggests that certain smart helmet features, such as augmented reality displays, may distract riders and increase the risk of accidents. Additionally, there is limited research on the long-term effects of exposure to certain smart helmet technologies, such as the potential health risks of prolonged use of heads-up displays. It appears that smart helmet technology can potentially improve rider safety in certain circumstances. However, more research is needed to better understand the risks and benefits of these systems.

A literature review on smart helmet technology will involve examining the existing research published on the use of smart helmet technology to improve rider safety. Some of the key findings from the literature on smart helmet technology include the following:Smart helmet features such as rearview cameras and head-up displays can help improve a rider's situational awareness and reduce the risk of accidents8.

Hands-free phone communication and navigation systems can help reduce rider distraction and improve decision-making while on the road9.

Augmented reality displays and other overly complex or distracting features may increase the risk of accidents10.

There is limited research on the long-term effects of exposure to certain smart helmet technologies, such as the potential health risks of prolonged use of heads-up displays.

The existing research suggests that smart helmet technology has the potential to improve rider safety, but more research is needed to fully understand the risks and benefits of these systems. EEG sensors are devices used to measure and record the brain's electrical activity. These sensors are typically placed on the scalp, and they use small metal discs called electrodes to pick up and transmit the brain's electrical signals to a recording device. EEG sensors are commonly used in various medical and scientific settings, including hospitals, research laboratories, and universities. Numerous research studies have been conducted on the use of EEG sensors in a variety of applications. Some of the key findings from this research include the following:Neurological problems such as epilepsy, sleep disorders, and brain trauma can be diagnosed and tracked with EEG devices11.

EEG sensors can also be used to study brain function and activity in healthy individuals, helping researchers better understand how the brain works and how it is affected by various factors, such as age, stress, and illness11.

EEG sensors can potentially be used to develop new brain-computer interface technologies, allowing individuals to control devices or machines using their thoughts alone11.

EEG data analysis techniques, such as spectral analysis and event-related potentials, can identify patterns and trends in brain activity associated with specific mental states or tasks11.

Research on EEG data analysis suggests that these techniques are essential tools for understanding and studying the brain and have a wide range of applications in medical and scientific settings. Several studies have attempted to use EEG signals to predict whether an individual is an alcoholic or a nonalcoholic individual. These studies have typically focused on identifying patterns or features in the EEG data that are associated with alcoholism and using these features to develop algorithms or classifiers that can predict an individual's status as an alcoholic or nonalcoholic12.

One study published in13 revealed that certain features of the EEG signal, such as the relative power of different frequency bands and the coherence between other brain regions, were significantly different between alcoholic individuals and nonalcoholic controls. Using these features, researchers were able to develop a classifier that was able to predict an individual's status as alcoholic or nonalcoholic with an accuracy of approximately 80%13. Other studies have also shown that EEG signals can be used to predict alcoholism, although the accuracy of these predictions varies depending on the specific features and algorithms used. In general, it appears that EEG signals hold some promise as a tool for predicting alcoholism, but additional research is required to comprehensively grasp the underlying patterns and mechanisms involved.

Several studies have attempted to use smartwatch data to predict an individual's health status. Smart watches are equipped with various sensors that can collect data on multiple aspects of an individual's physical activity and health, such as heart rate, sleep patterns, and physical activity levels. By analyzing these data, it is possible to make predictions about an individual's health status. One study published in14 reported that data from a smartwatch could accurately predict an individual's risk of developing diabetes. The researchers used machine learning algorithms to analyze data on an individual's physical activity, sleep patterns, and other factors. They found that the model could predict the risk of diabetes with an accuracy of approximately 80%14. Other studies have also shown that smartwatch data can be used to indicate an individual's risk of developing other health conditions, such as heart disease and hypertension. However, the accuracy of these predictions varies depending on the specific features and algorithms used, as well as the individual's unique characteristics and health history. In general, smartwatch data are promising tools for predicting an individual's health status. Additional research is required to comprehensively grasp the underlying patterns and mechanisms involved.

Several studies have attempted to use smartwatch data to predict an individual's mental health status. Smart watches are equipped with various sensors that can collect data on multiple aspects of an individual's physical activity and health, such as heart rate, sleep patterns, and physical activity levels. By analyzing these data, it is possible to predict an individual's mental health status. One study published in15 reported that data from a smartwatch were able to accurately predict an individual's risk of developing depression. The researchers used machine learning algorithms to analyze data on an individual's physical activity, sleep patterns, and other factors. They found that the model could predict the risk of depression with an accuracy of approximately 70%15. Other studies have also shown that smartwatch data can be used to predict an individual's risk of developing other mental health conditions, such as anxiety and stress. However, the accuracy of these predictions varies depending on the specific features and algorithms used, as well as the individual's unique characteristics and mental health history. In general, it appears that smartwatch data are promising for predicting an individual's mental health status. Additional research is required to comprehensively grasp the underlying patterns and mechanisms involved.

Several studies have focused on detecting and classifying whether an individual is wearing a helmet. These studies have typically used machine learning algorithms and image analysis techniques to analyze images or videos of individuals to determine whether they are wearing a helmet. One study published in16 reported that a machine learning algorithm could accurately detect whether an individual was wearing a helmet with an accuracy of approximately 90%. The algorithm was trained on a dataset of images that included individuals wearing and not wearing helmets and could learn the features and patterns that distinguished the two classes16. Other studies have also shown that machine learning algorithms can accurately classify whether an individual is wearing a helmet. However, the accuracy of these classifiers varies depending on the specific features and algorithms used, as well as the quality and variability of the training data. In general, machine learning techniques appear promising for detecting and classifying whether an individual is wearing a helmet. Nevertheless, farther research is needed to improve the accuracy and robustness of these systems17.

One way the IoT can control a vehicle's ignition in an emergency is by using a remote-control system connected to the vehicle's onboard computer. This system could be activated remotely by the driver or a third party. It could shut off the engine or disable the ignition system, preventing the vehicle from being started or driven. Several remote-control systems that use the IoT to provide this functionality are already available, although the specific features and capabilities of these systems can vary widely. Some systems may also require installing additional hardware or software in the vehicle to function correctly.

Several studies have attempted to use a combination of EEG signals and smartwatch data to classify individuals as alcoholic or nonalcoholic. These studies have typically used machine learning algorithms to analyze EEG and smartwatch data and identify patterns or features that are associated with alcoholism. Other studies have also shown that a combination of EEG and smartwatch data can be used to classify individuals as alcoholic or nonalcoholic. However, the accuracy of these classifiers varies depending on the specific features and algorithms used, as well as the quality and variability of the training data. In general, it appears that hybrid data approaches that combine EEG and smartwatch data hold promise as tools for classifying individuals as alcoholic or nonalcoholic. Nevertheless, more research is needed to improve the accuracy and robustness of these systems18.

Several research studies have focused on using technology to automatically turn off a vehicle's ignition if the rider is not wearing a helmet. These systems are typically designed to improve rider safety by preventing individuals from operating a vehicle without wearing a helmet, which is often required by law in many countries. Other studies have also explored the use of technology to automatically turn off a vehicle's ignition if the rider is not wearing a helmet. These systems typically use image analysis or other types of sensors to detect whether a helmet is being worn and can be configured to automatically turn off the ignition if a helmet is not visible19. Research on systems that automatically turn off the ignition of a vehicle if the rider is not wearing a helmet suggests that these systems have the potential to improve rider safety by ensuring that individuals are wearing helmets when operating a vehicle.

Several research studies have focused on the use of technology to automatically turn off the ignition of a vehicle if the rider is under the influence of alcohol. These systems are typically designed to improve road safety by preventing individuals impaired by alcohol from operating a vehicle. One study published in20 explored the use of a portable alcohol sensor to automatically disable the ignition of a vehicle if the rider's blood alcohol concentration (BAC) exceeded a certain threshold. The sensor could accurately measure the BAC of riders with an accuracy of approximately 95% and turn off the ignition if the BAC exceeded the legal limit for driving20. Other studies have also explored the use of different technologies, such as breathalyzers and facial recognition systems, to automatically turn off the ignition of a vehicle if the rider is under the influence of alcohol. These systems typically use sensors or algorithms to measure the rider's BAC or detect signs of impairment and can be configured to automatically turn off the ignition if the rider's BAC exceeds a certain threshold or if the system detects signs of impairment20. Research on systems that automatically turn off the ignition of a vehicle if the rider is under the influence of alcohol suggests that these systems have the potential to improve road safety by preventing impaired individuals from operating a vehicle. Table 1 provides a brief summary of the research findings from the existing research performed by various researchers. The table highlights the methodology, advantages, outcomes and limitations of the work performed by the researchers.Table 1 Research findings from the existing and related works21–30.

Reference	Findings	Methodology used/technology used	Advantages	Outcomes	Limitations	
28	The paper investigates how EEG signals affect alcoholic and nonalcoholic participants and if EEG signals can detect alcohol consumption in controls	The EEGs of forty total subjects were analyzed (20 alcoholics and 20 sober controls). A support vector machine was used to categorize EEG signals based on their band power, PSD, and mean frequency	Across all EEG bands, the classification accuracy for the entire EEG signal is 98.52%, and for a single electrode, AF4, it is 98.83%	Analyzing the data after data cleaning will determine each EEG subband's categorization accuracy. Delta, Alpha, Beta, and Gamma subband accuracies are 98.89%. A single electrode can detect alcohol's considerable brain activity effects	Support vector machine method is not suitable for large dataset. SVM is slow and consume a lot memory when feature set is high	
23	The SVM classifier with Gaussian RBF kernel was tested for multiple values of a crucial parameter, and the best result was chosen	This study extracts features using wavelet transform. Principal component analysis reduces feature vector dimensions	An MLP classifier with a five-neuron hidden layer successfully separated these two groups	According to the initial dataset used to measure classifier accuracy, MLP and SVM are 100% for training and test data

The total dataset classifier accuracy is 100% MLP training data 98.83% test data. The SVM training set passed 99.5%, and the test set failed 94.67%

These results also show that the datasets are similar. Thus, our strategy is resilient and independent of datasets

	The neural network classifier outperforms the SVM, although executing it takes longer	
22	The purpose of this study is to introduce an autonomous deep learning method for identifying alcoholic EEG signals. It also looks into the possibility of combining a manually designed feature extraction strategy for alcoholism categorization with deep learning techniques	To shed light on the subject, this study contrasts two deep learning-based techniques for recognizing alcoholic EEG data. Using PCA, features are extracted in the first approach and then fed into an artificial neural network (ANN) for classification. The second method, called "long short-term memory (LSTM)," employs deep learning to detect alcoholism from unprocessed EEG data. An alcohol-related EEG dataset from UCI was used to evaluate the techniques	Thus, utilizing a hand-crafted feature technique may not produce as good of results as applying a deep learning algorithm to raw data	The trials showed that Algorithm 2 had 93% classification accuracy, while Algorithm 1 had 86%. Algorithm 2 outperforms current algorithms	Two caveats to this study could be addressed in follow-up research. The suggested approaches consist of (1) a binary classification and (2) an empirically determined set of hyperparameters	
26	The authors extract the first six IMFs' kurtosis, skewness, entropy, negentropy, and mean. These characteristics distinguish alcoholic from nonalcoholic EEG data using the KW statistical test	An LS-SVM classifier's poly and RBF kernels classify IMF2 features with 96.67% and 97.92% accuracy, respectively	EEG signals, unlike smell tests, are unaffected by external factors. Hence, they can be used to identify alcoholics	IMF2 classifies alcoholic and normal EEG signals effectively	This strategy can be used in different brain physiological and pathological stages	
24	We use a small, discreet, and self-contained wearable sensor to measure the alcohol level of sweat vapor in real time. Modern fuel-cell sensors and microelectronics were incorporated in the wristband-sized design to make it both useful and unobtrusive	Our system collected continual T ACg data. AUCs of T ACg data from six trials in one human participant differentiated alcohol dosages	Comparative investigations showed interpersonal and intrapersonal sensor variabilities	T ACg values spiked with relative humidity in one drinking test	Perspiration rates need more research. Clothing, skin temperature, and sensor placement also need additional study	
29	In this work, a wireless sensor network where nodes can take readings from worn sensors thanks to relays. Incorporating practical considerations like ease of use and mobility into the design of nodes for wearable sensing devices is essential	Vital indications like as ECG, acceleration, and blood oxygen saturation are determined by these wearable sensor device nodes. The wearable sensor device vital signs data is saved by the real-time medical health monitoring system after verification	Relay-enabled low-power wireless sensor networks also help to minimize radiation	DNN model results were encouraging but limited. First, a few buried layer neurons may induce underfitting	However, too many neurons may cause overfitting. A training or testing network with additional hidden layers may enhance accuracy. However, processing cost, complexity, and diminishing gradient are significant difficulties. Concerns will be addressed	
27	This work uses Wavelet Packet Decomposition (WPD) and machine learning to classify EEG data related to alcohol use	The classifiers were supplied with the absolute mean, ratio of absolute mean, power value, minimum, maximum, mean, and standard deviation. To see if they could accurately categorize alcoholism, these characteristics were combined. The classification methods employed were SVM, OPF, Nave Bayes, k-NN, and MLP	This work's key contributions are promising results, OPF classifier inclusion, and certain classifier-wavelet family combinations	Maximum values had 99.87% sensitivity, specificity, PPV, and accuracy. The NB classifier with the Biorthogonal wavelet family produced these results. Finally, our technique classified intoxicated EEG signals well	LDA, ICA, and PCA will reduce data dimensionality in future research. InfoGain and Relief can also be used to filter unnecessary features	
25	A novel deep learning approach is proposed to automate extracting and classifying EEG features	In this paper, the authors offer a deep learning framework that combines the discrete wavelet transform (DWT), convolutional neural network (CNN), and bias-inducing extended short-term memory network (BiLSTM) to extract and classify the time series automatically	The study's proposed deep learning approach could offer a novel and practical diagnostic framework for wearable medical devices	Classification accuracy is 99.32%, recall rate is 98.87%, and accuracy is 99.01%

Automatic deep learning feature extraction for EEG signals outperforms human feature extraction

	Through EEG classification, our deep learning model can also diagnose epilepsy, recognize emotions, and other applications. It works well for ECG and EMG signals	
30	Deep learning neural networks can detect elderly patients' emotions using EEG and ECG readings	We used end-to-end deep learning neural networks using LSTM to classify positive/negative emotions from raw inputs (EEG; ECG; EEG + ECG)	These data confirm our hypothesis that smart care improves geriatric care in everyday settings	Combining EEG and ECG data with LSTM-enhanced classification results promises emotion detection in the future	First, it is impossible to account for individual variances in a sample group with five subjects	
21	An important method for identifying alcoholism is to examine EEG signals	These elements were used to train and test SVM, KNN, ANN, GBoost, AdaBoost, and XGBoost models to detect alcoholic and nonalcoholic EEG data. Sliding SSA-ICA reduces the machine learning model's computational cost and complexity	In this research, EEG recordings (S-SSA) are denoised and broken down using sliding singular spectrum analysis. Independent component analysis could separate alcohol and other influences from raw EEG measurements (ICA)	XGBoost had 98.97% accuracy. Classification metrics are compared to recent gold standard publications to test the suggested strategy	The drawback is the inability to detect drunkenness in EEG data using deep learning algorithms employing statistical variables	

Proposed methodology

We have created a fresh updated prototype in our suggested study to address the shortcomings of previous research efforts. Figure 1 shows the suggested prototype's three-phase design for tracking riders' psycho-physical conditions. The sensing unit, the processing and control unit, and the surveillance unit are the three phases. nRF technology is used by all three components to communicate with one another. Below is a basic explanation of how these three phases operate.Fig. 1 The proposed prototype for monitoring the rider’s psycho-physical state.

First phase: sensor unit

This phase acts as a root for monitoring and alarming the system. The objective of this phase is to collect real-time data on the user (such as heart rate and blood pressure) and the user's psychophysical state (consciousness, alertness, and others). All these parameters are measured using intelligent wearable devices and sensors embedded in the helmet. The required wearables and sensors are described below, along with their detailed descriptions.

Smartwatches

IoT-based wearable devices have drastically transformed the world. Many smart devices have been deployed on the market and are widely accepted by people for various applications. One popular device is a smartwatch that helps monitor body vital signs in real time under different scenarios. These smartwatches can analyze heart rate, body temperature, SPO2 level, and blood pressure and recognize various human activities. The data are recorded and stored in the cloud, which the user can securely access. Alcohol consumption directly affects the body's vital signs, as shown in Table 2 below.Table 2 Effect on body vitals after alcohol consumption37–39.

	Heart rate	Body temperature	SPO2 level	Blood pressure	
Normal range	60–100 per min	97.8 F	96%	120/80	
Alcoholic range	Increases approx. 80–120	Increases, the body feels warm due to dehydration	Decreases due to dehydration (94.5%)	Increases	

The body weight changes after alcohol consumption, and the approximate values are shown in Table 2. Moreover, the change in vital signs depends upon the amount of intake. Hence, EEG signals are analyzed along with these body vital signals to obtain better and more accurate results.

EEG sensors

EEG sensors or wearable devices can record and store EEG signals accurately. EEG sensors are devices used to detect electrical activity in the brain. Existing research shows that EEG signals show significant changes under different circumstances. By analyzing EEG signals, one can predict emotions, psychological status, and alcohol consumption7. A brain-computer interface (BCI), a wearable headset device, was used for the present work. Brainsense can measure meditation, attention, EEG bands, and raw EEG signals with Eyeblink. This device is compatible with Windows, Android, Raspberry Pi, and Arduino-based computing devices.

Microcamera

A microcamera will act as a third eye while riding a two-wheeler. A microcamera embedded near the speedometer captures a rider's real-time frames. A Bluetooth-based Wi-Fi camera with good resolution is used for the present work. The data captured by the camera are transmitted to the computing unit for processing. The camera captures real-time riders’ images to verify the availability of a helmet on their head. In the absence of a helmet, an alert will be generated, and the control unit will enable a trigger. The power supply required for the microcamera is relatively limited; hence, it can be operated through the battery power of the two-wheelers.

Second phase: computing and control unit

Another phase comprises a computing and control unit that acts as a communication layer. This phase's main functionality is establishing communication between the monitoring and sensing units. This phase will take input from the sensing unit, compute the data, generate the required alert or decision, and transfer the outcome to the monitoring unit.

Overall framework

The whole framework works with the integration of multiple submodules. Thus, the framework consists of three units, i.e., input, computing and control unit, and monitoring. The input unit will provide the user vital information via a smartwatch, EEG sensors, and a microcamera. The data is then transferred to the computing and control unit for further processing. On computing the results, based on the input, the control unit will make the decision accordingly. If needed, the control unit sends the alert to the Arduino to control the ignition. This unit works using IoT gateways and provides communication in all phases. The components working behind these computing and control units are detailed below. The smartphone is used to compute the input data, and Arduino controls the system based on the outcome, as shown in Fig. 2. The third unit, i.e., the monitoring unit, acts based on the real-time scenario.Fig. 2 Complete framework of the proposed method.

(a) Arduino ATMega328

The ATMega328 is a RISC architecture microcontroller with 8 bits and 28 pins. RISC-architecture microcontroller refers to a type of microcontroller that uses a Reduced Instruction Set Computer (RISC) design, which allows for faster processing by using a smaller set of simple instructions. It contains 32 KB of flash-style program memory. On board, a 1 KB of integrated EEPROM memory and a 2 KB of SRAM memory are installed. It consists of 8 ADC operation pins and three built-in timers. It operates at voltages ranging from 3.3 V to 5.5 V, but commonly, 5 V is used as the standard. Many embedded applications are designed based on this microcontroller. The vehicle’s battery will supply the power supply for this purpose.

(b) GSM module

A GSM mobile communication modem operates within the frequency bands of 850 MHz, 900 MHz, 1800 MHz, and 1900 MHz to deliver mobile voice and data services. It is an open digital cellular technology. A GSM modem can be a mobile phone that has GSM modem functionality or a specialized device with a serial, USB, or Bluetooth connection.

(c) Relay

Relays are switches that use electromechanical means to open and shut circuits. This device's primary function is to establish or break contact via a signal, turning it on or off without the need for human intervention. In addition, parts of the breadboard or other test circuit are connected using a jumper wire, which is a wire with a connection or pin at either end. Hence, the microcontroller is installed near the two-wheeler ignition component using jumper wires. In the case of any violation or error, the system will generate an alert according to the algorithm. Under these circumstances, the controller will not allow the ignition to start the vehicle until it is solved.

Third phase: monitoring unit

Based on the observations and computation data obtained in phase two, the monitoring unit is responsible for storing the data in the cloud-based database. Additionally, based on the real-time situation, the monitoring phase is responsible for generating an alert to nearby people along with the live location and controlling the ignition in case the problem is not suitable for riding. Figure 2 shows the overall execution flow of the proposed prototype. The EEG sensor mounted on the rider’s helmet detects the individual’s real-time EEG patterns, and smart watch sensors capture other body vital signals. The rider can start ignition only if the helmet is mounted on his or her head and he or she is wearing a smartwatch. A Bluetooth-based microcamera is mounted on the vehicle’s speedometer to ensure helmet availability. Furthermore, IoT gateways help to synce all the sensors, Arduino devices, and other devices. This synchronization is connected through a mobile application for real-time processing for cloud storage for further health analysis. The data captured will be further used to analyze that rider’s condition, i.e., allowed to ride or not allowed. If all the parameters are in favor, according to the riding regulations, the sensors start to capture all the parameters again. The predefined threshold values are set in the system; for example, an alert buzzer will generate a violation as the helmet is removed by the rider while riding, and the ignition will decrease after a few minutes in case the breach of the rule continues.

This system's overarching goal is to decrease the number of traffic fatalities and two-wheeler accidents. Conversely, in the event of an emergency, guardians and neighboring police stations will receive an alert to the victim's live position. The next sections include a discussion of the specific outcomes and pertinent data.

Scenario-based analysis of the planned prototype

This section details the operation of the proposed prototype under different scenarios. There might be the possibility of varied real-time scenarios that may affect overall working. Therefore, scenario-based analysis is described below.

Scenario 1: Considering the scenario in which the rider is drunk, wearing no helmet on their head, and high fluctuations are found in body vital signs.

Proposed system: The sensors installed read the data; in this case, the threshold values exceeded the preferred values. Thus, the microcontroller will not allow ignition to start. As the rider is not wearing the helmet and the body vitals fluctuate, conditions are not preferable for riding a vehicle. An alert will be generated.

SYSTEM: Not preferable; ignition remains off. Alert generated “Helmet not found” and “Body vitals are abnormal”.

Scenario 2: Considering the scenario in which the rider is drunk, wearing a helmet on their head, and high fluctuations are found in body vital signs.

Proposed system: The system will read the data through sensors; in the present scenario, the threshold values of the EEG signals exceed those of ordinary signals. Thus, the EEG sensor will be triggered; the system will classify the user as “drunk,” and fuzzy inference systems will determine the other body vitals (affected by alcohol). Hence, ranking the overall case as nonpreferable will generate an alert and prevent ignition from occurring. In the worst case, a message with a live location will be shared with nearby messages.

SYSTEM: Not preferable; ignition remains off. Alert generated “Rider is Drunk” and “Vitals are not in control”.

Scenario 3: Considering the scenario in which the rider is sober, not wearing a helmet on their head or body vitals is normal.

Proposed system: The system will read the data through sensors; in the present scenario, threshold values are normal except for related data. Thus, the data generated by the microcamera will be triggered, and the system will classify the user as “wearing no helmet.” Hence, ranking the overall case as nonpreferable will generate an alert and not allow the ignition to continue until the system finds the helmet on the rider’s head.

System: Not preferable; ignition remains off. Alert generated “Helmet not found”.

Scenario 4: Consider the scenario in which the rider is sober and wearing a helmet and all body vital signs are normal.

Through sensors, the system will read the data; threshold levels are anticipated in this circumstance. As a result, the system will operate as needed, and in the interim, real-time data will be uploaded to the cloud and recorded for later analysis and report creation.

System: Preferable.

The prototype is tested under different scenarios and conditions but is not limited to the abovementioned cases. The system works well under these cases with an accuracy of 95%; a detailed discussion of the outcomes is provided in the following sections.

Experiment setup

The proposed rider safety system functions as a comprehensive monitoring and alert platform. A network of sensors captures various real-time physiological, environmental, and safety parameters relevant to the rider's state. These parameters might include EEG data for alcohol consumption detection, speed sensors to identify unsafe riding conditions, and helmet status sensors to verify helmet usage.

The collected data are transmitted to a central processing unit (CPU), a cloud environment that is responsible for real-time analysis. The CPU compares the data with predefined threshold values for each parameter. If a parameter exceeds its threshold, indicating a potential safety risk, the CPU triggers an alert. This alert is visually communicated to the rider through a dedicated warning unit with a display. Additionally, a wireless communication module leverages secure Internet of Things (IoT) protocols to transmit real-time data to a cloud server. In emergency situations, such as accidents, the system can automatically send critical alerts to predefined recipients, such as the closest police station and designated emergency contacts (guardians).

The effectiveness of this system was evaluated in two distinct environments: controlled indoor settings and real-world outdoor settings. The hardware and software setup remained consistent across both environments, as detailed in Fig. 3. However, the location and timing of testing varied within each setting. Participants were randomly selected without any age or gender bias. The indoor environment focused on assessing the ability of the technology to detect alcohol consumption through EEG signal analysis. EEG data were collected before and after participants consumed varying levels of alcohol. This controlled setting involved a single individual within a small space for fifteen days, with approximately 39 readings recorded daily. The outdoor environment aimed to evaluate the system's performance in real-world scenarios. Testing was conducted in random city locations, preferably near bars, for twelve days, with approximately 50 daily readings collected. To ensure reliable results, only valid samples were included in the subsequent statistical analysis presented in Table 3; whereas TNP refers to True Negative Predictions and FNP refers to False Negative Predictions.Fig. 3 Stepwise execution of the proposed system.

Table 3 Statistical analysis.

Environmental setups	No. of samples	TP	FP	TNP	FNP	Accuracy (%)	Precision	Recall	F1 score	
Indoor	571	497	15	57	2	97	0.97	0.99	0.97	
Outdoor	595	492	21	77	5	95	0.95	0.98	0.96	

Mathematical modeling of the proposed methodology

This section focuses on mathematical modeling for the classification between alcoholic and nonalcoholic phases (Phase-I) and other phases of the whole framework. All procedures were conducted following the appropriate guidelines and regulations. Additionally, all methods were performed in accordance with the relevant guidelines and regulations. The framework is hybridized based on multiple features, i.e., EEG signals and helmet availability. Feature extraction and decision-making become complex for the system. Therefore, all the computations are performed on an intelligent cloud platform; an intelligent classifier has been used for EEG signal classification. For the training of these models, 70% of the data were used, and the remaining 30% of the data were used for testing purposes. Additionally, another algorithm is used to detect helmets (Phase II) on the head of the user, in the absence of which the system will act accordingly. After obtaining the outcomes from different phases, the system can make smart real-time decisions based on the different scenarios, as elaborated in the previous section.

Phase I: classification of alcoholic vs nonalcoholic using EEG signals

There are numerous classification techniques available for classification. Hence, to choose the better technique, a competitive analysis was performed to classify the EEG signals. Figure 4, shown below, indicates the overall working methodology for the current experimentation. The feature extraction method uses the discrete wavelet transform (DWT) technique and multiple classifiers (to compare) to classify the dataset into two categories, i.e., alcoholic or nonalcoholic. Among these classifiers, the multilayer perceptron has better results than the others.Fig. 4 Block diagram for classification.

(a) Feature extraction for EEG signals

The present study employed the DWT approach to extract features. The original EEG signals were segmented into seven levels using discrete wavelet transform. The Daubechies 4 wavelet, known for its nearly perfect time–frequency localization and resemblance to the waveform of EEG signals, was utilized in this study31. Each level involves a factor of two down samplings of the EEG output. Feature extraction was performed using a selection of wavelet coefficients that corresponded to the theta, alpha, and beta bands. According to (1), a moving time window of 1.1 s was used to compute the mean power of the EEG data signals in the three frequencies for each electrode.1 MPi=1L∑l=1Lail2,i=1,2,3

where MPi is the mean power, ail is the EEG signal, L is the length of the signal, i=1 is the theta band signal, i=2 is the alpha signal band, and i=3 is the beta signal band.

(b) Selection of classification technique

This section compares four different classifiers to choose the most suitable for the present work. These classifiers are most commonly used for various applications and are highly recommended by previous researchers32. For the SVM classifier, an RBF kernel function was chosen to capture nonlinear relationships in the data. The regularization parameter (C) was set to 1.0 to balance model fitting and generalization34. The KNN classifier utilized k = 5 neighbors for classification, and the Euclidean distance metric was employed for similarity calculations. The naive Bayes classifier implemented Gaussian smoothing to handle potential unseen feature values during prediction35. These techniques are compared based on different performance measurement techniques.(i) Support vector machine (SVM)

The SVM algorithm predicts the classifications. One of the classes is categorized as 0, whereas the other is classified as 1. A hyperplane separates the two categories in support vector machines29,36. The weight Wweight of the hyperplane defines its orientation. Wweight is orthogonal to the hyperplane (normal). It also has a bias bbias. The following equation describes the hyperplane:2 wweight∗a-bbias=0

The bias value divided by the length of the normal vector gives the distance between the hyperplane and the origin.3 DO=bbiaslengthofwweight→=bbias‖wweight→‖=bbiaswweight12+wweight22+⋯

4 DP=wweightT.a-bbias‖wweight‖

where DO is the distance to the origin and DP is the distance to the point.Finding the optimal hyperplane. Maximizing the margin (m)5 m=1lengthofwweight=1‖wweight‖

6 parentparentmaxm=max1‖wweight‖=min‖wweight‖

7 min‖wweight‖=min‖wweight‖2=min(wweightT.wweight)

Distance constraint8 wweightT.a.-bbias‖wweight‖≥1‖wweight‖

9 wweightT.a-bbias≥1

(ii) Naïve Bayes classifier (NB)

A probabilistic algorithm for machine learning called a naive Bayes classifier is utilized for classifiers30,37. The Bayes theorem is the cornerstone of the classifier. The Bayes theorem is given by10 PX|Y=PY|XPXPY

11 A=a1,a2,a3⋯..an

where A represents the features. Per the features, we can write the equation by12 thePc|a1,⋯,an=Pa1|cPa2|c⋯Pan|cPcPa1Pa2⋯Pan

13 aPc|a1,⋯,an∝Pc∏j=1nPaj|c

We must identify the class in c with the highest probability.14 c=argmaxcP(c)∏j=1nP(aj|c)

For Gaussian naive Bayes, the probability function is15 Paj|c=12πσc2e-aj-μc22σc2.

where μ is the mean standard deviation.

(iii) K-nearest neighbor (KNN)

KNN is another classifier that calculates the Euclidean distance31. The step-by-step process of the KNN algorithm is described below.Select the value of K for the number of neighbors.

Calculate the Euclidean distance between K neighbors.16 Euclideandistance=P2-P12+Q2-Q12

The nearest k neighbors are selected based on the Euclidean distance estimate.

The number of information points in each class among these k neighbors is calculated.

The new data points are assigned to the class where the neighbor count is at its maximum, as shown in Fig. 5.

Fig. 5 Working of KNN.

(iv) Multilayer perceptron

A multilayer perceptron (MLP) is a fully connected feedforward artificial neural network. It comprises input, hidden, and output layers, which represent the basic structure of nodes. All nodes, except those in the input layer, are neurons that utilize a nonlinear activation function. During training, the MLP employs supervised learning techniques38 such as backpropagation. The several layers and nonlinear activation of the MLP set it apart from a linear perceptron35.

An MLP with two hidden layers (32 neurons in the first layer and 16 neurons in the second layer) was employed to classify the EEG signals. The sigmoid activation function was used due to the binary classification nature of the problem (alcoholic vs. nonalcoholic). The Adam optimizer was chosen for its fast convergence. The initial learning rate was set to 0.01 and decayed gradually during training to prevent overfitting.

The two popular sigmoidal activation functions are defined by17 ywi=tanhwi

where yi is the outcome of the ith neuron and wi is the weight sum of the inputs. and18 ywi=1+e-wi-1

Then, the node weights can be modified in accordance with changes that reduce the error in the overall output, as indicated by19 ∈a=12∑jej2(a)

where20 ej2a=Tja-yj(a)

T is a target value; y is the value produced by the perceptron.

Comparative analysis of classification techniques

After implementing the abovementioned classification techniques, a comparative analysis was performed based on different performance measure parameters. Table 4 shows the detailed comparative analysis, from which the MLP classifier yields better results than the other classifiers.Table 4 Comparison between different classifiers.

Methods	MLP (%)	SVM (%)	KNN (%)	Naïve Bayes (%)	
Performance parameters	
Accuracy	95.89	90.23	89.96	86.56	
Precision	95.56	89.98	87.56	85.73	
Recall	94.23	87.12	85.47	81.67	
F1 score	94.89	88.52	86.57	83.65	

A graphical representation of the obtained results is shown in Fig. 6 for better understanding and to obtain deeper insights.Fig. 6 Performance analysis of classifiers.

Phase II: technique for helmet detection

The traffic rules clearly indicate that a helmet is mandatory for all two-wheeler users, but many lawbreakers have been identified in traffic records37,38. Therefore, helmet detection is quite possible using technology and smart infrastructure development. As wearing a helmet is mandatory, this is another reason for choosing helmet-based EEG classification to make our framework more robust33. Initially, the algorithm identifies the region of interest (ROI) and proceeds with the feature extraction method. For feature extraction and other computations, the detailed mathematics are described below.Determining the ROI: The region of interest is a portion of the image (upper part of 1/5) captured during the vehicle segmentation process.

Feature Extraction and other computationso Find out the grayscale of the image21 Gim_age=((0.3∗R)+(0.59∗G)+(0.11∗B))

where R is the red channel image, G is the green channel image, and B is the blue channel image.

o Perform average filter and circle Hough transform

For every pixel, 5 × 5 image regions are taken for processing.22 Pimage=im1,im2,im3,⋯.im25

Find the average of the with Apixel23 Apixel=∑i=1aimia

where Apixel is the average of the image, a is the size of the region (here, 25), and im is the image pixel.

o Compute the Otsu threshold value. This Otsu threshold value is applied to the gray image to create a binary image.

Calculate the probabilities (p) and histogram (L) of each intensity level.

Set the initial mean ∪1(t) and weight Wwei1 for two classes24 Wwei1t=∑a=0t-1p(a)

25 Wwei2t=∑a=0L-1p(a)

26 ∪1(t)=∑a=0t-1ap(a)Wwei1t

27 ∪2(t)=∑a=0L-1ap(a)Wwei2t

Do up to the maximum intensity value Update Wwei and ∪

Compute interclass variance28 varvalt=Wwei1tWwei2t∪1(t)-∪2(t)2.

The final threshold value is the maximum of varvalto The next step is to apply the Sobel method to the binary image, which produces image edges.

o All feasible accumulator circles (θ = 0 to 360 degrees) are selected. A circle can be described by:29 p-a2+q-b2=r2

30 a=q-r∗sinθ-π180

31 b=p-r∗cosθ-π180

where p and q are points θ theta.

o The local maximum chosen circles of the accumulator give the circular Hough space. The maximum chosen circle of the Accumulator provides the circle.

o To minimize the Helmet's detection area, a sub-window of the ROI is computed.

· Histogram of Oriented Gradients (HoG) feature extraction: HoG descriptor calculated for the sub window portiono Resize the image (128 × 64)

o Calculate the gradient of the image32 gxa,b=Simga,b+1-Simga,b-1

33 gya,b=Simga-1,b-Simga+1,b

where a, b are the row and column, Simg- sb window image.

Calculate the magnitude and angle34 magpi=gx2+gy2

35 Angθ=tan-1gxgy

After this, the angle and magnitude matrixes are divided by 8 × 8 cells from the blocks. A 9-point histogram was calculated for each block. This block is clubbed together to create new blocks.

Finally, these new blocks are normalized by L1 to obtain the final hog feature extracted image:36 Nbi=Nbi‖Nbi‖2+ε

εisthesmallvaluetoavoidDividebyZeroerror.

After implementing these techniques, the outcome was measured by using various parameters. Table 5 shows the details about the performance of the technique used.Table 5 Performance of the techniques used for helmet detection.

Metrics	Sensitivity	NPV	Precision	Recall	Accuracy	F-measure	Kappa coefficient	
Values in %	97.68	96.45	97.56	96.89	98.56	96.76	95.68	

The overall performance of the hybrid module is shown in Fig. 7 below. The insights from the obtained results are quite satisfactory and can be used for further decision making. The decision-making module is further amalgamated using the random forest technique. First, the decision-making algorithms were compared, as shown in the next section. Based on a comparative study and analysis, a random forest-based MLP39,40 has been implemented for various scenarios41–43.Fig. 7 Overall performance analysis.

Results and discussion

This section summarizes some of the most important findings and statistical analysis performed on the information gathered in both settings. The reaction time of the IoT-based prototype is a major source of complications. Response time, which is directly related to response time, is a measure of the time lag between sensor readings. Based on the current analysis's 30-s delay between the two data points, the suggested framework categorizes riding situations as either preferred or nonpreferred. For the sake of the experiment, the condition is indicated as "nonpreferable" by a value of "0," and as "preferable" by a number of 1. Table 6 displays the outcome of the categorization approach.Table 6 Performance comparison of different algorithms.

Classification model	Accuracy (%)	Error rate (%)	Kappa	MAE	RMSE	
Random forest	92.43	7.56	0.8461	0.2025	0.2651	
Decision tree	82.30	17.69	0.6408	0.1915	0.4026	
FURIA	85.91	14.08	0.7129	0.1504	0.3235	
Bagging	88.40	11.59	0.7644	0.2277	0.3043	

Various classification algorithms were compared to determine the best classification technique for the present work. This comparison was performed based on the following statistical metrics: accuracy, precision, recall, and F score. The key parameters for computing statistical measures are based on a confusion matrix, i.e., Truly Preferable, False Preferable, Truly Nonpreferable, and False Nonpreferable. Table 5 and Fig. 8 below show the environment type prediction results for the two different environment configurations. The results show that because indoor setups are subject to regulated environmental conditions, they have a high accuracy of 97%. At the same time, the accuracy for the outdoor environment is slightly lower, i.e., 95%, due to the presence of noise in the outdoor environment. Hence, this indicates that the system produces acceptable results under both conditions.Fig. 8 Comparison of the MAEs and RMSEs for different models.

The data gathered by the sensors will be stored on a cloud network for future data analysis and decision-making. As the system is based on classification, various classification algorithms were compared to the proposed prototype. For the present study, the random forest, decision tree, fuzzy unordered rule induction (FURIA), and bagging algorithms were compared to generate the final decision. Table 6 below shows the performance comparison among these algorithms based on accuracy, error rate, KAPPA, MAE, and RMSE. The results show that, in the present experiment, the random forest model outperforms the other models implemented in the current experiment.

The graphical representations shown in Fig. 8 compare the accuracy and error and the MAE and RMSE for all the models. Furthermore, the true positive rate (TPR), false positive rate (FPR), F score, recall, and precision were evaluated to measure the performance of the models. In Fig. 9, the detailed results of these performance measures show that the random forest algorithm achieves the highest TPR for both the yes and no classes. The observation indicates that it has also attained high precision, recall, and F-measure values that outperform those of other models. FURIA achieves TPRs for the yes and no classes of 80% and 98%, respectively, and the FPRs are 0.102 and 0.190 for the yes and no classes, respectively, and the precisions are 86% and 85% for the yes and no classes, respectively.Fig. 9 Comparison of precision, accuracy and recall for different models.

In contrast, the TPRs for both classes are 78% and 85%, and the FPRs are 0.14 and 0.21 for both classes for the decision tree-based model. In the case of the bagging-based model, the TPRs for both classes are 85% and 90%, respectively. Figure 10 displays the comparative results of the performance measures.Fig. 10 Comparative analysis of different models.

Hereafter, from the comparative analysis, the proposed prototype performed well in both closed (indoor) and open (outdoor) environments. The performance of the random forest classification model outperformed the other models implemented in this experimental study. Hence, such models can be used for various road safety applications; currently, intelligent and electric vehicles are in high demand and will soon be adopted by individuals. Therefore, such features will be helpful for various companies regarding safety and contribute to lowering the fatality rate due to road accidents.

Conclusion and future scope

This research investigated the impact of alcohol consumption on a driver's EEG signals and vital signs, potentially leading to unsafe driving behaviors. The proposed system employs a three-tier architecture to monitor these physiological changes. The first tier utilizes a combination of MLPs for complex pattern recognition, HoG feature extraction for image-based data (potentially helmet detection), and random forest for robust classification. This combination allows the system to monitor body functions, helmet usage, and the effects of alcohol intoxication on the driver's physiology.

The system operates in real time, analyzing data from various sensors and generating alerts to prevent potential accidents. Additionally, GPS integration enables emergency location communication. By leveraging IoT gateway protocols, the system ensures seamless connectivity between sensor devices. Our evaluation revealed that the random forest model achieved the highest accuracy with the lowest error rate compared to the other explored models.

In the future, this research can be extended to incorporate fuzzy inference-based methods for more nuanced decision making. Also, future work will expand on data-related concerns. We plan to implement robust encryption protocols and secure communication channels to protect sensitive data during transmission and storage. Future work should explore more complex driving environments and integrate additional health-related parameters. Expanding the system to include four-wheel drivers and incorporating other classification approaches, such as KNN, ANN, deep learning, and hybrid models, could further improve accuracy and reduce error rates. Optimizations to acquire sensor data can potentially minimize time delays and enable faster real-time results. The project also plans to investigate data fusion techniques, data calibration methods, and nonlinear data analysis for further advancements.

Acknowledgements

This work was supported by King Saud University, Riyadh, Saudi Arabia, through the Researchers Supporting Project number RSP2024R498 Conflicts of Interest: The authors declare no conflict of interest.

Author contributions

Gunjan Chhabra (Conceptualization, Methodology, Algorithm Design), Keshav Kaushik (Methodology, Algorithm Design), Pardeep Singh (Algorithm Development, Software Implementation), Gourav Bathla (Software Development, Data Collection), Ahmad Almogren (Data Analysis, Model Evaluation, Data Visualization), Salil Bharany* (Methodology, Algorithm Desig, contributed to the main manuscript Review and Editing), Ayman Altameem(Algorithm Design, Software Implementation, manuscript Review and Editing), Ateeq Ur Rehman (prepared figures , Data Visualization, manuscript Review and Editing).

Data availability

The datasets generated and/or analyzed during the current study are not publicly available because the datasets include personal and medical information of the subjects, hence cannot be published publicly. However, are available from the corresponding author on reasonable request.

Competing interests

The authors declare no competing interests.

Institutional review board

All experimental protocols received approval from the designated institutional and/or licensing committee. Furthermore, all procedures were conducted in compliance with the applicable guidelines and regulations.

Informed consent

Additionally, informed consent was obtained from all subjects and/or their legal guardian(s).

Publisher's note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
==== Refs
References

1. Sripad S Mehta T Srivastava A Viswanathan V The future of vehicle electrification in India may ride on two wheels ACS Energy Lett. 2019 4 11 2691 2694 10.1021/acsenergylett.9b02103
Sripad, S., Mehta, T., Srivastava, A. & Viswanathan, V. The future of vehicle electrification in India may ride on two wheels. ACS Energy Lett. 4(11), 2691–2694 (2019).
2. Yadav D Goyal R Yadav VS Automotive evaporative emissions and refueling losses from Indian two-wheelers Mater. Today Proc. 2022 63 680 684 10.1016/j.matpr.2022.04.748
Yadav, D., Goyal, R. & Yadav, V. S. Automotive evaporative emissions and refueling losses from Indian two-wheelers. Mater. Today Proc. 63, 680–684 (2022).
3. Mahata D Narzary PK Govil D Spatiotemporal analysis of road traffic accidents in large Indian cities Clin. Epidemiol. Glob. Health 2019 7 4 586 591 10.1016/j.cegh.2019.01.005
Mahata, D., Narzary, P. K. & Govil, D. Spatiotemporal analysis of road traffic accidents in large Indian cities. Clin. Epidemiol. Glob. Health 7(4), 586–591 (2019).
4. Gopakumar S Gumma M Design & optimization for vehicle dynamic events of electric 2-wheeler using genetic algorithm approach SAE Int. 2024 10.4271/2024-26-0260
Gopakumar, S. & Gumma, M. Design & optimization for vehicle dynamic events of electric 2-wheeler using genetic algorithm approach. SAE Int.10.4271/2024-26-0260 (2024).
5. Corno M D’Avico L Panzani G Savaresi SM A haptic-based safety-oriented braking assistance system for road bicycles IEEE Intell. Veh. Sympos. (IV) 2017 2017 1189 1194 10.1109/IVS.2017.7995897
Corno, M., D’Avico, L., Panzani, G. & Savaresi, S. M. A haptic-based safety-oriented braking assistance system for road bicycles. IEEE Intell. Veh. Sympos. (IV) 2017, 1189–1194. 10.1109/IVS.2017.7995897 (2017).
6. Selmanaj D Corno M Savaresi SM Hazard detection for motorcycles via accelerometers: A self-organizing map approach IEEE Trans. Cybern. 2017 47 11 3609 3620 10.1109/TCYB.2017.2669998 27305693
Selmanaj, D., Corno, M. & Savaresi, S. M. Hazard detection for motorcycles via accelerometers: A self-organizing map approach. IEEE Trans. Cybern. 47(11), 3609–3620. 10.1109/TCYB.2017.2669998 (2017).27305693
7. Groeger JA Rothengatter JA Traffic psychology and behavior Transport. Res. Part F Traffic Psychol. Behav. 1998 1 1 1 9 10.1016/S1369-8478(98)00007-2
Groeger, J. A. & Rothengatter, J. A. Traffic psychology and behavior. Transport. Res. Part F Traffic Psychol. Behav. 1(1), 1–9 (1998).
8. Ahmed, S. U., Uddin, R., & Affan, M. Intelligent gadget for accident prevention: Smart helmet. In 2020 International Conference on Computing and Information Technology (ICCIT-1441). 1–4. (IEEE, 2020).
9. Ahangari S Jeihani M Ardeshiri A Rahman MM Dehzangi A Enhancing the performance of a model to predict driving distraction with the random forest classifier Transport. Res. Rec. 2021 2675 11 612 622 10.1177/03611981211018695
Ahangari, S., Jeihani, M., Ardeshiri, A., Rahman, M. M. & Dehzangi, A. Enhancing the performance of a model to predict driving distraction with the random forest classifier. Transport. Res. Rec. 2675(11), 612–622 (2021).
10. Calvi A D’Amico F Ferrante C Ciampoli LB Evaluation of augmented reality cues to improve the safety of left-turn maneuvers in a connected environment: A driving simulator study Accid. Anal. Prevent. 2020 148 105793 10.1016/j.aap.2020.105793
Calvi, A., D’Amico, F., Ferrante, C. & Ciampoli, L. B. Evaluation of augmented reality cues to improve the safety of left-turn maneuvers in a connected environment: A driving simulator study. Accid. Anal. Prevent. 148, 105793 (2020).
11. Rajan, S. P., & Dinesh, T. Analysis of human brain disorders for effectual hippocampus surveillance. In Int. J. Mod. Sci. Eng. Technol. ISSN 2349-3755 (2015).
12. Avola, D., Cascio, M., Cinque, L., Fagioli, A., Foresti, G. L., Marini, M. R., & Pannone, D. Analyzing EEG data with machine and deep learning: A benchmark. In Image Analysis and Processing–ICIAP 2022: 21st International Conference, Lecce, Italy, May 23–27, 2022, Proceedings, Part I. 335–345. (Springer, 2022)
13. Kumari N Anwar S Bhattacharjee V A deep learning-based approach for accurate diagnosis of alcohol usage severity using EEG signals IETE J. Res. 2022 4 1 15
Kumari, N., Anwar, S. & Bhattacharjee, V. A deep learning-based approach for accurate diagnosis of alcohol usage severity using EEG signals. IETE J. Res. 4, 1–15 (2022).
14. Al-Hadeethi H Abdulla S Diykh M Deo RC Green JH An eigenvalues-based covariance matrix bootstrap model integrated with support vector machines for multichannel EEG signals analysis Front. Neuroinform. 2022 15 78 10.3389/fninf.2021.808339
Al-Hadeethi, H., Abdulla, S., Diykh, M., Deo, R. C. & Green, J. H. An eigenvalues-based covariance matrix bootstrap model integrated with support vector machines for multichannel EEG signals analysis. Front. Neuroinform. 15, 78 (2022).
15. de Oliveira LDSSCB Souza EC Rodrigues RAS Fett CA Piva AB The effects of physical activity on anxiety, depression, and quality of life in elderly people living in the community Trends Psychiatry Psychother. 2019 41 36 42 10.1590/2237-6089-2017-0129 30994779
de Oliveira, L. D. S. S. C. B., Souza, E. C., Rodrigues, R. A. S., Fett, C. A. & Piva, A. B. The effects of physical activity on anxiety, depression, and quality of life in elderly people living in the community. Trends Psychiatry Psychother. 41, 36–42 (2019).30994779
16. Hadjidimitriou NS Lippi M Dell’Amico M Skiera A Machine learning for severity classification of accidents involving powered two wheelers IEEE Trans. Intell. Transport. Syst. 2019 21 10 4308 4317 10.1109/TITS.2019.2939624
Hadjidimitriou, N. S., Lippi, M., Dell’Amico, M. & Skiera, A. Machine learning for severity classification of accidents involving powered two wheelers. IEEE Trans. Intell. Transport. Syst. 21(10), 4308–4317 (2019).
17. Xiao, D., Dianati, M., Geiger, W. G., & Woodman, R. Review of graph-based hazardous event detection methods for autonomous driving systems. IEEE Trans. Intell. Transport. Syst. (2023).
18. Chhetri B Goyal LM Mittal M How machine learning is used to study addiction in digital healthcare: A systematic review Int. J. Inf. Manag. Data Insights 2023 3 2 100175
Chhetri, B., Goyal, L. M. & Mittal, M. How machine learning is used to study addiction in digital healthcare: A systematic review. Int. J. Inf. Manag. Data Insights 3(2), 100175 (2023).
19. Mathavan, J. J., Wijesekara, V. K. D., Satheeskanth, N., Wanasinghe, W. M. U. J., Maathushan, M., & Wijenayake, V. V. Smart helmet to start the motorbike and to prevent accidents. In IOP Conference Series: Materials Science and Engineering. Vol. 1258(1). 012051. (IOP Publishing, 2022).
20. Verster JC Kruisselbrink LD Slot KA Anogeianaki A Adams S Alford C Stock AK Sensitivity to experiencing alcohol hangovers: Reconsideration of the 0.11% blood alcohol concentration (BAC) threshold for having a hangover J. Clin. Med. 2020 9 1 179 10.3390/jcm9010179 31936502
Verster, J. C. et al. Sensitivity to experiencing alcohol hangovers: Reconsideration of the 0.11% blood alcohol concentration (BAC) threshold for having a hangover. J. Clin. Med. 9(1), 179 (2020).31936502
21. Agarwal S Zubair M Classification of alcoholic and nonalcoholic EEG signals based on sliding-SSA and independent component analysis IEEE Sens. J. 2021 21 23 26198 26206 10.1109/JSEN.2021.3120885
Agarwal, S. & Zubair, M. Classification of alcoholic and nonalcoholic EEG signals based on sliding-SSA and independent component analysis. IEEE Sens. J. 21(23), 26198–26206 (2021).
22. Farsi L Siuly S Kabir E Wang H Classification of alcoholic EEG signals using a deep learning method IEEE Sens. J. 2020 21 3 3552 3560 10.1109/JSEN.2020.3026830
Farsi, L., Siuly, S., Kabir, E. & Wang, H. Classification of alcoholic EEG signals using a deep learning method. IEEE Sens. J. 21(3), 3552–3560 (2020).
23. Kousarrizi, M. R. N., Ghanbari, A. A., Gharaviri, A., Teshnehlab, M., & Aliyari, M. Classification of alcoholics and nonalcoholics via EEG using SVM and neural networks. In 2009 3rd International Conference on Bioinformatics and Biomedical Engineering. 1–4. (IEEE, 2009).
24. Li B Downen RS Dong Q Tran N LeSaux M Meltzer AC Li Z A discreet wearable IOT sensor for continuous transdermal alcohol monitoring—Challenges and opportunities IEEE Sens. J. 2020 21 4 5322 5330 10.1109/JSEN.2020.3030254 33746626
Li, B. et al. A discreet wearable IOT sensor for continuous transdermal alcohol monitoring—Challenges and opportunities. IEEE Sens. J. 21(4), 5322–5330 (2020).33746626
25. Li H Wu L EEG classification of normal and alcoholic by deep learning Brain Sci. 2022 12 6 778 10.3390/brainsci12060778 35741663
Li, H. & Wu, L. EEG classification of normal and alcoholic by deep learning. Brain Sci. 12(6), 778 (2022).35741663
26. Priya A Yadav P Jain S Bajaj V Efficient method for classification of alcoholic and normal EEG signals using EMD J. Eng. 2018 2018 3 166 172
Priya, A., Yadav, P., Jain, S. & Bajaj, V. Efficient method for classification of alcoholic and normal EEG signals using EMD. J. Eng. 2018(3), 166–172 (2018).
27. Rodrigues JDC Rebouças Filho PP Peixoto E Jr Kumar A de Albuquerque VHC Classification of EEG signals to detect alcoholism using machine learning techniques Pattern Recognit. Lett. 2019 125 140 149 10.1016/j.patrec.2019.04.019
Rodrigues, J. D. C., Rebouças Filho, P. P., Peixoto, E. Jr., Kumar, A. & de Albuquerque, V. H. C. Classification of EEG signals to detect alcoholism using machine learning techniques. Pattern Recognit. Lett. 125, 140–149 (2019).
28. Vinothraj, T. Analysis of Alcoholic and Non-Alcoholic EEG Signals (2017).
29. Wu, X., Liu, C., Wang, L., & Bilal, M. Internet of things-enabled real-time health monitoring system using deep learning. Neural Comput. Appl. 1–12 (2021).
30. Zeng F Lin Y Siriaraya P Choi D Kuwahara N Emotion detection using EEG and ECG signals from wearable textile devices for elderly people J. Textile Eng. 2020 66 6 109 117 10.4188/jte.66.109
Zeng, F., Lin, Y., Siriaraya, P., Choi, D. & Kuwahara, N. Emotion detection using EEG and ECG signals from wearable textile devices for elderly people. J. Textile Eng. 66(6), 109–117 (2020).
31. Ji N Ma L Dong H Zhang X EEG signals feature extraction based on DWT and EMD combined with approximate entropy Brain Sci. 2019 9 8 201 10.3390/brainsci9080201 31416258
Ji, N., Ma, L., Dong, H. & Zhang, X. EEG signals feature extraction based on DWT and EMD combined with approximate entropy. Brain Sci. 9(8), 201 (2019).31416258
32. Asif RN Detecting electrocardiogram arrhythmia empowered with weighted federated learning IEEE Access 2024 12 1909 1926 10.1109/ACCESS.2023.3347610
Asif, R. N. et al. Detecting electrocardiogram arrhythmia empowered with weighted federated learning. IEEE Access 12, 1909–1926. 10.1109/ACCESS.2023.3347610 (2024).
33. Xie Y Oniga S A review of processing methods and classification algorithm for EEG signal Carpathian J. Electron. Comput. Eng. 2020 13 1 23 29 10.2478/cjece-2020-0004
Xie, Y. & Oniga, S. A review of processing methods and classification algorithm for EEG signal. Carpathian J. Electron. Comput. Eng. 13(1), 23–29 (2020).
34. Sha’Abani, M. N. A. H., Fuad, N., Jamal, N., & Ismail, M. F. kNN and SVM classification for EEG: A review. In ECCE2019: Proceedings of the 5th International Conference on Electrical, Control & Computer Engineering, Kuantan, Pahang, Malaysia, 29th July 2019. 555–565. (Springer, 2020).
35. Li C Shao C Song R Xu G Liu X Qian R Chen X Spatiotemporal MLP network for seizure prediction using EEG signals Measurement 2023 206 112278 10.1016/j.measurement.2022.112278
Li, C. et al. Spatiotemporal MLP network for seizure prediction using EEG signals. Measurement 206, 112278 (2023).
36. Kumar, N., & Sukavanam, N. Detecting helmet of bike riders in outdoor video sequences for road traffic accidental avoidance. In Intelligent Systems Design and Applications: 18th International Conference on Intelligent Systems Design and Applications (ISDA 2018) Held in Vellore, India, December 6–8, 2018. Vol. 2. 24–33. (Springer, 2020).
37. National Institute on Alcohol Abuse and Alcoholism (NIAAA). Alcohol's Effects on the Body. NIAAA. https://www.niaaa.nih.gov/alcohols-effects-health/alcohols-effects-body.
38. Alcohol and dehydration effects on oxygen levels. J. Appl. Physiol. 128(2), 345–352 10.1152/japplphysiol.00055.2020 (2020).
39. American Heart Association. Alcohol and Heart Health. https://www.heart.org/en/healthy-living/healthy-eating/eat-smart/nutrition-basics/alcohol-and-heart-health (American Heart Association, 2019).
40. Sharma A Rani S Shah SH Sharma R Yu F Hassan MM An efficient hybrid deep learning model for denial of service detection in cyber physical systems IEEE Trans. Netw. Sci. Eng. 2023 10 5 2419 2428 10.1109/TNSE.2023.3273301
Sharma, A. et al. An efficient hybrid deep learning model for denial of service detection in cyber physical systems. IEEE Trans. Netw. Sci. Eng. 10(5), 2419–2428. 10.1109/TNSE.2023.3273301 (2023).
41. Shruti, S. R. & Srivastava, G. Secure hierarchical fog computing-based architecture for industry 5.0 using an attribute-based encryption scheme. In Expert Systems with Applications Vol. 235. 121180 10.1016/j.eswa.2023.121180 (Elsevier BV, 2024).
42. Bhardwaj, A., Bharany, S., Osman Ibrahim, A., Almogren, A., Ur Rehman, A., Hamam, H. Unmasking vulnerabilities by a pioneering approach to securing smart IoT cameras through threat surface analysis and dynamic metrics. Egypt. Inform. J. 27, 100513. 10.1016/j.eij.2024.100513 (2024).
43. Rizwan Hassan, S., Ur Rehman, A., Alsharabi, N., Arain, S., Quddus, A., Hamam, H. “Design of Load-Aware Resource Allocation for Heterogeneous Fog Computing Systems”. PeerJ Comput. Sci. 10, e1986. 10.7717/peerj-cs.1986 (2024).
