arrhythmia classification in long-term data using relative ... · heart beats of 54 long-term ecgs...

4
Arrhythmia Classification in Long-Term Data Using Relative RR Intervals Marcus Vollmer Institute of Bioinformatics, University Medicine Greifswald, Germany Abstract Background: The automated heart beat detection and the classification of arrhythmic beats from ECG recordings are difficult tasks. Even thoroughly annotated standard databases have a wealth of misplaced heart beats and a visual identification of all affected ECG parts is time-consuming. The study of relative RR intervals can help in this regard. Methods & Results: Relative RR intervals are defined as the change of two successive RR intervals weighted by their mean. I have analyzed the return maps of relative RR intervals of the Normal Sinus Rhythm Database as well as the MIT-BIH Arrhythmia Database. Different structures have been investigated analytically and are reproducible due to modeling. I am able to distinguish structures re- garding arrhythmia types and cases of insufficient heart beat detection. Upon that approach, I have developed fil- tering criteria of artifacts from RR interval sequences. Utilization: The return map of relative RR intervals can be used as visualization technique for the detection of arrhythmia types or failures in the automated beat detec- tion. Further, it can be used to apply filtering criteria for the removal of irregular heart beats in RR interval data or to improve heart beat detection algorithms by applying a more sensitive method in the effected parts. This may help to distinguish irregular beats from false positive alarms caused by interference effects, possibly in postprocessing routines. 1. Introduction RR intervals are the differences of successive heart beats (R-peaks) in an ECG as the result of an automated heart beat detection. Besides the computation of the heart rate, RR intervals are mainly used for the quantification of heart rate variability (HRV) [1]. The geometry and the dynam- ics of the return map of RR intervals (Poincar´ e plot) has been studied by [2] and [3] for example. Currently some conventional mobile monitoring systems (e.g. Polar sports watches) are able to save RR intervals or the heart rate as a processed information. Due to limited resources and the absence of the need, the storage of raw signals is not practiced in general, in contrast to a clinical environment. In our digitized world, it is worth to study RR intervals more thoroughly, since the technical opportunity outside of clinics can assist remote diagnosis (telemedicine), but with problems of dirty data. 2. Relative RR Intervals In this context it is quite promising to analyze relative RR interval sequences. Relative RR intervals rr i are de- fined as a weighted difference of successive RR intervals: rr i := RR i - RR i-1 1 2 (RR i + RR i-1 ) for all i ∈{2,...,n}, (1) with the following properties: 1. -2 rr i +2, 2. rr i =0 if and only if RR i = RR i-1 , 3. rr i = -2 if and only if RR i =0, 4. rr i = +2 if and only if RR i-1 =0. The first property implies that relative RR intervals are located between -200% and +200% as the result of weighting the difference by the mean. To prove this prop- erty we set RR i =c · RR i-1 , with c0. Then rr i = (c-1)RR i-1 1 2 (c+1)RR i-1 =2 · c-1 c+1 =2 ( 1- 2 c+1 ) . (2) 2 c+1 is strictly monotonically decreasing for 0c≤∞. As a function of c, rr i is strictly monotonically increasing and reaches its lowest value of -2 at c=0, that means for RR i =0. The limit of rr i for c →∞ is +2 that is reached for RR i-1 =0. 3. Structures in the Return Map The return map of relative RR intervals is the scatter plot of pairs of values (rr i ,rr i+1 ) for i=1,...,n-1. In concrete terms, we use a standardized form of the return map of absolute RR intervals, due to the weighting of the difference of successive RR intervals. The multidimen- sional view has proven its reliability in methods of the chaos theory (e.g. [4] or [5]). To get practical experience, I calculated relative RR intervals from data of the “Nor- mal Sinus Rhythm RR Interval Database” (nsr2db)[6]. The Computing in Cardiology 2017; VOL 44 Page 1 ISSN: 2325-887X DOI:10.22489/CinC.2017.213-185

Upload: others

Post on 16-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Arrhythmia Classification in Long-Term Data Using Relative ... · heart beats of 54 long-term ECGs from test persons with a normal sinus rhythm were automatically annotated and checked

Arrhythmia Classification in Long-Term Data Using Relative RR Intervals

Marcus Vollmer

Institute of Bioinformatics, University Medicine Greifswald, Germany

Abstract

Background: The automated heart beat detectionand the classification of arrhythmic beats from ECGrecordings are difficult tasks. Even thoroughly annotatedstandard databases have a wealth of misplaced heart beatsand a visual identification of all affected ECG parts istime-consuming. The study of relative RR intervals canhelp in this regard.

Methods & Results: Relative RR intervals are definedas the change of two successive RR intervals weighted bytheir mean. I have analyzed the return maps of relative RRintervals of the Normal Sinus Rhythm Database as well asthe MIT-BIH Arrhythmia Database. Different structureshave been investigated analytically and are reproducibledue to modeling. I am able to distinguish structures re-garding arrhythmia types and cases of insufficient heartbeat detection. Upon that approach, I have developed fil-tering criteria of artifacts from RR interval sequences.

Utilization: The return map of relative RR intervalscan be used as visualization technique for the detection ofarrhythmia types or failures in the automated beat detec-tion. Further, it can be used to apply filtering criteria forthe removal of irregular heart beats in RR interval data orto improve heart beat detection algorithms by applying amore sensitive method in the effected parts. This may helpto distinguish irregular beats from false positive alarmscaused by interference effects, possibly in postprocessingroutines.

1. Introduction

RR intervals are the differences of successive heart beats(R-peaks) in an ECG as the result of an automated heartbeat detection. Besides the computation of the heart rate,RR intervals are mainly used for the quantification of heartrate variability (HRV) [1]. The geometry and the dynam-ics of the return map of RR intervals (Poincare plot) hasbeen studied by [2] and [3] for example. Currently someconventional mobile monitoring systems (e.g. Polar sportswatches) are able to save RR intervals or the heart rateas a processed information. Due to limited resources andthe absence of the need, the storage of raw signals is not

practiced in general, in contrast to a clinical environment.In our digitized world, it is worth to study RR intervalsmore thoroughly, since the technical opportunity outsideof clinics can assist remote diagnosis (telemedicine), butwith problems of dirty data.

2. Relative RR IntervalsIn this context it is quite promising to analyze relative

RR interval sequences. Relative RR intervals rri are de-fined as a weighted difference of successive RR intervals:

rri :=RRi −RRi−1

12 (RRi +RRi−1)

for all i ∈ {2, . . . , n}, (1)

with the following properties:

1. −2 ≤ rri ≤ +2,2. rri = 0 if and only if RRi = RRi−1,3. rri = −2 if and only if RRi = 0,4. rri = +2 if and only if RRi−1 = 0.

The first property implies that relative RR intervalsare located between −200% and +200% as the result ofweighting the difference by the mean. To prove this prop-erty we set RRi=c ·RRi−1, with c≥0. Then

rri =(c−1)RRi−112 (c+1)RRi−1

= 2 · c−1c+1

= 2

(1− 2

c+1

). (2)

2c+1 is strictly monotonically decreasing for 0≤c≤∞. Asa function of c, rri is strictly monotonically increasingand reaches its lowest value of −2 at c=0, that means forRRi=0. The limit of rri for c→∞ is +2 that is reachedfor RRi−1=0.

3. Structures in the Return MapThe return map of relative RR intervals is the scatter

plot of pairs of values (rri, rri+1) for i=1, . . . , n−1. Inconcrete terms, we use a standardized form of the returnmap of absolute RR intervals, due to the weighting of thedifference of successive RR intervals. The multidimen-sional view has proven its reliability in methods of thechaos theory (e.g. [4] or [5]). To get practical experience,I calculated relative RR intervals from data of the “Nor-mal Sinus Rhythm RR Interval Database” (nsr2db)[6]. The

Computing in Cardiology 2017; VOL 44 Page 1 ISSN: 2325-887X DOI:10.22489/CinC.2017.213-185

Page 2: Arrhythmia Classification in Long-Term Data Using Relative ... · heart beats of 54 long-term ECGs from test persons with a normal sinus rhythm were automatically annotated and checked

RR sequence

0.95 0.99 1.02 1.06 0.97 0.94 1.02 1.02 0.95 0.90 0.91

+4.0% +3.1% +3.7% -9.2% -3.3% +8.8% -0.8% -6.3% -5.9% +1.7%

0.90 0.95 1.00 1.05

RRi

0.90

0.95

1.00

1.05

RR

i+1

Return map ofRR-Intervals

12

3

45

6 7

8

910

-10% 0% 10%

rri

-10%

-5%

0%

5%

10%

rri+

1

Return map ofrelative RR-Intervals

12

3

4

5

6

78

9

(a) Short sequence of absolute and relative RR intervals and the return maps.

rri in %

-10 -8 -6 -4 -2 0 2 4 6 8 10

rri+

1 in %

-10

-8

-6

-4

-2

0

2

4

6

8

10Return map of relative RR intervals

(b) Coordinates of 10000 random value pairs.

rri in %

-200 -150 -100 -50 0 50 100 150 200

rri+

1 in %

-200

-150

-100

-50

0

50

100

150

200

6! 162!rri

2 " 2!rri

6+rri

Arrhythmia and artifacts(20000 random coordinates from nsr2db)

(c) Return map of 20000 random pairs of successive relative RR intervals lying outside ±20%.

Figure 1: Plots from intervals of the Normal Sinus Rhythm RR Interval Database

Page 2

Page 3: Arrhythmia Classification in Long-Term Data Using Relative ... · heart beats of 54 long-term ECGs from test persons with a normal sinus rhythm were automatically annotated and checked

A

RR sequences and relative RR intervals

0.73 0.41 0.74 0.38 0.75 0.38 0.74 0.55 0.55

-56.6% +58.5% -63.9% +64.8% -64.8% +63.9% -30.3% +0.0% Sequence ofventricular extrasystolesor misplaced annotations

B0.75 0.75 0.77 0.72 0.04 0.74 0.75 0.74 0.72

+0.0% +2.1% -6.3% -179.4%+180.0% +1.0% -1.0% -3.2%False positiveheart beat detection

C0.66 0.66 0.66 0.18 0.48 0.66 0.64 0.66 0.65

+0.0% +0.0% -114.8%+91.8% +31.3% -3.6% +2.4% -1.2% Extrasystole withoutcompensatory pause orfalse positive detection

D0.63 0.63 0.63 0.41 0.83 0.63 0.60 0.62 0.41

+0.0% +0.0% -42.4% +68.4% -26.7% -5.1% +2.6% -39.4%Ventricular extrasystoleor misplaced annotation

E0.71 0.73 8.15 0.42 0.73 0.72 0.71 0.71 0.70

+3.2% +166.9% -180.3% +53.1%-1.1% -1.1% +0.0% -1.1%Asystole orfalse negative detection

A B C D E

Figure 2: Arrhythmia types and annotation failures of heart beat detection correspond to special structures in the returnmap of relative RR intervals.

heart beats of 54 long-term ECGs from test persons witha normal sinus rhythm were automatically annotated andchecked visually. Figure 1a shows a sequence of 10 suc-cessive RR intervals from the database. For each pair ofconsecutive RR intervals, I computed the relative change.The detachment from the heart rate becomes apparentwhen comparing the return maps of absolute and relativeRR intervals. Relative changes are centered around theorigin (0, 0), whereas absolute RR intervals are basicallystretched along the line of identity. Figure 1b shows thebundling of pairs near the coordinate origin. 97.6% of allpairs are located between −20% and +20%. With greatcertainty these are pairs of normal intervals (NN intervals).Interspaces between the coordinates arises as a result of thesampling frequency (fs=128Hz for nsr2db). Impressivestructures become visible when looking at the whole do-main (see Figure 1c). Not all theoretical possible rr inter-vals occur. Typical patterns correspond to specific arrhyth-mia types or failures in heart beat detection (see Figure 2).

Analytical Frame I give a short impression how thesestructures arise. Lets take the example of an interpolated

extrasystole (case C in Figure 2), which is sandwiched be-tween two normal beats. The time between normal beatsis RRi. Previous and following RR intervals varies onlyslightly with RRi−2 ≈ · · · ≈ RRi+2. The extrasystole oc-curs after some coupling time that splits RRi into the inter-vals RRi1=a·RRi and RRi2=(1−a)·RRi with 0<a<1.Using this information, we are able to compute the relativeRR intervals and its relations to a:

rri1 = 2 · RRi1−RRi−1

RRi1+RRi−1≈ 2a−2

a+1= 2− 4

a+1, (3)

rri2 = 2 · (1−a)RRi−aRRi

RRi= 2−4a, (4)

rri+1 = 2 · RRi+1−(1−a)RRi

RRi+1+(1−a)RRi≈ 2a

2−a=

11a−

12

. (5)

Based upon that, we can point out some relations of suc-cessive relative intervals:

rri2 = 6− 162−rri1

, (6)

rri+1 = 2 · 2−rri26+rri2

. (7)

This relation is highlighted as gray functions in Figure1c and in Figure 2 case C. It can be used to enhance ar-

Page 3

Page 4: Arrhythmia Classification in Long-Term Data Using Relative ... · heart beats of 54 long-term ECGs from test persons with a normal sinus rhythm were automatically annotated and checked

rhythmia classification, which has been done so far mainlywith absolute RR intervals, e.g. [7]. More particularlyPark et al. [8] identified wedge-shaped pattern in the re-turn map of absolute RR intervals (equivalent to case C inFigure 2) to be suitable for diagnosis of atrial fibrillation.

4. UtilizationThe use of relative RR intervals has its strength in the

visualization of long-term data. However, the underlyingmechanisms of successive relative intervals can be used formany kinds of applications. To point out some possible im-plementations with details on filtering outliers and artifactsfrom RR interval sequences:

Filtering artifacts To remove arrhythmia and artifactsfrom a sequence of RR intervals, one can use the follow-ing rules, which were derived from the analysis of struc-tural components:

1. Replace RRi with NaN if RRi≥4 seconds or rri>50%and rri+1<−50%. Corresponding to the assumptionthat an asystole takes not longer than 4 seconds (case Ein 2) or if a series of heart beats was not registered bythe detection algorithm or in cases of a shorter asystole.

2. Replace RRi and RRi+1 with NaN if |rri−rri−1|>20%and |rri+1−rri|>20% and |rri+2−rri+1|>20%. Thiscorresponds to extrasystoles or misplaced heart beats(cases B,C,D in 2).

Next, restart the calculation of relative RR intervals andremove further irregularities:

3. Replace RRi with NaN if RRi−1=NaN and|rri+1|>15%.

4. Replace RRi and RRi−1 with NaN if |rri|>50% .

Clifford et al. have used similar exclusion criteria, deal-ing with a mixture of absolute and relative intervals [9].Instead of weighting with the mean of successive intervals,their relative rules are based on a reference interval (meanof the five last sinus intervals).

Patient characterization A close look at the return mapof relative RR intervals with its limited domain can assistcardiologists in order to characterize and classify patients.Recurring patterns in the return map (e.g. triangles of caseC) are visible and refers to certain arrhythmia types.

Detection problems I checked the return maps derivedfrom annotations of different detection algorithms. Onecan clarify different and common detection problemsand the robustness of several algorithms against differentwaveforms can be compared (not published).

Reduce false alarms Further, it can be used to improveheart beat detection algorithms by applying a more sensi-tive method in the effected parts, e.g. to check additionallyfor P and T-waves in the ECG-complex. This could be

done independently from an existing algorithm in a post-processing routine. In my previous work [10] I have al-ready used relative RR intervals to evaluate the signal qual-ity of different biosignals and considered also relative in-tervals of higher grades.

HRV Measurement Through its centered version of theclassical Poincare plot, periodic orbits (caused by the vagaltone) become more visible than in standard reports. I pro-posed a heart rate variability measure based on relative RRintervals which is easy to understand and robust against ar-tifacts and heart rate changes [11].

References

[1] Malik M, Bigger JT, Camm AJ, Kleiger RE, Malliani A,Moss AJ, Schwartz PJ. Heart rate variability. EuropeanHeart Journal 1996;17(3):354–381.

[2] Piskorski J, Guzik P. Geometry of the poincare plot of rrintervals and its asymmetry in healthy adults. PhysiologicalMeasurement 2007;28(3):287.

[3] Karmakar C, Khandoker A, Gubbi J, Palaniswami M. Com-plex correlation measure: a novel descriptor for poincareplot. BioMedical Engineering OnLine 2009;8(1):17.

[4] Peng CK, Hausdorff JM, Goldberger A, Walleczek J. Frac-tal mechanisms in neuronal control: human heartbeat andgait dynamics in health and disease. Nonlinear DynamicsSelf organization and Biomedicine 2000;66–96.

[5] Fell J, Mann K, Roschke J, Gopinathan M. Nonlinear anal-ysis of continuous ECG during sleep II. Dynamical mea-sures. Biological cybernetics 2000;82(6):485–491.

[6] Goldberger AL, Amaral LAN, Glass L, Hausdorff JM,Ivanov PC, Mark RG, Mietus JE, Moody GB, Peng CK,Stanley HE. PhysioBank, PhysioToolkit, and PhysioNet:Components of a New Research Resource for ComplexPhysiologic Signals. Circulation 2000;101(23):e215–e220.

[7] Tsipouras M, Fotiadis D, Sideris D. An arrhythmia classi-fication system based on the RR-interval signal. ArtificialIntelligence in Medicine 2005;33(3):237–250.

[8] Park J, Lee S, Jeon M. Atrial fibrillation detection by heartrate variability in Poincare plot. Biomedical engineeringonline 2009;8(1):38.

[9] Clifford GD, Azuaje F, McSharry P. ECG Statistics, Noise,Artifacts, and Missing Data. Advanced Methods and Toolsfor ECG Data Analysis 2006;6:18.

[10] Vollmer M. Robust detection of heart beats using dynamicthresholds and moving windows. In Computing in Cardiol-ogy. 2014; 569–572.

[11] Vollmer M. A Robust, Simple and Reliable Measure ofHeart Rate Variability using Relative RR Intervals. In Com-puting in Cardiology. 2015; 609–612.

Address for correspondence:Marcus Vollmer / [email protected] of Bioinformatics / University Medicine GreifswaldWalther-Rathenau-Str. 48 / 17475 Greifswald / Germany

Page 4