ISSN 2087-3336 (Prin. | 2721-4729 (Onlin. TEKNOSAINS: Jurnal Sains. Teknologi dan Informatika Vol. No. 2, 2025, page. http://jurnal. id/index. php/tekno https://doi. org/10. 37373/tekno. Performance analysis of the stationary wavelet transform with various thresholding functions for the electrocardiogram signal denoising Indra Hermawan*. Maria Agustin Politeknik Negeri Jakarta. Indonesia. Jln. Prof. DR. Siwabessy. Kukusan. Kecamatan Beji. Kota Depok. Jawa Barat 16425 * Corresponding Author: indra. hermawan@tik. Submitted: 30/12/2024 Revised: 11/05/2025 Accepted: 20/05/2025 ABSTRACT Electrocardiogram (ECG) signals play a vital role in cardiac diagnostics but are highly susceptible to interference from Baseline Wander (BW). Powerline Interference (PLI). Electrode Motion (EM), and Muscle Artifact (MA), which may degrade diagnostic accuracy and increase false alarm rates in healthcare monitoring systems. The Stationary Wavelet Transform (SWT) is known to be effective in ECG denoising. however, its performance is significantly influenced by the choice of thresholding function. This study aims to comprehensively evaluate five thresholding functions (Soft. Hard. Semi Soft. Garrotte, and Stei. when integrated with SWT across various noise types and levels. The performance is assessed using three primary metrics: Root Mean Square Error (RMSE). Percentage Root Difference (PRD), and Signal-to-Noise Ratio (SNR) Improvement. Experimental results indicate that the Stein method delivers the highest signal quality improvement with an average SNR gain of 5. 4 dB, while the Semi Soft method achieves the lowest error rates, reducing RMSE by up to 28% under low to medium noise Under high noise levels, all methods show similar degradation in performance. This study addresses a gap in the literature by providing a novel comparative analysis of thresholding strategies for ECG denoising using SWT. The findings serve as a valuable guide for optimizing noise removal in real-time ECG monitoring systems. Keywords: Electrocardiogram (ECG). Stationary Wavelet Transform (SWT). thresholding function. signal quality. INTRODUCTION The weak amplitude and narrow frequency range of electrocardiogram (ECG) signals make them highly susceptible to contamination by noise and artifacts. These interferences, which originate from external sources, can distort the original ECG waveform and significantly degrade its quality. Such degradation directly affects the accuracy of analysis and diagnosis performed either by clinicians or by automated systems in health monitoring devices designed to observe patient conditions and trigger alerts in case of abnormalities. The presence of noise and artifacts can increase the false alarm rate (FAR), which compromises the reliability of monitoring systems. A high FAR places an additional burden on intensive care staff and can lead to a condition known as Aualarm fatigueAy . , where medical personnel become desensitized to alarms due to repeated exposure to frequent, non-critical alerts. Moreover, excessive false alarms negatively affect the real-time usability of ECG monitoring systems. Therefore, it is essential to develop effective methods to reduce the FAR. One approach to mitigating high FAR is through signal denoising techniques . Various methods have been developed to reduce noise and artifacts both individually and in combination within ECG signals. Address various types of noise present in ECG signals, researchers have developed a wide range of denoising approaches, which can be classified into several major categories: . conventional digital filtering techniques . , . , . adaptive filtering methods . , . , . wavelet-based denoising methods TEKNOSAINS: Jurnal Sains. Teknologi & Informatika is licensed under a Creative Commons Attribution-NonCommercial 4. 0 International License. ISSN 2087-3336 (Prin. | 2721-4729 (Onlin. ISSN 2087-3336 (Prin. | 2721-4729 (Onlin. DOI 10. 37373/tekno. , . Empirical Mode Decomposition (EMD) . , . Variational Mode Decomposition (VMD) . , . , . , . hybrid denoising approaches . , . , and . denoising methods utilizing deep learning algorithms . , . Among these, the Discrete Wavelet Transform (DWT) and Stationary Wavelet Transform (SWT) have been considered promising methods to overcome the limitations of earlier techniques in effectively removing noise . Both methods operate by decomposing the signal into wavelet coefficients and applying thresholding functions to suppress noise. These techniques have been shown to effectively remove electromyographic (EMG) noise while preserving critical signal characteristics . Compared to DWT. SWT offers superior performance due to its advantages in denoising reliability, improved accuracy, and lower computational complexity. Additionally. SWT is a redundant and shift-invariant transform, which enhances its effectiveness in noise removal, pattern recognition, and signal change detection . Despite its various advantages. SWT-based denoising still faces several challenges, particularly in the selection of thresholding functions applied to wavelet coefficients. Thresholding functions play a critical role in determining which components are retained as signals and which are suppressed as noise. Several thresholding techniques, such as Soft. Hard. Semi Soft. Garrotte, and Stein, have been proposed in previous studies . However, to date, there has been limited research that systematically compares the performance of these thresholding functions in the context of ECG signal denoising, especially when accounting for different types and levels of noise . This lack of comprehensive studies indicates a gap in the literature that must be addressed through more structured analysis and In response to this gap, the present study aims to conduct a comparative analysis of five thresholding functions within the framework of the Stationary Wavelet Transform (SWT) for denoising electrocardiogram (ECG) signals. The main objective of this research is to identify the most effective thresholding function for enhancing ECG signal quality under various noise conditions and to provide practical guidance for the optimal implementation of wavelet-based denoising methods. The primary contribution of this study is to offer a comprehensive and experimentally grounded evaluation of the effectiveness of five thresholding functions when combined with SWT for ECG signal denoising. This research presents a systematic comparison of these functions based on relevant quantitative parameters, with broad coverage of noise types and intensity levels. The findings are expected to serve as a valuable reference for developing more reliable health monitoring systems and to inform the selection of appropriate denoising methods tailored to specific application needs whether in clinical settings or wearable devices. The remainder of this article is structured as follows. Section 2 outlines the methodology, including the stages of ECG signal processing using SWT, the thresholding functions applied, and the experimental scenarios. Section 3 discusses the experimental results and analyzes the performance of each thresholding method based on the three evaluation metrics (RMSE. PRD, and SNR Improvemen. across different noise types and levels. Finally. Section 4 concludes the study by summarizing the key findings and offering directions for future research. METHOD This study aims to evaluate the performance of the Stationary Wavelet Transform (SWT) method for denoising electrocardiogram (ECG) signals by employing five different thresholding functions: Soft. Hard. Semi Soft. Garrotte, and Stein. SWT was selected due to its non-downsampling nature, which preserves the original signal length and provides shift-invariance. These characteristics are particularly important for ECG signals, which have smooth waveform patterns and are highly sensitive to small noise disturbances. The overall signal processing workflow in this study is illustrated in Figure 1, which consists of six main stages . The first stage of this process is the pre-processing of the ECG signal. Clean, original signals were obtained from the MIT-BIH Arrhythmia Database and then synthetically contaminated with noise to create controlled testing conditions. Four main types of noise were simulated: Baseline Wander (BW). Powerline Interference (PLI). Electrode Motion (EM), and Muscle Artifact (MA), each applied at three noise intensity levels: low (-6 dB), medium . to 6 dB), and high . to 24 dB). This step aimed to evaluate the robustness of the method under various noise conditions. 216 Indra Hermawan. Maria Agustin Performance analysis of stationary wavelet transform with various thresholding functions for electrocardiogram signal denoising Figure 1. The scheme of noise removal using the wavelet transform method . After the signals were contaminated with noise, the next step was signal decomposition using the Stationary Wavelet Transform (SWT). The decomposition process was performed up to the fourth level using low-pass and high-pass filters, as described in equations . SWT produces two sets of coefficients at each level: approximation and detail coefficients. Since SWT does not perform downsampling, all coefficients retain the same length as the original signal, preserving the temporal structure of the ECG signal. The next step is noise level estimation using the Median Absolute Deviation (MAD) approach, which is derived from the detail coefficients at the first decomposition level. The MAD value is then converted into an estimate of the noise standard deviation , as shown in equation . , and this estimate is subsequently used to determine the threshold value. The threshold is calculated using the universal thresholding formula presented in equation . | | Here, # represents the length of the signal. This threshold serves as a reference for distinguishing signal components from noise during the thresholding process. Once the threshold is determined, five different thresholding functions are applied to the detail coefficients. The Soft and Hard functions are conventional methods. Soft produces smoother transitions but may attenuate important signal amplitudes, whereas Hard preserves amplitude but can introduce artifacts. The Semi Soft. Garrotte, and Stein functions are hybrid approaches designed to balance signal preservation and noise suppression, offering a more adaptive response to the coefficient values . The final stage of the process is signal reconstruction using the inverse Stationary Wavelet Transform (SWT). The thresholded wavelet coefficients are recombined to reconstruct the ECG signal that has undergone the denoising process. The resulting signal is then evaluated using three primary metrics: RMSE, which measures the absolute error. PRD, which quantifies the relative error compared to the original signal. and SNR Improvement, which assesses the enhancement in signal quality from its initially noise-contaminated state. The experimental design utilizes ECG signal data from the MIT-BIH Arrhythmia Database, widely recognized as a standard benchmark for evaluating biomedical signal processing methods. Several clean ISSN 2087-3336 (Prin. | 2721-4729 (Onlin. DOI 10. 37373/tekno. signal recordings were selected and synthetically contaminated with noise to simulate four common types of interference: Baseline Wander (BW). Powerline Interference (PLI). Electrode Motion (EM), and Muscle Artifact (MA). Each type of noise was applied at three levels of intensity: low (-6 dB), medium . to 6 dB), and high . to 24 dB). This setup was designed to test the robustness of the methods under various noise types and intensities. Performance evaluation was carried out using three key metrics: Root Mean Square Error (RMSE) to assess absolute error. Percentage Root Difference (PRD) to evaluate relative error, and Signal-toNoise Ratio Improvement (SNR Improvemen. to measure the enhancement in signal quality. The formulas for calculating RMSE. PRD, and SNR Improvement are presented in equations . , . , and . , respectively. Each combination of thresholding method and noise condition was tested ten times to ensure result stability and consistency. The experimental data were analyzed quantitatively and visualized through comparative performance graphs for each method. $%&' &#$. RESULT AND DISCUSSION Oc- 5 100 23 . / Oc. 10 log < Oc. / | I Oc. / | * * 6 This chapter presents the testing results and analysis of the Stationary Wavelet Transform (SWT) method applied for denoising electrocardiogram (ECG) signals. The evaluation was conducted using five thresholding functions. Soft. Hard. Semi-Soft. Garrotte, and Stein, across four major types of noise: Baseline Wander (BW). Powerline Interference (PLI). Electrode Motion (EM), and Muscle Artifact (MA). The testing results were analyzed using three primary evaluation parameters: Root Mean Square Error (RMSE). Percentage Root Difference (PRD), and Signal-to-Noise Ratio (SNR) Improvement. The discussion focuses on the performance of each method in enhancing ECG signal quality under different noise levels . ow, medium, and hig. , as well as identifying the most effective method based on the combination of these evaluation metrics. The findings in this chapter are expected to provide a comprehensive understanding of the effectiveness of SWT combined with various thresholding functions for denoising ECG signals. BW noise removal The chart in Figure 2 presents the Percentage Root Difference (PRD) under various conditions, which are indicated along the horizontal axis. These conditions include labels such as 118bw-6db, 118bw0db, 118bw6db, 118bw12db, 118bw18db, 118bw24db, 119bw-6db, and extend to 119bw24db. The vertical axis represents percentage values, ranging from 0 up to approximately 40. The graph compares five different methods or categoriesAiSoft. Hard. Semi-Soft. Garrotte, and SteinAieach represented by a different color. In the initial data range, from 118bw-6db to 118bw24db, the percentage values show greater fluctuation across the different methods. In contrast, the subsequent data range, from 119bw-6db to 119bw24db, reveals relatively uniform values across all methods, with no significant differences This chart it can be concluded that under the 118bw condition, the methods exhibit varying results, indicating sensitivity to changes in noise levels. Meanwhile, under the 119bw condition, all methods produce relatively consistent values, demonstrating stability and uniform performance. This may suggest that the 119bw condition is more optimal or stable for all tested thresholding methods compared to the 118bw condition. 218 Indra Hermawan. Maria Agustin Performance analysis of stationary wavelet transform with various thresholding functions for electrocardiogram signal denoising Figure 2. Comparison of PRD values on BW noise Based on the chart in Figure 3, the 119bw condition demonstrates more stable performance, with RMSE values that are nearly uniform across all methods, making it a more reliable overall approach. Under the 118bw condition, the Hard method shows an advantage at the initial stage . bw-6d. , producing lower RMSE values compared to other methods. However, no single method consistently outperforms the others across the subsequent noise levels. Overall, the 119bw condition appears to be more favorable due to its high reliability across all methods, while the Hard method may be a suitable choice for the initial noise scenario under the 118bw condition. Figure 3. Comparison of RMSE values on BW noise According to the chart in Figure 4, the Stein and Garrotte methods demonstrate the best performance under low to moderate noise conditions . anging from 118bw-6db to 118bw12db and from 119bw-6db to 119bw6d. , achieving higher SNR improvement values compared to the other methods. In these scenarios, both methods consistently enhance the SNR significantly, especially under lower noise levels such as 118bw-6db and 119bw-6db. However, under high-noise conditions . bw18db to 118bw24db and 119bw12db to 119bw24d. , all methods exhibit a decline in SNR values, often resulting in negative outcomes. This indicates that none of the tested approaches are effective in improving SNR under high-noise circumstances. ISSN 2087-3336 (Prin. | 2721-4729 (Onlin. DOI 10. 37373/tekno. Figure 4. Comparison of SNR improvement values on BW noise Based on the analysis of Signal-to-Noise Ratio (SNR) Improvement. Root Mean Square Error (RMSE), and Percentage Root Difference (PRD), the most effective methods for handling Baseline Wander (BW) noise are Stein and Garrotte. These two methods exhibit significant SNR improvements under low to moderate noise conditions . rom 118bw-6db to 118bw12db and from 119bw-6db to 119bw6d. , along with more stable RMSE values across different scenarios, particularly in the 119bw In addition, in the PRD chart, both Stein and Garrotte display relatively lower root differences compared to other methods under the 118bw condition. These results indicate that Stein and Garrotte are superior in enhancing signal quality, producing lower error rates, and maintaining overall performance stability. EM noise removal Based on the chart in Figure 5 for Electrode Motion (EM) noise, the Semi Soft method demonstrates better performance under low to moderate noise conditions . rom 118em-6db to 118em12d. , as indicated by lower PRD values compared to the other methods. However, under high-noise conditions . rom 118em18db to 119em24d. , all methods yield nearly uniform PRD values, with no method showing a significant advantage. Overall. Semi Soft can be considered more effective under low to moderate EM noise, while at higher noise levels, all methods perform comparably. Figure 5. Comparison of PRD values on EM noise Based on the Root Mean Square Error (RMSE) chart in Figure 6 for Electrode Motion (EM) noise, the Soft and Hard methods exhibit lower RMSE values under low to moderate noise conditions . rom 118em-6db to 118em12d. , indicating better performance in minimizing prediction errors. However, 220 Indra Hermawan. Maria Agustin Performance analysis of stationary wavelet transform with various thresholding functions for electrocardiogram signal denoising under high-noise conditions . rom 118em18db to 119em24d. , all methods display nearly uniform RMSE values, with no method showing a significant advantage. Overall, the Soft and Hard methods perform better under low to moderate EM noise, while under high-noise scenarios, the performance of all methods tends to converge. Figure 6. Comparison of RMSE values on EM noise According to the SNR Improvement chart in Figure 7 for Electrode Motion (EM) noise, the Soft and Stein methods demonstrate the best performance under low to moderate noise conditions . rom 118em-6db to 118em12db and from 119em-6db to 119em0d. , achieving higher SNR Improvement values compared to the other methods. However, under high-noise conditions . rom 118em18db to 119em24d. , all methods show a decline in performance, with negative SNR Improvement values, indicating difficulty in enhancing signal quality. Overall, the Soft and Stein methods are more effective under low to moderate EM noise conditions, while under high-noise scenarios, all methods exhibit comparable performance. Figure 7. Comparison of SNR Improvement values on EM noise Based on the combined analysis of SNR Improvement. Root Mean Square Error (RMSE), and Percentage Root Difference (PRD) for Electrode Motion (EM) noise, the Soft and Stein methods can be considered the most effective approaches. The Soft method demonstrates more stable performance, with lower RMSE values under low to moderate noise conditions . rom 118em-6db to 118em12d. , as well as consistently low PRD values. Meanwhile, the Stein method excels in improving SNR under similar conditions, indicating strong capability in enhancing signal quality. Under high-noise conditions . rom ISSN 2087-3336 (Prin. | 2721-4729 (Onlin. DOI 10. 37373/tekno. 118em18db to 119em24d. , all methods exhibit comparable performance, with uniform PRD and RMSE values, and negative SNR Improvement scores. Therefore, the Soft and Stein methods are better suited for low to moderate EM noise, whereas under high-noise scenarios, no single method demonstrates a significant advantage. MA noise removal Based on the Percentage Root Difference (PRD) chart in Figure 8 for Muscle Artifact (MA) noise, the Semi Soft and Stein methods demonstrate better performance under low to moderate noise conditions . rom 118ma-6db to 118ma12d. , with relatively lower PRD values compared to the other methods. However, under high-noise conditions . rom 118ma18db to 119ma24d. , all methods produce similar PRD values, with no method showing a significant advantage. Overall, the Semi Soft and Stein methods perform better under low to moderate MA noise conditions, while under high-noise levels, all methods exhibit comparable performance. Figure 8. Comparison of PRD values on MA noise Based on the Root Mean Square Error (RMSE) chart in Figure 9 for Muscle Artifact (MA) noise, the Semi Soft and Garrotte methods exhibit better performance under low to moderate noise conditions . rom 118ma-6db to 118ma12d. , with lower RMSE values compared to the other methods. However, under high-noise conditions . rom 118ma18db to 119ma24d. , all methods display nearly uniform RMSE values, with no method demonstrating a significant advantage. Overall, the Semi Soft and Garrotte methods are more effective under low to moderate MA noise, while under high-noise scenarios, the performance of all methods is relatively similar. Figure 9. Comparison of RMSE values on MA noise According to the SNR Improvement chart in Figure 10 for Muscle Artifact (MA) noise, the Stein and Garrotte methods demonstrate the best performance under low to moderate noise conditions . rom 222 Indra Hermawan. Maria Agustin Performance analysis of stationary wavelet transform with various thresholding functions for electrocardiogram signal denoising 118ma-6db to 118ma12d. , achieving higher SNR Improvement values compared to the other methods. However, under high-noise conditions . rom 118ma18db to 119ma24d. , all methods experience a decline in performance, with negative SNR Improvement values, indicating difficulty in enhancing signal quality. Overall, the Stein and Garrotte methods perform better under low to moderate MA noise, while under high-noise scenarios, all methods exhibit relatively similar performance. Figure 10. Comparison of SNR Improvement values on MA noise Based on the combined analysis of SNR Improvement. Root Mean Square Error (RMSE), and Percentage Root Difference (PRD) for Muscle Artifact (MA) noise, the Stein and Semi Soft methods can be considered the most effective approaches. Stein excels in improving SNR under low to moderate noise conditions . rom 118ma-6db to 118ma12d. , while Semi Soft demonstrates lower and more stable RMSE and PRD values within the same noise range. Under high-noise conditions . rom 118ma18db to 119ma24d. , all methods exhibit nearly uniform performance, with negative SNR Improvement values and similar PRD and RMSE scores. Overall. Stein is more effective in enhancing signal quality, whereas Semi Soft offers better performance in terms of prediction error and stability under low to moderate noise, with comparable results across all methods under high-noise conditions. PLI noise removal Based on the Percentage Root Difference (PRD) chart in Figure 11 for Powerline Interference (PLI) noise, the Semi Soft and Stein methods demonstrate better performance under low to moderate noise conditions . rom 118pli-6db to 118pli12d. , with relatively lower PRD values compared to the other However, under high-noise conditions . rom 118pli18db to 119pli24d. , all methods show nearly uniform PRD values, with no method exhibiting a significant advantage. Overall, the Semi Soft and Stein methods perform better under low to moderate PLI noise conditions, while under high-noise scenarios, all methods display relatively similar performance. Figure 11. Comparison of PRD values on PLI noise ISSN 2087-3336 (Prin. | 2721-4729 (Onlin. DOI 10. 37373/tekno. Based on the Root Mean Square Error (RMSE) chart in Figure 12 for Powerline Interference (PLI) noise, the Semi Soft and Stein methods exhibit better performance under low to moderate noise conditions . rom 118pli-6db to 118pli12d. , with lower RMSE values compared to the other methods. Under high-noise conditions . rom 118pli18db to 119pli24d. , all methods show nearly uniform RMSE values, with no method demonstrating a significant advantage. Overall, the Semi Soft and Stein methods are more effective under low to moderate PLI noise, while under high-noise scenarios, all methods display relatively similar performance. Figure 12. Comparison of RMSE values on PLI noise According to the SNR Improvement chart in Figure 13 for Powerline Interference (PLI) noise, the Soft and Stein methods demonstrate the best performance under low to moderate noise conditions . rom 118pli-6db to 118pli12db and from 119pli-6db to 119pli0d. , showing positive and higher SNR Improvement values compared to the other methods. However, under high-noise conditions . rom 118pli18db to 119pli24d. , all methods experience a significant decline in performance, with negative SNR Improvement values, indicating difficulty in enhancing signal quality. Overall, the Soft and Stein methods perform best under low to moderate PLI noise conditions, while under high-noise levels, all methods exhibit similar performance with negative SNR values. Figure 13. Comparison of SNR Improvement values on PLI noise Based on the combined analysis of SNR Improvement. Root Mean Square Error (RMSE), and Percentage Root Difference (PRD) for Powerline Interference (PLI) noise, the Stein and Semi Soft methods can be considered the most effective approaches. Stein excels in SNR Improvement under low to moderate noise conditions . rom 118pli-6db to 118pli12d. , while Semi Soft demonstrates lower and more consistent RMSE and PRD values within the same range. Under high-noise conditions . rom 118pli18db to 119pli24d. , all methods show nearly equivalent performance, with negative SNR Improvement and similar RMSE and PRD values. Overall. Stein is more effective for signal 224 Indra Hermawan. Maria Agustin Performance analysis of stationary wavelet transform with various thresholding functions for electrocardiogram signal denoising enhancement, while Semi Soft is better at maintaining prediction accuracy and performance stability under low to moderate noise levels. CONCLUSION This study aimed to evaluate the performance of the SWT method for denoising ECG signals by analyzing five different thresholding functions: Soft. Hard. Semi Soft. Garrotte, and Stein. The evaluation was conducted across four common types of ECG noise BW. PLI. EM, and MA each tested at three noise levels: low, medium, and high. The performance of each method was assessed using three key metrics: RMSE. PRD, and SNR Improvement. The findings indicate that the Stein and Semi Soft methods consistently delivered the best overall performance under low to moderate noise conditions. The Stein function achieved the highest SNR improvement, making it ideal for applications where significant signal enhancement is required. Meanwhile, the Semi Soft function produced lower RMSE and PRD values, indicating smaller error margins and greater stability. These two methods demonstrated effectiveness across all noise types and provided reliable denoising results in various scenarios. Under high noise conditions . bove 18 dB), the performance of all methods declined uniformly. This was evident from the negative SNR values and increased error metrics across all techniques, showing that no single thresholding method significantly outperformed the others in such extreme conditions. Thus, the use of SWT-based thresholding functions is most effective in low-to-moderate noise environments. In summary, this study contributes to the selection of optimal thresholding strategies for ECG signal denoising using SWT. The Stein method is recommended for applications prioritizing signal quality enhancement, whereas the Semi Soft method is more suitable for use cases that require stable and accurate signal recovery. These results offer a practical reference for the design and implementation of reliable ECG-based health monitoring systems. For future work, it is recommended to extend this research by testing the SWT and thresholding functions on real-world ECG data collected from clinical or wearable devices to validate their robustness in practical settings. Moreover, integrating SWT with machine learning or deep learning approaches could further improve denoising performance, particularly in complex or high-noise scenarios. Future studies may also explore the effects of different mother wavelets, decomposition levels, and computational efficiency analysis to support real-time REFERENCE