CN117349603B - Adaptive noise reduction method and device for electroencephalogram signals, equipment and storage medium - Google Patents

Adaptive noise reduction method and device for electroencephalogram signals, equipment and storage medium Download PDF

Info

Publication number
CN117349603B
CN117349603B CN202311663907.1A CN202311663907A CN117349603B CN 117349603 B CN117349603 B CN 117349603B CN 202311663907 A CN202311663907 A CN 202311663907A CN 117349603 B CN117349603 B CN 117349603B
Authority
CN
China
Prior art keywords
signal
electroencephalogram
time
covariance matrix
noise reduction
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
CN202311663907.1A
Other languages
Chinese (zh)
Other versions
CN117349603A (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.)
Xiaozhou Technology Co ltd
Original Assignee
Xiaozhou Technology Co ltd
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 Xiaozhou Technology Co ltd filed Critical Xiaozhou Technology Co ltd
Priority to CN202311663907.1A priority Critical patent/CN117349603B/en
Publication of CN117349603A publication Critical patent/CN117349603A/en
Application granted granted Critical
Publication of CN117349603B publication Critical patent/CN117349603B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/10Pre-processing; Data cleansing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • G06F18/2135Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on approximation criteria, e.g. principal component analysis
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H21/00Adaptive networks
    • H03H21/0012Digital adaptive filters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/02Preprocessing
    • G06F2218/04Denoising
    • G06F2218/06Denoising by applying a scale-space analysis, e.g. using wavelet analysis
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The invention belongs to the technical field of signal processing, and discloses a self-adaptive noise reduction method, device, equipment and storage medium for electroencephalogram signals.

Description

Adaptive noise reduction method and device for electroencephalogram signals, equipment and storage medium
Technical Field
The invention belongs to the technical field of signal processing, and particularly relates to a self-adaptive noise reduction method, device, equipment and storage medium for electroencephalogram signals.
Background
The brain electrical signal contains rich brain activity information, and the analysis of the brain electrical signal can realize the monitoring of the states of the intention, emotion and the like of the person, and is applied to the fields of brain-computer interfaces, medical diagnosis and the like. However, the electroencephalogram signals are extremely susceptible to physiological noise such as eye movement and myoelectricity in a complex environment and external electromagnetic noise, and high background noise exists. The original brain electrical signal containing noise is directly analyzed, and the result accuracy is poor.
In order to improve the accuracy of the EEG signal analysis, effective noise reduction processing is needed to be carried out on the signals so as to improve the signal to noise ratio of the EEG signal in a complex environment. Conventional signal noise reduction methods include wavelet transform, autoregressive model, etc., and further, some methods for noise reduction by combining wavelet transform with adaptive filtering algorithm have been proposed in the prior art. However, in practice, it is found that the existing methods have a common noise reduction effect on brain-computer signals containing complex noise, and it is difficult to effectively recover the signal fine features required by brain-computer interaction, so that accurate analysis and interactive application on the brain-computer signals cannot be realized.
Disclosure of Invention
The invention aims to provide a self-adaptive noise reduction method, device, equipment and storage medium for an electroencephalogram signal, which can greatly improve the pertinence of self-adaptive noise reduction, more accurately eliminate background noise, effectively reserve key characteristics of the electroencephalogram signal and further improve the self-adaptive noise reduction effect of the electroencephalogram signal.
The first aspect of the invention discloses a self-adaptive noise reduction method for an electroencephalogram signal, which comprises the following steps:
acquiring an electroencephalogram signal of a user;
performing spatial filtering processing on the user brain electrical signal to obtain a first filtering signal;
constructing a spatial covariance matrix according to the first filtering signal, wherein the spatial covariance matrix is used for reflecting the statistical correlation of signals among different sensors in the sensor array;
performing eigenvalue decomposition on the space covariance matrix to extract a first principal component vector;
according to the first principal component vector and the user brain electrical signal, a second filtering signal is obtained through reconstruction;
extracting a plurality of signal segments according to the second filtering signal;
determining a target signal segment from a plurality of signal segments;
calculating state covariance matrixes in different time windows according to the target signal segments, wherein the state covariance matrixes are used for reflecting statistical correlation of the same sensor at different times;
performing eigenvalue decomposition on the state covariance matrix to extract a second principal component vector;
according to the target signal segment and the second principal component vector, performing parameter optimization on the adaptive filter to obtain an optimized filter coefficient vector;
And carrying out noise reduction processing on the target signal segment according to the filter coefficient vector.
In some embodiments, constructing a spatial covariance matrix from the first filtered signal comprises:
dividing the first filtered signal into a plurality of time periods of a specified length;
calculating a linear correlation matrix of each time period according to the sensor array;
and averaging according to the linear correlation matrixes of a plurality of time periods to obtain an average correlation matrix as a space covariance matrix.
In some embodiments, extracting a plurality of signal segments from the second filtered signal includes:
performing Fourier transform on the second filtering signal to obtain a plurality of electroencephalogram spectrums, and performing cluster classification on the plurality of electroencephalogram spectrums to obtain a plurality of spectrum clusters;
counting energy values on each frequency point of each electroencephalogram spectrum in each spectrum cluster, and determining a frequency range formed by frequency points with energy values larger than a specified threshold value as a main energy concentration interval of the spectrum cluster;
extracting a plurality of representative frequency points in a main energy concentration interval of each spectrum cluster to be used as characteristic frequency points of each spectrum cluster;
Determining the start-stop frequency of each brain electrical rhythm according to the characteristic frequency point of each frequency spectrum cluster and the corresponding energy value thereof;
and extracting signal segments corresponding to the brain electric rhythms from the second filtering signals according to the start-stop frequency of the brain electric rhythms.
In some embodiments, determining a target signal segment from a plurality of the signal segments includes:
calculating the power spectrum characteristics of each signal segment, and inquiring and matching through a characteristic sample library to obtain a cognitive sub-state corresponding to each signal segment;
acquiring a current operation time length, determining a time length interval to which the current operation time length belongs, and calling a current cognitive state corresponding to the time length interval;
and screening target signal segments of which the cognitive sub-states accord with the current cognitive states from a plurality of signal segments.
In some embodiments, calculating the state covariance matrix for different time windows from the target signal segments comprises:
acquiring an amplitude time sequence of the target signal segment, wherein the amplitude time sequence is used for reflecting the characteristic of the change of the amplitude of the target signal segment along with time;
performing polynomial curve fitting on the amplitude time sequence to obtain a change trend function of the amplitude;
Carrying out residual calculation on the amplitude time sequence and the change trend function to obtain a residual time sequence;
sliding in the residual time sequence by adopting a sliding window, and calculating the state covariance matrix of each time window according to residual samples in the time window after each sliding.
In some embodiments, parameter optimization is performed on the adaptive filter according to the target signal segment and the second principal component vector to obtain an optimized filter coefficient vector, including:
determining a state function of the target signal segment;
and inputting the state function into an adaptive filter, and carrying out parameter optimization on the adaptive filter by taking the second principal component vector as a reference to obtain an optimized filter coefficient vector.
In some embodiments, inputting the state function into an adaptive filter, performing parameter optimization on the adaptive filter with the second principal component vector as a reference, and obtaining an optimized filter coefficient vector, including:
inputting the state function into an adaptive filter to obtain an output signal of the adaptive filter;
calculating the mean square error of the output signal and the state function;
And iteratively updating parameters of the adaptive filter in a negative gradient direction by taking the second principal component vector as a reference until the mean square error is smaller than a specified error or reaches the preset iteration number to obtain an optimized filter coefficient vector.
The second aspect of the present invention discloses an adaptive noise reduction device for an electroencephalogram signal, comprising:
the preprocessing unit is used for acquiring the brain electrical signals of the user; performing spatial filtering processing on the user brain electrical signal to obtain a first filtering signal;
the construction unit is used for constructing a spatial covariance matrix according to the first filtering signal, wherein the spatial covariance matrix is used for reflecting the statistical correlation of signals among different sensors in the sensor array;
the first decomposition unit is used for carrying out eigenvalue decomposition on the space covariance matrix so as to extract and obtain a first principal component vector;
the reconstruction unit is used for reconstructing to obtain a second filtering signal according to the first principal component vector and the user electroencephalogram signal;
the extraction unit is used for extracting a plurality of signal segments according to the second filtering signal;
a determining unit, configured to determine a target signal segment from a plurality of signal segments;
The calculating unit is used for calculating state covariance matrixes in different time windows according to the target signal segments, wherein the state covariance matrixes are used for reflecting the statistical correlation of the same sensor in different time;
the second decomposition unit is used for carrying out eigenvalue decomposition on the state covariance matrix so as to extract and obtain a second principal component vector;
the optimizing unit is used for carrying out parameter optimization on the adaptive filter according to the target signal segment and the second principal component vector to obtain an optimized filter coefficient vector;
and the noise reduction processing unit is used for carrying out noise reduction processing on the target signal segment according to the filter coefficient vector.
A third aspect of the invention discloses an electronic device comprising a memory storing executable program code and a processor coupled to the memory; the processor invokes the executable program code stored in the memory for performing the adaptive noise reduction method of the electroencephalogram signal disclosed in the first aspect.
A fourth aspect of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program causes a computer to execute the adaptive noise reduction method of an electroencephalogram signal disclosed in the first aspect.
The method has the advantages that the spatial covariance matrix used for reflecting the statistical correlation of signals among different sensors in the sensor array is constructed, eigenvalue decomposition is carried out on the spatial covariance matrix to extract and obtain a first principal component vector, a second filtering signal is obtained according to the first principal component vector and the reconstruction of the electroencephalogram signals of users, the spatial distribution characteristics of the electroencephalogram signals can be considered, the state covariance matrix in different time windows is calculated according to target signal segments in the second filtering signal, the state covariance matrix is used for reflecting the statistical correlation of the same sensor in different time, the time statistical characteristics of the electroencephalogram signals can be considered at the same time, based on the fact, the second principal component vector is extracted according to the state covariance matrix, the parameter optimization is carried out on the adaptive filter according to the target signal segments, the optimized filter coefficient vector is obtained, the noise reduction treatment is carried out on the target signal segments, the pertinence of the adaptive noise reduction can be greatly improved, the background noise is eliminated more accurately, the key characteristics of the electroencephalogram signals are effectively reserved, and the adaptive noise reduction effect of the electroencephalogram signals is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles and effects of the invention.
Unless specifically stated or otherwise defined, the same reference numerals in different drawings denote the same or similar technical features, and different reference numerals may be used for the same or similar technical features.
Fig. 1 is a flowchart of an adaptive noise reduction method for an electroencephalogram signal according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an adaptive noise reduction device for electroencephalogram signals according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Reference numerals illustrate:
201. a preprocessing unit; 202. a construction unit; 203. a first decomposition unit; 204. a reconstruction unit; 205. an extraction unit; 206. a determination unit; 207. a calculation unit; 208. a second decomposition unit; 209. an optimizing unit; 210. a noise reduction processing unit; 301. a memory; 302. a processor.
Detailed Description
Unless defined otherwise or otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art. In the context of a realistic scenario in connection with the technical solution of the invention, all technical and scientific terms used herein may also have meanings corresponding to the purpose of the technical solution of the invention. The terms "first and second …" are used herein merely for distinguishing between names and not for describing a particular number or order. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
It will be understood that when an element is referred to as being "fixed" to another element, it can be directly fixed to the other element or intervening elements may also be present; when an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present; when an element is referred to as being "mounted to" another element, it can be directly mounted to the other element or intervening elements may also be present. When an element is referred to as being "disposed on" another element, it can be directly on the other element or intervening elements may also be present.
As used herein, unless specifically stated or otherwise defined, "the" means that the feature or technical content mentioned or described before in the corresponding position may be the same or similar to the feature or technical content mentioned. Furthermore, the terms "comprising," "including," and "having," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
The embodiment of the invention discloses a self-adaptive noise reduction method for an electroencephalogram signal, which can be realized through computer programming. The execution main body of the method can be electronic equipment such as a computer, a notebook computer, a tablet computer and the like, or an adaptive noise reduction device of an electroencephalogram signal embedded in the electronic equipment, and the invention is not limited to the above. In order that the invention may be readily understood, a more particular description of specific embodiments thereof will be rendered by reference to specific embodiments that are illustrated in the appended drawings.
As shown in FIG. 1, the method comprises the following steps 110-190:
110. and acquiring a user electroencephalogram signal, and performing spatial filtering processing on the user electroencephalogram signal to obtain a first filtering signal.
In the embodiment of the invention, an Electroencephalogram detection device, such as an Electroencephalogram head sleeve or an Electroencephalogram head ring, can be used for collecting original Electroencephalogram (EEG) signals, electrodes distributed according to the international standard 10-20 system are arranged in the head ring, and the number of the electrodes can be 32 or 64 for omnibearing collection. When the head ring is opened in a ring shape, the head of a tested person can be sleeved, and the electrodes uniformly distributed on the surface of the inner ring can cover all key brain areas of the scalp of the tested person, including frontal lobe, parietal lobe, temporal lobe and other parts. The shape of each electrode is bowl-shaped, the center-to-center distance of the electrodes is between 10 mm and 30mm, the electrodes are made of high-conductivity silver materials, the diameter is about 10 mm, the design can ensure the stability of the electrodes when the electrodes are contacted with the scalp, the falling problem caused by the too small contact area is avoided, and the quality of collecting potential signals is also ensured.
And determining an electroencephalogram acquisition point covered by the electrode according to brain region functions, such as determining the coverage of frontal lobe regions as AF3, AF4, F1-F8 and the like. The frontal lobe area is highly relevant to executive functions and attention, and the electrode coverage frontal lobe area can be arranged to collect relevant brain electrical activities such as working memory, decision making and the like. The top leaf area coverage is determined to be C1-C6, CP1-CP6, etc. The parietal lobe is related to vision and motor functions, and the coverage of the parietal lobe area helps to collect brain electrical characteristics of visual response and fine movement. Occipital region coverage is determined as O1, O2, PO3-PO8, etc. Occipital lobe is the primary visual cortex area covered by which an electroencephalogram response to basic visual stimuli can be obtained.
When wearing the head ring, each electrode is precisely aligned with a corresponding acquisition point on the scalp through the adjusting mechanism, so that the effectiveness of signals during acquisition is ensured. The electrodes in the head ring are connected with a signal acquisition and amplification module outside the head ring through wires, and the module is responsible for amplifying potential signals acquired by the electrodes in the head ring, and meanwhile, the sampling frequency of 1000 hertz or higher is set so as to detect the frequency components in the whole range of the brain electrical signals. The number of the acquisition channels is the same as that of the electrodes in the head ring, and the original electroencephalogram signals of the acquisition points of each electrode can be synchronously acquired.
In step 110, the collected original electroencephalogram signal may be used as the electroencephalogram signal of the user to be processed, or the bandpass filtering process may be performed on the original electroencephalogram signal, so as to obtain a signal after the bandpass filtering process as the electroencephalogram signal of the user to be processed. For example, band-pass filtering processing is carried out on the acquired original brain electrical signals at 1-50Hz to obtain band-pass filtered signals. Therefore, obvious power frequency noise, eye movement noise and other components can be removed through band-pass filtering, and a clean user brain electrical signal for analysis is obtained.
In the embodiment of the invention, the sensor array can be formed according to the layout of the acquisition points. In particular, a plurality of groups of electrode leads are arranged on the head ring, each group of electrode leads comprises electrodes and sensors connected with the electrodes, and the electrode leads have certain spatial distribution and association relation at the scalp position. In order to accurately record the spatial coordinate information of each electrode lead, scalp positioning is required, and the accurate coordinates of each electrode lead in scalp space are measured by using a three-dimensional positioning system. Common positioning systems include electromagnetic positioning systems, mechanical positioning systems, and the like. Taking an electromagnetic positioning system as an example, the principle is that a magnetic field with a specific frequency is emitted, the sensors on the head ring receive magnetic field signals, and the space coordinates of each sensor are calculated according to the parameters of the magnetic field signals. This allows the spatial location of the individual sensors in a multi-lead head ring layout. After determining the spatial coordinates of the individual sensors, the next step is to abstract the multi-lead ring into a sensor array based on the spatial coordinates of the individual sensors, each element in the sensor array corresponding to one electrode lead on the head ring, reflecting the relative placement of the individual electrode leads in the scalp space. In the sensor array, the correlation between EEG signals acquired by sensors closer to each other is stronger, while the correlation between EEG signals acquired by sensors farther from each other is weaker. Such spatial structure information provides an important basis for the subsequent design of spatial filters.
Depending on the spatial structure information of the sensor array, various spatial filters can be constructed to improve EEG signal quality. Common spatial filters include LAPLACIAN filters, SURFACE LAPLACIAN filters, etc., all of which are software implemented digital filtering algorithms. The design of these filters takes into account the distance relationship between adjacent sensors and achieves linear combination of signals by constructing a spatial derivative matrix. Thus, the electroencephalogram of local activity can be enhanced, and meanwhile, the uncorrelated background noise is restrained, so that the spatial resolution of the electroencephalogram is improved.
The spatial filter is arranged for analyzing the relevant statistical characteristics of the brain electrical signals in the spatial domain, the spatial characteristics of the brain electrical signals can be extracted, and more signal characteristics generated by a brain power supply and characteristics of external noise are distinguished, so that the purpose of reducing the noise of the brain electrical signals is achieved.
Specifically, the user electroencephalogram signal is taken as input, and spatial filtering is performed through a spatial filter, so that a first filtering signal is obtained. The incoherent background noise can be removed through spatial filtering, and the brain electrical signal with improved spatial resolution is obtained. The two filters of the band-pass filter and the spatial filter are combined to cooperate with each other to form a series connection of the filters, so that the overall quality of the signals can be improved.
120. And constructing a spatial covariance matrix according to the first filtered signal, wherein the spatial covariance matrix is used for reflecting the statistical correlation of signals among different sensors in the sensor array.
Specifically, step 120 may include the following steps 1201-1203, not shown:
1201. the first filtered signal is divided into a plurality of time periods of a specified length.
Illustratively, the spatially filtered first filtered signal is divided into time segments of 2-10 seconds in length, and the time segment with less eye movement noise is preferably selected at the time of division.
1202. From the sensor array, a linear correlation matrix is calculated for each time period.
Specifically, the sensors in the preset sensor array are combined in pairs to obtain a plurality of sensor pairs, and the linear correlation coefficient of each sensor pair in each time period is calculated in sequence to form a linear correlation matrix of each time period. Taking a 32-channel electroencephalogram head ring as an example, in each time period, calculating linear correlation coefficients between 32 electroencephalogram sensor pairs to form a 32×32 linear correlation matrix. Specific: for each time period, collecting signals X of 32 brain sensors 1 ,X 2 ...X 32 And performing correlation calculation by combining two by two. The collected signals of the two sensors are set as X and Y, and the statistical samples are respectively X 1 ,x 2 ...x n And y 1 ,y 2 ...y n Then according to the formulaThe linear correlation coefficient r of X and Y can be calculated xy . Here μ x ,μ y Mean value of X and Y, sigma x ,σ y Standard deviation, n is the sampleA number. Calculating linear correlation coefficient of each pair of sensors in turn, and performing total +.>And each. The linear correlation coefficients are put into a symmetrical matrix R of 32 rows and 32 columns, wherein R ij = R ji = r(X i ,X j ) Thus, a complete matrix R containing relevant information of all sensor pairs, namely a linear correlation matrix, can be obtained, and a foundation is laid for the subsequent functional connectivity analysis of brain regions.
1203. And averaging according to the linear correlation matrixes of a plurality of time periods to obtain an average correlation matrix as a space covariance matrix.
After calculating the linear correlation matrix between 32 sensors in each time period, the linear correlation matrix R in a plurality of time periods can be obtained 1 ,R 2 ...R n . Then, these linear correlation matrices are averaged point by point, i.e. for each element R in the matrix ij And carrying out averaging to obtain an average correlation matrix. The specific calculation formula is as follows: r_avg= (R 1ij + R 2ij + ... + R nij ) And/n. Where n is the number of time periods, and r_avg is the average correlation matrix after averaging, i.e. the spatial covariance matrix of the electroencephalogram signal. Thus, by averaging the linear correlation matrix R for all the time periods, one average correlation matrix r_avg of 32×32 can be obtained. The average correlation matrix comprises average correlation among sensor pairs, and stable correlation distribution among signals in the task state can be effectively represented by averaging over a plurality of time periods and removing time influence, namely, a stable spatial mode is obtained.
130. And carrying out eigenvalue decomposition on the space covariance matrix to extract and obtain a first principal component vector.
Assuming that the spatial covariance matrix r_avg is an m-order square matrix, its eigenvalue |r_avg- λi|=0 is first solved, where λ is the eigenvalue and I is the identity matrix. The polynomial equation of m times can be obtained by expanding the characteristic equation, m solutions can be obtained by solving the equation, and the m solutions are m characteristic values of R_avg and are recorded as lambda 1 ,λ 2 ...λ m . Then for each eigenvalue lambda i It is substituted into equation (R_avg-lambda) i I)v i Solving by=0 to obtain a eigenvector v corresponding to the eigenvalue λi i . All eigenvalues and eigenvectors of the matrix can be obtained through the process, namely, eigenvalue decomposition of the covariance matrix R_avg is completed.
After all the characteristic values and the characteristic vectors are obtained, the characteristic vectors corresponding to the p larger characteristic values are selected as the first principal component vector according to the size sorting of the characteristic values. These eigenvectors represent the principal variable directions in the matrix, which preserve the components of the original data that are most relevant to the variables. For example, the first 5 feature vectors v can be selected 1 ~v 5 As a first principal component vector. These first principal component vectors reflect the most dominant spatial constituent modes of the signal.
140. And reconstructing to obtain a second filtering signal according to the first principal component vector and the user brain electric signal.
And (3) using the extracted first principal component vector as a filtering template to perform linear reconstruction combination with the brain electrical signal of the user, so as to obtain the brain electrical signal after noise removal, namely a second filtering signal. The specific calculation process is that firstly, an m-dimensional user brain electrical signal is recorded as a vector x, an m x P-order principal component matrix P is formed by the m-dimensional user brain electrical signal and the extracted P first principal component vectors, then, the principal component matrix is utilized to carry out dimension reduction processing on the user brain electrical signal, a dimension reduction signal y=px after dimension reduction is obtained, and the dimension reduction signal y keeps main characteristic information in the user brain electrical signal x. And finally reconstructing the filtered m-dimensional brain electrical signal through the dimension reduction signal y to serve as a second filtering signal.
150. And extracting a plurality of signal segments according to the second filtering signal.
In this step, the manner of extracting the plurality of signal segments according to the second filtered signal may be: the continuous second filtered signal is divided into signal segments of fixed length, each of which may contain a number of sampling points. For example, each signal segment may contain 1000 sampling points, each signal segment corresponding to brain electrical data of approximately 1 second in length. Such segmentation may ensure that each paragraph contains enough data points to facilitate subsequent time series analysis and feature extraction.
As another embodiment, the method for extracting the plurality of signal segments from the second filtered signal may further include the following steps 1501 to 1504, which are not shown:
1501. and carrying out Fourier transform on the second filtering signal to obtain a plurality of electroencephalogram spectrums, and carrying out clustering classification on the plurality of electroencephalogram spectrums to obtain a plurality of spectrum clusters.
The second filter signal is a complex filter signal with overlapping frequency ranges, so that the filtered second filter signal is subjected to fourier transformation, and an electroencephalogram spectrum containing different frequency ranges can be obtained. Based on the energy distribution characteristics of the electroencephalogram spectrum, a plurality of spectrum clusters can be generated by grouping a plurality of electroencephalogram spectrums using a clustering algorithm, such as K-means.
1502. And counting the energy value on each frequency point of each electroencephalogram spectrum in each spectrum cluster, and determining a frequency range formed by frequency points with energy values larger than a specified threshold value as a main energy concentration interval of the spectrum cluster.
And analyzing the frequency distribution condition in each spectrum cluster, namely counting the energy value on each frequency point of each electroencephalogram spectrum in each spectrum cluster for each spectrum cluster, and determining the frequency range formed by the frequency points with the energy value larger than a specified threshold as a main energy concentration interval of the spectrum cluster, wherein the main energy concentration interval reflects the main power distribution of electroencephalogram signals in the spectrum cluster. Through analysis of power distribution, frequency band segmentation is more reasonable, so that the subsequent rhythm feature extraction effect is improved, and the signal segment more accurately represents the electroencephalogram component of the target frequency band.
1503. And extracting a plurality of representative frequency points in the main energy concentration interval of each spectrum cluster to serve as characteristic frequency points of each spectrum cluster.
And extracting a plurality of representative frequency points in the main energy concentration interval of each spectrum cluster as characteristic frequency points of the spectrum cluster, wherein the characteristic frequency points reflect main frequency components of the electroencephalogram signals in the spectrum cluster.
1504. And determining the start-stop frequency of each electroencephalogram rhythm according to the characteristic frequency point of each frequency spectrum cluster and the corresponding energy value thereof, and extracting the signal segment corresponding to each electroencephalogram rhythm from the second filtering signal according to the start-stop frequency of each electroencephalogram rhythm.
According to the characteristic frequency points extracted from all the frequency spectrum clusters and the corresponding energy values, the region where the frequency components of different types of signals are concentrated and overlapped can be roughly judged, so that the start-stop frequency (including the start frequency and the stop frequency, namely the frequency band segmentation range) of each brain electric rhythm can be determined. According to the information, the fixed frequency band dividing points of each brain electric rhythm can be readjusted, and the range of each frequency band can be redetermined according to the data characteristics of the actual signals. For example, if the characteristic frequency points indicate that the brain rhythms of both the theta and alpha wave patterns have stronger energy in the range of 7-9Hz, the center frequency of 8Hz of the area can be set as the boundary point of the theta and alpha wave patterns, so that the start-stop frequencies of 2 brain rhythms are determined to be 7-8Hz and 8-9Hz. And the start-stop frequencies of the brain electric rhythms such as delta, theta, alpha, beta, gamma waves and the like are determined according to various characteristic frequency points and corresponding energy, so that new frequency band division ranges of the wave signals are obtained. And finally, extracting signal segments corresponding to different rhythms from the second filtered signal according to the start-stop frequency of each re-determined brain electrical rhythm for subsequent analysis. The method has the advantage that the signal of a specific type of brain electrical rhythm can be extracted for separate analysis.
160. The target signal segment is determined from the plurality of signal segments.
Step 160 may include the following steps 1601 to 1603, not shown:
1601. and calculating the power spectrum characteristics of each signal segment, and inquiring and matching through a characteristic sample library to obtain the cognitive sub-state corresponding to each signal segment.
And for each signal segment, calculating the power spectrum characteristics of the signal segment, and matching the power spectrum characteristics with a characteristic sample library established in advance. Typical characteristic templates of human brain signals under different preset cognitive sub-states are collected in the characteristic sample library, and classification detection of any input signal segment can be achieved by adopting a pattern recognition method.
1602. Acquiring a current operation time length, determining a time length interval to which the current operation time length belongs, and calling a current cognitive state corresponding to the time length interval.
And matching a certain state template of a specific length interval in a state sample library according to the real-time operation time length of the current system so as to determine the current cognitive state of the user. Each state template in the state sample library can be established by collecting the brain electrical characteristics of different tested under the control condition through experiments, and representative analysis is carried out to extract the main state as the template. For example, within 3-4 minutes after system start-up, the corresponding current cognitive state is a load state; and after the system is used for more than 10 minutes, the corresponding current cognitive state is a fatigue state.
1603. And screening target signal segments with cognitive sub-states conforming to the current cognitive state from the plurality of signal segments.
The key of implementation of the above steps 1601 to 1603 is to construct a sample library containing electroencephalogram features in different cognitive states and perform pattern matching according to duration information. And then in the application stage, monitoring the running time at the system time, after determining the time interval, calling the corresponding most matched state template from the sample library as the current cognitive state of the user, and screening the target signal segments which accord with the current cognitive state of the user from the plurality of input signal segments. In this way, according to the time information of the system operation, the matching signal segment which accords with the current cognitive state of the user is purposefully screened from the continuous input signals and used as the target signal segment for subsequent analysis.
For example, the power spectrum characteristics under load are matched within 3-4 minutes after system start-up to obtain a target signal segment containing the load operating brain electrical rhythms. And after the system is used for more than 10 minutes, the power spectrum characteristics of the fatigue state are matched, and a target signal segment containing the fatigue working brain electric rhythm is obtained. By the design, the system can automatically extract the most relevant signal segments from the continuously input electroencephalogram signals according to the time context of the system, and target data support is provided for subsequent information decoding.
170. And calculating state covariance matrixes in different time windows according to the target signal segments, wherein the state covariance matrixes are used for reflecting the statistical correlation of the same sensor at different times.
Step 170 may include the following steps 1701-1704, not shown:
1701. and acquiring an amplitude time sequence of the target signal segment, wherein the amplitude time sequence is used for reflecting the characteristic that the amplitude of the target signal segment changes along with time.
Specifically, the amplitude values of all sampling points in the target signal segment are traversed and sequentially stored in an array to form an amplitude time sequence of the target signal segment. Let x (t) be the target signal segment selected, where t represents the sampling point in time and x (t) represents the signal amplitude at the corresponding time point t. A one-dimensional array A [ N ] is initialized to store a time series of magnitudes, where N is the total number of sampling points for x (t). Then, all sampling points of x (t) are traversed, and for each sampling point x (t), the amplitude x (t) thereof is sequentially stored into the array a, that is, a (t) =x (t) is executed. After the traversal is completed, the amplitude of each sampling point in the target signal segment x (t) is stored in the array a, so that an amplitude time sequence a (t) of the target signal segment is formed, wherein t=1, 2. The amplitude time series a (t) reflects the characteristic of the amplitude of the target signal segment x (t) over time.
1702. And performing polynomial curve fitting on the amplitude time sequence to obtain a change trend function of the amplitude.
After the amplitude time series a (t) is obtained, it is desirable to analyze the overall variation trend thereof. For this purpose, it is considered to perform polynomial curve fitting on the amplitude time series a (t) to obtain a variation trend function of the amplitude. Exemplary, a cubic polynomial is usedFitting, wherein t represents time; y (t) represents a polynomial curve obtained by fitting; a, a 0 ,a 1 ,a 2 ,a 3 Is the polynomial coefficient to be solved. By iterative calculation, a group of a can be solved 0 ,a 1 ,a 2 ,a 3 Values of (2) such thatThe corresponding polynomial curve y (t) best corresponds to the original amplitude time series a (t), and the polynomial curve y (t) is determined as a change trend function.
Specific: first initialize a 0 ,a 1 ,a 2 ,a 3 The method comprises the steps of taking a group of initial approximate values or random values, carrying the initial approximate values or random values into the current parameter values to calculate a fitted polynomial curve y (t), calculating the mean square error between the y (t) and an original amplitude time sequence A (t), adjusting the parameter values according to the mean square error to enable the fitted polynomial curve to move towards the A (t), repeating the processes of calculating the mean square error and adjusting the parameters, gradually changing the values of the parameters through a large number of iterative calculations to enable the fitted polynomial curve y (t) to be optimized continuously, and finally enabling the mean square error between the y (t) and the A (t) to be minimized to achieve the best fitting effect. A obtained at this time 0 ,a 1 ,a 2 ,a 3 The value of (a) is the final optimal solution, so that the corresponding polynomial curve y (t) can accord with the variation trend of the original amplitude time sequence A (t) to the maximum extent. Wherein the constant term a 0 Reflecting the overall offset of A (t); linear term a 1 Reflecting the overall growth rate of A (t); quadratic term a 2 And cubic term a 3 The curvature of the change of a (t) is shown. By integrating these coefficients, the global features of a (t) changes can be analyzed.
1703. And carrying out residual calculation on the amplitude time sequence and the change trend function to obtain a residual time sequence.
And carrying out residual calculation e (t) =A (t) -y (t) on the original amplitude time sequence A (t) and the change trend function y (t), and obtaining a residual time sequence e (t). Wherein, the residual time sequence e (t) reflects the deviation information of the original signal and the general trend. Specifically, in the amplitude time series a (t) of the target signal segment, t represents a time index, and a (t) represents the signal amplitude at the time point t. In addition, the overall trend function y (t) is obtained by polynomial curve fitting, where y (t) represents the fitted trend value at the time point t. And subtracting the two, so as to obtain a residual time sequence e (t), namely, at each time point t, the difference value between the original signal amplitude and the fitting trend value. Obviously, this residual time sequence contains other variable components in the original signal except for the overall trend, such as details of the signal, such as random fluctuation, emergency, and the like, so that it reflects deviation information of the signal relative to the overall trend.
1704. Sliding the sliding window in the residual time sequence, and calculating the state covariance matrix of each time window according to residual samples in the time window after each sliding.
After obtaining the residual time sequence e (t), in order to analyze the statistical characteristics of the residual time sequence under different time, a sliding window method may be adopted, wherein the window length is defined as L, then, starting from the time index i, the interval from the sampling point i to the sampling point i+l-1 is used as a sliding window, and the state covariance matrix of each time window is obtained by sequentially calculating the residual samples in each sliding time window.
Specifically, two residual samples in the time window are represented by sample indexes i and j, for sample i, a residual average mean (e (i: i+l)) of the residual samples from the ith to the (i+l) th in the time window is calculated, the residual value of sample i with respect to the present time window is obtained by subtracting this residual average from residual sample i, the residual value of the residual sample j with respect to the time window is also calculated in the same manner, and then the residual values of the two residual samples are taken as inputs, and the covariance of the two residual samples is calculated as covariance statistics of the two residual samples in the present time window according to the following equation (1):
C x (i,j)=E[(ei-mean(e(i:i+L)))(ej-mean(e(j:j+L)))](1)
Where ei denotes the ith residual sample, mean (e (i: i+l)) denotes the average value from the ith to the ith+l residual samples, ej denotes the jth residual sample, mean (e (j: j+l)) denotes the average value from the jth to the jth+l residual samples. E []Representing the intended operation. C (C) x (i, j) represents the covariance of the ith and jth residual samples over the time window.
The covariance of each residual sample pair in the time window is sequentially calculated, so that a state covariance matrix of the time window can be obtained (the covariance matrix calculated by the residual samples reflects the statistical correlation between different states and is called a state covariance matrix). By calculating the state covariance matrix over a fixed period of time, the time correlation can be preserved, thus reflecting the pattern of the electroencephalogram signal over time.
180. And carrying out eigenvalue decomposition on the state covariance matrix to extract and obtain a second principal component vector.
For state covariance matrix C x (i, j) performing eigenvalue decomposition. Specific: first, given an already obtained state covariance matrix C x (i, j), where i, j represents the column index of the matrix. C (C) x The size of (2) is an M-order square matrix, and M is the number of state variables. Then, for C x Performing eigenvalue decompositionI=1, 2,..m. Here, vi represents the i-th feature vector, λ i Is the corresponding characteristic value. The above formula represents C x Matrix at v i The mapping result in the direction is +.>C, i.e x The decomposition can be diagonalized into a diagonal matrix Λ: Λ=diag (λ) 1 ,λ 2 ,...,λ M )。
The diagonal elements in the diagonal matrix lambda are eigenvalues lambda i . Eigenvalue lambda i Reflecting the feature vector v i The represented signal pattern contains the amount of information. Typically, the first few large eigenvalues contain the main information of the signal. Thus, according to the eigenvalue lambda i Of which the larger first Z feature vectors, i.e. v, are selected 1 ,v 2 ,...,v Z As a second principal component vector. These principal eigenvectors reflect the core mode structure of the target signal segment. In particular, if the maximum characteristic value lambda 1 Far greater than the other eigenvalues, the first eigenvector v 1 Representing the dominant mode with the greatest amount of information in the signal. In this case, only v is selected 1 A feature vector can effectively represent the dominant features of the signalAnd (3) sign. By selecting these top-ranked principal eigenvectors vi, the core features of the signal can be synthesized with a small number of principal components, completing the efficient representation of the signal.
190. And according to the target signal segment and the second principal component vector, carrying out parameter optimization on the adaptive filter to obtain an optimized filter coefficient vector, and carrying out noise reduction treatment on the target signal segment according to the filter coefficient vector.
First, a state function of a target signal segment is determined. That is, after the target signal segment is obtained, an appropriate state function may be selected to characterize the time domain statistical characteristic of the signal according to the time sequence feature of the signal, and the state functions may be classified into three types: discrete state functions, continuous state functions, and mixed state functions. By way of example, a discrete time sequence of target signal segments may be employed as a state function. Specifically, the target signal segment is sampled to obtain a discrete time sequence x (N) of length N, where n=1, 2. The sampling process typically sets the sampling frequency fs to satisfy the nyquist sampling theorem, i.e. the sampling frequency is greater than twice the signal bandwidth to ensure that the sampling reflects all information of the continuous signal without distortion. The relation of the sampling frequency fs and the sampling interval Ts is fs=1/Ts.
Let the duration of the target signal segment be T, comprising all waveforms of the signals from t=0 to t=t. Then it is uniformly sampled to obtain N sampling points, where n=t/Ts. The N sampling points form a discrete time series x (N) of length N, representing the digital form of the sampled target signal segment. The discrete time sequence contains complete information of the signal over time and can represent the dominant mode features of the signal.
And secondly, inputting a state function of the target signal segment into the adaptive filter, and carrying out parameter optimization on the adaptive filter by taking the second principal component vector as a reference to obtain an optimized filter coefficient vector. Specifically, inputting a state function into an adaptive filter, obtaining an output signal of the adaptive filter, and calculating a mean square error of the output signal and the state function; and iteratively updating parameters of the adaptive filter in a negative gradient direction by taking the second principal component vector as a reference until the mean square error is smaller than the specified error or the preset iteration number is reached, so as to obtain an optimized filter coefficient vector.
Here, using FIR filters, assuming a filter order of L, the filter coefficients can be represented by a vector h of length L, where h= [ h ] 0 ,h 1 ,...h L-1 ]T. Each element of the vector h is a filter coefficient. For initialization, h may be set to the full 1 vector. The target signal segment is set as a discrete time sequence x (n) of a time domain, and the output signal is obtained by filtering. The default state function, namely the target signal segment itself, is optimized to minimize the mean square error between the filtered output signal and the target signal segment, and the expression is as follows (2):
E(h)=Σ[x(n)-y(n)]^2(2)
Wherein, the relation between y (n) and x (n) and h is as follows:. I.e., the current output is related to the current and past L-1 samples. The mean square error E can be obtained as a function of h by expanding y (n) and substituting it into the original expression.
In order to approximate the filtered output signal y (n) to the pattern represented by the second principal component vector, a second principal component vector v is set 1 ,v 2 ,...v Z Is the reference target for the filter. And then adopting an LMS algorithm to iterate and optimize the parameter h to enable y (n) to be closest to the second principal component vector in the characteristic subspace, and realizing pattern matching.
The LMS algorithm gradually reaches the optimization objective by iteratively updating h in the gradient direction to reduce E (h). Wherein, the filter coefficient vector of the kth iteration is denoted as h (k), and the update formula of the LMS iteration is:
(3)
here, μ is the step size parameter of the algorithm, Δ (k) is the gradient direction of E (k) with respect to h (k), expressed as: delta (k) = ∂ E (k)/∂ h (k). To calculate the gradient delta (k), it is necessary to assume that the influence of the filter coefficients on the output signal y (n) can be analyzed independently. I.e. neglecting the interactions between the filter coefficients in h, the partial derivative of each coefficient hi with respect to E can be calculated separately. Delta (k) can be approximated as:
(4)
here, e (n) =x (n) -y (n) is a filter error at the nth time.
Thus, each iteration multiplies the input signal x (n) by the current error E (n), constituting an update quantity Δ (k), adjusting h (k) in its negative gradient direction, achieving the goal of progressively reducing the error E. Repeating iteration until the error meets the requirement (smaller than the specified error) or reaches the preset iteration times, and obtaining an optimized filter coefficient vector h. At this time, since the second principal component vector v is used in the iterative process 1 ,v 2 ,...v Z Optimized for the reference target, the finally obtained h will contain the pattern information represented by these second principal component vectors.
And finally, filtering the target signal segment according to the optimized filter coefficient vector so as to realize the self-adaptive noise reduction function. Compared with a fixed filter, the method can automatically optimize parameters and perform adaptive filtering aiming at specific time domain characteristics of an input signal. The filtered signals can be used for subsequent pattern recognition, detection of user intention, cognitive state and the like is achieved, and various intelligent interactive applications are achieved.
In summary, by implementing the embodiment of the invention, the spatial covariance matrix of the electroencephalogram signals among the multiple sensors is calculated by arranging the spatial filter array, so that the spatial statistical characteristics of the electroencephalogram signals can be effectively utilized for filtering. Compared with the direct filtering of the single-point signal, the method can obviously reduce the influence of background noise and improve the signal-to-noise ratio. In addition, the parameters of the adaptive filter are optimized by extracting the state function and the state covariance matrix of each electroencephalogram signal segment, the state function expresses the time sequence characteristics of signals, the state covariance matrix reflects the time domain correlation of the signals, compared with a fixed filter parameter model, the adaptive filter based on the statistical characteristics of the signals can be realized, the pertinence of the filter is greatly improved, and the key characteristics of the electroencephalogram signals are effectively reserved.
As shown in fig. 2, the embodiment of the invention discloses an adaptive noise reduction device for an electroencephalogram signal, which comprises a preprocessing unit 201, a construction unit 202, a first decomposition unit 203, a reconstruction unit 204, an extraction unit 205, a determination unit 206, a calculation unit 207, a second decomposition unit 208, an optimization unit 209 and a noise reduction processing unit 210, wherein,
a preprocessing unit 201, configured to acquire a user electroencephalogram signal; performing spatial filtering processing on the electroencephalogram signals of the user to obtain first filtering signals;
a construction unit 202, configured to construct a spatial covariance matrix according to the first filtered signal, where the spatial covariance matrix is used to reflect statistical correlations of signals between different sensors in the sensor array;
a first decomposition unit 203, configured to perform eigenvalue decomposition on the spatial covariance matrix to extract a first principal component vector;
a reconstruction unit 204, configured to reconstruct a second filtered signal according to the first principal component vector and the user electroencephalogram signal;
an extracting unit 205, configured to extract a plurality of signal segments according to the second filtered signal;
a determining unit 206, configured to determine a target signal segment from the plurality of signal segments;
a calculating unit 207 for calculating a state covariance matrix in different time windows according to the target signal segments, wherein the state covariance matrix is used for reflecting the statistical correlation of the same sensor in different times;
A second decomposition unit 208, configured to perform eigenvalue decomposition on the state covariance matrix to obtain a second principal component vector by extraction;
an optimizing unit 209, configured to perform parameter optimization on the adaptive filter according to the target signal segment and the second principal component vector, to obtain an optimized filter coefficient vector;
the noise reduction processing unit 210 is configured to perform noise reduction processing on the target signal segment according to the filter coefficient vector.
As an alternative embodiment, the construction unit 202 is specifically configured to divide the first filtered signal into a plurality of time periods with a specified length; calculating a linear correlation matrix of each time period according to the sensor array; and averaging according to the linear correlation matrixes of a plurality of time periods to obtain an average correlation matrix as a space covariance matrix.
As an alternative embodiment, the extraction unit 205 comprises the following sub-units, not shown:
the transformation subunit is used for carrying out Fourier transformation on the second filtering signal to obtain a plurality of electroencephalogram frequency spectrums;
the classifying subunit is used for carrying out cluster classification on the plurality of electroencephalogram spectrums to obtain a plurality of spectrum clusters;
the statistics subunit is used for counting the energy value on each frequency point of each electroencephalogram spectrum in each spectrum cluster, and determining a frequency range formed by frequency points with the energy value larger than a specified threshold value as a main energy concentration interval of the spectrum cluster;
The first extraction subunit is used for extracting a plurality of representative frequency points in the main energy concentration interval of each spectrum cluster to be used as characteristic frequency points of each spectrum cluster;
the determining subunit is used for determining the start-stop frequency of each brain electric rhythm according to the characteristic frequency point of each frequency spectrum cluster and the corresponding energy value thereof;
and the second extraction subunit is used for extracting signal segments corresponding to the brain electric rhythms from the second filtering signal according to the start-stop frequency of the brain electric rhythms.
As an alternative embodiment, the determining unit 206 includes the following sub-units, not shown:
the matching subunit is used for calculating the power spectrum characteristics of each signal segment, and inquiring and matching through the characteristic sample library to obtain the cognitive sub-state corresponding to each signal segment;
a retrieving subunit, configured to obtain a current operation duration, determine a duration interval to which the current operation duration belongs, and retrieve a current cognitive state corresponding to the duration interval;
and the screening subunit is used for screening target signal segments with cognitive sub-states conforming to the current cognitive states from the plurality of signal segments.
As an optional implementation manner, the calculating unit 207 is specifically configured to obtain an amplitude time sequence of the target signal segment, where the amplitude time sequence is used to reflect a characteristic that the amplitude of the target signal segment changes with time; performing polynomial curve fitting on the amplitude time sequence to obtain a change trend function of the amplitude;
Carrying out residual calculation on the amplitude time sequence and the change trend function to obtain a residual time sequence; sliding window is adopted to slide in the residual time sequence, and the state covariance matrix of each time window is calculated according to residual samples in the time window after each sliding.
As an alternative embodiment, the optimizing unit 209 is specifically configured to determine a state function of the target signal segment; and inputting the state function into the adaptive filter, and carrying out parameter optimization on the adaptive filter by taking the second principal component vector as a reference to obtain an optimized filter coefficient vector.
Further, the optimizing unit 209 is configured to input the state function into the adaptive filter, perform parameter optimization on the adaptive filter with reference to the second principal component vector, and obtain an optimized filter coefficient vector by:
inputting the state function into the adaptive filter to obtain an output signal of the adaptive filter; calculating the mean square error of the output signal and the state function; and iteratively updating parameters of the adaptive filter in a negative gradient direction by taking the second principal component vector as a reference until the mean square error is smaller than the specified error or the preset iteration number is reached, so as to obtain an optimized filter coefficient vector.
As shown in fig. 3, an embodiment of the present invention discloses an electronic device comprising a memory 301 storing executable program code and a processor 302 coupled to the memory 301;
the processor 302 invokes executable program codes stored in the memory 301, and executes the adaptive noise reduction method for the electroencephalogram signals described in the above embodiments.
The embodiments of the present invention also disclose a computer-readable storage medium storing a computer program, wherein the computer program causes a computer to execute the adaptive noise reduction method for electroencephalogram signals described in the above embodiments.
The foregoing embodiments are provided for the purpose of exemplary reproduction and deduction of the technical solution of the present invention, and are used for fully describing the technical solution, the purpose and the effects of the present invention, and are used for enabling the public to understand the disclosure of the present invention more thoroughly and comprehensively, and are not used for limiting the protection scope of the present invention.
The above examples are also not an exhaustive list based on the invention, and there may be a number of other embodiments not listed. Any substitutions and modifications made without departing from the spirit of the invention are within the scope of the invention.

Claims (8)

1. An adaptive noise reduction method for an electroencephalogram signal is characterized by comprising the following steps:
acquiring an electroencephalogram signal of a user;
performing spatial filtering processing on the user brain electrical signal to obtain a first filtering signal;
constructing a spatial covariance matrix according to the first filtering signal, wherein the spatial covariance matrix is used for reflecting the statistical correlation of signals among different sensors in the sensor array;
performing eigenvalue decomposition on the space covariance matrix to extract a first principal component vector;
according to the first principal component vector and the user brain electrical signal, a second filtering signal is obtained through reconstruction;
extracting a plurality of signal segments according to the second filtering signal;
determining a target signal segment from a plurality of signal segments;
calculating state covariance matrixes in different time windows according to the target signal segments, wherein the state covariance matrixes are used for reflecting statistical correlation of the same sensor at different times;
performing eigenvalue decomposition on the state covariance matrix to extract a second principal component vector;
according to the target signal segment and the second principal component vector, performing parameter optimization on the adaptive filter to obtain an optimized filter coefficient vector;
Carrying out noise reduction treatment on the target signal segment according to the filter coefficient vector;
wherein constructing a spatial covariance matrix according to the first filtered signal comprises:
dividing the first filtered signal into a plurality of time periods of a specified length;
calculating a linear correlation matrix of each time period according to the sensor array;
averaging according to the linear correlation matrixes of a plurality of time periods to obtain an average correlation matrix as a space covariance matrix;
wherein calculating the state covariance matrix in different time windows according to the target signal segments comprises:
acquiring an amplitude time sequence of the target signal segment, wherein the amplitude time sequence is used for reflecting the characteristic of the change of the amplitude of the target signal segment along with time;
performing polynomial curve fitting on the amplitude time sequence to obtain a change trend function of the amplitude;
carrying out residual calculation on the amplitude time sequence and the change trend function to obtain a residual time sequence;
sliding in the residual time sequence by adopting a sliding window, and calculating the state covariance matrix of each time window according to residual samples in the time window after each sliding.
2. The adaptive noise reduction method of an electroencephalogram signal according to claim 1, wherein extracting a plurality of signal segments from the second filtered signal comprises:
performing Fourier transform on the second filtering signal to obtain a plurality of electroencephalogram spectrums, and performing cluster classification on the plurality of electroencephalogram spectrums to obtain a plurality of spectrum clusters;
counting energy values on each frequency point of each electroencephalogram spectrum in each spectrum cluster, and determining a frequency range formed by frequency points with energy values larger than a specified threshold value as a main energy concentration interval of the spectrum cluster;
extracting a plurality of representative frequency points in a main energy concentration interval of each spectrum cluster to be used as characteristic frequency points of each spectrum cluster;
determining the start-stop frequency of each brain electrical rhythm according to the characteristic frequency point of each frequency spectrum cluster and the corresponding energy value thereof;
and extracting signal segments corresponding to the brain electric rhythms from the second filtering signals according to the start-stop frequency of the brain electric rhythms.
3. The adaptive noise reduction method of an electroencephalogram signal according to claim 1, wherein determining a target signal segment from a plurality of the signal segments, comprises:
Calculating the power spectrum characteristics of each signal segment, and inquiring and matching through a characteristic sample library to obtain a cognitive sub-state corresponding to each signal segment;
acquiring a current operation time length, determining a time length interval to which the current operation time length belongs, and calling a current cognitive state corresponding to the time length interval;
and screening target signal segments of which the cognitive sub-states accord with the current cognitive states from a plurality of signal segments.
4. A method of adaptive noise reduction of an electroencephalogram signal according to any one of claims 1 to 3, wherein parameter optimization of an adaptive filter based on the target signal segment and the second principal component vector, to obtain an optimized filter coefficient vector, comprises:
determining a state function of the target signal segment;
and inputting the state function into an adaptive filter, and carrying out parameter optimization on the adaptive filter by taking the second principal component vector as a reference to obtain an optimized filter coefficient vector.
5. The adaptive noise reduction method of an electroencephalogram signal according to claim 4, wherein inputting the state function into an adaptive filter, performing parameter optimization on the adaptive filter with the second principal component vector as a reference, and obtaining an optimized filter coefficient vector, comprises:
Inputting the state function into an adaptive filter to obtain an output signal of the adaptive filter;
calculating the mean square error of the output signal and the state function;
and iteratively updating parameters of the adaptive filter in a negative gradient direction by taking the second principal component vector as a reference until the mean square error is smaller than a specified error or reaches the preset iteration number to obtain an optimized filter coefficient vector.
6. An adaptive noise reduction device for an electroencephalogram signal, comprising:
the preprocessing unit is used for acquiring the brain electrical signals of the user; performing spatial filtering processing on the user brain electrical signal to obtain a first filtering signal;
the construction unit is used for constructing a spatial covariance matrix according to the first filtering signal, wherein the spatial covariance matrix is used for reflecting the statistical correlation of signals among different sensors in the sensor array;
the first decomposition unit is used for carrying out eigenvalue decomposition on the space covariance matrix so as to extract and obtain a first principal component vector;
the reconstruction unit is used for reconstructing to obtain a second filtering signal according to the first principal component vector and the user electroencephalogram signal;
the extraction unit is used for extracting a plurality of signal segments according to the second filtering signal;
A determining unit, configured to determine a target signal segment from a plurality of signal segments;
the calculating unit is used for calculating state covariance matrixes in different time windows according to the target signal segments, wherein the state covariance matrixes are used for reflecting the statistical correlation of the same sensor in different time;
the second decomposition unit is used for carrying out eigenvalue decomposition on the state covariance matrix so as to extract and obtain a second principal component vector;
the optimizing unit is used for carrying out parameter optimization on the adaptive filter according to the target signal segment and the second principal component vector to obtain an optimized filter coefficient vector;
the noise reduction processing unit is used for carrying out noise reduction processing on the target signal segment according to the filter coefficient vector;
the construction unit is specifically configured to divide the first filtered signal into a plurality of time periods with specified lengths; calculating a linear correlation matrix of each time period according to the sensor array; averaging according to the linear correlation matrixes of a plurality of time periods to obtain an average correlation matrix as a space covariance matrix;
the computing unit is specifically configured to obtain an amplitude time sequence of the target signal segment, where the amplitude time sequence is configured to reflect a characteristic that an amplitude of the target signal segment changes with time; performing polynomial curve fitting on the amplitude time sequence to obtain a change trend function of the amplitude; carrying out residual calculation on the amplitude time sequence and the change trend function to obtain a residual time sequence; sliding window is adopted to slide in the residual time sequence, and the state covariance matrix of each time window is calculated according to residual samples in the time window after each sliding.
7. An electronic device comprising a memory storing executable program code and a processor coupled to the memory; the processor invokes the executable program code stored in the memory for performing the adaptive noise reduction method of an electroencephalogram signal according to any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, wherein the computer program causes a computer to execute the adaptive noise reduction method of an electroencephalogram signal according to any one of claims 1 to 5.
CN202311663907.1A 2023-12-06 2023-12-06 Adaptive noise reduction method and device for electroencephalogram signals, equipment and storage medium Active CN117349603B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311663907.1A CN117349603B (en) 2023-12-06 2023-12-06 Adaptive noise reduction method and device for electroencephalogram signals, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311663907.1A CN117349603B (en) 2023-12-06 2023-12-06 Adaptive noise reduction method and device for electroencephalogram signals, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117349603A CN117349603A (en) 2024-01-05
CN117349603B true CN117349603B (en) 2024-03-12

Family

ID=89365414

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311663907.1A Active CN117349603B (en) 2023-12-06 2023-12-06 Adaptive noise reduction method and device for electroencephalogram signals, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117349603B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104125474A (en) * 2014-07-07 2014-10-29 山东神戎电子股份有限公司 Self-adaptive night viewing video denoising method
WO2016075324A1 (en) * 2014-11-13 2016-05-19 Mensia Technologies Scoring method based on improved signals analysis
WO2020143300A1 (en) * 2019-01-07 2020-07-16 哈尔滨工业大学(深圳) Auditory attention state arousal level recognition method and apparatus, and storage medium
CN111493822A (en) * 2020-03-23 2020-08-07 济南国科医工科技发展有限公司 Sleep electroencephalogram based rapid eye movement period sleep behavior disorder classification method
CN112530451A (en) * 2020-10-20 2021-03-19 国网黑龙江省电力有限公司伊春供电公司 Speech enhancement method based on denoising autoencoder
CN114224360A (en) * 2021-12-27 2022-03-25 长春工程学院 EEG signal processing method and equipment based on improved EMD-ICA and storage medium
CN115211869A (en) * 2022-08-23 2022-10-21 浙江大学 EEG (electroencephalogram) signal denoising method, device and system based on empirical mode decomposition and Kalman filtering

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220273907A1 (en) * 2017-12-31 2022-09-01 Neuroenhancement Lab, LLC Method and apparatus for neuroenhancement to enhance emotional response

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104125474A (en) * 2014-07-07 2014-10-29 山东神戎电子股份有限公司 Self-adaptive night viewing video denoising method
WO2016075324A1 (en) * 2014-11-13 2016-05-19 Mensia Technologies Scoring method based on improved signals analysis
WO2020143300A1 (en) * 2019-01-07 2020-07-16 哈尔滨工业大学(深圳) Auditory attention state arousal level recognition method and apparatus, and storage medium
CN111493822A (en) * 2020-03-23 2020-08-07 济南国科医工科技发展有限公司 Sleep electroencephalogram based rapid eye movement period sleep behavior disorder classification method
CN112530451A (en) * 2020-10-20 2021-03-19 国网黑龙江省电力有限公司伊春供电公司 Speech enhancement method based on denoising autoencoder
CN114224360A (en) * 2021-12-27 2022-03-25 长春工程学院 EEG signal processing method and equipment based on improved EMD-ICA and storage medium
CN115211869A (en) * 2022-08-23 2022-10-21 浙江大学 EEG (electroencephalogram) signal denoising method, device and system based on empirical mode decomposition and Kalman filtering

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
低密度脑电自适应去噪方法;陈贺等;《数据采集与处理》(第04期);第824-836页 *

Also Published As

Publication number Publication date
CN117349603A (en) 2024-01-05

Similar Documents

Publication Publication Date Title
Gevins Analysis of the electromagnetic signals of the human brain: milestones, obstacles, and goals
de Cheveigné et al. Joint decorrelation, a versatile tool for multichannel data analysis
CN112515685B (en) Multi-channel electroencephalogram signal channel selection method based on time-frequency co-fusion
Miao et al. A spatial-frequency-temporal optimized feature sparse representation-based classification method for motor imagery EEG pattern recognition
CN114533086B (en) Motor imagery brain electrolysis code method based on airspace characteristic time-frequency transformation
KR102077605B1 (en) Method and apparatus for an automatic artifact removal of EEG based on a deep learning algorithm
Xu et al. High accuracy classification of EEG signal
Cichocki Blind signal processing methods for analyzing multichannel brain signals
CN113536882B (en) Multi-class motor imagery electroencephalogram signal feature extraction and classification method
CN111184509A (en) Emotion-induced electroencephalogram signal classification method based on transfer entropy
CN109558863B (en) Electroencephalogram signal feature representation and extraction method and device and storage medium
CN113780392B (en) Channel selection method for motor imagery electroencephalogram identification
CN117503057B (en) Epileptic seizure detection device and medium for constructing brain network based on high-order tensor decomposition
CN109657646B (en) Method and device for representing and extracting features of physiological time series and storage medium
CN112084879A (en) Block selection common space mode feature extraction method for motor imagery electroencephalogram
CN115414051A (en) Emotion classification and recognition method of electroencephalogram signal self-adaptive window
CN115795346A (en) Classification and identification method of human electroencephalogram signals
CN117349598B (en) Electroencephalogram signal processing method and device, equipment and storage medium
Park et al. Optimal channel selection using covariance matrix and cross-combining region in EEG-based BCI
CN113842115A (en) Improved EEG signal feature extraction method
Figueiredo et al. SSA of biomedical signals: A linear invariant systems approach
Ghumman et al. An optimized SWCSP technique for feature extraction in EEG-based BCI system
CN113558644A (en) Emotion classification method, medium and equipment for 3D matrix and multidimensional convolution network
CN117349603B (en) Adaptive noise reduction method and device for electroencephalogram signals, equipment and storage medium
Ahmed et al. Effective hybrid method for the detection and rejection of electrooculogram (EOG) and power line noise artefacts from electroencephalogram (EEG) mixtures

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