scieee Open visual document viewer

Single-Feature Method for Fast Atrial Fibrillation Detection in ECG Signals

Šaclová, Lucie; Němcová, Andrea; Smíšek, Radovan; Smital, Lukáš; Vítek, Martin

Abstract

Atrial fibrillation (AF) is the most common arrhthmia in adults and is associated with higher risk of heart failure or death. Here, we introduce simple and efficient method for automatic AF detection based on symbolic dynamics and Shannon entropy. This method comprises of three parts. Firstly, QRS complex detection is provided, than the raw RR sequence is transformed into a sequence of specific symbols and subsequently into a word sequence and finally, Shannon entropy of the word sequence is calculated. According to the value of Shannon entropy, it is decided, whether AF is present in the current cardiac beat. We achieved sensitivity Se=96.32% and specificity Sp=98.61 on MIT-BIH Atrial Fibrillation database, Se=91.30% and Sp=90.80% on MIT-BIH Arrhythmia database, Se=95.6% and Sp=80.27% for CinC Challenge database 2020. The achieved results of our one-feature method are comparable with other authors of more complicated and computationally expensive methods.

Full text

Single-Fea u e Me hod o Fas A ial Fib illa ion De ec ion in ECG Signals Lucie Ma sano a1, And ea Nemco a1, Rado an Smisek1,2, Ma in Vi ek1, Lukas Smi al1 1 Depa men o Biomedical Enginee ing, B no Uni e si y o Technology, B no, Czech Republic 2 Academy o Sciences, B no, Czech Republic Abs ac A ial ib illa ion (AF) is he mos common a hy hmia in adul s and is associa ed wi h a highe isk o hea ailu e o dea h. He e, we in oduce simple and e icien me hod o au oma ic AF de ec ion based on symbolic dynamics and Shannon en opy. This me hod comp ises o h ee pa s. Fi s ly, QRS complex de ec ion is p o ided, han he aw RR sequence is ans o med in o a sequence o speci ic symbols and subsequen ly in o a wo d sequence and inally, Shannon en opy o he wo d sequence is calcula ed. Acco ding o he alue o Shannon en opy, i is decided, whe he AF is p esen in he cu en ca diac bea . We achie ed sensi i i y Se=96.32% and speci ici y Sp=98.61% on MIT-BIH A ial Fib illa ion da abase, Se=91.30% and Sp=90.8% on MIT-BIH A hy hmia da abase, Se=95.6% and Sp=80.27% o Long Te m A ial Fib illa ion da abase and Se=93.04% and Sp=87.30% o CinC Challenge da abase 2020. The achie ed esul s o ou one- ea u e me hod a e compa able wi h o he au ho s o mo e complica ed and compu a ionally expensi e me hods. Ou ECG expe s ound ha public da abases con ain e o s in anno a ions (in sense o AF). I means ha esul s a e a ec ed by e o s in anno a ions. Many e o s we e ound in Long-Te m AF da abase, se e al also in MIT-BIH AF da abase and MIT-BIH A hy hmia da abase. Tes ing algo i hms on poo ly anno a ed da abases canno b ing eliable esul s and algo i hms use ul in eal medical p ac ice. The examples o such anno a ions a e epo ed in his s udy. 1. In oduc ion Ca dio ascula diso de s a e s ill he mos common cause o dea h wo ldwide. Due o he ease o use, non- in asi eness and cheapness, elec oca diog am (ECG) is nowadays s ill he mos a ailable and widely used me hod o he ca dio ascula sys em examina ion [1]. A ial ib illa ion (AF) is he mos common a hy hmia in adul s and is associa ed wi h a highe isk o hea ailu e o dea h. AF is a sup a en icula achya hy hmia which is ep esen ed by incons an a ial ac i a ion and, he e o e, dys egula ion o a ial con ac ions. This cause uncomple ed blood ans e om a ia o en icles and dec ease he e iciency o hea unc ioning. This can esul in se ious complica ions such as ischemia, s oke, o ea ly mo ali y [1]. The e o e, ea ly de ec ion o AF is c ucial o e ec i e ea men . Au oma ic de ec ion o AF in ECG is s ill p oblema ic, as was shown by he esul s o p e ious s udies. He e, we in oduce simple and e icien me hod o au oma ic AF de ec ion based on symbolic dynamics and Shannon en opy. 2. Me hod This me hod comp ises o h ee pa s. Fi s ly, QRS complex de ec ion is p o ided by de ec o based on phaso ans o m, and sequence o RR in e als is compu ed. In he second pa , he aw RR sequence is ans o med in o a sequence o speci ic symbols and subsequen ly in o a wo d sequence. Finally, Shannon en opy o he wo d sequence is calcula ed. Acco ding o he alue o Shannon en opy, i is decided, whe he AF is p esen in he cu en ca diac bea . 2.1. QRS complex de ec ion Fi s ly, signal is il e ed by bandpass il e wi h cu -o equencies 12 and 19 Hz. In his equency ange lies he mos o QRS complex ene gy. Using his il e supp esses P and T wa es and also high equency a i ac s. On he o he hand, QRS complexes a e highligh ed. A e ha , phaso ans o m (PT) is applied. PT ans o ms each sample o he signal in o a complex alue p ese ing he signal in o ma ion [2]. Con e ing each ECG sample in o a phaso enhances changes in he ECG signal ( he wa es). The deg ee wi h which ECG wa es a e enhanced in phaso signal is de e mined by alue RV. The alue o RV is always wi hin he in e al 0-1. A cons an alue RV is conside ed as a eal pa , whe eas he imagina y componen is he o iginal alue o he ECG sample: 𝑦(𝑛)= 𝑅𝑉+𝑗𝑥(𝑛), (1) whe e y(n) is he phaso ial signal and x(n) is he o iginal sample o signal. The magni ude M(n) is compu ed as 𝑀(𝑛)= √𝑅𝑉 2+𝑥(𝑛)2, (2) and phase (phaso ) 𝜑(𝑛) is compu ed as 𝜑(𝑛)= 𝑡𝑎𝑛−1 (𝑥(𝑛) 𝑅𝑉). (3) Compu ing in Ca diology 2020; Vol 47 Page 1 ISSN: 2325-887X DOI: 10.22489/CinC.2020.335 In phaso signal 𝜑(𝑛), he QRS complexes ha e in all cases highe ampli ude han he o he ECG componen s. This applies also in a case o o iginal ECG signals wi h smalle ampli ude o QRS complex han T wa e. Due o his ac , he QRS complexes in phaso signal a e easie de ec able [2]. In he case o QRS de ec ion, phaso ans o m o ECG signal wi h RV = 0.001 is pe o med. The example o phaso ans o m (g ey cu e) o ECG signal (black cu e) p epa ed o QRS de ec ion is in Fig. 1. Than we sea ch o maxima in sliding window wi h 300 ms size. The nex s ep is a check, whe eas he ound maxima a e highe han used adap i e h eshold. A he end i is checked, whe he he in e al be ween wo subsequen QRS complexes (RR in e al) is 1.75x highe han p e ious one. I i is accomplished, backwa d sea ching is pe o med. This de ec o was used and es ed also in ou p e ious s udies [3], [4], [5]. The example o phaso ans o m o ECG signal is shown in Fig. 1. In phaso signal 𝜑(𝑛), he QRS complexes ha e in all cases highe ampli ude han he o he ECG componen s. This applies also in a case o o iginal ECG signals wi h smalle ampli ude o QRS complex han T. Figu e 1 An example o (a) an o iginal ECG signal; (b) phase signal φ(n); (c) de ail o he op pa o he phase signal (illus a ed by ed box in (b)), he g een line ep esen s he h eshold o QRS de ec ion. [3] 2.2. Symbolic dynamic and Shannon en opy The pu pose o using symbolic dynamics (symbols and wo ds) is o desc ibe he dynamic o hea a e. Du ing a ial ib illa ion, high a iabili y o RR in e als is p esen and hus also high alue o Shannon en opy [6]. Fi s ly, hea a e h (n) is de i ed om RR in e als (RR(n)). RR(n) a e compu ed om leng h wo consecu i e hea bea s (R(n)). The sequence o aw RR in e als is ans o med in o he hea a e (h (n)) acco ding o he eg. (4) and hen quan i ied in o symbol sequence (Sy(n)) [6] acco ding o he equa ion (4) ℎ𝑟(𝑛)=60/𝑅𝑅(𝑛), (4) 𝑆𝑦(𝑛)= { 63 𝑖𝑓 ℎ𝑟(𝑛)>315 ⌊ℎ𝑟(𝑛) 5⌋ 𝑜𝑡ℎ𝑒𝑟 , (5) The sequence o symbols Sy(n) ep esen ins an aneous s a e o hea a e ans o med in o he 64 possible symbols. To acili a e he analysis o Sy(n) is used 3-symbol empla e o examina ion o en opic p ope ies o sequence. This ans o ma ion is compu ed acco ding o he eg. (6) and a e ha we ob ain sequence o wo d (w (n)) [7]. Each wo d akes in o accoun 3 successi e symbols (3 hea bea s). 𝑤𝑣(𝑛)=(𝑠𝑦(𝑛 −2).212)+(𝑠𝑦(𝑛 −1).26)+ 𝑠𝑦(𝑛), (6) Finally, Shannon en opy (SH) is compu ed (7). SH is a s a is ical ool ha quan i ies a ime se ies (in ou case leng h o hea bea s) in e ms o he in o ma ion size [8]. A i s , we de ine he disc e e p obabili y space o a dynamic sys em as A = (A|P). A ep esen se o cha ac e is ic elemen s A = {a1, · · · , ak}, and P = {p1, · · · , pk}(1≤ k ≤N) is ele an p obabili y. Each elemen a(i) has p obabili y p(i) = N(i)/N (0<p(i)<1,∑𝑘 𝑖=1 𝑝(𝑖)= 1 whe e N is numbe o all elemen in A and N(i) is o al numbe o elemen a(i) in A. Thus, he SH o A is de ined as [26], 𝑆𝐻(𝐴)= − 𝑘 𝑁.𝑙𝑜𝑔2∑𝑘 𝑖=1 𝑝(𝑖)𝑙𝑜𝑔2𝑝(𝑖) (7) In ou wo k, he dynamic sys em A consis s o 95 consecu i e wo d elemen s om w (n-47) o w (n+47). The alue o SH lies in in e al <0,1>. I means ha on compu ing o SH o R(n) is needed in o ma ion o RR(n) o 95 consecu i e hea bea s. Acco ding o he alue o SH is de e mined i a ial ib illa ion is p esen o no in ac ual hea bea s. In ou wo k, we ound ha he bes h eshold he alue o disc imina ion be ween AF and non AF is T=0.733. In Figu e 2 p ocess o classi ica ion is illus a ed. Subg aph b) shows alues o Shannon en opy ans o med om leng h o RR in e als and also h eshold (blue line) o decision o p esence o a ial ib illa ion (o e line) o o he hy hm (below line). I is clea isible ha alue o Shannon en opy co ela ed wi h anno a ion o a ial ib illa ion c) ( alue 1 ep esen s AF, alue 0 ep esen s no AF). Page 2 Figu e 2 a) Leng h o RR in e als, b) Shannon en opy o RR in e als – blue line is eeshold o decision o p esence AF, c) annno a ion – alue 1 ep esen s AF, 0 ep esen s nonAF 3. Resul s We used ou publicly a ailable da abases o es ing o ou algo i hm. The esul s a e summa ized in Table 1. The exac alues o ue posi i e (TP), ue nega i e (TN), alse posi i e (FP), alse nega i e (FN) a e epo ed in Table 2. We achie ed sensi i i y Se=96.32% and speci ici y Sp=98.61% on MIT-BIH A ial Fib illa ion da abase, Se=91.30% and Sp=90.80% on MIT-BIH A hy hmia da abase, Se=95.6% and Sp=80.27% o Long Te m A ial Fib illa ion da abase and Se=93.04% and Sp=87.30% o CinC Challenge da abase 2020. Table 1 The pe o mance o AF de ec ion algo i hm signals om MIT- BIH a hy hmia da abase, MIT-BIH a ial ib illa ion da abase, CinC chalange da abase (1s ed) and Long e m a ial ib illa ion da abase (Se – sensi i i y; PP – posi i e p edic i i y). Da abase SE [%] PP [%] MIT-BIH AF 96,32 98,61 MIT-BIH AR 98,42 90,78 CinC Ch. (1s ed) 93,04 87,30 Long Te m AF 95,60 80,27 Table 2 The alues o ue posi i e (TP), ue nega i e (TN), alse posi i e (FP), alse nega i e (FN) hea bea s o AF de ec ion algo i hm on signals om MIT-BIH a hy hmia da abase, MIT-BIH a ial ib illa ion da abase, CinC chalange da abase (1s ed) and Long e m a ial ib illa ion da abase. Da abase TP TN FP FN MIT-BIH AF 80964655 12502921 5 1764240 3093610 MIT-BIH AR 2891746 23887217 2424716 46321 CinC Ch. 1s ed) 1145 4908 76 748 Long Te m AF 43758987 2 28439682 5 6990500 3 2014541 9 The achie ed esul s o ou one- ea u e me hod a e compa able wi h o he au ho s o mo e complica ed and compu a ionally expensi e me hods [9], [10]. Fas a simplici y o ou me hod is use ul o example in applica ion whe e he ime is limi a ion and also o mobile de ices, whe e he low compu a ional complexi y is impo an . Biosignals p ocessing is nowadays an ac ual opic. In Figu e 3, examples o e o s caused by ou de ec ion algo i hm, a e shown. The blue lines indica e anno a ion om da abase, g een lines indica e ou esul s, alue 1 indica es AF, alue 0 indica es nonAF. In a) is shown mis ake caused by ea lie e mina ion AF o ou de ec o – p obably due o he ac , ha SH is compu ed om 95 RR in e als and ollowing RR in e als wi hou AF dec eased alue o SH. These mis akes o inaccu a e e mina ion and beginning o AF is ela i ely equen . In b) is shown ha ou de ec o poin ed o he le pa o he signal, whe e sup a en icula a hy hmia is p esen , as a ial ib illa ion, p obably due o he ac o highe a iabili y o RR in e als caused by his ype o a hy hmia as wi h AF is also p esen . Figu e 3 Examples o e o s caused by ou de ec ion algo i hm (blue line – anno a ion, g een line - ou esul , 1-AF, 0-nonAF), a) signal 100 om Long e m a ial ib illa ion da abase, b) signal 05261 om MIT-BIH a ial ib illa ion da abase. 4. Discu ions Du ing ou wo k, ou ECG expe s made a e y impo an inding. Public da abases con ain many e o s in anno a ions (in sense o AF) and also in o he pa hologies. I means ha esul s o all au ho s, who used hese da abases, a e a ec ed by e o s in anno a ions. Many e o s we e ound in Long-Te m AF, se e al also in MIT- BIH AF da abase and also in MIT-BIH A hy hmia da abase. Tes ing algo i hms on poo ly anno a ed da abases canno b ing eliable esul s and algo i hms Page 3 use ul in eal medical p ac ice. The examples o such anno a ions a e epo ed in Figu e 4. In he le pa o subg aph a) is p esen AF, bu in anno a ion om da abase (blue line) is no ma ked (signal no. 05261 om MIT-BIH a ial ib illa ion da abase), co ec anno a ion is ma ked by ed line. In subg aph b) is p esen AF all he ime, bu acco ding o he anno a ion is i no ue. The pa o he signal whe e he ex asys oles a e, is no ma ked as AF. Figu e 4 Examples o e o s in anno a ion o AF (blue - anno a ion in da abase, ed - co ec anno a ion, , 1-AF, 0- nonAF); a) signal 05261 om MIT-BIH a ial ib illa ion da abase, b) signal 100 om Long e m a ial ib illa ion da abase. 5. Conclusion In his wo k, highly e icien single ea u e algo i hm o a ial ib illa ion is p oposed. The achie ed esul s o ou one- ea u e me hod a e compa able wi h o he au ho s o mo e complica ed and compu a ionally expensi e me hods [9], [10]. Fas a simplici y o ou me hod is use ul o example in applica ion whe e he ime is limi a ion and also o mobile de ices, whe e he low compu a ional complexi y is impo an . In addi ion, ou ECG expe s ound ha in o en used es ing da abases o ECG signals a e e o s in anno a ion (in sense o AF) and also in o he pa hologies. Tes ing algo i hms on poo ly anno a ed da abases canno b ing eliable esul s and algo i hms use ul in eal medical p ac ice. The e is a place o hei co ec ion o c ea ion o new ones. Acknowledgmen s This wo k has been unded by he Uni ed S a es O ice o Na al Resea ch (ONR) Global, awa d numbe N62909-19- 1-2006. Re e ences [1] B. F. Kusumo o, “ECG in e p e a ion: om pa hophysiology o clinical applica ion,” Sp inge , pp. 107, 2009. [2] A. Ma ínez, R. Alca az, J.J. Rie a, “Applica ion o he phaso ans o m o au oma ic delinea ion o single- lead ECG iducial poin s,” Physiological Measu emen 31, pp. 1467-85, 2011. [3] L. Ma šáno á, e al., “Au oma ic de ec ion o P wa e in ECG du ing en icula ex asys oles,” P oceedings o he Wo ld Cong ess on Medical Physics and Biomedical Enginee ing, pp. 381-85, 2018. [4] L. Ma šáno á, A. Němco á, R. Smíšek, e al., “Ad anced P wa e de ec ion in ECG signals du ing pa hology: E alua ion in Di e en A hy hmia Con ex s,” Scien i ic Repo , no. 9, 2019. [5] L. Ma šáno á, e al., “Au oma ic de ec ion o P wa e in ECG du ing en icula ex asys oles,” Wo ld Cong ess on Medical Physics and Biomedical Enginee ing 2018, IFMBE P oceedings, pp. 381-385, 2018. [6] X. Zhou, e al., “A Real-Time A ial ib illa ion de ec ion algo i hm based on he ins an aneous s a e o hea a e,” PLoS ONE, ol. 10, no. 9, 2015. [7] X. Zhou, e al., “Au oma ic online de ec ion o a ial ib illa ion based on symbolic dynamics and Shannon en opy”, BioMedical Enginee ing OnLine, ol. 13 no. 1, 2014. [8] A. A dala, e al., “Au oma ic De ec ion o a ial ib illa ion using basic Shannon en opy o RR In e al ea u e,” Jou nal o Physics: Con e ence Se ies, ol. 795, 2017. [9] Y. Li, X. Tang, A. Wang,. e al., P obabili y densi y dis ibu ion o del a RR in e als: a no el me hod o he de ec ion o a ial ib illa ion. Aus alas Phys Eng Sci Med, ol. 40, pp. 707–716, 2017. [10] M. Lown, e al., Machine lea ning de ec ion o a ial ib illa ion using wea able echnology, PLoS ONE, ol. 15, no. 1, 2020. Add ess o co espondence: Ing. Lucie Ma šáno á Depa men o Biomedical Enginee ing Facul y o Elec ical Enginee ing and Communica ion B no Uni e si y o Technology Technická 12 B no 616 00 Czech Republic. [email p o ec ed] Page 4