Skip to main content
Heliyon logoLink to Heliyon
. 2024 Feb 14;10(5):e26171. doi: 10.1016/j.heliyon.2024.e26171

An efficient ECG signals denoising technique based on the combination of particle swarm optimisation and wavelet transform

Abdallah Azzouz a,, Billel Bengherbia a, Patrice Wira b, Nail Alaoui c, Abdelkerim Souahlia d, Mohamed Maazouz a, Hamza Hentabeli a
PMCID: PMC10918013  PMID: 38455529

Abstract

During the recording time, electrocardiogram (ECG) signals are subject to multiple artefact noises, such as muscle activity, white Gaussian noise (WGN), baseline wander, and power line interference (PLI). Therefore, pre-processing of ECG signals is essential to eliminate these artefacts and to obtain efficient ECG features. Many approaches have been proposed for removing ECG noises, including ECG signal denoising using wavelet transform (WT). However, the effectiveness and performance of the WT technique are strongly related to the configuration of its control parameters, which are typically fine-tuned through a laborious and time-consuming series of experiments. This paper introduces a technique that combines particle swarm optimisation (PSO) with WT for ECG signal denoising. The key contribution of this research is the use of PSO to determine the optimum settings for all WT parameters for ECG signal denoising (type of wavelet basis function Φ, thresholding function β, level of decomposition L, rule for threshold selection λ, and rescaling method ρ). The efficiency of the proposed method is evaluated using the percentage root mean square difference (PRD) and the signal-to-noise ratio (SNR), employing various ECG signals available online from the MIT-BIH Arrhythmia database. Experimental results show that the proposed PSO-WT technique yields better results than state-of-the-art techniques in terms of SNR, particularly for PLI measured at 60 Hz and still acceptable at 50 Hz. For example, a denoised ECG signal resulting from the proposed technique at an SNR input of 10 dB corresponds to an SNRoutput of 27.47 dB at 60 Hz, improving the quality of the denoised ECG signal and making it more appropriate for clinical diagnosis. Furthermore, the proposed method also shows promising efficiency in the presence of WGN, making it highly relevant for IoT applications and RF transmission.

Keywords: Electrocardiogram, Particle swarm optimisation, Wavelet transform, AWGN, Power line interference

1. Introduction

An electrocardiogram (ECG) is a standard tool for detecting cardiovascular disorders. The ECG reflects the electrical activity of the cardiovascular system and is easily recorded using surface electrodes placed on the limbs or chest. The ECG signal consists of the P wave, QRS complex, and T wave, which together depict a heartbeat. The P wave represents atrial depolarisation, the QRS complex represents ventricular depolarisation, and the T wave represents ventricular repolarisation. Based on the characteristics of these waves, a subject's anomalies can also be identified. A typical ECG signal has amplitude and frequency ranges of 10 μV–5 mV and 0.05–100 Hz, respectively [1]. By recording precise information from each ECG component, the heart's physical state may be evaluated [[2], [3], [4]]. Unfortunately, various noises, including AC interference, faulty electrode connections, machine malfunctions, and the patient's movement and breathing, can superimpose ECG measurements [5]. These disturbances are collectively referred to as artefacts. In practice, recovering a clean ECG signal from noisy measurements is essential, and artefacts must be removed to make an accurate diagnosis. As a result, ECG signal denoising is one of the greatest challenges in biological signal processing.

The most prevalent types of noise affecting ECG are power line interference (PLI) and additive WGN (AWGN). These interfere with the ECG signal's quality and eliminate essential characteristics valuable for diagnosing heart problems. Therefore, separating the true ECG signal from artefacts is vital for visual interpretation. Despite adequate shielding, grounding, and amplification design, PLI often disrupts biomedical signals. This is because it is a high-frequency (50 or 60 Hz) noise with a randomised phase but a consistent frequency, typically caused by electrical interference from the power grid [6]. The ECG signal is often described as having an additive sinusoidal component (50 or 60 Hz) with a variable phase and a constant frequency [1]. The PLI resides within the ECG signal frequency band (0.05–100 Hz) and can alter the structure of the ECG signals. In contrast, AWGN is a basic noise model used in information theory to mimic the effect of several random processes that occur in nature.

There is a vast number of approaches described in the literature for removing ECG artefacts. Various types of digital filters, such as FIR and IIR filters, have been utilised to remove PLI from an ECG [7,8]. Each of these is based on filtering approaches that assume the ECG signals are linear and steady. Due to the non-stationary nature of ECG signals, removing interference from 50- or 60-Hz power lines using filters with fixed coefficients is challenging. The remainder of the spectrum is only minimally affected when rejecting frequencies between 50 and 60 Hz by using notch filters of a specific narrow frequency range. These techniques are inexpensive and simple to use. As a result of signal and disturbance superimposing, however, they generate undesired signal distortion. All interferences are removed; however, the essential and important frequency elements of the ECG signal are also eliminated [9].

Non-stationary signals are processed with algorithms based on the wavelet transform (WT) [10]. The WT is not adaptive; an ECG-dependent wavelet basis function is required. Various adaptive filters [[11], [12], [13]] and adaptive filters with notch filters [9] have been used to eliminate PLI from the ECG signal. The main drawbacks of adaptive filter-based techniques are the requirement of a reference signal and convergence to an optimal solution.

Diverse soft computing solutions, including genetic algorithms (GA) [14] and neural networks [15]-based approaches, have been presented for the elimination of PLI from the ECG signal. The computational complexity of real-time ECG analysis makes soft computing techniques unsuitable. Huang et al. [16] presented empirical mode decomposition (EMD) as a technique for processing both non-stationary and stationary signals. EMD-based signal analysis is adaptive as it extracts fundamental functions directly from the signal. Through sifting, EMD decomposes a signal into a set of amplitude modulation-frequency modulation (AM-FM) components known as intrinsic mode functions (IMFs). In EMD, the frequency content of an IMF decreases as its order increases. Various EMD-based PLI removal techniques have been studied, where the contaminated signal is divided into different IMFs and noisy IMFs are removed during ECG rebuilding. In Ref. [17], the initial IMF for EMD is employed to remove PLI noise. The filtered signal demonstrates R-attenuation as an R-wave is also found in the primary IMF alongside PLI noise. Various adaptive filters [[18], [19], [20]] and EMD combined with wavelet analysis [21,22] have been employed to clear up noisy IMFs and preserve ECG components.

The most significant disadvantage of EMD-based noise elimination is the mode-mixing problem. This occurs when a signal with similar scales appears in more than one IMF component or when a signal with very different scales appears in a single IMF component. As a way to solve the mode-mixing problem in EMD, a new method of analysing interference data, called ensemble EMD (EEMD), is suggested. The removal of noise from ECG signals using EEMD is discussed in Ref. [23]. Utilising the modified recurrent least squares algorithm (MRLS) [24], adaptive notch filters, and discrete-time oscillators helps reduce PLI noise in biomedical signals. Employing the least-mean-squares algorithm (LMS), the EMD-based filtering method [19] reduces the frequency of PLI. The two-weight adaptive filter uses the first IMF as a reference signal in this method. PLI noise is suppressed using the time-variable notch filter technique [25], in which a single notch filter with a time-varying quality factor and a zero initiation condition has been examined. The Hilbert Huang transformation (HHT) approach, based on adaptive EMD, is used to reduce PLI noise. HHT is employed to determine the instantaneous PLI fundamental frequency, which is then utilised to provide the internal PLI signal for the adaptive filter. Furthermore, EMD-EWT-based methods [26] to eliminate PLI noise, as well as fractal and EMD-based techniques [27] and the eigenvalue decomposition technique (EVD) [28], have been examined.

In recent years, many academics have presented methods in this field to remove AWGN from ECG signals. Kumar et al. [29] evaluated the effectiveness of the EMD approach combined with the non-local mean (NLM) method by estimating the ECG using the differential standard deviation. For performance evaluation, they employed recordings from the MIT-BIH arrhythmia database and added white and coloured Gaussian noise to the tested signals.

Based on the orthogonal matching pursuit technique and the Chebyshev window, power-efficient linear-phase non-equiripple notch filters are proposed. The FIR notch filter is computed using an orthogonal matching pursuit algorithm, and its efficiency is further increased by tuning it with a Chebyshev window. In Ref. [30], conventional filtering (CF) was proposed for signal denoising, and in Ref. [31], non-local means (NLM) have been explored. It takes into account the total signal value when calculating the denoised value of a point. Hence, NLM can fully utilise the signal's long-range correlation to complete the vibration signal-denoising operation. Unlike WT and EMD, NLM can be applied directly to uncompressed signals without the need for decomposition, which is quite convenient. However, the aforementioned methods require specialised knowledge, and the selection of hyperparameters could dramatically impact denoising performance.

A noisy ECG is dissected into 11 IMFs in Ref. [32], as noise mostly consists of components at high frequencies. Soft thresholding is employed to preserve the extremes of the time intervals between consecutive zero crossings. Consequently, noise is reduced from the first IMFs, and the signal content is primarily retained at higher IMF levels, where the residual signal is the clean ECG. EMD decomposes the signals into several functions known as IMFs and then partially reconstructs the signals after removing noisy IMFs [33]. The drawback of this method is its significant computing cost and the time-consuming iterative implementation of IMFs.

Rakshit et al. [34] suggested an additional efficient hybrid approach for ECG denoising that combines EMD and the adaptive switching mean filter (ASMF). By employing low distortion, the benefits of both the EMD and ASMF approaches were harnessed to reduce disturbances in ECG signals. Unlike conventional EMD-based techniques, which often reject the initial IMFs or use a window-based approach to reduce high-frequency noises, a wavelet-based soft thresholding scheme was adopted. This not only reduced high-frequency noises but also preserved the QRS complexes.

Signal denoising using clustering and soft thresholding (SDCST) [35] merges wavelet thresholding and hidden Markov model (HMM) techniques. It employs an HMM to separate wavelet coefficients into two groups: the actual signal and the background noise. Then, thresholds are estimated separately for each of these groups. Han et al. [36] developed an enhanced wavelet denoising methodology dubbed 'sigmoid function-based thresholding', which represents a compromise between hard and soft thresholding. This revised wavelet thresholding method maintains the amplitudes of the primary distinctive peaks quite well.

Furthermore, a variety of optimisation techniques, such as the total variation regularised least squares problem or the associated fused lasso problem (1DTVD) [37], the genetic algorithm minimisation of a new noise variation estimate (GAMNVE) [38], and others, assist in denoising the ECG. Principal component analysis and independent component analysis are two common statistical methods described in the literature.

Recently, WT has been effectively used to denoise non-stationary signals, such as ECG and EEG [39,40]. WT typically comprises five parameters, each of a different type. The efficacy of ECG signal denoising hinges on selecting the optimal WT parameter combination. This selection is formulated as an optimisation problem with the signal-to-noise ratio (SNR) serving as the fitness function [39]. Various methods have been employed. For instance, El-Dahshan [39] combined GA and WT to create a hybrid system for denoising ECG data distorted by non-stationary disturbances. Unfortunately, the comparisons were based on a single, insufficient SNRinput value. Moreover, the performance of this technique should be assessed for high SNR values. Using wavelets and GAs, Saleh et al. [41] offered a novel approach to denoise biological signals, such as ECG signals. Yan et al. [42] utilised GA and sample entropy to denoise various types of noisy signals using the WT approach. However, these methods have the drawback of optimising only one or two WT parameters, which usually proves insufficient for achieving high ECG denoising performance.

Filter-based WT methods are versatile tools in signal processing and data analysis. They offer the ability to perform multiresolution analysis, extract crucial features, and reveal hidden patterns within complex datasets [43]. However, these advantages come with challenges that warrant careful consideration. One significant challenge is computational complexity, particularly as datasets grow in dimensionality or size. This could potentially lead to extended processing times and increased resource demands, impacting real-time or resource-constrained applications. Additionally, choosing an appropriate wavelet function is crucial, as it can substantially influence the results, affecting the accuracy and relevance of the extracted features. Researchers and practitioners must diligently evaluate the most suitable wavelet for their datasets and analytical objectives [39]. Ultimately, the decision to employ filter-based WT methods should be informed by a comprehensive understanding of their advantages and limitations, requiring a meticulous assessment of data characteristics and application requirements. When used judiciously, these methods can unveil valuable insights and significantly enhance data analysis and signal processing.

In this paper, we propose utilising particle swarm optimisation (PSO), which has gained widespread usage and achieved notable success in various engineering fields [[44], [45], [46]], to optimise discrete wavelet transform (DWT) parameters for efficient ECG signal denoising in both PLI and AWGN scenarios. Additionally, we have optimised all five DWT filter parameters: namely, the wavelet filter, the decomposed level, the scaling factor, the threshold method, and the rescaling technique. The DWT is subjected to a series of iterations to achieve the best possible ECG signal filtration performance. The results obtained are assessed using an objective evaluation based on the SNR and the percentage root-mean-square difference (PRD) metrics. As a result, and after conducting a series of experiments on the well-known MIT-BIH database, we found that the results achieved using our proposed method outperformed most of the state-of-the-art techniques in the literature.

The remainder of the paper is structured as follows: Section 2 explains the WT and denoising procedure and discusses the PSO algorithm. Section 3 discusses the proposed method for denoising ECG signals, and Section 4 presents and discusses the results obtained. Finally, the conclusions and possible future perspectives of the present work are drawn in Section 5.

2. Materials and methods

2.1. ECG noise reduction by WT

WT is a frequently used and effective technique for representing signals in both time and frequency domains. It has been effectively applied in various applications, including function selection and signal compression [[47], [48], [49]]. Typically, WT can be divided into two categories: DWT and continuous WT (CWT) [50]. Recently, WT has found widespread application in the processing of non-stationary signals, such as EEG and ECG, as various ECG artefact effects have been shown to be detrimental to the actual ECG signal. These artefacts are caused by muscular action and PLI [34]. This study develops a denoising wavelet approach based on WGN and PLI removal. Donoho's approach is utilised in Ref. [51] as one of the methods for DWT. Fig. 1 depicts the wavelet denoising process with three decomposition levels (L=3). Multiple coefficients are used to adjust both the high and low frequencies of the input signal to degrade the already noisy input signal, as shown in Fig. 2.

Fig. 1.

Fig. 1

ECG denoising process.

Fig. 2.

Fig. 2

Details and approximations coefficients.

DWT is also defined as follows [52]:

C(a,b)=nZx(n)gj,k(n) (1)

In Equation (1), C(a,b) represents the dynamic wavelet coefficients, a=2j, b=k2j, jZ , kZ, Z is the set of integers, a is the size of the time scale, b is the translation, x(n) is the input ECG signal, and gj,k(n) = 2j/2g(2jnk) is the DWT.

In general, there are three steps to the wavelet denoising process, which are outlined below:

  • ECG signal decomposition: This involves splitting the original ECG signal into three levels and decomposing each level into two components – the approximation coefficients (cA) and the detail coefficients (cD), given by Equations (2), (3), respectively. The cD is treated with a high-pass filter, while the cA continues to be deconstructed for the next level in the manner described below:

cAi(t)=k=cAi1(K)фi(tK) (2)
cDi(t)=k=cDi1(K)i(tK) (3)

Where cAi(t), cDi(t) represent the approximation coefficients and the detail coefficients for level i,respectively. is the scaling, and ф is the shifting.

  • Thresholding: The Minimax thresholding technique in DWT is used to find the threshold values that minimise the maximum mean square error (MSE) between the original and denoised signal. These threshold values are calculated to minimise the worst-case error across all wavelet coefficients. Here is how to compute the thresholds using the Minimax criteria in DWT:

Estimate Noise Level: An estimate of the noise level present in the signal is required. This estimate can be obtained through various methods, such as calculating the standard deviation of the wavelet coefficients in the noisy signal or using statistical estimators, such as the median absolute deviation (MAD) of the coefficients. The accuracy of noise estimation is crucial for the effectiveness of Minimax thresholding.

Calculate the thresholds: For each wavelet coefficient at a specific scale and level, calculate the threshold value based on the Minimax criterion, as shown in Equation (4). The threshold (δ) for each coefficient is determined as follows [51]:

δ={σ(0.3936+0.1829log2(N)),N>320,N32 (4)

Where σ=median(|Dij|)0.6745, Dij are unit-scale detail coefficients, and N is the length of the signal vector.

  • Reconstruction: The inverse discrete wavelet transform (iDWT) is used to rebuild the ECG denoised signal (Equation (5)) and is explained in Ref. [40].

ECGdenoised=k=cAL(K)фi(tk)+i=1Lk=cDi+1(K)i(tk) (5)

Where 'ECG denoised' is the reconstructed ECG signal and i is the decomposition level. Wavelet denoising comprises five parameters with discrete ranges (Table 1). The effectiveness of noise reduction is determined by the wavelet parameters selected. The three phases of the wavelet denoising procedure are illustrated in Fig. 1. During the first stage, DWT is employed to deconstruct the ECG signal.

Table 1.

Parameter ranges for wavelet denoising.

Wavelet denoising parameters Range
Type of wavelet basis function Φ Coiflet (coif1-coif5), Symlet (sym1-sym45), Daubechies (db1-db45), Fejer-Korovkin (fk4- fk8- fk14- fk18&fk22), and Biorthogonal (bior1.1-bior1.5 & bior2.2-bior2.8 & bior3.1-bior3.9),
Threshold function β Soft (s), Hard (h)
Level of decomposition L 1–10
Threshold selection of a rule λ Sqtwolog, Minimax, Heursure, and Rigsure
Rescaling approach ρ No scaling (one), one level (sln),
Several levels (mln).

The optimal mother wavelet function (Φ) is selected for use in this phase's ECG signal decomposition process. The decomposition level (L) is typically determined by both the ECG data and prior experience. This paper focuses on optimising WT parameters. In the second phase, thresholding is applied. The wavelet features two typical thresholds (β), namely, hard (h) and soft (s) thresholds [50,[52], [53], [54], [55]]. Fig. 3 illustrates the difference between soft and hard thresholding.

Fig. 3.

Fig. 3

Hard and soft thresholding techniques.

Each type of threshold – soft (s) and hard (h) – selection rules (λ) and rescaling methods (ρ) must be selected. These thresholding methods need to be established, as their choice affects the overall performance of noise removal. Typically, the threshold value is determined by the intensity of the noise (δ). Table 2, Table 3 display the various thresholding selection rules and rescaling parameter values.

Table 2.

Threshold selection rules.

Threshold selection rule Description
Rule 1: Rigrsure The selection of the threshold is based on Stein's Unbiased Risk Estimate (SURE).
Rule 2: Sqtwolog The threshold is chosen equal to (2logM where M is number of coefficients in series
Rule 3: Heursure The threshold is chosen using a combination of the first two rules
Rule 4: Minimaxi The threshold is chosen to be equal to the Max(MSE)

Table 3.

Rescaling methods for wavelet thresholding.

wavelet thresholding rescaling methods ρ rescaling
sln Single level
mln Multiple levels
one No scaling

Lastly, Equation (6) is applied to the thresholding rules.

ECGnoisy(n)=s(n)+δe(n) (6)

Here, s(n) represents the clean ECG signal, e(n) represents the noise, δ represents the amplitude of the noise, and n is the sample number. For each wavelet coefficient level (cA and cD), the parameters (β, λ, ρ) must be used independently in order to utilise the wavelet. The iDWT is employed as the final step to reconstruct the ECG signal.

2.2. Particle swarm optimisation

Initially, the use of PSO in optimisation was thoroughly discussed in Ref. [56]. The PSO method begins with several possible solutions, collectively referred to as a swarm. Each solution is represented as a particle, and each particle oscillates repeatedly over the search space. With each successive iteration, each particle considers both its locally optimal solution in terms of the fitness function (local best) and the optimal solution among its neighbours (global best). If a particle's performance is gauged by an objective function, then the particle will always be attracted to the optimal solution, both locally and globally. The social behaviour of birds in flocks provides an apt analogy for this process [57]. The PSO code is represented by Algorithm 1. According to this theory, each particle is essentially defined by the following characteristics: (a) xi is the current location of particle i, (b) vi is the current velocity of particle i, (c) yi is the best local value for particle i, and (d) yˆi is the best global value for particle i. Throughout the enhancement loop (see Algorithm 1, lines 6–16), these four attributes of each particle are updated at every time t.

yi(t+1)={yi(t)iff(xi(t+1))f(yi(t))xi(t+1)iff(xi(t+1))<f(yi(t)) (7)
yˆ={yi(t)|i=argi=1,Nminf(yi(t))} (8)

Let N represent the number of elements in the swarm. For each dimension's velocity to be updated j[1,Nd], according to Equation 9, vi,j is related to the velocity vector from j of particle i. This also incorporates the following elements: ωvi,j(t) where vi,j is the earlier velocity, and ω regulates the influence of the preceding velocity. The greater the worth of ω, the more anxiety there is with exploration. In comparison, for smaller values of ω, the focus shifts towards exploitation.

yi,j(t)xi,j(t): indicates that particle i is directed towards a local best direction.

yˆj(t)xi,j(t): indicates that a particle i is directed to a global best direction.

vi(t+1)=ωvi,j(t)+c1r1,j(t)(yi,j(t)xi,j(t))+c2r2,j(t)(yˆj(t)xi,j(t)) (9)

Where ω is called the 'intra-weight', which controls the historical velocity, c1 and c2 are two acceleration constants, and r1 and r2 generate a uniformly distributed random number between 0 and 1. Equation 8 updates the current position of particle i.

xi(t+1)=xi(t)+vi(t+1) (10)

Image 1

3. Proposed PSO and WT for ECG signal denoising

This section provides a comprehensive analysis of the suggested approach, combining PSO with WT (PSO-WT) to denoise ECG signals. Consider that ECG signals are distorted by noise, which is a potential cause of the issue. The best wavelet denoising parameters for the ECG signal have been determined using PSO. As shown in Fig. 4, the proposed PSO-WT denoising technique can be described as follows:

Fig. 4.

Fig. 4

Proposed method.

Input: A noisy ECG signal and parameters for wavelet denoising (Φ, L, β, λ, ρ).

Processing:

  • a.

    Set appropriate ranges for wavelet thresholding denoising parameters of the ECG signal and construct objective functions with SNR.

  • b.

    Use PSO to optimise wavelet denoising parameters, selecting the optimal parameters based on noise suppression performance.

  • c.

    Perform a WT on the noisy ECG signal to obtain all wavelet coefficients.

  • d.

    Apply optimal thresholds to the noisy coefficients within the ECG signal to acquire modified ECG components.

Output: Reconstruct the denoised ECG signal.

The proposed method can then be summarised in Algorithm 2.

Image 2

The phases below show a detailed explanation of the proposed method:

Phase I

Initialisation. This phase includes three steps. The first step is to read the input ECG signal S(n) from the source. The WT denoising method was developed because the original ECG signal was corrupted by WGN using equation (11) and PLI using equation (12). These noises mimic disturbances that may contaminate the original ECG signal during recording. These forms of interference serve as a data set for evaluating the efficacy of the suggested approach.

N(t)=s(t)+σ (11)
N(t)=Asin(2πft) (12)

The second step of this phase is to initialise the WT denoising parameters (Φ, L, β, λ, ρ) from the ranges given in Table 1. The PSO parameters are set as follows: C1=2, C2=2, NP=5, itermax=50, pop_size=100. C1 and C2 are the acceleration constants, Np is the number of WT parameters, itermax is the maximum number of iterations, and pop_size is the population size. Finally, calculate the SNR using equations (13), (14), (15), PRD using equation (25), MSE by equation (23), and root MSE (RMSE) according to equation (24). Electrocardiogram signal data will be recorded both before and after the denoising operation.

Phase II

PSO-based parameter tuning of WT. The proposed method uses PSO to find the optimal WT parameters for denoising the ECG signal. Initially, the configuration of the WT parameters is represented as a vector x=(x1,x2,,xn), where n is the number of WT parameters equal to 5. Here, x1 shows the parameter value of the mother WT function Φ; x2 represents the value of the level of decomposition parameter L; x3 is the method for setting a threshold β; x4 indicates the thresholding selection rule of the parameter value λ; and x5 is the rescaling method being used ρ, where the range for these parameter values is chosen from Table 1. Fig. 6 provides an example of a WT parameter solution for ECG signal denoising. The objective function SNR is employed by the PSO algorithm to evaluate the result, which is defined as follows:

SNRimp=SNRoutputSNRinput (13)

Where SNRinput and SNRoutput are as follows:

SNRinput=10log10n=1N[S(n)]2n=1N[S(n)S˜(n))]2 (14)
SNRoutput=10log10n=1N[S(n)]2n=1N[S(n)Sˆ(n))]2 (15)

Here S(n) represents the original ECG signal; S˜(n) is the noisy ECG signal; and Sˆ(n) is the denoised ECG signal generated by tweaking wavelet parameters using the PSO algorithm. Iteratively, refines the randomly generated solution. The output from this phase is an optimised solution xopt=(x1,x2,..,xn) that will be sent on to the next phase.

Phase III

ECG noise removal with WT. Dependent on xopt, the denoising process of WT consists of three primary phases, as shown in Fig. 1 and explained in further detail below:

  • Decomposition of ECG signals using DWT: During this phase, the DWT decomposes the noise in the input ECG signal ,S(n). The first and second xopt parameters (mother wavelet Φ and the level of decomposition L) must be employed in the procedure for decomposition. Fig. 5 illustrates the DWT technique for three levels, where each level separates the noisy ECG data into cA and cD. In the next step, the latter is treated with a high-pass filter, whereas the former is broken down and treated with a low-pass filter. Using low-pass and high-pass filters, the ECG signal is convolved. The down-sampling operator, represented by block (↓2), is used to keep the even indicator components of the ECG signal according to their frequency and frequency intensity, cA and cD are extracted from the ECG signal.

  • Thresholding: It is the second phase of ECG denoising, which depends on the coefficient of the noise level. In this phase, thresholding type (β), thresholding selection criteria (λ), and rescaling techniques (ρ) must be chosen from xopt. By applying a thresholding technique (Equation (16)) to the noisy and non-stationary signal Xˆ, we can evaluate the denoising of the ECG signal, according to Ref. [21], as follows:

Z=THR(Xˆ,δ) (16)

Where THR represents the function of thresholding, and δ represents the value of the threshold. The performance of ECG noise removal in the wavelet domain depends on the estimate of δ. Hence, several approaches for estimating have been offered. Donoho and Johnstone [51] determined the threshold in Equation (17):

δ=σ2logM (17)

Where σ is the standard deviation of the DWT coefficients, and M is their length vector.

We estimate the threshold value as follows, given that it only depends on cD and cA has the lowest frequency and most energy of all the ECG signals, according to the level of the coefficients, as indicated in Equation (18):

xˆd(l)=THR(xˆd(l),δl),l=1,2, (18)

Where xˆd denotes the vector of DWT threshold detailed coefficients, l refers to the WT decomposition level, and δl is a threshold value set for such a level. As seen earlier, Fig. 3 demonstrates that the wavelet typically provides two different types of thresholding-specific functions (β), namely, soft and hard thresholding.

Below are descriptions of the distinctions between hard and soft thresholding, As indicated in Equations (19), (20), respectively:

xˆdi(l)={xˆdi(l)δlxˆdi(l)δl0xˆdi(l)<δl (19)
xˆdi(l)={xˆdi(l)xˆdi(l)δl0xˆdi(l)<δl (20)

Where i is the DWT detailed coefficient index at a level l. Equation (21) summarizes the thresholding DWT coefficients.

Xˆ=[xˆd(1)xˆd(2)xˆa(2)] (21)
  • iDWT reconstruction of the denoised ECG signal: Using iDWT on Xˆ, we calculate the original ECG signal using Equation (22) as follows:

z[n]=k=cAL(K)Φi(nk)+i=1Lk=cDi+1(K)i(nk) (22)

The ECG is convolved via up-sampling (↑2), which entails inserting zeros at the even index components of the ECG signals. As an example, Fig. 5 depicts the iDWT technique for three levels.

Phase IV

ECG denoising evaluation in the last phase. The ECG results produced using WT are evaluated. The evaluation will be conducted using the following criteria: SNR, SNR improvement, MSE as per equation (23), RMSE as per equation (24), and PRD as per equation (25).

MSE=1Nn=1N(S(n)Sˆ(n))2 (23)
RMSE=n=1N1N[S(n)Sˆ(n))]2 (24)
PRD=100*n=1N[S(n)Sˆ(n))]2n=1N[S(n)]2 (25)

where S(n) represents the original ECG signal, S˜(n) is the noisy ECG signal, and Sˆ(n) is the denoised ECG signal generated through the tweaking of the WT parameters by using the specified PSO method, and N is the sample number.

Fig. 6.

Fig. 6

PSO-optimal WT parameter selection for ECG signal noise removal.

Fig. 5.

Fig. 5

ECG denoising procedure.

4. Results and discussions

To evaluate the efficiency of filtration in the proposed method, we downloaded several records from the well-known and publicly available MIT-BIH database [58]. Each ECG record has the following characteristics: a 650,000-sample length, a 360 Hz sampling rate, an 11-bit resolution across a 10 mV range, and a 3960 bps bit rate. This database is frequently used as a benchmark for comparing various noise-removal methods in the literature.

In this work, we introduced two types of noise to clean ECG signals: WGN and PLI. These parameters were selected experimentally to optimise their settings. PSO was proposed to obtain an optimal set of parameters for effective noise reduction. Table 1 displays the parameters to be optimised.

In this work, the parameters for wavelet noise removal were optimised using MATLAB 2018b software. The parameters utilised for PSO analysis are as follows: C1=2, C2=2, NP=5, itermax=50, and pop_size=100. The stopping point was determined based on convergence tolerance for fitness.

4.1. WGN removal

The optimised parameters for wavelet denoising, derived by the PSO, are presented in Table 4. Usually, it is not guaranteed that noise can be efficiently removed using a single wavelet. We found that some wavelets achieved better noise removal than others. The orthogonal WTs, such as Coiflets and Symlets, offer several advantages. They are extremely brief and allow for flawless and straightforward reproduction of the original signal [59]. Based on the results obtained, the Coiflets family is more appropriate for ECGs contaminated by high noise levels, while the Symlets family is more suitable for ECGs contaminated by low noise levels. Due to the relationship between level decomposition and noise level, the appropriate decomposition level for a high noise level is 7–8, while for a low noise level, it is 3–4. Even though the hard threshold is simpler than the soft threshold, the latter can yield better results. Among the three thresholding rescaling techniques, the 'sln' technique performed the best. Additionally, the 'rigrsure' technique was found to be more efficient. In this study, we conducted experiments using 16 ECG records obtained from the MIT-BIH database to determine the optimal wavelet denoising parameters achieved by PSO, with SNR improvement as a fitness function.

Table 4.

The optimal WT denoising parameters were found by the PSO for the signal being tested.

WT denoising parameters SNR input values
SNR in <10 dB 10 dB < SNR in <25 dB SNR in >25 dB
The type of wavelet basis function φ Coif 3 Sym 3 Sym 18
Thresholding function β soft soft soft
Decomposition level L 8,7 6,5 4,3
Thresholding selection rule λ rigsure rigsure rigsure
Rescaling approach ρ sln sln sln

After filtration, the average SNR, PRD, MSE, and RMSE values are obtained for the signal. Table 5 displays the ECG signal results, denoised using the PSO-WT denoising technique. For SNRinput, values varied from −5 dB to 30 dB with a step of 5 dB. Fig. 7 depicts an example of the obtained result, record number 100, from the MIT-BIH database. It represents the original (Fig. 7-a), noisy (Fig. 7-b), and denoised signals (Fig. 7-c) produced using the proposed method. It can be clearly seen that the denoised signal is very close to the original ECG, which proves the effectiveness of the proposed method.

Table 5.

The effectiveness of denoising ECG signals at different levels of input SNR.

Input SNR (dB) Output SNR (dB) Improvement SNR (dB) MSE RMSE PRD %
−5 7.5034 12.5740 0.0759 0.2550 50.5431
0 10.7463 10.8169 0.0342 0.1701 31.6505
5 14.5189 9.5895 0.0143 0.1103 20.1725
10 18.4955 8.5661 0.0059 0.0708 12.8114
15 22.3989 7 .4695 0.0024 0.0448 8.1116
20 26.1904 6 .2610 0.0009 0.0287 5.2273
25 29.8667 4.9373 0.0004 0.0184 3.3552
30 33.5884 3.5416 0.0002 0.0121 2.2019

Fig. 7.

Fig. 7

(a) The clean ECG signal (one sample as an illustration), (b) the corrupted ECG signal with noise at SNRinput = 10 dB, (c) the denoised ECG signal resulting from the proposed technique (φ = sym3, β = soft, λ = rigsure, L = 5, and ρ = sln) with SNRoutput = 18.24 dB.

Furthermore, the proposed approach yields results corresponding to a noisy signal with a SNRinput of 10 dB, a PRD of 13.47 and an output SNR of 18.24. A significant improvement of 8.24 in SNR is achieved. Fig. 8(a) depicts the relationship as a function of the input and output SNR. The relationship between them is almost linear; they are directly proportional. When the SNRinput increases, the SNRoutput also increases. Fig. 8(b) shows a graphical representation of the PRD between the original and the denoised ECG signal, with detailed values in Table 5. Fig. 8(b) shows that the proposed approach is smoothest when there is less noise. Note that a lower PRD implies efficient signal denoising. Fig. 8(c) and (e) show the MSE and RMSE between the original and the denoised ECG signals. We note that the MSE and RMSE values are inversely proportional to the SNRinput values.

Fig. 8.

Fig. 8

(a) The dependence of SNRoutput with the SNRinput, (b) PRD with SNRinput, (c) MSE with the SNRinput, (d) SNR Improvement with the SNRinput, and (e) RMSE with the SNRinput.

The improvement in the SNR obtained by our proposed method is identified as the difference between the SNRoutput (dB) and the SNRinput (dB), allowing us to evaluate the noise elimination performance. The relationship between the SNR improvement and the SNRinput is shown in Fig. 8(d). It is clear that improvements in SNR are greater when the SNRinput levels are low. Consequently, our proposed method performs well when significant noise levels are present.

A thorough comparison of the improvements in SNR and PRD, obtained using our proposed denoising technique, is made against more than 10 other state-of-the-art noise-removal techniques [60] using the same database. All these comparisons are shown in Fig. 9. As the reported results from the literature come from different values of input SNR applied to different records from the MIT-BIH database, we have divided our comparisons according to the SNRinput values and the ECG records used as reported by counterpart techniques. Therefore, a comparison based on four values of SNRinput (−5, 0, 5, and 10) using record 100 is made against the following techniques: EMD with an NLM (EMD-NLM) [29], conventional filtering (CF) [30], and NLM denoising of ECG signals (NLM) [31]. Fig. 9(a) and (b) depict this comparison. A comparison based on three values of SNRinput (−5, 0, and 5) using record 103 is made against the IHP-ST EMD [32] and SF [33] methods, as shown in Fig. 9(c) and (d). Another comparison based on two values of SNRinput (5 and 10) using records 100 and 103 is made against the following techniques: EMD-ASMF [34], SDCST [35], NIWT [36], 1DTVD [37], and GAMNVE [38], as shown in Fig. 9(e)-(f), Fig. 9(g), and Fig. 9(h), respectively. It can be clearly seen from Fig. 9 that our proposed technique outperforms all other state-of-the-art techniques for all SNRinput levels in terms of improvements in SNR and provides the lowest value in PRD. Therefore, the proposed PSO has succeeded in optimising the parameters for wavelet denoising of ECG signals, resulting in higher performance than state-of-the-art techniques. In addition, it can be observed that the acquired SNR improvements for the ECG signal are vulnerable to high amounts of noise.

Fig. 9.

Fig. 9

The improvement SNR and PRD for several denoising techniques.

4.2. PLI removal

The proposed technique was also tested on the second type of additive noise: PLI. This noise was added to the generated ECG signal from the MIT-BIH database with two fundamental frequencies, 50 Hz and 60 Hz. The experiment was conducted on 16 different samples from this database, where the average of the SNRoutput was calculated. For instance, Fig. 10 depicts an example of the application of our proposed method on record number 100 from the MIT-BIH database. The original, noisy, and denoised signals are shown, respectively, in Fig. 10(a), (b), and 10(c). It is evident that the denoised signal closely resembles the original ECG signal. Furthermore, a SNRoutput of 22.69 dB is obtained for a SNRinput of 10 dB at frequency f = 50 Hz. This represents a significant SNR improvement of 12.69, further affirming the effectiveness of the proposed method.

Fig. 10.

Fig. 10

(a) Clean ECG, (b) the corrupted ECG signal with noise at SNRinput = 10 dB, (c) the denoised ECG signal resulting from the proposed technique (φ = db2, β = hard, λ = rigsure, L = 3, and ρ = mln).

In Table 6, Table 7, the SNRoutput obtained from our denoising method (PSO-WT) is compared with other published noise removal methods, namely EVD-based technique [28], MRLS-based technique [24], and EMD-WT-based technique [27] for the removal of PLI noise. It is clear from the tables that our proposed method outperforms the other techniques mentioned. Values highlighted in bold correspond to the best values for each SNR level and each ECG record. However, as seen in Table 6, the MRLS approach performed best at low noise levels for the 50 Hz frequency, but our method outperformed it at higher noise levels. It is also noteworthy that the EMD-EWT-based technique [26] outperformed the proposed method in most cases at this frequency. Another key point is that the proposed approach showed excellent results and outperformed all other state-of-the-art techniques for noise elimination at a frequency of 60 Hz, as shown in Table 7. Overall, the results substantiate the effectiveness of our method in comparison to other state-of-the-art methods in removing this type of noise.

Table 6.

Comparison of PLI removal (f=50Hz) from various ECG signals at varying SNRinput values, compared in terms of SNRoutput as averaged values over 20 segments.

ECG Record SNRinp = −10 dB
SNRinp = -5 dB
SNRinp = 0 dB
SNRout(dB)
Proposed EVD [28] MRLS [24] EMD-WT [27] EMD-EWT [26] Proposed EVD [28] MRLS [24] EMD-WT [27] EMD-EWT [26] Proposed EVD [28] MRLS [24] EMD-WT [27] EMD-EWT [26]
100 m 14.065 3.758 13.666 11.366 18.985 16.322 7.284 17.899 11.869 21.809 16.198 11.683 21.583 11.547 23.057
102 m 13.626 3.770 13.560 13.958 18.934 14.913 7.462 17.651 14.926 21.858 15.582 10.526 21.161 15.716 23.561
103 m 13.455 3.770 13.984 13.804 20.272 14.580 7.300 18.472 15.313 24.602 17.055 11.707 22.815 16.294 27.885
105 m 21.418 3.772 14.054 19.238 20.378 22.887 7.302 18.625 21.846 25.038 23.586 11.711 23.116 24.422 29.222
109 m 23.054 3.773 14.095 20.012 20.424 24.889 7.305 18.590 23.420 25.198 25.771 7.420 23.023 25.503 29.605
116 m 17.638 3.775 14.122 15.267 20.202 18.221 7.307 18.547 17.759 24.655 18.450 11.718 22.719 18.515 28.222
119 m 20.436 3.774 14.071 17.066 20.362 21.718 7.305 18.481 19.252 25.029 22.530 11.716 22.797 21.013 29.128
123 m 20.827 3.769 14.056 13.270 20.249 21.884 7.114 18.635 15.344 24.737 22.279 10.867 23.092 16.156 27.963
201 m 18.289 3.770 13.789 16.956 20.276 19.046 7.299 18.268 19.434 24.864 19.314 11.706 22.497 20.428 28.793
205 m 16.033 3.779 13.691 12.754 20.074 16.246 7.312 18.068 13.260 24.210 17.255 11.723 22.117 14.811 26.787
213 m 16.597 3.772 14.146 18.008 20.431 17.135 7.303 18.601 21.485 25.092 17.372 4.681 22.911 23.389 29.352
219 m 19.923 3.768 14.069 17.622 20.298 20.754 7.626 18.500 19.643 24.910 21.165 11.885 22.800 21.540 28.939
220 m 14.574 3.775 13.955 11.075 19.623 15.419 7.308 18.357 11.919 23.006 17.281 11.721 22.396 11.216 24.495
221 m 16.244 3.770 13.971 16.442 20.280 16.634 7.301 18.463 18.355 24.863 16.779 11.711 22.798 19.619 28.827
223 m 20.933 3.767 14.048 18.023 20.383 22.002 7.296 18.513 19.867 25.076 22.278 11.702 22.862 21.894 29.335
231 m 10.470 3.767 13.946 11.604 20.134 12.986 7.295 18.409 13.221 24.162 16.542 11.405 22.619 13.154 26.302
AVG 17.349 3.770 13.951 15.404 20.082 18.477 7.320 18.380 17.307 24.319 19.340 10.868 22.582 18.451 27.592
ECG Record SNRinp = 5 dB
SNRinp = 10 dB
SNRout(dB)
Proposed EVD [28] MRLS [24] EMD-WT [27] EMD-EWT [26] Proposed EVD [28] MRLS [24] EMD-WT [27] EMD-EWT [26]
100 m 19.740 16.045 23.931 11.458 23.700 22.487 18.872 25.648 14.349 24.944
102 m 18.113 5.480 23.714 16.125 25.164 20.691 2.371 25.756 17.313 27.353
103 m 20.933 15.314 26.680 14.873 29.042 23.953 9.675 29.781 15.335 30.179
105 m 24.134 13.795 27.219 24.887 32.356 25.109 5.800 30.749 25.856 34.112
109 m 26.062 5.251 27.205 26.972 33.232 26.143 4.407 30.962 27.390 35.536
116 m 20.297 11.099 26.458 19.558 30.065 24.551 6.060 29.476 18.903 30.385
119 m 23.513 15.167 26.891 21.544 31.859 26.509 9.161 30.242 20.212 32.610
123 m 23.027 15.131 27.054 13.747 28.451 27.023 15.784 29.406 17.211 28.360
201 m 21.023 16.200 26.299 21.258 31.390 23.727 15.491 29.620 20.444 32.479
205 m 20.134 16.524 25.706 12.038 26.655 23.898 13.542 28.065 14.717 26.835
213 m 19.503 4.390 26.962 24.891 32.706 22.875 3.860 30.679 25.093 34.745
219 m 21.496 11.099 26.812 22.216 31.759 23.855 8.261 30.433 21.338 32.787
220 m 20.914 15.813 24.963 11.081 23.440 24.245 10.436 25.868 15.084 25.222
221 m 20.863 15.311 26.670 20.072 31.415 23.452 12.536 29.911 18.821 32.473
223 m 22.552 11.401 26.839 22.453 32.448 26.206 3.946 30.370 22.054 33.760
231 m 20.044 11.336 26.044 12.883 25.333 23.128 6.254 27.780 16.877 26.780
AVG 21.397 12.460 26.215 18.503 29.314 24.245 9.153 29.047 19.437 30.535

Table 7.

Comparison of PLI removal (f=60Hz) from various ECG signals at varying SNRinput values, compared in terms of SNRoutput as averaged values over 20 segments.

ECG Record SNRinp = −10 dB
SNRinp = -5 dB
SNRinp = 0 dB
SNRout(dB)
Proposed EVD [28] MRLS [24] EMD-WT [27] EMD-EWT [26] Proposed EVD [28] MRLS [24] EMD-WT [27] EMD-EWT [26] Proposed EVD [28] MRLS [24] EMD-WT [27] EMD-EWT [26]
100 m 23.057 3.754 11.310 13.932 18.682 25.353 7.251 15.866 14.924 22.260 26.566 11.582 20.184 16.220 24.476
102 m 19.281 3.750 11.269 15.456 18.283 20.313 7.420 15.752 16.373 21.535 20.750 10.436 19.892 17.553 23.381
103 m 24.567 3.761 11.321 16.383 19.097 27.494 7.304 15.992 19.819 23.426 29.036 11.727 20.633 20.540 26.839
105 m 21.863 3.761 11.432 21.702 19.310 25.831 7.276 16.179 24.234 23.860 28.623 11.650 20.962 25.481 27.729
109 m 24.414 3.766 11.429 22.358 19.424 27.965 7.292 16.209 25.485 24.141 30.488 8.450 21.043 27.256 28.446
116 m 24.364 3.766 11.482 18.295 19.411 28.157 7.294 16.302 20.732 24.161 30.665 11.697 21.234 21.918 28.522
119 m 24.708 3.771 11.467 20.128 19.487 29.180 7.302 16.296 22.138 24.349 32.837 11.712 21.235 24.462 28.995
123 m 24.862 3.771 11.372 16.818 19.444 29.597 7.117 16.110 18.570 24.208 33.769 10.870 20.961 20.582 28.583
201 m 24.212 3.764 11.369 19.663 19.126 27.181 7.285 16.012 21.069 23.329 28.858 11.663 20.607 23.495 26.555
205 m 24.227 3.771 11.399 16.870 19.402 28.279 7.301 16.112 18.047 24.128 31.128 11.710 20.928 19.106 28.246
213 m 24.828 3.770 11.445 21.348 19.520 29.043 7.300 16.264 23.809 24.467 32.183 4.678 21.226 27.507 29.369
219 m 24.686 3.770 11.436 20.393 19.486 28.879 7.632 16.254 22.095 24.320 31.967 11.891 21.193 24.485 28.915
220 m 24.010 3.768 11.373 14.297 19.180 27.494 7.298 16.058 15.656 23.584 29.578 11.705 20.703 17.526 27.225
221 m 23.760 3.765 11.347 19.177 19.087 26.387 7.280 15.991 20.644 23.200 27.675 11.644 20.518 22.693 26.279
223 m 25.127 3.769 11.444 20.709 19.498 29.575 7.299 16.251 22.598 24.387 33.072 11.706 21.164 24.998 29.166
231 m 23.815 3.772 11.419 14.741 19.286 26.223 7.304 16.174 17.290 23.920 27.414 11.421 21.023 19.209 27.880
AVG 23.861 3.765 11.395 18.267 19.233 27.309 7.310 16.114 20.218 23.705 29.663 10.909 20.844 22.064 27.538
ECG Record SNRinp = 5 dB
SNRinp = 10 dB
SNRout(dB)
Proposed EVD [28] MRLS [24] EMD-WT [27] EMD-EWT [26] Proposed EVD [28] MRLS [24] EMD-WT [27] EMD-EWT [26]
100 m 27.113 15.785 23.297 17.781 25.407 27.477 18.767 24.895 18.549 26.002
102 m 21.015 4.960 22.824 18.438 24.788 22.218 2.528 24.680 18.908 26.245
103 m 29.689 14.968 24.965 22.316 29.046 29.849 9.452 28.401 23.339 29.703
105 m 30.180 13.664 25.516 27.017 30.379 30.725 5.899 29.272 27.346 31.730
109 m 31.761 5.243 25.719 29.033 31.809 32.257 4.475 29.803 29.251 33.823
116 m 31.898 10.628 26.047 22.841 31.996 32.367 5.557 30.299 24.636 34.193
119 m 35.157 15.162 26.125 25.838 33.074 36.255 9.129 30.713 27.729 35.835
123 m 36.793 15.137 25.793 23.208 31.980 38.502 15.787 30.071 24.822 33.399
201 m 29.574 15.777 24.683 23.735 28.416 29.807 14.927 27.598 24.651 29.222
205 m 32.686 16.504 25.545 21.191 31.241 33.818 12.673 28.644 22.152 31.522
213 m 33.980 4.389 26.164 28.346 34.088 35.291 3.866 30.976 29.473 38.299
219 m 33.658 11.107 26.164 24.846 33.025 34.738 8.263 30.863 26.377 35.884
220 m 30.517 15.790 24.619 19.065 28.221 31.084 10.433 26.333 20.435 28.445
221 m 28.205 15.661 24.464 23.168 27.997 28.494 13.373 27.183 24.479 28.715
223 m 35.146 11.410 26.106 25.471 33.622 36.068 4.071 30.863 27.058 37.238
231 m 27.866 11.733 25.770 21.382 29.300 28.072 6.256 29.180 22.867 30.194
AVG 30.952 12.370 25.238 23.355 30.274 31.689 9.091 28.736 24.505 31.903

The results presented in Table 6, Table 7 are summarised in Fig. 11 using box-plot diagrams. The findings in Fig. 11(a) show that, in the case of a 50 Hz frequency, the EMD-EWT method offers the best SNRoutput with a maximum of 35 dB and an average of 26 dB. In this instance, the proposed method delivers an acceptable level of SNRoutput, where the average is around 21 dB. In the case of f = 60Hz Fig. 11(b), the proposed method exhibits the best performance with an average of 28 dB, compared to an SNRoutput of 27 dB for the EMD-EWT method. In the latter case, most of the tests conducted with the proposed method yielded an SNRoutput greater than 25 dB.

Fig. 11.

Fig. 11

PLI removal comparison, (a) SNRoutput (f = 50 Hz), (b) SNRoutput (f = 60 Hz).

To showcase the efficacy of the proposed approach, we conducted a comparative analysis against results obtained through similar methodologies presented in prior works. In Ref. [61], the authors introduce an innovative ECG signal denoising method that combines genetic algorithm (GA) and wavelet transformation (WT). Table 8 comprehensively compares key metrics between our approach and the outcomes detailed in Ref. [61]. The results unequivocally demonstrate the superiority of the PSO-WT method over the GA-WT method in the removal of Power Line Interference (PLI) at a frequency of 50Hz from various ECG signals, considering different input SNR values. Specifically, the PSO-WT method consistently yields higher SNR values and lower values for MSE, RMSE, and PRD, signifying its ability to preserve the quality and integrity of the original ECG signals while effectively mitigating interference.

Table 8.

Comparative analysis of PSO-WT and GA-WT methods for PLI removal in ECG signals.

ECG record SNR Input SNR Output
MSE
RMSE
PRD (%)
PSO-WT GA-WT PSO-WT GA-WT PSO-WT GA-WT PSO-WT GA-WT
100 m 5 19.74 15.78 0.0014 0.0035 0.0373 0.0589 10.33 16.46
10 22.48 18.32 0.0009 0.0019 0.0292 0.0439 8.08 12.20
102 m 5 18.11 15.06 0.0018 0.0023 0.0428 0.0487 15.89 17.91
10 20.69 17.52 0.0015 0.0017 0.0382 0.0395 14.17 14.89
103 m 5 20.93 14.39 0.0017 0.0045 0.0412 0.0673 10.58 19.41
10 23.95 16.96 0.0007 0.0024 0.0259 0.0495 6.65 14.18
105 m 5 24.13 20.84 0.0009 0.0014 0.0308 0.0377 8.04 14.18
10 25.11 21.00 0.0011 0.0012 0.0328 0.0348 8.58 8.94
109 m 5 31.76 24.7 0.0008 0.0010 0.0287 0.0348 5.18 5.82
10 32.25 25.3 0.0006 0.0009 0.0254 0.0300 4.59 5.43

5. Conclusion

This paper presents a combined technique between particle swarm optimisation (PSO) and wavelet transform (WT) for ECG noise removal. In the proposed method, two main noises are added to the clean ECG signal to simulate what the ECG signal is exposed to during recording time. The first noise is a white Gaussian noise, and the second is a power line interference noise, which is added at two different fundamental frequencies, 50 Hz and 60 Hz. The proposed method is used as a pre-processing approach to remove ECG noise for further analysis and classification.

The success of any WT-based ECG signal denoising process is closely related to the wavelet noise reduction parameters. Therefore, this work presents the PSO algorithm as a method for optimising complete wavelet noise reduction parameters to effectively filter the ECG signal. Based on the PSO algorithm, we have reached the best solution, which corresponds to the best fitness function of five optimised parameters: type of wavelet basis function Φ, thresholding function β, decomposition level L, threshold selection rule λ and rescaling method ρ.

The experiments performed in this work show that noise suppression depends mainly on the appropriate wavelet family, decay level, and threshold techniques. PSO is a powerful tool for parameter selection and optimisation. Thus, the approach based on PSO and WT effectively reduces noise, outperforming other state-of-the-art techniques, according to the SNR, and making the clinical diagnosis more appropriate.

Future endeavours will centre around implementing our proposed approach on embedded systems with high computational resources, such as FPGA, to enhance its applicability in IoT-based applications. Furthermore, we will explore the potential of Particle Swarm Optimisation Variants, Hybrid Approaches, and Reinforcement Learning for Optimisation in maximising our proposed approach's performance on embedded systems. Additionally, we will rigorously assess the performance of this approach in real e-health applications, focusing on its effectiveness in filtering ECG signals in the presence of high-frequency noise—a challenge intricately linked to both hardware and environmental influences.

Data availability statement

Data associated with this study is available at https://physionet.org/about/database/.

CRediT authorship contribution statement

Abdallah Azzouz: Data curation, Formal analysis, Investigation, Methodology, Software, Writing – original draft, Writing – review & editing. Billel Bengherbia: Methodology, Supervision, Writing – original draft, Writing – review & editing. Patrice Wira: Funding acquisition, Investigation, Supervision, Writing – original draft, Validation. Nail Alaoui: Data curation, Formal analysis, Methodology, Software. Abdelkerim Souahlia: Formal analysis, Software, Writing – original draft. Mohamed Maazouz: Validation, Writing – review & editing. Hamza Hentabeli: Formal analysis, Investigation, Software, Visualization.

Declaration of competing interest

The authors declare the following financial interests/personal relationships which may be considered as potential competing interests: Abdallah AZZOUZ reports that the article publishing charges were provided by the Institute of Research in Computer Science, Mathematics, Automation and Signal IRIMAS, Université de Haute Alsace, Mulhouse 68093, France.

References

  • 1.Weiting Y., Runjing Z. 2007 8th Int. Conf. Electron. Meas. Instruments. 2007. An improved self-adaptive filter based on LMS algorithm for filtering 50Hz interference in ECG signals; pp. 874–878. [DOI] [Google Scholar]
  • 2.Shadmand S., Mashoufi B. A new personalized ECG signal classification algorithm using Block-based Neural Network and Particle Swarm Optimization. Biomed. Signal Process Control. 2016;25:12–23. doi: 10.1016/j.bspc.2015.10.008. [DOI] [Google Scholar]
  • 3.Farashi S. A multiresolution time-dependent entropy method for QRS complex detection. Biomed. Signal Process Control. 2016;24:63–71. doi: 10.1016/j.bspc.2015.09.008. [DOI] [Google Scholar]
  • 4.Tung R., Zimetbaum P. Use of the electrocardiogram in acute myocardial infarction. Card. Intensive Care. 2010:106–109. doi: 10.1016/B978-1-4160-3773-6.10011-4. [DOI] [Google Scholar]
  • 5.van Alsté J.A., van Eck W., Herrmann O.E. ECG baseline wander reduction using linear phase filters. Comput. Biomed. Res. 1986;19:417–427. doi: 10.1016/0010-4809(86)90037-6. [DOI] [PubMed] [Google Scholar]
  • 6.Mitov I.P. A method for reduction of power line interference in the ECG. Med. Eng. Phys. 2004;26:879–887. doi: 10.1016/j.medengphy.2004.08.014. [DOI] [PubMed] [Google Scholar]
  • 7.Chavan M.S., Agarwala R.A., Uplane M.D., Gaikwad M.S. Design of ECG instrumentation and implementation of digital filter for noise reduction. Recent Adv. Signal Process. Robot. Autom. 2004:36–39. [Google Scholar]
  • 8.Chavan M.S., Agarwala R.A., Uplane M.D. Suppression of baseline wander and power line interference in ECG using digital IIR filter. Int. J. Circuits, Syst. Signal Process. 2008;2:356–365. [Google Scholar]
  • 9.Biswas U., Maniruzzaman M. 2014 Int. Conf. Electr. Eng. Inf. Commun. Technol. 2014. Removing power line interference from ECG signal using adaptive filter and notch filter; pp. 1–4. [DOI] [Google Scholar]
  • 10.Al-Qawasmi A.-R., Daqrouq K. ECG signal enhancement using wavelet transform. WSEAS Trans. Biol. Biomed. 2010;7:62–72. [Google Scholar]
  • 11.Martens S.M.M., Mischi M., Oei S.G., Bergmans J.W.M. An improved adaptive power line interference canceller for electrocardiography. IEEE Trans. Biomed. Eng. 2006;53:2220–2231. doi: 10.1109/TBME.2006.883631. [DOI] [PubMed] [Google Scholar]
  • 12.Rahman M.Z.U., Shaik R.A., Reddy D.V.R.K. Efficient sign based normalized adaptive filtering techniques for cancelation of artifacts in ECG signals: application to wireless biotelemetry. Signal Process. 2011;91:225–239. doi: 10.1016/j.sigpro.2010.07.002. [DOI] [Google Scholar]
  • 13.Butt M., Razzaq N., Sadiq I., Salman M., Zaidi T. 2013 IEEE 9th Int. Colloq. Signal Process. Its Appl. 2013. Power Line Interference removal from ECG signal using SSRLS algorithm; pp. 95–98. [DOI] [Google Scholar]
  • 14.Kumaravel N., Nithiyanandam N. Genetic-algorithm cancellation of sinusoidal powerline interference in electrocardiograms. Med. Biol. Eng. Comput. 1998;36:191–196. doi: 10.1007/BF02510742. [DOI] [PubMed] [Google Scholar]
  • 15.Mateo J., Sanchez C., Tortes A., Cervigon R., Rieta J.J. 2008 Comput. Cardiol. 2008. Neural network based canceller for powerline interference in ECG signals; pp. 1073–1076. [DOI] [Google Scholar]
  • 16.Huang N.E., Shen Z., Long S.R., Wu M.C., Shih H.H., Zheng Q., Yen N.-C., Tung C.C., Liu H.H. The empirical mode decomposition and the Hilbert spectrum for nonlinear and non-stationary time series analysis. Proc. R. Soc. London. Ser. A Math. Phys. Eng. Sci. 1998;454:903–995. doi: 10.1098/rspa.1998.0193. [DOI] [Google Scholar]
  • 17.Nimunkar A.J., Tompkins W.J. 2007 29th Annu. Int. Conf. IEEE Eng. Med. Biol. Soc. 2007. EMD-based 60-Hz noise filtering of the ECG; pp. 1904–1907. [DOI] [PubMed] [Google Scholar]
  • 18.Zhidong Z., Chan M. 2008 11th IEEE Int. Conf. Commun. Technol. 2008. A novel cancellation method of powerline interference in ECG signal based on EMD and adaptive filter; pp. 517–520. [DOI] [Google Scholar]
  • 19.Suchetha M., Kumaravel N. Empirical mode decomposition based filtering techniques for power line interference reduction in electrocardiogram using various adaptive structures and subtraction methods. Biomed. Signal Process Control. 2013;8:575–585. doi: 10.1016/j.bspc.2013.05.001. [DOI] [Google Scholar]
  • 20.Ziarani A.K., Konrad A. A nonlinear adaptive method of elimination of power line interference in ECG signals. IEEE Trans. Biomed. Eng. 2002;49:540–547. doi: 10.1109/TBME.2002.1001968. [DOI] [PubMed] [Google Scholar]
  • 21.Kabir M.A., Shahnaz C. Denoising of ECG signals based on noise reduction algorithms in EMD and wavelet domains. Biomed. Signal Process Control. 2012;7:481–489. doi: 10.1016/j.bspc.2011.11.003. [DOI] [Google Scholar]
  • 22.Kopsinis Y., McLaughlin S. Development of EMD-based denoising methods inspired by wavelet thresholding. IEEE Trans. Signal Process. 2009;57:1351–1362. doi: 10.1109/TSP.2009.2013885. [DOI] [Google Scholar]
  • 23.Chang K.-M. Arrhythmia ECG noise reduction by ensemble empirical mode decomposition. Sensors. 2010;10:6063–6080. doi: 10.3390/s100606063. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.Keshtkaran M.R., Yang Z. A fast, robust algorithm for power line interference cancellation in neural recording. J. Neural. Eng. 2014;11:1–18. doi: 10.1088/1741-2560/11/2/026017. [DOI] [PubMed] [Google Scholar]
  • 25.Piskorowski J. 2010. Digital notch filter with time-varying quality factor for the reduction of powerline interference. (Proc. 2010 IEEE Int. Symp. Circuits Syst). 2706–2709. [DOI] [Google Scholar]
  • 26.Boda S., Mahadevappa M., Dutta P.K. A hybrid method for removal of power line interference and baseline wander in ECG signals using EMD and EWT. Biomed. Signal Process Control. 2021;67 doi: 10.1016/j.bspc.2021.102466. [DOI] [Google Scholar]
  • 27.Agrawal S., Gupta A. Fractal and EMD based removal of baseline wander and powerline interference from ECG signals. Comput. Biol. Med. 2013;43:1889–1899. doi: 10.1016/j.compbiomed.2013.07.030. [DOI] [PubMed] [Google Scholar]
  • 28.Sharma R.R., Pachori R.B. Baseline wander and power line interference removal from ECG signals using eigenvalue decomposition. Biomed. Signal Process Control. 2018;45:33–49. doi: 10.1016/j.compbiomed.2013.07.030. [DOI] [Google Scholar]
  • 29.Kumar S., Panigrahy D., Sahu P.K. Denoising of Electrocardiogram (ECG) signal by using empirical mode decomposition (EMD) with non-local mean (NLM) technique. Biocybern. Biomed. Eng. 2018;38:297–312. doi: 10.1016/j.bbe.2018.01.005. [DOI] [Google Scholar]
  • 30.Joshi S.L., Vatti R.A., V Tornekar R. 2013 Int. Conf. Commun. Syst. Netw. Technol. 2013. A survey on ECG signal denoising techniques; pp. 60–64. [DOI] [Google Scholar]
  • 31.Tracey B.H., Miller E.L. Nonlocal means denoising of ECG signals. IEEE Trans. Biomed. Eng. 2012;59:2383–2386. doi: 10.1109/TBME.2012.2208964. [DOI] [PubMed] [Google Scholar]
  • 32.Samadi S., Shamsollahi M.B. ECG noise reduction using empirical mode decomposition based on combination of instantaneous half period and soft-thresholding. Middle East Conf. Biomed. Eng. MECBME. 2014:244–248. doi: 10.1109/MECBME.2014.6783250. [DOI] [Google Scholar]
  • 33.Chacko A., Ari S. IEEE-international Conf. Adv. Eng. Sci. Manag. ICAESM-2012. vol. 2. 2012. Denoising of ECG signals using Empirical Mode Decomposition based technique; pp. 6–9. [Google Scholar]
  • 34.Rakshit M., Das S. An efficient ECG denoising methodology using empirical mode decomposition and adaptive switching mean filter. Biomed. Signal Process Control. 2018;40:140–148. doi: 10.1016/j.bspc.2017.09.020. [DOI] [Google Scholar]
  • 35.Vargas R.N., Veiga A.C.P. Electrocardiogram signal denoising by clustering and soft thresholding. IET Signal Process. 2018;12:1165–1171. doi: 10.1049/iet-spr.2018.5162. [DOI] [Google Scholar]
  • 36.Han G., Xu Z. Electrocardiogram signal denoising based on a new improved wavelet thresholding. Rev. Sci. Instrum. 2016;87:1–7. doi: 10.1063/1.4960411. [DOI] [PubMed] [Google Scholar]
  • 37.Condat L. A direct algorithm for 1-D total variation denoising. IEEE Signal Process. Lett. 2013;20:1054–1057. doi: 10.1109/LSP.2013.2278339. [DOI] [Google Scholar]
  • 38.Vargas R.N., Veiga A.C.P. Electrocardiogram signal denoising by a new noise variation estimate. Res. Biomed. Eng. 2020;36:13–20. doi: 10.1007/s42600-019-00033-y. [DOI] [Google Scholar]
  • 39.El-Dahshan E.S.A. Genetic algorithm and wavelet hybrid scheme for ECG signal denoising. Telecommun. Syst. 2011;46:209–215. doi: 10.1007/s11235-010-9286-2. [DOI] [Google Scholar]
  • 40.Alyasseri Z.A.A., Khader A.T., Al-Betar M.A., Abasi A.K., Makhadmeh S.N. EEG signals denoising using optimal wavelet transform hybridized with efficient metaheuristic methods. IEEE Access. 2020;8:10584–10605. doi: 10.1109/ACCESS.2019.2962658. [DOI] [Google Scholar]
  • 41.Masoodian S., Bazrafshan A., Rajabi Mashhadi H. ICEE 2012 - 20th Iran. Conf. Electr. Eng. 2012. Biomedical signal denoising by adaptive wavelet design using genetic algorithms; pp. 1590–1593. [DOI] [Google Scholar]
  • 42.Xingwei Y., Dawei L., Afeng Y., Jun Z., Du C. Proc. 2013 3rd Int. Conf. Intell. Syst. Des. Eng. Appl. ISDEA. 2013. A novel method of wavelet threshold shrinkage based on genetic algorithm and sample entropy; pp. 144–149. 2013. [DOI] [Google Scholar]
  • 43.Nagendra H., Mukherjee S., Kumar V. Application of wavelet techniques in ECG signal processing: an overview. Int. J. Eng. Sci. Technol. 2011;3:7432–7443. [Google Scholar]
  • 44.Vozda M., Jurek F., Cerny M. Individualization of a vectorcardiographic model by a particle swarm optimization. Biomed. Signal Process Control. 2015;22:65–73. doi: 10.1016/j.bspc.2015.06.010. [DOI] [Google Scholar]
  • 45.Mirvaziri H., Mobarakeh Z.S. Improvement of EEG-based motor imagery classification using ring topology-based particle swarm optimization. Biomed. Signal Process Control. 2017;32:69–75. doi: 10.1016/j.bspc.2016.10.015. [DOI] [Google Scholar]
  • 46.Hesar H.D., Hesar A.D. ECG enhancement using a modified Bayesian framework and particle swarm optimization. Biomed. Signal Process Control. 2023;80:1–12. doi: 10.1016/j.bspc.2022.104280. [DOI] [Google Scholar]
  • 47.Zhang W., Lin Z., Liu X. Short-term offshore wind power forecasting - a hybrid model based on discrete wavelet transform (DWT), seasonal autoregressive integrated moving average (sarima), and deep-learning-based long short-term memory (lstm) Renew. Energy. 2022;185:611–628. doi: 10.1016/j.renene.2021.12.100. [DOI] [Google Scholar]
  • 48.Rouis M., Sbaa S., Benhassine N.E. The effectiveness of the choice of criteria on the stationary and non-stationary noise removal in the phonocardiogram (PCG) signal using discrete wavelet transform. Biomed. Tech. 2020;65:353–366. doi: 10.1515/bmt-2019-0197. [DOI] [PubMed] [Google Scholar]
  • 49.Alyasseri Z.A.A., Khader A.T., Al-Betar M.A. ACM Int. Conf. Proceeding Ser. Association for Computing Machinery; 2017. Electroencephalogram signals denoising using various mother wavelet functions: a comparative analysis; pp. 100–105. [DOI] [Google Scholar]
  • 50.Sawant C., Patii H.T. 1st Int. Conf. Networks Soft Comput. ICNSC 2014 - Proc.; 2014. Wavelet based ECG signal de-noising; pp. 20–24. [DOI] [Google Scholar]
  • 51.Donoho D.L., Johnstone J.M. Ideal spatial adaptation by wavelet shrinkage. Biometrika. 1994;81:425–455. doi: 10.1093/biomet/81.3.425. [DOI] [Google Scholar]
  • 52.Singh B.N., Tiwari A.K. Optimal selection of wavelet basis function applied to ECG signal denoising. Digit. Signal Process. 2006;16:275–287. doi: 10.1016/j.dsp.2005.12.003. [DOI] [Google Scholar]
  • 53.Rakibul Mowla M., Ng S.C., Zilany M.S.A., Paramesran R. Artifacts-matched blind source separation and wavelet transform for multichannel EEG denoising. Biomed. Signal Process Control. 2015;22:111–118. doi: 10.1016/j.bspc.2015.06.009. [DOI] [Google Scholar]
  • 54.Isa S.M., Noviyanto A., Arymurthy A.M. ICACSIS 2011 - 2011 Int. Conf. Adv. Comput. Sci. Inf. Syst. Proc. 2011. Optimal selection of wavelet thresholding algorithm for ECG signal denoising; pp. 365–370. [Google Scholar]
  • 55.Donoho D.L. De-noising by soft-thresholding. IEEE Trans. Inf. Theor. 1995;41:613–627. doi: 10.1109/18.382009. [DOI] [Google Scholar]
  • 56.Poli R., Kennedy J., Blackwell T. Quantification & Assessment of the chemical form of residual gadolinium in the brain. Swarm. Intell. 2007;1:33–57. doi: 10.1007/s11721-007-0002-0. [DOI] [Google Scholar]
  • 57.Wang D., Tan D., Liu L. Particle swarm optimization algorithm: an overview. Soft Comput. 2018;22:387–408. doi: 10.1007/s00500-016-2474-6. [DOI] [Google Scholar]
  • 58.MIT-BIH database 2023. http://www.physionet.org/physiobank/database/mitdb
  • 59.Prasad V., Siddaiah P., Rao B.P. A new wavelet based method for denoising of biological signals. Int. J. Comput. Sci. Netw. Secur. 2008;8:238–244. [Google Scholar]
  • 60.Chatterjee S., Thakur R.S., Yadav R.N., Gupta L., Raghuvanshi D.K. Review of noise removal techniques in ECG signals. IET Signal Process. 2020;14:569–590. doi: 10.1049/iet-spr.2020.0104. [DOI] [Google Scholar]
  • 61.Abdallah A., Billel B., Nail A., Abdelkerim S. 2023 Int. Conf. Adv. Electron. Control Commun. Syst. 2023. ECG signal denoising based on wavelet transform and genetic algorithm; pp. 1–6. [DOI] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

Data associated with this study is available at https://physionet.org/about/database/.


Articles from Heliyon are provided here courtesy of Elsevier

RESOURCES