8th Vienna International Conference on Mathematical Modelling 8thVienna ViennaInternational InternationalConference Conferenceon onMathematical MathematicalModelling Modelling 8th 8th 8th Vienna Vienna18 International International Conference Conference on onMathematical Mathematical Modelling Modelling February 18 - 20, 20, 2015. 2015. Vienna Vienna University of Technology, Technology, Vienna, February University of Vienna, Available online atVienna, www.sciencedirect.com February 18 20, 2015. Vienna University of Technology, Vienna, February February 18 18 20, 20, 2015. 2015. Vienna Vienna University University of of Technology, Technology, Vienna, Austria Austria Austria Austria Austria
ScienceDirect
IFAC-PapersOnLine 48-1 (2015) 123–128
Simulation of Physiologic Ectopic Beats in Simulation of Physiologic Ectopic Beats in Simulation of Physiologic Ectopic Beats in Simulation Simulation of of Physiologic Physiologic Ectopic Ectopic Beats Beats in in Heartbeat Intervals to Validate Algorithms Heartbeat Intervals to Validate Algorithms Heartbeat Intervals to Validate Algorithms Heartbeat Heartbeat Intervals Intervals to to Validate Validate Algorithms Algorithms ∗,∗∗ ∗∗ ∗∗ ∗,∗∗ Matthias H¨ ∗∗ Martin Frank∗∗ Martin Bachler ortenhuber ∗,∗∗ ∗∗ Martin Bachler Bachler∗,∗∗ Matthias H¨ H¨ rtenhuber∗∗ Martin Frank Frank ∗∗ ∗,∗∗ Matthias ∗∗ Martin ∗∗ Martin oo ∗rtenhuber ∗Frank∗∗ Martin MartinBachler Bachler Matthias Matthias H¨ H¨ o o rtenhuber rtenhuber Martin Martin Frank Siegfried Wassertheurer Christopher Mayer Siegfried Wassertheurer Wassertheurer∗∗∗∗ Christopher Christopher Mayer Mayer∗∗∗∗ Siegfried Siegfried SiegfriedWassertheurer Wassertheurer Christopher ChristopherMayer Mayer ∗ ∗ AIT Austrian Institute of Technology GmbH, Health Environment ∗ AIT Austrian Institute of Technology GmbH, Health & Environment ∗ ∗AIT Austrian Institute of Technology GmbH, Health && Environment AIT AITAustrian AustrianBiomedical Institute Instituteof ofSystems, Technology Technology GmbH, GmbH,Health Health & &1220 Environment Environment Department, Donau-City-Str. 1, Vienna, Department, Biomedical Systems, Donau-City-Str. 1, 1220 Vienna, Department, Biomedical Systems, Donau-City-Str. 1, 1220 Vienna, Department, Department, Biomedical Biomedical Systems, Systems,Donau-City-Str. Donau-City-Str. 1, 1,1220 1220Vienna, Vienna, Austria (e-mail: {martin.bachler, siegfried.wassertheurer, Austria (e-mail: (e-mail: {martin.bachler, {martin.bachler, siegfried.wassertheurer, siegfried.wassertheurer, Austria Austria Austria(e-mail: (e-mail: {martin.bachler, {martin.bachler,siegfried.wassertheurer, siegfried.wassertheurer, christopher.mayer}@ait.ac.at) christopher.mayer}@ait.ac.at) christopher.mayer}@ait.ac.at) ∗∗ christopher.mayer}@ait.ac.at) christopher.mayer}@ait.ac.at) ∗∗ Vienna University of Technology, Institute for Analysis and ∗∗ Vienna University University of of Technology, Technology, Institute Institute for for Analysis Analysis and and ∗∗ ∗∗Vienna Vienna Vienna University University ofofTechnology, Technology, Institute Institute for forAnalysis Analysis and and Scientific Computing, Wiedner Hauptstr. 8-10, 1040 Vienna, Austria Scientific Computing, Wiedner Hauptstr. 8-10, 1040 Vienna, Austria Scientific Computing, Wiedner Hauptstr. 8-10, 1040 Vienna, Austria Scientific Scientific Computing, Computing, Wiedner WiednerHauptstr. Hauptstr.8-10, 8-10,1040 1040Vienna, Vienna,Austria Austria (e-mail: {martin.bachler, e0927120}@student.tuwien.ac.at, (e-mail: {martin.bachler, {martin.bachler, e0927120}@student.tuwien.ac.at, e0927120}@student.tuwien.ac.at, (e-mail: (e-mail: (e-mail:{martin.bachler, {martin.bachler, e0927120}@student.tuwien.ac.at, e0927120}@student.tuwien.ac.at,
[email protected])
[email protected])
[email protected])
[email protected])
[email protected])
Abstract: Diseases Diseases of of the the heart heart and and the the cardiovascular cardiovascular system system are are the the leading leading cause cause of of death death in in Abstract: Abstract: Diseases of the heart and the cardiovascular system are the leading cause of death in Abstract: Abstract: Diseases Diseasesof of the theheart heart heart and andvariability the thecardiovascular cardiovascular system system are arethe the leading cause causeof of death death in in developed countries. countries. The rate is aa promising promising marker forleading these diseases diseases and shows developed The heart rate variability is marker for these and shows developed countries. The heart rate variability isisaaapromising promising marker for these diseases and shows developed developed countries. countries. The Theheart heart rate ratevariability variability is promising marker marker for these thesediseases diseases and andshows shows significant relationship to cardiovascular cardiovascular mortality, but is is easilyfor disrupted by ectopic ectopic heart aa significant significant relationship to mortality, but easily disrupted by heart relationship to cardiovascular mortality, but isiseasily easily disrupted by ectopic heart aaabeats. significant significant relationship relationship to to cardiovascular cardiovascular mortality, mortality, but but is easily disrupted disrupted by by ectopic ectopic heart heart Numerous methods of ectopic beat correction exist to counteract this problem, but they beats.Numerous Numerousmethods methods of ofectopic ectopicbeat beatcorrection correctionexist existto to counteract counteractthis this problem, problem,but butthey they beats. beats. beats. Numerous Numerous methods methods ofectopic ectopicbeat beatdata correction correction exist exist totocounteract counteract this thisproblem, problem, but butinthey they need to to be validated validated using of comprehensive sets with with customizable features. Therefore, this need be using comprehensive data sets customizable features. Therefore, in this need to be be validated validated using comprehensive data sets with customizable features. Therefore, in this need need validated using using comprehensive comprehensive datasets setswith with customizable customizable features. features. Therefore, in inthis this worktoto anbe ectopic beat simulator based on ondata physiologic data is presented. presented. DuringTherefore, its development, development, work an ectopic beat simulator based physiologic data is During its work an ectopic beat simulator based on physiologic data isispresented. presented. During its development, work work an anectopic ectopic beat beatsimulator simulator based based on onvariability physiologic physiologic data datacontaining is presented. During During its itsdevelopment, development, statistical properties of real real heart heart rate data ectopic beats are evaluated statistical properties of rate variability data data containing ectopic ectopic beats are evaluated statistical properties of real heart rate variability containing beats are evaluated statistical statistical properties properties of of real real heart heart rate rate variability variability data data containing containing ectopic ectopic beats beats are areevaluated evaluated and a model is built. This model is integrated in a simulator capable of mimicking numerous and aa model model isis built. built. This This model model isis integrated integrated in in aa simulator simulator capable capable of of mimicking mimicking numerous numerous and and and aamodel model isisbuilt. built.The This This model modelare isisintegrated integratedin inaasimulator simulator capable capable ofofmimicking mimicking numerous numerous medical conditions. results inspected using qualitative and quantitative quantitative comparisons medical conditions. The results results are inspected inspected using qualitative and comparisons medical conditions. The are using qualitative and quantitative comparisons medical medical conditions. conditions. The Theand results results are are inspected inspected using usingqualitative qualitative and andquantitative quantitative comparisons comparisons between the simulator real heart rate variability data by visual inspection and analysis between the the simulator simulator and and real real heart heart rate rate variability variability data data by by visual visual inspection inspection and and analysis analysis between between between the thesimulator simulator and andareal real heart heartrate rate variability variabilityofdata data by byvisual visualinspection inspectioncomprehensive and andanalysis analysis of covariance. They show reasonable reproduction ectopic beats, enabling of covariance. covariance. They They show show aa reasonable reasonable reproduction reproduction of of ectopic ectopic beats, beats, enabling enabling comprehensive comprehensive of of of covariance. covariance. They Theyshow show areasonable reasonable reproduction reproductionofofectopic ectopicbeats, beats,enabling enablingcomprehensive comprehensive validation of ectopic ectopic beat acorrection correction methods. validation of beat methods. validation of ectopic beat correction methods. validation validationofofectopic ectopicbeat beatcorrection correctionmethods. methods. © 2015, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved. Keywords: Physiological Physiological models, models, Physiology, Physiology, Heart Heart rate rate variability, variability, Ectopic Ectopic beats, beats, Premature Premature Keywords: Keywords: Physiological models, Physiology, Heart rate variability, Ectopic beats, Premature Keywords: Physiological models, Physiology, Heartrate ratevariability, variability,Ectopic Ectopicbeats, beats,Premature Premature Keywords: Physiological models, Physiology, Heart ventricular contractions, Supraventricular contractions, Modelling, Simulation ventricularcontractions, contractions,Supraventricular Supraventricularcontractions, contractions,Modelling, Modelling,Simulation Simulation ventricular ventricularcontractions, contractions,Supraventricular Supraventricularcontractions, contractions,Modelling, Modelling,Simulation Simulation ventricular 1. INTRODUCTION INTRODUCTION 1.1. INTRODUCTION 1. INTRODUCTION INTRODUCTION 1. According to to the the latest latest reports reports of of the the American American Heart Heart According According to the latest reports of the American Heart According toand thethe latest reports of the the American Heart According to the latest reports of American Heart Association European Heart Network, diseases of Associationand andthe the European EuropeanHeart HeartNetwork, Network,diseases diseasesof of Association Association andthe thecardiovascular EuropeanHeart Heart Network, diseases Association and the European Network, diseases ofof the heart and system are the leading the heart heart and and the the cardiovascular cardiovascular system system are are the the leading leading the the heart andthe the cardiovascular systemare arethe the leading the heart system cause of and death incardiovascular developed countries countries and areleading jointly cause of death in developed and are jointly cause of death in developed countries and are jointly cause death developed countries and2013; are jointly jointly cause ofof death inin developed countries and are responsible for 50% of all fatalities (Go et al., Nichols responsiblefor for50% 50%of ofall allfatalities fatalities(Go (Goet etal., al.,2013; 2013;Nichols Nichols responsible responsible for50% 50%ofofall allfatalities fatalities (Gois al.,2013; 2013; Nichols responsible for (Go etetal., Nichols et al., al., 2012). 2012). Since early diagnosis one major factor et Since early diagnosis is one one major factor et al., 2012). Since early diagnosis is major factor al., 2012). Since early diagnosis is one major factor etet al., 2012). Since early diagnosis is one major factor for the the successful successful treatment treatment of of these these diseases, diseases, reliable reliable for for the successful treatment of these diseases, reliable for the successful successful treatment of these these diseases, reliable for the treatment of markers have to to be be established. One diseases, of these reliable markers markers have established. One of these markers markers have to be established. One of these markers markers haveRate beVariability established. One of of these these markers markers have toto be established. One markers is the Heart (HRV), i.e., the variation the Heart Heart Rate Rate Variability Variability (HRV), (HRV), i.e., i.e., the the variation variation isis the is the Heart Heart Rate Variability Variability (HRV), i.e., i.e.,heart the variation variation is Rate (HRV), the ofthe time interval interval between consecutive consecutive beats, so of the time time between heart beats, beats, so of the interval between consecutive heart so the time interval between consecutive heart beats, so ofof the time interval between consecutive heart beats, so called interbeat-intervals interbeat-intervals (Rajendra (Rajendra Acharya Acharya et et al., al., 2006). 2006). called called interbeat-intervals (Rajendra Acharya et al., 2006). called interbeat-intervals (Rajendra Acharya etal., al.,and 2006). called interbeat-intervals (Rajendra et 2006). It reflects reflects the balance balance between between theAcharya sympathetic the It the the sympathetic and the the It reflects the balance between the sympathetic and reflectsthe thebalance balance between the sympathetic andthe the ItIt reflects between the sympathetic and parasympathetic nervous system and exhibits a significant parasympatheticnervous nervoussystem systemand andexhibits exhibitsaasignificant significant parasympathetic parasympathetic nervoussystem system andexhibits exhibits significant parasympathetic nervous and aasignificant relationship to to cardiovascular cardiovascular mortality (American Heart relationship mortality (American Heart relationship to cardiovascular mortality (American Heart relationship to cardiovascular mortality (American Heart relationship to cardiovascular mortality (American Heart Association Inc.; Inc.; European European Society Society of of Cardiology, Cardiology, 1996). 1996). Association Association Inc.; European Society of Cardiology, 1996). AssociationInc.; Inc.;European EuropeanSociety Societyof ofCardiology, Cardiology,1996). 1996). Association A wide variety of models and methods for the quanA wide wide variety variety of of models models and and methods methods for for the the quanquanA wide variety variety models and and of methods forexists, the quanquanAA wide ofof models methods for the tification and characterization characterization the HRV HRV e.g., tification and of the exists, e.g., tification and characterization of the HRV exists, e.g., tification andthe characterization of the the domain, HRV exists, exists, e.g., tification and characterization of HRV e.g., statistics in time and frequency geometric statistics in in the the time time and and frequency frequency domain, domain, geometric geometric statistics statistics the time non-linear and frequency frequency domain, geometric statistics the time and domain, measures,inin and diverse measures such geometric as entropy measures, and diverse non-linearmeasures measures such as entropy measures, and diverse non-linear such as entropy measures, and diverse non-linear measures suchas asentropy entropy measures, and diverse non-linear measures such or Poincar´ e plots (American Heart Association Inc.; EuroorPoincar´ Poincar´ eplots plots(American (AmericanHeart HeartAssociation AssociationInc.; Inc.;EuroEuroor or Poincar´ plots (American1996). HeartAssociation Association Inc.; Euroor Poincar´ eeeplots (American Heart Inc.; European Society of Cardiology, Cardiology, However, these methods pean Society of 1996). However, these methods pean Society of Cardiology, 1996). However, these methods pean Society ofCardiology, Cardiology, 1996).However, However,these these methods pean Society of 1996). methods are easily easily disrupted by artifacts, artifacts, especially ectopic beats, are disrupted by especially ectopic beats, are easily disrupted by artifacts, especially ectopic beats, are easily disrupted by artifacts, especially ectopic beats, are easily disrupted by artifacts, especially ectopic beats, as they are discontinuations of the regular heart rhythm. as they they are are discontinuations discontinuations of of the the regular regular heart heart rhythm. rhythm. as as theyare are discontinuations the regular heartrhythm. rhythm. as they ofofthe regular heart Already onediscontinuations single ectopic ectopic beat beat causes noticeable changes Already one single causes noticeable changes Already one single ectopic beat causes noticeable changes Already one singleectopic ectopic beat causesnoticeable noticeable changes Already one single beat causes changes in HRV measures, leading to hardly interpretable and in HRV measures, leading to hardly interpretable and in HRV measures, leading to hardly interpretable and in HRV HRV measures, measures, leading leading to to hardly hardly interpretable interpretable and and in
comparable results results (Sethuraman (Sethuraman et et al., al., 2010). 2010). Therefore, Therefore, comparable comparable results (Sethuraman et al., 2010). Therefore, comparable results (Sethuraman etbe al., 2010).Therefore, Therefore, comparable results (Sethuraman et al., 2010). ectopic beats in HRV data should corrected before the the ectopicbeats beats in in HRV HRV data data should shouldbe be corrected correctedbefore before ectopic the ectopic beats HRV datashould should becorrected correctedbefore beforethe the ectopic ininHRV data be analysisbeats (Mateo and Laguna, Laguna, 2003). analysis (Mateo and 2003). analysis (Mateo and Laguna, 2003). analysis(Mateo (Mateoand andLaguna, Laguna,2003). 2003). analysis In the last years, a large number of various various correction correction In the the last last years, years, aa large large number number of of In various correction the last last years, large number of of various various correction InIn the years, aa large number correction methods has emerged, including several interpolation, methods has emerged, including several interpolation, methods has emerged, including several interpolation, methods has emerged, emerged, including several interpolation, methods including several interpolation, filtering, has and model-based approaches (Peltola, 2012). filtering, and model-based approaches (Peltola, 2012). filtering, and model-based approaches (Peltola, 2012). filtering, and model-based approaches (Peltola, 2012). filtering, and model-based approaches (Peltola, 2012). However, previous studies revealed large differences in However, previous previous studies studies revealed revealed large large differences differences in in However, However, previous studies revealed revealed large differences inin However, previous studies large differences the resulting HRV parameters after the interbeat-interval the resulting resulting HRV HRV parameters parameters after after the the interbeat-interval interbeat-interval the the resulting HRVcorrected parameters after theinterbeat-interval interbeat-interval the resulting HRV parameters after the time series were were with different methods (Jung (Jung time series corrected with with different methods time series were corrected different methods (Jung time series were corrected withdifferent different methodsstudies (Jung time series were corrected with methods (Jung et al., 1996). Hence, comprehensive comparative et al., al., 1996). 1996). Hence, Hence, comprehensive comprehensive comparative comparative studies studies et et al., 1996). Hence, comprehensive comparative studies et 1996). comprehensive comparative studies areal., needed inHence, order to to define and and establish establish standard recare needed in order define standard recare needed in order to define and establish standard recare neededininorder order defineand and establish standard recare needed totodefine establish standard recommendations for the suitable correction of ectopic beats ommendations for for the the suitable suitable correction correctionof of ectopic ectopicbeats beats ommendations ommendations for thesuitable suitable correction ofectopic ectopicshould beats ommendations the beats (Peltola, 2012). 2012).for Besides, newlycorrection developedofmethods methods (Peltola, Besides, newly developed should (Peltola, 2012). Besides, newly developed methods should (Peltola, 2012). Besides, newlyprocess developed methods should (Peltola, 2012). Besides, newly developed methods should undergo a rigorous validation to ensure their corundergo aa rigorous rigorous validation validation process process to to ensure ensure their their corcorundergo undergo rigorousunder validation process toensure ensureconditions. theircorcorundergo aarigorous validation process to their rect functionality various, even extreme rectfunctionality functionality under under various, various,even evenextreme extremeconditions. conditions. rect rect functionality undervarious, various,even evenextreme extremeconditions. conditions. rect functionality under Certainly, comparative studies and validation processes Certainly, comparative studies and validation processes Certainly, comparative studies and validation processes Certainly, comparative studies and and validation validation processes Certainly, comparative studies processes are in need of reliable baseline data free of ectopic beats are in need of reliable baseline data free of ectopic beats are in need of reliable baseline data free of ectopic beats are inneed need ofreliable reliable baselinedata data freeof ofdegrees. ectopicbeats beats are in of baseline free ectopic as well as data contaminated to various While as well well as as data data contaminated contaminated to to various various degrees. degrees. While While as as well data contaminated contaminated to various various degrees. While as asas data degrees. While thewell first-mentioned serve as as aa to control group to assess assess the the first-mentioned serve control group to the the first-mentioned serve as a control group to assess the the first-mentioned serve as a control group to assess the the first-mentioned serve as a control group to assess the quality of the correction, the second ones are the data sets qualityof ofthe thecorrection, correction,the thesecond secondones onesare arethe thedata datasets sets quality quality thecorrection, correction, thesecond secondones ones arethe the data sets quality the the data sets for the theofof methods under investigation investigation to are work on. Ideally, for methods under to work on. Ideally, for the methods under investigation to work on. Ideally, for the methods under investigation work on. Ideally, for the methods under investigation totowork on. Ideally, the baseline and the contaminated data should be identithe baseline baseline and and the the contaminated contaminated data data should should be be identiidentithe the baseline and the contaminated data should beidentiidentithe and the contaminated data should be cal,baseline except for for the additional ectopic beats. However, the cal, except the additional ectopic beats. However, the cal, except for the additional ectopic beats. However, the cal, except for the additional ectopic beats. However, the cal, except for the additional ectopic beats. However, the regulatory mechanisms mechanisms of of the the heart heart rate rate are are very very complex complex regulatory regulatory mechanisms of the the heart heart rate are very complex regulatory mechanisms heartconstantly rateare arevery very complex regulatory mechanisms rate complex and non-linear non-linear (Voss et etofof al.,the 2009), adapting to and (Voss al., 2009), constantly adapting adapting to and non-linear (Voss et al., 2009), constantly to and non-linear (Voss etal., al.,2009), 2009), constantly adaptingone to and non-linear (Voss et constantly adapting to extrinsic factors and influencing each other. Therefore, extrinsicfactors factorsand andinfluencing influencingeach eachother. other.Therefore, Therefore,one one extrinsic extrinsicfactors factorsand andinfluencing influencingeach eachother. other.Therefore, Therefore,one one extrinsic
2405-8963 ©©2015, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved. Copyright 2015, IFAC 123 Copyright 2015,responsibility IFAC 123Control. Copyright ©© 2015, IFAC 123 Peer review of International Federation of Automatic Copyright Copyright © ©under 2015, 2015,IFAC IFAC 123 123 10.1016/j.ifacol.2015.05.105
MATHMOD 2015 February 18 - 20, 2015. Vienna, Austria Martin Bachler et al. / IFAC-PapersOnLine 48-1 (2015) 123–128 124
Numerous generators for electrocardiographic (ECG) signals emerged in recent years, e.g., Behar et al. (2014); Roonizi and Sameni (2013). However, most of them focus on an accurate reconstruction of the heartbeat’s morphology and pay only little attention to the simulation of interbeat-intervals, usually based on a rather simple model by McSharry et al. (2002). Only few simulators concentrate on the generation of interbeat-intervals, e.g., Lin (2002); Soli´ nski et al. (2014). All of them have the common aim to simulate not only ectopic beats, but also the whole time-series of normal heartbeats, facing the formidable challenge to reproduce regulatory mechanisms of the heart rate in all their complexity. On the contrary, in this work we present the development and discuss the results of a method to add simulated ectopic beats to prerecorded physiologic heartbeat interval data. The aim was to create a model flexible enough to simulate different sorts of ectopic beats with varying density while simultaneously maintaining physiologic plausibility. 2. METHODS The development of the ectopic beat simulator is based on physiologic data. In the first step, measurements of real ectopic beats are analyzed and a model is built from their statistical characteristics. In the next step, this model is incorporated in a simulator used to add generated ectopic beats to ectopic-free HRV data sequences. All calculations were performed using the numerical computing environment MATLAB 2007b developed by The MathWorks, Inc. 2.1 Data The physiologic data used in the development of the ectopic beat model have been acquired from Physionet.org (Goldberger et al., 2000), a free online archive of physiological signals. To ensure the presence of various sorts of ectopic beats, three databases have been used: the European ST-T Database (Taddei et al., 1992), the MITBIH Arrhythmia Database (Moody and Mark, 2001), and the QT Database (Laguna et al., 1997). • The European ST-T Database consists of 90 twohour ambulatory ECG recordings, annotated independently by two cardiologists. Two ECG channels were sampled with a frequency of 250 Hz from 79 subjects (70 men aged 30 to 84 years and 8 women aged 55 to 71 years, 1 unknown). Several selection criteria were established in order to obtain a broad variety of ECG abnormalities (Taddei et al., 1992). • The MIT-BIH Arrhythmia Database contains 48 halfhour recordings from 47 subjects (25 men aged 32 to 89 years and 22 women aged 23 to 89 years). It was compiled to provide reference material for the evaluation of arrhythmia detectors. Therefore, 23 recordings were chosen randomly and 25 additional ones were selected specifically in order to included uncommon, but clinically important arrhythmia. Two124
ECG [mV]
4
E
2
N
N
N
N
N
N
0 −2
0
1
2
3 Time [s]
4
5
6
1.4 interbeat−interval [s]
cannot assume them to be stable over even short periods of time within the same subject and certainly not between different subjects. Hence, the best way of acquiring data meeting the aforementioned requirements is to artificially generate them.
1.2 NN
NN
1
EN
NN
NN
0.8 NE
0.6 0.4
0
1
2
3 Time [s]
4
5
6
Fig. 1. Ectopic beat in the ECG signal (top) with marked heartbeats (normal heartbeats marked by N, ectopic beat marked by E) and in the resulting HRV time series (bottom) with marked intervals (dots and NN for normal intervals, stars as well as NE for shortened and EN for prolonged interval). channel ECG data were sampled at a frequency of 360 Hz at the Boston’s Beth Israel Hospital Arrhythmia Laboratory and annotated independently by two or more cardiologists (Moody and Mark, 2001). • The QT Database contains a variety of different ECG morphologies. It is compiled of several ECG databases collected at Boston’s Beth Israel Deaconess Medical Center, chosen to represent varied and well characterized data as well as some extremes of cardiac (patho)physiology. It contains 105 fifteen-minute excerpts of two-channel ECG recordings, sampled with a frequency of 250 Hz and additional reference annotations (Laguna et al., 1997). Using Physionet tools, 5-min-excerpts (in accordance with American Heart Association Inc.; European Society of Cardiology (1996)) of the signals in the aforementioned databases were acquired and categorized in segments with and without ectopic beats. Data including ectopic beats were used to create the model and to determine its parameters while data without ectopic beats form the basis for the simulation of the results. 2.2 Model development Figure 1 shows an ECG recording and the resulting interbeat-intervals containing a premature ventricular contraction (PVC), a certain type of ectopic beat. Clearly visible is a shortened interval before and the prolonged interval after the ectopic beat, as it is typical for PVCs. Correction methods target these disruptions of the interbeat time series, trying to remove and replace them with the most probable continuation of the regular heart beats. Therefore, the aim of the model development is the analysis of statistical properties of the intervals before and after the ectopic beat. As the intervals between heart beats are inverse proportional to the heart rate (HR), the prolonged and shortened intervals have to be analyzed as a function of the HR.
MATHMOD 2015 February 18 - 20, 2015. Vienna, Austria Martin Bachler et al. / IFAC-PapersOnLine 48-1 (2015) 123–128
interbeat−interval [s]
Before ectopic beat
After ectopic beat
2.2
2.2
2
2
1.8
1.8
1.6
1.6
1.4
1.4
1.2
1.2
1
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
50 100 Heart rate [1/min]
150
0.2
125
IB = −0.0053 · HR + b and
(7)
IA = −0.0125 · HR + a,
(8)
for b ∈ [0.9474, 1.1966] and
(9)
a ∈ [1.8956, 2.1024], chosen randomly.
(10)
2.3 Ectopic beat simulator
50 100 Heart rate [1/min]
150
Fig. 2. Linear regression of shortened interbeat-intervals before (left) and prolonged interbeat-intervals after (right) the ectopic beat as a function of the heart rate. Therefore, the average of all intervals before and after an ectopic beat was calculated for every single record in the combined data and set into relation to its respective average HR. Figure 2 shows the results of this analysis and exhibits a reasonably linear connection. Hence, a linear regression minimizing the squared residuals was used to approximate the parameters of a first linear version of the model (also shown in Figure 2), with the following results for the intervals before (IB ) and after (IA ) the ectopic beat: IB = −0.0053 · HR + 1.0493 and
(1)
IA = −0.0125 · HR + 2.0285.
(2)
In the next step, the dispersion of the naturally occurring intervals is determined in order to quantify their deviation from the simplified linear model. Since they are not normally distributed (tested using Lilliefors goodness-of-fit test of composite normality (Lilliefors, 1967) using a 5% significance level), the dispersion is measured using their value range. Again, every single record in the combined data set is evaluated, finding the minimum and the maximum of the shortened and prolonged intervals as a function of the HR. The results showed similar behavior to the values in Figure 2 and are therefore not displayed separately. The linear regression analysis resulted in the following functions describing the boundaries of the intervals: IBmin = −0.0050 · HR + 0.9474,
(3)
IBmax = −0.0055 · HR + 1.1966,
(4)
IAmin = −0.0127 · HR + 1.8956, and
(5)
IAmax = −0.0115 · HR + 2.1024.
(6)
For simplification of the resulting model, the slopes in Equation 3 and 4 as well as in Equation 5 and 6 were considered sufficiently similar to the ones in Equation 1 and 2, respectively, and therefore omitted in further considerations. The final combined model therefore describes the intervals before and after an ectopic beat as follows: 125
The model described in section 2.2 was embedded in a simulator to add ectopic beats to otherwise ectopic free interbeat-interval time series. The simulator was designed to mimic various medical conditions by combining IB and IA from Equation 7 and 8 in different ways while maintaining specific physiologic constraints. Furthermore, it allows the specification of the amount and density of the generated ectopic beats. In more detail, when executing the simulator one is able to define the amount of successive ectopic beats to be generated and the number of normal heart beats in between. Furthermore, one can specify whether a compensatory pause (the prolongation of the interval after the ectopic beat, i.e., IA ) is added or not. These three parameters allow the simulation of the following medical conditions: • Single supraventricular contractions (SVCs): ectopic beats that do not originate in the ventricles of the heart and therefore have no compensatory pause, i.e., no IA is added. They can be simulated with a predefined or a random amount of normal beats in between. • Single premature ventricular contractions (PVCs): ectopic beats that originate in the ventricles of the heart and superimpose one ectopic beat on the otherwise regular sequence of heart beats. In other words, while the overall heart rate is maintained consistent, one beat is shifted to an earlier point in time, decreasing the interval before and prolonging the interval after the ectopic beat, as depicted in Figure 1. In this case, IB and IA are not independent from each other, but IA is prolonged by the same amount as IB is shortened. Therefore, only IB is calculated using the physiologic model and IA is derived correspondingly. They can be simulated with a predefined or a random amount of normal beats in between. Depending on the number of successive PVCs and normal heart beats, the following medical conditions can be simulated: - Bigeminy: every other beat is a PVC, occurring with a random frequency of an odd multiple of 2 (Kerin et al., 1975). - Trigeminy: two normal beats between one PVC, occurring with the random frequency of an odd multiple of 2 (Kerin et al., 1975). - Couplet: two PVCs after a normal beat. - Triplet: three PVCs after a normal beat. • Non-sustained ventricular tachycardia: a sequence of more than three PVCs of a random length shorter than 30 seconds. Since after more than three PVCs the aforementioned dependence of IA from IB is not given anymore, they are both calculated independently using the physiologic model. • Sustained vetricular tachycardia: a sequence of PVCs of a random length longer than 30 seconds. Again, IB
MATHMOD 2015 February 18 - 20, 2015. Vienna, Austria 126 Martin Bachler et al. / IFAC-PapersOnLine 48-1 (2015) 123–128
Clean dataset
Single premature ventricular contractions 1.6 interbeat−interval [s]
interbeat−interval [s]
1.3 1.2 1.1 1 0.9 0.8
0
20
40
60
80
1.4 1.2 1 0.8
100
0
20
40
Single supraventricular contractions
80
100
60
80
100
Bigeminy 2 interbeat−interval [s]
1.4 interbeat−interval [s]
60
1.2 1 0.8 0
20
40
60
80
1.5 1 0.5
100
0
20
40
Time [s]
Time [s]
and IA are calculated independently from each other by the physiologic model. • Supraventricular bigeminy: supraventricular contractions without compensatory pause, i.e., IA is not added, alternating with normal beats. 3. RESULTS
Fig. 4. Clean excerpt of record e0106 from the European ST-T Database with three simulated single premature ventricular contractions (top) and several simulated episodes of bigeminy (bottom). Trigeminy 2 interbeat−interval [s]
Fig. 3. Clean excerpt of record e0106 from the European ST-T Database (top) and simulated single supraventricular contractions added to it (bottom).
1.5 1 0.5
3.1 Qualitative Comparison
0
20
40
60
80
100
60
80
100
Couplet
Figure 3 (top) depicts an excerpt of record e0106 from the European ST-T Database without any ectopic beats. This sequence of interbeat-intervals is used as input to the ectopic beat simulator with different sets of parameters in order to simulate the medical conditions described in section 2.3. Single supraventricular contractions were added for the first test and are shown in Figure 3 (bottom). Clearly visible are three ectopic beats with shortened interval before the ectopic beat. The subsequent interval is not altered. Figure 4 (top) shows the simulation of three premature ventricular contractions. As opposed to the SVCs, a compensatory pause after the ectopic beat is visible as prolonged interval. The duration of the prolongation is proportional to the shortening of the previous interval (compare the first to the second and third PVC). Several episodes of bigeminy are depicted in Figure 4 (bottom). Every PVC is followed immediately by a compensatory pause and a normal heart beat, which in turn is often followed by the next PVC. The relation between shortening and prolongation is visible again. In contrast to bigeminy, a PVC in trigeminy is always followed by two normal heart beats, as visible in Figure 5 (top). The first normal heart beat is preceded by the compensatory pause while the interval between the two normal beats is not altered from the input data. Figure 5 (bottom) shows an example of simulated couplets. PVCs always appear in pairs with shortened intervals before each ectopic beat, followed by a compensatory pause preceding the normal heartbeat. 126
interbeat−interval [s]
2 1.5 1 0.5
0
20
40 Time [s]
Fig. 5. Clean excerpt of record e0106 from the European ST-T Database with several simulated episodes of trigeminy (top) and simulated couplets (bottom). Triplets, as shown in Figure 6 (top), exhibit rather similar behavior to couplets. Figure 6 (bottom) depicts two nonsustained episodes of ventricular tachycardia. The compensatory pause between the last PVC and the first normal beat is not related to the shortened intervals during the tachycardia anymore. This loss of relation between the one prolonged and the episode of shortened intervals is even more apparent in the simulation of a sustained ventricular tachycardia shown in Figure 7 (top). Furthermore, the amount of shortening varies between the one sustained and the two non-sustained ventricular tachycardia (see also Figure 6), whereas they stay nearly the same during an episode. Figure 7 (bottom) demonstrates the simulation of supraventricular bigeminy. Every other interbeat-interval is replaced by a shorter one, whereas the remaining ones are not altered and directly taken from the input sequence. For a qualitative comparison of simulated and real ectopic beats, Figure 8 shows excerpts of two unaltered records
MATHMOD 2015 February 18 - 20, 2015. Vienna, Austria Martin Bachler et al. / IFAC-PapersOnLine 48-1 (2015) 123–128
edb/e0103
Triplet
2 interbeat−interval [s]
interbeat−interval [s]
2 1.5 1 0.5
0
10
20
30
40
50
127
60
70
80
1.5 1 0.5 0 50
90
100 Time [s] edb/e0112
Non−sustained VT 1.6 interbeat−interval [s]
interbeat−interval [s]
1.5
1
0.5
0
10
20
30
40 50 Time [s]
60
70
80
90
Sustained VT interbeat−interval [s]
2 1.5 1
0
10
20
30
40
50
60
70
80
90
Supraventricular arrhythmia interbeat−interval [s]
1.4 1.2
0.8 0.6 0
10
20
30
40 50 Time [s]
60
70
80
90
Fig. 7. Clean excerpt of record e0106 from the European ST-T Database with simulated sustained ventricular tachycardia (top) and simulated supraventricular bigeminy (bottom). from the European ST-T Database. Record e0103 (top) exhibits an episode of non-sustained ventricular tarchycardia, two episodes of bigeminy, one couplet, and two single PVCs. Record e0112 (bottom) contains supraventricular bigeminy and a single SVC. 3.2 Quantitative Comparison For a quantitative comparison of the simulator’s results, the whole ectopic-free set of data was contaminated with various simulated ectopic beats. The resulting records were evaluated in the same way as described in section 2.2 and would result in the following reconstructed model: IˆB = −0.0048 · HR + ˆb and ˆ, IˆA = −0.0124 · HR + a
1.2 1 0.8 40
(11) (12)
for ˆb ∈ [0.9435, 1.0170] and
(13)
a ˆ ∈ [1.7302, 2.2496].
(14) 127
60
80 Time [s]
100
120
Fig. 8. Excerpts of records e0103 (top) and e0112 (bottom) from the European ST-T Database containing various types of real ectopic beats. In order to determine the accuracy of this reconstruction, a one-way analysis of covariance (anocova) was carried out for the parameters of both models. HR is the predicting variable and the model parameters, i.e., the slopes of IB and IA as well as the boundaries of the intercepts bmin , bmax , amin , and amax , are the response. The results are summarized in Table 1. Table 1. Results of the one-way analysis of covariance (anocova) using HR as the predictor and the interbeat-intervals as the response. Term Slope IB Slope IA Intercept bmin Intercept bmax Intercept amin Intercept amax
1
0.4
1.4
20
Fig. 6. Clean excerpt of record e0106 from the European ST-T Database with simulated triplets (top) and two simulated episodes of non-sustained ventricular tachycardia (bottom).
0.5
150
Joint Estimate -0.0051 -0.0124 0.9454 1.1068 1.8129 2.1760
Deviation ± 0.0002 ± 0.0000 ± 0.0019 ± 0.0898 ± 0.0827 ± 0.0736
P-Value 0.61 0.99 0.94 0.10 0.20 0.32
4. DISCUSSION 4.1 Qualitative Comparison Upon qualitative comparison of simulated and real ectopic beats, several similarities but also some differences can be observed. Considering single PVCs (compare Figure 4 and Figure 8) it can be observed, that the real compensatory pause after the ectopic beat is slightly shorter in relation to the shortening before the ectopic beat than the simulated ones. Visual inspection of further real PVCs (data not shown) revealed that IB and IA usually balance each other out, but in combination with other medical conditions some variability regarding this compensation exists. Further, one can see a higher variation of the intervals during couplets and ventricular tachycardia in real measurements than in the simulation. These naturally occurring variabilities should be considered in further research and development of the ectopic beat simulator. The characteristics of bigeminy, supraventricular arrhythmia, and single SVCs, on the other hand, seem to be rendered very well by the simulator.
MATHMOD 2015 128 February 18 - 20, 2015. Vienna, Austria Martin Bachler et al. / IFAC-PapersOnLine 48-1 (2015) 123–128
4.2 Quantitative Comparison The quantitative comparison between the developed model (Equations 7 - 10) and its reconstruction from simulated results (Equations 11 - 14) exhibits reasonably similar model parameters. The results of the anocova (Table 1) show that there is no statistically significant difference between the original model and its reconstruction from simulated ectopic beats. Small deviations probably arise from the use of uniformly distributed pseudo-random numbers, which do not completely reflect the true statistical distribution of real ectopic beat intervals. 4.3 Limitations In order to reduce the complexity of the model, no distinction was made between various kinds of ectopic beats during its development. However, as they originate from different pathologies, they probably possess different statistical characteristics. This simplification may be the source of some inaccuracies in the results of the simulation. Furthermore, phenomena associated with ectopic beats, such as heart rate turbulence (Bauer and Schmidt, 2003), were not taken into account. 5. CONCLUSION In this work, we presented a simulator for adding ectopic beats to heartbeat interval data, which is flexible enough to simulate different medical conditions to various degrees. Qualitative and quantitative inspection show that these medical conditions are reproduced reasonably. In contrast to existing simulators, this one does not generate all the interbeat-intervals. By adding ectopic beats only to real measurements we ensure that physiologic complexity is retained. Furthermore, the results are almost-identical pairs of altered and unaltered data, enabling comprehensive validation and comparison of ectopic beat correction methods. REFERENCES American Heart Association Inc.; European Society of Cardiology (1996). Guidelines – heart rate variability. European Heart Journal, 17, 354–381. Bauer, A. and Schmidt, G. (2003). Heart rate turbulence. Journal of Electrocardiology, 36, Supplement 1, 89 – 93. Behar, J., Andreotti, F., Zaunseder, S., Li, Q., Oster, J., and Clifford, G. (2014). An ECG simulator for generating maternal-foetal activity mixtures on abdominal ECG recordings. Physiological Measurement, 35(8), 1537. Go, A.S., Mozaffarian, D., Roger, V.L., Benjamin, E.J., Berry, J.D., Borden, W.B., Bravata, D.M., Dai, S., Ford, E.S., Fox, C.S., Franco, S., Fullerton, H.J., Gillespie, C., Hailpern, S.M., Heit, J.A., Howard, V.J., Huffman, M.D., et al. (2013). Heart disease and stroke statistics – 2013 update: A report from the american heart association. Circulation, 127(1), e6–e245. Goldberger, A.L., Amaral, L.A.N., Glass, L., Hausdorff, J.M., Ivanov, P.C., Mark, R.G., Mietus, J.E., Moody, G.B., Peng, C.K., and Stanley, H.E. (2000). Physiobank, physiotoolkit, and physionet: Components of a new research resource for complex physiologic signals. Circulation, 101(23), e215–e220. 128
Jung, J., Heisel, A., Tscholl, D., Fries, R., Schieffer, H., and ¨ Ozbek, C. (1996). Assessment of heart rate variability by using different commercially available systems. The American Journal of Cardiology, 78(1), 118–120. Kerin, N., Mori, I., and Levy, M.N. (1975). Ventricular quadrigeminy as a manifestation of concealed bigeminy. Circulation, 52(6), 1023–9. Laguna, P., Mark, R., Goldberg, A., and Moody, G. (1997). A database for evaluation of algorithms for measurement of qt and other waveform intervals in the ecg. In Computers in Cardiology 1997, 673–676. Lilliefors, H.W. (1967). On the kolmogorov-smirnov test for normality with mean and variance unknown. Journal of the American Statistical Association, 62(318), 399– 402. Lin, D. (2002). Simulate heart rate variability in different physiological conditions. Computers in cardiology, 149– 152. Mateo, J. and Laguna, P. (2003). Analysis of heart rate variability in the presence of ectopic beats using the heart timing signal. Biomedical Engineering, IEEE Transactions on, 50(3), 334–343. McSharry, P., Clifford, G., Tarassenko, L., and Smith, L. (2002). Method for generating an artificial rr tachogram of a typical healthy human over 24-hours. In Computers in Cardiology, 2002, 225–228. Moody, G. and Mark, R. (2001). The impact of the MITbih arrhythmia database. Engineering in Medicine and Biology Magazine, IEEE, 20(3), 45–50. Nichols, M., Townsend, N., Luengo-Fernandez, R., Leal, J., Gray, A., Scarborough, P., and Rayner, M. (2012). European cardiovascular disease statistics 2012. European Heart Network, Brussels, European Society of Cardiology, Sophia Antipolis, P104. Peltola, M.A. (2012). Role of editing of R-R intervals in the analysis of heart rate variability. Front Physiol, 3, 148. Rajendra Acharya, U., Paul Joseph, K., Kannathal, N., Lim, C., and Suri, J. (2006). Heart rate variability: a review. Medical and Biological Engineering and Computing, 44, 1031–1051. Roonizi, E.K. and Sameni, R. (2013). Morphological modeling of cardiac signals based on signal decomposition. Computers in Biology and Medicine, 43(10), 1453–1461. Sethuraman, G., Ryan, K.L., Rickards, C.A., and Convertino, V.A. (2010). Ectopy in trauma patients: cautions for use of heart period variability in medical monitoring. Aviation, space, and environmental medicine, 81(2), 125–129. ˙ Soli´ nski, M., Giera�ltowski, J., and Zebrowski, J.J. (2014). Modeling of human heart rate variability enhanced using stochastic sleep architecture properties. Computing in Cardiology, 41, 513–516. Taddei, A., Distante, G., Emdin, M., Pisani, P., Moody, G., Zeelenberg, C., and Marchesi, C. (1992). The european st-t database: standard for evaluating systems for the analysis of st-t changes in ambulatory electrocardiography. European Heart Journal, 13(9), 1164–1172. Voss, A., Schulz, S., Schroeder, R., Baumert, M., and Caminal, P. (2009). Methods derived from nonlinear dynamics for analysing heart rate variability. Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences, 367(1887), 277–296.