Classifying Driving Fatigue by Using EEG Signals

Fatigue driving is one of the main reasons for the occurrence of traffic accidents. Brain-computer interface, as a human-computer interaction method based on EEG signals, can communicate with the outside world and move freely through brain signals without relying on the peripheral neuromuscular system. In this paper, a simulation driving platform composed of driving simulation equipment and driving simulation software is used to simulate the real driving process. The EEG signals of the subjects are collected through simulated driving, and the EEG of five subjects is selected as the training sample, and the remaining one is the subject. As a test sample, perform feature extraction and classification experiments, select any set of normal signals and fatigue signals recorded in the driving fatigue experiment for data analysis, and then study the classification of driver fatigue levels. Experiments have proved that the PSO-H-ELM algorithm has only about 4% advantage compared with the average accuracy of the KNN algorithm and the SVM algorithm. The gap is not as big as expected, but as a new algorithm, it is applied to the detection of fatigue EEG. The two traditional algorithms are indeed more suitable. It shows that the driver fatigue level can be judged by detecting EEG, which will provide a basis for the development of on-board, real-time driving fatigue alarm devices. It will lay the foundation for traffic management departments to intervene in driving fatigue reasonably and provide a reliable basis for minimizing traffic accidents.


Introduction
e fast-paced life of modern society not only promotes the rapid development of society, but also increases the work pressure of workers. Long-term high-intensity work can easily cause workers' mental fatigue. Mental fatigue will not only reduce work efficiency, but also be harmful to health and even cause accidents. In recent years, fatigue driving has become one of the main causes of traffic accidents. Truck drivers who travel long distances and drivers who work overtime are often prone to fatigue or drowsiness and some even fall asleep while driving. erefore, fatigue detection has become an important topic in the field of driving safety. Scientists try to use this, to try to reduce the frequency and severity of traffic accidents, and formulate relevant regulations.
At present, there are still many problems in the research on driving fatigue detection technology. For example, the method of detecting the physical reaction of the driver has a high false alarm rate; the method of detecting vehicle parameters requires clear markings on the center line of the road and good light; and the method of measuring the pupil diameter is difficult to implement. In recent years, a large number of scientific researchers have invested in the research of noncontact collection of ECG and EEG and have made great breakthroughs, making the detection of fatigue through biological signals extremely attractive. It provides a basis for further research and development of on-board, real-time driving fatigue alarm devices, and provides a reliable basis for traffic management departments to scientifically and reasonably intervene in driving fatigue and minimize man-made traffic accidents.
At present, the mental fatigue detection at home and abroad mainly selects the following three characteristics: (1) Behavioral characteristics: behavioral characteristics include changes in lateral lane positions and variability in vehicle heading differences, which are one of the commonly used driving indicators to identify fatigue through vehicle behavior. is method is easy to understand, but the standards for these features have not yet been formed, and it is not easy to achieve stable and effective recognition results. (2) Facial expression characteristics: facial expression characteristics include the degree of eye closure and the frequency of nodding, etc. Although this method is very convenient to use, the detection of these features is affected by various factors, such as image angle and image brightness. ese limitations reduce the overall recognition accuracy of this method and limit its application scenarios.
(3) Physiological characteristics: physiological characteristics include ECG, heart rate, electromyogram, and EEG. Different from behavioral features and facial features, these features, as the mapping of the physiological changes of the human body, objectively reflect the current state and environment of the human body. erefore, driving fatigue detection based on physiological features is a very popular application direction. And among these fatigue detection methods based on physiological features, detecting EEG signals is considered the most direct, effective, and promising method to detect driving fatigue.
Fatigue refers to a complex physiological phenomenon in which the physiological and psychological functions of the human body are out of balance due to continuous or highintensity physical or mental work. Driving fatigue is the driver's excessive consumption of continuous driving or other physical labor for a long time, or lack of sleep, which leads to drowsiness, sluggishness, and weakness in the limbs. phenomenon of the situation. When a driver is fatigued, many features will change, including visible features such as driving posture, blink rate, eye closure time, nodding action, reaction speed, facial expressions, and invisible features such as EEG, ECG signal, EMG signal, skin temperature, skin resistance, respiratory rate, etc. e main manifestations are drowsiness and weakness of the driver, difficulty in eliminating drowsiness, decreased vision, gradually narrowing of the field of vision, inattention, decreased judgment, decreased thinking ability, weak limbs, decreased sensory organ function, unstable driving movements, delayed judgment, Rhythm disorders, knee fatigue, neck stiffness, backache and leg pain, loss of self-control, resulting in a series of uncomfortable symptoms such as being easily excited, irritable or driving fast.
When the driver is slightly fatigued, the shifting is not timely and accurate. In moderate fatigue, the operation is sluggish and sometimes even forgets to operate, In severe fatigue, often subconscious operation or short-term sleep phenomenon, loss of control over the vehicle.
In recent years, how to recognize the fatigue state of a driver has become a hot topic today. Chain R defines an EEG-based driver fatigue test method. e results show that the frequency characteristics of EEG can be well applied to driving fatigue testing, but the overall study lacks data support, and more data is needed to support its conclusions [1]. Yimyam W used 50 recorded EEGs to participate in driving simulation experiments, resulting in two fatigue states: alertness and drowsiness.
e experimental results show that as the fatigue degree increases, the two complexity parameters are significantly reduced. e results show that these two nonlinear indicators can be used to characterize driver fatigue. However, the lack of experimental data in his research led to small differences in sample sets, resulting in inaccurate results [2]. Zeng studied the complex, unstable, and nonlinear characteristics of evaluating EEG signals. e results show that: this paper uses the combination of finite element features and AdaBoost classifier to detect driver fatigue based on EEG, ensuring the confidence to explore the internal physiological mechanism and wearable applications. e experiment did not take into account the deviation of the subject's gender and age parameters in the experiment [3].
is paper first extracts more representative EEG signal features by designing a more appropriate feature extraction method, and then selects a suitable classifier to perform optimized to achieve a better classification effect, and classify the signal features extracted by the new feature extraction method through the optimized classifier to achieve the optimal classification effect of the experiment. When studying driving fatigue, this article continuously analyzes the EEG data of driving for 2 hours, trying to find the time when the fatigue occurs. is is something that scholars who have studied driving fatigue have never done before. Most of them only select data from fatigue and normal states to analyze the differences.

Composition and Classification of Brain-Computer
Interface. e exploration of the brain's operating mechanism is not only of great significance in medicine, but also of great help to the development of artificial intelligence. Braincomputer interface is a new technology developed for this purpose, and its application in scientific research is becoming increasingly extensive.

System Composition of Brain-Computer Interface.
e core of brain-computer interface (BCI) technology is to directly collect the EEG of the cerebral cortex through the electrodes and transmit it to the computer via the circuit for signal analysis, and then send the corresponding control commands to the external equipment to achieve a complete EEG control path, instead of passing through normal neuromuscular pathways such as peripheral nerves and muscle tissues [4,5]. e main working principle of the brain-computer interface system is: nerve cells generate local potentials when they are active. ese potentials can be collected and analyzed in the cortex to analyze the changes in the brain's thinking activity at this time. ese changes can be recorded and amplified by the electrode cap. After processing, the collected EEG extraction features are analyzed through information analysis, and the corresponding control instructions are made according to the features to complete the control of the external equipment. e pattern recognition part of BCI is mainly to send the EEG characteristic signal to the classifier and to distinguish the classification space to which the characteristic signal belongs by searching for a suitable decision plane. e result of the classifier is directly related to whether the feature is correctly identified, and therefore directly affects the effect and performance of the BCI. Different classifiers have different advantages in different application scenarios because of their different algorithm principles, so the choice of classifier is essential [6,7].
A general brain-computer interface system consists of the following five main steps: EEG signal acquisition, signal preprocessing, feature extraction, pattern recognition, and sending external control commands. e signal acquisition part of BCI is the connection between the system and the brain. is part mainly collects the electrical signals of the cerebral cortex through the electrode cap, then amplifies the electrical signals, and converts the amplified EEG signals into digital signals through A/D conversion. e signal acquisition part of BCI mainly involves the selection of signal types and the number of channels and positions. Since the collected EEG signals will be interfered by EEG, ECG, power, frequency interference, and some high-frequency noise signals, these signals will affect the follow-up, the reliability and accuracy of the processing part. erefore, the preprocessing part of BCI will use denoising algorithm or filter to remove the noise signal doped in the signal and improve the signal-to-noise ratio of the EEG signal. EEG signals are used by most BCI systems due to their high temporal resolution. BCI has a wide range of applications in the field of artificial intelligence because of its cheap equipment and no harm to the human body. e BCI system has a variety of classification methods from different perspectives: Lossy and lossless BCI systems, the acquisition methods of the lossy BCI system can be divided into implantable and semi-implantable. e feature of the implantable BCI system is that the electrodes are implanted into the brain tissue in the cranial cavity, so that the collected brain signals are more accurate; the feature of the semi-implantable BCI system is that the electrodes are attached to the cerebral cortex in the cranial cavity, and the brain Cortical potential changes can be accurately recorded by the electrodes.
Induced and spontaneous BCI systems, the evoked BCI system has many kinds of elicitation methods, which can be divided into exogenous stimulation and endogenous stimulation according to the different stimulation sources. Potential changes induced by exogenous stimuli are called exogenous evoked potentials, including visual stimulus evoked potentials, auditory stimulus evoked potentials, and tactile stimulus evoked potentials. Endogenous stimuli are related to cognitive processes in the brain, and endogenous evoked potentials are brain potentials evoked by specific, multiple or diverse stimuli.

Application Fields of Brain-Computer System
(1) Rehabilitation Field. e BCI system has the most urgent needs in the field of rehabilitation. ere are many patients with physical disabilities throughout the country. For them, the BCI system provides them with a new channel for communication with the outside world, which can significantly improve their quality of life and even live a normal life.
(2) Military Field. Although the current research on related technologies has not reached the stage of maturity in movies, the concept of using thinking activities in military operations is the consensus of all countries in the world, many countries have spent a lot in this field, and movies have also been realized.
(3) Leisure and Entertainment Field. Leisure and entertainment have always been an indispensable part of human life, so the research direction of brain-computer interface is also biased towards this [8]. Now, ordinary keyboard and mouse devices can no longer keep up with people's response speed and computer processing speed. People urgently need a new control method to control computers more conveniently for entertainment activities. Simple such as browsing the web, typing on the Internet, designing drawings, complex multiline operations, controlling games, ese applications will greatly change the way of life and entertainment in the future, have large market potential, and attract countless teams to develop related technologies.
(4) e Field of Brain Science Research. e research of the BCI system originally originated from the study of brain cognitive science, such as the use of brain electricity to detect polygraphs, the study of mental activity based on brain electricity, and this article involved in driving fatigue detection based on BCI system [9]. e research of the BCI system is based on the research of brain science, and the research of the BCI system in turn provides help to the research of brain cognitive science.

EEG Signal.
Generally speaking, EEG refers to the electrophysiological phenomenon produced by the activity of brain nerve cells in the cerebral cortex, which is a kind of bioelectric signal. Since the human body is a complex system, the electrical signals collected through the scalp include not only EEG, but also physiological signals such as my electricity and ocular electrical signals, as well as noise interference such as instrument power frequency interference, so the effect of directly processing the collected EEG is not ideal. It is necessary to preprocess the EEG and then conduct research and analysis [10,11].

Computational Intelligence and Neuroscience
People will experience various subjective feelings when driving fatigue, such as dizziness, blurred vision, difficulty concentrating, feeling irritable, feeling sleepy, muscle weakness, reference basis. When driving fatigue, the subjects will have many weakened functions controlled by the brain. Different parameters of the EEG signal represent different activities of the human brain and different mental states. However, the accurate extraction of these parameters requires good technical means suitable for EEG signals.

e Structure and Function of the Brain.
e brain is the most complex and mysterious organ in the human body, and there are many mysteries that have not yet been completely solved. e brain is divided into two parts: the left brain and the right brain. According to the existing medical data, the left and right hemispheres are responsible for different functions such as thinking and imagination, and are connected to each other through the corpus callosum. e left and right hemispheres are subdivided into four parts: frontal lobe, parietal lobe, temporal lobe, and occipital lobe. ese areas control different functions. According to some latest brain science research data, the various functions of the brain are not only completed by the abovementioned parts alone, but are the result of the collaborative processing of various parts of the brain [12][13][14]. Even after some parts are damaged, the brain can coordinate the other parts to complete the functions of the damaged part of the brain. e cerebral cortex is the general term for the gray matter of the brain's surface layer, and its thickness is about 1.5-5.0 mm. e gray matter of the cerebral cortex in different regions corresponds to different functions, as shown in Figure 1.
According to scientific research data, at this stage, the cerebral cortex contains tens of billions of nerve cells. With this large group of nerve cells, the brain can achieve very complex functions. For driving fatigue detection based on EEG, it is first necessary to understand the relationship between mental fatigue and the state of different areas of the cerebral cortex and time, to accurately judge the state of mental fatigue.

2.2.2.
e Generation Mechanism of EEG Signals. Generally speaking, EEG refers to the local electrical signal produced by the activity of nerve cells in the cerebral cortex, which is produced by the electrophysiological activity of a large number of nerve cells in the relevant areas of the brain. According to the research data, the dendrites of nerve cells will generate an action potential after receiving stimulation. e potential will be transmitted along the axon to the axon terminal, and the potential will be transmitted to the next nerve cell through the axon terminal. e electrical signal generated by these large nerve cells transmitting potential is EEG [15,16].

Characteristics and classification of EEG signals
(1) Randomness: because the cerebral cortex is not completely insulated, the electrical signals of different areas will influence and interfere with each other, sometimes accompanied by unconscious light discharge behaviors. erefore, EEG has significant randomness, which humans cannot completely present. Analyzing the trend of EEG can only roughly analyze the characteristics of EEG. (2) Nonstationary: the generation of brain signals is affected by many factors, so it has the characteristics of nonstationary. Using this feature of EEG, the amplitude and frequency of EEG can be compared to distinguish whether the brain is in a state of fatigue. What we usually call an EEG refers to the brain scalp EEG, which is actually a graph of the relationship between the scalp potential difference and time.
Brain waves are the comprehensive external manifestations of the overall activity of brain nerve cells, including ion exchange and metabolism. e EEG signal is an electrical phenomenon displayed on the surface of the cerebral cortex or scalp by the physiological activity of brain nerve cells. is electrical phenomenon accompanies a person's life from the beginning to end. Once a person dies, the electrical phenomenon disappears. erefore, the EEG signal is a signal obtained by extracting the spontaneous and rhythmic physiological activity of the brain cell population on the surface of the scalp and amplifying it by a million times. EEG signals can be divided into spontaneous EEG and evoked EEG. Spontaneous EEG refers to changes in EEG without external stimulation. Induced EEG is a change in brain potential caused by artificially stimulating human sensory organs. (3) Nonlinearity: the generation of EEG is based on the multiple coupling of human physiological state and life phenomena, so it has chaotic characteristics and nonlinearity. Simply using linear analysis of EEG cannot fully reflect the characteristics of EEG. It is necessary to use nonlinear analysis EEG to better analyze the internal information of EEG [17]. (4) Low amplitude, low frequency, and low signal-tonoise ratio: EEG signals have the characteristics of low amplitude, low frequency, and low signal-tonoise ratio. Since the EEG signal is the bioelectricity  generated by the activity of nerve cells, the amplitude of the EEG signal is relatively low only at the microand millivolt level, generally not exceeding 100 μV. e frequency of EEG signals is relatively low, generally between 0.5 and 100 Hz. It is precisely because of the characteristics of low amplitude and low frequency of EEG signals that it is easily interfered by other external signals and has the characteristics of low signal-to-noise ratio.
EEG signal is a manifestation of brain nerve activity and an important signal reflecting the state of brain activity. Its amplitude range is one and its frequency range is one. e rhythm of EEG signals changes with the change of a person's mental state and a series of transients such as sharp waves or spikes in epilepsy patients also appear. Usually, the collected EEG signals are very weak, and there is a lot of background noise and strong interference signals, such as power, frequency interference, ECG interference, breathing interference, swallowing, eye blinking, which increase the difficulty of analysis. However, because the method is a noninvasive method and contains a lot of physiological and pathological information, it still attracts the interest of many researchers. ey focus on the time-varying nonstationary characteristics of EEG signals. It has continuously proposed analytical methods that can effectively characterize different physiological states of the brain [18,19].

Feature Extraction Based on Frequency Band Power
Spectrum. When the human brain is active, it produces five frequency bands: alpha, gamma, theta, delta, and sigma. When the power spectrum peaks of the alpha wave and the beta wave are obvious, which are the main bands of the EEG, it indicates that the subject is awake; when the subject feels tired or even sleeps the peaks of theta wave and delta rise significantly [20,21]. Using the STFT algorithm to extract the power spectrum is a power spectral density function (PSD) feature as follows: where w k � (2πk/N), k � 0, 1, . . . , N − 1 is the angular frequency, m is discrete and ? is continuous, its mathematical expression is as follows: e energy spectrum at different frequencies of different EEG frequency bands is calculated as follows: e energy spectrum of each EEG band can then be defined as:  [22,23]. e steps of EMD decomposition are as follows: (1) Identify all maximum points in the EEG and fit the upper envelope e up (t) of the signal, and identify all minimum points in the EEG and fit the lower envelope e low (t) of the signal. (2) Calculate the average value m 1 (t) according to the synthesized upper and lower envelopes, the formula is (3) Subtract x(t) from m 1 (t) to obtain h 1 (t), and use the obtained h 1 (t) as the new EEG x(t). Repeat step 1). After k screening, h 1 (t) at this time is the first IMF component of the signal, denoted as c 1 (t) � h 1 (t). (4) Repeat the above steps with the difference r 1 (t) � x(t) − c 1 (t) between c 1 (t) and x(t) as a new signal to obtain a series of IMF components. When the obtained IMF component or residual signal is less than a preset value, the empirical mode decomposition step is completed.

Principle of Energy Spectrum.
Energy spectrum (Energy Spectral Density, ESD), arrangement of the harmonic energy contained in the signal, is called the energy spectrum, which describes the energy contained in each frequency component in the signal. e formula of the energy spectrum is as follows: In the formula, f n is the signal sequence. Divide the observation data x(t) of length N into K segments of data of length M, that is, N�KM. Estimate the third moment of each piece of data x i (t) (i � 1,2, ..., k): Computational Intelligence and Neuroscience Find the overall average of the third-order moment estimates of these K segments of the data, and find the third-order cumulant estimate of x(t): By estimating the third moment β of the non-Gaussian white noise sequence w(k), the parameters of the AR model are obtained: A is the AR model parameter to be estimated for p. Use p model parameters to estimate the energy spectrum: Among them,

Feature Extraction Based on EMD and Energy
Spectrum. Traditional EMD-based feature extraction methods usually contain a large number of time-domain signals, which is very helpful for extracting the main components of the signal, but it is not ideal for the extraction of fatigue signals. e energy spectral density function can extract the frequency domain information of each IMF component and extract the timefrequency information of EEG by combining it with EMD decomposition. e flow chart of the algorithm is shown in Figure 2. It can be seen from Figure 2 that after the original EEG has been preprocessed, the irrelevant noise signals have been roughly filtered out. e first three layers of IMF components are selected for processing, and after feature extraction, 96 energy spectrum features (32 channels × 3 layers of IMF) are obtained. Compared with the power spectrum feature extraction method, it has fewer features and requires less calculation and calculation time for classification.

Simulated Driving Experiment
Design. e EEG signals in this experiment are all collected by laboratory simulation driving. In this article, the real driving process is simulated by using a driving simulation platform composed of driving simulation equipment and driving simulation software. e driving simulator platform is an advanced simulator system that can simulate real driving conditions while providing dynamic displays of vehicles and surrounding traffic. e driving simulation platform itself consists of a fixed car, steering wheel, brake pedal, and accelerator pedal, a large screen, a high-performance computer, driving simulation software, and a multifunctional data acquisition board. e platform can dynamically record EEG during the mission and calculate the driving and running status of the vehicle. e EEG acquisition equipment used in this experiment is an EEG signal acquisition and analysis system composed of Brain Amp, DC amplifier of German Brain Products, and corresponding software.
e system includes E-Prime stimulation software, actiCAP electrode cap, Brain Amp amplifier, Brain Vision Recorder recording Software, and Brain Vision professional Analyzer analysis software, the physical object of the equipment is shown in Figure 3.

Experimental Objects and Methods.
In this experiment, the EEG data of 5 participants was selected as the training set, and the remaining 1 data was used as the test sample for feature extraction and classification experiments, pick out two sets of data from the data, one is normal signal data, and the other is fatigue signal data, and analyze them. We asked the participants to sleep only 4 hours as fatigue state data the night before data collection, and 8 hours sleep as waking state data, to obtain EEG data in the two states. e participants' simulated driving time was set at 8 pm the next day, during which EEG recording was started at 8 : 10, and signal recording was stopped at 8 : 30 pm.
e EEG acquisition experiment took 20 minutes. During the experiment, the subject was asked to sit on a chair and simulate the driving process on the driving simulation platform. During the experiment, the EEG was recorded and used with a 32-channel electrode cap according to the international 10-20 lead system. Brain Vision Recorder records EEG with a sampling rate of 1000 Hz. e temperature of the laboratory is maintained at 22°C, which provides the subjects with a comfortable and stable experimental environment. Figure 4 shows the actual scenario of the experiment.

EEG Signal Collection.
Due to the different functional composition of various regions of the brain, the EEG signal bands appearing in different regions will also change. In addition, EEG signals have the characteristics of low amplitude and low frequency, which are easily disturbed by noise signals. erefore, how to choose appropriate electrode selection location is essential. Using Brain Vision Recorder recording software to record the EEG during driving, it can be seen that most of the electrodes are in good contact with the scalp, and all signals meet the requirements of EEG collection. e EEG of fatigue and normal driving were collected, respectively. Each subject collected 20 minutes of normal signal and 20 minutes of fatigue signals. e signals collected every 10 seconds were used as a sample to construct training samples and test samples. In this experiment, six subjects collected a total of 720 groups of normal EEG samples and 720 groups of fatigue EEG samples, and the collected 1440 groups of EEG data samples were subjected to subsequent analysis and processing.

Frequency Reduction and Filtering of EEG Signals.
To study the driving fatigue EEG, it is necessary to analyze the five main EEG bands of alpha, beta, gamma, theta, and delta. e frequency bands of these five signals are roughly between 0.1 and 50 Hz, which belong to low-frequency signals, and the acquisition equipment, sampling frequency is 1000 Hz, which not only carries a large amount of irrelevant high-frequency noise and interferes with data processing, but also a large amount of data processing also causes a lot of burden on the processing and operation of the braincomputer interface device. erefore, to better carry out the subsequent processing, the collected EEG is first subjected to frequency reduction processing, and the sampling frequency is reduced to 200 Hz, which greatly reduces the amount of data calculation and speeds up the data processing.

Hard reshold and
Soft reshold Denoising. Noise shows strong randomness in the wavelet domain and can be considered as Gaussian noise. According to the characteristics of Gaussian distribution, most of the noise coefficients are in the interval [-3σ, 3σ]. erefore, as long as the threshold is set to λ � 3σ, most of the noise can be removed. Among them, the hard threshold wavelet denoising formula is as follows: Among them, d j,k is the wavelet coefficient, d j,k is the estimated value of the wavelet coefficient after hard threshold denoising, and λ is the threshold.
However, directly removing these wavelet coefficients will cause abrupt changes in the wavelet domain, resulting in local jitter in the denoised signal, which will affect the analysis and processing of the signal. erefore, a soft threshold wavelet denoising method is proposed. Subtract 3σ from the coefficients greater than 3σ, and add 3σ to the coefficients less than -3σ. e formula of the soft threshold wavelet transform denoising method is as follows: After soft threshold processing, the signal after denoising is smoother than that after hard threshold denoising. At the same time, it will also cause partial loss of detail signal.

Improve Soft reshold Denoising.
e improved soft threshold method combines the advantages of soft and hard threshold methods and can effectively remove low-frequency noise. e formula is as follows: Among them, a is the shape coefficient. e value of a can control the shape of the function in the d j,k < λ area, that is, the degree of attenuation. When the value is 0, the formula for improving the soft threshold method is equivalent to the soft threshold method. e selection formula of the threshold is where b ≥ 0, j is the number of decomposed layers, N is the number of wavelet transform coefficients corresponding to the j layer, λ j is the wavelet threshold, s is the variance of the noise, and in real life, the way the noise is generated is various, so the value of s is generally estimated according to the first-level wavelet packet decomposition coefficient, the estimation formula is as follows: Among them, d 1k is the wavelet decomposition coefficient of the first wavelet decomposition layer, and 0.6745 is the adjustment coefficient of Gaussian white noise.

Experimental Driver Fatigue Classification
Based on EEG Signal

Compare the Denoising Effects of Different Algorithms.
We tested the effect of the improved method, the signal used is a piece of data from the Fp1 channel of subject No. 1. e sampling frequency after frequency reduction is 200 Hz, and it has passed the bandpass filter of [0.1 Hz, 50 Hz]. Processing. e wavelets in the experiment all decompose the original signal in three layers and extract coefficients. e shape coefficient of the soft threshold is 0.01 and the scaling factor is 0.5. e result is shown in Figure 5. It can be seen from Figure 5 that there are many glitches in the signals of the hard threshold denoising and soft threshold denoising methods, therefore, the signal of the improved method is clearly better than the other three signals. Although the hard threshold denoising method and the soft threshold denoising method have certain effects, the signal effect after the improved soft threshold denoising processing is the best. is shows that the improved soft threshold denoising method can effectively combine the traditional hard threshold and soft threshold. Advantages of the method. 8 Computational Intelligence and Neuroscience Want to quantitatively analyze the pros and cons of the three wavelet threshold denoising methods, the signal-tonoise ratio (SNR), and root mean square error (RMSE) are again selected to judge the quality of the denoised EEG. e formula is as follows: Among them, N, x(i), x(i) are the length of the EEG, the original EEG, and the EEG after noise reduction. Randomly select 100 groups of EEG and obtain the signal-to-noise ratio and the root mean square error, respectively, and calculate the average value after the denoising experiment. e experimental results are shown in Table 1.
It can be seen from Table 1 that the improved soft threshold denoising method has the largest SNR, while the RMSE is the smallest, and the denoising effect is the best.

EM and Energy Spectrum Feature Extraction Results.
In this experiment, the EEG data of 5 subjects is selected as the training sample set, and the remaining 1 data is used for feature extraction and classification experiments as the sample test. And any set of normal signals and fatigue signals recorded in the driving fatigue experiment were selected for data analysis. In the experiment, the preprocessed signal is selected for feature extraction. After EMD decomposition and energy spectrum feature extraction, the data is compressed to 84 feature points; after power spectrum feature extraction, the EEG data is compressed to 144 feature points. e preprocessed EEG is compared with the signal after the two feature extraction algorithms, and the results are shown in Figures 6-8.
It can be seen from Figure 6 that before the feature extraction, the signals of the normal signal and the fatigue signal are entangled, which is very difficult to judge. It can be seen from Figure 7 that after using the power spectrum to perform feature extraction on the signal, it can be seen that the low-frequency range of the EEG in the fatigue state fluctuates more, and it can be easily distinguished from the normal EEG. It can be seen from Figure 8 that after EMD decomposition combined with energy spectrum for feature  Computational Intelligence and Neuroscience extraction, the energy difference feature in the low frequency range is more obvious than the power spectrum feature. erefore, it can be assumed that the feature extraction method combined with EMD decomposition and energy spectrum is more suitable than the power spectrum. EEG recognition of driving fatigue.
Want to understand the pros and cons of the two feature extraction algorithms, and analyze the optimization effect of the PSO-H-ELM algorithm, so I select the EEG data of 5 participants as the training set, and the EEG data of the remaining participants as the test set. e experimental result is the operation of different subjects as the test set, as shown in Table 2.
It can be seen from Table 2 that although the test results of different subjects are biased, it can be found from the average accuracy rate that the features extracted using EMD decomposition combined with energy spectrum are using SVM, KNN and PSO-H-ELM three classifiers In the case, the classification effect is better than using the power spectrum feature extraction method. At the same time, the results show that the algorithm can achieve the best classification effect after using the algorithm of EMD decomposition combined with energy spectrum for feature extraction.

Classification Performance of Different Algorithms.
Select 240 sample data of 1 participant as the test set, and 1200 sample data of the remaining 5 participants as the training set. e purpose of this arrangement is to avoid confusion between training and test data. e results are shown in Table 3.
It can be seen from Table 3   used as training samples. erefore, it is difficult to directly determine from Table 3 which classification algorithm has the best effect. To make the comparison of the experimental results more intuitive, the average classification accuracy rate of 5 classifiers is calculated, as shown in Table 4. It can be seen from Table 4 that the average accuracy of the PSO-H-ELM algorithm is the highest, indicating that the proposed PSO-H-ELM algorithm is superior to other algorithms in driving fatigue detection. By comparing the performance of H-ELM and the proposed PSO-H-ELM in different situations, it can be found that the change of training data does not affect the optimization of the H-ELM algorithm by the PSO algorithm.
To confirm the results of the experiment, paired t-tests are used to test the accuracy of PSO-H-ELM to see if it has obvious advantages compared to other classifiers. e results of the statistical test are shown in Table 5.
It can be seen from Table 5 that the PSO-H-ELM algorithm has only about 4% advantage compared with the average accuracy of the KNN algorithm and the SVM algorithm. e gap is not as large as expected, but it is used as a new algorithm for fatigue EEG. e detection is indeed more suitable compared to the two traditional algorithms. When comparing the PSO-H-ELM algorithm to the ELM algorithm and the H-ELM algorithm, it can be found that the advantages of the PSO-H-ELM algorithm are very obvious and stable. PSO-H-ELM is an optimized algorithm for H-ELM. e classification and recognition of EEG is much more accurate than that of H-ELM algorithm. Compared with traditional mainstream algorithms, the PSO-H-ELM algorithm is more suitable for the classification of driving fatigue EEG.

Discussion
(1) Living environment: the place of residence is too far from the work place; there are too many housework or the husband and wife are not in harmony; the mental burden is heavy; (2) Sleep quality: going to be too late, too little sleep time; poor sleep effect; noisy sleep environment cannot guarantee sleep quality. (3) In-car environment: poor air quality, poor ventilation; too high or too low temperature;   Driving at high speed can easily make the driver nervous. Driving at a slightly lower speed than normal without affecting traffic can reduce mental stress and fatigue. At the same time, we try to reduce overtaking when driving, reduce emergency braking, and other actions, which can also reduce fatigue. When you feel sleepy during driving, you can also open the window to ventilate (to prevent endogenous oxygen deficiency), play different styles of music, chew gum, apply wind oil essence, and body spirit dew is more effective to prevent fatigue driving. A must-have, when you are sleepy, apply on the Renzhong acupoint, and take a deep breath to keep your brain awake and reduce fatigue. Under the premise of not affecting safety, you can stretch your fingers, shake your arms, twist your neck, and look as far away as possible. Always staring at the center line will cause visual fatigue.
If you drive a motor vehicle for more than 4 hours continuously, you should stop and rest, and the rest time should not be less than 20 minutes. Passenger vehicles, heavy-duty trucks, and semitrailer tractors used for highway operation shall install and use driving recorders that meet national standards. Traffic police can check the driving speed, continuous driving time, and other driving status information of the motor vehicle.

Conclusions
In daily life, the driver cannot always drive the vehicle in a stable state. When the driver finishes a day's work, his brain power becomes exhausted, and it is very easy to experience fatigue when driving a vehicle. To avoid the occurrence of fatigue driving, this article uses the stable and reliable characteristics of EEG, collects EEG through the braincomputer interface, and processes and analyzes it, to achieve the purpose of judging and early warning of fatigue driving.
is paper implements a feature extraction method that combines empirical mode decomposition and energy spectrum: the data is decomposed into multiple IMF components through empirical mode decomposition, and then the energy spectrum is used to extract features for each IMF component, and these components are combined at the feature points to construct the feature vector of EEG. e experiment uses the new method and the power spectrum method to extract the features of EEG and uses a variety of classifiers for classification processing. Compare the classification experiment results of the two methods, and the better feature extraction effect of the new method is verified. is research still has certain limitations. For example, there are still some differences between simulated driving and actual driving, the simulated driving time is not long enough, the time when drivers of different physiques are fatigued under different road conditions, and the characteristics of fatigue will be different. ere are still many problems in the development of driving fatigue research, such as real-time problems, contact problems, and cost-effectiveness of detection devices.
Data Availability e data that support the findings of this study are available from the corresponding author upon reasonable request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.