Atrial Fibrillation (AF) is the most common cardiac arrhythmia. It naturally tends to become a chronic condition, and chronic Atrial Fibrillation leads to an increase in the risk of death. The study of the electrocardiographic signal, and in particular of the tachogram series, is a usual and effective way to investigate the presence of Atrial Fibrillation and to detect when a single event starts and ends. This work presents a new statistical method to deal with the identification of Atrial Fibrillation events, based on the order identification of the ARIMA models used for describing the RR time series that characterize the different phases of AF (pre-, during, and post-AF). A simulation study is carried out in order to assess the performance of the proposed method. Moreover, an application to real data concerning patients affected by Atrial Fibrillation is presented and discussed. Since the proposed method looks at structural changes of ARIMA models fitted on the RR time series for the AF event with respect to the pre- and post-AF phases, it is able to identify starting and ending points of an AF event even when AF follows or comes before irregular heartbeat time slots.
During the last 20 years, there has been a widespread interest in the study of variations in the beat-to-beat timing of the heart, known as Heart Rate Variability (HRV) [
Typical series of RR intervals during normal sinus rhythm (a) and during Atrial Fibrillation (b).
The main device used in order to investigate the heartbeat is the Electrocardiogram (ECG) [
Stylized shape of a physiological single beat, recorded on ECG graph paper. Main relevant points, segments, and waves are highlighted.
Concerning the ECG detection of AF events, characteristic findings are the absence of P waves with unorganized electrical activity in their place and irregular RR intervals due to irregular conduction of impulses to the ventricles. While the analysis of P wave is quite complicate, the study of RR intervals is simpler. Hence, it could be an effective way to investigate the presence of AF and to detect when a single event starts and ends. Several examples exist in the literature (see [
Anyway, in many situations, an AF event does not follow a physiological time slot but comes after other types of arrythmia. At the same time, in many cases, the irregular heartbeat does not disappear when the event finishes. According to these problems, it may be possible to look at an irregular heartbeat even when the AF event itself has not already started or has already finished. So, a method based on detection of changes in the variance of the process can lead to inaccurate results and can fail as described previously. Hence, methods which are not based on the analysis of the process variance are needed, in order to identify suitable quantities to characterize the different phases, say “pre- AF,” “AF,” and “post- AF.” To this aim, efforts are usually focused on changepoint detection of the spectrum or of the mean of a time series (see [
In this work, we assume that the tachogram, during an AF event, is characterized by a specific process. Hence we propose a different approach: we describe the phases of AF by means of ARIMA models characterized by different orders
The paper is organized as follows. In Section
All the simulations and the analyses of real data have been carried out using R statistical software [
In this section, we introduce ARIMA models [
Many empirical time series have no constant mean. Even so, they exhibit a sort of homogeneity in the sense that a suitable affine transformation could have constant mean. Models which describe such homogeneous nonstationary behavior can be obtained by supposing some suitable differences of the process to be stationary. Referring to the framework and theory treated in [
Suppose to fit model (
We now consider a phenomenon that evolves according to an ARIMA process. We wish to analyse a time series and to detect when such a phenomenon starts and/or ends. If this specific phenomenon is characterized by a higher (or lower) variability with respect to the current situation, then there is a huge number of methods effective in detecting these changes in variability. Examples are control charts (see [
As we mentioned before, our main goal is to identify the beginning and the end of a specific phenomenon modeled by an ARIMA process. This means firstly to identify the model parameters of the phenomenon under study, that is, the values of
To identify the starting and ending times of the phenomenon of interest, we propose the following procedure. Consider the first
The purpose is to test the null hypothesis that the phenomenon is present against the alternative hypothesis that the phenomenon is absent. This may be formalised as follows:
The method to detect start and/or end of a specific phenomenon follows these steps: implement the test in ( repeat step (1) after a shift of one observation until the last one is reached.
Once the procedure ends, an output of 0’s and 1’s is available. Also, 1 indicates the presence of the phenomenon, 0 the absence. Starting and end points can be then detected through this last 0/1 time series.
In order to validate the proposed method, different situations have been tested and analysed. The main goals are the following: to point out settings where our method performs at best, to assess the robustness of the method varying to make a sensitivity analysis over the parameter
The method presented in this paper is a technique to detect modification in the process underlying the observed phenomenon. We chose an ARIMA (0, 1, 1) as Reference Process (RP), considering a sequence of 7000 realizations from a process, say
The parameters values for these simulations have been chosen randomly, under the constraint that the models were admissible. Their values are reported in Table
Parameters values used in the simulations. The first four models refer to
ARIMA |
|
|
|
|
|
|
|
|
---|---|---|---|---|---|---|---|---|
(4,1,2) | 0.52 | 0.35 | −0.04 | 0.11 | / | −0.07 | 0.12 | / |
(5,1,3) | −0.66 | −0.3 | 0.24 | 0.01 | 0.14 | −0.08 | −0.19 | −0.29 |
(2,2,0) | −0.08 | −0.25 | / | / | / | / | / | / |
(1,1,1) | −0.15 | / | / | / | / | 0.12 | / | / |
(0,1,1) | / | / | / | / | / | 0.3 | / | / |
Analysis of the output of the method changing the process underlying the observations before and after the phenomenon. Red lines represent the start and the end of the phenomenon.
Output of the method: before and after the phenomenon under study, the process is an ARIMA (4,1,2)
Output of the method: before and after the phenomenon under study, the process is an ARIMA (5,1,3)
Output of the method: before and after the phenomenon under study, the process is an ARIMA (2,2,0)
Output of the method: before and after the phenomenon under study, the process is an ARIMA (1,1,1)
In the following, we focus on the case related to Figure
Output of the method varying
We consider, for different values of
Empirical type-I error probability varying
|
|
| |
---|---|---|---|
|
0.004547 | 0.005300 | 0.004969 |
|
0.025889 | 0.028244 | 0.027377 |
|
0.051221 | 0.055458 | 0.058005 |
Empirical power varying
|
|
| |
---|---|---|---|
|
0.676305 | 0.873391 | 0.960046 |
|
0.828791 | 0.945367 | 0.987309 |
|
0.880587 | 0.967746 | 0.993346 |
Hence, the choice of the parameter
Output of the method varying
Let us consider now an application of the method proposed in this paper to real data. Specifically we analysed RR intervals of 8 patients during Atrial Fibrillation (AF).
Data have been supplied to authors by Professor Luca Mainardi responsible of the Biomedical Signal Processing Laboratory of the Department of Bioengineering, Politecnico di Milano. Before patients underwent an ablation intervention, a seven-day Holter trace had been recorded using a one-channel
Duration and number of beats of the event of AF.
Pat. no. | Duration AF (min.) | Beats |
---|---|---|
1 | 521 | 41085 |
2 | 613 | 43178 |
3 | 433 | 52937 |
4 | 13 | 1066 |
5 | 56 | 4326 |
6 | 442 | 52661 |
7 | 319 | 28229 |
8 | 229 | 17989 |
We want to detect the event of AF from the study of tachogram series. In some cases, the variability of RR intervals during AF is very high with respect to the physiological heartbeat. However, this remarkable change in the variability of the phenomenon could be absent, as highlighted in Figure
Tachogram of two patients. For patient 1 (a), AF event comes after and is followed by normal sinus rhythm, characterized by low heart rate variability. Patient 4 (b) presents a high rate variability even before and after the AF event.
Tachogram of patient 1
Tachogram of patient 4
The first step consists in the identification of a model for the RR intervals during AF. We used the autocorrelation and partial autocorrelation functions to determine a suitable model. As it is shown in Figure
Patient 1: autocorrelation (a) and partial autocorrelation (b) functions for the time series of RR intervals, of the differences of order one and of the differences of order two.
In order to achieve this goal, let us fix the following values for parameters:
Output of the method for the patients 1 (a) and 5 (b) varying
Some considerations can be extrapolated observing Figure
Dealing with the delay, since each observation is the time between an R peak and the following one, we can evaluate the time of the delay in the detection of the event of AF and not only the number of observations. As it is shown in Table
Delays of the method’s output.
Delays detecting the start of AF
Pat. num. |
|
|
|
---|---|---|---|
1 | 4.3 | 4.9 | 5.4 |
2 | 4.5 | 6.1 | 7.3 |
3 | −2.4 | 0.2 | −4.6 |
4 | 3.9 | 5.9 | 8.4 |
5 | −1.4 | 2.7 | 5.6 |
6 | −2.2 | 1 | 2.8 |
7 | 16.6 | 16.8 | 29.1 |
8 | 4.8 | 6.1 | 7.5 |
Delays detecting the end of AF
Pat. num. |
|
|
|
---|---|---|---|
1 | 3.2 | 4.6 | 6 |
2 | 5.6 | 8.5 | 12 |
3 | 6.8 | 7.2 | 8.9 |
4 | 7.3 | 9.8 | 10.1 |
5 | 5.1 | 5 | 3.3 |
6 | −3.3 | −6.9 | −6.3 |
7 | 3.2 | 5.3 | 7 |
8 | 3.3 | 5.3 | 7.2 |
Another important point we want to focus on is the number of errors made by the proposed method. From a first insight of Figure
Then, a correction can be implemented in order to reduce the number of errors (in this case, the whole time interval detected in a wrong way is considered as an error). We introduced an artificial time delay: after the first instant of output switching from zero to one (or vice versa), we wait for a given time to declare the AF event started (or ended); only if after this time the method is still indicating the presence (or absence) of the phenomenon, we can detect it. The introduction of this correction and its duration are problem driven. Since AF is not a dead risk pathology, the problem concerning the number of errors is more important than the detection delay, and so we chose to insert an artificial time delay of 3 minutes. Doing that, we decreased considerably the number of errors, as shown in Table
Number of errors before (bef. corr.) and after (aft. corr.) the introduction of the artificial time delay (we fixed
Pat. no. | Type-I errors |
Type-I errors |
Type-II errors |
Type-II errors |
Duration AF |
---|---|---|---|---|---|
1 | 0 | 0 | 4 | 1 | 521 |
2 | 1 | 0 | 0 | 0 | 613 |
3 | 16 | 6 | 1 | 1 | 433 |
4 | 0 | 0 | 4 | 4 | 13 |
5 | 1 | 0 | 2 | 0 | 56 |
6 | 23 | 5 | 3 | 1 | 442 |
7 | 8 | 1 | 8 | 3 | 319 |
8 | 0 | 0 | 10 | 6 | 229 |
| |||||
Total | 49 | 12 | 32 | 16 |
In this paper, we proposed a statistical tool to identify starting and ending points of an event of AF (a common cardiac arrhythmia characterized by an irregular heartbeat) starting from the analysis of the RR intervals series. We presented a method based on time series analysis, and we performed a statistical test to automatically recognize the phases “pre-AF,” “AF,” and “post AF,” especially in those situations where the AF event does not follow a physiological time slot and/or the irregular heartbeat is still present when the event finishes. The novelty of this work consists in looking at a structural change of the order (
Then, we applied the method to real RR intervals data. The results we obtained confirmed the goodness of the proposed method, which seems to be able to identify starting and ending points of an event of AF even when AF follows or comes before irregular heartbeat time slots. This is the innovative feature of our method, because the large variety of techniques that deal with the detection of AF do not take into account this particular situation. Since our method analyzes structural changes of the order of the ARIMA model, it can detect AF episodes also in those particular cases when before and/or after the AF event the heartbeat does not follow a normal sinus rhythm, characterized by a significative lower variability. This fact confirms that this methodology may become a helpful tool for the online and/or offline detection of AF. In particular this method could be useful in an offline control of Atrial Fibrillation events, such as a Holter monitor that is a prolonged type of ECG tracing. Since the traditional detection of AF through the analysis of the P wave might be long and hard and, in general, it is simpler to extract the RR intervals from a Holter, the proposed method could represent an automatic diagnostic tool that simplifies the detection of AF events.
The authors wish to thank Professor Luca Mainardi responsible of the Biomedical Signal Processing Laboratory of the Department of Bioengineering, Politecnico di Milano, for supplying the data and Dr. Valeria Vitelli for technical support in the statistical analysis.