MRCP decoding method
By combining Pearson correlation coefficient and DTW matching in the MRCP decoding method, a personalized model is established and parameters are adjusted in real time. This solves the problems of artifact interference and computational complexity in BCI technology, improves decoding accuracy and adaptability, and enhances the effect of rehabilitation training.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-10
- Publication Date
- 2026-03-06
AI Technical Summary
Existing BCI technology suffers from artifact interference during the decoding process, resulting in low decoding accuracy, high computational complexity, and poor fit among different subjects.
A Pearson correlation coefficient and dynamic time-warping (DTW) matching-based MRCP decoding method is adopted. A personalized MRCP model is established through paradigm training, and the parameters are adjusted by system feedback to reduce computational complexity and improve adaptability.
It improves the accuracy and applicability of MRCP decoding, reduces computational complexity, and enhances the continuity and adaptability of rehabilitation training.
Smart Images

Figure CN114931384B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an MRCP decoding method, applicable to the field of brain-computer interface technology. Background Technology
[0002] Brain-computer interfaces (BCI) technology enables direct communication between the brain and external devices, thus finding applications in functional rehabilitation for stroke, spinal cord injury, and other conditions. BCI technology often uses non-invasive electroencephalography (EEG) to decode brain information, offering advantages such as non-invasiveness, high temporal resolution, and low acquisition costs. In rehabilitation applications, BCI technology decodes the patient's motor intentions to drive external rehabilitation equipment, enabling active rehabilitation and significantly improving rehabilitation outcomes. One major challenge during decoding is removing artifacts present in the EEG. These artifacts arise primarily from two sources: 1. Artifacts generated by human activity during acquisition, such as electrooculography (EOG) artifacts, electromyography (EMG) artifacts, and electrode slippage; 2. Artifacts generated by external components, such as power frequency interference. The presence of these artifacts reduces the accuracy of decoding the patient's motor intentions, therefore, it is crucial to eliminate them as much as possible.
[0003] In BCI (Body-Induced Cortical Intervention) techniques, sensorimotor rhythms (SMR) and movement-related cortical potentials (MRCP) are typically used to decode the subject's motor intentions. SMR / MRCP primarily focuses on the subject's motor sensory cortex. SMR occurs when the subject performs movement or motor imagery, and its EEG frequency is typically between 8-13 Hz. MRCP is associated with the subject's motor preparation and execution, and its EEG frequency is typically between 0.1-3 Hz. Currently, various methods exist for decoding SMR / MRCP, such as autoregressive models and common space patterns (CSP), but they all suffer from high latency, poor subject fit, and low efficiency.
[0004] Therefore, in order to improve the rehabilitation effect of subjects in BCI-based active motor rehabilitation therapy, the following issues need to be addressed or resolved: 1. Use information processing methods to remove artifacts in EEG signals during the decoding process; 2. Reduce the computational complexity of the decoding process; 3. Improve the suitability of different subjects and their participation in rehabilitation therapy. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide an MRCP decoding method to address the above-mentioned problems.
[0006] The technical solution adopted in this invention is: an MRCP decoding method, characterized in that:
[0007] S1. Determine the MRCP model of the subject based on the EEG data of the subject during paradigm training. Paradigm training includes multiple training segments. Each training segment requires the subject to switch from resting state to motor imagery.
[0008] S2. Obtain EEG data from the subjects and extract EEG data segments from the subjects' EEG data. Calculate the Pearson correlation coefficient and DTW matching degree between the EEG data segments and the MRCP model.
[0009] S3. Calculate the similarity score between the EEG data segment and the MRCP model based on the Pearson correlation coefficient and DTW matching degree, and determine the presence of MRCP in the relevant EEG data segment when the similarity score meets the set threshold condition.
[0010] Step S1 includes:
[0011] S11. Obtain the EEG data corresponding to each training segment of the subject user;
[0012] S12. Screen and filter the EEG data corresponding to each training segment of the subject;
[0013] S13. Select the EEG data before and after the state switch in the corresponding EEG data of each training segment;
[0014] S14. The selected EEG data are superimposed and averaged to determine whether they have MRCP features. If they have MRCP features, they are recorded as MRCP models; if they do not have MRCP features, return to step S11.
[0015] The calculation of the Pearson correlation coefficient between the EEG data fragments and the MRCP model includes:
[0016] ;
[0017] In the formula, This is a fragment of EEG data, with a length of W; X i Let X be the i-th data point, where i = 1, 2, 3...W; for The mean; The model is an MRCP model with length W; Y i Let W be the i-th data point of Y, where i = 1, 2, 3...W; for The mean of the two numbers; Rho is the Pearson correlation coefficient, ranging from -1 to 1, with a value of 0 representing no correlation at all.
[0018] The calculation of the DTW matching degree between the EEG data fragments and the MRCP model includes:
[0019] ;
[0020] ;
[0021] ;
[0022] in, This is a fragment of EEG data, with a length of W; X i Let X be the i-th data point, where i = 1, 2, 3...W; The model is an MRCP model with length W; Y j Let Y be the j-th data point, j=1, 2, 3...W; Dist represents the degree of DTW matching between the EEG data segment and the MRCP model. The larger the Dist, the stronger the matching. and The lower the correlation, the more likely the Dist value is to be 0. and Completely relevant.
[0023] The calculation of similarity scores between EEG data segments and MRCP models based on Pearson correlation coefficient and DTW matching degree includes:
[0024] ;
[0025] Where Rho is the Pearson correlation coefficient; Dist is the DTW matching degree; It is a proportionality constant and is not zero; The maximum acceptable Dist value is not zero; the Score is the similarity score between the EEG data segment and the MRCP model. The smaller the Score value, the more similar the EEG data segment is to the MRCP model.
[0026] An MRCP decoding device, characterized in that it comprises:
[0027] The model training module is used to determine the MRCP model of the subject based on the EEG data of the subject during paradigm training. The paradigm training includes multiple training segments, and the subject needs to switch from resting state to motor imagery for each training segment.
[0028] The correlation calculation module is used to acquire the EEG data of the test subjects, extract EEG data segments from the EEG data, and calculate the Pearson correlation coefficient and DTW matching degree between the EEG data segments and the MRCP model.
[0029] The similarity judgment module is used to calculate the similarity score between EEG data segments and MRCP models based on the Pearson correlation coefficient and DTW matching degree, and to determine the presence of MRCP in the relevant EEG data segments when the similarity score meets the set threshold conditions.
[0030] A storage medium storing a computer program executable by a processor, characterized in that: when the computer program is executed, it implements the steps of the MRCP decoding method.
[0031] An MRCP decoding device has a memory and a processor, wherein the memory stores a computer program that can be executed by the processor, characterized in that: when the computer program is executed, it implements the steps of the MRCP decoding method.
[0032] The beneficial effects of this invention are as follows: This invention trains MRCP models for different individuals, thus avoiding the problems of long adaptation times and poor experience for some subjects when using public models during rehabilitation training, thereby improving rehabilitation outcomes. The MRCP discrimination method in this invention is based on a combination of Person correlation and DTW correlation, ensuring the accuracy of the discrimination method from different levels. Furthermore, adjustable parameters are incorporated into this method, allowing subjects to adjust parameters based on system feedback during real-time training, thereby improving the continuity and applicability of training. Regarding system feedback, this invention uses thresholds for regulation, reducing the overall computational complexity compared to using classifiers. Attached Figure Description
[0033] Figure 1 This is a flowchart of the paradigm training process in the embodiment.
[0034] Figure 2 This is a flowchart of model training in the embodiment.
[0035] Figure 3 The flowchart of the MRCP determination method in the embodiment is shown. Detailed Implementation
[0036] This embodiment is an MRCP decoding method, including the following steps:
[0037] S1. Determine the MRCP model of the subject based on the EEG data of the subject during paradigm training.
[0038] S11. Obtain EEG data from the subject during paradigm training. This paradigm consists of N epochs from start to finish. In each epoch, the subject needs to perform rest (4-7 seconds) and motor imagery (3 seconds), first resting and then switching to motor imagery. The EEG data collected during the entire training process is denoted as follows: The EEG data of the i-th epoch is denoted as (i=1…N).
[0039] S12, for each The data (i=1…N) is filtered to remove data containing obvious artifacts. The filtered data contains EEG data for M epochs, denoted as . (i=1…M); after filtering the data Perform a 50Hz notch filter and a 0.1-3Hz bandpass filter. The filtered data is denoted as... (i=1…M).
[0040] S13, Select The EEG data for a total of G seconds before and after the transition from resting to motor imagery is denoted as (i=1…M).
[0041] S14, to Perform a superposition and averaging process to determine whether the superposition and averaged EEG data possesses MRCP characteristics. If it exhibits significant MRCP characteristics, the superposition and averaged EEG data is recorded as the MRCP model. If there are no obvious MRCP features, then it is necessary to return to step S11 to retrain the paradigm and recalculate the model.
[0042] S2. Obtain EEG data from the subjects and extract EEG data segments from the subjects' EEG data. Calculate the Pearson correlation coefficient and DTW matching degree between the EEG data segments and the MRCP model.
[0043] This embodiment collects the EEG data of the subject in real time, denoted as... The sampling rate is Fs. For Notch filtering was performed, and artifact removal was carried out using the ASR algorithm. The artifact-removed data was then bandpass filtered from 0.1 to 3 Hz, and EEG data segments were selected with a length of W = G * Fs and a step size of Step, denoted as . .
[0044] Will Recorded as ,calculate and The Pearson correlation coefficient Rho is calculated using the following formula:
[0045] ;
[0046] In the formula for The mean, for The mean of Rho. Rho ranges from -1 to 1, with a value of 0 representing complete uncorrelatedness.
[0047] Will Recorded as Calculated through Dynamic Time Warping (DTW) and The matching degree Dist is calculated using the following formula:
[0048] ;
[0049] ;
[0050] ;
[0051] In the formula, the larger Dist is, the greater it represents and The lower the correlation, the more likely the Dist value is to be 0. and Completely relevant.
[0052] S3. Calculate the similarity score between the EEG data segment and the MRCP model based on the Pearson correlation coefficient and DTW matching degree, and determine the presence of MRCP in the relevant EEG data segment when the similarity score meets the set threshold condition.
[0053] Calculated based on Rho and Dist and Final score The calculation formula is as follows:
[0054] ;
[0055] in, It is a proportionality constant and is not zero. The maximum acceptable Dist value is not zero; these two parameters can be adjusted according to the actual situation. A smaller Score value indicates... and The more similar they are.
[0056] Set feedback threshold When Score is less than or equal to If the value is greater than 0, the subject is considered to have MRCP, and the system provides feedback to the subject.
[0057] The following is an example to illustrate this:
[0058] Model training:
[0059] 1. The participants understood the entire training process and precautions;
[0060] 2. Paradigm training: Subjects wore EEG caps that met the international 10-20 channel standard and underwent 30-40 epochs of paradigm training according to system prompts;
[0061] 3. Paradigm training data processing: Examine the data of each epoch in the collected data and remove the epoch data with obvious artifacts; perform 50Hz notch filtering and 0.1-3Hz bandpass filtering on the removed data; select the data 1 second before and 1 second after the state transition in each epoch data.
[0062] 4. MRCP model calculation: Overlay and average the selected data, and observe whether the MRCP features are obvious. If the MRCP features are obvious, save the MRCP model in the system; if not, repeat steps 1 to 3.
[0063] Real-time training:
[0064] 1. Subjects wear EEG caps and perform corresponding tasks according to system prompts. The system collects the subjects' EEG data (eegData) in real time.
[0065] 2. Perform notch filtering and ASR artifact removal on eegData;
[0066] 3. Perform a 0.1-3Hz bandpass filter on the data from step 2;
[0067] 4. Select data from step 3 using a window length of W=500 and a step size of Step=1. The selected data is denoted as X.
[0068] 5. The system is based on X and Calculate Rho, Dist;
[0069] 6. The system calculates based on Rho, Dist, Thr1 calculates the score, where The initial parameter is set to 1, and the initial parameter of Thr1 is set to 10000;
[0070] 7. The system makes a judgment based on Score and Thr2. If Score is less than or equal to Thr2 and greater than 0, the system will provide feedback to the subject. The Thr2 parameter is set to 1500.
[0071] 8. Subjects can adjust the parameters based on system feedback. Adjust in real time with Thr1.
[0072] This embodiment also provides an MRCP decoding device, including a model training module, a correlation calculation module, and a similarity judgment module. The model training module is used to determine the MRCP model of the subject based on the EEG data of the subject during paradigm training. The paradigm training includes multiple training segments, and each training segment requires the subject to switch from a resting state to motor imagery. The correlation calculation module is used to acquire the subject's EEG data, extract EEG data segments from the subject's EEG data, and calculate the Pearson correlation coefficient and DTW matching degree between the EEG data segments and the MRCP model. The similarity judgment module is used to calculate the similarity score between the EEG data segments and the MRCP model based on the Pearson correlation coefficient and DTW matching degree, and judge that MRCP appears in the relevant EEG data segments when the similarity score meets a set threshold condition.
[0073] This embodiment also provides a storage medium storing a computer program that can be executed by a processor. When the computer program is executed, it implements the steps of the MRCP decoding method in this example.
[0074] This embodiment also provides an MRCP decoding device, which has a memory and a processor. The memory stores a computer program that can be executed by the processor. When the computer program is executed, it implements the steps of the MRCP decoding method in this example.
Claims
1. A MRCP decoding method, characterized in that: S1, determining a MRCP model of a subject user based on electroencephalogram data of the subject user during paradigm training, wherein the paradigm training comprises a plurality of training segments, and each training segment requires the subject user to switch from a resting state to motor imagery; S2, obtaining electroencephalogram data of the subject user, and extracting an electroencephalogram data segment from the electroencephalogram data of the subject user, and calculating a Pearson correlation coefficient and a DTW matching degree of the electroencephalogram data segment and the MRCP model; S3, calculating a similarity score of the electroencephalogram data segment and the MRCP model based on the Pearson correlation coefficient and the DTW matching degree, and determining that the MRCP appears in the relevant electroencephalogram data segment when the similarity score meets a set threshold condition. The similarity score of the electroencephalogram data segment and the MRCP model based on the Pearson correlation coefficient and the DTW matching degree comprises: Step S1 comprises: S11, obtaining electroencephalogram data corresponding to each training segment of the subject user; S12, screening and filtering the electroencephalogram data corresponding to each training segment of the subject user; ; Wherein, Rho is Pearson correlation coefficient; Dist is DTW matching degree; is a proportional coefficient and is not 0; is the maximum upper limit of acceptable Dist and is not 0; Score is the similarity score of the brain electrical data segment and the MRCP model, and the smaller the Score value is, the more similar the brain electrical data segment is to the MRCP model.
2. The MRCP decoding method of claim 1, wherein, S13, selecting electroencephalogram data before and after state switching in the electroencephalogram data corresponding to each training segment; S14, superimposing and averaging the selected electroencephalogram data, determining whether it has MRCP characteristics, and if it has MRCP characteristics, recording it as a MRCP model; if it does not have MRCP characteristics, returning to step S11. The Pearson correlation coefficient of the electroencephalogram data segment and the MRCP model comprises: including: A model training module for determining a MRCP model of a subject user based on electroencephalogram data of the subject user during paradigm training, wherein the paradigm training comprises a plurality of training segments, and each training segment requires the subject user to switch from a resting state to motor imagery; 3. The MRCP decoding method of claim 1, wherein, A correlation calculation module for obtaining electroencephalogram data of the subject user, and extracting an electroencephalogram data segment from the electroencephalogram data of the subject user, and calculating a Pearson correlation coefficient and a DTW matching degree of the electroencephalogram data segment and the MRCP model; ; wherein, is a segment of electroencephalogram data with length W; X i is the i-th data point of X, i = 1, 2, 3... W; is the mean of is the MRCP model with length W; Y i is the i-th data point of Y, i = 1, 2, 3... W; is the mean of Rho is the Pearson correlation coefficient, ranging from -1 to 1, with a value of 0 representing complete irrelevance. 4. An MRCP decoding apparatus characterized by comprising: A similarity judgment module for calculating a similarity score of the electroencephalogram data segment and the MRCP model based on the Pearson correlation coefficient and the DTW matching degree, and determining that the MRCP appears in the relevant electroencephalogram data segment when the similarity score meets a set threshold condition. The similarity score of the electroencephalogram data segment and the MRCP model based on the Pearson correlation coefficient and the DTW matching degree comprises: The computer program is executed to realize the steps of the MRCP decoding method of any one of claims 1-3. The computer program is executed to realize the steps of the MRCP decoding method of any one of claims 1-3. ; Wherein, Rho is Pearson correlation coefficient; Dist is DTW matching degree; is a proportional coefficient and is not 0; is the maximum upper limit of acceptable Dist and is not 0; Score is the similarity score of the brain electrical data segment and the MRCP model, and the smaller the Score value is, the more similar the brain electrical data segment is to the MRCP model.
5. A storage medium having stored thereon a computer program, which is capable of being executed by a processor, characterized in that: 6. An MRCP decoding apparatus having a memory and a processor, the memory having stored thereon a computer program capable of being executed by the processor, characterized by:
Citation Information
Patent Citations
Mechanical arm system controlled on basis of refined motor imagination electroencephalogram signals and method
CN105563495A
Comprehensive evaluation method and device for enhancing rehabilitation training effect, storage medium and equipment
CN110739083A