A method for denoising electromyographic signals based on machine learning
Through the singular value decomposition and neural network method based on machine learning, the problem of poor performance of traditional electromyography signal denoising methods in complex noise environments is solved, and adaptive electromyography signal denoising is realized, which improves the signal-to-noise ratio and Denoising effect.
Patent Information
- Application Number
- CN202410902982.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-07-08
AI Technical Summary
Traditional electromyography signal denoising methods have limited effects in complex noise environments and cannot adapt to the real-time changing noise characteristics, resulting in unstable denoising effect.
Using machine learning-based electromyography denoising method, using singular value decomposition and neural network, the electromyography signal is decomposed into sub-signals through singular value decomposition, and the optimization processing network is automatically extracted and adjusted parameters, and combined with supervised learning to train the network , realize adaptive noise denoising.
Effectively removes the signal-to-noise noise, improves the signal-to-noise ratio, maintains the main characteristics and structure of the signal, adapts to different types of noise environments, and improves the denoising effect and robustness.
Smart Images

Figure CN118680584B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of signal processing, and in particular relates to a method for denoising an electromyographic signal based on machine learning. Background Art
[0002] Electromyographic signals record the electrical signals of muscle activity and are widely used in biomedical engineering, rehabilitation medicine, sports science and other fields. However, during the acquisition process, electromyographic signals are often affected by various noises such as power supply noise, motion artifacts and environmental interference. Noise will reduce the quality of the signal and affect its application in clinical diagnosis and human-computer interaction. In addition, noise will interfere with the subsequent analysis and research of electromyographic signals. Therefore, it is necessary to perform denoising operations on the original acquired electromyographic signals to remove interference signals and improve the signal-to-noise ratio of electromyographic signals.
[0003] Traditional EMG signal denoising methods mainly include hardware filtering and software filtering. Hardware filtering performs preliminary noise filtering in the signal acquisition stage by designing a dedicated circuit, but it is difficult to cope with complex noise environments and has complex designs and high costs. Software filtering methods use digital signal processing techniques, such as fast Fourier transform and wavelet transform, to post-process the signal. They are effective in processing specific noise, but have limited effects in complex and changing noise environments. In addition, traditional methods usually rely on pre-set noise models and cannot adapt to real-time changing noise characteristics, resulting in unstable denoising effects.
[0004] In recent years, machine learning technology has been widely used and rapidly developed in the field of signal processing. It has powerful data processing capabilities and automatic feature extraction capabilities. In terms of denoising and signal reconstruction, denoising methods based on machine learning perform excellently. By learning a large amount of sample data, it can automatically model complex noise characteristics and achieve adaptive denoising. It has the advantages of no need for a clear noise model, strong robustness and high adaptability. Summary of the invention
[0005] The present invention provides an electromyographic signal denoising method based on machine learning, aiming to propose an electromyographic signal data denoising processing model, wherein a first processing module decomposes input electromyographic data with noise into sub-signals by using a singular value decomposition method, suppresses noise and impurities by adjusting a selection coefficient, and obtains data with different requirements; an optimization processing network simultaneously and parallelly inputs noisy electromyographic data into the optimization processing network for training; by learning a large amount of sample data, features are automatically extracted and a weight vector is obtained; a second processing module multiplies the output of the first processing module and the output of the optimization processing network to obtain a denoised signal; the mean absolute error between the denoised signal and the clean signal is used as a loss function to calculate a gradient and back-propagate; the optimization processing network is trained in a supervised manner, and the advantages of singular value decomposition and a neural network are combined to effectively remove the noise of the electromyographic signal.
[0006] In order to achieve the above-mentioned purpose, the present invention provides the following technical solution: a method for denoising electromyographic signals based on machine learning, and the specific steps are as follows.
[0007] S1. Collect noisy electromyographic signal data and perform data preprocessing operations on the signal.
[0008] S2. Construct a first processing module, including singular value decomposition.
[0009] S3. Build an optimized processing network, including input layer, intermediate layer and output layer.
[0010] S4. Construct the second processing module, including loss function and back propagation.
[0011] S5. Construct an electromyographic signal data denoising processing model, which includes an input, a first processing module, an optimization processing network, a second processing module and an output.
[0012] S6. Training and testing of electromyographic signal data denoising processing model. The electromyographic signal data denoising processing model is trained using the electromyographic signal data set. After the training is completed, the electromyographic signal that needs to be denoised is obtained and input into the electromyographic signal data denoising processing model to obtain the denoised electromyographic signal.
[0013] Preferably, in step S1, an electromyographic signal acquisition device is used to acquire original electromyographic signal data, and a bandpass filter is used to perform data preprocessing operations on the acquired electromyographic signal to remove high-frequency noise and low-frequency interference in the electromyographic signal.
[0014] Preferably, in step S2, for the first processing module, the noisy electromyographic signal is subjected to singular value decomposition, and the noisy electromyographic signal is , the noisy electromyographic signal can be expressed as ,in, Indicates the number of sample points of the electromyographic signal, and is an orthogonal matrix, It is a diagonal matrix. The elements on the diagonal are singular values. According to the size of the singular value, select the first singular values and their corresponding left singular vectors and the right singular value vector As the main component of reconstructing the original signal, , using the selected singular vectors and Reconstruct the sub-signal , ,in, It is singular values, and use the remaining singular values to construct the sub-signal , , the output of the first processing module is recorded as , , sub-signal Satisfy the equation .
[0015] Preferably, in step S2, for the first processing module, the noisy electromyographic signal is subjected to singular value decomposition, and the noise can be effectively removed by selecting the largest singular value and its corresponding singular vector for signal reconstruction, because the larger singular value corresponds to the main component of the signal, and the smaller singular value usually contains noise. By filtering out the small singular value, the signal-to-noise ratio of the signal can be significantly improved, which has a significant noise reduction effect. Moreover, the singular value decomposition can extract the main characteristic components of the electromyographic signal and retain the important information of the signal. While denoising, the key features and structure of the original electromyographic signal are maintained as much as possible to avoid excessive loss of information. In addition, the singular value decomposition method has strong robustness and stability, and is not easily affected by noise. Even in the case of more complex noise, the singular value decomposition can effectively separate the signal and noise components through decomposition and reconstruction.
[0016] Preferably, in step S3, for the optimization processing network, the input is a noisy electromyographic signal ,in, Represents the number of sample points of the electromyographic signal. The optimization processing network consists of an input layer, three intermediate layers and an output layer. Each intermediate layer includes a fully connected layer, batch normalization and an activation function. The output is a weight vector , ,in, Is the selection coefficient, indicating whether to retain the corresponding sub-signal ,when The sub-signal corresponding to the noise ,when , which corresponds to the sub-signal that produces the clean EMG signal.
[0017] Preferably, in step S3, for the optimization processing network, using this neural network can automatically extract important features from noisy signals without manually designing feature extraction methods. Each layer can learn features at different levels, which is helpful for more comprehensive understanding and processing of signals. In addition, by learning in the optimization processing network, noise can be more effectively identified and removed. Compared with traditional methods, machine learning methods have higher denoising effects, especially in cases where the noise is complex or the signal quality is poor. Through batch normalization, the optimization processing network can be more stable during training, avoiding gradient vanishing or explosion problems, and improving training speed and performance. At the same time, batch normalization can also enhance the robustness of the model, making it better adaptable to different types of noise.
[0018] Preferably, in step S4, for the second processing module, the output matrix of the first processing module is The output vector of the optimization processing network Multiply to get the denoised electromyographic signal , ,Right now , perform singular value decomposition on the electromyographic signal and discard the singular values and corresponding vectors that capture the noise signal to obtain a clean electromyographic signal , using the denoised signal With clean EMG signals The mean absolute error between them is used as the loss function to calculate the gradient, and then the gradient is back-propagated to train the optimization processing network in a supervised manner.
[0019] Preferably, in step S4, for the second processing module, the advantages of singular value decomposition and neural network are combined to effectively remove the noise of the electromyographic signal. The singular value decomposition extracts the main electromyographic signal components, and the network further optimizes the denoising process to ensure that the denoised electromyographic signal has high quality. The optimization processing network automatically adjusts parameters through supervised learning to adapt to different noise environments. Whether it is low-frequency or high-frequency noise, the network can adaptively adjust to ensure the denoising effect. By selectively retaining the singular values, the main features and detail information of the original electromyographic signal can be effectively retained, avoiding excessive smoothing or information loss, and maintaining the authenticity and reliability of the signal.
[0020] Preferably, in step S5, for the electromyographic signal data denoising processing model, the electromyographic signal data is first input into the model, and the electromyographic signal data is input into the first processing module and the optimization processing network in parallel respectively, and the intermediate output obtained is then input into the second processing module, and the final denoised electromyographic signal is obtained after the processing is completed.
[0021] Compared with the prior art, the present invention has the following technical effects: the technical solution provided by the present invention proposes an electromyographic signal data denoising processing model, wherein the first processing module uses the singular value decomposition method to decompose the input noisy electromyographic data into sub-signals, and suppresses noise and impurities by adjusting the selection coefficient to obtain data with different requirements. The optimization processing network simultaneously and parallelly inputs the noisy electromyographic data into the optimization processing network for training, and automatically extracts features and obtains weight vectors by learning a large amount of sample data. The second processing module multiplies the output of the first processing module and the output of the optimization processing network to obtain a denoised signal. The mean absolute error between the denoised signal and the clean signal is used as a loss function to calculate the gradient and back-propagate, and the optimization processing network is trained in a supervised manner. The advantages of singular value decomposition and neural networks are combined to effectively remove the noise of the electromyographic signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 The figure is a flow chart of the electromyographic signal denoising method provided by the present invention.
[0023] Figure 2 It is a structural diagram of the optimization processing network provided by the present invention.
[0024] Figure 3 It is a structural diagram of the second processing module provided by the present invention.
[0025] Figure 4 This is the original electromyographic signal diagram with noise provided by the present invention.
[0026] Figure 5 This is an effect diagram of the electromyographic signal after denoising provided by the present invention. DETAILED DESCRIPTION
[0027] The present invention aims to propose a method for denoising an electromyographic signal based on machine learning, and proposes a denoising processing model for electromyographic signal data, wherein a first processing module uses a singular value decomposition method to decompose input electromyographic data with noise into sub-signals, and suppresses noise and impurities by adjusting a selection coefficient to obtain data with different requirements. An optimization processing network simultaneously and parallelly inputs noisy electromyographic data into the optimization processing network for training, and automatically extracts features and obtains a weight vector by learning a large amount of sample data. A second processing module multiplies the output of the first processing module and the output of the optimization processing network to obtain a denoised signal, and the mean absolute error between the denoised signal and the clean signal is used as a loss function to calculate the gradient and back-propagate, and the optimization processing network is trained in a supervised manner, combining the advantages of singular value decomposition and neural networks to effectively remove electromyographic signal noise.
[0028] See also Figure 1 As shown, a method for denoising an electromyographic signal based on machine learning in an embodiment of the present application, the specific steps are as follows.
[0029] S1. Collect noisy electromyographic signal data and perform data preprocessing operations on the signal.
[0030] Furthermore, in step S1, an electromyographic signal acquisition device is used to acquire original electromyographic signal data, and a bandpass filter is used to perform data preprocessing operations on the acquired electromyographic signal to remove high-frequency noise and low-frequency interference in the electromyographic signal.
[0031] S2. Construct a first processing module, including singular value decomposition.
[0032] Further, in step S2, for the first processing module, the noisy electromyographic signal is subjected to singular value decomposition, and the noisy electromyographic signal is , the noisy electromyographic signal can be expressed as ,in, Indicates the number of sample points of the electromyographic signal, and is an orthogonal matrix, It is a diagonal matrix. The elements on the diagonal are singular values. According to the size of the singular value, select the first singular values and their corresponding left singular vectors and the right singular value vector As the main component of reconstructing the original signal, , using the selected singular vectors and Reconstruct the sub-signal , ,in, It is singular values, and use the remaining singular values to construct the sub-signal , , the output of the first processing module is recorded as , , sub-signal Satisfy the equation .
[0033] S3. Build an optimized processing network, including an input layer, three intermediate layers and an output layer.
[0034] Furthermore, in step S3, for the optimization processing network, its structure is as follows Figure 2 As shown, the input is a noisy electromyographic signal ,in, Represents the number of sample points of the electromyographic signal. The optimization processing network consists of an input layer, three intermediate layers and an output layer. Each intermediate layer includes a fully connected layer, batch normalization and an activation function. The output is a weight vector , ,in, Is the selection coefficient, indicating whether to retain the corresponding sub-signal ,when The sub-signal corresponding to the noise ,when , which corresponds to the sub-signal that produces the clean EMG signal.
[0035] S4. Construct the second processing module, including loss function and back propagation.
[0036] Further, in step S4, for the second processing module, its structure is as follows: Figure 3 As shown, the output matrix of the first processing module The output vector of the optimization processing network Multiply to get the denoised electromyographic signal , ,Right now , perform singular value decomposition on the electromyographic signal and discard the singular values and corresponding vectors that capture the noise signal to obtain a clean electromyographic signal , using the denoised signal With clean EMG signals The mean absolute error between them is used as the loss function to calculate the gradient, and then the gradient is back-propagated to train the optimization processing network in a supervised manner.
[0037] S5. Construct an electromyographic signal data denoising processing model, which includes an input, a first processing module, an optimization processing network, a second processing module and an output.
[0038] Furthermore, in step S5, for the electromyographic signal data denoising processing model, the electromyographic signal data is first input into the model, and the electromyographic signal data is input into the first processing module and the optimization processing network in parallel respectively, and the intermediate output obtained is then input into the second processing module, and the final denoised electromyographic signal is obtained after the processing is completed.
[0039] S6. Training and testing of electromyographic signal data denoising processing model. The electromyographic signal data denoising processing model is trained using the electromyographic signal data set. After the training is completed, the electromyographic signal that needs to be denoised is obtained and input into the electromyographic signal data denoising processing model to obtain the denoised electromyographic signal.
[0040] Furthermore, in step S5, for the electromyographic signal data denoising processing model, it is written in Python language and uses the Pytorch framework. The electromyographic signal is input into the electromyographic signal data denoising processing model. The SGD optimizer is used, the learning rate is set to 0.001, the training batch size is 100, and the number of iterations is 500. The input noisy electromyographic signal is trained. After the training, the final denoised electromyographic signal is output.
[0041] Furthermore, in step S6, the original noisy electromyographic signal is Figure 4 As shown in Figure 2, the denoising effect of the EMG signal data denoising processing model is as follows: Figure 5 As shown, from Figure 4 and Figure 5 It can be seen from the comparison that for electromyographic signals, the electromyographic signal data denoising processing model is used to process the noisy electromyographic signals. The noise of the electromyographic signals after processing is greatly reduced compared with the noise of the electromyographic signals before processing. It has an obvious denoising effect on the noisy electromyographic signals, which verifies the effectiveness of the model proposed in this method.
[0042] The above are only preferred embodiments of the present invention. It should be pointed out that a person skilled in the art can make several modifications and improvements without departing from the inventive concept of the present invention, and these all fall within the protection scope of the present invention.
Claims
1. A method for denoising electromyographic signals based on machine learning. It is characterized in that The specific steps include: S1, collecting electromyographic signal data with noise, and performing data preprocessing operations on the electromyographic signal; S2. Construct a first processing module, including singular value decomposition. For the first processing module, the noisy electromyographic signal is subjected to singular value decomposition. The noisy electromyographic signal is p=R N , the noisy electromyographic signal is expressed as p = U∑V T , where N represents the number of sample points of the electromyographic signal, U∈R N×N and V∈R N×N is an orthogonal matrix, ∑∈R N×N It is a diagonal matrix. The elements on the diagonal are singular values. According to the size of the singular value, select the first L singular values and their corresponding left singular vector u i and the right singular value vector V i As the main components of the reconstructed original signal, where i = 1, 2, ..., L, the selected singular vector u is used i and V i Reconstruct the sub-signal x i , Among them, σ i is the,th singular value, and the remaining singular values are used to construct the sub-signal The output of the first processing module is denoted as X, X=[x 1 , x 2 , ..., x L+1 ], sub-signal x i Satisfies the equation p = x 1 +x 2 +…+x L+1 ; S3. Construct an optimization processing network, including an input layer, an intermediate layer, and an output layer. For the optimization processing network, the input is a noisy electromyographic signal p = R N , where N represents the number of sample points of the electromyographic signal. The optimization processing network consists of an input layer, three intermediate layers and an output layer. Each intermediate layer includes a fully connected layer, batch normalization and an activation function. The output is a weight vector k, k = [k 1 , k 2 , ..., k L+1 ] T , where k i is the selection coefficient, indicating whether to retain the corresponding sub-signal x i , when k i = 0 corresponds to the noise sub-signal x i , when k i =1 corresponds to the sub-signal that produces a clean EMG signal; S4, constructing a second processing module, including a loss function and back propagation; S5, constructing an electromyographic signal data denoising processing model, comprising an input, a first processing module, an optimization processing network, a second processing module and an output; S6. Training and testing of electromyographic signal data denoising processing model. The electromyographic signal data denoising processing model is trained using the electromyographic signal data set. After the training is completed, the electromyographic signal that needs to be denoised is obtained and input into the electromyographic signal data denoising processing model to obtain the denoised electromyographic signal.
2. The method for denoising an electromyographic signal based on machine learning according to claim 1, It is characterized in that In the step S4, for the second processing module, the output matrix X of the first processing module is multiplied by the output vector k of the optimization processing network to obtain the denoised electromyographic signal s, s=k 1 x 1 +k 2 x 2 +…k L+1 x L+1 , that is, S = Xk, perform singular value decomposition on the electromyographic signal and discard the singular values and corresponding vectors that capture the noise signal to obtain a clean electromyographic signal C. The mean absolute error between the denoised signal S and the clean electromyographic signal C is used as the loss function to calculate the gradient, and then the gradient is back-propagated to train the optimization processing network in a supervised manner.
3. The method for denoising an electromyographic signal based on machine learning according to claim 1, It is characterized in that In the step S5, for the electromyographic signal data denoising processing model, the electromyographic signal data is first input into the model, and the electromyographic signal data is respectively input into the first processing module and the optimization processing network in parallel, and the obtained intermediate output is then input into the second processing module. After the processing is completed, the final denoised electromyographic signal is obtained.
Citation Information
Patent Citations
Denoising, feature extraction and pattern recognition method for human body surface electromyography signals
CN102073881A
Generative adversarial network-based myoelectricity denoising and active segment detection method
CN115919334A
Electromyographic signal gesture prediction system based on double-flow feature fusion convolutional neural network
CN116172582A
Surface electromyogram signal gesture recognition system based on lightweight convolutional neural network
CN116755547A
Method and system for continuously predicting driver's intention of turning
JP2022039977A
