Next Article in Journal
Intelligent System for Detecting Deterioration of Life Satisfaction as Tool for Remote Mental-Health Monitoring
Next Article in Special Issue
Dual Wavelength Photoplethysmography Framework for Heart Rate Calculation
Previous Article in Journal
DRL-OS: A Deep Reinforcement Learning-Based Offloading Scheduler in Mobile Edge Computing
Previous Article in Special Issue
Validity of Ultra-Short-Term HRV Analysis Using PPG—A Preliminary Study
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Novel Adaptive Noise Elimination Algorithm in Long RR Interval Sequences for Heart Rate Variability Analysis

by
Vytautas Stankus
1,2,*,
Petras Navickas
2,3,
Anžela Slušnienė
2,
Ieva Laucevičienė
4,
Albinas Stankus
2,† and
Aleksandras Laucevičius
2,3
1
Department of Physics, Kaunas University of Technology, 44249 Kaunas, Lithuania
2
State Research Institute Centre for Innovative Medicine, 08410 Vilnius, Lithuania
3
Clinic of Cardiac and Vascular Diseases, Faculty of Medicine, Vilnius University, 03101 Vilnius, Lithuania
4
Department of Rehabilitation, Physical and Sports Medicine, Faculty of Medicine, Vilnius University, 03101 Vilnius, Lithuania
*
Author to whom correspondence should be addressed.
Deceased.
Sensors 2022, 22(23), 9213; https://doi.org/10.3390/s22239213
Submission received: 30 October 2022 / Revised: 23 November 2022 / Accepted: 24 November 2022 / Published: 26 November 2022

Abstract

:
As heart rate variability (HRV) studies become more and more prevalent in clinical practice, one of the most common and significant causes of errors is associated with distorted RR interval (RRI) data acquisition. The nature of such artifacts can be both mechanical as well as software based. Various currently used noise elimination in RRI sequences methods use filtering algorithms that eliminate artifacts without taking into account the fact that the whole RRI sequence time cannot be shortened or lengthened. Keeping that in mind, we aimed to develop an artifacts elimination algorithm suited to long-term (hours or days) sequences that does not affect the overall structure of the RRI sequence and does not alter the duration of data registration. An original adaptive smart time series step-by-step analysis and statistical verification methods were used. The adaptive algorithm was designed to maximize the reconstruction of the heart-rate structure and is suitable for use, especially in polygraphy. The authors submit the scheme and program for use.

1. Introduction

Heart rate variability (HRV) studies are based on the instantaneous heart rate time series analysis that uses beat-to-beat RR interval (RRI) data derived from an electrocardiographic (ECG) signal. Over the years, research on heart rate and its variability has gained a lot of traction and has spread not only to medicine but to fields of sports, ergonomics, and personal healthcare as well [1]. As it became widely available to every person who cares about his body’s state and health, various time series analysis methods have been proposed. However, in all cases, the accuracy of the results is highly dependent on artifacts occurring in the time sequence [2,3]. These ECG artifacts inevitably originate due to both internal physiological processes that influence the normal sinus heart rhythm (e. g. respiration) [4], as well as external determinants caused by body movements or power line interference, external electromagnetic fields, and hardware/software failures [5], all of which are called “noise” or “artifacts”. These can be classified as base-line wander [6,7,8], power-line interference [8,9,10], muscle artifacts [7,8,11], and channel noise [12]. Although hardware and software development has made great strides in proposing a wide range of solutions and tools for reducing the number of ECG artifacts, the problem of RRI sequence quality remains relevant to this day [13,14,15], since artifacts representing less than 0.1% of the overall record duration may cause variations of up to 50% in some HRV metrics [16].
To improve the quality of the RRI data, researchers have two options to eliminate artifacts. First, to improve the overall signal quality of an ECG signal and improve the accuracy of the ECG QRS complex recognition during the investigation [17] or the second—to identify artifacts in real time or retrospectively within the recorded RRI sequences [18]. Different methods are used for each of the aforementioned options, as the ECG and RRI signals are different in nature: the ECG signal is continuous and its amplitude is measured in volts, while the RRI signal is discrete in nature and its amplitude is measured in seconds. In addition, when the ECG is converted to digital form, the ECG time axis step is constant, while the RRI time axis step is variable. Consequently, this results in different methods being used to process these signals. Overall ECG artifact identification and removal are made possible by various algorithms and are closely dependent on the aim [19]: a data-driven mechanism of empirical mode decomposition [20,21], deep-learning-based models [22], wavelet-based models [23], and sparsity-based, Bayesian-filter-based, and Hybrid models [24]. The majority of them focus on short-duration artifacts, which are often treated in the same way as ectopic beats [25,26,27]. The proposed gap-filling methods are based on an integrated pulse frequency modulation model [25], a rejection filter on the basis that nonpathological artifacts are of small duration and large amplitude [28], based on the tachogram using cubic splines [29].
However, the previous methods change the overall duration of the recording, are only suitable for isolated artifacts, and have not been evaluated for longer artifact segments. There are algorithms designed for longer gap filling, some of which are using Gaussian-distribution-based methods [30]; unfortunately, they are less common and are not designed to retain the overall recording duration.
Another very common method of correction is based on the RRI signal value threshold, when RRI values appear beyond the impossible limits; for example, 350 ms and 1715 ms, respectively [31]. After removing the identified erroneous values, they are replaced by interpolated data. The resulting time sequence is usually depicted as amplitude on the abscissa axis, while the ordinary axis represents frequency or real time. This depiction of the discrete signal enforces the investigators to apply common amplitude artifacts removing algorithms to RRI sequences, despite the inadequacy of its nature, since various filters dominate between them. Therefore, applying it enables us to adequately eliminate a small number of artifacts and thus reduce the overall sequence dispersion and its distribution in the frequency axis. However, it ought to be emphasized that even though the entire duration of the RRI sequence in such a situation becomes slightly shortened or lengthened, the removal of artifacts has a low impact on the time domain and frequency domain HRV metrics [31].
To summarize, there are algorithms for ectopic beats correction [25,32,33,34,35], restoration of missing heartbeats [36], and noise elimination [37]; however, an entirely different picture is seen in which heart rate registrations occur alongside the other processes (physiological and non-physiological). In this instance, it is necessary to maintain a precise synchronization of each RRI with other measurable processes. Therefore, the use of a traditional filter becomes inadequate for the expected results of the analysis, especially when looking for associations between the heart rate and other internal (electromyography, electroencephalography, and others) as well as external factors [18]. It is well acknowledged that “accurate R–R interval artifact correction and editing methods are needed” [38], especially when RRI sequences are very long, and it is complicated to apply manual methods. Consequently, after encountering this issue when dealing with multidimensional processes, we aimed to propose an original RRI sequence artifact elimination algorithm suited for long-term (hours or days) sequences that would overcome the aforementioned limitation and would preserve the overall RRI sequence temporal structure in real-time recordings.

2. Materials and Methods

2.1. Materials

The proposed algorithm was evaluated using long RRI time-sequences collected during monitoring with a 3-channel ECG Holter monitor that has a sampling rate of 600 Hz and 12-bit sampling characteristics (Card(X)plore BPM, ECG & Actigraph from Meditech-Ltd., Budapest, Hungary). The algorithm was based on ECG data from 97 individuals. The analysis encompassed 20,000 RRIs of each patient (~5 h). Dedicated software (LabVIEW, National Instrument, Austin, TX, USA) was used to perform the ECG signal analysis and to employ the proposed algorithm. The study was approved by the Vilnius Regional Biomedical Research Ethics Committee and written informed consent was obtained from all participants (No. 158200-17-889-400). Data analysis was performed using the IBM SPSS Software 21.0 version (SPSS, Chicago, IL, USA). The proposed adaptive algorithm was installed on a machine with LabVIEW and Visual C++ 6.0 running Microsoft Windows 10 on a 3.5 GHz processor and 8 GB of memory.

2.2. Study Population

In total, 97 middle-aged 50–55-year-old subjects (both men and women) were included in the study. Sixty-three subjects were diagnosed with metabolic syndrome (MetS) (according to the modified National Cholesterol Education Program, Adult Treatment Panel III (NCEP-ATP III) criteria), in all of whom arterial blood pressure (BP) of more than 130/85 mmHg was present or they were treated with antihypertensive drugs. The remaining 34 subjects were the same age without MetS and had BP was less than 130/85 mmHg. All subjects were recruited from the ongoing Lithuanian High Cardiovascular Risk (LitHiR) primary prevention program as a part of an ongoing project that analyses metabolic syndrome patients [39]. In addition, daily activities according to the data from the subjects’ diary are presented in Appendix A.

2.3. Proposed Novel Algorithm

We propose a novel adaptive algorithm for noise reduction of the RRI time series, which is aimed at the main limitation that is common for traditionally used algorithms: the alteration of the overall RRI sequence length. The proposed algorithm is designed to maximally restore the sinusoidal heart rate structure and is based on several principles:
  • The difference between the actual duration of the RRI recording and the sum of the identified RRI values at any point in time may not exceed the difference of one average RRI value of the measured interval.
  • The spectral characteristic of the RRI sequence obtained after artifact elimination cannot be artificially distorted.
  • The proposed algorithm is designed for long-term (hours or days) sequences, where it is difficult to precisely carry out artifact elimination without changing the timeline structure.

2.4. Procedural Steps

A detailed representation of the algorithm’s processes is given in Figure 1; however, the algorithm can be conditionally divided into the following steps:

2.4.1. Step 0

The first objective is to separate artifacts from normal RRI values. To do this, the ratios of adjacent RRI values (Coef, Figure 1) were compared to the values of selected window maximum and minimum limits. If there is one artifact in the time sequence, the division of adjacent values (before and after artifact) creates two incorrect values. Therefore, each RRI value must be divided by the average of the moving window of three RRI values. The selected window indicates that all new divided values that appeared in the middle of the window remain unchanged, but values, which appeared outside of them, are named as artifacts. Statistical methods should be used to find these criteria.

2.4.2. Step 1

A very important step in initiating further actions (Init subroutine—Figure 1). A constant memory field (length = 30) filled with RRI values with normal frequency characteristics is formed and averaged. Afterwards, a temporary RRI memory field is allocated for normal and artifact-cleared RRI values with a short moving period (~3 s), from which their moving average will be continuously calculated. It is of the greatest importance that the first three initial RRI values are taken from the sequence itself and without artefacts.

2.4.3. Step 2

All RRI values whose ratio to the moving window average exceeds the upper criterion are corrected with RRI values close to the RRI at that moment (Fill_RR, look at subroutine—Figure 1). The artificial RRI field is filled with RRI values from the backup memory space (length = 30). To avoid the distortion of the frequency sequence structure, the field addresses are chosen randomly. Their average value (length = 30) must be equal to the moving window average (length = 3) at that moment. The time difference between the sum of the bad RRIs found and the sum of the time values filled with new values is stored in the buffer memory. The resulting number of RRIs in the sequence increases. To preserve the time equivalence of the last steps of the observed structure, this step can be continued indefinitely. The added RRI frequency characteristic is equivalent to white noise; it will not affect the other results and will not change their average. The RRI signal values are uncorrelated (independent), just like white noise. The mean of the white noise values is zero and the frequency response is flat and covers the entire frequency band. Thus, by filling the noise-affected sections with a sequence of values whose properties correspond to those of white noise, the characteristics of the RRI signal are preserved. If an artefact exceeds the value of only one RRI, it can be replaced by an average of the moving window values or a predictive value derived from a selected short section of the RRI sequence.

2.4.4. Step 3

RRI values, which have a ratio to the moving window average below the minimum criterion, are corrected by summing the value of the artefact first with the value of the buffer and then with the subsequent values in the time sequence up to the value of the RRI that exceeds the level of the moving field average. It may even be necessary to aggregate several short time intervals, which reduces the number of RRIs in the sequence. Consequently, the shorter RRI value(s) are replaced by the “correct” RRIs values, which are based on the moving window average (or prediction), and the difference of the resulting time sum with it is placed back in the buffer memory.

2.4.5. Step 4

The RRI values, which ratios with the average of a window are within the selected coefficients, are considered normal and are not changed. In this step, the buffer value is continuously checked. When this value exceeds the average of the moving window after the next steps, a new RRI value is added to the main stored heart rate field and the time sequence number is extended by one additional value. The buffer value decreases.

2.4.6. Step 5

After steps 2, 3, and 4, the normal or corrected RRI value(s) are stored in memory or in a file and summed. In this way, this and the following steps maintain the equality between the sum of the original (or real-time) RRI and the sum of all the corrected RRIs.

2.5. Programing Step

With the addition of the necessary inserts, the simplified program provided in Appendix B could be used. The authors deliberately retained a similar symbolism of parameters in the program block diagram and program functions as far as possible.

3. Results

3.1. Criteria Selection

In most cases, RRI values that are outside the distribution of three standard deviations (SD) from the mean (more or less ±3 × SD) are attributed to artifacts. This criterion can be applied when the sequence distribution is normal (Gaussian). However, the distribution of the obtained values changes after the division of adjacent RRI values. It is known that the ratio of two normally distributed random variables has a Cauchy distribution [40]. Hence this distribution has no instantaneous values: mean, variance, or higher moments defined. The mean of the sequence after the division is close to one. In order to find the required criteria, pre-whitening is often performed in such cases, which can be achieved using the autoregressive (AR) model [41]. Since the main one-step operation of artifact exclusion is the division of adjacent RRI values, we consider that in this case, the application of the first-order AR model to RRI sequences is guaranteed by the removal of the first-order link between adjacent RRI.
We use the following dependencies to solve the problem:
e n = R R I n + a 1 R R I n 1
where e n is the Gaussian white noise series with a mean of non-zero and a 1 is the first-order autoregressive coefficient. Remaining noise standard deviation:
σ e = 1 N 1 n e n e ¯ 2
where e ¯ is the mean of en, e(n) is the Gaussian white noise series with a mean of non-zero; a(1) is the first-order autoregressive coefficient; E[x] is the expected x value of the mean.
The AR model was applied to the sequence that results from dividing each RRI value by the moving average of the previous three values. The noise sequence obtained after autoregressive filtering is close to a normal distribution, from which it is possible to find its mean and to find confidence limits of 0.997. These coefficients were used to distinguish normal RRIs from elongated “top” and truncated “bottom” artificial values, which were eliminated. The value three times the standard deviation in both directions of this resulting noise sequence becomes the window limits for the time sequence. The mean of adjacent RRIs ratios is equal to one; therefore, the criteria will be equal to 1 ± 3 × SD. The maximum criterion is obtained by adding 3 × SD value to mean and minimum—by subtracting 3 × SD from it. Outside of these 99.7% limits, RRI values are classified as artifacts.

3.2. Criteria Check

The following methods were used to estimate the effectiveness of the presented algorithm. The standard time-domain variability measurements of values before (RRIb) and after (RRIa) noise elimination are as follows:
μ = 1 N 1 n R R I n
where µ is the mean of RRI, N—number of RRI values.
Variance of RRI:
σ 2 = n R R I n 2 N 1 n R R I n N 1 2
Difference of RRI variance (before–after):
Δ σ 2 = σ R R I b 2 σ R R I a 2
Adjacent differences of RRI series:
Δ R R I n = R R I n R R I n 1
for RRIa and RRIb.
Variance of the adjacent differences for ΔRRIa and ΔRRIb:
σ Δ R R I 2 = n Δ R R I n 2 N 1 n Δ R R I n N 1 2
Short-term standard deviation:
σ 1 = σ Δ R R I 2 2
Long-term standard deviation:
σ 2   = 2 σ 2 Δ σ Δ RRI 2
RRI total time difference:
t R R I = n R R I b n n R R I a n
Numbers of normal RRIs and artifacts with extended (incRRI) and shortened (decRRI) intervals identified.

3.2.1. Time Frequency Analysis

After centering both sequences (subtracting the mean from the sequence), the AR coefficients were calculated by minimizing the least square errors of the forward and backward predictions. AR coefficients return to the estimated coefficients with the value of AR order (k ≥ 16) [42]. The following parameters were calculated in both time sequences (before and after the artifact elimination):
Residual noise before e1n and after artifact elimination e2n according to functions:
e n = R R I n + a 1 R R I n 1 + + a k R R I n k
Remaining noise dispersion:
σ e 2 = n e n 2 N n e n N 2
where en is the Gaussian white noise series with a mean of zero.
Degree of noise reduction in percent:
Δ σ e 2 = 100 σ e 1 2 σ e 2 2 σ e 1 2
Among the subjects, some experienced both fast and slow heart rates (their RRI averages ranged from 656 ms to 1255 ms). The mean of overall RRI was equal to 891 ± 118 ms and did not change after artifact elimination (Table 1). The data presented in the table shows that the variability indexes have significantly changed after the artifact elimination. The total size of the dispersion after the calculations has also significantly decreased (p < 0.001). 15–16,066 ms2 RRI variance interval difference was obtained. This change was also confirmed by other heart rate variability indexes: the variance of adjacent RRI (p < 0.001) and values of the Poincare plot (σ1 and σ2) (p < 0.001). The residual white noise level decreased by 65.0 ± 21.0%, from 2643 ± 3374 ms2 to 473 ± 288 ms2 (p < 0.001). We did not compare the power spectral density of AR spectral density before and after the artifact elimination because, in all cases, as shown in the table, the variance of the two sequences varied greatly. It is clear that the coefficients of AR also differ for the same reasons. In addition, the algorithm was validated in RRI sequences where the total number of artifacts was known. They were not large and were repaired. Accordingly, after artifact elimination, the total number of RRIs increased by up to 230 (mean = 38 ± 51) or decreased by up to 576 RRIs (mean = 45 ± 84) (Table 1). Compared to the entire length of the sequence (20,000) this is a small number, but it has greatly changed the sequence variance.

3.2.2. Time Complexity Analysis

The used algorithm is based on the length of the adjacent RRI. Normal RRI values should be higher than the minimum criteria and lower than the maximum. On this basis, the normal value of RRI is separated from the artifact. For the determination of these criteria, the ratios between all adjacent RRI values were calculated. A statistical analysis of the distribution of these ratios was carried out and their histograms were monitored. Particular attention has been paid to the magnitude of the mutual limits used in the artifact-finding algorithm.
Ninety-seven case studies showed that this value (Table 1, 3 × SD of the ratio of adjacent RRI) varied around 1 from 0.05 to 0.64 with an average of 0.18 ± 0.11. Figure 2 shows that the 3 × SD value is distributed around this average. This indicates that the upper value of the criterion is very close to 1.18 ± 0.11, and the lower value is 0.82 ± 0.11 (1.0 − 0.18 = 0.82). Before the beginning, the artifact elimination procedure of the first-order AR simulation must be performed, and the selection of the exact coefficients is required (Figure 2). The distribution of moments of noise generated by AR simulation is asymmetric and depends on the number of artifacts (Figure 2 and Table 1). Visually, in a separate example, the noise distribution is clearly visible (Figure 3). The values observed on both sides of the average are attributed to artifacts (±3 × SD = 0.18 ± 0.11).

4. Discussion

There are a plethora of fundamentally different RRI processing methods being used, which sometimes makes comparing different HRV data difficult. Although many HRV software uses automatic repair systems, they usually lack information about how they behave with artifacts. Two basic principles were used to construct our proposed method. The first is that:
1.
Autoregressive research and other methods show that strong relationships in the RRI sequence remain not only between adjacent RRIs but also extend to the number of RRI values from 4 to 50 (order of AR model) [43,44].
In that period, any noise will be non-stationary and very strong. Comparing artifacts with adjacent RRI values allows us to identify them within the time sequence. Therefore, changes in adjacent RRI values in our work have been used as the main indicators for separating artifacts from physiological RRI changes. A minimum of three moving RRI values (for average and for window) were selected, with which the next RRI was compared. The stability of the algorithm is conditioned by the fact that none of the artifacts found in all sequences can pass to the moving average window. The last value (third) must include only normal or corrected RRI values in the scrolling field. The second principle is based on the perception that:
2.
Each RRI sequence is made up of “fragmented” real-time intervals, the sum of which should correspond to the actual elapsed registration time.
The proposed algorithm follows the principle that the duration of the time sequence should remain identical to the actual elapsed time, independent of normal RRI values and the number of artefacts present: therefore, long-duration artefacts should be filled with similar expected duration values and very short duration artefacts should be aggregated to a value close to the former RRI (using the above-described method). Changing the length of long or short time intervals by moving the selected average window may shorten the overall sequence duration and lead to a duration difference compared to the actual elapsed time. Therefore, the time difference between the original RRI sequence and the one after artifact elimination, which is always shorter, is placed in the backup buffer and used in the next stage of the operation. Compared to other popular methods, our proposed algorithm does not change the overall length of the ECG recording. Following the use of this algorithm in the analysis, one can safely apply methods of multivariate spectral analysis, which require complete synchronization between the processes registered, since only under such conditions it is possible to accurately assess the existing relationships between the observed processes.
Nonetheless, there are some limitations that are important to note. Firstly, due to the fundamental difference of the proposed method, we were not able to directly compare it with other methods, which are being used by the majority of authors—not even if we used a simple method such as mean-square error: currently, the most commonly used classical artifact elimination algorithm, which maintains a constant number of RRI in a sequence, eliminated artifacts by increasing RRI sequence length in one place and shortening it in another. Secondly, we acknowledge that by design, the proposed algorithm is suited for long-term (hours or days) sequences and, therefore, is not applicable in very short sequences.

5. Conclusions

A novel artifact elimination algorithm that does not affect the overall structure of the RRI sequence and does not alter the overall duration of the sequence has been proposed, and its effectiveness with real-life data has been presented. The proposed algorithm is designed for long-term (hours or days) sequences, in which it is difficult to precisely carry out artifact elimination without changing the timeline structure, and it is especially suitable for use in polygraphy when multiple physiological and other processes associated with other cardiac arrhythmias are registered in parallel. Following the use of this algorithm in the analysis, one can safely apply methods of multivariate spectral analysis, which require a complete synchronization between the processes registered, since only under such conditions is it possible to accurately assess the existing relationships between the observed processes.

Author Contributions

Conceptualization, A.S. (Albinas Stankus), V.S. and A.L.; methodology, A.S. (Anžela Slušnienė); software, A.S. (Albinas Stankus) and V.S.; validation, A.S. (Albinas Stankus); formal analysis, A.S. (Albinas Stankus) and V.S.; investigation, A.S. (Anžela Slušnienė) and I.L.; resources, A.L. and P.N.; data curation, A.S. (Anžela Slušnienė) and I.L.; writing—original draft preparation, A.S. (Albinas Stankus), V.S. and A.S. (Anžela Slušnienė); writing—review and editing, P.N., A.L. and I.L.; visualization, A.S. (Albinas Stankus); supervision, A.L. and P.N.; project administration, P.N.; funding acquisition, A.L. All authors have read and agreed to the published version of the manuscript.

Funding

The study was funded by a grant from the Research Council of Lithuania, project no. S-MIP-19-63 as well as by the Gediminas Gruodis donation allocated in a public institution “Informeda”.

Institutional Review Board Statement

The study was conducted in accordance with the Declaration of Helsinki and approved by the Vilnius Regional Biomedical Research Ethics Committee (No. 158200-17-889-400).

Informed Consent Statement

Informed consent was obtained from all subjects involved in the study.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

Abbreviations

a(1)The first-order autoregressive coefficient.
ARAutoregressive.
AVGAverage of 3 RR intervals.
BPBlood pressure.
BufferReserve of RR interval.
CoefDivision of RRI and average.
decRRIRRIs with shortened intervals.
enThe Gaussian white noise series.
E[x]The expected x value of the mean.
e1nResidual noise before artifact elimination.
e2nResidual noise after artifact elimination.
ECGElectrocardiographic.
H_coeffMaximal criteria.
HRVHeart-rate variability.
incRRIRRIs with extended intervals.
L_coeffMinimal criteria.
LitHiRLithuanian High Cardiovascular Risk primary prevention program.
MetSMetabolic syndrome.
RInput of RR interval from file or device.
RR[ ]Array of normal RRI.
RRIRR interval.
RRIaStandard time-domain variability measurements after noise elimination.
RRIbStandard time-domain variability measurements before noise elimination.
SDStandard deviation.
Time_RRCounter of time.

Appendix A

A table of subjects’ daily activities according to the data of the subject’s diary is provided.
Table A1. Daily activities according to the data from the subjects’ diary.
Table A1. Daily activities according to the data from the subjects’ diary.
Daily Activities, in HoursSubjects without MetSSubjects with MetS
Mean ± SDMean ± SD
Working4.48 ± 4.083.94 ± 3.64
At home2.12 ± 1.782.30 ± 2.18
Walking1.22 ± 0.981.54 ± 1.76
Driving0.71 ± 0.841.08 ± 1.18
Eating1.49 ± 0.880.98 ± 0.45
Lying in bed2.35 ± 2.231.90 ± 2.06
Abbreviations: MetS—metabolic syndrome; SD—standard deviation.

Appendix B

A simplified artifact elimination program is provided.
//*=======================================*/
//* Title: int albsta() */
//*=======================================*/
// function declaration
int Norma();
int Init();
int Fill_RR();
int albsta();
// Fill RRIs constant
int Const_RR [30] = {920, 900, 900, 917, 883, 887, 893, 860, 890, 940,
897, 907, 903, 873, 877, 880, 863, 870, 917, 900, 857, 860, 853, 823,
837, 853, 830, 877, 907, 877};
int R;    // Normal and Corrected RRI
double AVG;     // Moving average of RRI of RR(K) array
long int Nr_RR;      // Counter of R post revision
int Buffer;   // Reserve RRI time (ms)
int K;     // Moving temporary RRI array length
const float High_coefficient = 1.45 // or other;
const float Low_coefficient = 0.75 // or other;
int Kiek;      // Constant RR array length
int RR [3];   // Moving temporary RR(K) array
int Tempor [30];     // temporary array
int R_All [1000];     // Normal and Corrected RRI array
long int Time_RR;    // Adjusted total time from R Length
int C_mean;        // Average of Const_RRI (from 1 To 30)
int Puls;      // Heart Rate
long i;      // Continuously value of a variable
long int c_sum;
//==============Initiates the initial conditions
int Init()
{
long Sum = 0;
Sum = 0;
K = 3;    // Length of moving average array
Kiek = 30;    // length of Constant RRI array
c_sum = 0;
for (i = 1; i <= Kiek; i++) {
c_sum = c_sum + Const_RR[i];
}      // Sum of Constant RR
C_mean = c_sum/Kiek; // Mean of Constant RRI
for (i = 1; i <= K; i++) {
RR[i] = R; // Read first three good RRI
Sum = Sum + R;
}
Nr_RR = 0;   // Counter of normal RRI
AVG = Sum/K;
Buffer = 0;    // Adaptive RRI time buffer
Time_RR = 0;      // Adjusted total time from RRI
}      // Fill in the missing RRI by 30
int Fill_RR()
{
long differ;
long j = 0;
long vv = 0;
int s = 0;
c_sum=0;
differ = C_mean − AVG;
for (i = 1; i <= Kiek; i++) {
Tempor[i] = Const_RR[i] − differ; // Equals the constant
}      // average until it is found
j = R/AVG;
vv = AVG;
Buffer = R − (vv*j);
for (i = 1; i <= j; i++) {
s = rand() % (Kiek − 2) + 1; // Random of array
R = Tempor[s];
c_sum = c_sum + R;
Norma();
}
Buffer = Buffer − c_sum;
}
//*=Fills the fields of the RRI and checks it repeatedly
int Norma()
{
long Sum;
Sum = 0;
for (i = 1; i <= K − 1; i++) {
RR[i] = RR[i + 1];
Sum = Sum + RR[i];
}
RR[K] = R;
Sum = Sum + R;
Time_RR = Time_RR + R;  // Time counter
AVG = Sum/K;  // Moving average RRI(k)
Nr_RR = Nr_RR + 1;    // All RR counter
R_All[Nr_RR] = R;      // Add a RR value
Puls = 60000/R;  // Heart rate
}
}
//===Main program==============================
int albsta()
{
double Coef;
double ccc;
double Sum;
Sum =0;
Init();   // Initiates the initial values
// New RRI are expected, For example…1000
for (i = 1; i <= 1000; i++) {   // Input R from file or device
if (i <= 3) {
Sum = Sum + R;
AVG = Sum/3;
RR[i] = R;
} else {
Coef = R/AVG;   // Division RRI and average
// Long RRI
if (Coef > High_coefficient) {
R = R + Buffer;
Fill_RR();
}
// Normal RRI
if (Coef <= High_coefficient & Coef > Low_coefficient) {
Norma();
if (Buffer >= AVG) {
R = AVG;
Buffer = Buffer − AVG;
Norma();
}
}
// Short RRI
if (Coef < Low_coefficient) {
R = Buffer + R;
ccc = R/AVG;
if (ccc >= High_coefficient) {
Fill_RR();
} else {
Buffer = R;
}
}
}
}
}

References

  1. Sammito, S.; Thielmann, B.; Seibt, R.; Klussmann, A.; Weippert, M.; Böckelmann, I. Guideline for the application of heart rate and heart rate variability in occupational medicine and occupational science. ASU Int. 2015, 2015, 1–29. [Google Scholar] [CrossRef]
  2. Malik, M. Task Force of the European Society of Cardiology and the North American Society of Pacing and Electrophysiology, heart rate variability—Standards of measurement, physiological interpretation, and clinical use. Circulation 1996, 93, 1043–1065. [Google Scholar] [CrossRef] [Green Version]
  3. Kher, R. Signal processing techniques for removing noise from ECG signals. J. Biomed. Eng. Res. 2019, 3, 1–9. [Google Scholar] [CrossRef] [Green Version]
  4. Jarchi, D.; Charlton, P.; Pimentel, M.; Casson, A.; Tarassenko, L.; Clifton, D.A. Estimation of respiratory rate from motion contaminated photoplethysmography signals incorporating accelerometry. Heal. Technol. Lett. 2019, 6, 19–26. [Google Scholar] [CrossRef] [PubMed]
  5. Clifford, G.D.; Azuaje, F.; Mc Sharry, P. Advanced Methods and Tools for Ecg Data Analysis; Artech House Boston: Boston, MA, USA, 2006. [Google Scholar]
  6. Clifford, G.D.; Azuaje, F.; Mcsharry, P. Ecg Statistics, Noise, Artifacts, and Missing Data. Adv. Methods Tools ECG Data Anal. 2006, 6, 18. [Google Scholar]
  7. Friesen, G.M.; Jannett, T.C.; Jadallah, M.A.; Yates, S.L.; Quint, S.R.; Nagle, H.T. A comparison of the noise sensitivity of nine QRS detection algorithms. IEEE Trans. Biomed. Eng. 1990, 37, 85–98. [Google Scholar] [CrossRef]
  8. Satija, U.; Ramkumar, B.; Manikandan, M.S. A Review of Signal Processing Techniques for Electrocardiogram Signal Quality Assessment. IEEE Rev. Biomed. Eng. 2018, 11, 36–52. [Google Scholar] [CrossRef]
  9. Van Alste, J.A.; Schilder, T.S. Removal of Base-Line Wander and Power-Line Interference from the ECG by an Efficient FIR Filter with a Reduced Number of Taps. IEEE Trans. Biomed. Eng. 1985, 12, 1052–1060. [Google Scholar] [CrossRef] [Green Version]
  10. Levkov, C.; Mihov, G.; Ivanov, R.; Daskalov, I.; Christov, I.; Dotsinsky, I. Removal of power-line interference from the ECG: A review of the subtraction procedure. Biomed. Eng. Online 2005, 4, 50. [Google Scholar] [CrossRef] [Green Version]
  11. Frølich, L.; Dowding, I. Removal of muscular artifacts in EEG signals: A comparison of linear decomposition methods. Brain Inform. 2018, 5, 13–22. [Google Scholar] [CrossRef] [Green Version]
  12. Velayudhan, A.; Peter, S. Noise analysis and different denoising techniques of ECG signal-a survey. IOSR J. Electron. Commun. Eng. 2016, 1, 40–44. [Google Scholar]
  13. Berntson, G.G.; Quigley, K.S.; Jang, J.F.; Boysen, S.T. An Approach to Artifact Identification: Application to Heart Period Data. Psychophysiology 1990, 27, 586–598. [Google Scholar] [CrossRef] [PubMed]
  14. Kaufmann, T.; Sütterlin, S.; Schulz, S.M.; Vögele, C. ARTiiFACT: A tool for heart rate artifact processing and heart rate variability analysis. Behav. Res. Methods 2011, 43, 1161–1170. [Google Scholar] [CrossRef] [PubMed]
  15. Wu, C.-M.; Chen, S.-C.; Chen, Y.-J. A multiple bio-signal measurement analysis and warning system for the long-term health care of severe disabled. Microsyst. Technol. 2016, 24, 155–163. [Google Scholar] [CrossRef]
  16. Kemper, K.J.; Hamilton, C.; Atkinson, M. Heart Rate Variability: Impact of Differences in Outlier Identification and Management Strategies on Common Measures in Three Clinical Populations. Pediatr. Res. 2007, 62, 337–342. [Google Scholar] [CrossRef] [Green Version]
  17. Luz, E.J.D.S.; Schwartz, W.R.; Cámara-Chávez, G.; Menotti, D. ECG-based heartbeat classification for arrhythmia detection: A survey. Comput. Methods Programs Biomed. 2016, 127, 144–164. [Google Scholar] [CrossRef]
  18. Imtiaz, S.A.; Mardell, J.; Saremi–Yarahmadi, S.; Rodriguez–Villegas, E. ECG artefact identification and removal in mHealth systems for continuous patient monitoring. Healthc. Technol. Lett. 2016, 3, 171–176. [Google Scholar] [CrossRef] [Green Version]
  19. Al Mahamdy, M.; Riley, H.B. Performance Study of Different Denoising Methods for ECG Signals. Procedia Comput. Sci. 2014, 37, 325–332. [Google Scholar] [CrossRef] [Green Version]
  20. Huang, N.E.; Shen, Z.; Long, S.R.; Wu, M.C.; Shih, H.H.; Zheng, Q.; Yen, N.-C.; Tung, C.C.; Liu, H.H. The empirical mode decomposition and the Hilbert spectrum for nonlinear and non-stationary time series analysis. Proc. R. Soc. Lond. Ser. A Math. Phys. Eng. Sci. 1998, 454, 903–995. [Google Scholar] [CrossRef]
  21. Singh, G.; Kaur, G.; Kumar, V. ECG Denoising using Adaptive Selection of IMFs through EMD and EEMD. In Proceedings of the 2014 International Conference on Data Science & Engineering (ICDSE), Kochi, India, 26–28 August 2014. [Google Scholar]
  22. Cajal, D.; Hernando, D.; Lázaro, J.; Laguna, P.; Gil, E.; Bailón, R. Effects of Missing Data on Heart Rate Variability Metrics. Sensors 2022, 22, 5774. [Google Scholar] [CrossRef]
  23. Dwivedi, A.K.; Ranjan, H.; Menon, A.; Periasamy, P. Noise Reduction in ECG Signal Using Combined Ensemble Empirical Mode Decomposition Method with Stationary Wavelet Transform. Circuits Syst. Signal Process. 2020, 40, 827–844. [Google Scholar] [CrossRef]
  24. Chatterjee, S.; Thakur, R.S.; Yadav, R.N.; Gupta, L.; Raghuvanshi, D.K. Review of noise removal techniques in ECG signals. IET Signal Process. 2020, 14, 569–590. [Google Scholar] [CrossRef]
  25. Mateo, J.; Laguna, P. Analysis of heart rate variability in the presence of ectopic beats using the heart timing signal. IEEE Trans. Biomed. Eng. 2003, 50, 334–343. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  26. Nabil, D.; Reguig, F.B. Ectopic beats detection and correction methods: A review. Biomed. Signal Process. Control 2015, 18, 228–244. [Google Scholar] [CrossRef]
  27. Zhao, L.; Li, J.; Xiong, J.; Liang, X.; Liu, C. Suppressing the Influence of Ectopic Beats by Applying a Physical Threshold-Based Sample Entropy. Entropy 2020, 22, 411. [Google Scholar] [CrossRef] [Green Version]
  28. Mc Names, J.; Thong, T.; Aboy, M. Impulse rejection filter for artifact removal in spectral analysis of biomedical signals. In Proceedings of the 26th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, San Francisco, CA, USA, 1–5 September 2004. [Google Scholar]
  29. Lee, M.-Y.; Yu, S.-N. Improving discriminality in heart rate variability analysis using simple artifact and trend removal preprocessors. In Proceedings of the 2010 Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC 2010), Buenos Aires, Argentina, 31 August–4 September 2010. [Google Scholar]
  30. Benchekroun, M.; Chevallier, B.; Istrate, D.; Zalc, V.; Lenne, D. Preprocessing Methods for Ambulatory HRV Analysis Based on HRV Distribution, Variability and Characteristics (DVC). Sensors 2022, 22, 1984. [Google Scholar] [CrossRef]
  31. Stapelberg, N.J.C.; Neumann, D.L.; Shum, D.H.K.; McConnell, H.; Hamilton-Craig, I. A preprocessing tool for removing artifact from cardiac RR interval recordings using three-dimensional spatial distribution mapping. Psychophysiology 2016, 53, 482–492. [Google Scholar] [CrossRef]
  32. Lippman, N.; Stein, K.M.; Lerman, B.B. Comparison of methods for removal of ectopy in measurement of heart rate variability. Am. J. Physiol. Circ. Physiol. 1994, 267, H411–H418. [Google Scholar] [CrossRef]
  33. Acar, B.; Savelieva, I.; Hemingway, H.; Malik, M. Automatic ectopic beat elimination in short-term heart rate variability measurement. Comput. Methods Programs Biomed. 2000, 63, 123–131. [Google Scholar] [CrossRef]
  34. Solem, K.; Laguna, P.; Sörnmo, L. Handling of ectopic beats in heart rate variability analysis using the heart timing signal. Proc. Med. Conf. Med. Biol. Eng. 2004, 2004. Available online: http://diec.unizar.es/intranet/articulos/uploads/%20Handling%20Of%20Ectopic%20Beats%20In%20Heart%20Rate%20Variability%20Analysis%20Using%20The%20Heart%20Timing%20Signal.pdf (accessed on 29 October 2022).
  35. Barbieri, R.; Brown, E. Analysis of Heartbeat Dynamics by Point Process Adaptive Filtering. IEEE Trans. Biomed. Eng. 2005, 53, 4–12. [Google Scholar] [CrossRef] [PubMed]
  36. Zhang, Q.; Zhou, D.; Zeng, X. A novel machine learning-enabled framework for instantaneous heart rate monitoring from motion-artifact-corrupted electrocardiogram signals. Physiol. Meas. 2016, 37, 1945–1967. [Google Scholar] [CrossRef] [PubMed]
  37. Mishra, P.; Singla, S.K. Artifact Removal from Biosignal using Fixed Point ICA Algorithm for Pre-processing in Biometric Recognition. Meas. Sci. Rev. 2013, 13, 7–11. [Google Scholar] [CrossRef]
  38. Peltola, M.A. Role of editing of R–R intervals in the analysis of heart rate variability. Front. Physiol. 2012, 3, 148. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  39. Slušnienė, A.; Laucevičius, A.; Navickas, P.; Ryliškytė, L.; Stankus, V.; Stankus, A.; Navickas, R.; Laucevičienė, I.; Kasiulevičius, V. Daily Heart Rate Variability Indices in Subjects with and Without Metabolic Syndrome Before and After the Elimination of the Influence of Day-time Physical Activity. Medicina 2019, 55, 700. [Google Scholar] [CrossRef] [Green Version]
  40. Weisstein, E.W. Normal Ratio Distribution. From MathWorld—A Wolfram Web Resource. Available online: https://mathworld.wolfram.com/NormalRatioDistribution.html (accessed on 1 March 2022).
  41. Marple, S. Digital Spectral Analysis with Applications; Prentice-Hall: Englewood Cliffs, NJ, USA, 1987; pp. 130–273. [Google Scholar]
  42. Boardman, A.; Schlindwein, F.S.; Rocha, A.P.; Leite, A. A study on the optimum order of autoregressive models for heart rate variability. Physiol. Meas. 2002, 23, 325–336. [Google Scholar] [CrossRef]
  43. Arsenos, P.; Manis, G. Deceleration Capacity of heart rate: Two new methods of computation. Biomed. Signal Process. Control 2014, 14, 158–163. [Google Scholar] [CrossRef]
  44. Pereira, T.; Almeida, P.R.; Cunha, J.P.; Aguiar, A. Heart rate variability metrics for fine-grained stress level assessment. Comput. Methods Programs Biomed. 2017, 148, 71–80. [Google Scholar] [CrossRef]
Figure 1. The stepwise procedure of adaptive algorithm (R—input of RR interval from file or device; AVG—average of 3 RR intervals; Coef—division of RRI and average; L_coeff and H_coeff—minimal and maximal criteria; RR[ ]—array of normal RRI; Time_RR—counter of time; Buffer—reserve of RR interval).
Figure 1. The stepwise procedure of adaptive algorithm (R—input of RR interval from file or device; AVG—average of 3 RR intervals; Coef—division of RRI and average; L_coeff and H_coeff—minimal and maximal criteria; RR[ ]—array of normal RRI; Time_RR—counter of time; Buffer—reserve of RR interval).
Sensors 22 09213 g001
Figure 2. Distribution of averaged artifact standard deviation (3 × SD) of all 97 cases.
Figure 2. Distribution of averaged artifact standard deviation (3 × SD) of all 97 cases.
Sensors 22 09213 g002
Figure 3. Artifact distribution after autoregressive RRI modeling in a separate case.
Figure 3. Artifact distribution after autoregressive RRI modeling in a separate case.
Sensors 22 09213 g003
Table 1. Changes in RRI variability before and after artifact elimination.
Table 1. Changes in RRI variability before and after artifact elimination.
Variable, UnitsVariable SymbolsBeforeAfterPaired t-Test
RangeMean ± SDRangeMean ± SD
Mean of RRI, msμ656–1255891 ± 118656–1258890 ± 1191.79
Variance of RRI, ms2σ22736–45,45014,247 ± 85862721–44,27712,298 ± 75566.57 *
Difference of RRI variance, ms2 Δσ2 15–16,0661948 ± 2922
Variance of adjacent RRI, ms2 σ Δ R R I 2 83–29,3953959 ± 548168–2561656 ± 4816.07 *
Variance of AR noise, ms2 σ e 2 77–17,1742643 ± 337460–1469473 ± 2886.53 *
Decrease in variance AR noise, % Δ σ e 2 13–9865 ± 21
RRI total time difference, mstRRI −1596–968215 ± 430
Short-term, msσ1 6–12137 ± 246–3617 ± 69.29 *
Long-term, msσ2 74–299156 ± 4674–297149 ± 446.78 *
Normal RRI numberNr 19,263–19,99919,915 ± 118
Increased RRI numberincNr 0–23038 ± 51
Decreased number of RRIsdecNr 0–57645 ± 84
3 × SD of ratio of adjacent RRI 0.05–0.640.18 ± 0.110.02–0.040.051 ± 0.02511.8 *
* denotes a statistically significant difference (p < 0.001). Abbreviations: RRI—R-R interval; AR—autoregressive.
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Stankus, V.; Navickas, P.; Slušnienė, A.; Laucevičienė, I.; Stankus, A.; Laucevičius, A. A Novel Adaptive Noise Elimination Algorithm in Long RR Interval Sequences for Heart Rate Variability Analysis. Sensors 2022, 22, 9213. https://doi.org/10.3390/s22239213

AMA Style

Stankus V, Navickas P, Slušnienė A, Laucevičienė I, Stankus A, Laucevičius A. A Novel Adaptive Noise Elimination Algorithm in Long RR Interval Sequences for Heart Rate Variability Analysis. Sensors. 2022; 22(23):9213. https://doi.org/10.3390/s22239213

Chicago/Turabian Style

Stankus, Vytautas, Petras Navickas, Anžela Slušnienė, Ieva Laucevičienė, Albinas Stankus, and Aleksandras Laucevičius. 2022. "A Novel Adaptive Noise Elimination Algorithm in Long RR Interval Sequences for Heart Rate Variability Analysis" Sensors 22, no. 23: 9213. https://doi.org/10.3390/s22239213

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop