Device and system for detecting quality of electroencephalogram signal based on spectrum analysis
Through spectrum analysis and nonlinear fitting technology, the noise and interference of EEG signals are quantified, the accuracy and reliability of EEG signal quality detection is improved, the problem of poor reliability of detection results in the existing technology is solved, and the brain is achieved Effective evaluation of electrical signal quality and noise processing.
Patent Information
- Application Number
- CN202110613604.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-02
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2041-06-02
AI Technical Summary
The detection results of existing EEG signal quality detection methods are poor in reliability, making it difficult to accurately identify noise and artifacts, and the time domain waveforms show different performances at different ages and pathology, which affects the accuracy of the analysis.
Using a detection device based on spectrum analysis, the power spectrum density is obtained through fast Fourier transform, non-linear fitting and decomposing non-periodic and periodic components, combined with feature parameter combination evaluation, quantifying noise and interference, and improving the reliability of signal quality detection. sex.
It improves the accuracy and robustness of EEG signal quality detection, can directly measure power frequency interference, enhances the interpretability and reliability of signal detection, and is suitable for real-time signal quality evaluation and noise reduction operations.
Smart Images

Figure CN115429292B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital signal processing, and in particular to a device and system for detecting the quality of electroencephalogram (EEG) signals based on spectrum analysis. Background Art
[0002] EEG signals, as a source of information for exploring the human brain, can reflect a person's thinking process and emotional changes in different states. As a bioelectric signal, it can generally be collected through electrodes in contact with the head to obtain voltage signals including EEG signals. Therefore, EEG signals can be used as a brain-computer interface to interact with head-mounted devices.
[0003] Due to the irregularity and instability of EEG signals, and their weaker nature than electrocardiogram (ECG) and electromyography (EMG) signals, it is difficult to identify whether EEG signals exist in the collected voltage signals, or to determine whether the collected EEG signals are credible. Therefore, the quality judgment of EEG signals has important guiding and practical significance.
[0004] Scalp electroencephalography (EEG) is the most commonly used and economical non-invasive brain wave detection method. It collects microvolt signals generated by synchronous neuronal activity in the brain by placing electrodes at specific locations on the scalp. However, this method is easily interfered by various environmental and human factors, such as AC power frequency interference, poor electrode contact, eye movement, etc. In the process of EEG signal acquisition, determining the quality of EEG signals is an important part of effectively ensuring the accuracy of subsequent EEG application analysis.
[0005] Most of the existing EEG signal quality assessment methods are based on time domain waveform features for analysis. For example, the mean, variance, energy and other statistics of the EEG segment are measured within a time window of a certain length, and the signal quality is evaluated according to the set hard threshold. This evaluation method has poor adaptive effect and cannot specifically quantify the noise or artifact category, and the reliability of the judgment result is not strong. In addition, the time domain waveform of the EEG signal often behaves differently in different age stages and pathologies. For example, the EEG waves of newborns often have no obvious alpha rhythm and often show paroxysmal rhythmic activities. In addition, the time domain waveform of the EEG signal is greatly affected by noise. Therefore, the present invention proposes an EEG signal quality detection device and system based on spectrum analysis, which comprehensively judges the quality of the EEG signal by analyzing the characteristics of the EEG signal in the frequency domain. Summary of the invention
[0006] The technical problem to be solved by the present invention is: in order to solve the technical problem of poor reliability of detection results of EEG signal detection devices in the prior art, the present invention provides an EEG signal quality detection device based on spectrum analysis, which can combine multiple characteristic parameters to quantify noise and artifacts, thereby improving the reliability and robustness of EEG signal quality detection.
[0007] The technical solution adopted by the present invention to solve the technical problem is: a device for detecting the quality of electroencephalogram signals based on spectrum analysis, comprising:
[0008] An acquisition module, wherein the acquisition module is configured to acquire EEG signals within a time window to obtain M groups of time domain data;
[0009] A preprocessing module, the preprocessing module is connected to the acquisition module, and the preprocessing module is configured to perform a fast Fourier transform on the M groups of time domain data to obtain K groups of frequency domain data, and obtain a power spectral density PSD(F) according to the K groups of frequency domain data;
[0010] A first fitting module, the first fitting module is connected to the preprocessing module, and the first fitting module is configured to perform nonlinear fitting on the data of the non-periodic component in the power spectrum density PSD(F) to obtain a fitting function L(F), and decompose to obtain a first characteristic parameter group in the fitting function L(F);
[0011] A screening module, the screening module is connected to the preprocessing module, and the screening module is configured to remove the data of the non-periodic components in the power spectrum density PSD(F) to obtain the data of the periodic components;
[0012] A second fitting module, the second fitting module is connected to the screening module, and the second fitting module is configured to perform nonlinear fitting on the data of the periodic component to obtain a fitting function G(F) n , decompose to obtain the fitting function G(F) n The second characteristic parameter group in ;
[0013] A detection module, wherein the detection module is connected to the first fitting module, and the detection module is connected to the second fitting module, and the detection module is configured to perform a combined evaluation of the first characteristic parameter group and the second characteristic parameter group to obtain a detection result of the EEG signal quality.
[0014] The device for detecting the quality of EEG signals based on spectrum analysis of the present invention performs fast Fourier transform on the acquired EEG signals through a preprocessing module, converts the time domain signals into frequency domain signals, establishes power spectrum density PSD(F), performs nonlinear fitting on the non-periodic components in the power spectrum density PSD(F) through a first fitting module, performs nonlinear fitting on the periodic components through a second fitting module, obtains multiple characteristic parameters, and performs combined evaluation on the multiple characteristic parameters through a detection module to obtain the detection result of the EEG signal. The device establishes a signal decomposition model, performs fitting processing on the non-periodic components and periodic components of the EEG signal in the frequency domain, quantifies the noise parameters, and increases the interpretability of the signal quality; and can directly measure the interference of the power frequency on the EEG signal, further improving the accuracy of signal detection.
[0015] Further, specifically, the device further includes a calculation module, the calculation module is connected to the first fitting module, the calculation module is connected to the second fitting module, the calculation module is connected to the detection module, and the calculation module is configured to superimpose the fitting function L(F) and the fitting function G(F)n to obtain a final fitting function NPS(F)=L(F)+G(F) n , calculating the regression evaluation index parameters between the final fitting function NPS(F) and the power spectrum density PSD(F); the detection module is configured to combine and evaluate the regression evaluation index parameters, the first feature parameter group and the second feature parameter group to obtain the detection result of the EEG signal quality.
[0016] Further, specifically, the EEG signal is original EEG data acquired in a single channel; or, the EEG signal is EEG data obtained by linearly and nonlinearly combining original EEG data acquired in multiple channels with different spatial distributions.
[0017] Further, specifically, the EEG signal includes at least one periodic component, and each periodic component is subjected to nonlinear fitting to obtain a fitting function G(F): n , each fitting function G(F) n A group of the second characteristic parameter group can be decomposed. When performing EEG signal detection, only at least one group of the second characteristic parameter group, the first characteristic parameter group and the regression evaluation index parameter are selected each time for combined evaluation.
[0018] Further, specifically, the fitting function L(F)=b-log(k+F x), where F represents the frequency variable, b represents the offset, x represents the power-law distribution coefficient, and k is the inflection point; when k and F are zero, the DC component parameter DC is obtained, and the first characteristic parameter group includes the offset b, the power-law distribution coefficient x and the DC component DC. The offset b represents the energy intensity of the low-frequency signal, which reflects the common-mode noise and motion artifacts to a certain extent. The larger the offset b, the greater the low-frequency interference; the power-law distribution coefficient x reflects the non-periodic background signal characteristics of the EEG signal, and its distribution is a normal distribution; the DC component DC reflects the intensity of the DC component of the EEG signal.
[0019] Further, specifically, the fitting function Wherein, F represents the frequency variable, c represents the center frequency, ω represents the bandwidth, a represents the energy height of the center frequency, and the second characteristic parameter group includes the bandwidth ω, the energy height a of the center frequency, and the center frequency c. The bandwidth ω can represent the bandwidth of the interference frequency, and the smaller the bandwidth ω is, the more stable the power supply voltage is; the energy height a can represent the intensity of the interference frequency, and the smaller a is, the smaller the power frequency interference intensity is.
[0020] Further, specifically, the Pearson correlation coefficient Among them, cov represents the covariance of the final fitting function NPS(F) and the power spectrum density PSD(F), represents the variance of the final fitting function NPS(F), and represents the variance of the power spectrum density PSD(F). The Pearson correlation coefficient represents the correlation between the final fitting function NPS(F) and the power spectrum density PSD(F), reflecting the quality of the fitting effect, R 2 The value range is 0-1, and the closer it is to 1, the better the fitting effect.
[0021] Further, specifically, the mean absolute error Wherein, X represents the final fitting function NPS(F), and Y represents the power spectrum density PSD(F).
[0022] Further, specifically, the detection module includes a classification unit, and the classification unit is configured to perform combined evaluation and classification on the first feature parameter group, the second feature parameter group and the regression evaluation index parameter to obtain the detection result of the EEG signal quality.
[0023] Further, specifically, the detection module includes a feature quantization unit, which is configured to combine the first feature parameter group, the second feature parameter group and the regression evaluation index parameter and perform quantitative evaluation through a feature graph to obtain a detection result of the EEG signal quality.
[0024] The present invention also provides a system for detecting the quality of an electroencephalogram signal based on spectrum analysis, comprising the above-mentioned detection device for the quality of an electroencephalogram signal based on spectrum analysis and a visualization device, wherein the visualization device is connected to the detection device for the quality of an electroencephalogram signal based on spectrum analysis. The visualization device can visualize the detection result of the electroencephalogram signal by the detection device, so that the user can more intuitively understand the detection result of the electroencephalogram signal quality.
[0025] Further, specifically, the visualization device includes a display screen, and the display screen is connected to the device for detecting the quality of the electroencephalogram signal based on spectrum analysis.
[0026] Further, specifically, the visualization device includes an indicator light, and the indicator light is connected to the device for detecting the quality of the electroencephalogram signal based on spectrum analysis.
[0027] Further, specifically, the visualization device includes a sound prompt module, and the sound prompt module is connected to the device for detecting the quality of the electroencephalogram signal based on spectrum analysis.
[0028] The beneficial effect of the present invention is that the detection device and system of the quality of the electroencephalogram signal based on spectrum analysis of the present invention performs fast Fourier transform on the acquired electroencephalogram signal through the preprocessing module, converts the time domain signal into the frequency domain signal, establishes the power spectrum density PSD (F), performs nonlinear fitting on the non-periodic components in the power spectrum density PSD (F) through the first fitting module, and performs nonlinear fitting on the periodic components through the second fitting module to obtain multiple characteristic parameters, and the detection result of the electroencephalogram signal is obtained by combining and evaluating the multiple characteristic parameters through the detection module. The device establishes a signal decomposition model, fits the non-periodic components and periodic components of the electroencephalogram signal in the frequency domain, quantifies the noise parameters, and increases the interpretability of the signal quality; and can directly measure the interference of the power frequency on the electroencephalogram signal, further improving the accuracy of signal detection; the device takes into account the interference of factors such as electrode shedding, environmental white noise and power frequency interference on the electroencephalogram signal, and quantifies these noises through parameters, comprehensively considers the influence of various noises when evaluating the quality of the electroencephalogram signal, and improves the reliability of the signal detection result. This device analyzes the quality of EEG signals based on the frequency domain, which can be used for real-time signal quality assessment. Combined with quantitative parameters, it guides users to make corresponding noise reduction operations for "low-quality data segments" to improve data availability. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0030] Figure 1 It is a structural schematic diagram of a device for detecting the quality of electroencephalogram signals based on spectrum analysis of the present invention.
[0031] Figure 2 It is another structural schematic diagram of the device for detecting the quality of EEG signals based on spectrum analysis of the present invention.
[0032] Figure 3 It is a structural schematic diagram of the detection module of the present invention.
[0033] Figure 4 It is another structural schematic diagram of the detection module of the present invention.
[0034] Figure 5 It is a curve schematic diagram of the power spectrum density and the final fitting function of the present invention.
[0035] Figure 6 It is a schematic diagram of the classification results of the SVM classification unit of the present invention.
[0036] Figure 7 1 is a radar diagram of six characteristic parameters and a schematic diagram of area W of the present invention.
[0037] Figure 8 It is a schematic diagram of the closed area Q of the six characteristic parameters of the present invention.
[0038] Fig. 9 It is a schematic diagram of the closed area P of the six characteristic parameters of the present invention.
[0039] Fig.10 It is a schematic diagram of the closed area J of the six characteristic parameters of the present invention.
[0040] Fig.11 It is a schematic diagram of the closed area T of the six characteristic parameters of the present invention.
[0041] Fig.12 It is a schematic diagram of the closed area U of the six characteristic parameters of the present invention.
[0042] Fig.13 It is a structural schematic diagram of the detection system of EEG signal quality based on spectrum analysis of the present invention.
[0043] Fig.14 It is a first structural schematic diagram of the visualization device of the present invention.
[0044] Fig.15 It is a second structural schematic diagram of the visualization device of the present invention.
[0045] Fig.16 It is a third structural schematic diagram of the visualization device of the present invention.
[0046] In the figure: 1. acquisition module, 2. preprocessing module, 3. first fitting module, 4. screening module, 5. second fitting module, 6. detection module, 7. calculation module, 61. classification unit, 62. feature quantization unit, 100. detection device of EEG signal quality based on spectrum analysis, 200. visualization device, 201. display screen, 202. indicator light, 203. sound prompt module. DETAILED DESCRIPTION
[0047] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0048] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0049] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0050] EEG signals have the characteristics of periodic and non-periodic components. Periodic components refer to components with characteristic frequencies, usually called neural oscillation signals, such as delta, theta, alpha, beta, gamma and other specific frequency bands. Non-periodic components refer to non-rhythmic activities or activities without characteristic frequencies.
[0051] like Figure 1 As shown, a device for detecting the quality of an electroencephalogram signal based on spectrum analysis comprises:
[0052] Acquisition module 1, the acquisition module 1 is configured to acquire EEG signals within a time window to obtain M groups of time domain data.
[0053] Preprocessing module 2, preprocessing module 2 is connected to acquisition module 1, and preprocessing module 2 is configured to perform fast Fourier transform on M groups of time domain data to obtain K groups of frequency domain data, and obtain power spectrum density PSD (F) according to the K groups of frequency domain data.
[0054] The first fitting module 3 is connected to the preprocessing module 1, and the first fitting module 3 is configured to perform nonlinear fitting on the data of the non-periodic components in the power spectral density PSD(F) to obtain the fitting function L(F), and decompose to obtain the first characteristic parameter group in the fitting function L(F).
[0055] The screening module 4 is connected to the preprocessing module 2, and the screening module 4 is configured to remove the data of the non-periodic components in the power spectrum density PSD(F) to obtain the data of the periodic components.
[0056] The second fitting module 5 is connected to the screening module 4, and the second fitting module 5 is configured to perform nonlinear fitting on the data of the periodic component to obtain the fitting function G(F)n, and decompose to obtain the second characteristic parameter group in the fitting function G(F)n.
[0057] Detection module 6, detection module 6 is connected to the first fitting module 3, detection module 6 is connected to the second fitting module 5, and detection module 6 is configured to combine and evaluate the first characteristic parameter group and the second characteristic parameter group to obtain a detection result of the EEG signal quality.
[0058] In this embodiment, the EEG signal acquired by the acquisition module 1 within the time window may be the original EEG data acquired through a single channel; or, the EEG signal is the EEG data after linear and nonlinear combination processing of the original EEG data acquired in multiple channels with different spatial distributions, for example, it may be the EEG data after weighted averaging of the original EEG data acquired in multiple channels. In this embodiment, the length of the time window is not limited here, and can be selected as needed. For example, the length of the time window can be a few seconds, a few minutes, a few hours or a few days, and the EEG signal acquired within 1 second can contain more than 1,000 sets of time domain data.
[0059] In this embodiment, the original EEG signal data obtained is time domain data. The preprocessing module 2 can perform fast Fourier transform (FFT) on the time domain data to convert it into frequency domain data. Based on these frequency domain data, the power spectrum density PSD (F) can be obtained. The horizontal axis of the power spectrum density PSD (F) is the frequency, and the vertical axis is the power spectrum density. Depending on the sampling frequency selected by the fast Fourier transform, the amount of frequency domain data obtained is also different.
[0060] In this embodiment, the fitting function obtained by the first fitting module 3 after performing nonlinear fitting on the data of the non-periodic component is L(F)=b-log(k+F x ), where F represents the frequency variable, b represents the offset, x represents the power-law distribution coefficient, and k is the inflection point. When k and F are zero, the DC component parameter DC can be obtained. The first characteristic parameter group may include the offset b, the power-law distribution coefficient x and the DC component DC, but is not limited thereto. For different types of EEG signals, other characteristic parameters may also be included. For example, by inputting multiple sets of non-periodic component data into a software program, a fitting function can be obtained, that is, the values of the offset b and the power-law distribution coefficient x can be obtained. The non-periodic components in a section of EEG signals can be fitted with a function L(F), and a fitting function L(F) can be decomposed into a set of first characteristic parameter groups. EEG signals are transmitted from the neuron group to the scalp, and the attenuation of the signal is distributed in a power-law manner. There are four major types of human brain waves: α waves, β waves, Q waves and δ waves. The α wave of 8-13 Hz is also called the "α rhythm". It is also called the "quiet wave". The brain waves and "longevity waves" when people are in the most quiet state of wakefulness are beneficial to health and longevity, which shows that it is essential to human mental and physical health. The frequency of alpha rhythm is closely related to age. The occipital region of infants and young children has not yet formed the alpha rhythm. Generally, the initial alpha rhythm appears around the age of 3, which is about 8Hz. At the age of 10, it is close to the adult level, reaching 10Hz and mixed with delta waves and theta waves. When the existing technology uses time domain analysis to detect the quality of EEG signals, it cannot be judged by a unified threshold because the time domain waveforms of EEG signals at different age stages are different, and the judgment results are prone to deviations. In different levels of neuronal population activity, changes in the shape of the neural power spectrum reveal different dynamics within the population. Changes in the power law distribution coefficient x mean changes in the correlation between neurons, while the movement of the offset b means an overall increase or decrease in population activity.
[0061] In this embodiment, the non-periodic components in the power spectrum density PSD(F) are removed by the screening module 4, so that only the periodic components remain in the power spectrum density PSD(F), which facilitates the subsequent nonlinear fitting of the periodic components and eliminates interference.
[0062] In this embodiment, the periodic component will appear as a peak in the power spectrum, reflecting the power of a specific frequency. The EEG signal may include multiple periodic components and multiple peaks, and these peaks obey the Gaussian distribution. The second fitting module 5 performs nonlinear fitting on the periodic component to obtain a fitting function Wherein, F represents the frequency variable, c represents the center frequency, ω represents the bandwidth, and a represents the energy height of the center frequency. In this embodiment, the second characteristic parameter group may include the bandwidth ω, the energy height a of the center frequency, and the center frequency c, but is not limited thereto. The second characteristic parameter group may also include other characteristic parameters. It can be understood that a peak value can be fitted to a function G(F) n , a function G(F) n A set of second characteristic parameter groups can be decomposed, and the non-periodic components in the EEG signal can include physiological signals and noise signals. According to the second characteristic parameter group, it can be analyzed whether the peak is a physiological signal or a noise signal. For example, when the EEG signal is interfered by power frequency, such as 50Hz or 60Hz, the corresponding bandwidth and energy height will appear on the fitting curve of the Gaussian distribution, so that the power frequency interference can be directly measured, which is convenient for the subsequent evaluation of the quality of the EEG signal.
[0063] In this embodiment, when the detection module 6 performs the quality detection of the EEG signal, it selects a group of second characteristic parameter groups and the first characteristic parameter group for combined evaluation each time to obtain the quality detection result of the EEG signal. If the collected EEG signal contains multiple peaks, the second characteristic parameter group obtained by fitting each peak is combined and analyzed with the first characteristic parameter group in turn to obtain the quality detection result of the entire EEG signal.
[0064] like Figure 2 As shown, the device further includes a calculation module 7, the calculation module 7 is connected to the first fitting module 3, the calculation module 7 is connected to the second fitting module 5, the calculation module 7 is connected to the detection module 6, and the calculation module 7 is configured to convert the fitting function L(F) and the fitting function G(F) n Superposition is performed to obtain the final fitting function NPS(F)=L(F)+G(F) n , calculate the regression evaluation index parameter between the final fitting function NPS(F) and the power spectrum density PSD(F); the detection module 6 is configured to combine and evaluate the regression evaluation index parameter, the first characteristic parameter group and the second characteristic parameter group to obtain the detection result of the EEG signal quality. The regression evaluation index parameter includes the Pearson correlation coefficient R 2 , mean absolute error MAE, root mean square error RMSE and mean absolute percentage error MAPE, etc. For example, the Pearson correlation coefficient Among them, covX, Y represents the covariance of the final fitting function NPS(F) and the power spectrum density PSD(F), represents the variance of the final fitting function NPS(F), and represents the variance of the power spectrum density PSD(F). Correlation coefficient R 2Represents the correlation between the final fitting function NPS(F) and the power spectrum density PSD(F), reflecting the quality of the fitting result. The R2 value range is 0-1. The closer it is to 1, the better the fitting effect. For example, the mean absolute error Wherein, X represents the final fitting function NPS(F), and Y represents the power spectrum density PSD(F). The smaller the mean absolute error, the better the fitting effect.
[0065] like Figure 3 As shown, the detection module 6 includes a classification unit 61, which is configured to perform combined evaluation and classification on the first feature parameter group, the second feature parameter group and the regression evaluation index parameter to obtain a detection result of the EEG signal quality. The classification unit 61 can be a SVM classification unit, a neural network classification unit, etc.
[0066] like Figure 4 As shown, the detection module 6 includes a feature quantization unit 62, which is configured to combine the first feature parameter group, the second feature parameter group and the regression evaluation index parameter and perform quantitative evaluation through a feature graph to obtain a detection result of the EEG signal quality. The feature graph may include a radar graph, a bar graph or a line graph, etc.
[0067] like Figure 5 As shown, the power spectrum density PSD(F) obtained by processing the acquired EEG signal through the preprocessing module 2 is shown as curve E, the fitting function L(F) of the non-periodic component is shown as curve F, and the final fitting function NPS(F) is shown as curve G, wherein the three peaks of curve G are the results of Gaussian fitting of the periodic component. Figure 5 It can be seen that the central frequencies of the three peaks are 15Hz, 50Hz and 100Hz respectively. The energy height at the frequency of 50Hz is relatively high, indicating that the EEG signal is interfered by the 50Hz power frequency.
[0068] like Figure 6 As shown, taking the SVM classification unit as an example, the SVM classification unit 61 used in this embodiment is a trained SVM classification unit 61. For example, by collecting 20 minutes of EEG data from 15 subjects, each subject has a total of 15*1200*6 feature parameter data. According to the five-fold cross-validation method, the soft margin SVM algorithm is used to train the model, and then used for online evaluation of the quality of EEG signals. The quality of EEG signals can be identified. For example, the output result 0 indicates that the quality of the EEG signal is very good, the output result 1 indicates that the quality of the EEG signal is acceptable, and the output result 2 indicates that the quality of the EEG signal is poor. Figure 6 As shown, Figure 6 (a) is the EEG signal within a certain time window, which is about 1600 seconds. From the figure, we can see that the EEG signal is relatively stable most of the time, but there will be fluctuations at certain moments. Figure 6 (b) is the true label of the EEG signal annotated by the expert, 0 means the EEG signal quality is very good, 1 means the EEG signal quality is fair, and 2 means the EEG signal quality is poor. Figure 6 (c) is the detection result obtained by the SVM classification unit 61 of the present device based on multiple characteristic parameters, where 0 indicates that the EEG signal quality is very good, 1 indicates that the EEG signal quality is fair, and 2 indicates that the EEG signal quality is poor. Figure 6 (b) and Figure 6 (c) It can be seen that the detection results of this method are basically consistent with the true labels annotated by experts. This method can effectively and quickly detect the quality of EEG signals.
[0069] Taking the radar chart as an example, when drawing the radar chart, the selected feature parameters can be any subset of the first feature parameter group, the second feature parameter group and the set of regression evaluation index parameters. The radar chart can be a regular polygon in various forms (such as a regular quadrilateral, a regular pentagon, a regular hexagon, etc.), close to a circle or a circle, and the distribution order of the variables in the radar chart is not unique. 2 , ω, a, b, DC) to draw a radar chart as an example, quantitative evaluation through feature charts specifically includes: first determine the six feature parameters x, R 2 , ω, a, b, DC; draw a radar chart according to the numerical range, adjust the axis scale of each characteristic parameter so that the outer boundary of the radar chart forms a regular hexagon; determine the area W indicating good quality of the EEG signal on the radar chart; determine the position points of the measured value of each characteristic parameter in the radar chart, and connect the position points into a closed area; if the closed area is all inside the area W, it is considered that the EEG signal has good quality; if the closed area is not all inside the area W, it is considered that the EEG signal has poor quality.
[0070] In the quantization process, the characteristic parameter R 2 ω, a, b and DC are all original values obtained by measurement, and the value of x is the mapping value obtained by normal distribution transformation of the original value, for example, by the 3sigma principle. In this embodiment, the value ranges of the six characteristic parameters are: 0≤x≤5, 0.5≤R 2≤1, 0≤ω≤3, 1≤a≤6, 0≤b≤5, 6≤DC≤11. This numerical range is obtained by selecting 15 subjects, collecting more than 1,200 sets of scalp EEG data for each subject, and performing Gaussian probability distribution evaluation and analysis on the collected approximately 20,000 sets of observation data. It can reflect all conditions of the quality of scalp EEG signals to a certain extent. It should be noted that the numerical ranges of different types of EEG signals are different. EEG signals can be, for example, scalp EEG signals or intracranial EEG signals, etc. To draw a radar chart, you can use tools such as Excel or FineReport reporting software, determine a center of a circle, draw six axes in the form of radial lines, set the scale of each axis, so that the drawn radar chart forms a regular hexagon, and each axis represents the numerical range of a characteristic parameter, such as Figure 7 According to the observed values of each characteristic parameter of the large amount of observation data obtained above, the 95% one-sided\two-sided confidence interval of each characteristic parameter under Gaussian distribution is calculated, and the area W indicating good quality of EEG signal can be determined, as shown in Figure 7 As shown. Determine the position points of the values of the six characteristic parameters obtained by real-time measurement in the radar chart respectively, and connect the six position points into a closed area. If the closed area is all inside the area W, it is considered that the EEG signal quality is good; if the closed area is not all inside the area W, it is considered that the EEG signal quality is poor. For example, Figure 7 The closed area O in the figure is where all six characteristic parameters fall within the range of area W, indicating that the quality of the EEG signal is good; Figure 8 The parameter a of the closed area Q in exceeds the range of area W, indicating that the quality of the EEG signal is poor and is interfered by the 50 Hz power frequency. Fig. 9 The parameters x and R of the closed region P in 2 If it exceeds the range of area W, it means that the EEG signal quality is poor and there is electromyographic noise. Fig.10 The parameters b and x of the closed area J in exceed the area W, indicating that the EEG signal is of poor quality and contains low-frequency noise. Fig.11 The parameters b, DC and x of the closed area T in are beyond the area W, indicating that the EEG signal quality is poor and there is electrode shedding interference. Fig.12 The parameters b and DC of the closed area U in exceed the area W, indicating that the EEG signal quality is poor and there are invalid leads.
[0071] like Fig.13 As shown, a system for detecting the quality of an electroencephalogram signal based on spectrum analysis includes a detection device 100 for detecting the quality of an electroencephalogram signal based on spectrum analysis and a visualization device 200, wherein the visualization device 200 is connected to the detection device 100 for detecting the quality of an electroencephalogram signal based on spectrum analysis. The visualization device 200 can intuitively feed back the detection result to the user.
[0072] like Fig.14 As shown, the visualization device 200 includes a display screen 201, and the display screen 201 is connected to the device 100 for detecting the quality of the EEG signal based on spectrum analysis. The display screen 201 can display the detection result of the quality of the EEG signal in the form of text or pictures. For example, if the detection result of the EEG signal is "good quality", "good quality" can be displayed on the display screen 201; if the detection result of the EEG signal is "poor quality", "poor quality" can be displayed on the display screen 201 to give intuitive feedback to the user.
[0073] like Fig.15 As shown, the visualization device 200 includes an indicator light 202, and the indicator light 202 is connected to the device 100 for detecting the quality of the EEG signal based on spectrum analysis. For example, if the EEG signal detection result is "good quality", the indicator light 202 is displayed in green, if the EEG signal detection result is "poor quality", the indicator light 202 is displayed in red, and if the EEG signal detection result is "acceptable quality", the indicator light 202 is displayed in yellow.
[0074] like Fig.16 As shown, the visualization device 200 includes a sound prompt module 203, which is connected to the device 100 for detecting the quality of the EEG signal based on spectrum analysis. For example, if the EEG signal detection result is "good quality", the sound prompt module 203 plays soothing music; if the EEG signal detection result is "poor quality", the sound prompt module 203 plays alarm music; if the EEG signal detection result is "acceptable quality", the sound prompt module 203 plays music with rhythm.
[0075] In summary, the detection device and system of EEG signal quality based on spectrum analysis of the present invention, by performing fast Fourier transform on the acquired EEG signal, converting the time domain signal into a frequency domain signal, and establishing a power spectrum density PSD(F); performing nonlinear fitting on the periodicity and periodicity components in the power spectrum density PSD(F), respectively, to obtain multiple characteristic parameters, and combining and evaluating the multiple characteristic parameters, the result of EEG signal quality can be obtained. This method fits the non-periodic components and periodic components of the EEG signal in the frequency domain by establishing a signal decomposition model, quantizes the noise parameters, and increases the interpretability of the signal quality; and can directly measure the interference of the power frequency on the EEG signal, further improving the accuracy of signal detection. This method analyzes the quality of EEG signals based on the frequency domain, which can be used for real-time signal quality evaluation, and combined with quantized parameters, guides users to perform corresponding noise reduction operations on "low-quality data segments" to improve the availability of data.
[0076] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.
Claims
1. A device for detecting the quality of electroencephalogram signals based on spectrum analysis, characterized in that: include: An acquisition module (1), wherein the acquisition module (1) is configured to acquire an electroencephalogram signal within a time window to obtain M groups of time domain data; A preprocessing module (2), the preprocessing module (2) being connected to the acquisition module (1), the preprocessing module (2) being configured to perform a fast Fourier transform on the M groups of time domain data to obtain K groups of frequency domain data, and to obtain a power spectrum density PSD(F) according to the K groups of frequency domain data; A first fitting module (3), the first fitting module (3) is connected to the preprocessing module (2), and the first fitting module (3) is configured to perform nonlinear fitting on the data of the non-periodic component in the power spectrum density PSD(F) to obtain a fitting function L(F), and decompose to obtain a first characteristic parameter group in the fitting function L(F); the fitting function , where F represents the frequency variable, b represents the offset, x represents the power-law distribution coefficient, and k is the inflection point; when F is zero, the DC component parameter DC is obtained, and the first characteristic parameter group includes the offset b, the power-law distribution coefficient x and the DC component DC; the offset b represents the energy intensity of the low-frequency signal, reflecting the common-mode noise and motion artifacts, and the larger the offset b, the greater the low-frequency interference; the power-law distribution coefficient x reflects the non-periodic background signal characteristics of the EEG signal, and its distribution is a normal distribution; the DC component DC reflects the intensity of the DC component of the EEG signal; A screening module (4), the screening module (4) being connected to the preprocessing module (2), the screening module (4) being configured to remove data of non-periodic components in the power spectrum density PSD(F) to obtain data of periodic components; A second fitting module (5), the second fitting module (5) is connected to the screening module (4), and the second fitting module (5) is configured to perform nonlinear fitting on the data of the periodic component to obtain a fitting function G(F) n , decompose to obtain the fitting function G(F) n The second characteristic parameter group in , wherein F represents the frequency variable, c represents the center frequency, ω represents the bandwidth, and a represents the energy height of the center frequency. The second characteristic parameter group includes the bandwidth ω, the energy height a of the center frequency, and the center frequency c; the bandwidth ω represents the bandwidth of the interference frequency, and the smaller the bandwidth ω, the more stable the power supply voltage; the energy height a represents the intensity of the interference frequency, and the smaller a is, the smaller the power frequency interference intensity is; the center frequency c is used to determine whether it is a normal physiological signal or a power frequency interference; A detection module (6), the detection module (6) being connected to the first fitting module (3), and the detection module (6) being connected to the second fitting module (5); a calculation module (7), the calculation module (7) being connected to the first fitting module (3), the calculation module (7) being connected to the second fitting module (5), the calculation module (7) being connected to the detection module (6), the calculation module (7) being configured to convert the fitting function L(F) and the fitting function G(F) n Superposition is performed to obtain the final fitting function NPS(F)=L(F)+G(F) n , calculate the regression evaluation index parameters between the final fitting function NPS(F) and the power spectrum density PSD(F); the regression evaluation index parameters include the Pearson correlation coefficient R 2 ; The detection module (6) comprises a feature quantization unit (62), wherein the feature quantization unit (62) is configured to combine the first feature parameter group, the second feature parameter group and the regression evaluation index parameter and perform quantitative evaluation through a radar chart to obtain a detection result of the quality of the electroencephalogram signal; The quantitative evaluation by radar chart to obtain the detection result of the EEG signal quality includes: Determine the six characteristic parameters x, R 2 , ω, a, b, DC value range; draw a radar chart according to the value range, adjust the axis scale of each characteristic parameter so that the outer boundary of the radar chart forms a regular hexagon; determine the area W indicating good quality of the EEG signal on the radar chart; determine the position points of the value of each characteristic parameter measured in the radar chart, and connect the position points into a closed area; if the closed area is all inside the area W, it is considered that the EEG signal quality is good; if the closed area is not all inside the area W, it is considered that the EEG signal quality is poor; Among them, the numerical ranges of the six characteristic parameters are: 0≤x≤5, 0.5≤R 2 ≤1, 0≤ω≤3, 1≤a≤6, 0≤b≤5, 6≤DC≤11; determine a center of a circle, draw six axes in the form of radial lines, set the scale of each axis, so that the drawn radar chart forms a regular hexagon, and each axis represents the value range of a characteristic parameter; calculate the 95% one-sided or two-sided confidence interval of each characteristic parameter under Gaussian distribution, and determine the area W indicating good quality of the EEG signal; respectively determine the position points of the values of the six characteristic parameters obtained by real-time measurement in the radar chart, and connect the six position points into a closed area. If the closed area is all inside the area W, it is considered that the EEG signal has good quality; if the closed area is not all inside the area W, it is considered that the EEG signal has poor quality; when the parameter a of the closed area exceeds the range of the area W, it means that the quality of the EEG signal is poor and is interfered by the 50Hz power frequency; when the parameters x and R of the closed area P are 2 If it exceeds the range of area W, it means that the EEG signal quality is poor and there is electromyographic noise; when the parameters b and x in the closed area exceed area W, it means that the EEG signal quality is poor and there is low-frequency noise; when the parameters b, DC and x in the closed area exceed area W, it means that the EEG signal quality is poor and there is electrode detachment interference; when the parameters b and DC in the closed area exceed area W, it means that the EEG signal quality is poor and there are invalid leads.
2. The device for detecting the quality of electroencephalogram signals based on spectrum analysis according to claim 1, characterized in that: The regression evaluation index parameters also include mean absolute error MAE, root mean square error RMSE and mean absolute percentage error MAPE.
3. The device for detecting the quality of electroencephalogram signals based on spectrum analysis according to claim 1, characterized in that: The EEG signal is original EEG data acquired in a single channel; or, the EEG signal is EEG data obtained by linearly and nonlinearly combining original EEG data acquired in multiple channels with different spatial distributions.
4. The device for detecting the quality of electroencephalogram signals based on spectrum analysis according to claim 1, characterized in that: The EEG signal includes at least one periodic component, and each periodic component is subjected to nonlinear fitting to obtain a fitting function G(F) n , each fitting function G(F) n A group of the second characteristic parameter groups can be decomposed.
5. The device for detecting the quality of electroencephalogram signals based on spectrum analysis according to claim 2, characterized in that: The Pearson correlation coefficient , wherein cov(X, Y) represents the covariance of the final fitting function NPS(F) and the power spectral density PSD(F), represents the variance of the final fitting function NPS(F), and represents the variance of the power spectral density PSD(F).
6. The device for detecting the quality of electroencephalogram signals based on spectrum analysis according to claim 2, characterized in that: The mean absolute error , where X represents the final fitting function NPS(F), and Y represents the power spectral density PSD(F) 。 7. The device for detecting the quality of electroencephalogram signals based on spectrum analysis according to claim 1, characterized in that: The detection module (6) comprises a classification unit (61), wherein the classification unit (61) is configured to perform combined evaluation and classification on the first characteristic parameter group, the second characteristic parameter group and the regression evaluation index parameter to obtain a detection result of the electroencephalogram signal quality.
8. A system for detecting the quality of electroencephalogram signals based on spectrum analysis, characterized in that: It comprises a device (100) for detecting the quality of electroencephalogram signals based on spectrum analysis as claimed in any one of claims 1 to 7 and a visualization device (200), wherein the visualization device (200) is connected to the device (100) for detecting the quality of electroencephalogram signals based on spectrum analysis.
9. The system for detecting the quality of electroencephalogram signals based on spectrum analysis as claimed in claim 8, characterized in that: The visualization device (200) comprises a display screen (201), and the display screen (201) is connected to the device (100) for detecting the quality of electroencephalogram signals based on spectrum analysis.
10. The system for detecting the quality of electroencephalogram signals based on spectrum analysis according to claim 8, characterized in that: The visualization device (200) comprises an indicator light (202), and the indicator light (202) is connected to the device (100) for detecting the quality of electroencephalogram signals based on spectrum analysis.
11. The system for detecting the quality of electroencephalogram signals based on spectrum analysis according to claim 8, characterized in that: The visualization device (200) comprises a sound prompt module (203), and the sound prompt module (203) is connected to the brain electric signal quality detection device (100) based on spectrum analysis.
