Fatigue driving detection method based on single-channel EEG
By using the MSD algorithm of single-channel EEG to detect and locate EBP features, and combining EEG sub-band features, a feature fusion strategy with weighted coefficients is designed to solve the problems of high complexity and low accuracy in multi-channel EEG detection, thus achieving efficient and accurate fatigue driving detection.
Patent Information
- Application Number
- CN202410994163.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-11-08
AI Technical Summary
Existing technologies for fatigue driving detection based on multi-channel EEG suffer from high computational complexity and driver discomfort during data acquisition. Furthermore, the detection accuracy of the forehead EEG channel decreases after equipment simplification.
A method based on single-channel EEG of the forehead is adopted. Embedded EBP features are detected and located by the MSD algorithm. Combined with EEG sub-band features, a feature fusion strategy with weighted coefficients is designed, and a random forest classifier is used for fatigue driving detection.
It effectively reduced the complexity of detection time and improved the detection accuracy, achieving a fatigue driving detection accuracy of up to 95.41%.
Smart Images

Figure CN118902476A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electroencephalogram (EEG) signal processing, and in particular to a fatigue driving detection method based on single-channel EEG. Background Art
[0002] Fatigue driving is a phenomenon of drowsiness caused by the driver's continuous driving at high intensity, for a long time and over a long distance. It usually leads to a decrease in the driver's attention, prolonged decision-making reaction time, and threatens traffic safety. According to statistics, the probability of traffic accidents caused by fatigue driving is more than four times that of normal driving, and accounts for more than 40% of major accidents. Therefore, timely, objective and accurate fatigue driving detection is of great significance to ensure traffic safety. Studies have shown that the neuronal activity in specific brain areas changes under fatigue driving conditions, which in turn causes corresponding changes in the EEG signals of the cerebral cortex. At the same time, EEG is a dynamic, non-linear time series signal with the advantages of being unconcealable, high temporal resolution, non-invasive and low-cost, and is therefore considered the "gold standard" for fatigue driving detection.
[0003] In the past decade, research results on EEG in the field of fatigue driving detection have continued to emerge. Generally, the accuracy of fatigue detection based on multi-channel EEG can reach more than 80%, but at the cost of increased computational complexity. At the same time, multi-channel EEG data acquisition often makes drivers feel uncomfortable and creates resistance. The forehead is a hairless area on the head, which has little interference with EEG data acquisition. Recently, fatigue driving detection based on forehead EEG channels has received widespread attention. However, the fatigue driving detection method based on forehead EEG channels simplifies the acquisition equipment and reduces the computational complexity, but also reduces the detection accuracy to a certain extent. Therefore, discovering more fatigue driving detection information from single-channel forehead EEG data is one of the effective ways to improve detection performance. Blinking is an important indicator for fatigue driving detection. Its frequency and amplitude change with the degree of fatigue. EBP is a quantitative form of frequency and amplitude.
[0004] Based on the above analysis, the present invention realizes and provides a fatigue driving detection method based on single-channel EEG by detecting and locating the EBP embedded in the EEG during the fatigue driving process, and exploring the fusion strategy of the EEG embedded EBP features and the EEG sub-band features. Summary of the invention
[0005] The purpose of the present invention is to solve the above-mentioned problems and provide a fatigue driving detection method based on forehead single-channel EEG.
[0006] To achieve the above purpose, the technical solution adopted by the present invention is: the specific steps are as follows:
[0007] Step 1: Input the EEG signal x[n] of the forehead Fp1 channel and preprocess it;
[0008] Step 2: Design the MSD algorithm to realize embedded EBP detection and positioning. The process is as follows:
[0009] (1) Perform a window sliding operation on the EEG signal and calculate the MSD of k data points in each window. The MSD of the EEG signal x[n] is calculated as follows:
[0010]
[0011] Where W = 2k + 1 is the sliding window length, i is the signal index, i = k + 1, 2k + 2, ..., nk;
[0012] (2) Calculate UT and compare it with the local maximum of MSD in each window. Select the local maximum of MSD greater than UT as the potential local peak of EBP.
[0013]
[0014] Where 0.6745 is the Gaussian noise constant, A is the scale factor, and N is the signal length;
[0015] (3) Usually, the duration of EBP is 200 ms to 500 ms. Therefore, when the distance between two potential EBP local peaks is less than 200 ms, the larger one is selected as the candidate peak and the EBP candidate peak is mapped to the original EEG signal;
[0016] (4) Noise interference can cause EBP mapping peak deviation. Therefore, each EBP mapping peak is extended by 100 ms before and after. The maximum signal value in this range is the EBP correction peak. The detection frame with a length of 200 ms, centered on the EBP correction peak, is the EBP detection and positioning result.
[0017] Step 3: Based on EBP detection and positioning, extract the features of EBP embedded in EEG, such as BR, ABA, and ABI, which can reflect the fatigue driving status, as a type of fusion feature;
[0018] Step 4: After EBP feature extraction, DWT filtering is performed on the EBP in EEG to remove it from the EEG signal;
[0019] Step 5: The filtered EEG signal is decomposed into five sub-bands, namely delta, theta, alpha, beta, and gamma, at multiple scales, and the features reflecting the changes in brain state during driving are extracted from each sub-band as another type of fusion feature;
[0020] Step 6: Eliminate redundant features, retain the most effective features, provide a feature selection method based on improved PCC, calculate the PCC between features and between features and categories, and select the features with the strongest correlation with the category and the weakest correlation with the selected features;
[0021] Step 7: Design a feature fusion strategy based on weight coefficients, assign different weight coefficients to different features, and input the fused features into the RF classifier to achieve efficient fatigue driving detection. The steps of the feature fusion strategy based on weight coefficients are as follows:
[0022] (1) Calculate the standard deviation of each feature:
[0023]
[0024] Where x is the mean value of each feature;
[0025] (2) Based on the standard deviation s of each feature i , calculate the corresponding weight coefficient, and assign different weight coefficients w to different features i :
[0026]
[0027] (3) Based on the EEG embedded EBP features and the five sub-band features of EEG, namely delta, theta, alpha, beta, and gamma, feature fusion based on weight coefficients is performed:
[0028] F fusion ={w1f1,w2f2,…,w i f i} (15)
[0029] In the formula, w1+w2+…+w i =1,f1,f2,…,f i is the fused feature.
[0030] Furthermore, the feature extraction process in step 3 and step 5 is as follows:
[0031] (1) Taking 6s as the feature extraction time segment, the embedded EBP features in EEG and the delta, theta, alpha, beta, gamma and other sub-band features of EEG were extracted;
[0032] (2) Extract features such as BR, ABA, and ABI from EBP that can reflect fatigue driving status:
[0033]
[0034] Where i is the number of blinks, N is the length of the EEG signal, and M isi is the location of the ith EBP, A[M i ] is M i The amplitude of
[0035] (3) Extract features such as PSD, REE, WLE, KFD, and Hjorth parameters of EEG sub-bands such as delta, theta, alpha, beta, and gamma. PSD is used to measure the driver's mental state:
[0036]
[0037] In the formula, the integral limits f2 and f1 are the upper and lower limits of the frequency;
[0038] REE is used to measure the energy distribution when the driver's state changes:
[0039]
[0040] In the formula, x i is the signal value of the subband, c i is the wavelet coefficient of the corresponding subband;
[0041] WLE is used to measure the driver's alertness level in each frequency band:
[0042]
[0043] In the formula, p i is the ratio of the energy of the i-th wavelet coefficient to the total energy, and N is the number of layers of wavelet decomposition;
[0044] KFD is used to measure the changes in EEG waveform during the driver's driving process:
[0045]
[0046] Where, L is the total length of the signal, and L0 is the length of the signal curve;
[0047] Hjorth parameters include activity, mobility, and complexity, which are used to reflect the driver's attention level, alertness, and complex decision-making ability respectively:
[0048] Act=var[x(t)] (10)
[0049]
[0050] Where var is the signal variance, x(t) is the EEG signal at time t, and x′(t) is the first-order derivative of x(t).
[0051] Compared with the prior art, the beneficial effects of the present invention using the above technical solution are:
[0052] (1) To solve the problems of high time complexity of multi-channel EEG fatigue driving detection and driver discomfort during data collection, a single-channel EEG fatigue driving detection method based on the forehead is provided. Through the theory of information complementarity, the embedded EBP features and their sub-band features of the forehead Fp1 channel EEG are integrated. On the one hand, the EBP features can be used as a supplement to the EEG signal to improve the accuracy of fatigue driving detection. On the other hand, the eye blink potential is conducive to accurately capturing the period of EEG signal appearance under fatigue driving state. This effectively reduces the time complexity of detection and improves the detection accuracy.
[0053] (2) The present invention designs and provides an EBP detection and positioning method based on MSD. The core technology is to perform a sliding window operation on the time-series EEG signal, calculate the MSD of k data points in each window, and obtain the local maximum of the MSD sequence. Then, based on the UT method, the MSD local maximum is compared with the UT, and the MSD local maximum that is greater than the UT is selected. The EBP peak deviation caused by noise interference is avoided, and the accuracy of EBP detection and positioning is ensured through peak correction.
[0054] (3) Usually, machine learning algorithms give equal importance to all features, ignoring the difference in the amount of information contained in different features. The present invention provides a feature fusion strategy based on weight coefficients, which assigns different feature weights to each EBP feature and EEG sub-band feature, thereby fully reflecting the difference in the contribution of different features to fatigue driving detection and realizing intelligent detection. Using RF as a classifier, the highest detection accuracy of 95.41% was obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 is a flow chart of the method of the present invention;
[0056] Figure 2 The EBP detection and positioning process in the EEG signal of the embodiment of the present invention;
[0057] Figure 3 The process of decomposing the EEG signal into 5 sub-bands according to the embodiment of the present invention;
[0058] Figure 4 The decomposition results of each sub-band of the EEG signal under fatigue driving state in the embodiment of the present invention;
[0059] Figure 5 The number of features and their detection accuracy corresponding to different PCC values in the embodiment of the present invention. DETAILED DESCRIPTION
[0060] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0061] The present invention provides a fatigue driving detection method based on forehead single-channel EEG. The forehead Fp1 channel EEG data is used. Based on the information complementarity theory, an MSD algorithm is designed to detect and locate the EBP embedded in the Fp1 channel EEG, and its fatigue driving related features are extracted; on this basis, discrete wavelet transform is used to eliminate the EBP data in the EEG to obtain a relatively pure EEG signal, and the signal is decomposed into five non-overlapping sub-bands such as delta, theta, alpha, beta, and gamma through multi-scale, and the time-frequency features related to fatigue driving of each sub-band are extracted; a feature fusion strategy based on weight coefficients is designed to fuse the embedded EBP features and the EEG sub-band features, and the fused features are input into an RF classifier to achieve high-precision fatigue driving detection.
[0062] See also Figure 1 As shown, the present invention provides a technical solution: a fatigue driving detection method based on single-channel EEG, the method steps are as follows:
[0063] Step 1: Input the EEG signal x[n] of the forehead Fp1 channel and preprocess it;
[0064] Step 2: Design the MSD algorithm to realize embedded EBP detection and positioning. The process is as follows:
[0065] (1) Perform a window sliding operation on the EEG signal and calculate the MSD of k data points in each window. The MSD of the EEG signal x[n] is calculated as follows:
[0066]
[0067] Where W = 2k + 1 is the sliding window length, i is the signal index, i = k + 1, 2k + 2, ..., nk;
[0068] (2) Calculate UT and compare it with the local maximum value of MSD in each window. Figure 2 The red dots in x1[n] are the local MSD maxima corresponding to each window. The local MSD maxima are compared with UT, and the local MSD maxima that are greater than UT are selected as the potential EBP local peaks, i.e., the red dots on the dotted line.
[0069]
[0070] Where 0.6745 is the Gaussian noise constant, A is the scale factor, and N is the signal length;
[0071] (3) Usually, the duration of EBP is 200 ms to 500 ms. Therefore, when the distance between two potential EBP local peaks is less than 200 ms, the larger one is selected as the candidate peak, e.g. Figure 2 As shown by the red point x2[n] in the figure, the EBP candidate peak is mapped to the original EEG signal, and the result is as follows Figure 2 In x3[n].
[0072] (4) Noise interference can cause EBP mapping peak deviation. Therefore, each EBP mapping peak is extended by 100 ms before and after. The maximum signal value within this range is the EBP correction peak. Figure 2 The red dot on x4[n] is shown in the figure. With the EBP correction peak as the center, the detection frame with a length of 200ms is the EBP detection and positioning result, as shown in Figure 2 In x5[n].
[0073] Step 3: Based on EBP detection and positioning, 6s is used as the feature extraction time segment, and the features such as BR, ABA, ABI extracted from EBP that can reflect the fatigue driving status are used as a type of fusion feature;
[0074] Step 4: After EBP feature extraction, DWT filtering is performed on the EBP in EEG to remove it from the EEG signal;
[0075] Step 5: The filtered EEG signal is decomposed into five sub-bands: delta, theta, alpha, beta, and gamma. Figure 3 As shown, the decomposition results of each subband are as follows Figure 4 Then, taking 6s as the time segment, the PSD, REE, WLE, KFD, Hjorth parameter and other features of the EEG sub-band are extracted as another type of fusion feature;
[0076] Step 6: Eliminate redundant features, retain valid features, propose a feature selection method based on improved PCC, calculate the PCC between features and between features and categories, and select the features with the strongest correlation with the category and the weakest correlation with the selected features. Figure 5 The results of the relationship between the number of features selected and the accuracy corresponding to different PCC values using the RF classifier on the improved PCC method are shown. It can be seen that the highest accuracy is obtained when 18 features are selected;
[0077] Step 7: Design a feature fusion strategy based on weight coefficients and calculate the standard deviation of each feature:
[0078]
[0079] Where x is the mean value of each feature;
[0080] Based on the standard deviation of each feature i , calculate the corresponding weight coefficient, and assign different weight coefficients w to different features i :
[0081]
[0082] Table 1 shows the standard deviation values and weight coefficient calculation results of the 18 selected fusion features.
[0083] Table 1 Standard deviation and weight coefficient of 18 selected fusion features
[0084]
[0085]
[0086] Use the weight coefficients in Table 1 to perform feature fusion based on weight coefficients:
[0087] F fusion ={w1f1,w2f2,…,w i fi} (15)
[0088] In the formula, w1+w2+…+w i =1,f1,f2,…,f i The fused features were selected for 18. The fused features were used as RF classification input, and a detection accuracy of 95.41% was finally obtained using 10-fold cross validation.
[0089] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
[0090] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. A fatigue driving detection method based on single-channel EEG, characterized in that: The following steps are involved: Step 1: Input the EEG signal x[n] of the forehead Fp1 channel and preprocess it; Step 2: According to the change of EBP amplitude in EEG, the MSD is designed to perform window sliding operation on the time series EEG signal, the MSD of k data points in each window is calculated, the local maximum of the MSD sequence is obtained, the MSD local maximum is compared with the universal threshold (UT), and the window corresponding to the MSD local maximum greater than UT is selected to detect and locate the embedded EBP in the Fp1 channel; Step 3: Based on EBP detection and positioning, the features of EBP embedded in EEG, such as blink rate (BR), average blink amplitude (ABA), average blink interval (ABI), etc., which can reflect the fatigue driving state, are extracted as a type of fusion features; Step 4: After EBP feature extraction, discrete wavelet transform (DWT) filtering is performed on the EEG to remove it from the EEG signal; Step 5: The filtered EEG signal is decomposed into five sub-bands, namely delta, theta, alpha, beta, and gamma, at multiple scales, and the features reflecting the changes in brain state during driving are extracted from each sub-band as another type of fusion feature; Step 6: Eliminate redundant features, retain the most effective features, provide a feature selection method based on the improved Pearson correlation coefficient (PCC), calculate the PCC between features and between features and categories, and select the features with the strongest correlation with the category and the weakest correlation with the selected features; Step 7: Design a feature fusion strategy based on weight coefficients, assign different weight coefficients to different features, and input the fused features into the random forest (RF) classifier to achieve efficient fatigue driving detection.
2. A fatigue driving detection method based on single-channel EEG according to claim 1, characterized in that: The process in step 2 is as follows: (1) Perform a window sliding operation on the EEG signal and calculate the MSD of k data points in each window. The MSD of the EEG signal x[n] is calculated as follows: Where W = 2k + 1 is the sliding window length, i is the signal index, i = k + 1, 2k + 2, ..., nk; (2) Calculate UT and compare it with the local maximum of MSD in each window. Select the local maximum of MSD greater than UT as the potential local peak of EBP. Where 0.6745 is the Gaussian noise constant, A is the scale factor, and N is the signal length; (3) Usually, the duration of EBP is 200 ms to 500 ms. Therefore, when the distance between two potential EBP local peaks is less than 200 ms, the larger one is selected as the candidate peak and the EBP candidate peak is mapped to the original EEG signal; (4) Noise interference can cause EBP mapping peak deviation. Therefore, each EBP mapping peak is extended by 100 ms before and after. The maximum signal value in this range is the EBP correction peak. The detection frame with a length of 200 ms, centered on the EBP correction peak, is the EBP detection and positioning result.
3. The method for detecting fatigue driving based on single-channel EEG according to claim 1, characterized in that: The process of extracting features in steps 3 and 5 is as follows: (1) Studies have shown that the features extracted from physiological signals are usually more effective when the segments are 6s (M. Fraschini, et al., "The effect of epoch length on estimated EEG functional connectivity and brain network organisation," Journal of neural engineering, 2016, 13(3), 036015.). Therefore, the present invention extracts the embedded EBP features in EEG and the 5 sub-band features of EEG, namely delta, theta, alpha, beta and gamma, with 6s as segments; (2) Extract features such as BR, ABA, and ABI from EBP that can reflect fatigue driving status: Where i is the number of blinks, N is the length of the EEG signal, and M is i is the location of the ith EBP, A[M i ] is M i The amplitude of (3) Extract features such as delta, theta, alpha, beta, gamma and other EEG sub-band power spectral density (PSD), recursive energy efficiency (REE), wavelet logarithmic energy entropy (WLE), Katz fractal dimension (KFD), Hjorth parameter, etc. PSD is used to measure the driver's mental state: In the formula, the integral limits f2 and f1 are the upper and lower limits of the frequency; REE is used to measure the energy distribution when the driver's state changes: In the formula, x i is the signal value of the subband, c i is the wavelet coefficient of the corresponding subband; WLE is used to measure the driver's alertness level in each sub-band: In the formula, p i is the ratio of the energy of the i-th wavelet coefficient to the total energy, and N is the number of layers of wavelet decomposition; KFD is used to measure the changes in EEG waveform during the driver's driving process: Where, L is the total length of the signal, and L0 is the length of the signal curve; Hjorth parameters include activity, mobility, and complexity, which measure the driver's attention level, alertness, and complex decision-making ability respectively: Act=var[x(t)] (10) Where var is the signal variance, x(t) is the EEG signal at time t, and x′(t) is the first-order derivative of x(t).
4. The method for detecting fatigue driving based on single-channel EEG according to claim 1, characterized in that: The specific process of step seven is as follows: (1) For multiple features extracted from physiological signals, each feature has a different impact on a specific task. The feature standard deviation reflects the amount of information contained in its corresponding signal. The smaller the feature standard deviation, the smaller the difference between the signals, the smaller the impact on the detection result, and the smaller the corresponding weight coefficient. Conversely, the larger the feature standard deviation, the larger the corresponding weight coefficient. Based on this, the present invention proposes a feature fusion strategy based on weight coefficient; (2) The standard deviation of each feature is calculated as follows: In the formula, is the mean value of each feature; (3) Based on the standard deviation s of each feature i , calculate the corresponding weight coefficient, and assign different weight coefficients w to different features i : (4) Based on the EEG embedded EBP features and the five sub-band features of EEG, namely delta, theta, alpha, beta, and gamma, feature fusion based on weight coefficients is performed: F fusion ={w1f1,w2f2,…,w i f i } (15) In the formula, w1+w2+…+w i =1,f1,f2,…,f i is the fused feature.
