Home > Engineering essays > Polynomial Approximation Of Ecg Signal

Essay: Polynomial Approximation Of Ecg Signal

Essay details and download:

  • Subject area(s): Engineering essays
  • Reading time: 9 minutes
  • Price: Free download
  • Published: 7 June 2012*
  • Last Modified: 23 July 2024
  • File format: Text
  • Words: 2,406 (approx)
  • Number of pages: 10 (approx)

Text preview of this essay:

This page of the essay has 2,406 words.

Polynomial Approximation Of Ecg Signal

Abstract’ECG (Electrocardiogram) originated due to depolarization and repolarization of heart generates massive volume of digital data. One hour of ECG signal requires 1 GB of memory. So, ECG signals needs to be compressed for efficient transmission and storage purpose. This paper proposes a technique to denoise and then approximate ECG signal. The proposed method achieves 0.037 MSRE and 42.59 dB SNR in denoising the ECG. Polynomial of order 31 can be used to successfully approximate ECG segments.
Keywords’ ECG, SNR, moving average, PRD, MSE, etc.
I. INTRODUCTION
The ECG represents the electrical activity of the heart and already provides a lot of essential information to physicians for diagnosis of heart diseases. Fig.1 shows a simple ECG model characterized by a number of waves P, QRS, T, U related to the heart activity. These waves are the result of contraction and expansion of the heart muscles. The P wave is due to the depolarization of atria whereas QRS complex reflects the rapid depolarization of right and left ventricles [2]. The T-wave represents the repolarisation (or recovery) of the ventricles. The QRS complex is a major wave in each ECG beat since the duration, the amplitude, and the morphology are used for cardiac arrhythmias, conduction abnormalities, ventricular hypertrophy, myocardial infarction, etc [1] [2].
While recording ECG in a clinical environment it is usually contaminated by power line interference, EMG (electromyogram) signal cause due to high frequency signal related to muscle activity. These recordings are critically often contaminated by cardiac artifact [3]. Baseline wander elimination (a low frequency signal caused mainly by the breathing action) is considered as a classical problem. It is considered as an artifact which produces atrifactual data when measuring the ECG parameters, especially the ST segment measures are strongly affected by this wandering. In most of the ECG recordings the respiration, electrode impedance change due to perspiration and increased body movements are the main causes of the baseline wandering, the electrode motion is usually represented by a sharp variation of the baseline.

Fig 1: ECG signal (Google source)
This corrupted noise prevents considerably the accurate analysis of the ECG signal and useful information extraction [4]. Many researchers have worked on development of methods for reduction of baseline wander noise. Zahoor-uddin, presented Baseline Wandering Removal from Human Electrocardiogram Signal using Projection Pursuit Gradient Ascent Algorithm & showed the comparative study of the results of different algorithms like Kalman filter, cubic spline [5]. Manpreet Kaur et al in 2011 has compare the performance of different filtering methods for baseline removal from ecg signal. [6].Mahesh S. Chavan et al in 2008 compared the results of Butterwoth filter and Elliptic filter for the suppression of Baseline and Powerline interferences [7]. Ch. Renumadhavi et al find SNR which is used as a performance indicator for the comparison of filters and ECG has been developed [8]. V.S. Chouhan and S.P. Mehta in [9] developed an algorithm for total removal of Baseline drift from ECG signal & deploy least square error correction & median based correction.
Signal reconstruction and compression is an issue of vital importance in signal storage and transformation. Many techniques have been proposed in this field, such as Fourier transforms (FT), discrete cosines transform (DCT) and Wavelet transforms. The main difference among these methods is the basis functions used. The most common basis function is the polynomial basis. The Polynomials are just about the simplest mathematical functions that exist, requiring only multiplications and additions for their evaluation. Yet they also have the flexibility to represent very general nonlinear relationships. Polynomials are frequently used in signal processing; e.g., for filtering noisy signals [15], for interpolation of data [16], and for data compression [17]. All these applications use low-order polynomials (e.g., degree 2-5) to approximate a signal on a small interval.
Polynomials of maximum degree 3, including splines functions have been proposed for ECG interpolation in [26] and [27]. The representation of ECG signals using second degree quadratic polynomials is studied by Nygaard et al in [28]. When using cubic splines or quadratic polynomials for ECG compression, the signal should be pre-processed in order to extract some particular points such as extrema, zero crossing and inflexion points that could be used as the interpolation nodes. High degrees Legendre polynomials were used for ECG data compression in [29] Generalized Jacobi polynomials are tested for ECG compression in [30]. On the contrary, this paper is concerned with the approximation of a signal by a high-degree polynomial on a large interval. Similar techniques use expansions in terms of sine and cosine (Fourier descriptors [18] and discrete cosine transform [19]), sampled square waves [20], Hermite functions [21] and principal components [22] [23]. As far as the authors know, the use of high-degree polynomials has not been studied extensively. High degree polynomial approximations of a signal is similar to spectral methods since the signal is decomposed into a set of orthogonal polynomials basic functions, the same way do Fourier Transform (with trigonometric functions) and Wavelets Transform (with wavelets).

II. METHODOLOGY
In this paper, work is organized as follows. Section A presents preprocessing stage for denoising ECG signal using moving average filter. Section B performs polynomial approximation on segments of denoised ECG signal.
A. Moving average
One of the most common tools for smoothing data is the MOVING AVERAGE filter, often used to try to capture important trends in repeated statistical surveys. The approach that is known as a type of Finite Impulse Response (FIR) filter is applied to a set of data points by creating an average of different subsets of the full data set[10]-[12]. The moving average is the most common filter in DSP, mainly because it is the easiest digital filter to understand and use. In spite of its simplicity, the moving average filter is optimal for a common task:reducing random noise while retaining a sharp step response. This makes it the premier filter for time domain encoded signals. However, the moving average is the worst filter for frequency domain encoded signals, with little ability to separate one band of frequencies from another. Relatives of the moving average filter include the Gaussian, Blackman, and multiple-pass moving average [11]. These have slightly better performance in the frequency domain, at the expense of increased computation time. A subset of fixed size obtained from sample values in a given signal by taking their average, the moving average is obtained. Then this subset is shifted forward an element in the given signal. First element in subset is deleted whereas adding a next element to the end of the subset of the given signal. The new subset has the same size as previous one and it is averaged again [12] [13]. Same process is repeated over the entire signal. In this paper moving average is defined for samples as follows:
Suppose sm = {xm,xm+1,’.,xN+(m-1)} is a subset of sample values in an ECG signal S = {x1,x2, x3,’.,xm,…. } and the fixed size of the subset is N . Then, a new series of {A1, A2,…Am,..} is called the moving average of S which is obtained by the following calculation[14]:
(1)

Algorithm

Step 1. Choose a proper size N of the subset si = {xm, xm+1,’.,xN+(m-1) in a given signal S .

Step 2. Calculate the average of every N sample values to obtain the moving average.

Step 3. Maintain the same length, create series of {A1, A2,…Am,..} of signal S.

The testing criteria for denoising method performance in this paper consist of Signal to Noise Ratio (SNR) and Mean Square Relative Error (MSRE).
Basically signal to noise ratio (SNR) is an engineering term for the power ratio between a signal and noise. It is expressed in terms of the logarithmic decibel scale.

(2)
Where
Asignal: Root mean square amplitude of the signal.
Anoise: Root mean square amplitude of the noise.

Suppose that Y is a response variable and Y’ is a predictor of Y that is a function of a single predictor variable X. In ordinary predictions, we obtain Y’ by estimating the conditional mean of a response given predictor value, E(Y /X), because it minimizes the expected squared loss, E {(Y ‘ Y’) 2 /X}, which is Mean Squared Error (MSE). However, when Y > 0, it will often be that the ratio of prediction error to the response level, (Y ‘ Y’)/Y, is of prime interest: the expected squared relative loss,
MSRE=E [{(Y ‘ Y’)/Y} 2/X] (3)

Which is Mean Squared Relative Error (MSRE), is to be minimized [14].

Fig 2: Noisy signal from MIT -BIH ANSI/ AAMI EC13 and denoised ECG signal.

B. Polynomial Approximation
Given a set of n + 1 data points (xi, yi) where no two xi are the same, for a polynomial p of degree at most n with the property.
(4)

Suppose that the interpolation polynomial is in the form
(5)
The statement that p interpolates the data points means that
for all (6)
If we substitute equation (1) in here, we get a system of linear equations in the coefficients . The system in matrix-vector form reads

We have to solve this system for to construct the interpolate p(x). The matrix on the left is commonly referred to as a Vander monde matrix. Equation (8) in term of Lagrange polynomials:
(8)
When interpolating a given function f by a polynomial of degree n at the nodes x0,…,xn we get the error

(9)
where

is the notation for divided differences.
If f is n + 1 times continuously differentiable on a closed interval I and be a polynomial of degree at most n that interpolates f at n + 1 distinct points {xi} (i=0,1,…,n) in that interval. Then for each x in the interval there exists in that interval such that
(10)
The trigonometric form of the Chebyshev polynomials of first kind is given by
for (11)

the Chebyshev polynomials satisfy
= 1,
= x,
= 2×2 ‘ 1,
. . .
= 2x ‘ , n ‘ 1.
changes sign (and has a zero) n times in the interval of interest. The zeros of the nth order Chebyshev polynomial occur at

(12)

The Chebyshev polynomials also have the property of bounded variation. The local maxima and minima of Chebyshev polynomials on [‘1, 1] are exactly equal to 1 and ‘1, respectively, regardless of the order of the polynomial. It is this property which makes them valuable for minimax approximation. In fact, an excellent approximation to the nth order minimax polynomial on an interval can be obtained by finding the polynomial that satisfies = f (x) at the zeros of the (n+ 1)th order Chebyshev polynomial[28] [29].
A minimax approximation is a method which aims to find an approximation such that the maximum error is minimized. Suppose we seek to approximate the function f(x) by a function p(x) on the interval [a,b]. Then a minimax approximation algorithm will aim to find a function p(x) to minimize[28]

Algorithms:
Step 1. Construct the function of p(x) for N samples of segment of ECG signal.
Step 2. Decide order of n for approximation.
Step 3.Find Chebyshev points xj.
Step 4.Calculate coefficient and create polynomial p(x).
Step 5.Calculate error.
Reconstructed segments of ECG signal are tested on the basis of PRD and MSE.
Let and be the original and the reconstructed
signals, respectively, and N its length. The PRD formula is
defined as:
(13)
And, for mean square error (MSE) of an estimator is one of many ways to quantify the difference between values implied by an estimator and the true values of the quantity being estimated. If is a vector of n predictions, and is the vector of the true values, then the (estimated) MSE of the predictor is:
(14)
Fig 3: Polynomial Approximation on segments of one cardiac cycle of ECG signal.

III. RESULT AND DISCUSSION
An ECG signal is not linear, rather more curvaceous consisting of waves of various shapes. Many author uses SNR as an objective method to analyze the performance of ECG denoising methods. Such as IIR and FIR zero phase filtering gives 12.708 and 11.679 SNR value [6]. Similarly wavelet and polynomial fitting is used for noise removal purpose provide 11.689 and 11.16 SNR value which is greater than moving average 10.989 SNR value [6]. Hamming Low Pass filter and LMS adaptive filter gives better SNR value (i.e. 21.6521, 22.5268) than Moving average gives 12.4004 SNR value [8].
As shown in fig 2 noisy signal is rough in nature. After denoising signal from moving average method produce smooth ECG signal. Signal to Noise ratio and MRSE being calculated against a subset of the MIT-BIH ANSI/AAMI Database. The optimal numerical experimental results for the subset of this standard database are summarized in Table 1.
TABLE I. SNR AND MSRE CALCULATION OF DENOISED SIGNAL.
Database SNR(dB) MSRE
aami3am 42.5410 0.0375
aami3bm 42.5495 0.0375
aami3cm 42.4939 0.0375
aami3dm 42.5085 0.0375
aami4a_dm 42.5622 0.0374
aami4a_hm 42.5916 0.0373
aami4am 42.5717 0.0373
aami4b_dm 42.5623 0.0374
aami4b_dm 42.5921 0.0373
aam4bm 42.5720 0.0373

Approximation of more complicated functions by polynomials is a basic building block for a great many numerical techniques.
There are two distinct purposes to which polynomial approximation is put in statistics. The first is to model a nonlinear relationship between a response variable and an explanatory variable (Non- linear Regression; Polynomial Regression). The response is usually measured with error, and the interest is on the shape of the fitted curved and perhaps also on the fitted polynomial coefficients context. The second purpose is to approximate a difficult to evaluate function, such as a density or a distribution function, with the aim of fast evaluation on a computer. Here, there is no interest in the polynomial curve itself. Rather, the interest is on how closely the polynomial can follow the special function, and especially on how small the maximum error can be made. Very high order polynomials may be used here if they provide accurate approximations [17] [21] [28]. Very often, a function is not approximated directly, but is first transformed or standardized so as to make it more amenable to polynomial approximation. Polynomial approximation is relatively straightforward and good enough for many purposes [17]. After performing polynomial approximation on segments of ECG signal, PRD and MSE are calculated over it. As shown in table II that PRD and MSE for each segment is low.
TABLE II. CALCULATION OF PRD AND MSE FOR SEGMENTS OF ECG SIGNAL
Segment Degree of polynomial PRD MSE
I. 31 0.0159 0.1086
II. 12 0.0204 0.1802
III. 21 0.0144 0.0907
IV. 5 0.0227 0.2235
V. 5 0.0268 0.3144
VI. 10 0.0299 0.3908
VII. 7 0.0113 0.0553
VIII. 8 0.0131 0.0736
IX. 7 0.0149 0.0947
X. 6 0.0236 0.2383
XI. 7 0.0139 0.0839
XII. 8 0.0198 0.1685

IV. CONCLUSION
In this paper, moving averaging-based filtration and polynomial approximation is presented. The novel method to provide better filtration gives better SNR and MRSE value. And polynomial approximation is done which provide low PRD and MSE for segments of ECG signal. According to the various papers studied during research, it can be concluded that filtering through moving average permits relatively fewer calculations and better SNR, in comparison with most existing method. For polynomial approximation, increasing the degree of polynomial will reduce the error further.

About this essay:

If you use part of this page in your own work, you need to provide a citation, as follows:

Essay Sauce, Polynomial Approximation Of Ecg Signal. Available from:<https://www.essaysauce.com/engineering-essays/polynomial-approximation/> [Accessed 21-04-26].

These Engineering essays have been submitted to us by students in order to help you with your studies.

* This essay may have been previously published on EssaySauce.com and/or Essay.uk.com at an earlier date than indicated.