Signal artifact detection method and detection system, signal artifact removal method
By setting reference sampling rate and wavelet decomposition standards in signal artifact detection, the data of different sampling rates are unified for wavelet decomposition and airspace decomposition, the problem that the self-correlation coefficient detection threshold is affected by the sampling rate is solved, and the accuracy of signal artifacts is achieved Identify and remove.
Patent Information
- Application Number
- CN202411295752.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-09-18
AI Technical Summary
In the prior art, in signal artifact detection, the self-correlation coefficient detection threshold is affected by the sampling rate, resulting in limited applicability and accuracy of the detection system, and it is impossible to adapt to data of different sampling rates.
By setting the standard data set and the reference sampling rate during the wavelet decomposition process, the data of different sampling rates are unified to the reference sampling rate and wavelet decomposition and airspace decomposition are performed to identify and remove signal artifacts to ensure the stability of the detection threshold.
The unified signal artifact detection threshold value at different sampling rates is achieved, which improves the stability and accuracy of detection and avoids detection threshold adjustment due to sampling rate changes.
Smart Images

Figure CN118806299B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of signal artifact detection, and in particular relates to a signal artifact detection method and a detection system thereof, and a signal artifact removal method. Background Art
[0002] EEG is a weak physiological electrical signal. When collecting EEG, it is easy to introduce physiological artifacts such as electrooculography and electromyography, which has a great impact on its subsequent analysis, classification and detection. Specifically, the amplitude of electrooculography artifacts is large and the frequency range is narrow, while electromyography artifacts have broadband characteristics and overlap more with the high-frequency band of EEG. Therefore, for physiological signals with different sampling rates, the existing artifact signals are also diverse, resulting in the inability of the same artifact detection threshold to adapt to all sampling rates. As patent CN111772617B discloses an ECG display filtering method, device and storage medium, artifacts are identified based on the wavelet coefficients of the signal after wavelet decomposition. Different sampling rates require adaptation of different wavelet layers and different detection thresholds. It matches data with different sampling rates by changing the detection threshold, rather than adapting the same detection threshold to all sampling rates.
[0003] In the related art, for example, patent CN106805945B discloses a method for eliminating electromyographic artifacts in EEG signals of a few channels, wherein the eigenmode component matrix I(t) corresponding to the EEG signal is blindly separated by independent variable analysis to obtain a mixing matrix A, an inverse mixing matrix W and a source signal matrix Y(t), and the autocorrelation coefficient value rb of the bth source signal yb(t) in the source signal matrix Y(t) is obtained, and the bth source signal yb(t) is judged as a source signal containing electromyographic artifacts by identifying a threshold. For example, patent CN111631710B discloses a method for eliminating electromyographic artifacts in state-related dynamic EEG signals, which uses hidden Markov independent vector analysis to perform dynamic joint blind source separation on K data sets X, and obtains the brain power signal matrix Sk and unmixing matrix Wk of the kth data set Xk under different mixing modes; corresponding to each mixing mode, the channel signal with a smaller autocorrelation coefficient in the kth brain power signal matrix Sk is set to zero, and the brain power signal matrix after the electromyographic noise component is set to zero is obtained. Both ignore the influence of sampling rate on the autocorrelation coefficient threshold for identifying artifact subcomponents. Summary of the invention
[0004] The present invention provides a signal artifact detection method and a signal artifact detection system, which make the same detection threshold adapt to all sampling rates through sampling rate benchmarking in the wavelet decomposition process.
[0005] In order to solve the above technical problems, in a first aspect, the present invention provides a method for detecting signal artifacts, comprising: setting a standard data set, including at least one reference sampling rate F S0DataS 0 and its corresponding wavelet stratification standard; Select the wavelet stratification standard, any sampling rate F S The data S is based on the sampling rate F S With the reference sampling rate F S0 The numerical relationship between I and selected base sampling rate F S0 ; Wavelet decomposition, based on the wavelet stratification standard to obtain the wavelet stratified data S of data S 1 ; Artifact detection, the wavelet layered data S 1 The sampling rate F S Unified to the base sampling rate F S0 After detecting signal artifacts; wherein the wavelet stratification standard includes: wavelet decomposition layer number N S0 , the corresponding minimum frequency span A in wavelet decomposition S0 At least one of .
[0006] Further, the wavelet decomposition includes: obtaining the wavelet decomposition layer number N corresponding to the data S S ; Divide the data S into multiple time window data S 3 ; For time window data S 3 Perform N S Layer wavelet decomposition is performed to obtain the result of wavelet decomposition, that is, the wavelet layered data S 1 .
[0007] Furthermore, when the wavelet layering standard is configured as the wavelet decomposition layer number N S0 When the number of wavelet decomposition layers corresponding to the data S is , Indicates integer operation. .
[0008] Furthermore, when the wavelet stratification criterion is configured as the minimum frequency span A S0 When the number of wavelet decomposition layers corresponding to the data S is -1, Indicates integer operation.
[0009] Furthermore, the artifact detection includes: wavelet sub-component identification, wavelet layered data S 1 The sampling rate F S Unified to the base sampling rate F S0 , based on the autocorrelation coefficient of the wavelet sub-components after unified sampling rate in the time window, the wavelet layered data S is identified 1 The wavelet data S in 11 and the first remaining component S 12 , where the wavelet data S 11 That is, data containing signal artifacts; spatial domain decomposition, wavelet data S 11 Perform spatial decomposition to obtain the decomposition matrix W and decomposition subcomponent S2 , i.e. the source component; decomposition subcomponent identification, decomposition subcomponent S 2 The sampling rate F S Unified to the base sampling rate F S0 , based on the decomposition subcomponent S 2 The autocorrelation coefficient after unified sampling rate identifies the decomposition subcomponent S 2 The stabilizing component S 21 and the second remaining component S 22 , the second remaining component S 22 That is, data containing signal artifacts.
[0010] Furthermore, based on any sampling rate F S With the reference sampling rate F S0 The numerical relationship between I and selected base sampling rate F S0 Includes: Settings ,get , compare each benchmark sampling rate F S0 Corresponding m value, select the base sampling rate F corresponding to any m value S0 The reference sampling rate used for data S.
[0011] Furthermore, the standard data set also includes a reference sampling rate F S0 DataS 0 The corresponding signal artifact detection requirements include: the detection accuracy characterization value of the signal artifact, the detection calculation amount characterization value of the signal artifact; any sampling rate F S With the reference sampling rate F S0 The numerical relationship I is selected according to the detection requirements and standards.
[0012] In a second aspect, the present invention provides a method for removing signal artifacts, comprising: detecting signal artifacts using the detection method; rearranging the signal to remove the first residual component S 12 and the stabilizing component S 21 The signal reconstructed in the spatial domain is reordered in the decomposition order to obtain data ; Wavelet reconstruction, data Perform wavelet reconstruction to obtain data with signal artifacts removed .
[0013] In a third aspect, the present invention provides a signal artifact detection system, comprising: a processor, a data storage unit, a data input unit, and a parameter setting unit respectively connected to the processor; the processor runs the detection method; the data storage unit is used to store a standard data set; the data input unit is used to input any sampling rate The parameter setting unit is provided with a human-computer interaction interface to select the wavelet stratification standard used in the data S.
[0014] In a fourth aspect, the present invention provides a computer device, comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method.
[0015] In a fifth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the method when executed by a processor.
[0016] In a sixth aspect, the present invention provides a computer program product, comprising a computer program, which implements the steps of the method when executed by a processor.
[0017] The beneficial effect of the present invention is that the signal artifact detection method and signal artifact detection system of the present invention, for artifacts in physiological electrical signals, first detects artifacts at any sampling rate F of the data in the artifact detection based on wavelet decomposition and spatial domain decomposition. S With the reference sampling rate F S0 The numerical relationship between I and a certain base sampling rate F in the standard data set is selected. S0 And its corresponding wavelet stratification standard, and then select the wavelet decomposition layer number N according to actual needs S0 Or / and the corresponding minimum frequency span A in wavelet decomposition S0 As a specific wavelet stratification standard, the data of any sampling rate is then stratified by wavelet according to the wavelet stratification standard to obtain the wavelet stratification data S 1 , and finally the wavelet layered data S 1 Any sampling rate F S Unified to the base sampling rate F S0 After that, the signal artifacts are detected. Different wavelet decomposition layers are selected for signals with different sampling rates, and a differentiated design is made based on evidence. This can ensure that the frequency width of the fixed layer wavelet component is stable under different sampling rates, improve the frequency stability of the wavelet decomposition component, and reduce the sampling rate F of any artifact sub-component. S Unified to the base sampling rate F S0 Re-detection can avoid the artifact detection threshold being affected by the sampling rate, thereby achieving the use of the same detection threshold for artifact identification for data at multiple sampling rates, without the need to change the detection threshold after the new sampling rate.
[0018] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0019] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 This is a principle block diagram of the signal artifact detection method.
[0022] Figure 2 The sampling rate is 500 The power spectrum result of each wavelet when the signal is decomposed using the same number of wavelets.
[0023] Figure 3 The sampling rate is 1000 The power spectrum result of each wavelet when the signal is decomposed using the same number of wavelets.
[0024] Figure 4 The sampling rate is 2000 The power spectrum result of each wavelet when the signal is decomposed using the same number of wavelets.
[0025] Figure 5 The sampling rate is 4000 The power spectrum result of each wavelet when the signal is decomposed using the same number of wavelets.
[0026] Figure 6 The sampling rate is 500 The power spectrum results of each layer of wavelet when the signal is decomposed using wavelets of different numbers of layers.
[0027] Figure 7 The sampling rate is 1000 The power spectrum results of each layer of wavelet when the signal is decomposed using wavelets of different numbers of layers.
[0028] Figure 8 The sampling rate is 2000 The power spectrum results of each layer of wavelet when the signal is decomposed using wavelets of different numbers of layers.
[0029] Fig. 9 The sampling rate is 4000 The power spectrum results of each layer of wavelet when the signal is decomposed using wavelets of different numbers of layers.
[0030] Fig.10is the autocorrelation coefficient corresponding to different sampling rates under the original sampling rate.
[0031] Fig.11 It is the autocorrelation coefficient corresponding to different sampling rates after the sampling rate is unified.
[0032] Fig.12 It is the autocorrelation coefficient corresponding to the data of different sampling rates under the original sampling rate.
[0033] Fig.13 is the autocorrelation coefficient of EMG and EEG at the original sampling rate.
[0034] Fig.14 It is the autocorrelation coefficient corresponding to data with different sampling rates after the sampling rate is unified.
[0035] Fig.15 It is the autocorrelation coefficient of EMG and EEG after the unified sampling rate.
[0036] Fig.16 This is the waveform after removing artifacts under experimental condition 1.
[0037] Fig.17 This is the waveform after removing artifacts under experimental condition 2.
[0038] Fig.18 It is a waveform diagram of a clean EEG signal.
[0039] Fig.19 It is a waveform diagram of the synthetic EEG signal containing electromyographic artifacts.
[0040] Fig. 20 This is the waveform after removing artifacts under experimental condition 3.
[0041] Fig.21 This is the waveform diagram after removing artifacts under experimental condition 4.
[0042] Fig. 22 It is a principle block diagram of the signal artifact removal method. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] Example 1.
[0045] As we all know, in the process of detecting signal artifacts, the autocorrelation coefficient detection threshold is affected by the sampling rate. In order to eliminate this influence, a relatively matching autocorrelation coefficient detection threshold is generally selected based on the detection results of historical data (historical sampling rate). However, it is impossible to try the autocorrelation coefficient detection threshold corresponding to any or all sampling rates during the sampling process, and for the signal artifact recognition of the new sampling rate, the influence of the sampling rate on the autocorrelation coefficient detection threshold can only be ignored, resulting in the limited applicability and detection accuracy of the existing detection system. In view of this, if Figure 1 As shown, this embodiment 1 provides a method for detecting signal artifacts, including: setting a standard data set, including at least one reference sampling rate F S0 DataS 0 and its corresponding wavelet stratification standard; Select the wavelet stratification standard, any sampling rate F S The data S is based on the sampling rate F S With the reference sampling rate F S0 The numerical relationship between I and selected base sampling rate F S0 ; Wavelet decomposition, based on the wavelet stratification standard to obtain the wavelet stratified data S of data S 1 ; Artifact detection, the wavelet layered data S 1 The sampling rate F S Unified to the base sampling rate F S0 After detecting signal artifacts; wherein the wavelet stratification standard includes: wavelet decomposition layer number N S0 , the corresponding minimum frequency span A in wavelet decomposition S0 At least one of .
[0046] As an optional implementation method for selecting the wavelet stratification standard.
[0047] The wavelet decomposition includes: obtaining the wavelet decomposition layer number N corresponding to the data S S ; Divide the data S into multiple time window data S 3 ; For time window data S 3 Perform N S Layer wavelet decomposition is performed to obtain the result of wavelet decomposition, that is, the wavelet layered data S 1 Generally speaking, in the process of signal artifact detection, the larger the number of wavelet decomposition layers, the smaller the minimum frequency span, the higher the detection accuracy, but the greater the amount of calculation. Therefore, how to balance the accuracy and the amount of calculation is a necessary consideration for signal artifact detection.
[0048] In this case, the arbitrary sampling rate F S Unified to the base sampling rate F S0 , with the help of the reference sampling rate F S0 The corresponding wavelet stratification standard obtains the wavelet decomposition layer number N S , to achieve any sampling rate FS The wavelet stratification meets the frequency stability requirements of the wavelet decomposition components, and realizes the use of wavelet decomposition of different layers for signals with different sampling rates, ensuring that the frequency of the fixed layer wavelet components under different sampling rates is stable, so that the base sampling rate F can be selected. S0 The wavelet stratification standard is limited at the same time, and the detection requirements of the data S are preset or the reference sampling rate F is selected according to the detection requirements of the signal artifacts. S0 The time-limited wavelet stratification standard is equivalent to selecting different reference sampling rates F according to different detection requirements. S0 .like Figure 2-Figure 5 As shown in the figure, the horizontal axes are all frequencies, and the vertical axes are all power spectra. From the power spectrum results of each layer of wavelet, we can see that when using the same number of layers of wavelet filtering for signals with different sampling rates, the last layer (the minimum frequency span layer) corresponds to Figure 2 Middle A-8, Figure 3 Middle A-8, Figure 4 Middle A-8, Figure 5 The frequency components contained in the wavelet are different (as shown in A-8); Figure 6-Figure 9 As shown in the figure, the horizontal axes are all frequencies, and the vertical axes are all power spectra. Different layers of wavelet decomposition are performed according to different sampling filters. The last layer with high sampling rate (the minimum frequency span layer, which corresponds to Figure 6 Middle A-8, Figure 7 Middle A-9, Figure 8 A-10, Fig. 9 A-11 in Figure 11) completely contains the low sampling rate results. Figure 2-Figure 9 , which means that different sampling rates cannot use the same number of wavelet filters, otherwise the filtering effect will be affected; and the data with high sampling rate can refer to the stratification results with low sampling rate, that is, the data with high and low sampling rates can be converted to each other through sampling rate conversion to achieve the reference of stratification results.
[0049] As the base sampling rate F S0 An optional implementation manner.
[0050] The standard data set also includes a reference sampling rate F S0 DataS 0 The corresponding signal artifact detection requirements include: the detection accuracy characterization value of the signal artifact, the detection calculation amount characterization value of the signal artifact; any sampling rate F S With the reference sampling rate F S0The numerical relationship I is selected according to the detection requirement standard. The detection accuracy characterization value can be the true value or unified transformation value of the detection accuracy, such as the signal attenuation degree of the artifact component of the signal after denoising, and the similarity between the signal after denoising and the original signal waveform; the detection calculation amount characterization value of the signal artifact can be the true value or unified transformation value of the detection calculation amount, such as the calculation time from data preprocessing to the signal with artifact removal, or the calculation time from calculating the number of wavelet decomposition layers to the signal with artifact removal (detection artifact + removal artifact).
[0051] Since any sampling rate F S It can be any value selected according to the data S collection requirements. How to choose the best baseline sampling rate F S0 It is the premise of signal artifacts and has a significant impact on the detection results (i.e. the accuracy of signal artifact identification). The detection method in this case uses wavelet decomposition to detect signal artifacts. In order to make the same detection threshold adapt to all sampling rates, it is necessary not only to meet the frequency stability requirements of the wavelet decomposition components, but also to unify the detection thresholds of different sampling rates. Therefore, the base sampling rate F S0 It not only participates in the wavelet decomposition process, but also in the artifact detection process. In the actual process, at least one benchmark sampling rate F can be set based on experience or historical data. S0 DataS 0 and its corresponding wavelet decomposition layer number N S0 , the corresponding minimum frequency span A in wavelet decomposition S0 The test requirements and standards are stored in the test system. The input data S is used as the data to be tested. Before the test, the test requirements can be input and the matching benchmark sampling rate F can be automatically screened in the test system. S0 You can also check different reference sampling rates F through the display interface of the human-computer interaction machine. S0 According to the detection requirements, select the matching reference sampling rate F through the option box. S0 In general, when the base sampling rate F S0 When the base sampling rate F is one, it will automatically be the default value and does not need to be selected every time. S0 When there are multiple base sampling rates, any base sampling rate F can be set. S0 If the default value is used, it does not need to be selected every time; when the same base sampling rate F S0 Corresponding to multiple wavelet stratification standards (including wavelet decomposition layer number N S0 , the corresponding minimum frequency span A in wavelet decomposition S0 ), test requirement standards (including test accuracy characterization values and test calculation quantity characterization values), can be distinguished by marks or numbers.
[0052] In order to further improve the accuracy and to meet various detection requirements in actual processes, the base sampling rate FS0 The number of F can be set to multiple, and the appropriate reference sampling rate F can be selected each time according to the detection requirements. S0 Optionally, the acquisition of any sampling rate F S The data S uses the base sampling rate F S0 Includes: Settings ,get , compare each benchmark sampling rate F S0 Corresponding m value, select the base sampling rate F corresponding to any m value S0 As the reference sampling rate used by data S. In actual work, any value of m can be selected as needed, such as but not limited to detection accuracy, calculation amount and other detection requirements. For example, when m has multiple integers, such as the reference sampling rate F S0 have , , the sampling rate of data S ,at this time , , when considering less computational effort, the minimum integer corresponding to the base sampling rate is preferred, that is, As the base sampling rate F S0 ; Considering higher detection accuracy, select the minimum integer corresponding to the benchmark sampling rate, that is, the preferred As the base sampling rate F S0 When m is an integer or a non-integer, select the base sampling rate corresponding to the integer, for example, the base sampling rate F S0 have , , the sampling rate of data S ,at this time , , preferably As the base sampling rate F S0 , then the minimum frequency span of the data S is related to the base sampling rate F S03 Keep it consistent, so that the detection accuracy corresponding to the data S is closer to the benchmark sampling rate F S03 Corresponding detection accuracy; if selected As the base sampling rate F S0 , then the minimum frequency span of the data S is related to the base sampling rate F S04 Inconsistency will cause the detection accuracy corresponding to the data S to be inconsistent with the baseline sampling rate F S04 There is a deviation between the corresponding detection accuracies, which will reduce the stability of the detection system. When m is a non-integer, select the benchmark sampling rate corresponding to the non-integer closest to the integer, such as the benchmark sampling rate F S0 have , , the sampling rate of data S ,at this time , Obviously, the preferred As the base sampling rate F S0 , the detection accuracy corresponding to data S is closer to the benchmark sampling rate F S05 The corresponding detection accuracy ensures the stability of the detection system. Here, the sampling rate F S With the reference sampling rate F S0 The numerical relationship I can be the ratio of the two, such as , or other mathematical relationships, which can be realized by conversion of mathematical formulas and are not limited to the formulas listed in this case.
[0053] Optionally, at least one reference sampling rate F is generally obtained based on the preferred detection results in historical data or empirical values. S0 The corresponding wavelet stratification standard (including the number of wavelet decomposition layers N) S0 , the corresponding minimum frequency span A in wavelet decomposition S0 ), detection requirement standards (detection accuracy characterization value, detection calculation amount characterization value), at this time, the wavelet stratification standard is preferably configured as the wavelet decomposition layer number N S0 , the number of wavelet decomposition layers corresponding to the data S , Indicates integer operation, either rounding down or rounding up is acceptable, but the amount of calculation is different. For example, the sampling rate of data S is , if the base sampling rate is selected , then the number of wavelet decomposition layers corresponding to the data S is Select the corresponding wavelet decomposition layer ,Right now , the minimum frequency span of its wavelet stratification The stratification results are two layers: the first layer is 0-50 , second layer 0-25 and 25-50 ; If the base sampling rate is selected , then the number of wavelet decomposition layers corresponding to the data S is Select the corresponding wavelet decomposition layer ,Right now , the minimum frequency span of its wavelet stratification , the stratification result is one layer: the first layer 0-50 Assuming that the detection accuracy of both methods meets the requirements, select As the baseline sampling rate, data S has lower computational complexity in detecting signal artifacts.
[0054] Optionally, the minimum frequency span A of the wavelet decomposition can also be set according to the type of signal artifacts and their corresponding frequency range. S0 , at this time the wavelet stratification standard is preferably configured as the minimum frequency span AS0 , the number of wavelet decomposition layers corresponding to the data S -1, Indicates integer operation, which can be rounded down or rounded up, but the amount of calculation is different. Taking EEG signal detection artifact as an example, the amplitude of electrooculogram artifact is large and the frequency range is narrow, so a relatively wide minimum frequency span A can be set. S0 , while the EMG artifacts with broadband characteristics overlap more with the high frequency band of the EEG signal, so a relatively narrow minimum frequency span A can be set. S0 .
[0055] As an optional implementation of artifact detection.
[0056] The artifact detection includes: wavelet sub-component identification, wavelet layered data S 1 The sampling rate F S Unified to the base sampling rate F S0 , based on the autocorrelation coefficient of the wavelet sub-components after unified sampling rate in the time window, the wavelet layered data S is identified 1 The wavelet data S in 11 and the first remaining component S 12 , where the wavelet data S 11 That is, data containing signal artifacts; spatial domain decomposition, wavelet data S 11 Perform spatial decomposition to obtain the decomposition matrix W and decomposition subcomponent S 2 , i.e. the source component; decomposition subcomponent identification, decomposition subcomponent S 2 The sampling rate F S Unified to the base sampling rate F S0 , based on the decomposition subcomponent S 2 The autocorrelation coefficient after unified sampling rate identifies the decomposition subcomponent S 2 The stabilizing component S 21 and the second remaining component S 22 , the second remaining component S 22 That is, data containing signal artifacts. The artifact subcomponents are sampled at a uniform rate before identification, ensuring the stability of the detection threshold.
[0057] In this case, we take EEG data containing electromyographic artifacts as an example to compare the advantages of the autocorrelation coefficient verification detection method with uniform sampling rate and original sampling rate. A total of two levels are set for comparison. The first level is the comparison of the autocorrelation coefficient of the overall data: Fig.10 , at the original sampling rate, the sampling rate is 100 , 200 , 250 , 500 , 1000 , 2000 , 4000 When the autocorrelation coefficient of a point with different sampling rate delay is very different; see Fig.11 After the sampling rate is unified, the autocorrelation coefficient of one point with different original sampling rates is basically unchanged; therefore, the unified sampling rate is beneficial to enhance the stability of the artifact component recognition of this feature. The second level, the comparison of the autocorrelation coefficients of the EEG component and the EMG component: see Fig.12 and Fig.13 , Fig.12 The numbers 1-8 on the horizontal axis represent the frequency of the electromyographic signal at 4000 , 2000 , 1000 , 500 , 4000 , 2000 , 1000 , 500 ; Fig.13 The horizontal axis represents Fig.12 The autocorrelation coefficients calculated for the signals numbered 1-8 in the figure are shown in Figure 1. The vertical axis represents the statistical number of a certain correlation coefficient. The overall representation shows that the correlation coefficient distribution intervals of EEG and EMG signals under different sampling rates overlap, and it is not easy to set a threshold to distinguish them. That is, before the sampling rate is unified, the autocorrelation coefficients of EMG and EEG are indistinguishable; see Fig.14 and Fig.15 ,exist Fig.14 In the figure, the horizontal axis numbers 1-8 represent the frequency of the electromyographic signal at 4000 , 2000 , 1000 , 500 , 4000 , 2000 , 1000 , 500 , Fig.13 The horizontal axis represents Fig.14 The autocorrelation coefficients calculated for the signals numbered 1-8 in the figure, the vertical axis represents the statistical quantity of a certain correlation coefficient, and the overall correlation coefficient distribution ranges of the EEG and EMG signals after the unified sampling rate are obviously different, that is, the autocorrelation coefficients of the EMG and EEG after the unified sampling rate are obviously separable. Therefore, the autocorrelation coefficients after the unified sampling rate in this case can be used to distinguish EMG artifacts from EEG, so that the stability of the detection results can be improved.
[0058] Optionally, the Classical Correlation Analysis (CCA) model is a classic method for calculating signal correlation. CCA can be used to spatially decompose the multi-channel signal matrix S: , S = u*X; where the left singular matrix u is the coefficient of the projection of the signal matrix X to a low dimension, and the right singular matrix v is the coefficient of the projection of the signal matrix Y to a low dimension; X∈ R M×K is a signal matrix with M channels and K time samples, u∈R M×M is the linear mapping coefficient of X, v∈R K×K is the linear mapping coefficient of Y, and S is the projection signal of X in the u direction. In this case, the decomposition matrix W is configured as , N represents the number of samples in the time window, Represents the canonical correlation analysis function.
[0059] Alternatively, spatial decomposition can be achieved by other methods, such as SOBI-ICA (secod order blind independent), where the signal matrix S∈ R M×K Perform SOBI-ICA decomposition, S = W*X, W is the calculated unmixing matrix, and S is the spatial decomposition signal.
[0060] In this case, the data may be multi-channel physiological electrical signal data or single-channel physiological electrical signal data. Figure 1 Taking multi-channel physiological electrical signal data as an example, the detection process of signal artifacts includes but is not limited to the following steps:
[0061] Step 1: Preprocess the original data and divide it into multiple time windows to obtain data ,C is the number of channels, and T is the number of samples in a single time window in a single channel.
[0062] Step 2: Calculate the number of wavelet layers: Set the sampling rate Fs 0 DataS 0 , and the corresponding wavelet decomposition layer number is ; Calculate the number of wavelet decomposition layers corresponding to the data S with a sampling rate of Fs Indicates integer operation on *.
[0063] Step 3: Data for each time window conduct Layer wavelet decomposition, and obtain the results of wavelet decomposition of all channels, that is, wavelet layered data , .
[0064] Step 4: Wavelet component identification: Wavelet layered data By sampling rate F S Unify sampling rate to Fs 0 , get data ;calculate Autocorrelation coefficient r 1 , the M autocorrelation coefficients The channels with a value less than the first set threshold are judged as myoelectronic components, and the channel position Loc is recorded. 1 ; Extract wavelet layered data Middle channel location Loc 1 The corresponding wavelet data is recorded as , the wavelet layered data S 1 The first remaining component in is denoted as ,Record .
[0065] Step 5: Spatial decomposition: After CCA decomposition, we get the decomposition matrix W and decomposition subcomponents ,Right now , N represents the number of samples in the time window, Represents the canonical correlation analysis function.
[0066] Step 6: Identify the decomposed subcomponents: The sampling rate is unified to the reference sampling Fs 0 , get the data calculate The autocorrelation coefficient r 2 , M 1 Autocorrelation coefficient The channels greater than the second set threshold are determined as stable subcomponents, and the channel positions Loc are recorded. 2 ; Extract decomposition subcomponents Middle channel location Loc 2 The corresponding data is recorded as ; Extract the corresponding decomposition matrix , , we can get the wavelet component after removing the electromyographic component .
[0067] Example 2.
[0068] Based on Example 1, this Example 2 provides a signal artifact detection system, including: a processor, a data storage unit, a data input unit, and a parameter setting unit respectively connected to the processor; the processor runs the detection method; the data storage unit is used to store a standard data set; the data input unit is used to input any sampling rate The parameter setting unit is provided with a human-computer interaction interface to select the wavelet stratification standard used in the data S.
[0069] Example 3.
[0070] Based on Example 1 or 2, see Fig. 22, this embodiment 3 provides a signal artifact removal method, comprising: using the detection method to detect signal artifacts; signal rearrangement, the first residual component S 12 and the stabilizing component S 21 The signal reconstructed in the spatial domain is reordered in the decomposition order to obtain data ; Wavelet reconstruction, data Perform wavelet reconstruction to obtain data with signal artifacts removed .
[0071] Example 4.
[0072] Based on Embodiment 1, 2 or 3, Embodiment 4 provides a signal artifact removal system, comprising: a processor, a data storage unit, a data input unit, and a parameter setting unit respectively connected to the processor; the processor runs the signal artifact removal method; the data storage unit is used to store a standard data set; the data input unit is used to input any sampling rate The parameter setting unit is provided with a human-computer interaction interface to select the wavelet stratification standard used in the data S.
[0073] Example 5.
[0074] On the basis of Embodiment 1 or 3, this Embodiment 5 provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method.
[0075] Example 6.
[0076] On the basis of Embodiment 1 or 3, this Embodiment 6 provides a computer-readable storage medium on which a computer program is stored, and the computer program implements the steps of the method when executed by a processor.
[0077] Example 7.
[0078] On the basis of Embodiment 1 or 3, this Embodiment 7 provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the method are implemented.
[0079] Test example 1.
[0080] In order to verify the detection and removal effect of myoelectric artifacts after unified sampling rate in this case, synthetic EEG signal is taken as an example, that is, in the clean EEG signal (see Fig.18 ) to obtain a synthetic EEG signal containing EMG artifacts (see Fig.19) as an example, the synthetic EEG signals were processed under different experimental conditions and the performance indicators of the processing results were compared: the waveform after artifact removal and the clean waveform were observed. The detection accuracy was characterized by comparing the noise-reduced signal with the original EEG (such as Fig.18 ), and the detection calculation value is the calculation time of (detection artifact + removal artifact) of the signal with artifact removed.
[0081] Test condition 1: see Fig. 20 , using the original sampling rate wavelet decomposition threshold judgment and CCA method to remove electromyographic artifacts. The experimental data is the original sampling rate F S =1000 , wavelet stratification =8, synthetic EEG signal after artificially adding electromyographic artifacts.
[0082] Test condition 2: see Fig.21 , the wavelet decomposition threshold judgment and CCA method with uniform sampling rate are used to remove electromyographic artifacts. The experimental data are the same as experimental condition 1, and the wavelet stratification standard is F S0 =250 , N S0 =8 Wavelet stratification based , the whole can be obtained =10.
[0083] Comparison results: Fig. 20 and Fig.21 Respectively Fig.18 The comparison shows that for EMG artifacts, the waveform after EMG removal in Experimental Condition 2 is more consistent with the clean signal than that in Experimental Condition 1. For data with a sampling rate of 1000 Hz, 16 channels, and a duration of 10 s, the calculation time of the artifact-removed signal (detection of artifacts + removal of artifacts) under Experimental Conditions 1 and 2 is about 200-500 ms, that is, the calculation time of the two is not much different.
[0084] Test example 2.
[0085] In order to verify the artifact detection and removal effect after unified sampling rate in this case, real EEG data containing EMG artifacts were taken as an example, and the EEG data were processed under different test conditions and the performance indicators of the processing results were compared: the waveforms before and after EMG artifacts were removed. The detection accuracy was characterized by the signal attenuation degree of the EMG artifact component of the signal after noise reduction, and the detection calculation amount was characterized by the calculation time of (detection artifact + removal artifact) of the signal after artifact removal.
[0086] Test condition 3: see Fig.16 , using the original sampling rate wavelet decomposition threshold judgment and CCA method to remove electromyographic artifacts, the horizontal axis represents time, the vertical axis represents different channels, the blue is the signal before noise reduction, and the red is the signal after noise reduction. The experimental data is the original sampling rate FS =1000 , wavelet stratification =8, the real EEG signal containing myoelectric artifacts.
[0087] Test condition 4: see Fig.17 , the wavelet decomposition threshold judgment and CCA method with uniform sampling rate are used to remove electromyographic artifacts. The horizontal axis represents time, and the vertical axis represents different channels. The blue is the signal before noise reduction, and the red is the signal after noise reduction. The experimental data is the same as experimental condition 3, and the wavelet stratification standard adopts F S0 =250 , N S0 =8, wavelet stratification based on , the whole can be obtained =10.
[0088] Comparison results: Comparison Fig.16 and Fig.17 , the blue line is the waveform before artifact removal, and the red line is the waveform after artifact removal; for EMG artifacts, the noise reduction effect (EMG removal) of experimental condition 4 is significantly better than that of experimental condition 3.
[0089] In the description of the embodiments of the present invention, 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 an indirect connection 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.
[0090] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the 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 limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0091] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0092] 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, and its technical scope must be determined according to the scope of the claims.
Claims
1. A method for detecting physiological electrical signal artifacts, It is characterized in that include: Set up a standard data set, including at least one base sampling rate F S0 DataS 0 and its corresponding wavelet stratification standard; Select the wavelet stratification standard, any sampling rate F S The data S is based on any sampling rate F S With the reference sampling rate F S0 The numerical relationship between I and selected base sampling rate F S0 ; Wavelet decomposition, based on the wavelet stratification standard to obtain the wavelet stratified data S of the data S 1 ; Artifact detection, the wavelet layered data S 1 The sampling rate F S Unified to the base sampling rate F S0 Post-detection signal artifacts; in The wavelet stratification standard includes: the number of wavelet decomposition layers N S0 , the corresponding minimum frequency span A in wavelet decomposition S0 At least one of .
2. The detection method according to claim 1, It is characterized in that The wavelet decomposition comprises: Get the wavelet decomposition layer number N corresponding to the data S S ; Divide the data S into multiple time window data S 3 ; For time window data S 3 Perform N S Layer wavelet decomposition is performed to obtain the result of wavelet decomposition, that is, the wavelet layered data S 1 .
3. The detection method according to claim 2, It is characterized in that When the wavelet stratification standard is configured as the wavelet decomposition level N S0 When the wavelet decomposition layer number NS corresponding to the data S is N S0 +[log 2 (I)], [*] indicates integer operation, 4. The detection method according to claim 2, It is characterized in that When the wavelet stratification criterion is configured as the minimum frequency span A S0 When the number of wavelet decomposition layers corresponding to the data S is [*] indicates integer operation.
5. The detection method according to claim 1, It is characterized in that The artifact detection comprises: Wavelet component recognition, the wavelet layered data S 1 The sampling rate F S Unified to the base sampling rate F S0 , based on the autocorrelation coefficient of the wavelet sub-components after unified sampling rate in the time window, the wavelet layered data S is identified 1 The wavelet data S in 11 and the first remaining component S 12 , where the wavelet data S 11 That is, data containing signal artifacts; Spatial domain decomposition, wavelet data S 11 Perform spatial decomposition to obtain the decomposition matrix W and decomposition subcomponent S 2 , i.e., source component; Decompose subcomponent identification, decompose subcomponent S 2 The sampling rate F S Unified to the base sampling rate F S0 , based on the decomposition subcomponent S 2 The autocorrelation coefficient after unified sampling rate identifies the decomposition subcomponent S 2 The stabilizing component S 21 and the second remaining component S 22 , the second remaining component S 22 That is, data containing signal artifacts.
6. The detection method according to claim 1, It is characterized in that Based on any sampling rate F S With the reference sampling rate F S0 The numerical relationship between I and selected base sampling rate F S0 include: Set I = 2 m ,get Compare the benchmark sampling rates F S0 The corresponding m value; Select the reference sampling rate F corresponding to any m value S0 The reference sampling rate used by data S.
7. The detection method according to claim 1 or 6, It is characterized in that The standard data set also includes a reference sampling rate F S0 DataS 0 The corresponding signal artifact detection requirements and standards include: the detection accuracy characterization value of the signal artifact and the detection calculation amount characterization value of the signal artifact; Any sampling rate F S With the reference sampling rate F S0 The numerical relationship I is selected according to the detection requirements and standards.
8. A signal artifact removal method, It is characterized in that include: The detection method according to claim 5; Signal rearrangement, the first residual component S 12 and the stabilizing component S 21 The signal reconstructed in the spatial domain is reordered in the decomposition order to obtain data Wavelet reconstruction, for data Perform wavelet reconstruction to obtain data with signal artifacts removed 9. A signal artifact detection system, It is characterized in that include: A processor, a data storage unit, a data input unit, and a parameter setting unit respectively connected to the processor; The processor runs the detection method as claimed in claim 1; The data storage unit is used to store a standard data set; The data input unit is used to input any sampling rate F S Data S; The parameter setting unit is provided with a human-computer interaction interface to select the wavelet stratification standard used by the data S.
10. A computer device comprising a memory, a processor and a computer program stored in the memory, It is characterized in that The processor executes the computer program to implement the steps of the method according to claim 1 or 8.
11. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to claim 1 or 8 are implemented.
12. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to claim 1 or 8 are implemented.
