ecg signals denoising and features extraction by applying

6
2019 16th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE), Mexico City, Mexico. September 11-13, 2019 ECG Signals Denoising and Features Extraction by Applying UFIR Smoothing with Optimal q -Lag in the State Space. Carlos Lastre-Dom´ ınguez, Yuriy S. Shmaliy, Oscar Ibarra-Manzano, Sandra M´ arquez-Figueroa, Karen Uribe-Murcia Department of Electronics Engineering Universidad de Guanajuato Salamanca, 36885, M´ exico Email: {cm.lastredominguez}{shmaliy}{ibarrao}{s.marquez}{karen.uribe}@ugto.mx Abstract—The medical sector requires efficient applications for the extraction of features in ECG signals. This is required to detect diseases and abnormalities presented in the heart. Some works consider filters based on the wavelet transform as a standard technique. Here, we develop an unbiased finite impulse response filter in the state space for ECG signals with optimal q- lag which outperforms to wavelet-based filter techniques. Where several simulations are compared using different types of mother wavelets with Gaussian white noise with the UFIR filter. The experiments are based on the MIT-BIH database using records in normal and atrial fibrillation condition. Also, UFIR smoothing is applied to remove motion in ECG signals caused by arti- facts. Finally, temporal features extraction of the ECG signals expressed by normalized histograms is performed. According to the criteria of the gold standard, the results provided by the UFIR filter demonstrate a significant separation between studied pathologies. Index Terms—ECG signals, atrial fibrillation, unbiased finite impulse response (FIR), smoothing, denoising, features extraction I. I NTRODUCTION The electrocardiogram (ECG) signals carry essential infor- mation for making decisions about different kinds of heart diseases. Studies of ECG signals implement different strategies aimed at increasing the accuracy of the heartbeat features extraction [1], [2]. But, it is still challenging to reach good results due to the measurement noise and artifacts induced by the data acquisition equipment [3]. In last decades, many algorithms have been designed to analyse and extract fiducial features of ECG signals [4], [5] and obtain information about morphological ECG signals. The morphological features rep- resent the fiducial points: P wave, QRS complex, and T wave and the algorithms are applied to extract these features from noisy data [6], [7] and solve medical issues. In the literature, methods for denoising and features extraction in ECG signals have been applied. Approaches build on wavelets transform provides better results respecting the trade off between frequency and time. This is achievable as long as the appropriate wavelet function is applied. Other works have been evaluated using machine learning techniques. In general, the features extraction process in ECG signals entails to rigorous studies. This is because the attached noise in ECG signals. In particular, a powerful technique build on smoothing filter is appropriated because it reduces the noise keeping the fundamental properties in the ECG signals. Specifically, the technique developed by Savitsky and Golay is the most approaches used for smoothing signals. This is show in many works. But, this smoothing approach just works with a lag that represent middle of the horizon. A general method general is known as p-shift unbiased finite impulse response (UFIR) filtering developed by Shmaliy et al. It provides smoothing at the middle of the averaging hori- zon. A more general solution is known is the p-shift unbiased finite impulse response (UFIR) filtering developed by Shmaliy et al. [8], [9]. This approach implies that lag q = -p> 0 must be selected for each degree individually and not obligatorily at the middle of the horizon to provide the best denoising effect. It provides smoothing filtering by p< 0, filtering by p =0, and predictive filtering by p> 0. There were also designed the optimal Savitsky-Golay filters for smoothing with the minimum mean square error (MSE) [10], [11]. A drawback of the batch p-shift UFIR filter is in its slow operation, computational burden, and complexity in features extraction. A more efficient solution can be found if to replace the batch form with a fast iterative algorithm. For p-shift UFIR filtering, the discrete-time state-space iterative Kalman- like algorithm has been originally proposed by Shmaliy in [8] and then developed and applied with different purposes in many papers [12], [13]. Particularly, our investigation is based on the MIT-BIH Arrhythmia Database. In Section II, a modelling for the ECG signal in space state and batch and iterative unbiased FIR Filters are described.In addition, we discuss about optimally of horizon and q-lag for the ECG signals. In Section III, we explain the temporal features extraction process. In Section IV, An evaluation of denoising and features extraction is performed between the UFIR smoothing, wavlets fiters, and Savitky/Golay smoother 978-1-7281-4840-3/19/$31.00 ©2019 IEEE

Upload: others

Post on 15-Mar-2022

16 views

Category:

Documents


0 download

TRANSCRIPT

2019 16th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE), Mexico City,Mexico. September 11-13, 2019

ECG Signals Denoising and Features Extraction byApplying UFIR Smoothing with Optimal q-Lag in

the State Space.Carlos Lastre-Domınguez, Yuriy S. Shmaliy, Oscar Ibarra-Manzano, Sandra Marquez-Figueroa,

Karen Uribe-MurciaDepartment of Electronics Engineering

Universidad de GuanajuatoSalamanca, 36885, Mexico

Email: {cm.lastredominguez} {shmaliy} {ibarrao} {s.marquez}{karen.uribe}@ugto.mx

Abstract—The medical sector requires efficient applicationsfor the extraction of features in ECG signals. This is requiredto detect diseases and abnormalities presented in the heart.Some works consider filters based on the wavelet transform as astandard technique. Here, we develop an unbiased finite impulseresponse filter in the state space for ECG signals with optimal q-lag which outperforms to wavelet-based filter techniques. Whereseveral simulations are compared using different types of motherwavelets with Gaussian white noise with the UFIR filter. Theexperiments are based on the MIT-BIH database using recordsin normal and atrial fibrillation condition. Also, UFIR smoothingis applied to remove motion in ECG signals caused by arti-facts. Finally, temporal features extraction of the ECG signalsexpressed by normalized histograms is performed. According tothe criteria of the gold standard, the results provided by theUFIR filter demonstrate a significant separation between studiedpathologies.

Index Terms—ECG signals, atrial fibrillation, unbiased finiteimpulse response (FIR), smoothing, denoising, features extraction

I. INTRODUCTION

The electrocardiogram (ECG) signals carry essential infor-mation for making decisions about different kinds of heartdiseases. Studies of ECG signals implement different strategiesaimed at increasing the accuracy of the heartbeat featuresextraction [1], [2]. But, it is still challenging to reach goodresults due to the measurement noise and artifacts inducedby the data acquisition equipment [3]. In last decades, manyalgorithms have been designed to analyse and extract fiducialfeatures of ECG signals [4], [5] and obtain information aboutmorphological ECG signals. The morphological features rep-resent the fiducial points: P wave, QRS complex, and T waveand the algorithms are applied to extract these features fromnoisy data [6], [7] and solve medical issues. In the literature,methods for denoising and features extraction in ECG signalshave been applied.

Approaches build on wavelets transform provides betterresults respecting the trade off between frequency and time.This is achievable as long as the appropriate wavelet functionis applied.

Other works have been evaluated using machine learningtechniques. In general, the features extraction process in ECGsignals entails to rigorous studies. This is because the attachednoise in ECG signals. In particular, a powerful technique buildon smoothing filter is appropriated because it reduces thenoise keeping the fundamental properties in the ECG signals.Specifically, the technique developed by Savitsky and Golay isthe most approaches used for smoothing signals. This is showin many works. But, this smoothing approach just works witha lag that represent middle of the horizon. A general methodgeneral is known as p−shift unbiased finite impulse response(UFIR) filtering developed by Shmaliy et al.

It provides smoothing at the middle of the averaging hori-zon. A more general solution is known is the p−shift unbiasedfinite impulse response (UFIR) filtering developed by Shmaliyet al. [8], [9]. This approach implies that lag q = −p > 0 mustbe selected for each degree individually and not obligatorilyat the middle of the horizon to provide the best denoisingeffect. It provides smoothing filtering by p < 0, filtering byp = 0, and predictive filtering by p > 0. There were alsodesigned the optimal Savitsky-Golay filters for smoothing withthe minimum mean square error (MSE) [10], [11].

A drawback of the batch p-shift UFIR filter is in its slowoperation, computational burden, and complexity in featuresextraction. A more efficient solution can be found if to replacethe batch form with a fast iterative algorithm. For p-shiftUFIR filtering, the discrete-time state-space iterative Kalman-like algorithm has been originally proposed by Shmaliy in[8] and then developed and applied with different purposes inmany papers [12], [13]. Particularly, our investigation is basedon the MIT-BIH Arrhythmia Database.

In Section II, a modelling for the ECG signal in space stateand batch and iterative unbiased FIR Filters are described.Inaddition, we discuss about optimally of horizon and q-lagfor the ECG signals. In Section III, we explain the temporalfeatures extraction process. In Section IV, An evaluation ofdenoising and features extraction is performed between theUFIR smoothing, wavlets fiters, and Savitky/Golay smoother

978-1-7281-4840-3/19/$31.00 ©2019 IEEE

2019 16th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE), Mexico City,Mexico. September 11-13, 2019

and finally, some conclusions are described about this inves-tigation in Section V.

A. Morphological Features of ECG Signals

A heartbeat or electrocardiogram complex contains differentwaves divided among themselves by distinct intervals (see fig.1.) [14], [15] . The P-wave is the first, this wave representsthe depolarization in both, atrial right and left. Generally, theP-wave amplitude larger is registered in LII(Lead II ), whichthis does not surpass the 2, 5 mm (according to the ECG paper) and its duration is not most than 0.1 seconds. The QRScomplex is located after P-wave and represents the ventriculardepolarization. This complex is composed by Q, R and Spoints (may be called waves). Normally, the duration of QRScomplex is between 0.06 and 0.10 seconds. and varies withheart rate (cardiac frequency) by being smaller in children.The T-wave begins in the isophasic line and can adopt severalforms such as: tall, pointed, flattened, inverted or biphasic.The T waves varies considerably its length, but, habituallythey measure most 2 mm of high being positive in all theleads, excepts in aVR which is negative.

Pon Poff Ton ToffQ S

T

P

R

S(i)

i

P-wave

T-wave

QRScomplex

Fig. 1. Features of a heartbeat pulse represented with durations and ampli-tudes.

II. MODELLING OF ECG SIGNALS IN DISCRETE-TIMESTATE-SPACE, BATCH AND ITERATIVE UNBIASED

UNBIASED FIR FILTERING

In [16] is demonstrated that ECG signals may be modelledin the state space. Also, a degree polynomial representation isdescribed as batch UFIR filter.

A. ECG Signal in State-Space

Let be to consider the expressions 1 and 2 an ECG signalsrepresentation in the state space. Here, it is Considered a time-invariant deterministic system with noisy measurement anddiscrete-time index n.

xn = Axn−1 , (1)yn = Cxn + vn , (2)

where, xn ∈ RK is the system state vector, yn is the scalarobservation or measurement, vn is the measurement noise,An ∈ RK×K is the Taylor series represented by system matrix

A =

1 τ τ2

2 . . . τK−1

(K−1)!

0 1 τ . . . τK−2

(K−2)!

0 0 1 . . . τK−3

(K−3)!

......

.... . .

...0 0 0 . . . 1

, (3)

Cn ∈ R1×K is the observation matrix given by C =[ 1 0 · · · 0 ]T , and vn is a measurement that represents the noisewith zero mean and unknown distribution and statistics.

B. Iterative unbiased FIR Smoothing Filtering of ECG Signals

An pseudo code listed as algorithm is developed for ECGsignals. Here the horizon N is adaptive horizon Napt. Thishorizon is related with optimal and minimum horizon (Noptand Napt) described in [17].

In general, this filter is similar to the Kalman algorithm.Here two steps: predict and update are expressed. In [12], adepth description and comparison is made with different filtersare performed. Here, a brief explication of algorithm is madeconsidering the important variables. Firstly, the expression 4is the prior state estimate:

x−l = Axl−1 (4)

taking account recursion the update of generalized noisepower gain (GNPG) is made.

Gl = [CTC+ (AGl−1AT )−1]−1 (5)

A residual measurement is computed by

zl = yl −Cx−l , (6)

Here, it is achieved the bias correction Kl = GlCT , and

the state estimate is provided by

xl = x−l +Klzl . (7)

When l = n, this algorithm finish the compilation.

C. Optimally of Horizon and q-lag

1) Optimal Horizon: Minimizing the trace of the derivativeof the mean square measurement residual value (MSV) matrixV(N we achieve the best accuracy with Algorithm 1 if N =Nopt. The methodology proposed in [18] is applied to findthe optimal horizon Nopt which it is considered the equationfollowing,

Nopt = argminN

∂ trV(N)

∂N+ 1 (8)

even, a solution to the optimization issue is suggestedin [19], Here, a proposed algorithm finds the suitable Nopt

2019 16th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE), Mexico City,Mexico. September 11-13, 2019

Algorithm 1 Iterative UFIR Smoothing Filtering Algorithmfor ECG SignalsData: yn , N=Napt

Result: x1: Begin :2: for n = N − 1, N, ... do3: m = n−N + 1, s = n−N +K4: Gs = (Hm,sHm,s)

−1

5: xs= Gs(HTm,sYm,s)

6: for l = s+ 1 to n do7: x−

l =Axl−1

8: Gl = [CTC+ (AGl−1AT )−1]−1

9: Kl = GlCT

10: xl = x−l + Kl(yl −Cx−

l )11: end for12: xn=xn13: xn−q=A−qxn14: end for

for ECG signals. This has also been presented by Latre-Dominguez et. al for real database with optimal horizonNopt = 21, 2-degree approximation polynomial correspondingto the K = 3 state-space model.

2) Optimal q-lag: Optimal lag qopt must be taken from themiddle of an optimal averaging horizon of Nopt points. Thisis fulfilled for odd-order polynomial UFIR smoothers.

In this specific case qopt is given as

qopt =

⌊Nopt − 1

2

⌋, (9)

where bxc means the floor of x, i.e. the largest integer lessthan or equal to x.

For even-order polynomials , [9] suggests that lag qopt mustbe given by

qopt =Nopt − 1

2− 1

2

√N2

opt + 1

5. (10)

In this sense, let us notice that even though the Savit-sky/Golay smoother [20] was derived from a different perspec-tive. Unlike to the method proposed in [16], this smoothingpresents a optimal q-lag.

D. Validation

Briefly, the validation considers standard filter techniquessuch as wavelet transform. Initially, the wavelet filter conceptis related with the discrete wavelet transform (DWT). TheWavelet transform carries out a correlation process, thus theoutput is expected to be maximal when the input signal mostlike the mother wavelet. The denoising process using thewavelet transform begins choosing the wavelet mother andnumber of decomposition, here is considered the input signal.Given the different decompositions, a threshold process isperformed which that is shrinking coefficients by hard and soft

threshold performed in the wavelet domain. Finally, the ouputsignal is Reconstructed from DWT coefficients estimated bythreshold process. In this work, the Daubechies (dB4,dB5),Symlet (Sym4) and bior (bior 2.2) wavelets, mother label 3for proposes of comparison.

III. TEMPORAL FEATURES EXTRACTION

In general, the features extraction process stars with theelimination of the artefacts, this is achieved applying thealgorithm 1 on a large horizon N � Nopt (see Fig. 2).Removed the artefacts, the annotations of arrhytmia MIT-BIHdatabase are considered to detect the QRS-complex. Detectedthe QRS complex, easily can located the R-peak. Taking 100samples to the left and 200 samples to right the segmentationis create such as shown in fig. 1. Segmented the ECG signal,the algorithm 1 is applied considering the horizon length Nopt

and Napt, which are specified in [17].

500 1000 1500 2000 2500 3000 3500 4000 4500 5000

Samples

-2

-1.5

-1

-0.5

Am

pli

tud

e

ECG signal with artifacts

500 1000 1500 2000 2500 3000 3500 4000 4500 5000

Samples

-0.8

-0.6

-0.4

-0.2

0

0.2

Am

pli

tud

e

ECG signal without artifacts Base line

(a)

(b)

Changescaused by the

motion ofartifacts

Fig. 2. Removing the artifacts by applying UFIR smoothing: (a) ECG signalwith motion artifacts and (b) ECG signals without motion artifacts under abase line equal to zero

A. Fiducial Points Detection and Features Extraction process

As can see in Fig. 3, the UFIR smoother provides theestimation of the ECG signal three states: 1) the de-noisedECG signal, 2) the time derivative of the de-noised signal, and3) the second time derivative of the de-noised signal. Giventhe three states, fundamental information of P-wave, QRS-complex and T-wave, which is used to estimate the fiducialpoints: Pon as estimate of Pon, P as estimate of P-peak, Poff

as estimate of Poff , Q as estimate of Q, R as estimate of R-peak, S as estimate of S, Ton as estimate of Ton, T as estimateof T-peak, and Toff as estimate of Toff . These points are usedfor the features extraction:

2019 16th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE), Mexico City,Mexico. September 11-13, 2019

for the P wave

Pdur = Poff − Pon , (11)Pamp = P− S(Pon) , (12)

for the QRS-complex as

QRSdur = S− Q , (13)QRSamp = R− S(Q) , (14)

and for the T-wave by

Tdur = Toff − Ton , (15)Tamp = T− S(Ton) . (16)

Am

plt

ud

e

Samples

0

Am

pli

tud

e

PmaxPmin

Zero-CrossZero-Cross

QRSmax

QRSmin

Tmax

Tmin

Zero-Cross

R

P PT

Q S

P-wave

QRScomplex

T-wave

Samples

( )a

(b)

Am

pli

tud

e

0

Samples(c)

Pmin

QRSmin

Tmin

Zero-Cross

ZeroCross

ZeroCross

ZeroCross

ZeroCross

ZeroCross

^

onPoff

ToffTon

S(i)

S(i)

S(i)

i

i

i

Fig. 3. Fiducial features of a single heartbeat extracted along with the spacialpoints in state space using the UFIR approach: (a) first state, (b) second state,and (c) third state.

IV. TESTING OF THE ITERATIVE UFIR ALGORITHM ANDFEATURES EXTRACTION FOR ECG SIGNALS

A. Iterative UFIR Algorithm Testing

We represent the system and measurement matrices as,respectively,

A =

1 τ τ2

20 1 τ0 0 1

, C = [ 1 0 0 ] , (17)

Here, a discrete time-step τ = 1/f is due to the samplingfrequency of f = 360Hz given by DataBase MIT-BIHArrhythmia. the augmented measurement matrix (6) becomes

Hm,s =

CA−2

CA−1

C

(18)

consequently, we compared performances of the UFIRsmoother relying on qopt (17) and (18) and different wavelet-based filters. To test estimators, we generated a signal s(n) =sin(n) + cos(n) corrupted by an additive zero mean whiteGaussian noise (WGN) having the variance σ2 = 0.0625and depicted the results in Fig. 4. As can be seen, the UFIR

0 100 200 300 400 500 600

Samples

-2

-1.5

-1

-0.5

0

0.5

1

1.5

Am

pli

tude

Signal

Signal + noise

q-lag 1

q-lag 2

db4

db5

sym2

bior2.2

360 370 380

1

1.2

1.4

1.6

1.8

Signal

Signal + noise

q-lag 1

q-lag 2

db4

db5

sym2

bior2.2

Fig. 4. Denoising of a test sinusoid signal (solid) corrupted by additivezero mean WGN using the UFIR smoother (dash-dotted) with lag q2 (10)and (dotted) with lag q1 (9) and Daubechies wavelet-based smoothers: db4(dashed), db5 (double-dash dotted) and sym4 (solid-dotted), and bior2.2(solid).

smoother with qopt (10) is most successful in accuracy, sinceits estimate ranges most close to the generated signal. The rootmean square errors (RMSEs) computed over 100 iterationsare shown in Fig. 5. As can see in Fig. 5, all wavelet-basedfilters produce much larger errors than the UFIR smoothersirrespective of the wavelet chosen. Analysing the smootherused, the UFIR two performs better due to the optimal lag(10). Different to stated by Savitsky and Golay, this experimentevidences the fact that a lag must be selected optimally for alleven-order smoothers.

In the figure 6 all methods works with considerable per-formance. However, in the first time derivative (see 7) thesmoothers based on UFIR achieve a signal with less variability.

B. Evaluation of Temporal Features extraction

Provided estimates of the ECG signal three states, wenext conduct accurate features extraction following the abovediscusses scheme, in which relations (11) and (12) are used toextract features of the P-wave, (13) and (14) are exploitedto compute the QRS-complex duration and amplitude, and(15) and (16) are used to extract features of the T-wave. The

2019 16th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE), Mexico City,Mexico. September 11-13, 2019

100

101

102

Iterations

0

0.002

0.004

0.006

0.008

0.01

0.012

0.014E

rror

UFIR q1

UFIR q2

db4

db5

sym4

bior2.2

UFIR q1

UFIR q2

Wavelet Filters

Fig. 5. RMSEs corresponding to Fig. 4 and computed over 100 iterations:UFIR smoother with lag q2 (9) (dash-dotted) and lag q2 (10) (dotted), db4(dashed), db5 (dash-dotted), sym2 (solid-dotted), and bior2.2 (solid).

0 50 100 150 200 250

Samples

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

1.2

Am

pli

tude

Measurement

UFIR q1

UFIR q2

db4

db5

sym4

bior2.2

90 95

1

1.2

80 90 100

-0.2

-0.18

-0.16

-0.14

-0.12

Measurement

UFIR q1

UFIR q2

db4

db5

sym4

bior2.2

30 40

0.04

0.06

0.08

0.1

Measurement

UFIR q1

UFIR q2

db4

db5

sym4

bior2.2

Fig. 6. ECG signal denoising by the UFIR smoother with lag q1 (9)(dotted) and lag q2 (10) (dash-dotted) and Daubechies wavelet-based filtes:db4 (dashed) and db5 (double-dash dotted), other mother wavelet such assym4 (solid-dotted), and bior2.2 (solid).

extracted features of different durations are exhibited in Fig.8 All features extracted are supplied with expert annotations[1], [15], [21] represented with upper and lower bounds of theconfidence interval corresponding to the probability of 95%and high performance of fiducial points, which we consideras a ‘gold standard.’ Specifically, Fig. 8 sketches the extractedduration DurP of the P-wave, DurQRS of the QRS-complex,and DurT of the T-wave. What can instantly be noticedis a considerable difference between estimates provided bythe UFIR smoother and wavelet-based filters in favor of theformer.

The estimates provided by the UFIR smoother and wavelet-based filter essentially differ from one another for the P andT wave, while for the QRS-complex they are very consistent.

0 50 100 150 200 250

Samples

-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

0.4

Am

pli

tude

UFIR q1

UFIR q2

db4

db5

sym4

bior2.2

150 160

-5

0

5

1010

-3

35 40 45

-0.02

0

0.02

UFIR q1

UFIR q2

db4

db5

sym4

bior2.2

Fig. 7. Estimates of the second state (first time-derivative) provided by theSavitsky/Golay smoother with lag q1 (9) (dotted), UFIR smoother with lag q2(10) (dash-dotted), and Daubechies wavelet-based filters such as db4 (dashed)and db5 (dash-dotted) and other mother wavelets such as sym4 (solid-dotted),and bior2.2 (solid).

0 100 200 300 400 500 600 700 800 900 1000

Heart Beats

0.05

0.1

0.15

0.2

Du

r P

db5 sym4 UFIR q1 UFIR q2 Inf Limit Reference Inf Limit

0 100 200 300 400 500 600 700 800 900 1000

Heart Beats

0.2

0.4

0.6

Du

r QR

S

0 100 200 300 400 500 600 700 800 900 1000

Heart Beats

0

0.1

0.2

Du

r T

430 435 4400.05

0.1

Fig. 8. Extracted features of different durations: (a) Durp of the P-wave,(b) DurQRS of the QRS-complex, and (c) DurT of the T-wave. Expertannotations (gold standard) [15] are represented with the upper and lowerbounds (solid lines) along with an expected average.

C. Determination of abnormalities in ECG Signals

As an example of applications, we now extract features ofthe P-wave related to records with normal rhythm and atrialfibrillation and illustrate the results obtained using the waveletfilter with sym4 in Fig. 8 and using the UFIR smoother in Fig.6.

The following observations follow from an analysis of thisfigure (Fig. 9), the wavelet filter produce features out of theconfidence intervals for normal conditions which it is difficultto determine the health state of the records. the UFIR smooth-ing provides features within of range (confidence interval)for healthy conditions, this representation is clear and allows

2019 16th International Conference on Electrical Engineering, Computing Science and Automatic Control (CCE), Mexico City,Mexico. September 11-13, 2019

Fig. 9. Features of the P-wave duration extracted using a db4 wavelet-basedfilter from the AF and Normal ECG of MIT-BIH Arrhythmia Database: (a)Durp features from db4 wavelet, (b) Durp normalized histogram from db4wavelet, (c) Durp features from UFIR smoothing , and (d) Durp normalizedhistogram from UFIR smoothing.

a considerable discrimination between normal and abnormalrecords. In this experiment, we have used different ECG fromMIT-BIH arrhythmia. Specifically, the records 100/mitdb and219/mitdb were used.

V. CONCLUSIONS

In this paper, a state-space UFIR smoothing approach isdeveloped for ECG signal denoising and features extraction.Here we have demonstrated better results than two stan-dard methods employing Savitsky/Golay and wavelet-basedfiltering. That has become possible by designing an adaptiveUFIR smoothing algorithm operating with an optimal lag onoptimal averaging horizons. An applications given for the P-wave features extraction based on the detected fiducial points,has shown a potential of the approach in a comparison withwavelet-based filters. Therefore, as future work, we considera further improvement of the approach to be robust againstdifferent artefacts.

ACKNOWLEDGMENT

We gratefully acknowledge the support and development ofthis research from the National Council for Science and Tech-nology (Conacyt: Consejo Nacional de Ciencia y Tecnologıa)of the Mexican Federal Government.

REFERENCES

[1] I. Beraza and I. Romero, “Comparative study of algorithms for ECGsegmentation,” Biomedical Signal Processing and Control, vol. 34, pp.166–173, 2017.

[2] M. Yochum, C. Renaud, and S. Jacquir, “Automatic detection of P, QRSand T patterns in 12 leads ECG signal based on CWT,” BiomedicalSignal Processing and Control, vol. 25, pp. 46–52, 2016.

[3] M. Bahoura, M. Hassani, and M. Hubin, “DSP implementation ofwavelet transform for real time ECG waveforms detection and heartrate analysis,” Comput. Meth. Progr. Biomed., vol. 52, no. 2, pp. 35–44,1997.

[4] J. S. Arteaga Falconi, H. Al Osman, and A. El Saddik, “ECG Authenti-cation for Mobile Devices,” IEEE Trans. Instrum. Meas., vol. 65, no. 3,pp. 591–600, 2016.

[5] M. Sansone, A. Fratini, M. Cesarelli, P. Bifulco, A. Pepino, M. Romano,F. Gargiulo, and C. Sansone, “Influence of QT correction on temporaland amplitude features for human identification via ECG,” in IEEEWorkshop on Biometric Measurements and Systems for Security andMedical Applications, BioMS - Proceedings, 2013, pp. 22–27.

[6] L. Biel, O. Pettersson, L. Philipson, and P. Wide, “ECG analysis: anew approach in human identification,” IEEE Trans. Instrum and Meas.,vol. 50, no. 3, pp. 808–812, 2001.

[7] W. Lu, H. Hou, and J. Chu, “Feature fusion for imbalanced ECG dataanalysis,” Biomedical Signal Processing and Control, vol. 41, pp. 152–160, 2018.

[8] Y. S. Shmaliy and O. Ibarra-Manzano, “Optimal and unbiased FIRfiltering in discrete time state space with smoothing and predictiveproperties,” EURASIP Journal on Advances in Signal Processing, vol.2012, no. 1, p. 163, 2012.

[9] Y. S. Shmaliy and L. J. Morales-Mendoza, “FIR smoothing of discrete-time polynomial signals in state space,” IEEE Trans. Signal Process.,vol. 58, no. 5, pp. 2544–2555, 2010.

[10] S. Hargittai, “Savitzky-Golay least-squares polynomial filters in ECGsignal processing,” Computers in Cardiology, vol. 32, pp. 763–766,2005.

[11] S. R. Krishnan and C. S. Seelamantula, “On the selection of optimumSavitzky-Golay filters,” IEEE Trans. Signal Process., vol. 61, no. 2, pp.380–391, 2013.

[12] Y. S. Shmaliy, S. Zhao, and C. K. I. Ahn, “Unbiased FIR filtering:an iterative alternative to Kalman filtering ignoring noise and initialconditions,” IEEE Control Systems Magazine, vol. 37, no. October, pp.70–89, 2017.

[13] Y. S. Shmaliy, Y. Neuvo, and S. Khan, “Review of Unbiased FIR Filters, Smoothers , and Predictors for Polynomial Signals,” Frontiers in SignalProcessing, vol. 2, no. 1, pp. 1–29, 2018.

[14] S. A. Goldberger AL, Goldberger ZD, Goldberger’s clinical electro-cardiography: a simplified approach. Philadelphia: Elsevier, 8th ed.,,2013.

[15] P. W. Mac, A. V. Oosterom, O. Pahlm, P. Klifield, M. Janse, andJ. Camm, Comprehensive Electrocardiology. London: Springer London,2010.

[16] C. Lastre-Dominguez, Y. S. Shmaliy, O. Ibarra-Manzano, M. Vazquez-Olguin, and J. Munoz-Minjarez, “ECG Signals Denoising in StateSpace using UFIR Filtering for Features Extraction,” in 2018 15thInternational Conference on Electrical Engineering, Computing Scienceand Automatic Control, CCE 2018, 2018.

[17] C. Lastre-Domınguez, Y. S. Shmaliy, O. Ibarra-Manzano, J. Munoz-Minjares, and L. J. Morales-Mendoza, “ECG Signal Denoising andFeatures Extraction Using Unbiased FIR Smoothing,” BioMed ResearchInternational, vol. 2019, pp. 1–16, 2019.

[18] F. Ramirez-Echeverria, A. Sarr, and Y. S. Shmaliy, “Optimal memoryfor discrete-time FIR filters in state-space,” IEEE Trans. Signal Process.,vol. 62, no. 3, pp. 557–561, 2014.

[19] C. Lastre Dominguez, Y. S. Shmaliy, O. Ibarra Manzano, and L. J.Morales Mendoza, “Unbiased FIR denoising of ECG signals,” in 14thInternational Conference on Electrical Engineering, Computing Scienceand Automatic Control (CCE). IEEE, oct 2017, pp. 1–6.

[20] A. Savitzky and M. J. E. Golay, “Smoothing and differentiation of databy simplified least squares procedures.” Analytical Chemistry, vol. 36,no. 8, pp. 1627–1639, 1964.

[21] E. J. d. S. Luz, W. R. Schwartz, G. Camara-Chavez, and D. Menotti,“ECG-based heartbeat classification for arrhythmia detection: A survey,”Computer Methods and Programs in Biomedicine, vol. 127, pp. 144–164, 2016.