Electroencephalogram artifact removal method, system and device based on ica and outlier detection
By employing ICA and outlier detection-based methods, and utilizing the fastICA algorithm and improved boxplot technology to identify and remove artifact components, this approach solves the problems of high complexity and low accuracy in existing EEG artifact removal techniques, achieving efficient and robust artifact removal results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUXI MENTAL HEALTH CENT
- Filing Date
- 2022-12-27
- Publication Date
- 2026-04-28
AI Technical Summary
Existing methods for removing EEG artifacts are complex, inaccurate, and have poor robustness, making it difficult to effectively remove artifacts from EEG signals.
An ICA-based and outlier detection method is adopted. The EEG signal is decomposed by the fastICA algorithm, and artifact components are identified and removed by using kurtosis coefficient and improved box plot technology. The outlier factor is optimized by combining particle swarm optimization algorithm to achieve automatic artifact removal.
It achieves efficient and automatic removal of artifacts from multi-channel EEG signals, preserving the authenticity of the original signals and improving the accuracy of artifact removal and the robustness of the algorithm.
Smart Images

Figure CN116070101B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electroencephalogram (EEG) signal analysis technology, and in particular to an EEG artifact removal method, system, and device based on ICA (Independent Component Analysis) and outlier detection. Background Technology
[0002] Electroencephalography (EEG) can be acquired using two methods: invasive and non-invasive techniques. The former often requires surgical intervention, while the latter measures the brain's electrical activity using non-invasive electronic instruments and has wide applications in medicine and brain-computer interface engineering. EEG signals recorded by electrodes are often contaminated by artifacts such as eye movements, blinking, muscle activity, and circuit noise. These artifacts typically present as high-amplitude, low-frequency signals, compromising the originality of the EEG data. Therefore, artifact removal is a necessary step in EEG data preprocessing. However, current filtering-based artifact removal methods have limitations because artifact frequencies overlap with the true signal frequencies. Time- or frequency-based regression methods require a reference channel, and since the influence of artifact activity and the EEG signal is bidirectional, the accuracy of the EEG signal cannot be guaranteed. Principal Component Analysis (PCA), as a decomposition method, has been proposed to eliminate eye movement artifacts in EEG recordings; however, PCA cannot completely separate artifacts from the EEG signal.
[0003] ICA has become an effective method for removing artifacts. ICA separates the acquired EEG signal into statistically independent signal sources (ICs), facilitating further identification of artifact sources. One paper proposes the AWICA algorithm, which first uses Discrete Wavelet Transform (DWT) to recursively generate signals in different frequency bands. Discrete convolution between the input signal and low-pass filter h[n] (corresponding to the scaling function) and high-pass filter g[n] (corresponding to the wavelet function) yields effective decomposition, outputting approximation coefficients and detail coefficients respectively. Artifact components identified through kurtosis coefficients or fuzzy entropy are removed; finally, the signal is reconstructed using inverse ICA and inverse DWT. However, Discrete Wavelet Transform (DWT) requires consideration of the selection of wavelet basis functions and the number of decomposition levels, resulting in high complexity, low accuracy, and poor robustness for the AWICA algorithm in removing computer artifacts.
[0004] Therefore, it is necessary to propose a new method for removing computer artifacts to solve the above problems. Summary of the Invention
[0005] This invention provides a method, system, and device for removing EEG artifacts based on ICA and outlier detection, which addresses the problems of high complexity, low accuracy, and poor robustness in existing EEG artifact removal methods.
[0006] To address the aforementioned technical problems, embodiments of the present invention provide a method for removing EEG artifacts based on ICA and outlier detection, the method comprising:
[0007] S1: Real-time selection of EEG signals containing artifacts;
[0008] S2: Preprocess the EEG signal containing artifacts;
[0009] S3: Process the preprocessed EEG signal to decompose and generate... A single, independently estimated source signal;
[0010] S4: Calculate the kurtosis coefficient of each independent estimated source signal and set the threshold for the kurtosis coefficient;
[0011] S5: Determine whether each independent estimated source signal is a spurious source based on the set kurtosis coefficient threshold. If it is, detect abnormal data in the spurious source and process the abnormal data; if not, obtain the remaining source signals.
[0012] S6: Reconstruct the processed artifact source and the remaining source signal to obtain the artifact-free EEG signal.
[0013] Preferably, in step S1, the method for selecting the EEG signal containing artifacts is as follows:
[0014] Select the EEG signals of L channels contaminated by artifacts within a sliding time window of fixed width.
[0015] Preferably, in step S2, the method for preprocessing the EEG signal containing artifacts is as follows:
[0016] Butterworth bandpass filtering was applied to the EEG data signals within the sliding time window to remove frequency bands other than those in the actual EEG data.
[0017] Preferably, in step S3, the preprocessed EEG signal is processed by the ICA algorithm to decompose it into N independent estimated source signals. The ICA algorithm is the fastICA algorithm based on the maximum negative entropy.
[0018] Preferably, the preprocessed EEG signal is processed to decompose and generate Each independent source signal estimation includes the following steps:
[0019] S31: Will The observed signals from each channel were normalized to a zero-mean signal;
[0020] S32: Perform eigenvalue decomposition on the covariance matrix of the observed signal, and then... Whitening generation matrix ,in It is a matrix composed of eigenvectors column by column. It is a diagonal matrix of eigenvalues;
[0021] S33: Estimating one by one Construct the unmixing matrix from 1 independent estimated source signal. Set the number of iterations, where It is the nth independent estimated source signal;
[0022] S34: Yes Initialization, so that ;
[0023] S35: Iterative calculation based on the fastICA algorithm with maximum negative entropy. The iterative formula is expressed as follows:
[0024] ;
[0025] Among them, nonlinear functions , yes The derivative of Normalization ;
[0026] judge Whether it is valid, If the result is 0.0001, continue iterating if the condition is not met; otherwise, proceed to step S36.
[0027] S36: When Use the symmetric orthogonal method renew ,judge If convergence is not achieved, proceed to step S35; if convergence is achieved, proceed to step S37.
[0028] S37: Repeat step S34 until n equals the number of independent estimated source signals. .
[0029] Preferably, in step S4, the kurtosis coefficients of each independent estimated source signal are calculated, and the formula for calculating the kurtosis coefficients is as follows:
[0030]
[0031] in, Indicates the first Peak state coefficients of the signal sequence of the source signal. The estimated first Individual source signal sequence The central moment of the order.
[0032] Preferably, in step S5, the method for processing abnormal data includes the following steps:
[0033] S51: Divide the data into three quartiles using the interquartile range. and Areas outside the specified range represent anomalous data, where It is an outlier factor. It is the first quartile. It is the third or fourth quartile. It is the first quartile and third and fourth place The distance between them;
[0034] S52: Optimizing outlier factors using particle swarm optimization algorithm Finding the artifact component with the best artifact removal effect involves the following steps:
[0035] Step 1: Initialize particle swarm parameters, including particle velocity and position, number of iterations, learning factor, and inertia weight;
[0036] Step 2: Substitute the random initial parameter values into the box plot algorithm and clear the data that exceeds the outlier cutoff point;
[0037] Step 3: Calculate the correlation coefficient between the reconstructed signal and the original clean signal data segment, and use this correlation coefficient as the objective function;
[0038] Step 4: Update the velocity and position of the particles to obtain the updated particle fitness values;
[0039] Step 5: Continue updating the individual and population extreme values of particles based on the new fitness values to maximize the correlation coefficient. After a set number of iterations, output the optimal value. value;
[0040] The formula for the correlation coefficient is as follows:
[0041]
[0042] in, Indicates the first Channel observation of EEG signals, This represents the EEG signal after artifact removal. The covariance of two signal sequences is represented by... Represents the variance of the signal sequence;
[0043] S53: By using the optimal Substitute the value into the formula This will clear the outliers of the artifact components to zero.
[0044] This invention also provides an EEG artifact removal system based on ICA and outlier detection, the system comprising:
[0045] The selection module is used to select EEG signals containing artifacts in real time;
[0046] The preprocessing module is used to process the EEG signal containing artifacts;
[0047] The independent component analysis module is used to process the processed EEG signal and decompose it into N independent estimated source signals;
[0048] The kurtosis coefficient calculation module is used to calculate the kurtosis coefficient of each independent estimated source signal and set the threshold for the kurtosis coefficient.
[0049] The spurious source identification and processing module is used to determine whether each independent estimated source signal is a spurious source based on a set kurtosis coefficient threshold. If it is, it detects abnormal data in the spurious source and processes the abnormal data; otherwise, it obtains the remaining source signals.
[0050] The EEG signal reconstruction module is used to reconstruct the processed artifact sources and the remaining source signals to obtain the artifact-free EEG signal.
[0051] This invention also provides an electronic device that includes the EEG artifact removal method based on ICA and outlier detection described in any one of the above embodiments, in order to remove EEG artifacts.
[0052] This invention also provides a computer storage medium storing a computer software product, the computer software product including several instructions for causing a computer device to execute any of the above-described methods for removing EEG artifacts based on ICA and outlier detection.
[0053] The technical solution of the present invention has the following advantages compared with the prior art:
[0054] This invention provides a method, system, and device for EEG artifact removal based on ICA and outlier detection. First, the invention utilizes the ICA algorithm to obtain the components of each independently estimated signal source. Then, artifacts are identified based on the kurtosis coefficient. An improved boxplot technique used in the artifact components clears the obtained outliers, achieving automatic artifact removal from multi-channel EEG signals while preserving the authenticity of the original signal. The outlier detection proposed in this invention employs an outlier factor optimization based on the particle swarm optimization algorithm. The optimal outlier factor is obtained when the objective function, i.e., the correlation coefficient, is maximized, thus finding the artifact component with the best denoising effect to preserve the true EEG signal. The EEG signal artifact removal algorithm provided by this invention has low complexity and is easy to integrate into distributed devices. As edge computing gradually becomes a mainstream processing method, artifact removal should be implemented in embedded devices before acquiring EEG signals in the cloud. Attached Figure Description
[0055] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly described below. Referring to the drawings will make the features and advantages of the present invention clearer. The drawings are illustrative and should not be construed as limiting the present invention in any way. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0056] Figure 1 A flowchart of an EEG artifact removal method based on ICA and outlier detection according to the present invention;
[0057] Figure 2 A kurtosis coefficient diagram of 22 components provided by the present invention;
[0058] Figure 3 This is a diagram showing the distribution of EEG electrode channels provided in this invention;
[0059] Figure 4 A comparison of SNR and CC values in 22 channels between the zeroing-ICA method provided in this invention and the EEG artifact removal method based on ICA and outlier detection provided in this invention.
[0060] Figure 5 A comparison of SNR and CC values in 22 channels between AWICA provided in this invention and the EEG artifact removal method based on ICA and outlier detection provided in this invention.
[0061] Figure 6 A comparison of SNR and CC values in 22 channels between the ICA-DWT method provided in this invention and the EEG artifact removal method based on ICA and outlier detection provided in this invention.
[0062] Figure 7 This is a block diagram of an EEG artifact removal system based on ICA and outlier detection provided in this invention. Detailed Implementation
[0063] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.
[0064] Reference Figure 1 As shown, this embodiment of the invention provides a method for removing EEG artifacts based on ICA and outlier detection, the method comprising:
[0065] S1: Real-time selection of EEG signals containing artifacts;
[0066] S2: Preprocess the EEG signal containing artifacts;
[0067] S3: Process the preprocessed EEG signal to decompose and generate... A single, independently estimated source signal;
[0068] S4: Calculate the kurtosis coefficient of each independent estimated source signal and set the threshold for the kurtosis coefficient;
[0069] S5: Determine whether each independent estimated source signal is a spurious source based on the set kurtosis coefficient threshold. If it is, detect abnormal data in the spurious source and process the abnormal data; if not, obtain the remaining source signals.
[0070] S6: Reconstruct the processed artifact source and the remaining source signal to obtain the artifact-free EEG signal.
[0071] This invention provides a method for removing artifacts from EEG signals based on ICA and outlier detection. The method involves using ICA to obtain the components of each independently estimated signal source from the EEG signal; identifying artifacts based on kurtosis coefficients; and using an improved boxplot technique to clear outliers from the artifact components. The processed artifact sources and the remaining source signals are then reconstructed to obtain the artifact-removed EEG signal. This invention achieves automatic artifact removal from multi-channel EEG signals. The artifact removal method provided by this invention has a higher correlation coefficient with clean data segments while preserving the authenticity of the original signal. Compared with existing methods, this invention's method has higher accuracy and better robustness in artifact removal.
[0072] Further, step S1 includes:
[0073] Select artifact-contaminated areas within a fixed-width sliding time window. EEG signals from each channel.
[0074] Further, step S2 includes:
[0075] Since EEG signals are mainly concentrated in the 1-50Hz range, Butterworth bandpass filtering is applied to the EEG data signals within the sliding time window to remove frequency bands outside the actual EEG data.
[0076] Further, step S3 includes:
[0077] The above bandpass filtered waveform signal is processed by the ICA algorithm to decompose and generate... The specific process for estimating an independent source signal is as follows:
[0078] The ICA algorithm is typically used to decompose mixed data into statistically independent non-Gaussian components. The EEG signals measured in each acquisition channel are used as the input matrix, where, , It is a time series. A set of statistically independent source signals in the brain linear mixture, i.e. ,in It is a mixed matrix. Consider the number of channels. and component number When they are equal, independent component analysis is equivalent to solving for the inverse of the mixture matrix. The process makes The goal is to restore the original signal as much as possible. This invention employs the fastICA algorithm, which maximizes negative entropy, to perform independent component decomposition on EEG signals containing artifacts.
[0079] The specific implementation steps of the fastICA algorithm are as follows:
[0080] S31: Will The observed signals from each channel are normalized to a zero-mean signal, simplifying ICA processing;
[0081] S32: Perform eigenvalue decomposition on the covariance matrix of the observed signal, and then... Whitening generation matrix ,in It is a matrix composed of eigenvectors column by column. It is the diagonal matrix of eigenvalues, the whitened matrix. The covariance matrix is an identity matrix, which means that the correlation between observed signals is removed and the redundancy between observed data is reduced.
[0082] S33: Estimating one by one Construct the unmixing matrix from 1 independent estimated source signal. Set the number of iterations to 1000, where It is the nth independent estimated source signal;
[0083] S34: Yes Initialization, so that ;
[0084] S35: Iterative calculation based on the fastICA algorithm with maximum negative entropy. The iterative formula is expressed as follows:
[0085] ;
[0086] Among them, nonlinear functions , yes The derivative of Normalization ;
[0087] judge Whether it is valid, If the result is 0.0001, continue iterating if the condition is not met; otherwise, proceed to step S36.
[0088] S36: When Use the symmetric orthogonal method renew ,judge If convergence is not achieved, proceed to step S35; if convergence is achieved, proceed to step S37.
[0089] S37: Repeat step S34 until n equals the number of independent estimated source signals. .
[0090] Further, step S4 includes:
[0091] When EEG signal data containing artifacts undergoes ICA decomposition, several independent source signals exhibit artifact-like characteristics. Kurtosis, representing the fourth-order cumulant, is used to assess the peak distribution of a random variable. Because the amplitude of EEG signals is lower than that of artifact signals, independent source signals containing artifacts exhibit larger kurtosis coefficients. The formula for calculating the kurtosis coefficient of a signal sequence from a single source signal is as follows:
[0092]
[0093] in, Indicates the first Peak state coefficients of the signal sequence of the source signal. The estimated first Individual source signal sequence The central moment of the order.
[0094] The kurtosis coefficients of the 22 decomposed components were calculated using the above formula. The results are as follows: Figure 2 As shown in the figure, it can be seen that the kurtosis coefficients of the 22 decomposed components are basically below 5.5. Therefore, the threshold for the kurtosis coefficients is set to 5.5 in subsequent processing.
[0095] Further, step S5 includes:
[0096] The kurtosis coefficient threshold is used to determine whether each independent estimated source signal is a spurious source. Components exceeding the threshold are considered spurious components, which can be used for preliminary identification. , and This identifies the sources of artifacts. After detecting artifact sources, box plotting techniques are used to examine the artifact components within them. These anomalous data are then processed, and the method for processing the anomalous data includes the following steps:
[0097] S51: Divide the data into three quartiles using the interquartile range. and Areas outside the specified range represent anomalous data, where It is an outlier factor. It is the first quartile. It is the third or fourth quartile. It is the first quartile and third and fourth place The distance between them;
[0098] S52: Optimizing outlier factors using particle swarm optimization algorithm Finding the artifact component with the best artifact removal effect involves the following steps:
[0099] Step 1: Initialize particle swarm parameters, including particle velocity and position, number of iterations, learning factor, and inertia weight;
[0100] Step 2: Substitute the random initial parameter values into the box plot algorithm and clear the data that exceeds the outlier cutoff point;
[0101] Step 3: Calculate the correlation coefficient between the reconstructed signal and the original clean signal data segment, and use this correlation coefficient as the objective function;
[0102] Step 4: Update the velocity and position of the particles to obtain the updated particle fitness value;
[0103] Step 5: Continue updating the individual and population extreme values of particles based on the new fitness values to maximize the correlation coefficient. After a set number of iterations, output the optimal value. value;
[0104] The formula for the correlation coefficient is as follows:
[0105]
[0106] in, Indicates the first Channel observation of EEG signals, This represents the EEG signal after artifact removal. The covariance of two signal sequences is represented by... Represents the variance of the signal sequence;
[0107] S53: By using the optimal Substitute the value into the formula This will clear the outliers of the artifact components to zero.
[0108] Furthermore, step S6 includes:
[0109] The processed artifact sources and the remaining source signals are reconstructed to obtain the artifact-free EEG signal.
[0110] The performance advantages of the method of the present invention will be verified through specific experiments below.
[0111] I. Experimental Dataset
[0112] This experiment used the dataset Dataset2a from the 4th International Brain-Computer Interface Competition (BCI Competition IV).
[0113] II. Experimental Procedure
[0114] The experiment involved four types of motor imagery tasks: imagining left hand movement, imagining right hand movement, imagining both feet movement, and imagining tongue movement. Each task was performed 12 times, followed by a short rest. Divided into six parts, this resulted in a total of 288 experiments. This experiment used... Each electrode channel records the EEG signal, namely Fz, FC3, FC1, FCz, FC2, FC4, C5, C3, C1, Cz, C2, C4, C6, CP3, CP1, CPz, CP2, CP4, P1, Pz, P2, and P0z. Figure 3 This is the corresponding EEG electrode channel distribution map. The experiment used the EEGLAB toolbox to segment the data and preprocessed the EEG data of four types of motor imagery from 288 trials with a fixed width of 2-4 seconds.
[0115] III. Performance Analysis
[0116] Performance evaluation metrics selection: There are two main evaluation metrics. The first is the signal-to-noise ratio (SNR), which measures the integrity of the data retaining the true EEG data after artifact removal. The higher the value, the better the original, true EEG signal is preserved after artifact removal. The calculation formula is as follows:
[0117]
[0118] in, Indicates the first Channel observation of EEG signals, This represents the EEG signal after artifact removal. This represents the number of sampling points.
[0119] A segment of data with fewer artifacts from a real EEG dataset is selected and considered as pure EEG data. The correlation coefficient (CC) is introduced for performance evaluation, and its calculation formula is expressed as follows:
[0120]
[0121] in, Indicates the first Channel observation of EEG signals, This represents the EEG signal after artifact removal. The covariance of two signal sequences is represented by... It represents the variance of the signal sequence.
[0122] The correlation coefficient is used to evaluate the similarity between the original clean signal and the artifact-removed signal. The higher the calculated CC value, the more similar the artifact-removed signal is to the original clean signal, and the better the artifact removal effect.
[0123] Figure 4-6 The images show a comparison of SNR and CC values across 22 channels for zeroing-ICA, AWICA, ICA-DWT, and the EEG artifact removal method based on ICA and outlier detection proposed in this invention.
[0124] As can be seen from the figure, among the four methods, the method proposed in this invention significantly outperforms the other three existing methods. Because the method of this invention optimizes the parameters of the outlier factor, it removes artifacts while preserving the original signal to the greatest extent possible, indicating that a purer signal more similar to the original signal is retained after peak removal. According to... Figure 4Compared to Zeroing-ICA, the proposed algorithm achieves a significantly higher signal-to-noise ratio (SNR) for all channels, particularly in the Fz channel, where it nearly doubles the SNR. This is significant considering that Zeroing-ICA removes a large amount of useful EEG signal while removing noise, resulting in a lower SNR. Based on... Figure 5 and Figure 6 As shown, the algorithm presented in this paper demonstrates superior noise removal capabilities across all EEG channels compared to the other two algorithms, resulting in a signal that more closely resembles the original, clean signal after artifact removal. The average similarity obtained by the proposed method is 3.57% and 1.08% higher than AWICA and ICA-DWT, respectively. The effectiveness of AWICA and ICA-DWT in preserving accurate EEG data while removing artifacts falls between the proposed algorithm and zeroing-ICA. In the Fz channel, compared to methods that directly remove artifact sources, the proposed method improves the correlation coefficient by 16%. This demonstrates the accuracy of the proposed method in artifact removal, namely, maximizing the integrity of the original EEG waves while removing artifacts.
[0125] To demonstrate the robustness of the proposed method, data segments of various imagined movements were randomly extracted from the dataset, including data from the 2nd to 4th seconds and the 4th to 6th seconds of various imagined movements, as well as data from the 2nd to 6th seconds of complete execution of various imagined movements. The performance comparison results of different methods in SNR and CC are shown in Table 1.
[0126] Table 1
[0127]
[0128] From the table above, we can see that the method proposed in this invention is superior to ICA-DWT in all data segments, ICA-DWT is superior to AWICA, and AWICA is superior to Zeroing-ICA.
[0129] like Figure 7 As shown, this invention provides an EEG artifact removal system based on ICA and outlier detection, the system comprising:
[0130] The selection module 100 is used to select EEG signals containing artifacts in real time;
[0131] Preprocessing module 200 is used to process the EEG signal containing artifacts;
[0132] The independent component analysis module 300 is used to process the processed EEG signal and decompose it into N independent estimated source signals;
[0133] The kurtosis coefficient calculation module 400 is used to calculate the kurtosis coefficient of each independent estimated source signal and set the threshold of the kurtosis coefficient;
[0134] The spurious source identification and processing module 500 is used to determine whether each independent estimated source signal is a spurious source based on a set kurtosis coefficient threshold. If it is, it detects abnormal data in the spurious source and processes the abnormal data; otherwise, it obtains the remaining source signals.
[0135] The EEG signal reconstruction module 600 is used to reconstruct the processed artifact source and the remaining source signal to obtain the artifact-free EEG signal.
[0136] This system is used to implement the EEG artifact removal method based on ICA and outlier detection described above. To avoid redundancy, it will not be elaborated further here.
[0137] This invention provides an electronic device including the EEG artifact removal method based on ICA and outlier detection as described in any one of the above embodiments, to remove EEG artifacts. To avoid redundancy, further details are omitted here.
[0138] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0139] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0140] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0141] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0142] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A method for removing EEG artifacts based on ICA and outlier detection, characterized in that, include: S1: Real-time selection of EEG signals containing artifacts; S2: Preprocess the EEG signal containing artifacts; S3: Process the preprocessed EEG signal to decompose and generate... A single, independently estimated source signal; S4: Calculate the kurtosis coefficient of each independent estimated source signal and set the threshold for the kurtosis coefficient; S5: Determine whether each independent estimated source signal is a spurious source based on the set kurtosis coefficient threshold. If it is, detect abnormal data in the spurious source and process the abnormal data; if not, obtain the remaining source signals. S6: Reconstruct the processed artifact source and the remaining source signal to obtain the artifact-free EEG signal; S51: Divide the data into three quartiles using the interquartile range. and Areas outside the specified range represent anomalous data, where It is an outlier factor. It is the first quartile. It is the third or fourth quartile. It is the first quartile and third and fourth place The distance between them; S52: Optimizing outlier factors using particle swarm optimization algorithm Finding the artifact component with the best artifact removal effect involves the following steps: Step 1: Initialize particle swarm parameters, including particle velocity and position, number of iterations, learning factor, and inertia weight; Step 2: Substitute the random initial parameter values into the box plot algorithm and clear the data that exceeds the outlier cutoff point; Step 3: Calculate the correlation coefficient between the reconstructed signal and the original clean signal data segment, and use this correlation coefficient as the objective function; Step 4: Update the velocity and position of the particles to obtain the updated particle fitness value; Step 5: Continue updating the individual and population extreme values of particles based on the new fitness values to maximize the correlation coefficient. After a set number of iterations, output the optimal value. value; The formula for the correlation coefficient is as follows: ; in, Indicates the first Channel observation of EEG signals, This represents the EEG signal after artifact removal. The covariance of two signal sequences is represented by... Represents the variance of the signal sequence; S53: By using the optimal Substitute the value into the formula This will clear the outliers of the artifact components to zero.
2. The EEG artifact removal method based on ICA and outlier detection according to claim 1, characterized in that, In step S1, the method for selecting EEG signals containing artifacts is as follows: Select artifact-contaminated areas within a fixed-width sliding time window. EEG signals from each channel.
3. The EEG artifact removal method based on ICA and outlier detection according to claim 1, characterized in that, In step S2, the method for preprocessing the EEG signal containing artifacts is as follows: Butterworth bandpass filtering was applied to the EEG data signals within the sliding time window to remove frequency bands other than those in the actual EEG data.
4. The EEG artifact removal method based on ICA and outlier detection according to claim 1, characterized in that, In step S3, the preprocessed EEG signal is processed using the ICA algorithm to decompose and generate... There are 1 independent source signal for estimation, and the ICA algorithm is the fastICA algorithm based on the maximum negative entropy.
5. The EEG artifact removal method based on ICA and outlier detection according to claim 1, characterized in that, The preprocessed EEG signal is processed and decomposed to generate Each independent source signal estimation includes the following steps: S31: Will The observed signals from each channel were normalized to a zero-mean signal; S32: Perform eigenvalue decomposition on the covariance matrix of the observed signal, and then... Whitening generation matrix ,in It is a matrix composed of eigenvectors column by column. It is a diagonal matrix of eigenvalues; S33: Estimating one by one Construct the unmixing matrix from 1 independent estimated source signal. Set the number of iterations, where It is the nth independent estimated source signal; S34: Yes Initialization, so that ; S35: Iterative calculation based on the fastICA algorithm with maximum negative entropy. The iterative formula is expressed as follows: ; Among them, nonlinear functions , yes The derivative of Normalization ; judge Whether it is valid, If the result is 0.0001, continue iterating if the condition is not met; otherwise, proceed to step S36. S36: When Use the symmetric orthogonal method renew ,judge If convergence is not achieved, proceed to step S35; if convergence is achieved, proceed to step S37. S37: Repeat step S34 until n equals the number of independent estimated source signals. .
6. The EEG artifact removal method based on ICA and outlier detection according to claim 1, characterized in that, In step S4, the kurtosis coefficients of each independent estimated source signal are calculated. The formula for calculating the kurtosis coefficients is as follows: ; in, Indicates the first Peak state coefficients of the signal sequence of the source signal. The estimated first Individual source signal sequence The central moment of the order.
7. A brainwave artifact removal system based on ICA and outlier detection, characterized in that, The system is used to implement the EEG artifact removal method based on ICA and outlier detection as described in any one of claims 1 to 6, comprising: The selection module is used to select EEG signals containing artifacts in real time; The preprocessing module is used to process the EEG signal containing artifacts; An independent component analysis module is used to process the processed EEG signal and decompose it into components. A single, independently estimated source signal; The kurtosis coefficient calculation module is used to calculate the kurtosis coefficient of each independent estimated source signal and set the threshold for the kurtosis coefficient. The spurious source identification and processing module is used to determine whether each independent estimated source signal is a spurious source based on a set kurtosis coefficient threshold. If it is, it detects abnormal data in the spurious source and processes the abnormal data; otherwise, it obtains the remaining source signals. The EEG signal reconstruction module is used to reconstruct the processed artifact sources and the remaining source signals to obtain the artifact-free EEG signal.
8. An electronic device, characterized in that, The method includes the EEG artifact removal method based on ICA and outlier detection as described in any one of claims 1 to 6, to achieve the removal of EEG artifacts.
9. A computer storage medium, characterized in that, The computer storage medium stores a computer software product, which includes several instructions for causing a computer device to execute the EEG artifact removal method based on ICA and outlier detection as described in any one of claims 1 to 6.
Citation Information
Patent Citations
A method for automatically detecting and removing artifacts from EEG signal
CN1883384A