CN110321856A - A kind of brain-machine interface method and device of the multiple dimensioned divergence CSP of time-frequency - Google Patents

A kind of brain-machine interface method and device of the multiple dimensioned divergence CSP of time-frequency Download PDF

Info

Publication number
CN110321856A
CN110321856A CN201910609453.7A CN201910609453A CN110321856A CN 110321856 A CN110321856 A CN 110321856A CN 201910609453 A CN201910609453 A CN 201910609453A CN 110321856 A CN110321856 A CN 110321856A
Authority
CN
China
Prior art keywords
frequency
time
divergence
csp
brain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910609453.7A
Other languages
Chinese (zh)
Other versions
CN110321856B (en
Inventor
周卫东
刘国洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong University
Original Assignee
Shandong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong University filed Critical Shandong University
Priority to CN201910609453.7A priority Critical patent/CN110321856B/en
Publication of CN110321856A publication Critical patent/CN110321856A/en
Application granted granted Critical
Publication of CN110321856B publication Critical patent/CN110321856B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/08Feature extraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/12Classification; Matching

Landscapes

  • Health & Medical Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Veterinary Medicine (AREA)
  • Biophysics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Psychiatry (AREA)
  • Public Health (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Pathology (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Surgery (AREA)
  • Animal Behavior & Ethology (AREA)
  • General Health & Medical Sciences (AREA)
  • Physiology (AREA)
  • Signal Processing (AREA)
  • Mathematical Physics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Fuzzy Systems (AREA)
  • Psychology (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The present invention relates to the brain-machine interface methods and device of a kind of multiple dimensioned divergence CSP of time-frequency, pass through eeg amplifier and A/D conversion acquisition EEG signals first, then collected EEG signals are sent to computer and is handled, realize the selection of the time-frequency multi-scale division, time-frequency brain electricity section of EEG signals, the multiple dimensioned classifier of time-frequency is generated by one-to-one CSP and one-to-many SVM, and completes the classification to EEG signals by the multiple dimensioned classifier of time-frequency.The present invention is utilized in the methods of time-domain and frequency-domain multi-scale division, the selection of time-frequency brain electricity section, divergence CSP, is improved the speed of service of Mental imagery brain-computer interface, is improved recognition accuracy.

Description

A kind of brain-machine interface method and device of the multiple dimensioned divergence CSP of time-frequency
Technical field
The present invention relates to the brain-machine interface methods and device of a kind of multiple dimensioned divergence CSP of time-frequency, belong to the skill of brain-computer interface Art field.
Background technique
Currently, having many patients because suffering from serious dyskinesia in actual life, such as cerebral apoplexy or muscular dystrophy ridge Marrow lateral schlerosis etc., and lose the basic ability linked up with extraneous progress language or limbs.This has seriously affected patient Quality of life, also to its family and society cause great burden.As the development and people of biomedical engineering are to health The attention of multiple medical domain, brain-computer interface (Brain Computer Interface, BCI) technology become the heat studied in recent years One of point.Brain-computer interface is a kind of independent of conventional brain peripheral nerve and muscle systems, directly in brain and computer etc. The communication system of communication and control is set up between electronic equipment.In medical science of recovery therapy field, brain-computer interface technology can be helped The patient of physical disabilities or brain damage is helped to realize the control to external equipment, such as control wheelchair, artificial limb, household electrical appliance.
The corticocerebral region that different Mental imagery modes is activated is also different;Unilateral limb motion or imagination movement Main sensorimotor cortex can be activated, brain opposite side generates Event-related desynchronization current potential (Event Related Desynchronization, ERD), ipsilateral generation event-related design current potential (the Event Related of brain Synchronization,ERS);ERD refers to that when a certain cortical region is active, the periodic activity of specific frequency shows The reduction of amplitude out, ERS refers to when a certain activity at certain moment does not make related cortical region significantly active, specific Frequency just shows amplitude raising.Mental imagery will lead to the u rhythm and pace of moving things that frequency is 8-12Hz and the beta response that frequency is 13-28Hz Amplitude compacting be that Event-related desynchronization ERD or amplitude increase be event-related design ERS.
Currently, there are many feature extracting methods in terms of Mental imagery, such as altogether airspace mode filter (Common Spatial Pattern, CSP), band power, autoregressive coefficient and Riemann's Variance feature etc..Currently, classifying in Mental imagery The preferable method of aspect effect is that the filter bank CSP (Filter Bank CSP) that CT Guan et al. was proposed in 2008 is calculated Method, but the algorithm that they propose carries out multi-scale division to brain electricity section not in time domain and frequency domain, and accuracy rate is not high, generalization It is bad.
Summary of the invention
In view of the deficiencies of the prior art, the invention proposes the brain-machine interface methods of the multiple dimensioned divergence CSP of time-frequency a kind of.It should Method is that collected EEG signals are carried out multi-scale division in time domain and frequency domain, is then carried out to each scale section one-to-one Divergence CSP (Divergence-based Common Spatial Pattern) extracts feature, the characteristic use single layer that will be obtained Neural network carries out the selection of time-frequency brain electricity section, carries out one-to-one divergence CSP feature extraction and a pair to the time-frequency brain electricity section of selection More SVM generate the multiple dimensioned classifier of time-frequency and classify to EEG signals, and then obtain brain electricity condition testing result.
The present invention also provides a kind of devices of brain-machine interface method for executing the multiple dimensioned divergence CSP of above-mentioned time-frequency.
Summary of the invention
A kind of brain-machine interface method of the multiple dimensioned divergence CSP of time-frequency is constituted based on eeg amplifier, acquisition and computer Hardware platform realizes the detection to brain electricity condition;First by eeg amplifier and A/D conversion acquisition EEG signals, then will adopt The original EEG signals collected, which are sent to computer, to be handled, to EEG signals time domain and frequency domain carry out multi-scale division, when The selection of frequency brain electricity section carries out one-to-one divergence CSP feature extraction to the time-frequency brain electricity section of selection and one-to-many SVM generation time-frequency is more Scale classifier completes the classification to EEG signals eventually by the multiple dimensioned classifier of time-frequency, issues control command.
Term is explained:
Two classification SVM refer to the support vector machine classifier of achievable two classification.
Detailed description of the invention
Technical scheme is as follows:
A kind of brain-machine interface method of the multiple dimensioned divergence CSP of time-frequency, comprises the following steps that
1) EEG signals generated when imagining that K classification moves using eeg amplifier and A/D converter acquisition experimenter, And it stores into computer;Sample frequency is Fs, and EEG signals length is L, and each classification acquires n times, acquires M=N × K in total A sample;Its EEG signals S when experimenter imagines k-th of classification movementkCorresponding class label is k;K=1 ..., K;K Left hand, the right hand, toe and tongue movements are for example imagined in classification movement;
2) by EEG signals SkN is carried out in the time domaintA multi-scale segmentation, by EEG signals S at scale nkBy each section with The mode of the preceding paragraph overlapping 50% is divided intoA length is TnBrain electricity section, wherein n=1 ..., Nt;If after last segmentation Brain electricity segment length has residue, then taking one section of length comprising the residue length again is TnBrain electricity section as under the scale point Section;EEG signals SkN can be divided into altogether in the time domainstA time-frequency brain electricity section;Wherein, round() For round function, ceil () is the function that rounds up;
3) for each section of brain electricity section after step 2) segmentation, the frequency range [F on frequency domainmin,Fmax] in carry out Nf A multi-scale segmentation;0<Fmin<Fmax< Fs, FminFor greatest lower band frequency, FmaxFor frequency band upper limiting frequency;By brain electricity section at scale m It is divided into the way of each frequency band and a upper band overlapping 50%A frequency bandwidth is DmBrain electricity section, m=1 ..., Nf; If in frequency range [Fmin,Fmax] in segmentation after still have residue, then do not use remaining frequency band;In this way, obtained in step 2) Each brain electricity section is divided into N altogethersfA frequency bandwidth is DmTime-frequency brain electricity section;Wherein, Nf=floor (log2(Fmax-Fmin+ 1) -1), Dm=1+2m+1,Floor () is to be rounded letter downwards Number;
4) time-frequency brain electricity section progress packaging type time-frequency brain electricity section selection obtained, packaging type time-frequency by step 2) and 3) The step of brain electricity section selects are as follows:
A) time-frequency brain electricity section sum is set as E=Nst×Nsf, using each time-frequency brain electricity section PsCorresponding NpThe collection of a sample It closesOne-to-one divergence CSP training is carried out, V divergence CSP filter W is obtaineds,Ch is logical for brain electricity Road number, d are the line number that interception is set in divergence CSP algorithm;By each time-frequency brain electricity section PsIt is projected respectively to V divergence CSP On filter, one-to-one divergence CSP filtering is carried out, filtered time-frequency brain electricity section is obtained
B) rightEach row of data carry out logarithmic characteristic extraction, obtain feature value vector It is characterized value vector FwsIn ith feature value,ForIn the i-th row data, var () For calculate variance function, by the corresponding V feature value vector F of each time-frequency brain electricity sectionwsConnect into a total characteristic vectorWherein Q=V × d is the number of features for including in total characteristic vector;
C) by the corresponding N of each calculated total characteristic vector of time-frequency brain electricity sectionpThe set of a sample as training set, Remaining M-NpThe total characteristic vector set cooperation of a sample is verifying collection, and the single layer artificial neural network of E K classification output of training is simultaneously It is tested on corresponding verifying collection, obtains E accuracy rate;E accuracy rate is connected into a vector, obtain accuracy rate to AmountAjFor j-th of accuracy rate;
D) obtained accuracy rate vector A is subjected to descending sort, preceding G accuracy rate is worth corresponding time-frequency brain electricity Duan Zuowei The time-frequency brain electricity section of selection;
5) by each time-frequency brain electricity section P in G time-frequency brain electricity section obtained in step 4)aThe collection of corresponding M sample It closesBy one-to-one divergence CSP training, V divergence CSP electric-wave filter matrix is obtainedBy each time-frequency brain electricity section Pa It is projected respectively to one-to-one divergence CSP filtering is carried out on V divergence CSP filter, obtains filtered time-frequency brain electricity sectionIt is rightEach row of data carry out logarithmic characteristic extraction, obtain feature value vectorFor feature vector FwaIn ith feature value,For In the i-th row data, var () be calculate variance function, by the corresponding V divergence of G time-frequency brain electricity section of M sample The feature vector that CSP is obtained connects into a total characteristic setWherein H=V × d × G is that each sample is corresponding Characteristic Number;
6) by total characteristic set obtained in step 5)And corresponding class label is sent into one-to-many SVM and is instructed Practice, i.e., the sample of each classification and other K-1 classification is sent into two classification SVM and is trained, obtain K svm classifier Device;
7) by K SVM model composition obtained in V × G divergence CSP filter obtained in step 5) and step 6) The multiple dimensioned classifier of time-frequency;The multiple dimensioned classifier of time-frequency first carries out one-to-one divergence CSP to the time-frequency brain electricity section of input and filters, and Obtain logarithmic characteristic, after one-to-many svm classifier is carried out to the logarithmic characteristic of acquisition;
8) the G time-frequency brain electricity section that the EEG signals of acquisition obtain is sent into the multiple dimensioned classifier of time-frequency and is classified, Obtain class label p, p=1 ... the K of EEG signals;
9) corresponding control command is converted into according to class label p and controls external equipment.
It is preferred according to the present invention, frequency band is split in step 3) and is referred to: utilizing the Butterworth filter pair of J rank Brain electricity section carries out bandpass filtering.
It is further preferred that J=7.
Preferred according to the present invention, in step 4), one-to-one divergence CSP training realizes that step includes:
1. taking setIn a certain time-frequency brain electricity section data sampleIn Two classes that do not reused, are set as X1 *、X2 *, N*For training set number of samples, TnFor n-th of scale hypencephalon electricity in the time domain The length of section, n=1 ..., Nt
2. calculating X1 *With X2 *Covariance matrix Σ1、Σ2, and calculate whitening matrix
3. random initializtion spin matrix
4. calculating albefaction and postrotational covariance matrix
5. selecting a maximum number of iterations Ne, neThe number of iterations is represented, from ne=1 starts to carry out following loop iteration:
E) gradient matrix is calculatedObjective function J (R) is as shown in formula (I):
In formula (I), DKLFor KL divergence function, IdFor the unit matrix of d row before truncation matrix;0≤λ≤1 is penalty coefficient; C is classification sequence number, and i is sample serial number;
F) it setsFor gradient of the objective function at update spin matrix U=I, I is unit matrix, (0,1] In the range of by successively decrease rule search forSo that J (etH)≤J(R);
G) U=e is enabledtH, update spin matrix R is UR, updates rotation covariance matrixFor
If h) ne=Ne, then iteration terminates, and jumps out circulation, enters step 6., otherwise, enables neAdd 1, return step e);
6. to matrix (IdRP)Σ1(IdRP)TEigenvalue Decomposition is carried out, corresponding eigenvectors matrix B is obtained;
7. being ranked up from big to small to eigenvectors matrix by characteristic value, by the eigenvectors matrix after sequenceProjection Onto spin matrix RP, a-th of divergence CSP electric-wave filter matrix is obtained
8. jumping to step if a < V and 1. continuing to execute, otherwise, one-to-one divergence CSP filter L is returned top
It is further preferred that d=4, λ=0.1.
Preferred according to the present invention, single layer artificial neural network described in step 4), input layer includes Q neuron, Output layer includes K neuron;Q=V × d is the number of features for including in total characteristic vector;Between input layer and output layer It is connected by the way of connecting entirely;Output layer uses softmax function output probability value;It uses and intersects entropy function as model training Loss function, if θ be model all training parameters, then optimization aim CE (θ) is as shown in formula (II):
In formula (II),It is the sample i weighted sum all for j-th of neuron,It is sample i for k-th of nerve All weighted sums of member, it is related with θ.y(i)The real label of i-th of sample is represented, 1 { } was indicative function, N*It is defeated The number of samples for entering model updates the weight of single layer artificial neural network using the method for stochastic gradient descent;The number of iterations is set For EpIt is secondary.
It is further preferred that Ep=20.
Preferred according to the present invention, one-to-many svm classifier described in step 7) refers to: input feature vector is sent into K two classification Input feature vector is classified as that one kind with maximum classification function value by SVM model.
A kind of device being carried out brain-computer interface using the above method, including the sequentially connected eeg amplifier of circuit, A/D are turned Parallel operation and computer are provided with the brain electro-detection module of detection brain electricity condition in the computer, utilize eeg amplifier and A/D Converter is transferred in computer after being acquired to EEG signals, is carried out using brain electro-detection module to EEG signals multiple dimensioned Time-frequency segmentation, the selection of time-frequency brain electricity section, one-to-one divergence CSP and one-to-many SVM form the multiple dimensioned classifier of time-frequency to brain electricity Signal is classified, and is obtained sample predictions label and is converted into the control command to external equipment.
Of the invention has the advantages that:
EEG signals are subjected to multi-scale division and packaging type time-frequency brain electricity Duan Xuan by certain rule in time domain and frequency domain It selects, one-to-one divergence CSP and one-to-many SVM is carried out to the time-frequency brain electricity section of selection, form multiple dimensioned time-frequency classifier to brain electricity Signal is classified, to obtain EEG signals class label and control signal control external equipment.The present invention is utilized in time domain The method of frequency domain multi-scale division, improves recognition accuracy;It is selected by time-frequency brain electricity section, screens out the time-frequency brain electricity of redundancy Section, improves the speed of service of Mental imagery brain-computer interface.
Detailed description of the invention
Fig. 1 is the structural block diagram of the device of brain-computer interface of the present invention;
Fig. 2 is the brain-machine interface method flow diagram of the multiple dimensioned divergence CSP of time-frequency of the present invention;
Fig. 3 is accuracy rate vector to combine visualization time-frequency image after being added by corresponding time domain scale and frequency domain Schematic diagram;
Fig. 4 is achieved using the time-frequency brain electricity section of different number on the Mental imagery EEG signals of 12 volunteers Average Accuracy schematic diagram.
Specific embodiment
The present invention will be further described with example with reference to the accompanying drawings of the specification, and the present invention is not limited thereto;
Embodiment 1
As shown in Figs 1-4;
The present invention acquires EEG signals by electrode, and EEG signals amplify by eeg amplifier and A/D converter, input Computer realizes the classification of EEG signals, and generates control command control external equipment;
A kind of brain-machine interface method of the multiple dimensioned divergence CSP of time-frequency, flow chart are as shown in Figure 2, comprising the following steps:
1) left hand, the right hand, toe and 4, tongue movements are imagined using eeg amplifier and A/D converter acquisition experimenter When K=4 classification EEG signals generating, and store into computer;Sample frequency is Fs=250Hz, EEG signals length For L=1000, each classification is acquired N=90 times, acquires M=N × K=360 sample in total;Experimenter imagines k-th of classification Its EEG signals S when movementkCorresponding label is k;K=1 ..., 4;
2) by EEG signals SkN is carried out in the time domaintA multi-scale segmentation, by EEG signals S at scale nkBy each section with The mode of the preceding paragraph overlapping 50% is divided intoA length is TnBrain electricity section, wherein n=1 ..., Nt;If after last segmentation Brain electricity segment length has residue, then taking one section of length comprising the residue length again is TnBrain electricity section as under the scale point Section;EEG signals SkN can be divided into altogether in the time domainst=11 brain electricity sections;Wherein, Round () is to round up Bracket function, ceil () are the function that rounds up.Length is that 1000 points of EEG signals are divided into 1-1000 point under scale 1 1 length be 1000 brain electricity section;1-500 point, 251-750 point, 3 length of 501-1000 point are divided under scale 2 For 500 brain electricity section;It is divided into 1-250 point under scale 3,126-375 point, 251-500 point, 376-625 point, 501-750 point, 626-875 point, the brain electricity section that 7 length of 751-1000 point are 250;
3) for each section of brain electricity section after step 2) segmentation, the frequency range [F on frequency domainmin=4Hz, Fmax= 38Hz] interior stroke of progress NfA multi-scale segmentation, at scale m by brain electricity section in the way of each frequency band and a upper band overlapping 50% It is divided intoA frequency bandwidth is DmBrain electricity section, wherein m=1 ..., Nf;If in frequency range [Fmin=4Hz, Fmax= 38Hz] in segmentation after still have residue, then do not use remaining frequency band;In this way, each brain electricity section altogether can quilt obtained in step 2) It is divided intoA frequency bandwidth is DmBrain electricity section;Wherein, Nf=floor (log2(Fmax-Fmin+1)-1) =4, Dm=1+2m+1,Floor () is downward bracket function.The frequency range of 4-38Hz is in ruler 4-8Hz, 6-10Hz, 8-12Hz, 10-14Hz, 12-16Hz, 14-18Hz, 16-20H, 18-22Hz, 20- are divided under degree 1 16 frequency bandwidths of 24Hz, 22-26Hz, 24-28Hz, 26-30Hz, 28-32Hz, 30-34Hz, 32-36Hz, 34-38Hz are The frequency range of 4Hz;4-12Hz, 8-16Hz, 12-20Hz, 16-24Hz, 20-28Hz, 24-32Hz, 28- are divided under scale 2 7 frequency bandwidths of 36Hz are the frequency range of 8Hz;4-20Hz, 3 bandwidths of 12-28Hz, 20-36Hz are divided under scale 3 Degree is the frequency range of 16Hz;1 frequency bandwidth that 4-36Hz is divided under scale 1 is the frequency range of 32Hz;
Frequency band is split in step 3) and is referred to: band logical filter being carried out to brain electricity section using the Butterworth filter of J rank Wave, J=7;
4) selection of packaging type time-frequency brain electricity section is carried out to by step 2) and 3) time-frequency brain electricity section obtained, when packaging type The step of frequency brain electricity section selects are as follows:
A) time-frequency brain electricity section sum is set as E=Nst×Nsf=297, using each time-frequency brain electricity section PsCorresponding Np=180 The set of a sampleOne-to-one divergence CSP training is carried out, V=6 divergence CSP filter is obtainedWherein Ch= 60 be number of active lanes, and d=4 is the line number that interception is set in divergence CSP algorithm;By each time-frequency brain electricity section PsIt is projected respectively to V One-to-one divergence CSP filtering is carried out on a divergence CSP filter, obtains filtered time-frequency brain electricity section
B) rightEach row of data carry out logarithmic characteristic extraction, obtain feature value vector Wherein,For feature vector FwsIn ith feature value,ForIn the i-th row data, var () is the function for calculating variance.By the corresponding V feature vector F of each time-frequency brain electricity sectionwsConnect into a total characteristic vectorWherein Q=V × d is the number of features for including in total characteristic vector;
C) by the corresponding N of each calculated total characteristic vector of time-frequency brain electricity sectionpThe set of a sample as training set, Remaining M-NpThe total characteristic vector set cooperation of a sample is verifying collection, and the single layer artificial neural network of E K classification output of training is simultaneously It is tested on corresponding verifying collection, obtains E accuracy rate;E accuracy rate is connected into a vector, obtain accuracy rate to AmountWherein AjFor j-th of accuracy rate.Accuracy rate vector is pressed into corresponding time domain scale and frequency domain Range combinations visualization time-frequency image schematic diagram after being added is as shown in Figure 3;
D) obtained accuracy rate vector A is subjected to descending sort, preceding G=150 accuracy rate is worth corresponding time-frequency brain electricity The time-frequency brain electricity section of section alternatively;
5) by each time-frequency brain electricity section P in G time-frequency brain electricity section obtained in step 4)aThe collection of corresponding M sample It closesV divergence CSP electric-wave filter matrix is obtained by one-to-one divergence CSP trainingBy each time-frequency brain electricity section Pa It is projected respectively to one-to-one divergence CSP filtering is carried out on V divergence CSP filter, obtains filtered time-frequency brain electricity sectionIt is rightEach row of data carry out logarithmic characteristic extraction, obtain feature value vector Wherein,For feature vector FwaIn ith feature value,ForIn the i-th row data, var () is the function for calculating variance.The feature vector that the corresponding V divergence CSP of G time-frequency brain electricity section of M sample is obtained connects It is connected into a total characteristic setWherein H=V × d × G is the corresponding Characteristic Number of each sample;
6) by total characteristic set obtained in step 5)And corresponding class label is sent into one-to-many SVM and is instructed Practice, i.e., the sample of each classification and other 3 classifications is sent into two classification SVM and is trained, obtain 4 SVM classifiers;
7) by 4 SVM model compositions obtained in V × G divergence CSP filter obtained in step 5) and step 6) One multiple dimensioned classifier of time-frequency;The multiple dimensioned classifier of time-frequency carries out one-to-one divergence CSP to the time-frequency brain electricity section of input first Filtering, and logarithmic characteristic is obtained, one-to-many svm classifier then is carried out to the logarithmic characteristic of acquisition;
8) the G time-frequency brain electricity section that the EEG signals of acquisition obtain is sent into the multiple dimensioned classifier of time-frequency and is classified, Obtain the class label p (p=1 ..., 4) of EEG signals;
9) corresponding control command is converted into according to class label p and controls external equipment.As p=1, brain is electric at this time for judgement State is EEG signals when imagining left hand, and is converted to control command 1;As p=2, judge at this time brain electricity condition as the imagination The EEG signals when right hand, and be converted to control command 2;Brain as p=3, when judging brain electricity condition at this time as imagination toe Electric signal, and be converted to control command 3;As p=4, judge that brain electricity condition is imagines EEG signals when tongue at this time, and turn It is changed to control command 4.
Embodiment 2
According to a kind of brain-machine interface method of the multiple dimensioned divergence CSP of time-frequency described in embodiment 1, difference is:
In step 4), one-to-one divergence CSP training realizes that step includes:
1. taking setIn a certain time-frequency brain electricity section data sampleIn Two classes that do not reused, are set as X1 *、X2 *, N*For training set number of samples, TnFor n-th of scale hypencephalon electricity in the time domain The length of section, n=1 ..., Nt
2. calculating X1 *With X2 *Covariance matrix Σ1、Σ2, and calculate whitening matrix
3. random initializtion spin matrix
4. calculating albefaction and postrotational covariance matrix
5. selecting a maximum number of iterations Ne, neThe number of iterations is represented, from ne=1 starts to carry out following loop iteration:
A) gradient matrix is calculatedObjective function J (R) is as shown in formula (I):
In formula (I), DKLFor KL divergence function, IdFor the unit matrix of d row before truncation matrix;0≤λ≤1 is penalty coefficient; C is classification sequence number, and i is sample serial number;
B) it setsThe gradient at spin matrix U=I is being updated for objective function, wherein I is unit matrix.? (0,1] in the range of by successively decrease rule search forSo that J (etH)≤J(R);
C) U=e is enabledtH, update spin matrix R is UR, updates rotation covariance matrixFor
If d) ne=Ne, then iteration terminates, and jumps out circulation, enters step 6., otherwise, enables neAdd 1, repeats above-mentioned circulation;
6. to matrix (IdRP)Σ1(IdRP)TEigenvalue Decomposition is carried out, corresponding eigenvectors matrix B is obtained;
7. being ranked up from big to small to eigenvectors matrix by characteristic value, by the eigenvectors matrix after sequenceProjection Onto spin matrix RP, a-th of divergence CSP electric-wave filter matrix is obtained
8. jumping to step if a < V and 1. continuing to execute.Otherwise one-to-one divergence CSP filter L is returnedp
D=4, λ=0.1.
Single layer artificial neural network described in step 4), input layer include Q neuron, and output layer includes K nerve Member;Wherein Q=V × d is the number of features for including in total characteristic vector;Between input layer and output layer by the way of connecting entirely Connection;Output layer uses softmax function output probability value;The loss function for intersecting entropy function as model training is used, if θ is All training parameters of model, then optimization aim CE (θ) is as shown in formula (II):
In formula (II),It is the sample i weighted sum all for j-th of neuron,It is sample i for k-th of nerve All weighted sums of member, it is related with θ.y(i)The real label of i-th of sample is represented, 1 { } was indicative function, N*It is defeated Enter the number of samples of model.The weight of neural network is updated using the method for stochastic gradient descent;The number of iterations is set as EpIt is secondary.Ep =20.
One-to-many svm classifier described in step 7) refers to: input feature vector being sent into K two classification SVM model, by input feature vector It is classified as that one kind with maximum classification function value.
Embodiment 3
A kind of device carrying out brain-computer interface using such as embodiment 1 or 2 the methods, as shown in Figure 1, including being connected with circuit Eeg amplifier, A/D converter and the computer connect is provided with the brain electro-detection mould of detection brain electricity condition in the computer Block utilizes brain electro-detection after being acquired using eeg amplifier and to EEG signals by A/D converting transmission into computer Module carries out multiple dimensioned time-frequency segmentation, the selection of time-frequency brain electricity section, one-to-one divergence CSP and one-to-many SVM, shape to EEG signals Classify at the multiple dimensioned classifier of time-frequency to EEG signals, obtain the class label of EEG signals and be converted into wheelchair it is left and right, The control command of forward and backward movement.
Brain electricity sample is tested to 12 people using the present invention to detect, and selects four classification when 150 time-frequency brain electricity sections flat Equal recognition correct rate is up to 79.86%.Shadow of the quantity of the time-frequency brain electricity section of selection to 12 average recognition accuracies of the classification of people four It rings as shown in Figure 4.

Claims (9)

1. a kind of brain-machine interface method of the multiple dimensioned divergence CSP of time-frequency, which is characterized in that comprise the following steps that
1) EEG signals generated when imagining that K classification moves using eeg amplifier and A/D converter acquisition experimenter, and deposit Storage is into computer;Sample frequency is Fs, and EEG signals length is L, and each classification acquires n times, acquires M=N × K sample in total This;Its EEG signals S when experimenter imagines k-th of classification movementkCorresponding class label is k;K=1 ..., K;
2) by EEG signals SkN is carried out in the time domaintA multi-scale segmentation, by EEG signals S at scale nkBy each section and upper one The mode of section overlapping 50% is divided intoA length is TnBrain electricity section, n=1 ..., Nt;If the brain electricity segment length after last segmentation Degree has residue, then taking one section of length comprising the residue length again is TnBrain electricity section as the segmentation under the scale;Brain telecommunications Number SkN can be divided into altogether in the time domainstA time-frequency brain electricity section; round() For round function, ceil () is the function that rounds up;
3) for each section of brain electricity section after step 2) segmentation, the frequency range [F on frequency domainmin,Fmax] in carry out NfA scale Segmentation;0<Fmin<Fmax< Fs, FminFor greatest lower band frequency, FmaxFor frequency band upper limiting frequency;By brain electricity section by each at scale m The mode of frequency band and a upper band overlapping 50% is divided intoA frequency bandwidth is DmBrain electricity section, m=1 ..., Nf;If in frequency Band range [Fmin,Fmax] in segmentation after still have residue, then do not use remaining frequency band;Each brain electricity section obtained in step 2) is total It is divided into NsfA frequency bandwidth is DmTime-frequency brain electricity section;Nf=floor (log2(Fmax-Fmin+ 1) -1), Dm=1+2m+1,Floor () is downward bracket function;
4) time-frequency brain electricity section progress packaging type time-frequency brain electricity section selection obtained, packaging type time-frequency brain electricity by step 2) and 3) The step of section selection are as follows:
A) time-frequency brain electricity section sum is set as E=Nst×Nsf, using each time-frequency brain electricity section PsCorresponding NpThe set of a sampleInto The one-to-one divergence CSP training of row, obtains V divergence CSP filter Ws,Ch is brain electric channel number, D is the line number that interception is set in divergence CSP algorithm;By each time-frequency brain electricity section PsIt is projected respectively to V divergence CSP filter On, one-to-one divergence CSP filtering is carried out, filtered time-frequency brain electricity section is obtained
B) rightEach row of data carry out logarithmic characteristic extraction, obtain feature value vector It is characterized value vector FwsIn ith feature value,ForIn the i-th row data, var () is the function for calculating variance, by the corresponding V feature value vector F of each time-frequency brain electricity sectionwsConnect into a total characteristic to AmountQ=V × d is the number of features for including in total characteristic vector;
C) by the corresponding N of each calculated total characteristic vector of time-frequency brain electricity sectionpThe set of a sample as training set, remaining M-NpThe total characteristic vector set cooperation of a sample is verifying collection, trains the single layer artificial neural network of E K classification output and in phase It is tested on the verifying collection answered, obtains E accuracy rate;E accuracy rate is connected into a vector, obtains accuracy rate vectorAjFor j-th of accuracy rate;
D) obtained accuracy rate vector A is subjected to descending sort, preceding G accuracy rate is worth corresponding time-frequency brain electricity section alternatively Time-frequency brain electricity section;
5) by each time-frequency brain electricity section P in G time-frequency brain electricity section obtained in step 4)aThe set of corresponding M sampleBy One-to-one divergence CSP training, obtains V divergence CSP electric-wave filter matrixBy each time-frequency brain electricity section PaIt is projected respectively to V One-to-one divergence CSP filtering is carried out on a divergence CSP filter, obtains filtered time-frequency brain electricity sectionIt is right's Each row of data carries out logarithmic characteristic extraction, obtains feature value vector For feature vector FwaIn ith feature value,ForIn the i-th row data, var () be calculate variance function, by M The feature vector that the corresponding V divergence CSP of G time-frequency brain electricity section of a sample is obtained connects into a total characteristic setH=V × d × G is the corresponding Characteristic Number of each sample;
6) by total characteristic set obtained in step 5)And corresponding class label is sent into one-to-many SVM and is trained, i.e., The sample of each classification and other K-1 classification is sent into two classification SVM and is trained, K SVM classifier is obtained;
7) K SVM model obtained in V × G divergence CSP filter obtained in step 5) and step 6) is formed into time-frequency Multiple dimensioned classifier;The multiple dimensioned classifier of time-frequency first carries out one-to-one divergence CSP to the time-frequency brain electricity section of input and filters, and obtains Logarithmic characteristic, after one-to-many svm classifier is carried out to the logarithmic characteristic of acquisition;
8) the G time-frequency brain electricity section that the EEG signals of acquisition obtain is sent into the multiple dimensioned classifier of time-frequency and is classified, obtained Class label p, p=1 ... the K of EEG signals;
9) corresponding control command is converted into according to class label p and controls external equipment.
2. the brain-machine interface method of the multiple dimensioned divergence CSP of time-frequency according to claim 1 a kind of, which is characterized in that step 3) frequency band is split in and is referred to: bandpass filtering being carried out to brain electricity section using the Butterworth filter of J rank.
3. the brain-machine interface method of the multiple dimensioned divergence CSP of time-frequency according to claim 2 a kind of, which is characterized in that J=7.
4. the brain-machine interface method of the multiple dimensioned divergence CSP of time-frequency according to claim 1 a kind of, which is characterized in that step 4) in, one-to-one divergence CSP training realizes that step includes:
1. taking setIn a certain time-frequency brain electricity section data sampleIn do not weigh Multiple used two class, is set as X1 *、X2 *, N*For training set number of samples, TnFor n-th of scale hypencephalon electricity section in the time domain Length, n=1 ..., Nt
2. calculating X1 *With X2 *Covariance matrix Σ1、Σ2, and calculate whitening matrix
3. random initializtion spin matrix
4. calculating albefaction and postrotational covariance matrix
5. selecting a maximum number of iterations Ne, neThe number of iterations is represented, from ne=1 starts to carry out following loop iteration:
E) gradient matrix is calculatedObjective function J (R) is as shown in formula (I):
In formula (I), DKLFor KL divergence function, IdFor the unit matrix of d row before truncation matrix;0≤λ≤1 is penalty coefficient;C is Classification sequence number, i are sample serial number;
F) it setsFor objective function update spin matrix U=I place gradient, I be unit matrix, (0,1] model It is searched in enclosing by the rule successively decreasedSo that J (etH)≤J(R);
G) U=e is enabledtH, updating spin matrix R is UR to update rotation covariance matrixFor
If h) ne=Ne, then iteration terminates, and jumps out circulation, enters step 6., otherwise, enables neAdd 1, return step e);
6. to matrix (IdRP)Σ1(IdRP)TEigenvalue Decomposition is carried out, corresponding eigenvectors matrix B is obtained;
7. being ranked up from big to small to eigenvectors matrix by characteristic value, by the eigenvectors matrix after sequenceProject to rotation On torque battle array RP, a-th of divergence CSP electric-wave filter matrix is obtained
8. jumping to step if a < V and 1. continuing to execute, otherwise, one-to-one divergence CSP filter L is returned top
5. the brain-machine interface method of the multiple dimensioned divergence CSP of time-frequency according to claim 4 a kind of, which is characterized in that d=4, λ=0.1.
6. the brain-machine interface method of the multiple dimensioned divergence CSP of time-frequency according to claim 1 a kind of, which is characterized in that step 4) the single layer artificial neural network described in, input layer include Q neuron, and output layer includes K neuron;Q=V × d is The number of features for including in total characteristic vector;It is connected by the way of connecting entirely between input layer and output layer;Output layer is adopted With softmax function output probability value;The loss function for intersecting entropy function as model training is used, if θ is all instructions of model Practice parameter, then optimization aim CE (θ) is as shown in formula (II):
In formula (II),It is the sample i weighted sum all for j-th of neuron,It is sample i for k-th of neuron institute Some weighted sums, y(i)The real label of i-th of sample is represented, 1 { } was indicative function, N*For the sample number of input model Mesh updates the weight of single layer artificial neural network using the method for stochastic gradient descent;The number of iterations is set as EpIt is secondary.
7. the brain-machine interface method of the multiple dimensioned divergence CSP of time-frequency according to claim 6 a kind of, which is characterized in that Ep= 20。
8. the brain-machine interface method of the multiple dimensioned divergence CSP of time-frequency according to claim 1 a kind of, which is characterized in that step 7) the one-to-many svm classifier described in refers to: input feature vector being sent into K two classification SVM model, input feature vector is classified as having most That of macrotaxonomy functional value is a kind of.
9. a kind of brain-machine interface method using a kind of any multiple dimensioned divergence CSP of time-frequency of claim 1-8 carries out brain The device of machine interface, which is characterized in that including the sequentially connected eeg amplifier of circuit, A/D converter and computer, the meter The brain electro-detection module of detection brain electricity condition is provided in calculation machine, using eeg amplifier and A/D converter to EEG signals into It is transferred in computer after row acquisition, multiple dimensioned time-frequency segmentation, time-frequency brain electricity is carried out to EEG signals using brain electro-detection module Section selection, one-to-one divergence CSP and one-to-many SVM form the multiple dimensioned classifier of time-frequency and classify to EEG signals, obtain Sample predictions label is simultaneously converted into control command to external equipment.
CN201910609453.7A 2019-07-08 2019-07-08 Time-frequency multi-scale divergence CSP brain-computer interface method and device Active CN110321856B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910609453.7A CN110321856B (en) 2019-07-08 2019-07-08 Time-frequency multi-scale divergence CSP brain-computer interface method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910609453.7A CN110321856B (en) 2019-07-08 2019-07-08 Time-frequency multi-scale divergence CSP brain-computer interface method and device

Publications (2)

Publication Number Publication Date
CN110321856A true CN110321856A (en) 2019-10-11
CN110321856B CN110321856B (en) 2023-01-10

Family

ID=68123076

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910609453.7A Active CN110321856B (en) 2019-07-08 2019-07-08 Time-frequency multi-scale divergence CSP brain-computer interface method and device

Country Status (1)

Country Link
CN (1) CN110321856B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111000557A (en) * 2019-12-06 2020-04-14 天津大学 Noninvasive electroencephalogram signal analysis system applied to decompression skull operation
CN113967022A (en) * 2021-11-16 2022-01-25 常州大学 Motor imagery electroencephalogram characteristic characterization method based on individual self-adaption

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012153965A2 (en) * 2011-05-09 2012-11-15 광주과학기술원 Brain-computer interface device and classification method therefor
CN103735262A (en) * 2013-09-22 2014-04-23 杭州电子科技大学 Dual-tree complex wavelet and common spatial pattern combined electroencephalogram characteristic extraction method
CN105654063A (en) * 2016-01-08 2016-06-08 东南大学 Motor imagery EEG pattern recognition method based on time-frequency parameter optimization of artificial bee colony
CN109472194A (en) * 2018-09-26 2019-03-15 重庆邮电大学 A kind of Mental imagery EEG signals characteristic recognition method based on CBLSTM algorithm model
CN109858537A (en) * 2019-01-22 2019-06-07 南京邮电大学 EEG feature extraction method of the improved EEMD in conjunction with CSP

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012153965A2 (en) * 2011-05-09 2012-11-15 광주과학기술원 Brain-computer interface device and classification method therefor
CN103735262A (en) * 2013-09-22 2014-04-23 杭州电子科技大学 Dual-tree complex wavelet and common spatial pattern combined electroencephalogram characteristic extraction method
CN105654063A (en) * 2016-01-08 2016-06-08 东南大学 Motor imagery EEG pattern recognition method based on time-frequency parameter optimization of artificial bee colony
CN109472194A (en) * 2018-09-26 2019-03-15 重庆邮电大学 A kind of Mental imagery EEG signals characteristic recognition method based on CBLSTM algorithm model
CN109858537A (en) * 2019-01-22 2019-06-07 南京邮电大学 EEG feature extraction method of the improved EEMD in conjunction with CSP

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JIE WANG 等: "Toward optimal feature and time segment selection by divergence method for EEG signals classification", 《COMPUTERS IN BIOLOGY AND MEDICINE》 *
崔丽霞等: "基于概率协作表示的运动想象脑电分类算法", 《山东科学》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111000557A (en) * 2019-12-06 2020-04-14 天津大学 Noninvasive electroencephalogram signal analysis system applied to decompression skull operation
CN113967022A (en) * 2021-11-16 2022-01-25 常州大学 Motor imagery electroencephalogram characteristic characterization method based on individual self-adaption
CN113967022B (en) * 2021-11-16 2023-10-31 常州大学 Individual self-adaption-based motor imagery electroencephalogram characteristic characterization method

Also Published As

Publication number Publication date
CN110321856B (en) 2023-01-10

Similar Documents

Publication Publication Date Title
CN102722728B (en) Motion image electroencephalogram classification method based on channel weighting supporting vector
CN104091172B (en) A kind of feature extracting method of Mental imagery EEG signals
CN104771163B (en) EEG feature extraction method based on CSP and R CSP algorithms
CN102542283B (en) Optimal electrode assembly automatic selecting method of brain-machine interface
CN109620223A (en) A kind of rehabilitation of stroke patients system brain-computer interface key technology method
CN108433722A (en) Portable brain electric collecting device and its application in SSVEP and Mental imagery
CN111544855B (en) Pure idea control intelligent rehabilitation method based on distillation learning and deep learning and application
CN112043473B (en) Parallel nested and autonomous preferred classifier for brain-myoelectricity fusion perception of intelligent artificial limb
CN104035563B (en) W-PCA (wavelet transform-principal component analysis) and non-supervision GHSOM (growing hierarchical self-organizing map) based electrocardiographic signal identification method
CN104360730A (en) Man-machine interaction method supported by multi-modal non-implanted brain-computer interface technology
CN101332136A (en) Electric artificial hand combined controlled by brain electricity and muscle electricity and control method
CN108280414A (en) A kind of recognition methods of the Mental imagery EEG signals based on energy feature
CN103258215A (en) Multi-lead correlation analysis electroencephalo-graph (EEG) feature extraction method
CN107981997A (en) A kind of method for controlling intelligent wheelchair and system based on human brain motion intention
Wang et al. An approach of one-vs-rest filter bank common spatial pattern and spiking neural networks for multiple motor imagery decoding
CN108268844A (en) Movement recognition method and device based on surface electromyogram signal
CN109691996A (en) One kind is based on mixing binary-coded EEG signals feature preferably and classifier preferred method
CN110321856A (en) A kind of brain-machine interface method and device of the multiple dimensioned divergence CSP of time-frequency
CN108523883A (en) A kind of continuous Mental imagery identifying system of left and right index finger based on actual act modeling
Jana et al. Epileptic seizure prediction from EEG signals using DenseNet
CN109009098A (en) A kind of EEG signals characteristic recognition method under Mental imagery state
CN115562488A (en) Motor imagery brain-computer interface communication method, device, system, medium and equipment
Cai et al. The motor imagination EEG recognition combined with convolution neural network and gated recurrent unit
CN108937926A (en) The analysis method and device of the surface electromyogram signal of big data
CN110738093B (en) Classification method based on improved small world echo state network electromyography

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant