Skip to main content

An improved wavelet threshold denoising approach for surface electromyography signal

Abstract

Background

The surface electromyography (sEMG) signal presents significant challenges for the dynamic analysis and subsequent examination of muscle movements due to its low signal energy, broad frequency distribution, and inherent noise interference. However, the conventional wavelet threshold filtering techniques for sEMG signals are plagued by the Gibbs-like phenomenon and an overall decrease in signal amplitude, leading to signal distortion.

Purpose

This article aims to establish an improved wavelet thresholding method that can filter various types of signals, with a particular emphasis on sEMG signals, by adjusting two independent factors. Hence, it generates the filtered signal with a higher signal-to-noise ratio (SNR), a lower mean square error (MSE), and better signal quality.

Results

After denoising Doppler and Heavysine signals, the filtered signal exhibits a higher SNR and lower MSE than the signal generated from traditional filtering algorithms. The filtered sEMG signal has a lower noise baseline while retaining the peak sEMG signal strength.

Conclusion

The empirical evaluation results show that the quality of the signal processed by the new noise reduction algorithm is better than the traditional hard thresholding, soft thresholding, and Garrote thresholding methods. Moreover, the filtering performance on the sEMG signal is improved significantly, which enhances the accuracy and reliability of subsequent experimental analyses.

1 Introduction

sEMG (surface electromyography) signal is a weak physiological electrical signal that accompanies muscle contraction [1]. It has an amplitude range of 0–10 mv and a frequency range of 10–200 Hz [2]. Non-invasive and non-invasive sEMG acquisition technology is more convenient and safer while ensuring signal validity. As a result, it is extensively employed in fields such as sports science, smart manufacturing, bioengineering, and rehabilitation medicine [3]. Acquiring the signal requires attaching electrodes to the muscle surface. This process often introduces additive white Gaussian noise (AWGN) due to factors such as skin impedance and power supply interference. Directly processing these noise-containing signals can lead to inaccurate results. It underscores the importance of filtering the AWGN and ensuring signal validity before further analysis.

Existing sEMG signal filtering methods, such as the Kalman filter, Chebyshev filter, and Butterworth filter, have yet to provide a flawless solution. While powerful, Kalman and Chebyshev filters can be intricate and sometimes less efficient [4]. They used the Butterworth filter demands specifying the signal frequency range to set up the filtering parameters. This setup impedes distinguishing between the signal’s time and frequency domains, making it challenging to assess the fidelity of the filtered signal [4]. To address this, researchers applied window functions to the signals and introduced a mathematical model of the short-time Fourier transform (STFT). While this approach has enhanced the signal quality to a degree [5], a limitation is that the STFT’s window size is typically fixed, offering limited flexibility for signals with a broad frequency distribution [6,7,8].

Alternative sEMG signal filtering techniques have garnered significant attention, with wavelet transform emerging as a promising solution. The wavelet transform is a time-frequency analysis approach akin to the Fourier transform but focuses more on local time characteristics [9]. It allows for adjusting the wavelet basis parameters in alignment with the original signal’s time-frequency properties [10]. By conducting localized analysis in the time-frequency domain and optimizing the wavelet basis function and threshold function, the signal fidelity can be significantly enhanced [11]. Factors influencing the wavelet denoising efficiency encompass the choice of wavelet basis, threshold magnitude, the number of decomposition levels, etc. [12].

To extend the application scenarios and enhance the performance of wavelet theory, researchers have introduced the concept of fractal-wavelet analysis. This innovative approach synergizes the principles of fractal geometry with wavelet theory to examine intricate structures and signals across diverse disciplines. Notably, fractal-wavelet analysis has proven potent in processing and analyzing data characterized by self-similarity and multi-scale complexity [13]. The wavelet decomposition phase aims to obtain a multiresolution representation of the original signal, ascertaining the optimal wavelet basis and the wavelet decomposition levels using a specific parameter selection technique. Furthermore, its significant potential in signal processing, image analysis, and pattern recognition is evident. In recent times, the fractal-wavelet analysis technique has been employed to investigate deterministic and stochastic scaling of functions, the self-similarity in fractal dimensions and images [13], and the positive definite distributions and wavelets within the realm of engineering mathematics [14, 15]. Especially in remote sensing and signal processing sectors, the utility of fractal-wavelet analysis is undeniable given its prowess in capturing intricate details and efficiently handling vast datasets [16, 17]. Moreover, it has shown profound impacts in image analysis, especially when dealing with complex geometric structures, expanding its application horizons [18, 19].

In conclusion, the threshold denoising method holds considerable sway over the filtering performance of sEMG signals. Conventional threshold denoising techniques tend to introduce AWGN into the original signal for validation and then attempt to denoise it, substantiating the denoising theory [12]. The fidelity of such denoised signals is typically gauged by how closely they resemble the original signal. However, this methodology is not free from criticism. Some experts argue that by strictly adhering to resemblance as the gold standard, one might overlook the inherent noise present within the original signal. Furthermore, achieving a denoised signal with an optimal signal-to-noise ratio does not necessarily alleviate issues related to under-denoising and distortion, especially when the noise signal’s energy level closely mirrors that of the effective signal. Consequently, the adaptability of the threshold filtering approach remains constrained, proving effective only for a specific subset of sEMG signals [20].

In light of the above challenges, this paper introduces an advanced wavelet threshold denoising approach tailored to cater to diverse signal types, with an emphasis on sEMG signals. Unlike conventional methods that rely solely on a fixed threshold, our approach dynamically adjusts the threshold based on the signal’s inherent characteristics, ensuring optimal denoising with minimal signal distortion. This refined approach encompasses wavelet decomposition, threshold denoising, and reconstruction stages. The wavelet decomposition phase ascertains the optimal wavelet basis and the wavelet decomposition levels using a specific parameter selection technique. Following this, an enhanced threshold function is formulated based on the statistical properties of the signal and noise coefficients, drawing inspiration from the Garrote threshold function. This approach proposes two distinct algorithmic schemes. Scheme I incorporates two adjustment factors to tweak the threshold dynamically as per the signal type. Preliminary tests using Doppler and Heavysine signals demonstrate that this method yields a reconstructed signal with superior SNR and minimized MSE, a high-fidelity reconstruction of the original signal. On the other hand, Scheme II leverages a threshold preference function tailored to the idiosyncrasies of the sEMG signal, resulting in an optimal threshold filtering function model. The reconstructed signal’s quality is ascertained using signal peak level and baseline noise. Empirical evidence suggests that our enhanced threshold filtering algorithm provides referential sEMG signal analysis results, highlighting its promise in biomedical engineering and physiotherapy domains.

This article is structured as follows: Sect. 2 delves into the noise model of wavelet denoising and provides an overview of the generic wavelet threshold denoising approach, discussing the wavelet basis and decomposition layer selection technique. Sections 3 and 4 elaborate on the traditional and new threshold functions, elucidating the methodologies and algorithms in depth. Section 5 showcases the processing nuances of simulated and real-world signals, including a comprehensive error evaluation, thereby establishing the efficacy of the algorithm for sEMG signals. Finally, Sect. 6 provides a concise summary and conclusion of our findings.

2 Methodology

Wavelet threshold denoising approach, the noise model of wavelet denoising is [4]:

$$\begin{aligned} f(t)=s(t)+\sigma (t) \end{aligned}$$
(1)

In the equation, f(t) represents the noisy signal, s(t) is the ideal signal, and \(\sigma\)(t) denotes the AWGN signal, following an N(0,2) distribution. According to the relevant literature, the wavelet coefficients of an ideal signal, after wavelet transformation, display strong correlations at various scales and either increase or remain constant as the transformation scale increases. In contrast, the wavelet coefficients of noise signals exhibit weak or no correlations at different scales and decrease with increasing scale during wavelet decomposition. This trend occurs at various levels of wavelet decomposition. For more minor variation scales, the analyzed signal’s wavelet coefficients are predominantly influenced by the noise signal, while for larger transformation scales, they are primarily controlled by the ideal signal [9].

From the conclusions drawn, the general flow of wavelet threshold filtering is established. Figure 1 illustrates that how thresholds are set at different scales to adjust the wavelet coefficients, leading to their subsequent reconstruction [20, 21]. The design of wavelet filters hinges on several criteria, including frequency and time localization, orthogonality or compact support, symmetry, smoothness, and high-order vanishing moments [22]. To tailor the design effectively, researchers and practitioners rigorously evaluate the program requirements, understand the trade-offs between time and frequency localization, and ensure computational efficiency. This comprehensive assessment assists in choosing the apt wavelet basis and designing the optimal wavelet filter for the specific application.

Fig. 1
figure 1

Basic process of sEMG wavelet denoising

2.1 Wavelet basis selection

This study explores commonly used wavelet bases, including Haar wavelets, Daubechies (dbN) wavelets, Mexican Hat (mexh) wavelets, Morlet wavelets, Symlet wavelets, Coiflets wavelets, and Meyer wavelets. Due to its simplicity and widespread application, the Haar wavelet exhibits orthogonality, making it suitable for capturing abrupt signal changes. However, compared to other wavelets, its time and frequency resolution might be lower. In contrast, Daubechies wavelets and Symlets wavelets provide better smoothing for high-frequency components, while Coiflets wavelets excel in frequency resolution. The Morlet wavelet is especially favored for continuous wavelet transformation in time-frequency analysis.

Furthermore, wavelets of different orders exhibit varying degrees of smoothness and resolution in the time and frequency domains. With an increase in wavelet order, there is an enhancement in smoothness and a corresponding decrease in frequency resolution. This trade-off is inherent due to the time-frequency uncertainty principle. Higher-order wavelets are especially adept at processing smooth signals. In contrast, opting for lower-order wavelets might be beneficial for capturing detailed variations in non-smooth signals. Recognizing that exceptionally high wavelet orders can result in an extended filter length, amplifying computational complexity, and potentially introducing boundary effects are crucial.

Given the broad frequency distribution and the inherent random non-smoothness of the original signal, we have zeroed in on Daubechies wavelets, Symlets wavelets, and Coiflets wavelets as potential wavelet bases [23]. We proceeded to model the filter design employing the aforementioned wavelet bases across different orders. By instituting multiple threshold filtering models, we aimed to pinpoint the optimal wavelet basis for the filtered signal via a detailed error analysis [24]. After juxtaposing the errors, the sym4 wavelet from the Symlet wavelet family emerged as the preeminent choice for our research.

2.2 Determination of wavelet decomposition level

The wavelet decomposition level denotes the scale at which the signal undergoes wavelet decomposition, systematically breaking the signal down into its constituent parts across varying scales. The maximum permissible number of decomposition levels is often constrained by the length of the signal and computational considerations. This can be quantitatively expressed as \(j = \log _2(M)\), where \(j\) represents the number of decomposition levels, and \(M\) corresponds to the overall length of the signal [25]. It is imperative to acknowledge that excessively increasing the decomposition levels can degrade the fidelity of the original (or ideal) signal upon reconstruction and amplify computational complexities [26].

Conversely, the lower limit for the number of decomposition levels is governed by the characteristics of the signal and the specific application’s requirements. Typically, a minimum of two levels of decomposition is required to capture both the approximation (coarse features) and detailed (fine features) information of the signal. The lower the decomposition levels, the more limited the denoising effect and reduced signal fidelity. For EMG signal processing, the decomposition level can be set between 3 and 10 levels, contingent upon varying requirements for wavelet bases, thresholding criteria, and waveform intricacies [27]. In this study, we ascertain the optimal number of decomposition levels through quantitative error analysis of signals wavelet-decomposed across different levels, employing the method of control variables for level selection. Specifically, for Doppler and Heavysine signals, we opted for five levels, whereas for sEMG signals, we designated 10 levels. By meticulously considering these parameters, we aim to hone in on the most precise wavelet decomposition for our signal processing approach.

2.3 Selection of thresholding filtering function and wavelet reconstruction

The wavelet threshold is pivotal in determining which wavelet coefficients should consider as noise. The threshold magnitude directly influences the quality of the reconstructed signal. A disproportionately large threshold might inadvertently filter out both noise and the desired signals, while an undersized threshold could allow the noise to persist, resulting in suboptimal denoising [28]. In the MATLAB toolbox (2020b, 2020.09.17), there are four integrated threshold estimation methods: the unbiased likelihood estimation (rigrsure) threshold, the fixed value (sqtwolog) threshold, the heuristic (heursure) threshold, and the minimum–maximum variance (minimaxi) threshold [29]. We will rigorously investigate the filtering efficacy of these threshold estimation techniques. The thresholding operations primarily encompass hard thresholding, soft thresholding, and Garrote thresholding functions [30]. Our subsequent analysis will detail the nuances of these thresholding methods and their implications for the filtering process.

3 Selection of thresholding function

  1. 1.

    Hard threshold

    $$\begin{aligned} f_i(x)=\left\{ \begin{array}{l} x,|x| \ge \lambda \\ 0,|x| \le \lambda \end{array}\right. \end{aligned}$$
    (2)
  2. 2.

    Soft threshold

    $$\begin{aligned} f_i(x)=\left\{ \begin{array}{cl} x-\lambda {\text {sgn}}(x), &{} |x| \ge \lambda \\ 0, &{} |x| \le \lambda \end{array}\right. \end{aligned}$$
    (3)
  3. 3.

    Garrote threshold

    $$\begin{aligned} f_{\textrm{i}}(x)=\left\{ \begin{array}{cl} x-\frac{\lambda ^2}{x}, &{} |x| \ge \lambda \\ 0, &{} |x| \le \lambda \end{array}\right. \end{aligned}$$
    (4)

\(f_{\textrm{i}}(x)\) in the above three equations represents the estimated wavelet coefficients for the \(i\)-th level after threshold denoising processing, where \(x\) represents the input original wavelet coefficient, and \(\lambda\) is the determined threshold. The graphs of the three types of functions are shown in Fig. 2.

Fig. 2
figure 2

Comparison of three types of threshold function images

Among them, the soft and hard threshold functions are widely used in threshold denoising. From the graph of the functions, the hard threshold function is discontinuous, exhibiting a sharp increase at the point \(x=\lambda\). While the soft threshold function displays good continuity, the segment with an absolute value greater than the threshold has a constant bias of \(\lambda\) compared to the original coefficients. As a result, when using the hard threshold to process signals, the estimated wavelet coefficients of the smaller coefficients around \(\lambda\) after filtering will exhibit significant differences. This leads to the complete removal of signals with lower frequencies while retaining the larger ones, even if their energies are comparable. Even though this method can preserve spike signals well, it is prone to the Gibbs-like phenomenon [31]—oscillations at the transition points of the reconstructed signal in the time-frequency plot. The signal reconstructed using the soft threshold function exhibits high smoothness. However, when reconstructing signals with widely distributed coefficients after wavelet decomposition, the fixed coefficient bias might introduce notable deviations between the original and reconstructed signals. This results in over-fitting, leading to signal distortion [32]. To address this challenge, Donoho introduced a threshold filtering approach [33]. Observing Fig. 2:

  1. (1)

    The function lies between the soft and hard thresholds.

  2. (2)

    For larger original wavelet coefficients, the function approaches the hard threshold function.

The Garrote function synergizes the properties of both soft and hard thresholds, effectively mitigating their drawbacks. The smoother reconstructed signal can diminish the Gibbs-like phenomenon at pronounced peaks. Moreover, it provides efficient filtering for signals with dispersed wavelet coefficients. Nonetheless, the Garrote function’s distinct expression might result in suboptimal restoration of the ideal signal when wavelet coefficients cluster around the threshold. Conversely, when the wavelet coefficients are spread out, there might be a need to strengthen the function’s approximation toward the hard threshold profile. This makes the Garrote function somewhat limited in its algorithmic flexibility and application versatility for processing varying input signals [34].

$$\begin{aligned} \lambda = \sigma \sqrt{2 \ln ({N})} \end{aligned}$$
(5)
$$\begin{aligned} \sigma = \sqrt{\frac{{\text{median}} \left({d}_{{ij}}\right) }{0.6745}} \end{aligned}$$
(6)

The formula indicates that \(\sigma\) stands for the standard deviation of the noise, N represents the length of the original signal, and \(d_{ij}\) signifies the median of the wavelet coefficients. From this formula, it is evident that the wavelet coefficient’s threshold value remains consistent across various decomposition levels. However, utilizing the same threshold across these levels often overlooks the variability in the ideal threshold across different wavelet scales. Such oversight can result in pronounced errors, especially when reducing the magnitude of high-frequency detail coefficients [35].

In our study, we refine the threshold selection method rooted in the Garrote function, allowing the wavelet coefficients to adjust according to the decomposition level. This, in turn, augments the algorithm’s filtration precision for noise signals. We introduce an enhanced threshold function that relies on two adjustment factors. The first, represented by \(\mu\), dictates the proximity of the threshold function to the actual threshold. The second, denoted by \(\delta\), controls its general behavior toward the hard threshold. Such a configuration facilitates flexible tweaks in sync with the wavelet coefficient distribution for diverse signals, amplifying the restoration quality of the filtered signal to its ideal state.

4 Advancements in threshold denoising techniques

4.1 Strategy for adaptive layered threshold selection

Post-wavelet transformation, the wavelet coefficients of both the ideal and noise signals display unique statistical traits across different scales. Specifically, the coefficients of the ideal signal manifest a potent correlation across scales, either amplifying or maintaining their magnitude with scale increments. In contrast, noise signal coefficients portray weak or negligible correlations, dwindling as the scale heightens. Grounded on this observation, our paper leverages the thresholding algorithm detailed in reference [36].

$$\begin{aligned} \lambda =\frac{\sigma \sqrt{2 \ln N}}{\ln (j+1)} \end{aligned}$$
(7)

In the equation above, j denotes the decomposition level, while other parameters align with those in Eq. (4). The threshold, \(\lambda\), as detailed in Eq. (7), is influenced not only by the overall length of the wavelet coefficients and the noise magnitude but also diminishes with the rise in decomposition level. Such a trend resonates with the earlier discussed dynamics of noise variation with decomposition level, theoretically fostering superior denoising outcomes.

4.2 Conception of the threshold filtering function

As highlighted in Sect. 3, the trio of threshold functions dissected earlier exhibits inherent limitations upon being applied to unprocessed signals from diverse origins, attributed to their immutable function structures. Hence, the novel threshold function should draw inspiration from conventional threshold functions while imbibing the ensuing traits:

  1. (1)

    For the segments of the original wavelet coefficients with an absolute value falling below the threshold, they should be equated to zero.

  2. (2)

    For original wavelet coefficients with absolute values exceeding the threshold, their function graph should lean toward the hard threshold.

However, contingent on the intrinsic properties of the original signal, the ensuing parameters mandate meticulous regulation:

  1. (1)

    A rapid approximation can proficiently rectify the persistent bias dilemma in soft threshold functions. Nevertheless, it might simultaneously elevate the alteration rate of post-filtered wavelet coefficients, mirroring the pronounced oscillation peaks predicament inherent in hard threshold functions.

  2. (2)

    A gradual approximation might inflict a pronounced input–output discrepancy, especially for wavelet coefficients hovering near the threshold. This might culminate in an overly smooth reconstruction function, culminating in the inadvertent omission of pivotal signals.

In light of the above attributes and the merits of the Garrote function’s design, we advocate an improved threshold function, delineated in Eq. (8) that follows.

$$\begin{aligned} f_{\textrm{i}}(x)={\left\{ \begin{array}{ll}x-\left[ e^{\delta (\lambda -x)} \cdot \frac{\lambda ^2}{\sqrt{x^2-2 x e^\mu \left( e^{\lambda -x}-1\right) }}\right] +\left[ 1-e^{\delta (\lambda -x)}\right] \cdot \frac{\lambda ^2}{x \cdot e^{\delta (x-\lambda )}} &{} x>\lambda \\ 0 &{} x<=\lambda \\ x+\left[ e^{\delta (\lambda +x)} \cdot \frac{\lambda ^2}{\sqrt{x^2+2 x e^\mu \left( e^{\lambda +x}-1\right) }}\right] -\left[ 1-e^{\delta (\lambda +x)}\right] \cdot \frac{\lambda ^2}{-x \cdot e^{-\delta (x+\lambda )}} &{} x<\lambda \end{array}\right. } \end{aligned}$$
(8)

In this equation, \(\lambda\) represents the selected threshold, and \(\delta\) and \(\mu\) are the overall adjustment coefficient and the adjustment coefficient near the threshold, respectively. When \(\delta\) is preselected, and \(\mu\) is increased, the function rapidly approaches the hard threshold function at a smaller distance from the threshold, as illustrated in Fig. 3. Conversely, when \(\mu\) takes a larger value, the function rises over a smaller range and gradually slows down before approaching the hard threshold function.

Fig. 3
figure 3

Changing \(\mu\) value for four types of function image comparison

Alternatively, when \(\mu\) is present and \(\delta\) is increased, the function globally approaches the hard threshold function, as demonstrated in Fig. 4. The improved threshold function maintains continuity. By tweaking the values of \(\mu\) and \(\delta\), a more adaptive and effective modulation of the threshold function is possible, aiming to improve the reconstruction of the original signal. For noisy signals with a broad frequency domain distribution, opting for a higher \(\delta\) value can diminish the constant disparity between the wavelet coefficients post-threshold filtering and the original wavelet coefficients, thus enhancing the signal’s reconstruction capability. Conversely, for noisy signals characterized by extensive variations, selecting a lower \(\mu\) value can help in smoothening the wavelet coefficients, thereby reducing the Gibbs-like phenomenon observed in the filtered signal.

Fig. 4
figure 4

Changing \(\sigma\) value for four types of function image comparison

4.3 Simulation experiment design and analysis

To validate the robustness of the improved threshold algorithm, the author will conduct experiments using standard test signals: Doppler, which exhibits broad frequency domain distributions, and Heavysine, characterized by strong discontinuities. Gaussian white noise will be added to these signals to simulate noisy conditions, after which they will be subjected to denoising using the proposed thresholding technique with a self-selected adjustment factor.

In the evaluation process, two prominent metrics, signal-to-noise ratio (SNR) and mean square error (MSE), will be employed to gauge the denoising efficacy. Within this context, SNR denotes the ratio of the power of the ideal signal to that of the noise. A superior SNR value indicates enhanced filtering performance, reflecting a higher fidelity in the restoration of the original signal [37]. On the other hand, MSE serves as a measure of the average squared differences between the filtered and original signals. A diminished MSE implies that the denoised signal is in close alignment with the ideal signal, showcasing minimal deviation and, thus, lower distortion.

$$\begin{aligned} {\text{SNR}} = 10 \log \left[ \frac{\sum _{i=1}^N(s(i))^2}{\sum _{i=1}^N(s(i)-x(i))^2}\right] \end{aligned}$$
(9)
$$\begin{aligned} {\text{MSE}} = \frac{1}{N} \sum _{i=1}^N 10 \log [s(i)-x(i)]^2 \end{aligned}$$
(10)

For comparison, this paper applied hard thresholding, soft thresholding, Garrote thresholding, and the improved thresholding approach to denoise the noisy signals. The wavelet basis used was sym4, the decomposition level was 5, and the threshold was selected as sqtwolog (fixed threshold), with the threshold size estimated and adjusted based on the wavelet coefficients at each level. The simulation results for the Doppler signal are shown in Fig. 5.

Fig. 5
figure 5

Denoising effect of Doppler signal

Fig. 6
figure 6

Denoising effect of Heavysine signal

From the comparison of denoising effects in Fig. 5 with the original signal, the following observations can be made:

  1. (1)

    Hard thresholding performs well in data restoration for the first 0–50 samples. However, it exhibits spike artifacts in the waveform corresponding to data points of 100–200 samples, with noticeable fluctuations around 250 data points, resulting in poor restoration of the original signal.

  2. (2)

    Soft thresholding results in a relatively smooth denoised signal, with better restoration of the signal in the low-frequency band. However, there is a noticeable fixed deviation between the amplitudes of data points in the range of 0–100 samples and the original signal, leading to signal distortion.

  3. (3)

    Both Garrote and improved thresholding methods combine advantages from previous methods. Compared to Garrote thresholding, the improved thresholding approach exhibits better processing for waveform details and closely approximates the original signal waveform around 300–400 data points, resulting in a better denoising effect. In addition, the quantitative indicators of each model’s denoising effect on the Doppler noisy signal are shown in Table 1.

Table 1 Denoising effect of thresholding algorithms on Doppler signals

From Table 1, it can be observed that the Garrote thresholding approach improves the signal fidelity to some extent compared to the hard and soft thresholding methods, but the improvement effect is limited. As indicated in the table in bold, the improved threshold approach exhibits highest SNR (24.4057), lowest MSE (0.00031102), this indicates a higher fidelity of the reconstructed signal to the original signal, and a more obvious denoising effect compared to the other three threshold processing methods. The simulation data demonstrate that the improved threshold filtering approach enhances the original signal’s restoration. Next, the four threshold filtering methods are applied to the noisy Heavysine signal. The sym4 wavelet is also used for five-level decomposition, and the threshold is selected as sqtwolog (fixed threshold), with the threshold size estimated and adjusted based on the wavelet coefficients at each level. The Heavysine signal contains two discontinuities, the adjustment factor \(\mu\) is set to 1, and \(\delta\) is chosen as 0.01. The simulation results and quantitative indicators are shown below.

Similarly, the filtered signals from various filtering methods are compared with the original signals.

  1. (1)

    The filtering methods based on the hard thresholding approach perform better in restoring the signal at the discontinuities. However, an increased Gibbs-like phenomenon appears, distorting the signal. On the other hand, the filtered signal based on the soft thresholding approach provides a smoother overall appearance. Still, it fails to accurately capture the two signal waveforms at the discontinuities, leading to a loss of critical information.

  2. (2)

    The Garrote thresholding approach combines the strengths of the first two methods, but artifacts remain in the overall signal waveform. In contrast, the improved threshold filtering approach does not introduce unwanted spikes or oscillations across the entire waveform and offers the best restoration effect at the discontinuities.

The quantitative indicators of the denoising effect of each model on the Heavysine noise signal are presented in Table 2.

Table 2 Denoising effect of thresholding algorithms on Heavysine signals

From Table 2, it can be seen that for the Heavysine signal containing two discontinuities, the denoising effect of the Garrote thresholding approach is better than various hard and soft thresholding methods, but the improvement is not significant. As indicated in the table in bold, the improved threshold denoising approach exhibits the highest SNR (25.4245) and the lowest MSE (0.0273), demonstrating its superior enhancement effect on signal quality. By plotting the reconstructed signal graphs based on various denoising methods, as shown in Fig. 6. it can be observed that the reconstructed signal of the improved thresholding denoising method effectively mitigates spurious signals within the 0-20 sample points, while providing superior restoration around the abrupt changes near the 300th and 700th signal points. On the general chart, the improved thresholding denoising method yields a reconstructed signal with the highest fidelity to the original signal and minimal error.

The optimization algorithm design process involves using MATLAB simulation software to build upon the basic wavelet threshold denoising algorithm by continuously updating the tuning factors within a loop sequence and extracting a quantitative indicator of the error represented by “s.” By comparing the sizes of “s,” the optimal values for \(\mu\) and \(\delta\) can be determined, and the corresponding filtered signal can be outputted. The algorithm flowchart is shown in Fig. 7.

Fig. 7
figure 7

Flowchart of improved wavelet thresholding method

In this simulation experiment, the upper and lower limits of the adjustment factor \(\mu\) are selected as [a, b), the range of \(\delta\) is selected as [c, d), and \(\Delta {m}\) and \(\Delta {n}\) are the respective step increments. For this study, a and c are set to 0.01, b is set to 8, and d is set to 10. The values of \(\Delta m\) and \(\Delta n\) are chosen as 0.01, and the quantization error \(s\) is represented by the SNR and MSE.

5 Generation of simulated signals

5.1 Instance verification and analysis

In the previous section, the effectiveness of the filtering algorithm was verified using simulated signals. To further validate the improved threshold algorithm for denoising sEMG signals, this study employs original sEMG signals simulated from the Python physiological signal database Neurokit2. Gaussian white noise is subsequently added to these signals to produce the noisy signals.

5.2 Error quantification

The noisy signal is input into the filtering algorithm, as previously described. The quantitative indicators for each model based on different threshold filtering algorithms are established and visualized in Fig. 8. Here, \(\mu\) and \(\delta\) represent the adjustment factors, and the z-axis corresponds to the magnitude of the quantitative indicators. The extreme value points \(\mu =0.91\) and \(\delta =0.01\) are selected, corresponding to the highest quality filtered signal with the highest SNR and lowest MSE. The post-filter graphs of other threshold filtering algorithms are also plotted in Fig. 9. The corresponding quantitative indicators are then calculated and listed in Table 3. Consistent with the preceding text, as indicated in the table in bold, the improved threshold denoising approach exhibits the highest SNR (13.9215) and the lowest MSE (0.0029), the reconstructed signal remains highly faithful.

Fig. 8
figure 8

Comparison between the example signal and the signal after improved threshold filtering

Fig. 9
figure 9

Comparison between the example signal and the signal after improved threshold filtering

Table 3 Effect of different denoising functions on the quality of the simulated signal

From Table 3, the quantification indicators reveal the performance of various denoising functions. When using the sqtwolog threshold, the Garrote thresholding method slightly surpasses both soft and hard thresholding methods in terms of signal fidelity. However, the new improved threshold function outshines others, exhibiting the highest SNR and lowest MSE. This suggests that its filtered signal closely approximates the original.

Furthermore, the time-frequency distribution maps of the soft and hard threshold functions based on the rigrsure threshold and the improved threshold function are drawn (Fig. 10). From these maps, it can be seen that the improved wavelet threshold function better reflects the amplitude-frequency characteristics of the original signal, as the amplitudes corresponding to the three groups of muscle cycle movement waveforms appearing around 2 s, 5 s, and 8 s are more similar for the improved threshold function. Comparing the amplitude-frequency plots a and b, it is evident that introducing white noise significantly amplifies the baseline noise during the resting intervals of the electromyographic signal. Additionally, the peak amplitude during the active phases of the exercise is slightly increased due to the addition of white noise. When contrasting b with c, it is clear that the soft thresholding approach effectively filters out the noise during these resting intervals. However, it considerably attenuates the signal peaks during the active phases, which can compromise the signal fidelity and impact subsequent analysis. In contrast, comparing b with d shows that while hard thresholding effectively retains the signal peaks, it does not handle the baseline noise during the resting phase as effectively. Overall, the improved thresholding method demonstrates the best overall filtering performance across the entire time series, enhancing the signal’s fidelity and utility. The chosen adjustment parameters, \(\mu =0.91\) and \(\delta =0.01\), will be applied for processing subsequent field-recorded signals.

Fig. 10
figure 10

Individual example of the extraction of muscle synergies. a Original signal amplitude-frequency graph, b signal amplitude-frequency graph after adding noise, c signal amplitude-frequency graph after soft function filtering based on rigrsure threshold, d signal amplitude-frequency graph after soft function filtering based on rigrsure threshold, and e signal amplitude-frequency graph after improved threshold function filtering

5.3 Case study

After optimizing the simulated signals, two specific adjustment factors were derived. These factors were then utilized to construct a filtering algorithm model for the actual instance. Given that both the frequency and sampling duration of the simulated signal mirrored those of the actual signal, the obtained factors are of significant reference value for processing the actual instance.

The laboratory utilized a 16-channel wireless sEMG instrument (delsys Trigno IM) with an electrode spacing of 10 mm and a bandwidth ranging from 10 to 850 Hz. A total of 10 sEMG signals were captured from various muscles of the pilot subjects, sampled at a rate of 1260 Hz, as illustrated in Fig. 11. The average sample duration was 110 s, with the experimental signal being sent to the main computer in real-time, enabling real-time observation of the muscle motion, as depicted in Fig. 12.

Fig. 11
figure 11

sEMG signal acquisition experiment

Fig. 12
figure 12

Two degrees of freedom joystick

The experimental protocol required participants to hold the operating handle in the left and right directions under varying torques: high, medium, and low. The two degrees of freedom operating device, regulated by a PLC, simulated the X/Y plane movement of an aviation control stick, as shown in Fig. 13. Both the photoelectric encoder of the motor and the torque sensor relayed real-time positional and force data to the host computer via the PLC. The sequence involved starting with a leftward hold under high torque, transitioning through medium and low torques, and then switching the torque direction for rightward holds from low to high torques. Each hold lasted 10 s. Between experiments with different torques, an 8-s break was introduced to mitigate the impact of muscle fatigue on signal quality. Figure 14 shows the real electromyogram (sEMG) collected in the experiment, with the black part representing the raw data. As a comparison, the red part displays the signal processed by the improved threshold algorithm for denoising. To better describe the filtering effect, the amplitude-frequency graph of the signal is plotted.

Fig. 13
figure 13

Real-time signal reception interface

Fig. 14
figure 14

Comparison between the example signal and the signal after improved threshold filtering

The simulation findings confirm that the improved threshold function effectively filters out noise, especially the undesired baseline noise observed during muscle rest periods, from the sEMG signals. Simultaneously, it preserves the essential muscle activity signals during motion. As evident in the amplitude comparisons in Figs. 15 and 16, the energy of the noise signal around timestamps 20 s, 40 s, and 55 s is notably reduced after filtering. Simultaneously, the peak activity signals during the muscle maintenance phase at approximately 10 s and 30 s are well-preserved. Our results highlight the enhanced signal fidelity achieved with the modified threshold function. Our evaluations focus on the fidelity with which the processed signal replicates its unaltered state, regardless of whether we adopt standard values or leverage adjustment coefficients derived from simulations. A promising avenue for future research is integrating paraconsistent logic into wavelet filter design. Given its capability to systematically address contradictions within stipulated contexts, paraconsistent logic may offer innovative strategies to strengthen filter robustness. The primary goal is to utilize this synthesis to refine the relationship between adjustment coefficients and motion recognition accuracy, thereby enhancing the algorithm’s resilience in uncertain scenarios and augmenting the efficacy of wavelet-based signal processing methodologies [38].

Fig. 15
figure 15

Original signal amplitude and frequency diagram

Fig. 16
figure 16

Improve signal amplitude and frequency diagram

6 Conclusion

In this study, we introduce an advanced wavelet threshold denoising methodology by extending the Garrote threshold function. We meticulously design a threshold function fortified with dual adjustment factors, enabling the derivation of an array of filtering algorithms that adeptly adapt to varying noise intensities. Noteworthily, our methodology transcends the boundaries of myoelectric signals and showcases compatibility with a diverse set of signals, paving the way for tailored applications as per experimental mandates.

Our innovative strategy confers distinct advantages:

  1. (1)

    By holistically appraising the signal’s temporal attributes and its spectral distribution in the frequency domain, we achieve superior denoising by prudently selecting pertinent adjustment factors.

  2. (2)

    Drawing upon inherent signal characteristics, we craft a simulated waveform and deploy a specialized preference algorithm. This algorithm facilitates the extraction of optimal adjustment coefficients through iterative cycles of noise infusion and subsequent denoising. These deduced coefficients are subsequently interfaced with the foundational threshold function, catalyzing enhanced denoising.

The essential advantage of this method is the ability to select the filtered signal with the most significant reduction in noise from a large number of function models, resulting in the optimal threshold function that effectively suppresses noise. In realms like biomedical engineering and physiotherapy, our strategy promises to give some inspirations, especially for intricate tasks such as eigenvalue extraction and post-denoising signal appraisal.

Data availability

All data generated or analyzed during this study are included in this published article.

References

  1. D. Zeping, Q. Dawei, L. Jing, Surface muscle advances in electric human lower limb action recognition and prediction. Comput. Eng. Appl. 2023, 1–15 (2023)

    Google Scholar 

  2. H. Haiyan, Semg-based lower limb knee angle prediction method. Thesis, Shanghai Normal University (2022). https://doi.org/10.27312/d.cnki.gshsu.2022.001951

  3. F. Wenyuan, Research and design of semg gesture recognition system for artificial intelligence education. Thesis, Shanghai Normal University (2021). https://doi.org/10.27312/d.cnki.gshsu.2021.000827

  4. W. Wei, J. Hong, C. Wang, L. Wang, De-noising surface electromyograms using an adaptive wavelet approach. J. Xray Sci. Technol. 25(4), 711–720 (2017). https://doi.org/10.3233/xst-17301

    Article  Google Scholar 

  5. T. Wang, F. Yang, J. Yang, Experimental analysis of the effect of window length on blind source separation algorithms in the time-frequency domain. Netw. New Media Technol. 11(05), 8–14 (2022)

    Google Scholar 

  6. C. Liyu, W. Zhizhong, Z. Haihong, A surface emg signal identification method based on short-time Fourier transform. Chin. J. Med. Instrum. 24(3), 133–136 (2000)

    Google Scholar 

  7. H. Giv, Directional short-time Fourier transform. J. Math. Anal. Appl. 399(1), 100–107 (2013). https://doi.org/10.1016/j.jmaa.2012.09.053

    Article  MathSciNet  MATH  Google Scholar 

  8. K. Veer, R. Agarwal, Wavelet and short-time Fourier transform comparison-based analysis of myoelectric signals. J. Appl. Stat. 42(7), 1591–1601 (2015)

    Article  MathSciNet  MATH  Google Scholar 

  9. H.D. Wu Shuicai, W. Yijie, Medical signal processing and application, in Wavelet Analysis of Biomedical Signals, vol. 1, ed. by W. Shuicai (Beijing University of Technology Press, Beijing, 2014), pp.123–129

    Google Scholar 

  10. K.L. Jun, Matlab wavelet analysis super learning handbook, in Discrete Wavelet Transform, vol. 1, ed. by E. Zaimis (People’s Posts and Telecommunications Press, Beijing, 2014), pp.494–523

    Google Scholar 

  11. F. Meziani, S.M. Debbal, A. Atbi, Analysis of phonocardiogram signals using wavelet transform. J. Med. Eng. Technol. 36(6), 126–133 (2012)

    Article  Google Scholar 

  12. L. Weisong, X. Weijie, Z. Tao, Improvement of threshold denoising algorithm based on wavelet transform. Comput. Simul. 38(06), 348–351356 (2021)

    Google Scholar 

  13. M.V. Berry, Z.V. Lewis, On the Weierstrass-Mandelbrot fractal function. Proc. R. Soc. A 370(1743), 459–484 (1980)

    MathSciNet  MATH  Google Scholar 

  14. E. Guariglia, S. Silvestrov, Fractional-wavelet analysis of positive definite distributions and wavelets on d′(c), in Engineering Mathematics II. ed. by S. Silvestrov, M. Rani (Springer, Heidelberg, 2016), pp.337–353

    Chapter  Google Scholar 

  15. E. Guariglia, R.C. Guido, Chebyshev wavelet analysis. J. Funct. Spaces (2022). https://doi.org/10.1155/2022/5542054

    Article  MathSciNet  Google Scholar 

  16. L. Yang, H.L. Su, C. Zhong, Z.Q. Meng, H.W. Luo, X.C. Li, Y.Y. Tang, Y. Lu, Hyperspectral image classification using wavelet transform-based smooth ordering. Int. J. Wavelets Multiresolut. Inf. Process. (2019). https://doi.org/10.1142/s0219691319500504

    Article  MathSciNet  MATH  Google Scholar 

  17. X.W. Zheng, Y.Y. Tang, J.T. Zhou, A framework of adaptive multiscale wavelet decomposition for signals on undirected graphs. IEEE Trans. Signal Process. 67(7), 1696–1711 (2019). https://doi.org/10.1109/tsp.2019.2896246

    Article  MathSciNet  MATH  Google Scholar 

  18. E. Guariglia, Primality, fractality, and image analysis. Entropy (2019). https://doi.org/10.3390/e21030304

    Article  MathSciNet  MATH  Google Scholar 

  19. E. Guariglia, Harmonic sierpinski gasket and applications. Entropy (2018). https://doi.org/10.3390/e20090714

    Article  MathSciNet  Google Scholar 

  20. M. Srivastava, C. Anderson, J. Freed, A new wavelet denoising method for selecting decomposition levels and noise thresholds. IEEE Access 4, 3862–3877 (2016). https://doi.org/10.1109/access.2016.2587581

    Article  Google Scholar 

  21. R.C. Guido, F. Pedroso, A. Furlan, R.C. Contreras, L.G. Caobianco, J.S. Neto, Cwt x dwt x dtwt x sdtwt: Clarifying terminologies and roles of different types of wavelet transforms. Int. J. Wavelets Multiresolut. Inf. Process. (2020). https://doi.org/10.1142/s0219691320300017

    Article  MathSciNet  MATH  Google Scholar 

  22. D. Yujuan, Based on wavelet transform speech threshold denoising algorithm research. Thesis, Chongqing University (2009)

  23. R.C. Guido, A note on a practical relationship between filter coefficients and scaling and wavelet functions of discrete wavelet transforms. Appl. Math. Lett. 24(7), 1257–1259 (2011). https://doi.org/10.1016/j.aml.2011.02.018

    Article  MathSciNet  Google Scholar 

  24. R.C. Guido, Wavelets behind the scenes: practical aspects, insights, and perspectives. Phys. Rep. Rev. Sect. Phys. Lett. 985, 1–23 (2022). https://doi.org/10.1016/j.physrep.2022.08.001

    Article  MathSciNet  Google Scholar 

  25. R.C. Guido, Effectively interpreting discrete wavelet transformed signals. IEEE Signal Process. Mag. 34(3), 89 (2017). https://doi.org/10.1109/msp.2017.2672759

    Article  MathSciNet  Google Scholar 

  26. J. Tianyong, Y. Chenyu, H. Ke, Z. Jie, W. Lei, Optimization of vmd parameter joint based on ao algorithm bridge signal denoising method based on wavelet thresholding. J. China Highway Soc. 2023, 1–19 (2023)

    Google Scholar 

  27. G. Xuan, Z. Wei, L. Shanshan, L. Fu’e, L. Donghua, Research on ecg emg signal denoising based on improved wavelet thresholding algorithm. Chin. J. Med. Phys. 40(02), 212–219 (2023)

    Google Scholar 

  28. H. Wenwen, Research on physiological signal analysis and processing algorithms for wearable devices. Thesis, University of Electronic Science and Technology of China (2021). https://doi.org/10.27005/d.cnki.gdzku.2021.005082

  29. D. Valencia, D. Orejuela, J. Salazar, J. Valencia, Comparison analysis between rigrsure, sqtwolog, heursure and minimaxi techniques using hard and soft thresholding methods, in 2016 XXI Symposium on Signal Processing, Images and Artificial Vision (STSIVA), pp. 5–5 (2016). https://doi.org/10.1109/stsiva.2016.7743309

  30. M.A. Hassanein, M.T. Hanna, N.P.A. Seif, M.T.M.M. Elbarawy, Signal denoising using optimized trimmed thresholding. Circuits Syst. Signal Process. 37(6), 2413–2432 (2018)

    Article  MathSciNet  MATH  Google Scholar 

  31. Z. Jun, G. Xingguang, Z. Yitao, Y. Fei, W. Yunfeng, Z. Haiying, Application of translation wavelet transform with new threshold function in pulse wave signal denoising. Technol. Health Care 31, 551–563 (2023)

    Article  Google Scholar 

  32. R. Qiwen, Theory and application of wavelet transform and fractional Fourier transform, in Wavelet Time-Frequency Characteristics and Applications. ed. by R. Qiwen (Harbin Institute of Technology Press, Harbin, 2016), pp.494–523

    Google Scholar 

  33. L. Breiman, Better subset regression using the nonnegative garrote. Technometrics 37(4), 373–384 (1995). https://doi.org/10.2307/1269730

    Article  MathSciNet  MATH  Google Scholar 

  34. L. Chun, A. Yuan, L. Xin, Research on the improvement of denoising based on garrote threshold method. Mod. Inf. Technol. 2(04), 1–5 (2018)

    Google Scholar 

  35. B. Zou, H. Liu, Z. Shang, R. Li, Proceedings of 2015 IEEE 6th international conference on software engineering and service science. Image Denoising Based On Wavelet Transform, pp. 366–368 (2015)

  36. F. Xiaolong, X. Weicheng, J. Wenbo, L. Yi, H. Xiaoli, A kind of stationary wavelet transform power quality disturbance signal denoising method with improved threshold function. Acta Electrotech. 31(14), 219–226 (2016). https://doi.org/10.19595/j.cnki.1000-6753.tces.2016.14.025

    Article  Google Scholar 

  37. X.L. Cui, L. Mili, G. Wang, H.Y. Yu, Wavelet-based joint ct-mri reconstruction. J. Xray Sci. Technol. 26(3), 379–393 (2018). https://doi.org/10.3233/xst-17324

    Article  Google Scholar 

  38. R.C. Guido, Paraconsistent feature engineering. IEEE Signal Process. Mag. 36(1), 154–158 (2019). https://doi.org/10.1109/msp.2018.2874549

    Article  Google Scholar 

Download references

Acknowledgements

The authors gratefully acknowledge the financial support of “National Key R and D Program of China” (No. 2020YFC2007402, No. 2020YFC2007401, No. 2020YFC2007404, No. 2020YFC2007403, No. 2020YFC2007405, and No. 2020YFC2007400), Basic Research Program of Suzhou (SJC2022011), and Special project of basic research on frontier leading technology in Jiangsu Province (BK20192004C). The authors thank Senhao Zhang’s technical guidance and Benkun Bao’s help with language and writing—review and editing.

Author information

Authors and Affiliations

Authors

Contributions

CO designs algorithms, completes simulation experiments, and writes manuscripts; LC and TZ provide technical support; and BL and SY provide suggestions for graphics and article details.

Corresponding author

Correspondence to Liming Cai.

Ethics declarations

Competing interests

The authors declare that they have no competing financial interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Ouyang, C., Cai, L., Liu, B. et al. An improved wavelet threshold denoising approach for surface electromyography signal. EURASIP J. Adv. Signal Process. 2023, 108 (2023). https://doi.org/10.1186/s13634-023-01066-3

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/s13634-023-01066-3

Keywords