A method for extracting common spatial pattern features based on phase and residual information
The phase and residual sequences are obtained through Hilbert transform and EMD decomposition, and combined with the CSP algorithm, the problem of sensitivity of the CSP algorithm to noise is solved, and the feature extraction performance and classification accuracy in the motor imagery task are improved.
Patent Information
- Application Number
- CN202410750834.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-06-12
AI Technical Summary
The CSP algorithm's sensitivity to noise reduces the EEG signal classification performance, especially in motor imagery tasks, where the feature extraction effect is poor.
The phase sequence and residual sequence are obtained respectively through Hilbert transformation and EMD decomposition, and then combined to perform CSP algorithm feature extraction to construct a phase-residual sequence to reduce interference terms and improve feature discrimination.
The feature extraction performance of the CSP algorithm in motor imagery tasks and the robustness and generalization ability of the classification model are improved, and the accuracy of motor imagery detection is significantly improved.
Smart Images

Figure CN118332324B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electroencephalogram (EEG) signal processing, and in particular to a method for extracting common space pattern features based on phase and residual information. Background Art
[0002] Common Spatial Paternal (CSP) is a commonly used feature extraction algorithm in binary motor imagery tasks. This algorithm relies on matrix diagonalization to find the optimal spatial filter, projecting the spatial distribution components of each type of data in the multi-channel sequence to the optimal subspace, thereby maximizing the inter-class variance of the two types of signals and obtaining eigenvalues with greater discrimination. In recent years, many studies have proven the effectiveness of the CSP algorithm in the field of brain-computer interfaces.
[0003] The CSP algorithm has been widely used in various brain cognition studies due to its compatibility with multi-channel EEG data sources and its powerful feature extraction capabilities, and has become one of the indispensable classic algorithms in the field of brain-computer interfaces. However, the CSP algorithm also has limitations, and its sensitivity to noise will directly lead to a decrease in the final classification performance. Noise is an inevitable source of interference in EEG signals, which mainly comes from external noise, human physiological electrical noise, and mutual interference between electrical activities in various channels of the brain. Summary of the invention
[0004] In order to solve the problems raised in the above background technology, the technical solution adopted by the present invention is:
[0005] A method for extracting common space pattern features based on phase and residual information comprises the following steps:
[0006] S1. Perform Hilbert transform and EMD decomposition on the original EEG sequence to obtain the phase sequence and residual sequence respectively;
[0007] S2, combining the phase sequence and residual sequence obtained in step S1 to obtain a phase-residual sequence;
[0008] S3. Use the CSP algorithm to extract features from the phase-residual sequence obtained in step S2 and send it to a classifier for classification.
[0009] Furthermore, in step S1, the method for obtaining the phase sequence specifically includes:
[0010] enter is the original sequence, and the system impulse response is , the output is and The convolution result , then the Hilbert transform is expressed as:
[0011] ,
[0012] Original sequence The analytical expression of is:
[0013] ,
[0014] Then the solution process of the instantaneous phase is:
[0015] ,
[0016] in, is a phase sequence, which represents the instantaneous phase value at time t.
[0017] Furthermore, in step S1, the method for obtaining the residual sequence specifically includes:
[0018] First, find the original sequence All the maximum points of , and use the cubic spline difference function to fit all the maximum points as The upper envelope of ;
[0019] Then, find the original sequence All the minimum points of The lower envelope of ;
[0020] Next, find and The mean sequence of , and let the original sequence Subtract the mean series , get a new sequence. If there are no negative maximum points and positive minimum points in the new sequence, then the new sequence is an intrinsic mode function IMF1. If the conditions are not met, repeat the above steps for the new data;
[0021] Finally, if the new sequence satisfies the condition of being the eigenmode function IMF1, then the original sequence Subtracting the intrinsic mode function IMF1 yields the sequence ,at this time Repeat the above steps as the new original sequence until IMF2, IMF3, etc. and the final residual sequence are found .
[0022] Further, in step S2, specifically, the phase-residual sequence is the phase sequence solved by Hilbert transform The residual sequence generated by EMD decomposition Multiplying at each time t, it is expressed as:
[0023] ,
[0024] in, Represents the value of the phase-residual sequence at time t.
[0025] Furthermore, in step S3, the step of using the CSP algorithm to extract features specifically includes:
[0026] For two different categories of multi-channel EEG sequences and , solve its normalized covariance matrix:
[0027] ,
[0028] in, Indicates the data category, The symbol represents the trace of the solution matrix, and the sum of the covariances of the two is:
[0029] ,
[0030] right Perform singular value decomposition to obtain:
[0031] ,
[0032] in, Expressed as eigenvalue, is the corresponding eigenvector, and the eigenvalues are arranged in descending order. Perform whitening transformation to obtain:
[0033] ,
[0034] Afterwards, construct the spatial filter:
[0035] ,
[0036] ,
[0037] right and Performing principal component decomposition yields:
[0038] ,
[0039] ,
[0040] and The eigenvector matrix of Same, in this case, the spatial filter is expressed as:
[0041] ,
[0042] Projection Matrix It is obtained from the training set sequence. When extracting features, for the training set, the feature extraction process is:
[0043] ,
[0044] ,
[0045] Then for the test set:
[0046] ,
[0047] Finally, The sequence replaces the original EEG sequence and is sent to the CSP algorithm for feature extraction.
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] The co-spatial pattern feature extraction method based on phase and residual information provided by the present invention first obtains the phase sequence and the residual sequence respectively, and then combines the two to obtain the phase-residual sequence, thereby constructing a sequence containing more information and fewer interference items, and sending the sequence to the CSP algorithm for feature extraction, so as to obtain features with higher discrimination for classification and recognition of motor imagery tasks, better improve the performance of the CSP algorithm in extracting features, so that the final classification model has stronger robust performance and model generalization ability, and greatly improves the accuracy of motor imagery detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A schematic flow chart of a method for extracting common spatial pattern features based on phase and residual information provided by the present invention. DETAILED DESCRIPTION
[0051] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the following further describes how the present invention is implemented in conjunction with the accompanying drawings and specific implementation methods.
[0052] Reference Figure 1 As shown, the present invention provides a method for extracting common space pattern features based on phase and residual information, comprising the following steps:
[0053] S1. Perform Hilbert transform and EMD decomposition on the original EEG sequence to obtain the phase sequence and residual sequence respectively;
[0054] S2, combining the phase sequence and residual sequence obtained in step S1 to obtain a phase-residual sequence;
[0055] S3. Use the CSP algorithm to extract features from the phase-residual sequence obtained in step S2 and send it to a classifier for classification.
[0056] Specifically, in step S1, the phase needs to be weighted with the residual component. To ensure that the lengths of the two sequences are consistent, the Hilbert transform method is used to solve the instantaneous phase of the EEG sequence at each point. The Hilbert transform can convert a one-dimensional signal into an analytical signal on a two-dimensional complex plane. After the time series is Hilbert transformed, its real part is still the original signal itself, and the imaginary part is the actual Hilbert transform signal.
[0057] The method for obtaining the phase sequence specifically includes:
[0058] enter is the original sequence, and the system impulse response is , the output is and The convolution result , then the Hilbert transform is expressed as:
[0059] ,
[0060] Original sequence The analytical expression of is:
[0061] ,
[0062] Then the solution process of the instantaneous phase is:
[0063] ,
[0064] in, is a phase sequence, which represents the instantaneous phase value at time t.
[0065] On the other hand, EMD decomposition is suitable for the analysis and processing of non-stationary nonlinear time series. Therefore, this theory is widely used in the processing of EEG signals. EMD decomposition does not require pre-analysis of the signal to determine the basis function, so this method has good performance when processing some unknown signals. The EMD decomposition process is relatively simple. In essence, it separates the signal step by step according to the law of decreasing frequency based on the upper and lower envelope characteristics of the signal. The components finally separated are the intrinsic mode functions of the EMD decomposition, and the components that cannot be further decomposed are the residual components.
[0066] The method of obtaining the residual sequence specifically includes:
[0067] First, find the original sequence All the maximum points of , and use the cubic spline difference function to fit all the maximum points as The upper envelope of ;
[0068] Then, find the original sequence All the minimum points of The lower envelope of ;
[0069] Next, find and The mean sequence of , and let the original sequence Subtract the mean series , get a new sequence. If there are no negative maximum points and positive minimum points in the new sequence, then the new sequence is an intrinsic mode function IMF1. If the conditions are not met, repeat the above steps for the new data;
[0070] Finally, if the new sequence satisfies the condition of being the eigenmode function IMF1, then the original sequence Subtracting the intrinsic mode function IMF1 yields the sequence ,at this time Repeat the above steps as the new original sequence until IMF2, IMF3, etc. and the final residual sequence are found .
[0071] Further, in step S2, specifically, the phase-residual sequence is the phase sequence solved by Hilbert transform The residual sequence generated by EMD decomposition Multiplying at each time t, it is expressed as:
[0072] ,
[0073] in, Represents the value of the phase-residual sequence at time t.
[0074] The CSP algorithm can find the eigenvalue with the greatest data discrimination in binary classification tasks. It is a feature extraction algorithm widely used in motor imagery classification. The CSP algorithm requires the input data to be in multi-channel form.
[0075] Furthermore, in step S3, the step of using the CSP algorithm to extract features specifically includes:
[0076] For two different categories of multi-channel EEG sequences and , solve its normalized covariance matrix:
[0077] ,
[0078] in, Indicates the data category, The symbol represents the trace of the solution matrix, and the sum of the covariances of the two is:
[0079] ,
[0080] right Perform singular value decomposition to obtain:
[0081] ,
[0082] in, Expressed as eigenvalue, is the corresponding eigenvector, and the eigenvalues are arranged in descending order. Perform whitening transformation to obtain:
[0083] ,
[0084] Afterwards, construct the spatial filter:
[0085] ,
[0086] ,
[0087] right and Performing principal component decomposition yields:
[0088] ,
[0089] ,
[0090] and The eigenvector matrix of Same, in this case, the spatial filter is expressed as:
[0091] ,
[0092] Projection Matrix It is obtained from the training set sequence. When extracting features, for the training set, the feature extraction process is:
[0093] ,
[0094] ,
[0095] Then for the test set:
[0096] ,
[0097] Finally, The sequence replaces the original EEG sequence and is sent to the CSP algorithm for feature extraction; in specific applications, the corresponding features of two or more different categories of EEG sequences can be obtained first. The sequence is used as the training set to complete the training, and then the EEG sequence corresponding to the test set can be Sequence feature extraction.
[0098] In summary, the co-spatial pattern feature extraction method based on phase and residual information provided by the present invention first obtains the phase sequence and the residual sequence respectively, and then combines the two to obtain the phase-residual sequence, thereby constructing a sequence containing more information and fewer interference items, and sending the sequence to the CSP algorithm for feature extraction, so as to obtain features with higher discrimination for classification and recognition of motor imagery tasks, and better improve the performance of the CSP algorithm in extracting features, so that the final classification model has stronger robust performance and model generalization ability, and greatly improves the accuracy of motor imagery detection.
[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.
Claims
1. A co-spatial pattern feature extraction method based on phase and residual information, It is characterized in that The steps include: S1. Perform Hilbert transform and EMD decomposition on the original EEG sequence to obtain the phase sequence and residual sequence respectively; S2, combining the phase sequence and residual sequence obtained in step S1 to obtain a phase-residual sequence, where the phase-residual sequence is the phase sequence solved by Hilbert transform The residual sequence generated by EMD decomposition Multiplying at each time t, it is expressed as: , in, represents the value of the phase-residual sequence at time t; S3. Use the CSP algorithm to extract features from the phase-residual sequence obtained in step S2 and send it to a classifier for classification.
2. The method for extracting common spatial pattern features based on phase and residual information according to claim 1, It is characterized in that In step S1, the method for obtaining the phase sequence specifically includes: enter is the original sequence, and the system impulse response is , the output is and The convolution result , then the Hilbert transform is expressed as: , Original sequence The analytical expression of is: , Then the solution process of the instantaneous phase is: , in, is a phase sequence, which represents the instantaneous phase value at time t.
3. The method for extracting common spatial pattern features based on phase and residual information according to claim 2, It is characterized in that In step S1, the method for obtaining the residual sequence specifically includes: First, find the original sequence All the maximum points of , and use the cubic spline difference function to fit all the maximum points as The upper envelope of ; Then, find the original sequence All the minimum points of The lower envelope of ; Next, find and The mean sequence of , and let the original sequence Subtract the mean series , get a new sequence. If there are no negative maximum points and positive minimum points in the new sequence, then the new sequence is an intrinsic mode function IMF1. If the conditions are not met, repeat the above steps for the new data; Finally, if the new sequence satisfies the condition of being the eigenmode function IMF1, then the original sequence Subtracting the intrinsic mode function IMF1 yields the sequence ,at this time Repeat the above steps as a new original sequence. The components finally separated are the intrinsic mode functions of EMD decomposition. The components that cannot be further decomposed are the residual components, and the residual sequence is obtained. .
4. The method for extracting common spatial pattern features based on phase and residual information according to claim 3, It is characterized in that In step S3, the steps of extracting features using the CSP algorithm specifically include: For two different categories of multi-channel EEG sequences and , solve its normalized covariance matrix: , in, Indicates the data category, The symbol represents the trace of the solution matrix, and the sum of the covariances of the two is: , right Perform singular value decomposition to obtain: , in, Expressed as eigenvalue, is the corresponding eigenvector, and the eigenvalues are arranged in descending order. Perform whitening transformation to obtain: , Afterwards, construct the spatial filter: , , right and Performing principal component decomposition yields: , , and The eigenvector matrix of Same, in this case, the spatial filter is expressed as: , Projection Matrix It is obtained from the training set sequence. When extracting features, for the training set, the feature extraction process is: , , Then for the test set: , Finally, The sequence replaces the original EEG sequence and is sent to the CSP algorithm for feature extraction.
