0% found this document useful (0 votes)
13 views5 pages

ECG Signal Denoising with Adaptive Filters

This document presents a comparative analysis of different adaptive algorithms for denoising ECG signals corrupted by various artifacts. It discusses the LMS, NLMS, and RLS adaptive filtering algorithms. The LMS algorithm works by updating filter weights based on the error between the desired and actual output signals. NLMS improves on LMS convergence speed but has worse steady-state performance. RLS converges faster than LMS/NLMS but has higher computational complexity. The paper proposes an exponentially weighted step-size RLS algorithm to efficiently remove noise artifacts from ECG signals while preserving low-frequency components and features.

Uploaded by

sayedu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views5 pages

ECG Signal Denoising with Adaptive Filters

This document presents a comparative analysis of different adaptive algorithms for denoising ECG signals corrupted by various artifacts. It discusses the LMS, NLMS, and RLS adaptive filtering algorithms. The LMS algorithm works by updating filter weights based on the error between the desired and actual output signals. NLMS improves on LMS convergence speed but has worse steady-state performance. RLS converges faster than LMS/NLMS but has higher computational complexity. The paper proposes an exponentially weighted step-size RLS algorithm to efficiently remove noise artifacts from ECG signals while preserving low-frequency components and features.

Uploaded by

sayedu
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Journal of Electrical Engineering

[Link]

COMPARATIVE ANALYSIS OF DENOISING THE DIFFERENT ARTIFACTS IN


ECG SIGNAL USING DIFFERENT ADAPTIVE ALGORITHEMS

Y. Murali Krishna
Narasaraopeta Engineering College, Narasaraopet, Andhrapradesh,India,yadavalli437@[Link]

[Link] Khasim
Narasaraopeta Engineering College, Narasaraopet, Andhra Pradesh, India,sayedukhasim@[Link]

[Link] Reddy
Narasaraopet Institute of Technology, Narasaraopet, Andhrapradesh,India,rajasekhar.reddy61@[Link]

Abstract: Now a day’s biomedical signal processing detection of them is important to analyze ECG
having the main problems like in ECG signal effecting signal [2][3]. However, because ECG signal is very
noises caused by power line interference, external
electromagnetic fields, random body movements and faint, it is extremely easy to interfere by the different
respiration [Link] we have to remove these noises from the noises while gathering and recording. How to
ECG signal. For this purpose several methods are there suppress noises [6][7] effectively is always an
in filters. But it is not possible to apply filters with fixed important problem in the detection of ECG signal.
coefficients to reduce ECG signal noises, because human
behavior is varying from time to time. This problem is Recently, adaptive filters have been widely used in
overcome by Adaptive filter technique. Here we are signal processing [4][5]. The ECG signal denoising
proposing the different types of adaptive filters to using adaptive algorithm is shown in Fig1.
separate the ECG signal from noises like PLI and Base
Line Interference. The MATLAB results of simulations are
presented. In this we have used Improved Recursive Least
Squares (RLS). The ES-RLS algorithm is proposed for
removing different noises preserving the low frequency
components and tiny features of the ECG. It is designed
for the present realization of the input signals. In this
least squares method adapted for real time processing of
temporal series. The Least-squares algorithm minimize
the error from the sum of the squares of the difference Fig 1: Adaptive filter for noise cancellation
between the desired signal and the model filter output
.This process is repeats when new samples of the
incoming signals are received at every iteration. The Here the LMS algorithm works on the principle of
error of the least-squares problem can be computed in weight updates when a new sample is arrived, based
recursive form resulting in the recursive least-squares on updated weight it calculate gradient.
(RLS) algorithms. The Improve RLS algorithms are giving There are some clinical applications where ECG
the fast convergence performance even when the Eigen
value spread of the input signal correlation matrix is signal is very complex to process by LMS algorithm
large. The RLS algorithms have excellent performance with less number of taps. In that case the
when working in time-varying environments as compared conventional LMS algorithm is inefficient. The LMS
to other algorithms. But the RLS algorithms lead an algorithm is converted to NLMS (normalized LMS)
increased computational complexity and some stability
problems, which are not major problems in LMS, NLMS- algorithm by increasing number of taps. Then the
based algorithms. NLMS (normalized LMS) algorithm required more
computations. But these LMS and NLMS algorithms
Key words: ECG Signal, Adaptive Algorithms, PLI, Base are slow in convergence because it depends on input
Line Interferences. signal. However, to improve the convergence speed
I. Introduction: we went to the RLS (Recursive Least-Squares)
ECG signal is one of the biomedical signals, algorithm, whose convergence does not depend on
which are widely studies and applied in clinic. A the input signal, is the fastest of all conventional
normal ECG waveform is usually composed of P adaptive algorithms [10]. The major drawback of the
wave, QRS complexes, and T wave, and the accurate RLS algorithm is its large computational cost.
However, fast (small computational cost) RLS

1
Journal of Electrical Engineering
[Link]

algorithms have been studied recently. In this paper the least mean squared error. The squared error and
we aim to obtain a faster algorithm by incorporating its expected value are (for simplicity of notation and
knowledge of the room impulse response into the perception we drop the dependence of all variables
RLS algorithm. Unlike the NLMS and projection on time n). In the LMS algorithm, however, a very
algorithms, the RLS algorithm does not have a scalar short-term estimate is used by only taking into
step size. Therefore, the variation characteristics of account the current samples. Here, we introduced the
an ECG signal cannot be reflected directly in the „step-size‟ parameter μ, which controls the distance
RLS algorithm. Here, we study the RLS algorithm we move along the error surface. In the LMS
from the viewpoint of the adaptive filter because (a) algorithm the update of the coefficients is performed
the RLS algorithm can be regarded as a special at every time instant „n‟
version of the adaptive filter and (b) each parameter
of the adaptive filter has a physical meaning. ( ) ( ) ( ) ( ) (2)
Computer simulations demonstrate that this
algorithm converges twice as fast as the The „step-size‟ parameter μ introduced in above
conventional algorithm. These characteristics may equation controls how far we move along the error
plays a vital role in biotelemetry, where extraction of function surface at each update step μ certainly has
noise free ECG signal for efficient diagnosis and fast to be chosen μ > 0 (otherwise we would move the
computations, high data transfer rate are needed to coefficient vector in a direction towards larger
avoid overlapping of pulses and to resolve squared error). Closer analysis reveals, that the
ambiguities. To the best of our knowledge, upper bound for μ for stable behavior of the LMS
transform domain has not been considered algorithm depends on the largest eigenvalue of
previously within the context of filtering artifacts in the tap-input auto-correlation matrix R and thus on
ECG signals. In this paper we present an ES-RLS the input signal. For stable adaptation behavior the
(Exponentially weighted step size RLS) algorithm to step-size has to be . The main drawbacks
remove the artifacts from ECG. This algorithm of LMS algorithm are steepest descent properties are
enjoys less computational complexity and good no longer guaranteed and the instantaneous
filtering capability. To study the performance of the estimates allow tracking without redesign.
proposed algorithm to effectively remove the noise
from the ECG signal, we carried out simulations on The NLMS algorithm has been developed based
MIT-BIH database for different artifacts. on Goodwin and Sin demonstration formula from
the constrain optimization problem by the method of
II. The LMS Adaptation Algorithm: Lagrange multipliers, to solve the LMS algorithm
The LMS (least mean squares) algorithm is a drawbacks[9][8]. The NLMS shows improvement
noisy approximation of the steepest descent over the LMS in convergence rate point of view,
algorithm it works on the principle of weight while its steady state performance was considerably
updates when a new sample is arrived, based on worse than the LMS because it needs to add some
updated weight it calculate gradient. The gradient regularization. Never the less, the NLMS is always
calculation is unbiased. The calculation of the the favorable choice of algorithm for fast
gradient is based on sample values of the tap-input convergence speed and for non-stationary input.
vector w(n) where it is random and an error signal.
The algorithm iterates over each coefficient in the ( ) ( ) ( ) ( ) (3)
( ) ( )
filter, moving it in the direction of the approximated
gradient . For the LMS algorithm it is necessary to Theoretically, the step size (α) is varies from 0 to 2
have a reference signal d[n] representing the desired for stable adaptation and, it is always less one unity
filter output. The difference between the reference for NLMS.
signal and the actual output of the transversal filter is
the error signal [12]. III. The RLS Adaptation Algorithm:
Jos
( ) ( ) ( ) ( ) (1) The RLS (recursive least squares) algorithm is
based on a deterministic philosophy. It is designed
The aim of the LMS algorithm is to find a set of for the present realization of the input signals. In this
filter coefficients c that minimizes the expected least squares method adapted for real time
value of the quadratic error signal, i.e., to achieve processing of temporal series. Here the convergence

2
Journal of Electrical Engineering
[Link]

speed is not strongly dependent on the input ( )


( ) , where R is power of the ambient
statistics, i.e. convergence is not affected by the
eigenvalues[10]. noise.
The RLS algorithm calculates autocorrelation matrix Finally we get the following ES-RLS algorithm
of the input vector by using the information from all ( ) ( ) ( ) ( ) (8)
past input samples (and not only from the current ( ) ( )
tap-input samples). A weighting factor is used to And ( ) ( ) ( ) ( )
decrease the influence of input samples from the far
past. However the RLS algorithm can be derived
from the Kalman filter [1] to recursively solve the ( ) ( ) ( ) ( ) ( )
least-squares estimation problem. The impulse
response variation of covariance matrix is given as Where A is step size matrix and Lx L matrix.
When the value A/R is large compared to ( ), the
( ) ( ) ( ) Where 0 < v<1 (4) proportion of ( ) in ( ) becomes small.
In this algorithm, A/R is added to matrix ( ) at
Using a matrix inversion lemma a recursive update every time step „n’. These results in fast
equation for ( ) is convergence approximately double the convergence
rate of normal RLS [11].
( ) ( ) ( ) ( )

With V. Simulation results:


( ) ( )
( ) ( ) ( ) ( )
(5) To show that RLS algorithms are really effective
in critical situations, the method has been validated
using several ECG recordings with a wide variety of
Finally, the weights update equation is wave morphologies from MIT-BIH arrhythmia
database. Here we are taking the ECG signal as a
( ) ( ) ( ) ( ) (6) reference from MIT-BIH database and added the
Real noise Normal Sinus Rhythm Database (NSTDB)
IV. Exponentially weighted step size RLS (ES- shown in Fig 2(a). After Appling this noisy ECG
RLS) algorithm: signal to Non blind Adaptive algorithms like LMS
The ES-RLS algorithm is derived from the and NLMS algorithms we get the denoised ECG
Kalman filter by introducing several assumptions as with in 200 and 90 iterations as output due to the
follows. First, each element of the impulse response updating the weighting coefficients according to
variation h(k) is assumed to be a statistically equations(2) and (3) .The results has shown in
independent random variable. As a result, the shown in Fig.2(b) and Fig.2(c) correspondingly. But
covariance matrix Q(k) of the variation h(k) using the blind adaptive algorithms like RLS and
becomes a diagonal matrix. Then, for the diagonal proposed ES–RLS gives better denoise signal by
component of the matrix Q(k) .The (k), which updating the coefficients according to equation(6)
represents the magnitude of the variation, is assumed and (8) with in 50 and 10 iterations, shown in
to take time-invariant value (k). Fig.2(d) and Fig.2(e) respectively. Hence due to the
Based on these assumptions, we set Q(k) as fast convergence nature of ES-RLS algorithm it
gives the fastest denoisy signal compared to
remaining algorithms. For evaluating the
Q(k)=A= [ ] (7)
performance of the proposed ES-RLS adaptive filter
over existed LMS, NLMS and RLS algorithms
Where = where i=0, 1, 2…L considered the SNR improvement after denoising
- Exponential attenuation ratio of room impulse the signal. The similar results that can be obtained
responses (0 < 1).Elements are time-invariant by applying the different artifacts to original ECG
and decrease exponentially. We introduce ( )by gives the better SNR ratio.
multiplying with a priori coefficient error covariance The ECG signal contaminated with Baseline
matrix ( ) of a filter by 1/R. Wander (BW) noise is applied as primary input to
the adaptive filter of Fig.1. The real BW is given as
reference signal. The simulation results shown in

3
Journal of Electrical Engineering
[Link]

Fig.3 indicate the reduction of BW noise gradually. Fig.3:(a)contaminated ECG signal with Baseline
We use a generated pure ECG signal with Wander,(b)Denoised ECG signal with LMS
electrode motion artifact (EM) added. Where EM is algorithm,(c) Denoised ECG signal with NLMS
taking by a MIT-BIH database. The ECG signal algorithm,(d) Denoised ECG signal with RLS
algorithm(e) Denoised ECG signal with ES-RLS
contaminated with EM is given as input to the algorithm.
adaptive filter. The EM noise is given as reference

Fig.4 (a)contaminated ECG signal with Electrode


Motion,(b)Denoised ECG signal with LMS
Fig.2:(a)Contaminated ECG signal with real noise,(b) algorithm,(c) Denoised ECG signal with NLMS
Denoised ECG signal with LMS algorithm (c) Denoised algorithm,(d) Denoised ECG signal with RLS
ECG signal with NLMS algorithm,(d) Denoised algorithm(e) Denoised ECG signal with ES-RLS
ECG signal with RLS algorithm(e) Denoised ECG algorithm.
signal with ES-RLS algorithm.

Fig.5:(a)contaminated ECG signal with Muscle


Artifacts,(b)Denoised ECG signal with LMS
algorithm,(c) Denoised ECG signal with NLMS

4
Journal of Electrical Engineering
[Link]

algorithm,(d) Denoised ECG signal with RLS interference detection and suppression in ECG
algorithm(e) Denoised ECG signal with ES-RLS signal Processing,” IEEE Trans. Biomed. Eng.,
algorithm. vol.55, pp. 354-357, Jan.2008.
signal. Output of the filter is the required to get [7] N. V. Thakor and Y.-S. Zhu,”Applications of
better resolution ECG signal shown in Fig 4. adaptive filtering to ECG analysis: noise
In order to observe the filtering performance in cancellation and arrhythmia detection,”. IEEE
the presence of non-stationary noise, muscle artifact Transactionson Biomedical Engineering, vol. 38, no.
(MA) was taken from the MIT-BIH Noise Stress 8, pp. 785-794, 1991.
Test Database. These muscle artifacts obscure the [8] Farhang-Boroujeny, B., Adaptive Filters- Theory
ECG and complicate the interpretation of the ECG and Applications, John Wiley and
or even make the interpretation unfeasible. Here the [Link],UK, 1998.
ES-RLS algorithm shows the better results over all [9] P. [Link], G. D. Clifford, L. Tarassenko,
previous algorithms as shown in Fig 5. and L. A. Smith, “A dynamical model for generating
synthetic electrocardiogram signals,” IEEE
VI. Conclusion:
Transactions on Biomedical Engineering, vol. 50,
Hence from the above results our proposed
no.3, pp. 289- 294, 2003.
adaptive algorithm ES-RLS gives the better results
[10] Chinmay Chandrakar, M.K. Kowar,” Denoising
in noise removing from contaminated ECG over
Ecg Signals Using Adaptive Filter Algorithm”
nonblind algorithms like LMS, NLMS and blind
International Journal of Soft Computing and
RLS adaptive algorithms due to the fast convergence
Engineering (IJSCE) ISSN: 2231-2307, Volume-2,
rate. In Our simulations, however, it conforms that
Issue-1, March 2012.
the SNR of the proposed algorithm gives better
[11]Shoji makino,yutaka kaneda,” A new RLS
result over the other algorithms on denoised ECG
algorithm based on the variation charecterisics of
signal as shown in Table 1.
room impulase response” IEEE International
Adaptive SNR for EM SNR for BW SNR for Conference, japan ,1994.
Algorithm Artifact Artifact MA Artifact [12] Y. Murali Krishna, [Link] Khasim and
( in dB) (in dB) ( in dB) [Link] Raja,”Low Complex Adaptive Fast
LMS 5.37 4.68 1.73 Converged Kalman Filter for Cardiac ECG Artifacts
NLMS 5.96 5.96 4.31
Elimination”,International Journal of Signal
RLS 6.04 6.15 5.52
ES-RLS 6.83 7.10 6.45 Processing, Image Processing and Pattern
Recognition, Vol.7, No.3 (2014), pp.283-292.
Table 1: SNR values of denoised ECG under
different Artifacts for various Adaptive Algorithm.

References:
[1] O. Sayadi, M. B. Shamsollahi, “ECG denoising
and compression using a modified extended kalman
filter structure”, IEEE Trans. Biomed. Eng, Vol. 55,
No. 9, pp. 2240-2248, 2008
[2] W. Zhang, T. Ma, L. Ge, “Enhancement of ECG
signals by multiresolution sub band filter”, 2nd
International Conference on Bioinformatics and
Biomedical Engineering, ICBBE 2008, China, 2008
[3] J. Wang, Z. Li, “An ECG segmentation model
used for signal generator”, 2nd International
Conference on Innovative Computing, Information
and Control, ICICIC '07, Japan, 2007
[4] Y. Lu, J. Yan, Y. Yam, “Model-based ECG
denoising using empirical mode decomposition”,
IEEE International Conference on Bioinformatics
and Biomedicine, USA, 2009
[5] Paulo S.R. Denis, "Adaptive filtering Algorithms
and Practical implementation”.
[6] Y. Der Lin and Y. Hen Hu, “Power-line

Common questions

Powered by AI

The LMS algorithm updates its weights based on the new sample received and is known for slow convergence that depends heavily on the input signal properties . NLMS improves upon LMS by adjusting the number of taps and shows better convergence rates; however, it requires higher computation due to its normalization aspects, leading to increased computational complexity . The RLS algorithm offers the fastest convergence independent of the input signal's eigenvalue spread. It computes the autocorrelation matrix using information from all past inputs, which contributes to its computational complexity being higher than LMS and NLMS . While RLS is more computationally intense, it has a higher capacity for quickly adapting to changing signal conditions, making it suitable for real-time ECG signal processing .

Adaptive algorithms like RLS and ES-RLS offer significant advantages in clinical ECG signal processing by effectively removing various noise artifacts while preserving essential signal features. RLS, due to its fast convergence independent of input signal properties, can quickly adapt to changes, allowing real-time processing of ECG data, which is vital for accurate and timely diagnosis . ES-RLS, with its even faster convergence and reduced computational load, enhances this capability, making it suitable for biotelemetry applications that demand high data transfer rates and precise extraction of noise-free ECG signals to minimize diagnostic ambiguities and potential diagnosis errors .

Simulation results indicate that while LMS and NLMS can effectively remove noise from ECG signals, they do so with slower convergence and less improvement in SNR compared to ES-RLS. LMS typically requires around 200 iterations, and NLMS about 90 iterations to achieve denoising, while ES-RLS can achieve similar or better results with only 10 iterations due to its fast convergence . Moreover, ES-RLS consistently produces superior SNR values across various noise types, indicating better performance in preserving signal integrity while minimizing noise interference during the ECG signal processing .

The ES-RLS algorithm incorporates an exponentially weighted step size to the traditional RLS method, which enhances its convergence speed by approximately doubling it compared to normal RLS. This improvement is achieved by adjusting the algorithm to better account for variations in the room impulse response . Additionally, by reducing the computational complexity without sacrificing filtering capability, ES-RLS proves advantageous in biotelemetry applications, where rapid and efficient noise-free ECG signal extraction is crucial to avoid pulse overlap and resolve ambiguities during high data transfer rates .

Integrating the transform domain into the RLS algorithm is significant as it facilitates enhanced filtering of artifacts within ECG signals that are not easily separable in time or frequency domains. The ES-RLS algorithm uses transform domain knowledge to optimize the weighting factor in its recursive updates, allowing for better differentiation between the signal and noise components. By doing so, ES-RLS effectively reduces computational complexity while maintaining robust noise filtering capabilities, essential for accurate ECG signal interpretation . The transform domain approach complements RLS by enabling the algorithm to address variations in both the input and noise characteristics more effectively .

The ES-RLS algorithm addresses the limitations of traditional RLS by improving convergence speed and reducing computational complexity through the use of an exponentially weighted step size, enabling it to more effectively handle the large eigenvalue spread without significant stability issues . The ES-RLS adapts to the variations in room impulse responses more efficiently by introducing a matrix inversion lemma and weighting past inputs, thus permitting fast convergence without compromising algorithmic stability, which are also crucial factors in achieving practical utility in ECG signal processing applications .

In adaptive algorithms like LMS and RLS, eigenvalues of the tap-input autocorrelation matrix significantly influence stability and convergence rates. For LMS, stability and step size adjustments are heavily dependent on the largest eigenvalue, driving slower convergence in the presence of larger eigenvalue spreads . Conversely, RLS doesn't rely heavily on the input eigenvalues for convergence, which allows it to converge faster even in the presence of widely varying input statistics . This independence from eigenvalue constraints makes RLS particularly advantageous for ECG signal denoising, where fast adaptation to signal variability is crucial .

Fast convergence algorithms like ES-RLS are clinically significant in processing non-stationary ECG signals because they enable real-time filtering of noise, which is essential for timely and accurate diagnosis. The ability of ES-RLS to maintain signal integrity while rapidly adapting to noise variations minimizes diagnostic errors and ambiguities that could arise from overlapped or distorted ECG waveforms . This capability is particularly crucial in emergency settings and biotelemetry, where immediate and precise signal interpretation is necessary to make informed clinical decisions, ultimately enhancing patient care outcomes .

The ES-RLS algorithm outperforms LMS and NLMS by providing superior SNR improvements across various ECG artifacts. Specifically, for EM, BW, and MA artifacts, ES-RLS achieves SNR values of 6.83 dB, 7.10 dB, and 6.45 dB, respectively, as compared to the lower SNR values obtained using LMS and NLMS . This enhanced performance is primarily attributed to the ES-RLS algorithm's fast convergence rate and its ability to adaptively adjust to noise characteristics more efficiently than its LMS and NLMS counterparts .

The 'step-size' parameter in LMS and NLMS algorithms directly impacts both convergence speed and stability. In LMS, a smaller step-size results in slower convergence but greater stability, while a larger step-size can hasten convergence but risks instability due to eigenvalue influences of the tap-input matrix . NLMS adjusts this by normalizing the step-size relative to the instantaneous power of the input signal, thereby achieving a balance between convergence speed and stability. This normalization can enhance convergence rates without significantly compromising stability, making NLMS more suitable for processing the dynamic and noisy nature of ECG signals .

You might also like