Comparison and analysis of different ECG denoising methods

With the improvement of medical level, electrocardiogram (ECG) is widely used for disease diagnosis. A lot of pathological and physiological information is contained in the ECG, which can be used to record the point activity of normal human heart and diagnose various heart disease. However, the acquired ECG signals are always contaminated with noise which caused by acquisition equipment or other circumstance. Therefore, Efficient denoising method is very important. In this paper, three typical ECG signal denoising methods are listed, including FIR filtering, wavelet filtering and EMD filtering. In this paper, the principles of the three filtering methods are introduced in detail, and their effects are compared. By comparison, it intuitively shows the processing effects of each method on ECG signals. Meanwhile, a simple Butterworth filter is designed to denoise a standard wave, which represents the logic knowledge related to denoising. It is very significant for the medical signal processing field and help to research more effective signal processing methods.


Introduction
With the progress and development of society, people's lifestyle is constantly improving and the population is aging.Effective prevention and treatment of cardiovascular diseases has become an important problem to be solved in today's society [1].
ECG is a medical technique that uses electrodes to capture the electrophysiological processes of the heart throughout time.The electrical activity of a healthy human heart may be recorded using an ECG, which also provides a wealth of pathological and physiological data that can be utilized to identify different heart conditions.Generally, the electrode of one end of the lead wire used to measure ECG signals is in contact with human skin, and the other end is connected to the positive and negative electrodes of the electrocardiograph.In the electrocardiograph, the ECG signal is converted from analog signal to digital signal and displayed in the form of waveform image, which is called ECG.However, in the process of acquisition, ECG signals often receive various interferences, so ECG signal denoising has long been a focus of medical signal processing research.
Firstly, this paper explores the source of ECG signal, which is caused by the polarization depolarization and repolarization of myocardial cells in human heart [2].Because in the process of ECG signal acquisition, the interference of various noises is inevitable.Therefore, in this paper, three typical ECG signal denoising methods are listed.By comparison, it intuitively shows the processing effects of each method on ECG signals.
After that, a Butterworth filter is designed to denoise a standard signal.This method is also applicable to the above three denoising methods to evaluate the effect of ECG signal processing.The denoised ECG signal can effectively identify arrhythmia symptoms, and to prevention and treatment of cardiovascular diseases [3].

Source of ECF signal
The generation of human ECG signal is due to the change of permeability to potassium, sodium, chlorine and calcium plasma when a particular amount of stimulation is applied to the cell membrane at one end of the cardiac cell (or threshold stimulation), which causes the anion and cation inside and outside the membrane to flow, making the myocardial cell depolarize and repolarize, and in this process, it forms a couple with the neighbouring cell membrane, which is still stationary.This change process can be detected by a certain electrode placed on the body surface.However, there are inevitably some interferences and noises in the process of ECG signal measurement, such as EMG interference (It is the interference caused by the tension of human active muscles, and its frequency range is wide), power frequency interference(a type of interference brought on by the power system and consisting of 50 Hz and its harmonics, which is a kind of interference that must be considered in the process of ECG signal detection and processing, and it is a fixed cheek rate interference with a frequency of 50Hz), environmental noise, etc.Therefore, it's necessary to choose a good ECG signal filtering method.In this paper, three typical ECG signal denoising methods are listed.By comparison, it intuitively shows the processing effects of each method on ECG signals [4].

Introduction.
The unit impulse response of its system is a finite-length sequence.The FIR digital filter's system function is: FIR digital filters have the following characteristics: (1) At a limited number of n values, the system's unit impulse response, h(n), is not zero; (2) The system function H(z) converges at |z|>0, with only one zero point in the finite z plane, all poles at z=0, and only one zero point at |z|>0; (3) Although most structures lack feedback from output to input and are mostly non-recursive, others, like frequency sampling structures, do have the recursive portion of feedback [5].
FIR digital filter design mainly includes Fourier series method, namely commonly used window function method, frequency sampling method and best uniform approximation method [6,7].The frequency characteristics of the filters designed by them are approximations to the given ideal frequency characteristic H(e jω ) in different meanings.

Window function method.
Rectangular window.Rectangular window is a zero-power window of time variable, which is the most widely used window function.The rectangular window has the best frequency identification accuracy and the lowest amplitude identification accuracy, as well as a small main lobe, a wide side lobe, and a negative side lobe.The function of the rectangle window is: Triangle window.Feijie window is another name for the triangle window (Fejer window).It is the first power form of power window, which can be regarded as the convolution of two rectangular windows.
The main lobe of a triangular window is bigger, the side lobes are smaller, and there are no negative side lobes.The function of the triangle window is: Hanning window.Hanning window can be regarded as the sum of the frequency spectrum of three rectangular windows.It is characterized by widening the main lobe, reducing the sidelobe, and decreasing the frequency resolution although the energy leakage is less.The functional formula of Hanning Window is: Taylor window.Taylor window is a kind of weighted window function based on Taylor's formula expansion.Generally, using Taylor series of order 2 ~ 3 to weight Taylor window function can get good results.The characteristic of Taylor window is that it is easy to realize in engineering.Compared with other window function weighting, Taylor weighting can only widen the main lobe slightly to get a lower sidelobe, so Taylor weighting is also a weighting function that is widely used in phased array technology.The expansion form of Taylor's formula is: Blackman window.Blakeman window is a second-order raised chord window, which is characterized by wide main lobe, low sidelobe and poor frequency identification accuracy, but good amplitude identification accuracy and good selectivity.The function of the Blakeman is: Kaiser window.Caesar window is a window function with adjustable shape parameters, which is composed of zero-order Bessel function.Its characteristic is that the ratio of main lobe to sidelobe energy is almost the largest, and the proportion between main lobe width and sidelobe height can be freely adjusted.The function of Caesar's window is: 3.1.3.Frequency characteristics sampling.The frequency sampling method's fundamental goal is to make the frequency characteristics of the designed FIR digital filter at some discrete frequency points exactly equal to the values of the required filter at these frequency points, so that the characteristics at other frequencies can be better approximated.In practice, in order to create a linear phase FIR filter, the sampling value H(k) must meet certain constraints.The unit sampling response function h(n) of a linear phase FIR filter is a real sequence, and it satisfies h(n) = ±h(n-1-n).Finally, H(k) is constrained by the derived amplitude-frequency and phase-frequency characteristics.Sampling the frequency response h of a given ideal filter at equal intervals according to the sampling theorem in frequency domain: Take H d (k) as the sampling value of H(k) namely: The finite length sequence h(n) can be obtained by discrete Fourier transform of H(k): Using the values of N sampling points, H d (e jω ) are obtained by the following formula: Where φ (ω) is an interpolation function, namely: 3.1.4.Best uniform approximation method.From the theoretical point of view of numerical approximation, there are generally three approaches to a function f(x): interpolation, least square approximation and best uniform approximation.
Interpolation means finding an n-order polynomial or triangular multiform p(x) so that it satisfies at n+1 points, x 0 ,x 1 , ... x n : On the non-interpolation point, p(x) is some combination of f(x k ).Of course, there are some errors between p(x) and f(x) at the non-interpolation points.The frequency sampling method can be regarded as an interpolation method, which guarantees that ( ) ( ) .This design method aims at minimizing the total error in the whole interval [a,b], but it does not necessarily guarantee the minimum error in every local position.In fact, in some places, there may be a big error.In the window method, the approximation of ideal frequency characteristics obtained by Fourier series is actually a least square approximation method, which has a large overshoot, that is, Gibbs phenomenon, at the discontinuity.In order to reduce this overshoot and undershoot, the method of adding windows is adopted.Of course, the design method after adding windows is no longer the least square approximation.
The best approximation method is to make the error function E(x)=|p(x)-f(x)| uniform in the required interval [a,b], and to make E(x) get the maximum value e and reach the minimum value by reasonably selecting p(x).Cheshev approximation theory solves a series of problems such as the existence and uniqueness of p(x) and how to construct it.McClellan J.H et al. put forward a design method of FIR digital filter by applying Chebyshev approximation theory.This approach of design is efficient because it makes the best approximation to wavelet transform can realize completely non-redundant signal decomposition.After wavelet transform, the valuable signal's energy is focused on some wavelet coefficients with large amplitude.According to this principle, we can set a threshold to reduce or even set the wavelet coefficients smaller than this reading value to zero, which will attenuate the wavelet coefficients corresponding to noise, thus achieving the purpose of noise elimination [8].

Wavelet transform definition. Continuous wavelet transforms. Set a basic functionψ(t), let
Where a and b are both constants, and a>0.Obviously, ( ) is first translated and then expanded.The wavelet transform of x(t) is defined as the following given the square integrable signal x(t), that is, ( ) ( ) Where a, b and t are continuous variables, where b is time shift, a is scale factor.

( )
 is a collection of operations produced by the mother wavelet after stretching and shifting.Mother wavelet may be a complex or real function.

Let x(t), ( ) ( )
x(t) can be retrieved by its wavelet transform WT x ,(a,b), that is Discrete wavelet transform.The formula (15) defines the continuous wavelet transform of the signal x(t), where a, b and t are continuous variables.In order to realize the wavelet, transform effectively on the computer, t should naturally take discrete values, and a and b should also take discrete values.From the point of view of reducing information redundancy, it is not necessary for a and b to take continuous values.
With a view to minimizing the redundant wavelet transform coefficients, a and b in wavelet basis functions ( ) are taken at some discrete points.One of the most common discrete methods is to discretize the scale by power series (generally take 2) and discretize the displacement.For wavelet sequences with discrete changes in scale and displacement, if a 0 = 2 of discrete grid is taken, it means that continuous wavelet is only binary discrete in scale, but the displacement is still continuous.This kind of wavelet is called binary wavelet, which is expressed as: The continuous wavelet transforms of equation ( 15) for a given signal x(t) may be converted into the wavelet transform shown below on the discrete grid, namely

EMD De-noising method based on EMD
The essence of EMD decomposition is to identify the inherent oscillation patterns in data through the time scale experience of signals or data, and decompose the data based on this.The first step is to observe the data, which can define the local time scale: the time interval determined by the continuous local maximum and minimum or the time interval determined by the local zero crossing.However, due to the data superposition, the high-frequency signal is superimposed on the low-frequency signal to become riding wave, and the disturbance of riding wave cannot be detected at the zero-crossing point, so defining the time scale by the local zero-crossing point has strong limitations.Therefore, the time scale between extreme values must be adopted to define the time scale of inherent mode components.In this way, it not only provides fine division of oscillation modes, but also can be used for non-zero mean data [9,10].

Implementation and Evaluation of Digital Signal Processing Methods
In the third section, this paper introduces several denoising methods for ECG signals.Another filter (Butterworth filter) is designed in the fourth section [11].By means of simulation, a standard wave is used to fully simulate the ECG denoising process through MATLAB.At the same time, the error analysis and evaluation of the design results are carried out.The realization of standard wave can still be used for the above three signal denoising methods.

Result
Results of eliminating power frequency interference is shown in figure 2-5. Figure 2 shows the ECG signal after adding 50Hz power frequency noise, figure 3 shows the ECG spectrum after adding 50Hz power frequency noise, figure 4 shows the ECG signal after noise removal and figure 5 shows the ECG spectrum after noise removal.

Conclusion
Through the above research, this paper gets the following conclusions: Although the FIR filter is easy to realize and can obtain linear phase, if the baseline drift with low frequency is to be eliminated and other components of ECG signal are to be kept, the length of the filter must be increased, which significantly increases the amount of calculation and is unable to handle real-time processing demands.Greatly increases the amount of calculation and cannot meet the requirements of real-time processing.The wavelet threshold denoising technique is straightforward in concept and efficient, and it is the basis of other wavelet denoising methods later.EMD-based ECG signal denoising algorithm has stronger adaptability and better denoising effect.
Then, in the fourth chapter of this paper, a simple Butterworth filter is designed to denoise a standard wave.Although it looks very simply, what it represents behind it is the logic knowledge related to denoising, and it is also applicable to ECG signal processing as well as complex denoising methods.
With the continuous development and innovation of modern signal processing theory, it is very significant for the medical signal processing field to analyze the above-mentioned signal processing methods and help to research more effective signal processing methods.
ω k , while H(e jω ) is a linear combination of interpolation functions S(ω,k) at non-sampling points, and its weight is( ) k j e H  .The disadvantage of this design method is that the edges of passband and stopband are not easily determined accurately.The least square approximation is to minimize the integral interval[a,b]

 1 .
in a consistent sense, thus obtaining better passband and stopband performance, and can accurately specify the edges of passband and stopband.Principal.Wavelet transform can well remove the correlation between signals, and orthogonal

,
and uniformly sample B to realize the discretization of A and B, and get the result:

Figure 1 .
Figure 1.Index of amplitude-frequency characteristic.The index of amplitude-frequency characteristic of digital filter Indicator description is shown in figure 1. ω p : Pass-band cutoff frequency, passband frequency range:0 ≤ ω ≤ω p ; ω S : Stop-band cutoff frequency, stopband frequency range:ω s ≤ ω ≤π; ω c : 3dB cutoff frequency; α p : Maximum attenuation of passband; α s : Minimum attenuation of stop band ; δ 1 : Error range of amplitude response in passband; δ 2 : Error range of amplitude response in stopband The step is as follow: (1) Convert analog frequency to digital frequency; (2) Estimated order N; (3) Estimated 3dB cut-off frequency; (4) According to the estimated parameters, the normalized poles of the over-simulated low-pass filter are designed; (5) Transform Ha(s) into Ha(z) by bilinear transformation.