

ORIGINAL ARTICLE 

Year : 2018  Volume
: 8
 Issue : 3  Page : 147160 

Performance investigation of marginalized particleextended kalman filter under different particle weighting strategies in the field of electrocardiogram denoising
Maryam Mohebbi, Hamed Danandeh Hesar
Department of Biomedical Engineering, K. N. Toosi University of Technology, Tehran, Iran
Date of Web Publication  13Sep2019 
Correspondence Address: Maryam Mohebbi Department of Biomedical Engineering, Electrical Faculty, K. N. Toosi University of Technology, P.O. Box 163151355, Tehran Iran
Source of Support: None, Conflict of Interest: None
DOI: 10.4103/jmss.JMSS_14_18
Background: Recently, a marginalized particleextended Kalman filter (MPEKF) has been proposed for electrocardiogram (ECG) signal denoising. Similar to particle filters, the performance of MPEKF relies heavily on the definition of proper particle weighting strategy. In this paper, we aim to investigate the performance of MPEKF under different particle weighting strategies in both stationary and nonstationary noises. Some of these particle weighting strategies are introduced for the first time for ECG denoising. Methods: In this paper, the proposed particle weighting strategies use different mathematical functions to regulate the behaviors of particles based on noisy measurements and a synthetic ECG signal built using feature parameters of ECG dynamic model. One of these strategies is a fuzzybased particle weighting method that is defined to adapt its function based on different input signaltonoise ratios (SNRs). To evaluate the proposed particle weighting strategies, the denoising performance of MPEKF was evaluated on MITBIH normal sinus rhythm database at 11 different input SNRs and in four different types of artificial and real noises. For quantitative comparison, the SNR improvement measure was used, and for qualitative comparison, the multiscale entropybased weighted distortion measure was used. Results: The experimental results revealed that the fuzzybased particle weighting strategy exhibited a very well and reliable performance in both stationary and nonstationary noisy environments. Conclusion: We concluded that the fuzzybased particle weighting strategy is the bestsuited strategy for MPEKF framework because it adaptively and automatically regulates the behaviors of particles in different noisy environments.
Keywords: Electrocardiogram denoising, fuzzy logic, marginalized particleextended Kalman filtering, modelbased filtering, nonlinear Bayesian filtering
How to cite this article: Mohebbi M, Hesar HD. Performance investigation of marginalized particleextended kalman filter under different particle weighting strategies in the field of electrocardiogram denoising. J Med Signals Sens 2018;8:14760 
How to cite this URL: Mohebbi M, Hesar HD. Performance investigation of marginalized particleextended kalman filter under different particle weighting strategies in the field of electrocardiogram denoising. J Med Signals Sens [serial online] 2018 [cited 2023 Jun 4];8:14760. Available from: https://www.jmssjournal.net/text.asp?2018/8/3/147/239713 
Introduction   
The electrocardiogram (ECG) signal is a noninvasive and powerful clinical tool to measure the cardiac activity and diagnose its related diseases. Although it is very easy to acquire, it is often corrupted by environmental and nonenvironmental interferences such as power line interference, bioelectric activities of the issues not belonging to the area of diagnostic interest, noise originating from electrode misplacement or other electrical instruments, electromyographic (EMG) noise or muscle artifact (MA), and ECG signal amplitude modulation with respiration.^{[1]} Such unwanted interferences may change or corrupt the morphological properties of ECG beats which are crucial for correct cardiac analysis and diagnosis. Therefore, ECG denoising remains a major concern for researchers, and many methods have been proposed to address this issue. Adaptive filters are the most commonly used techniques applied to remove baseline wander, EMG, and MA noises from ECG signals.^{[2],[3]} Statistical approaches such as principal component analysis,^{[4]} independent component analysis,^{[5],[6]} and neural networks^{[7]} also have been proposed to suppress the effects of noise in ECG beats. Because ECG is a nonlinear nonstationary signal that possess multiresolution properties, using wavelet transform has also been very popular in the field of ECG denoising and processing.^{[8],[9],[10],[11],[12]} More recently, techniques based on empirical mode decomposition^{[13],[14],[15]} and variational mode decomposition^{[16]} are also used to extract noisefree signal from noisy ECGs. Although there are a lot of nonmodelbased methods that can perform well in the field of ECG denoising, there are some undeniable benefits in using modelbased approaches. As it is known, most physicians analyze ECG signals based on their morphologies and their diagnostic conclusions are mainly based on the shapes and morphological patterns of signals. For example, when a physician claims that an ECG record has premature ventricular contractions (PVCs), his/her deduction is based on the changes of morphological trends in normal ECG beats when PVCs happen. Modelbased methods are computerized techniques that allow computers to analyze ECG records based on their morphologies, and thus, they can offer more benefits to physicians and clinical experts. However, modelbased techniques need more calculation time which thanks to the advances in the development of powerful processors and parallel processing technologies; it is not a big deal anymore. In the field of modelbased analysis of ECG, the ECG dynamic model (EDM) proposed by McSharry et al.^{[17]} and its polar variants are very popular and have been used in modelbased Bayesian filtering frameworks for ECG denoising, segmentation, and arrhythmia detection. Many of these Bayesian frameworks are based on extended Kalman filtering (EKF) approaches.^{[18],[19],[20],[21],[22],[23],[24],[25]} Since ECG has a nonlinear nature itself and some noises accompanying it (such as MA) are nonGaussian and nonstationary, in some works, it was proposed to implement nonlinear Bayesian frameworks, i.e., particle filters (PFs) for ECG denoising.^{[26],[27],[28],[29]} In the study by Hesar and Mohebbi,^{[29]} they proposed a marginalized particleEKF (MPEKF) that used marginalized particle filter (MPF) and EKF frameworks with a novel particle weighting strategy to denoise ECG signals efficiently. This framework was evaluated in both stationary and nonstationary environments and exhibited good performance over previous linear Bayesian frameworks, especially at low signaltonoise ratios (SNRs) and in nonGaussian environments. The MPEKF in the study by Hesar and Mohebbi^{[29]} benefitted from a particle weighting strategy which utilized synthetic ECG signals along with ECG signals to achieve better estimations. The synthetic ECG signals were built using EDM parameters and ECG linear phase wrapping.
The MPEKF in the study by Hesar and Mohebbi^{[29]} had some drawbacks:
 Similar to other modelbased methods, the MPEKF in the study by Hesar and Mohebbi^{[29]} could not perform well in ECG segments with varying morphologies or arrhythmia because its particle weighting strategy's trust level to measurements did not vary with respect to different morphologies
 The parameters of EDM were not estimated properly using linear ECG phase wrapping, especially when angular frequency was changing significantly. This caused the synthetic ECG signal to be misaligned with respect to the original signal.
To address the first problem, an adaptive particle weighting strategy was proposed in the study by Hesar and Mohebbi^{[30]} which enabled the MPEKF to perform well in the presence of different arrhythmia and even in ECG lead disconnection situations. This strategy used fuzzy logic, correlation, and EDM feature parameters to adjust its trust level to handle different morphologies in a single ECG segment. To have better denoising outputs and maximal overlaps between synthetic ECG signals and their corresponding ECG signals, a nonlinear ECG phase wrapping based on dynamic time warping (DTW) was implemented which leads to better estimation of EDM parameters, more accurate synthetic ECG, and reliable particle weighting.^{[30]} Unlike the first strategy proposed in the study by Hesar and Mohebbi^{[29]} for MPEKF, the behavior of fuzzybased particle weighting strategy has not been investigated yet in different noisy environments. In this paper, first, we propose several new particle weighting strategies, and then, we evaluate the denoising performance of MPEKF using different particle weighting strategies. To do so, the denoising performance of MPEKF was evaluated on MITBIH normal sinus rhythm database at 11 different input SNRs and in four different types of artificial and real noises (Gaussian white noise, pink, brown, and real MA noise) for each particle weighting strategy. For quantitative comparison, the SNR improvement measure, and for qualitative comparison, the multiscale entropybased weighted distortion (MSEWPRD) measure were used. The results demonstrated that in comparison to previous strategies and the new nonlinear strategies proposed for MPEKF in the field of ECG denoising, the fuzzybased particle weighting strategy exhibited a very well and reliable performance in both stationary and nonstationary noisy environments from both SNR improvement and MSEWPRD viewpoints, especially at lowinput SNRs.
This paper is organized as follows. Methods Section focuses on ECG phase wrapping, EDM extraction, MPEKF theories, and equations. In Results Section, several new particle weighting strategies along with the fuzzybased particle weighting strategy are presented. The experimental results and analyses are given in Discussion Section, and finally, conclusions are drawn in the last section.
Methods   
In this section, first, the previous works for denoising ECG using MPEKF are briefly reviewed. The first two subsections provide basic information for readers about EDM and MPEKF theories and equations. It is worth to mention that some unwanted mathematical mistakes were present in the definition of MPEKF in the studies by Hesar and Mohebbi^{[29],[30]} and they are corrected in this paper. In the last subsection, we review the previous particle weighting strategies proposed for MPEKF in the field of ECG denoising and introduce several other new strategies that are based on nonlinear mathematical operators that have the potential to be used inside MPEKF framework.
The marginalized particleextended Kalman filtering theory
In the study by Hesar and Mohebbi,^{[29]} an MPEKFbased filtering framework for ECG denoising was introduced. This framework used the polar variant of EDM that was proposed by Sameni et al.^{[18]} The model in Eq. 1 describes the ECG signal as summation of several Gaussian Kernels corresponding to ECG feature segments, i.e., P, Q, R, S, and T waves in polar space. This model is given by:
In the above model, are phase, amplitude, and angular velocity at timestep k, respectively. In addition, where δ is the sampling period, and the feature parameters are the amplitude, angular width, and location of each Gaussian Kernel, respectively. are random Gaussian white noises which model the uncertainty in EDM.
The measurement (observation) model in the study by Hesar and Mohebbi^{[29]} was constructed using similar approaches in the studies by Sameni et al. and Sayadi et al.^{[18],[19],[20]} In addition to noisy ECG amplitudes, two additional measurements were obtained. First Rpeaks were detected, and linear phases (ranging from –π to π) were assigned to ECG samples between each RR interval. Another measurement was acquired by the differentiation of linear phase between two consecutive RR peaks and considered as angular velocity observation. As a result, the measurement model is shown below:
where is the measurement vector and the noise vector describes the measurement model's uncertainty. Eqs. 1 and 2 are rewritten into following form:
In this model,
In addition, Considering the assumptions above, and inspired by MPF equations designed for mixed linear/nonlinear state models,^{[31]} we proposed to implement an MPEKF filtering framework for ECG denoising.^{[29]} This method used a novel combination of marginalized particle filter and EKF frameworks to overcome the shortcomings of PF and EKF.
Eq. 3a is rewritten in the following form:
It can be deduced that although is not an actual measurement of it has additional implicit information about . Based on this idea and using EKF concept to linearly approximate the MPEKF for ECG denoising is expressed in the following steps:
Step 1: For timestep k = 0 with importance distribution and initialization mean and covariance matrix initialize the particles for i = 1,..., N, where and .
Step 2: calculate the importance weights for i = 1,..., N, using where is the nonlinear part of i^{th} estimated particle in timestep k and is the nonlinear estimation of and it is a weighted summation of particles i.e.,
Step 3: normalize importance weights:
Step 4: If resample particles using systematic resampling.^{[32]}
Step 5: For each particle i = 1,..., N, perform Kalman filter measurement update according to:
where are the estimated mean vector, covariance, Kalman gain, and measurement prediction covariance matrices for at timestep k, respectively.
Step 6: predict new particles for timestep k + 1 using importance distribution according to Eq. 3, i.e.,
Step 7: For each particle i = 1,..., N, perform the first time update for the linear part of particle ( first prediction) using:
where and are the temporary representations of predicted mean vector and covariance matrix for the linear part of i^{th} particle at timestep k + 1, respectively.
Step 8: For each particle i = 1,..., N, perform second Kalman filter prediction using:
where and are the predicted mean vector and covariance matrix for the linear part of particle at timestep k + 1, respectively.
Nonlinear electrocardiogram phase wrapping for electrocardiogram dynamic model extraction and synthetic electrocardiogram generation
The denoising performance of MPEKF in the study by Hesar and Mohebbi^{[29]} benefited from a synthetic signal called “ECG_{synth}” which had the same length as the original ECG signal and was built using the EDM characteristic parameters of that signal. Therefore, the construction of EDM is a very crucial step for MPEKF as modelbased framework. An accurate phase wrapping not only results in building a reliable EDM^{[33]} but also leads to the construction of a more sensible synthetic ECG, which in turn improves the performance of the particle weighting strategy in MPEKF. In prior studies, the parameters of EDM are estimated using linear polar ECG phase wrapping technique. However, linear phase wrapping is not accurate when angular frequency (ω_{k}) is changing significantly. This situation has two undesirable consequences: (1) The parameters of EDM are not estimated properly. (2) The synthetic ECG signal is misaligned with respect to the original signal. To solve this problem, in the study by Hesar and Mohebbi,^{[30]} it was proposed to assign nonlinear phases to ECG samples using DTW approach proposed by Akhbari et al. and Niknazar et al.^{[25],[34]} To illustrate the differences between the linear and nonlinear phase wrapping approaches, two synthetic ECG signals are displayed in [Figure 1]. In [Figure 1], although the angular frequency does not change considerably, it leads to an improper synthetic ECG formation. The synthetic signal made with linear phase wrapping approach in [Figure 1] has some temporal delays that are visible on T waves (around 0.6 s and 2.7 s) with respect to ECG signal. These delays would impair the performance of MPEKF in estimation of correct signal trajectories. However, the synthetic signal built based on nonlinear phase wrapping approach (new synthetic ECG) has an acceptable harmonic correspondence with ECG signal.  Figure 1: Comparison of synthetic electrocardiogram signals made with linear and nonlinear phase wrapping in an electrocardiogram segment from record “16272” (chosen from MITBIH normal sinus rhythm database^{[35]})
Click here to view 
Theoretical aspects of different particle weighting strategies for marginalized particleextended Kalman filtering in the field of electrocardiogram denoising
In the study by Hesar and Mohebbi,^{[29]} it was suggested that to get better denoising results in noisy environments, the behaviors of particles in MPEKF could be controlled based on the behaviors of both noisy and synthetic ECG signals. The particle weighting strategy in the study by Hesar and Mohebbi^{[29]} used the following equation:
where is the Mahalanobis distance between the i^{th} particle at timestep and measurement vector at timestep and is the Mahalanobis distance between the i^{th} particle at timestep k and synthetic ECG signal at timestep k.^{[29]}
The value of characterizes the resemblance of the i^{th} particle to k^{th} noisy measurement. If is small, it signifies that the i^{th} particle probably yields a good estimate of states and should get a higher weight and vice versa. The value of characterizes the resemblance of the i th particle to the current sample in ECG_{synth}. If is small, it implies that the i^{th} particle probably yields a good estimate of states and should get a higher weight and vice versa.
We can define other particle weighting strategies using nonlinear mathematical functions as well. For instance, the following equations use both and to regulate the performances of particles:
Each strategy in Eqs. 11–13 has specific properties. Eq. 12 imposes the strictest law to the particles. In Eq. 12, the weight of a single particle is high if and only if when that particle is very close to both synthetic and noisy ECG signals. This strategy is suitable for situations when the input SNR is low, and we want to suppress the noise effects. However, theoretically, at lowinput SNRs, it does not guarantee a proper output. On the other hand, Eq. 13 has the most lenient rule. The weight of a particle in Eq. 13 is high when that particle is close to synthetic or noisy signal or both of them. Eq. 13 is appropriate for situations when the input SNR is high, and we want to trace the trajectory of ECG signal very accurately. However, at highinput SNRs, the particles are not supposed to trace the trajectories of signals exactly. Although the weighting strategy in Eq. 11 is stricter than Eq. 10, it is somewhat between rules of Eqs. 12 and 13. It is less lenient than Eq. 13 and less strict than Eq. 12. Theoretically, it can be used at midinput SNRs. In the study by Hesar and Mohebbi,^{[30]} it was proposed to use an adaptive particle weighting strategy that was derived from Eq. 10. As you know, Eq. 10 can be written as follows:
where α_{1} = α_{2} =1. However, hypothetically, α_{1} can be different from α_{2} if the power of noise is known. For example, for good signal tracing at highinput SNRs, α_{2} can be set higher than α_{1} (scenario 1). In very noisy signals, contrariwise, α_{1} can be defined higher than α_{2} (scenario 2). Therefore, Eq. 14 can be rewritten as the follows:
One can see that while Eqs. 14 and 15 deliver similar results, Eq. 15 has fewer variables to deal with. For example in Eq. 15, at higherinput SNRs, α_{1} can be tuned lower than 0.5 (α_{1} [scenario 1]), and at lowerinput SNRs, it can be tuned higher than 0.5 (α_{1} [scenario 2]). In the study by Hesar and Mohebbi,^{[30]} a fuzzybased scheme was proposed that automatically and adaptively resolved these challenges. This scheme was based on two simple rules for ECG segments having normal beats. These rules are as follows:
 Rule 1: if λ_{k} is high, α_{1} is low
 Rule 2: if λ_{k} is low, α_{1} is high.
where
In Eq. 16, corr(x, y) denotes the normalized crosscorrelation function of two signals x and y and ecg_{syn} represents the synthetic signal (ECG_{synth}) and ecg_{noisy} denotes the real noisy ECG signal. As you can see, λ_{k} is the similarity factor in timestep k between noisy ECG signal and its synthetic representative.
Founded upon the aforementioned rules, a simple Sugenotype fuzzy inference system was designed in the study by Hesar and Mohebbi.^{[30]} Using fuzzy system, the particle weighting procedure in Eq. 15 is automatic and more adaptive. With this method, MPEKF is able to automatically and adaptively balance its behavior with regard to different input SNRs.
For the rest of the paper, for simplification, let us denote the MPEKFs using particle weighting strategies in Eqs. 10–15, “MPEKF plus,” “MPEKF multiply,” 'MPEKF min,” “MPEKF max,” and “MPEKF fuzzy plus,” respectively.
Results   
To investigate the proposed particle weighting strategies in the previous section, the performance of MPEKF using each strategy was evaluated on MITBIH normal sinus rhythm database.^{[35]} 200 signal segments from different subjects were selected from MITBIH normal sinus rhythm database (DB1). Each segment consisted of normal ECG beats with no significant arrhythmias with duration of 30 s and sampling frequency of 128 Hz. These segments were also used in the study by Hesar and Mohebbi^{[29]} to evaluate the performance of MPEKF over EKF/EKS frameworks. Four types of noise, Gaussian white noise, pink noise, brown noise, and MA noise, were selected for experiments. The first three noises were produced using the following spectral density:
where S(f) and f are the noise spectral density function and frequency in Hz. The parameter β is 0, 1, and 2 for Gaussian white, pink, and brown noise, correspondingly. For the nonstationary MA noise generation, real MA from the MITBIH Noise Stress Test Database was used.^{[36]} This noise had a sampling rate of 360 Hz and it had to be resampled to 128 Hz (sampling frequency of test ECG segments). The SNRs 10, 8, 6, 4, 2, 1, 0, −1, −3, −4, −5 dB were chosen to simulate the same noisy situations in the study by Hesar and Mohebbi.^{[29]} For quantitative comparison, the SNR improvement measure, and for qualitative comparison, the MSEWPRD[37] were used. The SNR improvement measure is given by:
where x_{o}, x_{n}, and x_{d} represent the original ECG signal, the noisy ECG signal, and the denoised ECG signal, respectively.^{[19]} MSEWPRD is a weighted percentage rootmeansquare difference (WPRD) between the subband wavelet coefficients of the original and filtered signals with weights equal to the multiscale entropies of the corresponding subbands.^{[37]} To calculate this metric, both signals must be decomposed using wavelet filters up to L levels. The number of levels depends on the nature of the signal and the sampling frequency. For sampling frequency of 128 Hz, we chose L = 4. The Daubechies 9/7 biorthogonal wavelet filters^{[38]} were used for calculation of wavelet coefficients.
Before implementation of fuzzybased particle weighting strategy in Eq. 15, to identify which values of λ_{k}, can be attributed as low or high, several experiments were conducted in the study by Hesar and Mohebbi.^{[30]} For each segment in DB1, the values of λ_{k} were calculated and averaged in 11 input SNRs and for two noise types: the stationary white Gaussian noise and the nonstationary nonGaussian MA noise. [Figure 2] illustrates the mean and standard deviation of λ_{k} It is realized that the values of λ_{k} for nonstationary MA noise are higher than those for stationary white Gaussian noise, which indicates that for an equal input SNR, α_{1} can be set lower for MA noises. In other words, if the effect of nonlinear baseline drift is suppressed in noisy ECG, MPEKF particles can trust noisy measurements more confidently.  Figure 2: Mean and standard deviation of λ_{k} for DB1 in two noise types for n = 15 (muscle artifact and white Gaussian noise)^{[30]}
Click here to view 
Based on the results of [Figure 2], the fuzzy membership functions of λ_{k} are constructed [Figure 3]. Next step is defining α_{1}. Many experiments were run to determine which values of α_{1} would grant best results from SNR improvement and MSEWPRD viewpoints.^{[30]} In these experiments, the range of “low α_{1} “ and “high α_{1}” were 0.3–0.49 and 0.51–0.6, respectively. Values outside these ranges were also examined but did not yield good MSEWPRD results. The experiments revealed that best results were achieved using values 0.48 and 0.52 for “low α_{1}” and “high α_{1},” respectively. The best results using these values are demonstrated in [Figure 4], [Figure 5], [Figure 6], [Figure 7], [Figure 8].  Figure 4: The mean (top) and standard deviation (bottom) of signaltonoise ratio improvements versus different input signaltonoise ratios for DB1 for marginalized particleextended Kalman filter using different weighting strategies: (left) White Gaussian noise, (right) pink noise
Click here to view 
 Figure 5: The mean (top) and standard deviation (bottom) of signaltonoise ratio improvements versus different input signaltonoise ratios for DB1 for marginalized particleextended Kalman filter using different weighting strategies: (left) brown noise, (right) muscle artifact noise
Click here to view 
 Figure 6: Typical filtering results for record “17453” from DB1 in the presence of muscle artifact noise in signaltonoise ratio 6 dB. (a) Original and noisy, (b) “marginalized particleextended Kalman filter max,” (c) “marginalized particleextended Kalman filter min,” (d) “marginalized particleextended Kalman filter multiply,” (e) “marginalized particleextended Kalman filter plus,” (f) “marginalized particleextended Kalman filter fuzzy plus”
Click here to view 
 Figure 7: The mean (top) and standard deviation (bottom) of multiscale entropybased weighted distortions versus different input signaltonoise ratios for DB1 for marginalized particleextended Kalman filter using different weighting strategies: (left) white Gaussian noise, (right) pink noise
Click here to view 
 Figure 8: The mean (top) and standard deviation (bottom) of multiscale entropybased weighted distortions versus different input signaltonoise ratios for DB1 for marginalized particleextended Kalman filter using different weighting strategies: (left) brown noise, (right) muscle artifact noise
Click here to view 
In each SNR and in each simulation, each segment received a different random noise input. Similar to the study by Hesar and Mohebbi,^{[29]} in this paper, the numbers of particles for all MPEKFs were chosen 200 resulting 70–80 s calculation time for each simulation.
[Figure 4] and [Figure 5] show the performance results of different MPEKFs from SNR improvement viewpoint in four noise types. It is clear in [Figure 4] that “MPEKF fuzzy plus” outperformed others in white Gaussian environments. At highinput SNRs and in white Gaussian noise, the performance of “MPEKF min” was better than “MPEKF plus,” “MPEKF max,” and “MPEKF multiply.” However, at lowinput SNRs, its performance was fallen below than others. “MPEKF multiply” performed better than others in midSNRs, except “MPEKF fuzzy plus.” The performance of “MPEKF max” was very similar (but not better) to “MPEKF plus” for white Gaussian noise. Overall, it can be deduced that “MPEKF fuzzy plus” and “MPEKF plus” are appropriate choices for noisy environments corrupted by white Gaussian noise. For artificial pink and brown noises, the situation is different. In pink noises, although “MPEKF fuzzy plus” proved to perform better than “MPEKF plus,” they were beaten by “MPEKF max.” Another fact that can be seen in [Figure 4] is the low performance of both “MPEKF multiply” and “MPEKF min” for pink noises. Based on the results in [Figure 4], “MPEKF fuzzy plus” is a good choice for highinput and midinput SNRs and “MPEKF max” is a good choice for very lowinput SNRs. Nevertheless, if we wanted a robust and stable performance for all input SNRs, “MPEKF fuzzy plus” would be the proper option. By looking at [Figure 5], it can be seen that for brown noise, “MPEKF max” acted worst, and once again, “MPEKF fuzzy plus” outmatched “MPEKF plus.” On the other hand, “MPEKF multiply” and “MPEKF min” performed better than others. However, at highinput SNRs, “MPEKF multiply” could not achieve a desirable performance. The results in [Figure 5] implied that it is recommended to use “MPEKF min” for noisy environments corrupted by brown noise. In [Figure 5], the performance results of the MPEKFs for real MA noises are demonstrated. Like pink noise, “MPEKF multiply” and “MPEKF min” performed worse than others in MA noises. For MA noises, “MPEKF fuzzy plus” achieved best results at lowinput SNRs, and “MPEKF plus” attained best results at high and midinput SNRs. From [Figure 4] and [Figure 5], it can be concluded that from SNR improvement viewpoint, “MPEKF fuzzy plus” yielded acceptable, reliable, and stable results in all types of noises and Eq. 15 can be attributed as the suitable particle weighting strategy for MPEKF.
Discussion   
In this paper, several particle weighting strategies are proposed in MPEKF framework for ECG denoising. One of these strategies which proved to perform well in both Gaussian and nonGaussian nonstationary environments was an adaptive fuzzybased particle weighting strategy. This strategy manifested a noticeable superiority over other existing particle weighting strategies proposed for MPEKF from SNR improvement viewpoint.
For further illustration, an example of denoising in the presence of MA noise is shown in [Figure 6] to explore the behaviors of the proposed particle weighting strategies. It is mentioned earlier that “MPEKF min” has the softest regulation on particles. It seems that this rule could not avoid particles in tracing the baseline drift. Another deficiency is seen around time interval 12.9–13.5 s when “MPEKF min” failed to preserve the morphology of ECG. These shortcomings are somewhat present in the output of “MPEKF multiply” [Figure 6]d too. However, “MPEKF multiply” managed to suppress the baseline drift better than “MPEKF min.” The performance of “MPEKF max” [Figure 6]b was better than the two aforementioned MPEKFs. Although “MPEKF max” could not recover the morphology of ECG completely in time interval 4.2–4.7 s, it removed the baseline drift effects in the most parts of ECG segment and preserved the morphology of ECG around time interval 12.9–13.5 s. From [Figure 6]e and [Figure 6]f, it is inferred that “MPEKF plus” and “MPEKF fuzzy plus” are more successful than other MPEKFs in dealing with MA noise. It is also realized that “MPEKF plus” performed better than “MPEKF fuzzy plus” in preserving the morphology of ECG. This fact can also be seen in the SNR improvement results for MA noises in [Figure 5]. As it is said earlier, the results in [Figure 5] imply that for MA noises, at high and midinput SNRs, “MPEKF plus” was superior to “MPEKF fuzzy plus.” However, at lowinput SNRs, “MPEKF fuzzy plus” outmatched “MPEKF plus.”
To explore the diagnostic distortion effects in the outputs of the aforementioned MPEKFs, we calculated the MSEWPRD for DB1. The results are mentioned in [Table 1], [Table 2], [Table 3], [Table 4]; however, for better view, they are illustrated in [Figure 7] and [Figure 8]. In [Figure 7], it is clear that “MPEKF fuzzy plus” attained the lowest MSEWPRD in white Gaussian noise at all input SNRs. This means that in white Gaussian interferences, “MPEKF fuzzy plus” preserves the clinical information better than others. In pink noises, “MPEKF max” along with “MPEKF fuzzy plus” achieved lower MSEWPRDs. Although “MPEKF fuzzy multiply” and “MPEKF min” did not yield desirable results for white Gaussian, pink, and MA noises, they surprisingly managed to outperform other methods in brown noises [Figure 8]. In MA noises, as it is shown in [Figure 8], “MPEKF fuzzy plus” and “MPEKF plus” performed better than others. At high and midinput SNRs, “MPEKF plus” was better than “MPEKF fuzzy plus;” however, at lowinput SNRs, “MPEKF fuzzy plus” was superior. Based on the SNR improvement and MSEWPRD results in [Figure 4], [Figure 5], [Figure 7], [Figure 8], and [Table 1], [Table 2], [Table 3], [Table 4], we concluded that in comparison to other proposed strategies for MPEKF in the field of ECG denoising, the fuzzybased adaptive particle weighting strategy is still the bestsuited strategy for MPEKF framework.  Table 1: Performance evaluation of filtering frameworks for DB1 in the presence of white Gaussian noise from multiscale entropybased weighted distortion viewpoint
Click here to view 
 Table 2: Performance evaluation of filtering frameworks for DB1 in the presence of pink noise from multiscale entropybased weighted distortion viewpoint
Click here to view 
 Table 3: Performance evaluation of filtering frameworks for DB1 in the presence of brown noise from multiscale entropybased weighted distortion viewpoint
Click here to view 
 Table 4: Performance evaluation of filtering frameworks for DB1 in the presence of muscle artifact noise from multiscale entropybased weighted distortion viewpoint
Click here to view 
In this paper, we explored the performance of MPEKF under different particle weighting strategies in both stationary and nonstationary noises. In this paper, we proposed three novel nonlinear particle strategies that unlike adaptive fuzzybased strategy, these new strategies did not need any preprocessing or knowledge about ECG segments which make them easy to implement. Despite introducing new particle weighting strategies in this paper, the experimental results revealed that the fuzzybased particle weighting adaptive fuzzybased strategy demonstrated better performance in many input SNRs and was more reliable than others in most types of noises, although in certain types of noises (e.g., brown noise), the dominance of adaptive fuzzybased strategy was broken by one of the newly proposed particle weighting strategies. With adaptive fuzzybased strategy, the MPEKF can adaptively adjust its behavior with respect to different input SNRs and nonstationary environments. This particle weighting strategy automatically controls the behavior of particles according to input SNRs. At lowinput SNRs, this strategy lowers the particles' degree of trust to the measurements while increasing their degree of trust to the synthetic ECG. At highinput SNRs, the particles' degree of trust to the measurements is increased and the degree of trust to synthetic ECG is decreased. To further improve the performance of MPEKF, we used nonlinear phase wrapping in its observation model using DTW.
Financial support and sponsorship
Nil.
Conflicts of interest
There are no conflicts of interest.
References   
1.  Friesen GM, Jannett TC, Jadallah MA, Yates SL, Quint SR, Nagle HT, et al. A comparison of the noise sensitivity of nine QRS detection algorithms. IEEE Trans Biomed Eng 1990;37:8598. 
2.  Laguna P, Jané R, Meste O, Poon PW, Caminal P, Rix H, et al. Adaptive filter for eventrelated bioelectric signals using an impulse correlated reference input: Comparison with signal averaging techniques. IEEE Trans Biomed Eng 1992;39:103244. 
3.  Thakor NV, Zhu YS. Applications of adaptive filtering to ECG analysis: Noise cancellation and arrhythmia detection. IEEE Trans Biomed Eng 1991;38:78594. 
4.  Moody GB, Mark RG, editors. QRS morphology representation and noise estimation using the KarhunenLoeve transform. Computers in Cardiology. Jerusalem, Israel: IEEE; 1989. 
5.  Barros AK, Mansour A, Ohnishi N. Removing artifacts from electrocardiographic signals using independent components analysis. Neurocomputing 1998;22:17386. 
6.  He T, Clifford G, Tarassenko L. Application of independent component analysis in removing artefacts from the electrocardiogram. Neural Comput Appl 2006;15:10516. 
7.  Clifford G, Tarassenko L, Townsend N. Onepass training of optimal architecture autoassociative neural network for detecting ectopic beats. Electron Lett 2001;37:11267. 
8.  Donoho DL. Denoising by softthresholding. IEEE Trans Inf Theory 1995;41:61327. 
9.  Kestler H, Haschka M, Kratz W, Schwenker F, Palm G, Hombach V, et al., editors. Denoising of highresolution ECG signals by combining the discrete wavelet transform with the Wiener filter. Computers in Cardiology. Cleveland, OH, USA: IEEE; 1998. 
10.  Agante P, De Sá JM, editors. ECG noise filtering using wavelets with softthresholding methods. Computers in Cardiology. Hannover, Germany: IEEE; 1999. 
11.  Popescu M, Cristea P, Bezerianos A, editors. High resolution ECG filtering using adaptive Bayesian wavelet shrinkage. Computers in Cardiology. Cleveland, OH, USA: IEEE; 1998. 
12.  Sayadi O, Shamsollahi MB. Multiadaptive bionic wavelet transform: Application to ECG denoising and baseline wandering reduction. EURASIP J Adv Signal Process 2007;2007:111. 
13.  Chacko A, Ari S, editors. Denoising of ECG signals using Empirical Mode Decomposition Based Technique. International Conference on Advances in Engineering, Science and Management (ICAESM). Nagapattinam, Tamil Nadu, India: IEEE; 2012. 
14.  Mijović B, De Vos M, Gligorijević I, Taelman J, Van Huffel S. Source separation from singlechannel recordings by combining empiricalmode decomposition and independent component analysis. IEEE Trans Biomed Eng 2010;57:218896. 
15.  Samadi S, Shamsollahi MB, editors. ECG noise reduction using empirical mode decomposition based on combination of instantaneous half period and softthresholding. 2 ^{nd} Middle East Conference on Biomedical Engineering. Doha, Qatar: IEEE; 2014. 
16.  Lahmiri S. Comparative study of ECG signal denoising by wavelet thresholding in empirical and variational mode decomposition domains. Healthc Technol Lett 2014;1:1049. 
17.  McSharry PE, Clifford GD, Tarassenko L, Smith LA. A dynamical model for generating synthetic electrocardiogram signals. IEEE Trans Biomed Eng 2003;50:28994. 
18.  Sameni R, Shamsollahi MB, Jutten C, Clifford GD. A nonlinear Bayesian filtering framework for ECG denoising. IEEE Trans Biomed Eng 2007;54:217285. 
19.  Sayadi O, Shamsollahi MB. ECG denoising and compression using a modified extended Kalman filter structure. IEEE Trans Biomed Eng 2008;55:22408. 
20.  Sayadi O, Shamsollahi MB. A modelbased Bayesian framework for ECG beat segmentation. Physiol Meas 2009;30:33552. 
21.  Sayadi O, Shamsollahi MB, Clifford GD. Robust detection of premature ventricular contractions using a wavebased bayesian framework. IEEE Trans Biomed Eng 2010;57:35362. 
22.  Akhbari M, Shamsollahi MB, Jutten C, Coppa B, editors. ECG denoising using angular velocity as a state and an observation in an extended Kalman filter framework. EMBC; 2012: IEEE. 
23.  Montazeri Ghahjaverestan N, Shamsollahi MB, Ge D, Hernández AI. Switching Kalman filter based methods for apnea bradycardia detection from ECG signals. Physiol Meas 2015;36:176383. 
24.  Oster J, Behar J, Sayadi O, Nemati S, Johnson AE, Clifford GD, et al. Semisupervised ECG ventricular beat classification with novelty detection based on switching Kalman filters. IEEE Trans Biomed Eng 2015;62:212534. 
25.  Akhbari M, Shamsollahi MB, Jutten C, Armoundas AA, Sayadi O. ECG denoising and fiducial point extraction using an extended Kalman filtering framework with linear and nonlinear phase observations. Physiol Meas 2016;37:20326. 
26.  Lin C, Bugallo M, Mailhes C, Tourneret JY, editors. ECG Denoising Using a Dynamical Model and a Marginalized Particle Filter. Asilomar Conference on Recombinant. Pacific Grove, CA: IEEE; 2011. 
27.  Lee J, McManus DD, Bourrell P, Sörnmo L, Chon KH. Atrial flutter and atrial tachycardia detection using Bayesian approach with high resolution time–frequency spectrum from ECG recordings. Biomed Signal Process Control 2013;8:9929. 
28.  Hesar HD, Mohebbi M, editors. Muscle artifact cancellation in ECG signal using a dynamical model and particle filter. 22 ^{nd} Iranian Conference on Biomedical Engineering (ICBME). Tehran, Iran: IEEE; 2015. 
29.  Hesar HD, Mohebbi M. ECG denoising using marginalized particle extended Kalman filter with an automatic particle weighting strategy. IEEE J Biomed Health Inform 2017;21:63544. 
30.  Hesar HD, Mohebbi M. An adaptive particle weighting strategy for ECG denoising using marginalized particle extended Kalman filter: An evaluation in arrhythmia contexts. IEEE J Biomed Health Inform 2017;21:158192. 
31.  Schon T, Gustafsson F, Nordlund PJ. Marginalized particle filters for mixed linear/nonlinear statespace models. IEEE Trans Signal Process 2005;53:227989. 
32.  Martino L, Elvira V, Louzada F. Effective sample size for importance sampling based on discrepancy measures. Signal Process 2017;131:386401. 
33.  Clifford G, Shoeb A, McSharry P, Janz B. Modelbased filtering, compression and classification of the ECG. Int J Bioelectromagn 2005;7:15861. 
34.  Niknazar M, Rivet B, Jutten C, editors. Application of dynamic time warping on Kalman filtering framework for abnormal ECG filtering. European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning. ESANN: Bruges, Belgium; 2012. 
35.  
36.  
37.  Manikandan MS, Dandapat S. Multiscale entropybased weighted distortion measure for ECG coding. IEEE Signal Process Lett 2008;15:82932. 
38.  Antonini M, Barlaud M, Mathieu P, Daubechies I. Image coding using wavelet transform. IEEE Trans Image Process 1992;1:20520. 
[Figure 1], [Figure 2], [Figure 3], [Figure 4], [Figure 5], [Figure 6], [Figure 7], [Figure 8]
[Table 1], [Table 2], [Table 3], [Table 4]
