CN108388846B - Electroencephalogram alpha wave detection and identification method based on canonical correlation analysis - Google Patents

Electroencephalogram alpha wave detection and identification method based on canonical correlation analysis Download PDF

Info

Publication number
CN108388846B
CN108388846B CN201810112601.XA CN201810112601A CN108388846B CN 108388846 B CN108388846 B CN 108388846B CN 201810112601 A CN201810112601 A CN 201810112601A CN 108388846 B CN108388846 B CN 108388846B
Authority
CN
China
Prior art keywords
electroencephalogram
frequency
alpha wave
frequencies
signal
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.)
Active
Application number
CN201810112601.XA
Other languages
Chinese (zh)
Other versions
CN108388846A (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.)
Xidian University
Original Assignee
Xidian 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 Xidian University filed Critical Xidian University
Priority to CN201810112601.XA priority Critical patent/CN108388846B/en
Publication of CN108388846A publication Critical patent/CN108388846A/en
Application granted granted Critical
Publication of CN108388846B publication Critical patent/CN108388846B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/02Preprocessing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/12Classification; Matching

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The invention discloses an electroencephalogram alpha wave detection and identification method based on typical correlation analysis, which solves the problem of quickly and efficiently detecting and identifying electroencephalogram alpha wave signals, and comprises the following steps: inputting an electroencephalogram signal; preprocessing the electroencephalogram signals to obtain training and testing data; selecting different frequency sets, and constructing reference signals corresponding to different frequencies; calculating correlation coefficients of the training data and reference signals with different frequencies through typical correlation analysis to form a correlation coefficient set; selecting characteristic frequencies to obtain a characteristic frequency set; selecting a correlation coefficient corresponding to the characteristic frequency set from the correlation coefficient set to form a training characteristic set; training a classifier by using a training feature set; calculating a test data feature set; and (4) classifying and identifying by using a classifier to finish the detection and identification of the electroencephalogram alpha wave. The invention realizes the rapid detection of the brain alpha wave signal through the characteristic frequency selection, has high detection speed, high accuracy and stable work, and is used for the signal detection in the brain-computer interface system of the brain wave alpha wave signal.

Description

Electroencephalogram alpha wave detection and identification method based on canonical correlation analysis
Technical Field
The invention belongs to the technical field of cognitive neuroscience, mainly relates to the feature extraction and recognition detection of alpha waves in electroencephalogram signals, and particularly relates to an electroencephalogram alpha wave detection and recognition method based on typical correlation analysis. The method can be used for rapidly detecting the electroencephalogram signals alpha and judging whether a section of electroencephalogram signals contain alpha waves.
Background
The alpha wave signal is one of spontaneous brain wave rhythms, also called alpha rhythm. The alpha rhythm is an electrical activity corresponding to the idle rhythm of the visual cortex in the cerebral cortex, usually the energy of an alpha wave signal is mainly concentrated in a frequency band of 8-13 Hz, the intensity of the alpha wave signal detected on the surface of the human scalp is very weak, and the voltage amplitude fluctuates in a range of about 20-100 muV. Craig et al 1997 have shown that alpha waves have significant rhythmic EEG waveform characteristics, and are significantly enhanced after eye closure when a subject is awake, and the waveform of the signal is similar to a sine wave, and the amplitude variation is characterized by first gradually increasing and then gradually decreasing, and the overall shape is fusiform.
The alpha wave signal is simple to generate, a complex learning process is not needed, and the characteristics of the alpha wave signal are more obvious in 90% of normal people and disabled people, so that the alpha wave signal can be used as an effective control means, and the rapid and accurate detection becomes a crucial step. Researchers have also proposed some methods for alpha wave detection.
The core idea of the method is that after a certain section of electroencephalogram signal and a preset voltage threshold value, the section of signal is considered to represent an alpha wave signal, and then a control signal is output to a control system. The method can effectively detect and utilize the alpha wave signal, but has the defects that the detection time is at least 2 seconds, and the detection efficiency is low.
A typical correlation analysis (CCA) can be used to study a plurality of variables x ═ x1,x2,...,xp) And a plurality of variables y ═ y (y)1,y2,...,yq) The core idea of the correlation relationship is to find two groups of coefficients (a)1,a2,...,ap) And (b)1,b2,...,bq) So that the new variable u is a1x1+a2x2+...+apxpAnd v ═ b1y1+b2y2+...+bqyqGet the maximum possible correlation coefficient p betweenmax。ρmaxIt represents the correlation coefficient between the variable x and the variable y calculated by CCA. Since the alpha wave is mainly concentrated in the signal energy of certain frequencies, that is, the brain waveform mainly contains certain specific frequency signals, the correlation coefficient obtained by CCA calculation of the alpha wave and these signals is higher than that of a non-alpha wave by using sine and cosine signals of specific frequencies as reference signals. Therefore, the typical correlation analysis can be used as an effective means for alpha wave detection.
In summary, in the existing method for detecting the α wave, energy analysis is mainly used, and the determination is performed only after the signal energy continuously exceeds a certain threshold, and such methods require a long signal duration and are not suitable for rapid detection.
Disclosure of Invention
The invention aims to realize rapid and accurate electroencephalogram alpha wave detection and identification, and provides an electroencephalogram alpha wave detection and identification method which is high in detection and identification accuracy, high in operation speed and based on typical correlation analysis.
The invention relates to an electroencephalogram alpha wave detection and identification method based on canonical correlation analysis, which is characterized by comprising the following steps:
(1) inputting original electroencephalogram signals including electroencephalogram alpha wave signals and electroencephalogram non-alpha wave signals;
(2) preprocessing an original electroencephalogram signal: selecting data of four electroencephalogram signal channels of Cz, CPz, Pz and POz, performing band-pass filtering on the selected data at 0.5 Hz-30 Hz, segmenting the data, wherein the time length of each segment of data is t seconds, and obtaining a plurality of groups of preprocessed electroencephalogram signals X after segmentation, wherein each group of signals is a signal matrix consisting of 4 channels and t seconds; k groups of multi-group electroencephalogram signals X are taken as training data XtrainThe remainder is used as test data Xtest
(3) Selecting different frequency sets FrefAnd constructing reference signals corresponding to different frequencies: selecting a plurality of different frequencies from the frequency range of 8-13 Hz to form a different frequency set Fref(ii) a Constructing sets of different frequencies FrefReference signals corresponding to the respective frequencies;
(4) calculating correlation coefficients between the training data and corresponding reference signals of different frequencies: using canonical correlation analysis methods, training data X is calculatedtrainWith different frequency sets FrefThe correlation coefficients between the reference signals corresponding to all the frequencies in the set are recorded as a correlation coefficient set omega, and the number of elements in the correlation coefficient set omega and the different frequency sets FrefThe number of the middle elements is equal;
(5) and (3) selecting characteristic frequency by using classification accuracy: at different frequency sets FrefSelecting the characteristic frequency with high classification accuracy to obtain a characteristic frequency set F;
(6) selecting a correlation coefficient corresponding to the frequency in the characteristic frequency set F from the correlation coefficient set omega to form a classifier training characteristic set phi;
(7) training a classifier model: selecting an SVM as a classifier, and training the classifier by using a training feature set phi to obtain an electroencephalogram alpha wave signal and electroencephalogram non-alpha wave signal classification Model selected by feature frequency;
(8) calculating a test data feature set psi: constructing a reference signal Y corresponding to the frequency in the characteristic frequency set FFCalculating test data X by a canonical correlation analysis methodtestAnd a reference signal YFThe correlation coefficients of (a) form a test data feature set psi;
(9) SVM classification and recognition: carrying out SVM classification on the test data feature set psi obtained in the step (8), and using a classification Model of the electroencephalogram alpha wave signal and the electroencephalogram non-alpha wave signal selected through the feature frequency in the step (7) by using a classifier Model; finally, the test data X is identifiedtestThe electroencephalogram alpha wave signals and the electroencephalogram non-alpha wave signals.
The method can improve the speed and the accuracy of alpha wave detection and quickly detect whether the electroencephalogram signals are alpha wave signals.
Compared with the prior art, the method has the following advantages:
(1) the invention uses the electroencephalogram signals of four channels of Cz, CPz, Pz and POz, because the apical lobe and occipital lobe of the cerebral cortex are the areas with the most obvious characteristics of the electroencephalogram alpha wave signals, and the four channels of Cz, CPz, Pz and POz are just positioned on the apical lobe and the occipital lobe, the invention utilizes the four channels with more obvious characteristics to analyze, and can extract more effective characteristic information. Meanwhile, the electroencephalogram signal used by the invention has short time, and the electroencephalogram alpha wave signal can be rapidly detected and identified in a real-time brain-computer interface system.
(2) According to the method, frequency selection is carried out in a frequency band of 8-13 Hz according to a certain step length, a training set and a reference signal are subjected to typical correlation analysis, correlation coefficients obtained by the typical correlation analysis are used as training and testing samples, classification accuracy is calculated, and the frequency corresponding to the maximum part of accuracy is selected as characteristic frequency. The invention can select different characteristic frequencies for different tested persons. The frequency selection is carried out on the frequency band with the most concentrated energy of the electroencephalogram alpha wave signals according to a certain step length, so that the main frequency range of the electroencephalogram alpha wave signals can be covered, the selected frequency can be analyzed, and the calculated amount is reduced.
(3) The method further selects the characteristic frequency from the selected frequencies in the frequency band of 8-13 Hz to form a characteristic frequency set, the characteristic frequency set reflects the frequency position point with the most obvious difference between the electroencephalogram alpha wave signal and the electroencephalogram non-alpha wave signal of the tested person, the selection of the characteristic frequency set can better realize the detection and identification of the electroencephalogram alpha wave signal, and meanwhile, a plurality of correlation coefficients corresponding to a plurality of characteristic frequencies are combined to form classification characteristics, so that the classification accuracy can be obviously improved.
(4) The invention trains the classifier model by taking the correlation coefficient combination corresponding to the characteristic frequency as the training characteristic. And performing typical correlation analysis on the reference signal corresponding to the characteristic frequency and the test data to obtain a plurality of correlation coefficients. The phase relation arrays are combined to be used as test characteristics, the electroencephalogram alpha wave signals and electroencephalogram non-alpha wave signals are classified, false detection and missing detection caused by single characteristics can be avoided, and detection precision is improved.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a flow chart of the characteristic frequency selection of the present invention;
FIG. 3 is the characteristic parameter distribution of the alpha wave and non-alpha wave data segments after feature extraction;
FIG. 4 shows the classification accuracy obtained using the present invention for 10 test data.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and examples.
Example 1
At present, an energy analysis method is mainly used in electroencephalogram alpha wave detection and identification, and the electroencephalogram signal is considered to be an alpha wave signal after the amplitude of the electroencephalogram signal exceeds a threshold value within a period of time. Such methods require long signal durations and are not suitable for use in brain-computer interface systems where rapid detection and identification is required. The invention specially researches a electroencephalogram alpha wave detection and identification method based on typical correlation analysis, and the method is shown in figure 1 and comprises the following steps:
(1) the method comprises the steps of inputting original brain wave signals including brain wave alpha signals and brain wave non-alpha signals.
(2) Preprocessing an original electroencephalogram signal: selecting data of four electroencephalogram signal channels of Cz, CPz, Pz and POz, performing band-pass filtering on the selected data at 0.5 Hz-30 Hz, segmenting the data, wherein the time length of each segment of data is t seconds, and obtaining a plurality of groups of preprocessed electroencephalogram signals X after segmentation, wherein each group of signals is a signal matrix consisting of 4 channels and t seconds; k groups of multi-group electroencephalogram signals X are taken as training data XtrainThe remainder is used as test data Xtest
In the embodiment, the data of four channels of Cz, CPz, Pz and POz are subjected to band-pass filtering of 0.5 Hz-30 Hz, common filters such as a Butterworth filter and a Chebyshev filter can be selected as the filters, the filtered data are segmented, the time length of each segment of data is 1.5 seconds, a plurality of groups of preprocessed electroencephalogram signals X are obtained after segmentation, and each group of signals is a signal matrix consisting of 4 channels and 1.5 seconds; multiple groups of electroencephalogram signals XTake 300 groups as training data XtrainThe remainder is used as test data Xtest(ii) a In this example, the number of electroencephalogram alpha wave signals and electroencephalogram non-alpha wave signals in the training data is 150 groups respectively.
(3) Selecting different frequency sets FrefAnd constructing reference signals corresponding to different frequencies: the energy of the electroencephalogram alpha wave signals is mainly concentrated in the frequency band of 8-13 Hz; selecting a plurality of different frequencies from the frequency range of 8-13 Hz to form a different frequency set Fref(ii) a Constructing sets of different frequencies FrefReference signals corresponding to respective frequencies.
In this example, 26 different frequencies are selected to form a different frequency set Fref. The frequency selection is carried out in a frequency band with the most concentrated energy of the electroencephalogram alpha wave signals according to a certain step length, so that the main frequency range of the electroencephalogram alpha wave signals can be covered, the selected frequency can be analyzed, and the calculated amount is reduced.
(4) Calculating correlation coefficients between the training data and corresponding reference signals of different frequencies: using canonical correlation analysis methods, training data X is calculatedtrainWith different frequency sets FrefThe correlation coefficients between the reference signals corresponding to all the frequencies in the set are recorded as a correlation coefficient set omega, and the number of elements in the correlation coefficient set omega and the different frequency sets FrefThe number of the middle elements is equal;
the invention uses sine and cosine signals with different frequencies as reference signals, calculates the correlation coefficient of the electroencephalogram signal and the reference signals by using a typical correlation analysis method, and the size of different correlation coefficients can reflect the energy size corresponding to different frequencies in the electroencephalogram signal.
(5) And (3) selecting characteristic frequency by using classification accuracy: referring to FIG. 2, at different frequency sets FrefSelecting the characteristic frequency with high classification accuracy to obtain a characteristic frequency set F;
in this example at different frequency sets F ref10 characteristic frequencies are selected as the characteristic frequency set F. The characteristic frequency set reflects the frequency set with the maximum energy difference between the electroencephalogram alpha wave signal and the electroencephalogram non-alpha wave signal of the tested person.
(6) Selecting a correlation coefficient corresponding to the frequency in the characteristic frequency set F from the correlation coefficient set omega to form a classifier training characteristic set phi; energy information, frequency information and the like of the electroencephalogram alpha wave are fused in the training characteristic set phi.
(7) Training a classifier model: selecting an SVM as a classifier, and training the classifier by using a training feature set phi to obtain an electroencephalogram alpha wave signal and electroencephalogram non-alpha wave signal classification Model selected by feature frequency.
In the embodiment, the kernel function of the SVM classifier uses a radial basis kernel function, and by combining the step (2) of the embodiment, 300 groups of classifier training data are provided, wherein 150 groups of data represent electroencephalogram alpha wave signals, and the rest is data representing electroencephalogram non-alpha wave signals.
(8) Calculating a test data feature set psi: constructing a reference signal Y corresponding to the frequency in the characteristic frequency set FFCalculating test data X by a canonical correlation analysis methodtestAnd a reference signal YFThe correlation coefficients of (a) form a test data feature set psi; classification can be achieved quickly and accurately.
The invention constructs sine and cosine signals corresponding to the frequencies in the characteristic frequency set F, and combines the sine and cosine signals to obtain a reference signal YFThen the test data and the reference signal Y are comparedFAnd performing typical correlation analysis to obtain a feature set psi for detection and identification.
(9) SVM classification and recognition: carrying out SVM classification on the test data feature set psi obtained in the step (8), and using a classification Model of the electroencephalogram alpha wave signal and the electroencephalogram non-alpha wave signal selected through the feature frequency in the step (7) by using a classifier Model; finally, the test data X is identifiedtestThe electroencephalogram alpha wave signals and the electroencephalogram non-alpha wave signals.
In the present invention, the selection of the characteristic frequency is the most critical. The characteristic frequency set F reflects the frequency position with the most obvious difference between the electroencephalogram alpha wave signal and the electroencephalogram non-alpha wave signal of the tested person. The features finally used for training and actual classification are all correlation coefficients of the reference signals and the brain electrical signals corresponding to the feature frequencies. The selection of the characteristic frequency set F can better realize the detection and identification of the electroencephalogram alpha wave signals, and meanwhile, a plurality of characteristic frequencies correspond to a plurality of correlation coefficients to be combined to form classification characteristics, so that the classification accuracy can be obviously improved.
Example 2
The electroencephalogram alpha wave detection and identification method based on the typical correlation analysis is the same as that in the embodiment 1, the selection of different frequency sets and the construction of reference signals corresponding to different frequencies in the step (3) specifically comprise the following steps:
(3.1) selecting different frequency sets Fref: selecting frequencies at intervals of a certain step length delta within 8 Hz-13 Hz to obtain N frequencies, namely N is (13-8)/delta +1 is 5/delta +1, and N frequencies are combined to form different frequency sets Fref
In this example, the step δ is selected to be 0.2Hz, and N ═ 13-8)/0.2+1 ═ 5/0.2+1 ═ 26, so the different frequency set F is differentrefConsists of 26 frequencies.
(3.2) constructing reference signals corresponding to different frequencies: for different frequency sets FrefFrequency f iniStructure fiCorresponding sine and cosine reference signals
Figure BDA0001569694160000078
The construction method comprises the following steps:
construction of the sinusoidal Signal sin (2 π f)it) and cosine signal cos (2 π f)it), wherein t is the length of the electroencephalogram signal X, and the sine signal and the cosine signal are combined to obtain a reference signal as follows:
Figure BDA0001569694160000071
because the waveform of the electroencephalogram alpha wave signal is similar to a sine wave, the method uses sine and cosine signal combination as a reference signal, and can accurately represent the waveform rule of the electroencephalogram alpha wave signal.
Example 3
The electroencephalogram alpha wave detection and identification method based on typical correlation analysis is the same as that in embodiments 1-2, and the characteristic frequency selection in the step (5) is described in reference to fig. 2, and particularly the last three steps in fig. 2 are concerned, and specifically the method comprises the following steps:
(5.1) calculation ofSame frequency set FrefMiddle frequency fiCorresponding classification accuracy
Figure BDA0001569694160000072
Extracting frequency f from correlation coefficient set omegaiTaking a part of the corresponding correlation coefficients as training samples and the other part of the correlation coefficients as test samples, and using a Support Vector Machine (SVM) to measure the frequency fiTraining and testing the corresponding correlation coefficient to obtain the frequency fiCorresponding classification accuracy
Figure BDA0001569694160000073
In this example, the set of frequencies FrefThe number of medium frequencies is 26, fiCorresponding classification accuracy
Figure BDA0001569694160000074
Extracting a correlation coefficient corresponding to the frequency of 8Hz from the correlation coefficient set omega, taking the first 60% of the correlation coefficient as a training sample, taking the remaining 40% of the correlation coefficient as a test sample, and training and testing the correlation coefficient corresponding to the frequency of 8Hz by using a Support Vector Machine (SVM) to obtain the classification accuracy corresponding to the frequency of 8Hz
Figure BDA0001569694160000075
Referring to fig. 2, frequency f is calculated1Corresponding correlation coefficient
Figure BDA0001569694160000076
Obtaining the frequency f through training test1Corresponding classification accuracy
Figure BDA0001569694160000077
(5.2) calculation of FrefThe classification accuracy corresponding to all frequencies: for different frequency sets FrefRepeating step (5.1) at all frequencies to obtain FrefThe classification accuracy corresponding to all frequencies in the system is 26.
(5.3) selecting characteristic frequency: selecting accuracy from all accuracy ratesThe first 10 of the maximum rate, at FrefFinding out 10 frequencies corresponding to the former 10 accuracy rates to obtain characteristic frequencies; the set of characteristic frequencies is formed by F ═ F1,f2,...,f10) And (4) showing.
The invention firstly puts FrefMiddle frequency fiSelecting a part of the corresponding correlation coefficients as a training sample and a part of the corresponding correlation coefficients as a test sample to obtain the frequency fiCorresponding classification accuracy. The higher the accuracy is, the more obvious the difference between the electroencephalogram alpha wave signal and the electroencephalogram non-alpha wave at the frequency is represented, and the frequency corresponding to a part with the highest accuracy is selected as the characteristic frequency, so that the more effective classification characteristic can be provided for the next step of distinguishing the electroencephalogram alpha wave signal from the electroencephalogram non-alpha wave.
Example 4
The electroencephalogram alpha wave detection and identification method based on the typical correlation analysis is the same as that in the embodiments 1-3, and the calculation of the test data feature set in the step (8) specifically comprises the following steps:
(8.1) constructing a reference signal corresponding to the characteristic frequency: and (4) constructing reference signals corresponding to the frequencies in the characteristic frequency set F by using the construction method in the step (3.2), wherein the number of the reference signals is M.
In this example, there are 8 selected eigenfrequencies, so the number of reference signals corresponding to each frequency in the eigenfrequency set F is also 8.
(8.2) classification feature extraction: test data XtestAnd (4) performing typical correlation analysis on the M reference signals corresponding to the characteristic frequency constructed in the step (8.1) to obtain M correlation coefficients, forming a test data characteristic set psi, and taking psi as a classification characteristic set.
In this example, test data XtestAnd (3) performing typical correlation analysis on 8 reference signals corresponding to the characteristic frequency constructed in the step (8.1) to obtain 8 correlation coefficients to form a set psi, and using the psi as a classification characteristic set, namely 8 characteristics for classification.
The steps (8) to (9) of the invention mainly realize the feature extraction of the test data, verify the classification method and ensure the reliability of the technical scheme.
The invention is further illustrated by the following example in a more detailed form.
Example 5
The electroencephalogram alpha wave detection and identification method based on typical correlation analysis is the same as the embodiments 1-4, and the steps of the method are as follows with reference to the attached figure 1.
Step 1, preprocessing electroencephalogram data.
Selecting data of four channels of Cz, CPz, Pz and POz, then carrying out band-pass filtering on the data at 0.5 Hz-30 Hz, and selecting a Butterworth filter as the filter; and then segmenting the filtered data, wherein the time length of each segment is 1s, and obtaining 600 groups of preprocessed electroencephalogram signals. 200 of the groups were selected as training data XtrainAnd the remaining 400 groups were used as test data Xtest. The quantity of electroencephalogram alpha wave signals in the training data is 100 groups, and electroencephalogram non-alpha wave signals are 100 groups. The number of electroencephalogram alpha wave signals in the test data is 200 groups, and the number of electroencephalogram non-alpha wave signals in the test data is 200 groups.
And 2, selecting a part of frequencies in the frequency range of 8 Hz-13 Hz by using the correlation coefficient obtained by typical correlation analysis as a characteristic, and selecting the characteristic frequency.
The following describes the frequency selection and characteristic frequency selection with reference to fig. 2:
firstly, extracting frequencies at intervals of 0.1Hz in a frequency range of 8-13 Hz to obtain different frequency sets Fref,FrefThe number of elements N is (13-8)/0.1+1 is 5/0.1+1 is 51.
Secondly, constructing a sine signal sin (2 pi f) with the length t same as the length of the segmented electroencephalogram signal Xit) and cosine signal cos (2 π f)it), the reference signals are combined as follows:
Figure BDA0001569694160000091
the length t in this example is 1 second.
Thirdly, training data XtrainAnd frequency fiReference signal of
Figure BDA0001569694160000092
Performing canonical correlation analysis to obtain frequency fiThe number of corresponding correlation coefficients is 200.
Fourthly, taking the correlation coefficient obtained in the third step as a characteristic, taking 70 percent (140) as training samples, taking the rest 30 percent (60) as test samples, training and testing by using an SVM classifier, and calculating fiCorresponding classification accuracy.
The fifth step, for different frequency sets FrefRepeating the third and fourth steps at other frequencies to obtain FrefThe classification accuracy corresponding to all frequencies.
Sixth step, from FrefThe first 20 frequencies which enable the classification accuracy to be maximum are selected as characteristic frequencies, and the characteristic frequencies are combined to obtain a characteristic frequency set F ═ (F ═1,f2,...,f20)。
And 3, combining the correlation coefficients corresponding to each frequency in the characteristic frequency set F to serve as the characteristics for training the classifier, namely obtaining 200 groups of characteristics for training, wherein each group of characteristics comprises 20 characteristics.
And 4, performing classifier training by using the 200 groups of characteristics obtained in the step 3 to obtain a classification model for classifying electroencephalogram alpha wave signals and electroencephalogram non-alpha wave signals. The classifier selects an SVM classifier, and the kernel function selects a radial basis kernel function.
Step 5, extracting the characteristics of the test data, which is specifically described as follows:
firstly, constructing sine and cosine reference signals corresponding to each frequency in a characteristic frequency set F;
and secondly, performing typical correlation analysis on each group of test data and the reference signal corresponding to each frequency in the characteristic frequency set F to obtain 400 groups of characteristics for testing, wherein each group of characteristics has 20 characteristics.
And 6, classifying the 400 groups of test features by using an SVM classifier to obtain a classification result. The classification model of the SVM classifier uses the classification model obtained in the step 4 and used for classifying electroencephalogram alpha wave signals and electroencephalogram non-alpha wave signals, and the kernel function of the classifier uses a radial basis kernel function.
According to the method, frequency selection is carried out in a frequency band of 8-13 Hz according to a certain step length, a training set and a reference signal are subjected to typical correlation analysis, correlation coefficients obtained by the typical correlation analysis are used as training and testing samples, classification accuracy is calculated, and the frequency corresponding to the maximum part of accuracy is selected as characteristic frequency. The characteristic frequency set reflects the frequency set with the maximum energy difference between the electroencephalogram alpha wave signal and the electroencephalogram non-alpha wave signal of the tested person. The invention can select different characteristic frequencies for different tested persons. The frequency selection is carried out on the frequency band with the most concentrated energy of the electroencephalogram alpha wave signals according to a certain step length, so that the main frequency range of the electroencephalogram alpha wave signals can be covered, the selected frequency can be analyzed, and the calculated amount is reduced.
The effects of the present invention can be further explained by the following experiments.
Example 6
The electroencephalogram alpha wave detection and identification method based on the typical correlation analysis is the same as the embodiments 1-5,
1. the experimental conditions are as follows:
the sampling rate of the used brain electrical signals is 1024Hz, the total number of the segmented brain electrical data is 600 groups, wherein 200 groups of training data are obtained, and the remaining 400 groups of testing data are obtained. The electroencephalogram alpha wave and electroencephalogram non-alpha wave signals in the training data and the test data respectively account for half. The invention uses MATLAB software to calculate on an operating system with a central processing unit of Intel (R) Core i 7-21003.10 GHZ and a memory of 4G, WINDOWS 7.
2. Simulation content:
after feature extraction, the alpha wave and non-alpha wave features are averaged at corresponding feature points to obtain feature distribution as shown in fig. 3, fig. 3 is a feature parameter distribution graph obtained by the invention, the abscissa represents 20 feature point positions, the ordinate represents the average value of 100 groups of feature values at each feature point position after feature extraction, the solid line represents the feature distribution of electroencephalogram alpha waves, and the dotted line represents the feature distribution of electroencephalogram non-alpha wave signals.
As can be seen from the graph 3, the difference of the characteristics of the electroencephalogram alpha wave signals and the electroencephalogram non-alpha wave signals after characteristic extraction is large in numerical value, the characteristics are obviously distinguished, and the detection and identification accuracy is high.
Example 7
The electroencephalogram alpha wave detection and identification method based on typical correlation analysis is the same as the embodiments 1-5, the experimental conditions and the simulation contents are the same as the embodiment 6,
referring to fig. 4, fig. 4 shows the classification accuracy of 10 tested subjects obtained by the test of the present invention, wherein the abscissa represents the test number and the ordinate represents the percentage of the classification accuracy.
As can be seen from fig. 4, the classification accuracy of most of the tested samples is above 90%, wherein the classification accuracy of the tested sample 8 is 100%. The calculation can obtain that the average classification accuracy of 10 tested samples is 95.125%, the classification effect is obvious, the method provided by the invention is stable and reliable in work, and the detection and identification accuracy is high.
In summary, the electroencephalogram alpha wave detection and identification method based on the typical correlation analysis disclosed by the invention solves the problem of quickly and efficiently detecting and identifying electroencephalogram alpha wave signals, and the main steps comprise: (1) inputting an electroencephalogram signal; (2) preprocessing the electroencephalogram signals to obtain training data and test data; (3) selecting different frequency sets, and constructing reference signals corresponding to different frequencies; (4) calculating correlation coefficients between the training data and corresponding reference signals of different frequencies to form a correlation coefficient set; (5) selecting characteristic frequency by using classification accuracy to obtain a characteristic frequency set; (6) selecting a correlation coefficient corresponding to the frequency in the characteristic frequency set from the correlation coefficient set to form a classifier training characteristic set; (7) training a classifier by using a classifier training feature set to obtain a classifier model; (8) calculating a test data feature set; (9) and (4) carrying out classification recognition by using SVM. The invention can improve the precision and accuracy of alpha wave detection, has stable work and can quickly detect whether the electroencephalogram signal is an alpha wave signal.
The invention selects the characteristic frequency through typical correlation analysis, further performs typical correlation analysis on the reference signal corresponding to the characteristic frequency and the electroencephalogram signal, and uses the obtained correlation coefficient as the detection identification characteristic, thereby improving the speed and the accuracy of alpha wave detection, realizing the rapid detection of whether the electroencephalogram signal is the alpha wave signal, and having important significance in signal detection in a brain-computer interface system based on the electroencephalogram alpha wave signal.

Claims (4)

1. A electroencephalogram alpha wave detection and identification method based on canonical correlation analysis is characterized by comprising the following steps:
(1) inputting original electroencephalogram signals including electroencephalogram alpha wave signals and electroencephalogram non-alpha wave signals;
(2) preprocessing an original electroencephalogram signal: selecting data of four electroencephalogram signal channels of Cz, CPz, Pz and POz, performing band-pass filtering on the selected data at 0.5 Hz-30 Hz, segmenting the data, wherein the time length of each segment of data is t seconds, and obtaining a plurality of groups of preprocessed electroencephalogram signals X after segmentation, wherein each group of signals is a signal matrix consisting of 4 channels and t seconds; k groups of multi-group electroencephalogram signals X are taken as training data XtrainThe remainder is used as test data Xtest
(3) Selecting different frequency sets FrefAnd constructing reference signals corresponding to different frequencies: selecting a plurality of different frequencies from the frequency range of 8-13 Hz to form a different frequency set Fref(ii) a Constructing sets of different frequencies FrefReference signals corresponding to the respective frequencies;
(4) calculating correlation coefficients between the training data and corresponding reference signals of different frequencies: using canonical correlation analysis methods, training data X is calculatedtrainWith different frequency sets FrefThe correlation coefficients between the reference signals corresponding to all the frequencies in the set are recorded as a correlation coefficient set omega, and the number of elements in the correlation coefficient set omega and the different frequency sets FrefThe number of the middle elements is equal;
(5) and (3) selecting characteristic frequency by using classification accuracy: at different frequency sets FrefSelecting the characteristic frequency with high classification accuracy to obtain a characteristic frequency set F;
(6) selecting a correlation coefficient corresponding to the frequency in the characteristic frequency set F from the correlation coefficient set omega to form a classifier training characteristic set phi;
(7) training a classifier model: selecting an SVM as a classifier, and training the classifier by using a training feature set phi to obtain an electroencephalogram alpha wave signal and electroencephalogram non-alpha wave signal classification Model selected by feature frequency;
(8) calculating a test data feature set psi: constructing a reference signal Y corresponding to the frequency in the characteristic frequency set FFCalculating test data X by a canonical correlation analysis methodtestAnd a reference signal YFThe correlation coefficients of (a) form a test data feature set psi;
(9) SVM classification and recognition: carrying out SVM classification on the test data feature set psi obtained in the step (8), and using a classification Model of the electroencephalogram alpha wave signal and the electroencephalogram non-alpha wave signal selected through the feature frequency in the step (7) by using a classifier Model; finally, the test data X is identifiedtestThe electroencephalogram alpha wave signals and the electroencephalogram non-alpha wave signals.
2. The electroencephalogram alpha wave detection and identification method based on the canonical correlation analysis according to claim 1, wherein the selecting different frequency sets and constructing reference signals corresponding to different frequencies in the step (3) specifically include the following:
(3.1) selecting different frequency sets Fref: selecting frequencies at intervals of a certain step length delta within 8 Hz-13 Hz to obtain N frequencies, namely N is (13-8)/delta +1 is 5/delta +1, and N frequencies are combined to form different frequency sets Fref
(3.2) constructing reference signals corresponding to different frequencies: for different frequency sets FrefFrequency f iniStructure fiCorresponding sine and cosine reference signals
Figure FDA0001569694150000022
The construction method comprises the following steps:
construction of the sinusoidal Signal sin (2 π f)it) and cosine signal cos (2 π f)it), wherein t is the length of the electroencephalogram signal X, and the sine signal and the cosine signal are combined to obtain a reference signal as follows:
Figure FDA0001569694150000021
3. the electroencephalogram alpha wave detection and identification method based on the canonical correlation analysis according to claim 1, wherein the characteristic frequency selection in the step (5) specifically includes the following steps:
(5.1) calculating the different frequency sets FrefMiddle frequency fiCorresponding classification accuracy
Figure FDA0001569694150000023
Extracting frequency f from correlation coefficient set omegaiTaking a part of the corresponding correlation coefficients as training samples and the other part of the correlation coefficients as test samples, and using a Support Vector Machine (SVM) to measure the frequency fiTraining and testing the corresponding correlation coefficient to obtain the frequency fiCorresponding classification accuracy
Figure FDA0001569694150000024
(5.2) calculation of FrefThe classification accuracy corresponding to all frequencies: for different frequency sets FrefRepeating step (5.1) at all frequencies to obtain FrefThe classification accuracy corresponding to all the frequencies is N in total;
(5.3) selecting characteristic frequency: selecting the first M (M is less than or equal to N) with the maximum accuracy from all the accuracy, and selecting the first M with the maximum accuracy at FrefFinding out M frequencies corresponding to the previous M accuracy rates to obtain characteristic frequencies; the set of characteristic frequencies is formed by F ═ F1,f2,...,fM) And (4) showing.
4. The electroencephalogram alpha wave detection and identification method based on canonical correlation analysis according to claim 1, wherein the computing of the test data feature set in the step (8) specifically includes the following steps:
(8.1) constructing a reference signal corresponding to the characteristic frequency: constructing reference signals corresponding to all frequencies in the characteristic frequency set F by using the construction method in the step (3.2), wherein the number of the reference signals is M;
(8.2) Classification feature extraction: test data XtestAnd (3) performing typical correlation analysis on the M reference signals corresponding to the characteristic frequencies constructed in the step (8.1) to obtain M correlation coefficients, forming a set psi, and taking the psi as a classification characteristic set.
CN201810112601.XA 2018-02-05 2018-02-05 Electroencephalogram alpha wave detection and identification method based on canonical correlation analysis Active CN108388846B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810112601.XA CN108388846B (en) 2018-02-05 2018-02-05 Electroencephalogram alpha wave detection and identification method based on canonical correlation analysis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810112601.XA CN108388846B (en) 2018-02-05 2018-02-05 Electroencephalogram alpha wave detection and identification method based on canonical correlation analysis

Publications (2)

Publication Number Publication Date
CN108388846A CN108388846A (en) 2018-08-10
CN108388846B true CN108388846B (en) 2021-06-08

Family

ID=63075023

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810112601.XA Active CN108388846B (en) 2018-02-05 2018-02-05 Electroencephalogram alpha wave detection and identification method based on canonical correlation analysis

Country Status (1)

Country Link
CN (1) CN108388846B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109784027B (en) * 2019-01-11 2022-03-22 西安电子科技大学 Identity verification method based on dual electroencephalogram signal characteristics
CN111078001B (en) * 2019-11-20 2023-04-14 浙江传媒学院 Error suppression brain-computer interface method based on alpha wave

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159086A (en) * 2007-11-22 2008-04-09 中国人民解放军国防科学技术大学 Calling device based on brain electric information demodulation
CN101843491A (en) * 2010-06-07 2010-09-29 天津大学 Resting electroencephalogram identification method based on bilinear model
CN101862194A (en) * 2010-06-17 2010-10-20 天津大学 Imagination action EEG identification method based on fusion feature
CN102866775A (en) * 2012-09-04 2013-01-09 同济大学 System and method for controlling brain computer interface (BCI) based on multimode fusion
CN103699226A (en) * 2013-12-18 2014-04-02 天津大学 Tri-modal serial brain-computer interface method based on multi-information fusion
CN103971124A (en) * 2014-05-04 2014-08-06 杭州电子科技大学 Multi-class motor imagery brain electrical signal classification method based on phase synchronization
CN104700119A (en) * 2015-03-24 2015-06-10 北京机械设备研究所 Brain electrical signal independent component extraction method based on convolution blind source separation
CN105549743A (en) * 2016-01-18 2016-05-04 中国医学科学院生物医学工程研究所 Robot system based on brain-computer interface and implementation method
WO2016190428A1 (en) * 2015-05-28 2016-12-01 国立研究開発法人理化学研究所 Determination device, determination method, program, and information storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101159086A (en) * 2007-11-22 2008-04-09 中国人民解放军国防科学技术大学 Calling device based on brain electric information demodulation
CN101843491A (en) * 2010-06-07 2010-09-29 天津大学 Resting electroencephalogram identification method based on bilinear model
CN101862194A (en) * 2010-06-17 2010-10-20 天津大学 Imagination action EEG identification method based on fusion feature
CN102866775A (en) * 2012-09-04 2013-01-09 同济大学 System and method for controlling brain computer interface (BCI) based on multimode fusion
CN103699226A (en) * 2013-12-18 2014-04-02 天津大学 Tri-modal serial brain-computer interface method based on multi-information fusion
CN103971124A (en) * 2014-05-04 2014-08-06 杭州电子科技大学 Multi-class motor imagery brain electrical signal classification method based on phase synchronization
CN104700119A (en) * 2015-03-24 2015-06-10 北京机械设备研究所 Brain electrical signal independent component extraction method based on convolution blind source separation
WO2016190428A1 (en) * 2015-05-28 2016-12-01 国立研究開発法人理化学研究所 Determination device, determination method, program, and information storage medium
CN105549743A (en) * 2016-01-18 2016-05-04 中国医学科学院生物医学工程研究所 Robot system based on brain-computer interface and implementation method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"基于典型相关分析的眼动辅助脑电假手动作识别方法研究";孙曜等;《航天医学与医学工程》;20110430;第24卷(第2期);第128-133页 *
Jesus Sagah'on-Az'ua等."Comparison between the Canonical Correlation Analysis and the Support Vector Machines as classification algorithms in an SSVEP-based Brain-Computer Interface".《2017 14th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE)》.2017, *

Also Published As

Publication number Publication date
CN108388846A (en) 2018-08-10

Similar Documents

Publication Publication Date Title
CN110338786B (en) Epileptic discharge identification and classification method, system, device and medium
CN107095669B (en) A kind of processing method and system of epileptic's EEG signals
CN110353702A (en) A kind of emotion identification method and system based on shallow-layer convolutional neural networks
CN104173064B (en) Lie detecting method based on analysis of heart rate variability and device of detecting a lie
Gath et al. Computerized method for scoring of polygraphic sleep recordings
CN101987017A (en) Electroencephalo-graph (EEG) signal identification and detection method for measuring alertness of driver
CN105320969A (en) A heart rate variability feature classification method based on multi-scale Renyi entropy
EP3226751A1 (en) Sleep profiling system with feature generation and auto-mapping
CN108388846B (en) Electroencephalogram alpha wave detection and identification method based on canonical correlation analysis
CN108344922B (en) Power transmission line direct lightning strike fault identification method based on phase classification and S transformation
CN111000555B (en) Training data generation method, automatic recognition model modeling method and automatic recognition method for epileptic electroencephalogram signals
CN108937916A (en) A kind of electrocardiograph signal detection method, device and storage medium
CN112674782B (en) Device and method for detecting epileptic-like electrical activity of epileptic during inter-seizure period
CN115563484A (en) Street greening quality detection method based on physiological awakening identification
CN113951903B (en) High-speed railway dispatcher overload state identification method based on electroencephalogram data determination
CN112057087B (en) Autonomic nerve function data processing method and device for high-risk schizophrenic people
CN111067513B (en) Sleep quality detection key brain area judgment method based on characteristic weight self-learning
CN114391846A (en) Emotion recognition method and system based on filtering type feature selection
CN111783715A (en) Identity recognition method based on pulse signal feature extraction
CN112617851A (en) Mental load classification method and system based on electrocardiosignals
CN109567832A (en) A kind of method and system of the angry driving condition of detection based on Intelligent bracelet
CN111603158A (en) Fatigue driving warning method and system based on electrophysiological signal artificial intelligence analysis
CN109858511A (en) The semi-supervised learning machine classification method that transfinites of safety indicated based on collaboration
Sun et al. A practical cross-domain ECG biometric identification method
CN111616680A (en) Automatic mental load identification method and system

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