Electroencephalogram feature extraction method and device of sub-band cascade common space mode

文档序号:1851872 发布日期:2021-11-19 浏览:35次 中文

阅读说明:本技术 子带级联共空间模式的脑电特征提取方法及装置 (Electroencephalogram feature extraction method and device of sub-band cascade common space mode ) 是由 魏铭南 黄梦婕 杨瑞 于 2021-08-19 设计创作,主要内容包括:本申请涉及子带级联共空间模式的脑电特征提取方法及装置,涉及脑机接口技术领域,其中,方法包括:获取预处理后的脑电信号;将预处理后的脑电信号通过多个巴特沃夫滤波器,划分为多个频率区间不同的子带;分别将每个子带对应的脑电信号进行CSP滤波,得到每个子带对应的子特征矩阵;将各子特征矩阵进行竖向拼接,得到拼接后的特征矩阵;对拼接后的特征矩阵进行CSP滤波,得到满足预设要求的特征矩阵,并基于满足预设要求的特征矩阵,获取用于特征分类的特征向量。本申请的特征提取方法能够深度精炼特征质量和去除特征冗余性,提高基于脑电信号中的运动想象信号的特征分类的准确性,解决现有CSP算法提取特征过于冗余等问题。(The application relates to a method and a device for extracting electroencephalogram characteristics of a sub-band cascade common space mode, relating to the technical field of brain-computer interfaces, wherein the method comprises the following steps: acquiring a preprocessed electroencephalogram signal; dividing the preprocessed electroencephalogram signal into a plurality of sub-bands with different frequency intervals through a plurality of Butterworth filters; respectively carrying out CSP filtering on the electroencephalogram signals corresponding to each sub-band to obtain a sub-feature matrix corresponding to each sub-band; vertically splicing the sub-feature matrixes to obtain spliced feature matrixes; and performing CSP filtering on the spliced feature matrix to obtain a feature matrix meeting the preset requirement, and acquiring a feature vector for feature classification based on the feature matrix meeting the preset requirement. The feature extraction method can deeply refine feature quality and remove feature redundancy, improves accuracy of feature classification based on the motor imagery signals in the electroencephalogram signals, and solves the problem that the feature extraction of the existing CSP algorithm is excessive in redundancy and the like.)

1. A sub-band cascade common space mode electroencephalogram feature extraction method is characterized by comprising the following steps:

acquiring a preprocessed electroencephalogram signal of a motor imagery task, wherein the preprocessed electroencephalogram signal is an electroencephalogram signal with noise filtered;

dividing the preprocessed electroencephalogram signal into a plurality of sub-bands with different frequency intervals through a plurality of Butterworth filters;

respectively carrying out CSP filtering on the electroencephalogram signal corresponding to each sub-band to obtain a sub-feature matrix corresponding to each sub-band;

vertically splicing the sub-feature matrixes to obtain spliced feature matrixes;

and performing CSP filtering on the spliced feature matrix to obtain a feature matrix meeting preset requirements, and acquiring a feature vector for feature classification based on the feature matrix meeting the preset requirements.

2. The method of claim 1, wherein said dividing said pre-processed brain electrical signal into a plurality of sub-bands of different frequency intervals by a plurality of butterworth filters comprises:

and dividing the preprocessed electroencephalogram signal into a plurality of overlapped sub-bands containing preset overlapping ranges on a frequency domain by using a Butterworth filter according to a preset frequency interval.

3. The method according to claim 1, wherein the CSP filtering comprises:

cascading CSP filtering is carried out based on a pre-constructed sub-band cascading CSP algorithm model to obtain a feature matrix meeting the preset requirement so as to obtain feature vectors for feature classification.

4. The method according to claim 3, wherein the sub-band cascading CSP algorithm model comprises at least two layers of CSP models, the output of each layer of CSP model is the input of the next layer of CSP model, and each layer of CSP model constructs a corresponding CSP spatial filter based on the corresponding input, and the CSP model is used for spatially filtering the input electroencephalogram sample data through the CSP algorithm.

5. The method of claim 4, wherein the cascaded CSP filtering comprises:

inputting electroencephalogram signal sample data into a first-layer CSP model for CSP filtering to obtain a feature matrix;

inputting the feature matrix into the next CSP model for CSP filtering by taking the feature matrix as an electroencephalogram signal to obtain a feature matrix output by the next CSP model;

executing the step of inputting the feature matrix as an electroencephalogram signal into the next CSP model for CSP filtering to obtain a feature matrix output by the next CSP model;

and performing CSP filtering on the input electroencephalogram signals by the last layer of CSP model to obtain a characteristic matrix meeting the preset requirement.

6. The method according to any of claims 1-5, further comprising, for multi-class CSP filtering, the step of constructing a multi-class CSP spatial filter:

acquiring training set sample data of the electroencephalogram corresponding to each type of motor imagery task to obtain multiple types of training set sample data;

traversing the multiple types of training set sample data, taking the current training set sample data as first type data, combining the other types of training set sample data into second type data, and obtaining multiple corresponding groups of training set sample data, wherein each group of training set sample data consists of the first type data and the second type data;

respectively constructing corresponding CSP spatial filters for each group of training set sample data, and selecting the front m rows of data and the rear m rows of data of the CSP spatial filters to form the CSP spatial filters after screening;

and respectively selecting 2m rows of data of the screened CSP spatial filter corresponding to each group of training set sample data to form a multi-classification CSP spatial filter.

7. The utility model provides an electroencephalogram feature extraction device of subband cascade common space mode which is characterized in that includes:

the signal acquisition module is used for acquiring a preprocessed electroencephalogram signal of the motor imagery task, wherein the preprocessed electroencephalogram signal is an electroencephalogram signal with noise filtered;

the sub-band dividing module is used for dividing the preprocessed electroencephalogram signal into a plurality of sub-bands;

the first cascade CSP filtering module is used for respectively carrying out CSP filtering on the electroencephalogram signal corresponding to each subband to obtain a sub-feature matrix corresponding to each subband;

the splicing module is used for vertically splicing the sub-feature matrixes to obtain spliced feature matrixes;

and the second cascade CSP filtering module is used for carrying out CSP filtering on the spliced feature matrix to obtain the feature matrix meeting the preset requirement, and acquiring the feature vector for feature classification based on the feature matrix meeting the preset requirement.

8. The apparatus of claim 7, wherein the cascaded filtering module is further configured to:

and inputting the electroencephalogram sample data into a pre-constructed sub-band cascade CSP algorithm model for cascade CSP filtering to obtain a feature matrix meeting preset requirements so as to obtain a feature vector for feature classification.

9. An electronic device comprising a processor and a memory, said memory having stored thereon a program which, when executed by the processor, is adapted to carry out the steps of the method of any of claims 1-6.

10. A computer storage medium, characterized in that the computer storage medium has stored thereon a program which, when being executed by a processor, is adapted to carry out the steps of the method of any one of claims 1 to 6.

Technical Field

The application relates to the technical field of brain-computer interfaces, in particular to a method and a device for extracting electroencephalogram characteristics in a sub-band cascade common space mode.

Background

The brain-computer interface technology is a new technology for communicating human bodies with the outside, realizes the drive control of various devices by monitoring and identifying biological signals of brain areas and converting the biological signals into instructions, and has been primarily and widely applied to auxiliary robots and rehabilitation engineering.

There are a large number of patients with lower limb dysfunction worldwide today and although wheelchairs may provide another way of action, their inefficient control method undoubtedly increases the burden on the user. In addition, since it cannot completely replace natural walking, the loss of natural walking ability also has a serious impact on the mental health of patients.

The walking assisting exoskeleton robot can effectively provide a non-muscle channel communicated with the outside, so that the life quality of the weak old and the gait disorder patient is improved. The robot drives the exoskeleton robot to assist the lower limbs to walk and stand by capturing motor imagery signals of the brain of a subject relative to the lower limbs, namely imagining that the left leg, the right leg and muscle groups of the left leg and the right leg move but do not have actual motion output.

Currently, one of the most popular and effective electroencephalogram feature extraction algorithms is the Common Spatial Pattern (CSP) algorithm and its variant, and their success in the field of brain-computer interface depends largely on the correct selection of a specific range of frequency bands and specific subject features of the electroencephalogram signal. However, the CSP algorithm and its variant algorithm also have the problems of too many extracted features, too much redundancy of features, too much required calculation, too slow model convergence rate, etc.

Accordingly, there is a need for improvements in the art that overcome the deficiencies in the prior art.

Disclosure of Invention

The application aims to provide a sub-band cascade common space mode electroencephalogram feature extraction method and device, and the method and device are used for solving the problems that when a CSP algorithm is adopted to extract features of an electroencephalogram signal in the prior art, the number of extracted features is too large, the features are too redundant, the required calculated amount is too large, and the like.

The purpose of the application is realized by the following technical scheme:

in a first aspect, a method for extracting electroencephalogram features of subband cascade common spatial modes is provided, which includes:

acquiring a preprocessed electroencephalogram signal of a motor imagery task, wherein the preprocessed electroencephalogram signal is an electroencephalogram signal with noise filtered;

dividing the preprocessed electroencephalogram signal into a plurality of sub-bands with different frequency intervals through a plurality of Butterworth filters;

respectively carrying out CSP filtering on the electroencephalogram signal corresponding to each sub-band to obtain a sub-feature matrix corresponding to each sub-band;

vertically splicing the sub-feature matrixes to obtain spliced feature matrixes;

and performing CSP filtering on the spliced feature matrix to obtain a feature matrix meeting preset requirements, and acquiring a feature vector for feature classification based on the feature matrix meeting the preset requirements.

Further, in a possible embodiment of the first aspect of the present application, the dividing the preprocessed electroencephalogram signal into a plurality of sub-bands includes:

dividing the preprocessed electroencephalogram signal into a plurality of overlapped sub-bands containing preset overlapping ranges on a frequency domain by utilizing a Butterworth filter according to a preset frequency interval

Further, in a possible embodiment of the first aspect of the present application, the CSP filtering includes:

cascading CSP filtering is carried out based on a pre-constructed sub-band cascading CSP algorithm model to obtain a feature matrix meeting the preset requirement so as to obtain feature vectors for feature classification.

Further, in a possible embodiment of the first aspect of the present application, the subband cascade CSP algorithm model includes at least two layers of CSP models, an output of each layer of the CSP model is an input of the next layer of the CSP model, and each layer of the CSP model constructs a corresponding CSP spatial filter based on a corresponding input, and the CSP model is configured to spatially filter input electroencephalogram sample data through a CSP algorithm.

Further, in a possible embodiment of the first aspect of the present application, the cascaded CSP filtering includes:

inputting the electroencephalogram signal sample data into a first-layer CSP model for CSP filtering to obtain a feature matrix;

inputting the feature matrix into the next CSP model for CSP filtering by taking the feature matrix as an electroencephalogram signal to obtain a feature matrix output by the next CSP model;

executing the step of inputting the feature matrix as an electroencephalogram signal into the next CSP model for CSP filtering to obtain a feature matrix output by the next CSP model;

and performing CSP filtering on the input electroencephalogram signals by the last layer of CSP model to obtain a characteristic matrix meeting the preset requirement.

Further, in a possible embodiment of the first aspect of the present application, for multi-class CSP filtering, the method further includes the step of constructing a multi-class CSP spatial filter:

acquiring training set sample data of the electroencephalogram corresponding to each type of motor imagery task to obtain multiple types of training set sample data;

traversing the multiple types of training set sample data, taking the current training set sample data as first type data, combining the other types of training set sample data into second type data, and obtaining multiple corresponding groups of training set sample data, wherein each group of training set sample data consists of the first type data and the second type data;

respectively constructing corresponding CSP spatial filters for each group of training set sample data, and selecting the front m rows of data and the rear m rows of data of the CSP spatial filters to form the CSP spatial filters after screening;

and respectively selecting 2m rows of data of the screened CSP spatial filter corresponding to each group of training set sample data to form a multi-classification CSP spatial filter.

In a second aspect, an electroencephalogram feature extraction device of a subband cascade common spatial mode is provided, which includes:

the signal acquisition module is used for acquiring a preprocessed electroencephalogram signal of the motor imagery task, wherein the preprocessed electroencephalogram signal is an electroencephalogram signal with noise filtered;

the sub-band dividing module is used for dividing the preprocessed electroencephalogram signal into a plurality of sub-bands;

the CSP filtering module is used for respectively carrying out CSP filtering on the electroencephalogram signals corresponding to each sub-band to obtain a sub-feature matrix corresponding to each sub-band;

the splicing module is used for vertically splicing the sub-feature matrixes to obtain spliced feature matrixes;

and the cascade CSP filtering module is used for carrying out CSP filtering on the spliced characteristic matrix to obtain a characteristic matrix meeting the preset requirement, and acquiring a characteristic vector for characteristic classification based on the characteristic matrix meeting the preset requirement.

In a possible embodiment of the second aspect of the present application, the cascaded filtering module is further configured to:

and inputting the electroencephalogram sample data into a pre-constructed sub-band cascade CSP algorithm model for cascade CSP filtering to obtain a feature matrix meeting preset requirements so as to obtain a feature vector for feature classification.

In a third aspect, a computer device is provided, comprising a processor and a memory, wherein a program is stored in the memory, and wherein the program, when executed by the processor, is adapted to carry out the steps of the method of the first aspect.

In a fourth aspect, a computer storage medium is provided, on which a program is stored, which program, when being executed by a processor, is adapted to carry out the steps of the method of the first aspect.

Compared with the prior art, the method has the following beneficial effects: according to the feature extraction method, an electroencephalogram signal of a motor imagery task is divided into a plurality of sub-band signals in a frequency domain by a Butterworth filter, CSP filtering is conducted on each sub-band signal respectively to obtain a corresponding feature matrix, then each feature matrix is vertically spliced to obtain a spliced feature matrix, the spliced feature matrix is used as sample data of the electroencephalogram signal, CSP filtering is conducted, and feature vectors for feature classification are extracted. The feature extraction method can deeply refine feature quality and remove feature redundancy, improves accuracy of feature classification based on the motor imagery signals in the electroencephalogram signals, and can solve the problems that the number of extracted features is too large, the features are too redundant, the required calculated amount is too large and the like in the conventional CSP algorithm.

Drawings

FIG. 1 is a system architecture diagram for implementing the feature extraction method and apparatus provided in an embodiment of the present application;

FIG. 2 is a flow chart of a feature extraction method provided by an embodiment of the present application;

FIG. 3 is a flow chart of a CSP filtering algorithm provided by an embodiment of the present application;

fig. 4 is a block diagram of a feature extraction apparatus according to an embodiment of the present application;

fig. 5 is a block diagram of an electronic device according to an embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.

The method and the device for extracting the electroencephalogram signal features based on the common space mode are provided by the application, aiming at the problems that in the prior art, when the electroencephalogram signal is subjected to feature extraction through a CSP algorithm, the number of extracted features is too large, the features are too redundant, the required calculated amount is too large, the model convergence speed is too low, and the like.

Fig. 1 is a diagram of a system architecture for implementing the feature extraction method and apparatus of the present application according to an embodiment of the present application, and as shown in fig. 1, the system architecture includes: the electroencephalogram signal acquisition device 101 and the electronic device 102. Wherein:

the electroencephalogram signal acquisition device 101 is used for acquiring an original electroencephalogram signal corresponding to a motor imagery task of a human brain, and preprocessing the original electroencephalogram signal, wherein the original electroencephalogram signal is a multichannel electroencephalogram signal.

For example, for a lower limb dysfunction patient, the motor imagery task of the present embodiment may be, for example, a walking motor imagery task of a leg, for example, left leg walking, right leg walking.

The brain electrical signals are important physiological signals of human body, and are electrical signals emitted by the brain. The electroencephalogram signal acquisition equipment 101 of the embodiment can adopt an EPOC Flex gel electrode board produced by the emit corporation. The electrodes are connected with the scalp by penetrating the hair through the colloid conductive agent as an intermediate medium, and particularly, the electrodes can be placed at preset positions of the head according to different motor imagery tasks, such as FPz (frontal midline), C4 (right center), FP1 (left frontal pole), FP2 (right frontal pole) and the like, so as to acquire multi-channel electroencephalogram signals.

Because the original electroencephalogram signals contain different component artifact interferences, such as electrocardio artifacts, eye movement artifacts, myoelectricity artifacts and the like, the acquired original electroencephalogram signals need to be preprocessed to filter artifact signals in the electroencephalogram signals.

The electronic device 102 is configured to obtain the preprocessed electroencephalogram signal, and can implement the functions of feature extraction and feature classification on the preprocessed electroencephalogram signal.

The electronic device 102 in this embodiment may be an intelligent mobile device, a computer, or the like, and the present embodiment does not limit the device type of the electronic device.

The electronic device 102 inputs the extracted electroencephalogram signal features into a trained classification model for feature classification to determine a motion category, for example, right leg walking. And then outputting a corresponding control command to drive the auxiliary walking equipment 103 to assist the walking action of the human body according to the determined motion type.

In this embodiment, the electronic device 102 employs a deep CSP filtering method for the preprocessed electroencephalogram signal, so as to extract the features of the electroencephalogram signal. The specific implementation of the electronic device 102 for performing feature extraction on the preprocessed electroencephalogram signal will be described in detail below.

Fig. 2 is a flowchart of a common-space-mode-based electroencephalogram feature extraction method according to an embodiment of the present application, and the feature extraction method according to the present application is described below with an electronic device 103 in a system architecture shown in fig. 1 as an execution subject, and as shown in fig. 2, the method includes:

s201: and acquiring the preprocessed electroencephalogram signals of the motor imagery task.

Specifically, through preprocessing, noise in the electroencephalogram signals can be filtered, and the signal-to-noise ratio of the electroencephalogram signals is improved.

The embodiment can preprocess the electroencephalogram signal through EEGLAB, and mainly comprises the following steps:

FIR filtering, filtering the redundant part of the signal by using an FIR filter, and only keeping the obvious representation of the motion imagery signal of 4-35 Hz.

And (4) baseline calibration, namely selecting signals from one second before the motor imagery to five seconds after the motor imagery as data of each test according to different motor imagery tasks. And calibrating the data of the section according to the electroencephalogram signals from the previous second of the motor imagery to the starting moment of the motor imagery.

And (4) ICA analysis, namely deconstructing the electroencephalogram signals through ICA analysis and removing artifact signals of non-electroencephalogram components.

The EEGLAB pre-processing of brain electrical signals belongs to the well-known technology in the art and is not described in detail herein.

In the embodiment, the electronic device 102 acquires the preprocessed electroencephalogram signal from the electroencephalogram signal acquisition device 101.

S202: and dividing the preprocessed electroencephalogram signal into a plurality of sub-bands with different frequency intervals through a plurality of Butterworth filters.

Specifically, the subband signal of this embodiment refers to one segment of the preprocessed electroencephalogram signal within the whole frequency domain range.

Optionally, in this embodiment, the preprocessed electroencephalogram signal is divided into a plurality of overlapped subband signals including a preset overlap range according to a preset frequency interval.

The preset frequency interval may be 4Hz, for example. The preset overlap range may be, for example, 2 Hz.

According to the preset frequency interval and the preset overlap range of the embodiment, the preprocessed brain electrical signals are exemplarily divided into a plurality of sub-band signals, which may be 4-8Hz, 6-10Hz, 8-12Hz … …, and the like.

Other division modes may also be adopted for the sub-band signals, for example, the preset frequency interval may be set to 6Hz, and the preset overlap range may be set to 1Hz, specifically, 2-8Hz, 9-15Hz., and the like, and of course, the division mode may also be non-overlap range, specifically depending on the actual feature extraction requirement, and the specific division mode of the sub-band signals is not limited in this embodiment.

The sub-band signals divided by the embodiment are all provided with overlapping ranges, and sufficient electroencephalogram signal characteristics can be extracted from the preprocessed electroencephalogram signals when the characteristics are extracted through CSP filtering.

S203: and respectively carrying out CSP filtering on the electroencephalogram signals corresponding to each sub-band to obtain a sub-feature matrix corresponding to each sub-band.

Specifically, each sub-band signal is respectively input into the CSP to perform CSP filtering, so as to obtain a sub-feature matrix corresponding to each sub-band signal, for example, a sub-feature matrix corresponding to a 4-8Hz sub-band signal, a sub-feature matrix corresponding to a 6-10Hz sub-band signal, and the like, thereby obtaining a plurality of sub-feature matrices corresponding to each sub-band signal.

Optionally, in this embodiment, for each subband, CSP filtering is performed in the following manner:

inputting the electroencephalogram signal corresponding to the current sub-band into a pre-constructed CSP spatial filter to obtain a characteristic matrix, which is as follows:

for the motor imagery task of the second classification, a pre-constructed two-classification CSP spatial filter is adopted to carry out CSP filtering to obtain a corresponding characteristic matrix:

Ztest=WsortXtest

for the multi-classification motor imagery task, a pre-constructed multi-classification spatial filter is adopted to carry out CSP filtering to obtain a corresponding feature matrix:

Ztest′=WnewXtest

wherein, WsortRepresenting a constructed binary spatial filter, WnewRepresenting a constructed multi-class spatial filter, XtestMatrix, Z, representing the electroencephalographic signal data of the feature to be extractedtestA feature matrix Z representing the electroencephalogram data to be characterized under the motor imagery task of the second classificationtest' represents a characteristic matrix of electroencephalogram data to be characterized under a multi-classification motor imagery task.

The pre-constructed CSP spatial filter in this embodiment is obtained by applying CSP filtering algorithm to the training set sample data of the acquired electroencephalogram signal.

Optionally, fig. 3 is a flowchart of a CSP filtering algorithm provided in an embodiment of the present application, and as shown in fig. 3, the CSP filtering algorithm of this embodiment includes:

s301: and respectively calculating a spatial covariance matrix corresponding to the electroencephalogram signal training sample data of each type of motor imagery task and a corresponding mixed spatial covariance matrix.

Wherein R isiRepresenting the spatial covariance matrix, X, corresponding to the EEG training sample data of the ith motor imagery taskiA matrix representing training set sample data of the acquired brain electrical signal,represents XiThe transpose matrix of (a) is,represents XiThe sum of the elements on the diagonal.

The hybrid spatial covariance matrix R is thus obtained as:

R=R1+R2+...+Ri

for the two classifications, i is 1, 2. For multi-classification, i 1,2,3.

And S302, performing eigenvalue decomposition on the mixed space covariance matrix R by using a singular value decomposition theorem, and arranging the eigenvalues in a descending order.

R=UλUT

Wherein, U is an eigenvector matrix of R, and λ is a diagonal matrix formed by corresponding eigenvalues.

S303: a whitening matrix is calculated.

The whitening matrix P is obtained by orthogonal whitening:

and S304, constructing the CSP spatial filter.

For the CSP filtering algorithm of the second class, i is 1,2, and the whitening matrix P is used to act on R1 and R2 respectively to obtain two whitened matrices S1、S2

S1=PR1PT=Bλ1BT

S2=PR2PT=Bλ2BT

Because of S1、S2With a common eigenvector matrix B, and there are two diagonal matrices λ1、λ2Lambda can be obtained by principal component decomposition12Equal to the identity matrix I.

Therefore, a spatial filter W ═ B is constructedTP, the spatial filter W satisfies: when S is1When there is the largest eigenvalue, S2There is a minimum eigenvalue.

Because the feature information is mainly concentrated at the head and the tail of the feature matrix, and the middle feature information is not obviously ignored, the front m rows and the rear m rows of the spatial filter W are selected as the final binary spatial filter Wsort

For a multi-classification CSP filtering algorithm, i is 1,2,3, for each type of electroencephalogram signal, a spatial covariance matrix corresponding to the type of electroencephalogram signal is used as one type of data, and spatial covariance matrices corresponding to the other types of electroencephalogram signals are classified into another type of data.

With R1For example, R1Classified as one type of data, the rest classified as another type of data, denoted as R'1And R'1=R2+R3+...。

Acting on R with a whitening matrix P1、R′1To obtain a matrix S1、S′1

S1=PR1PT=B′λ1B′T

S′1=PR′1PT=B′λ1′B′T

Because of S1、S′1With a common eigenvector matrix B' and there being two diagonal matrices λ1、λ′1Lambda can be obtained by principal component decomposition1+λ′1Equal to the identity matrix I.

Thus, the spatial filter is constructed as: w' ═ B′TP, the filter satisfies: when S is1S 'when the characteristic value is maximum'1There is a minimum eigenvalue.

Selecting the front m rows and the back m rows of the spatial filter W ' to obtain the screened spatial filter W ' because the feature information is mainly concentrated at the head part and the tail part of the feature matrix, and the feature information in the middle is not obviously ignored 'sort

For the multi-classification CSP filtering algorithm, for each class of motion imagery tasks, the screened spatial filter is determined according to the step S34, and the screened spatial filters W 'are respectively selected'sortTo form a multi-class CSP spatial filter Wnew

S305: and (5) filtering the CSP.

After the spatial filter is constructed, for the two-classification motor imagery task, a two-classification CSP spatial filter is adopted to perform CSP filtering on the electroencephalogram data of the training set corresponding to the current subband to obtain a corresponding feature matrix:

Zi=WsortXi,i=1,2

for the multi-classification motor imagery task, a multi-classification CSP spatial filter is adopted to perform CSP filtering on electroencephalogram signal data of a training set corresponding to a current sub-band to obtain a corresponding feature matrix:

Zi′=WnewXi,i=1,2,3....

wherein, XiMatrix, Z, representing the i-th electroencephalographic signal data of the training set corresponding to the sub-bandsiA characteristic matrix Z of the ith electroencephalogram signal data of the characteristic to be extracted corresponding to the sub-band under the motor imagery task of the second classificationi' represents a characteristic matrix of i-th electroencephalogram data corresponding to a sub-band under a multi-classification motor imagery task.

The embodiment further performs normalization processing on the obtained electroencephalogram characteristics of the training set to obtain a characteristic vector fi

The obtained feature vector is used for training a classifier.

S204: and vertically splicing the sub-feature matrixes to obtain a spliced feature matrix.

S205: and performing CSP filtering on the spliced feature matrix to obtain a feature matrix meeting preset requirements, and acquiring a feature vector for feature classification based on the feature matrix meeting the preset requirements.

Specifically, in this embodiment, after performing CSP filtering on each subband signal according to step S203, a plurality of corresponding feature matrices of the electroencephalogram signals are obtained, then all the feature matrices are vertically spliced together, and CSP filtering is performed on the spliced feature matrices according to step S203 again to obtain a feature matrix M meeting preset requirementstest(corresponding to binary motor imagery tasks) or M'test(corresponding to multi-classification motor imagery tasks), namely:

Mtest=WsortYtest

Mtest′=WnewYtest

wherein, YtestRepresenting the feature matrix after splicing.

For feature matrix MtestOr M'testAnd carrying out normalization processing to obtain a feature vector for feature classification, namely:

or

Wherein f istestRepresenting a characteristic component, f 'corresponding to a binary motion imagery task'testRepresenting the corresponding characteristic components of the multi-classification motor imagery task.

According to the method and the device, deeper refined features can be realized, repeated redundant features are removed, and the feature classification precision of the electroencephalogram signals of the motor imagery task is improved.

Optionally, the CSP filtering process performed on the spliced feature matrix in this embodiment may be repeated multiple times to implement cascaded CSP filtering, which specifically includes:

and inputting the electroencephalogram sample data into a pre-constructed sub-band cascade CSP algorithm model to perform cascade CSP filtering.

The subband cascade CSP algorithm model constructed in this embodiment includes at least two layers of CSP models, where the output of each layer of CSP model is the input of the next layer of CSP model, and the step of performing cascade CSP filtering based on the subband cascade CSP algorithm model in this embodiment includes:

and inputting the electroencephalogram signal sample data into a first-layer CSP model for CSP filtering to obtain a feature matrix. And taking the feature matrix as input data of the next CSP model, and carrying out CSP filtering to obtain the feature matrix output by the next CSP model. Executing the step of taking the characteristic matrix as input data of the next CSP model, and carrying out CSP filtering to obtain the characteristic matrix output by the next CSP model; and obtaining a characteristic matrix meeting the preset requirement after CSP filtering is carried out on the last layer of CSP model.

In the subband cascade CSP algorithm model of the embodiment, each layer of CSP model performs CSP filtering on the input electroencephalogram signal according to the steps S31-S35.

In the embodiment, the spliced feature matrix is subjected to cascade CSP filtering by adopting the constructed sub-band cascade CSP algorithm model, and after the feature vector is extracted, the accuracy of electroencephalogram feature identification can be further improved.

The electroencephalogram feature extraction method of the present application is explained below with a specific example of feature extraction for performing two classifications on electroencephalogram signals:

step 1, collecting electroencephalogram signal sample data.

The motor imagery tasks collected in the present embodiment are the left leg gait task M1 and the right leg gait task M2, respectively.

The electroencephalogram sample data is collected for two healthy subjects with normal or corrected vision. Two subjects respectively practice the real actions of walking the left leg and walking the right leg five times within a few minutes before electroencephalogram sample data acquisition starts so as to ensure the definition of the motor imagery task.

The electroencephalogram acquisition equipment is an EPOC Flex rubber electrode plate produced by EMOTIV company. The 6 electrodes of the brain electrical signal acquisition equipment are placed on FPz, FP1, FP2, Cz, C1 and C2 and the reference electrode is placed on bilateral earlobes A1 and A2 according to an international 10-20 system.

Electroencephalogram signals are collected for imaginary left leg walking and right leg walking of two subjects to form electroencephalogram signal sample data.

In this embodiment, "sampling frequency (128Hz) × single sampling time (1 s)", that is, 128 sampling points, are taken as electroencephalogram signal sample data of each electroencephalogram channel. Then, summarizing all the collected electroencephalogram channels and all the tested electroencephalogram signals into three-dimensional electroencephalogram data (namely, sampling points, channels and test numbers), thereby obtaining electroencephalogram signal sample data of the motor imagery tasks of the two types of task labels (namely, left leg walking motion and right leg walking motion). .

And 2, preprocessing the acquired electroencephalogram signals.

Dividing the acquired electroencephalogram signal sample data into a training set and a testing set, and respectively preprocessing the training set and the testing set through an EEGLAB tool of MATLAB software.

And mixing the electroencephalogram signal sample data preprocessed by the two subjects according to the task tags to obtain a mixed data set.

The mixed data set is divided into 7: 3, the training set and the test set are divided. For example, 552 groups of data are extracted, 400 of them are taken as a training set, and the rest 152 groups of data are taken as a test set.

And 3, dividing the sub-bands.

The training and test sets are divided into sub-bands, respectively, in this embodiment, in the frequency range of 4-35Hz, with a sub-band interval of every 4Hz (except for the last 3Hz), plus an overlap range of 2Hz, e.g., sub-bands 4-8Hz, 6-10Hz, 8-12Hz … … 32-35 Hz. And a wide sub-band of 4-35Hz is provided.

Step 4, CSP filtering

And respectively filtering each sub-band according to the steps S31-S35 to obtain a feature matrix corresponding to each sub-band, and vertically splicing all the obtained feature matrices to obtain a spliced feature matrix.

And (4) carrying out CSP filtering on the spliced feature matrix again according to the steps S31-S35, and executing at least two times to extract features meeting preset requirements, so that the electroencephalogram signal features are deeply refined, and repeated redundant parts are removed.

Table 1 shows a comparison between the feature extraction method of an embodiment of the present application and the feature extraction methods of CSP, MBCSP, and FBCSP, where the first term in the data is the optimal value and the second term is the average value. The performance of classification of the electroencephalogram signal features is measured through classification accuracy and operation time.

TABLE 1 summary of the performance comparison of SBCCSP and Standard CSP and other modified CSP algorithms

As can be seen from table 1, compared with other algorithms, the subband cascade CSP algorithm in the embodiment of the present application significantly improves the performance of feature classification for electroencephalogram signals of motor imagery tasks, and particularly under the support of overlapping subbands and wide subbands, the subband cascade CSP algorithm can extract more valuable electroencephalogram features from electroencephalogram signals, and screen out redundant parts, thereby improving the classification capability.

In addition, the subband cascade CSP algorithm can extract the electroencephalogram signal characteristics again on the basis of the extracted electroencephalogram signal characteristics, so that the algorithm has more advantages than other algorithms in convergence rate.

The following describes the feature extraction method of the present application with a specific example of feature extraction for multi-classification:

step 1, collecting electroencephalogram signal sample data.

The electroencephalogram acquisition equipment for acquiring the electroencephalogram signal sample data is also an EPOC Flex gel electrode board produced by the emit corporation.

Taking three classifications as an example, 18 electrodes of the electroencephalogram signal acquisition device are placed on FPz, FP1, FP2, FCz, FC1, FC2, FC3, FC4, Cz, C1, C2, C3, C4, CPz, CP1, CP2, CP3, CP4, following the international 10-20 system. The reference electrodes were placed in the bilateral lobes a1 and a 2.

In this embodiment, "sampling frequency (128Hz) × single sampling time (0.5 s)", that is, 64 sampling points are used as the electroencephalogram data of each electroencephalogram channel. Therefore, electroencephalogram signal sample data of motor imagery tasks of two types of task labels (namely left leg walking and right leg walking) are obtained.

Taking the last 2s from the 3s that prompts the subject to enter the preparation state, and taking every 64 points as a third task label, namely electroencephalogram signal sample data in an idle state (a state without motor imagery task).

And 2, preprocessing the electroencephalogram signals.

Similarly, the acquired electroencephalogram signal sample data is divided into a training set and a testing set, and the training set and the testing set are respectively preprocessed through an EEGLAB tool of MATLAB software.

And mixing the electroencephalogram signal sample data after the pretreatment of the testee together according to the task tag to obtain a mixed data set.

The mixed data set is divided into 7: 3, the training set and the test set are divided. For example, 960 groups of data are extracted, 672 groups of data are taken as a training set, and the rest 288 groups of data are taken as a test set.

And 3, dividing the sub-bands.

For the sub-band division, please refer to the two-classification embodiments, which are not described herein.

Step 4, CSP filtering

And respectively filtering each sub-band according to the steps S31-S35 to obtain a feature matrix corresponding to each sub-band, and vertically splicing all the obtained feature matrices to obtain a spliced feature matrix.

And (4) carrying out CSP filtering on the spliced feature matrix again according to the steps S31-S35, and executing at least two times to extract features meeting preset requirements, so that the electroencephalogram signal features are deeply refined, and repeated redundant parts are removed.

Table 2 shows the comparison result of the feature extraction performance of the feature extraction method of an embodiment of the present application with the CSP, MBCSP, FBCSP, and the like, where the first term in the data is the optimal value and the second term is the average value. The performance of classification of the electroencephalogram signal features is measured through classification accuracy and operation time.

TABLE 2 comparison of Performance of Multi-class SBCCSP with Standard CSP and other CSP algorithms

As can be seen from table 2, compared with other algorithms, the subband cascade CSP algorithm of the present embodiment significantly improves the feature classification performance of electroencephalogram signals based on motor imagery tasks, and especially under the support of overlapping subbands and wide subbands, the subband cascade CSP algorithm can extract more valuable features from electroencephalogram signals, and screen out redundant parts, thereby improving the classification capability.

In addition, the sub-band cascade CSP can extract the electroencephalogram signal characteristics again on the basis of the extracted electroencephalogram signal characteristics, so that the algorithm has more advantages than other algorithms in convergence rate.

The present application further provides a load steady-state control apparatus for a dual-active full-bridge converter, and fig. 4 is a block diagram of the load steady-state control apparatus for the dual-active full-bridge converter provided in an embodiment of the present application, and as shown in fig. 4, the apparatus includes:

the signal acquisition module is used for acquiring a preprocessed electroencephalogram signal of the motor imagery task, wherein the preprocessed electroencephalogram signal is an electroencephalogram signal with noise filtered;

the sub-band dividing module is used for dividing the preprocessed electroencephalogram signal into a plurality of sub-bands;

the first cascade CSP filtering module is used for respectively carrying out CSP filtering on the electroencephalogram signal corresponding to each subband to obtain a sub-feature matrix corresponding to each subband;

the splicing module is used for vertically splicing the sub-feature matrixes to obtain spliced feature matrixes;

and the second cascade CSP filtering module is used for carrying out CSP filtering on the spliced feature matrix to obtain the feature matrix meeting the preset requirement, and acquiring the feature vector for feature classification based on the feature matrix meeting the preset requirement.

Further, the cascade filtering module is further configured to:

and inputting the electroencephalogram sample data into a pre-constructed sub-band cascade CSP algorithm model for cascade CSP filtering to obtain a feature matrix meeting preset requirements so as to obtain a feature vector for feature classification.

The control device provided by the above embodiment and the corresponding control method embodiment belong to the same concept, and the specific implementation process thereof is described in the method embodiment, which is not described herein again.

It should be noted that: the control device provided in the above embodiment is only illustrated by dividing the functional modules, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the control device is divided into different functional modules, so as to complete all or part of the functions described above.

An embodiment of the present application further provides an electronic device, fig. 5 is a block diagram of a structure of the electronic device provided in an embodiment of the present application, and as shown in fig. 5, the electronic device includes a processor and a memory, where:

a processor, which may include one or more processing cores, such as: 4 core processors, 6 core processors, etc. The processor may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array).

The memory, which may include high speed random access memory, may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a memory device, or other volatile solid state storage device.

The memory of this embodiment stores a computer program, which is executable on the processor, and when the processor executes the computer program, all or part of the implementation steps of the feature extraction method of this application or the related embodiments of the feature extraction apparatus described above, and/or other contents described in the text, may be implemented.

Those skilled in the art will appreciate that fig. 5 is only one possible implementation manner of the electronic device in the embodiment of the present application, and in other embodiments, more or fewer components may be included, or some components may be combined, or different components may be included, and the present embodiment is not limited thereto.

The present application further provides a computer storage medium having a program stored thereon, where the program is used to implement the steps of the above-mentioned embodiment of the feature extraction method when being executed by a processor.

The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.

The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the claims. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:运动想象任务的脑电信号特征提取方法、装置及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!