1. Introduction
Electrocardiogram (ECG) is a leading tool used for monitoring and diagnosing cardiac diseases. Many heart conditions are intermittent and paroxysmal in nature and can be detected and observed only with continuous long-term ECG monitoring. Patients are typically given a Holter monitor with wet electrodes connected to it via wires for continuous monitoring. This device has several drawbacks: (1) the monitor has to be carried in a pouch by the patient, which makes it inconvenient; (2) the subjects’ body movements can cause concomitant shifting of ECG leads, which may negatively affect electrodes’ contact with the skin, thereby reducing signal fidelity [
1]; (3) wet electrodes can cause skin irritation, bacterial growth, and signal degradation with prolonged duration [
2]. Another option for continuous monitoring is recently developed patch devices [
3]. Even though these devices are less bulky and do not have wires, they still have wet electrodes that are attached to the chest via adhesive, which are known to cause skin irritation with prolonged use.
To overcome the limitations of Holter monitors and patch devices, a wearable armband designed to be worn on the upper left arm has recently been developed in our lab [
4]. The armband contains three sets of carbon-based dry electrodes [
2] that, when used differentially, can acquire three ECG channels simultaneously. The advantages of this device are no sources of skin irritation and no need for wires. Due to the fact that the armband is positioned over two main limb muscles, the biceps and triceps, ECG signals could theoretically be corrupted with significant motion noise artifacts and muscle noises. However, it was shown that the armband is a suitable device for long-term ECG monitoring, especially during nighttime recording, when the device provides ~95% usable ECG data [
4]. For daytime recordings to be usable, an innovative signal processing approach was developed to obtain ~75% of the data [
4]. However, due to muscle and movement artifacts, better approaches are needed to utilize more usable data with these types of wearable devices.
Many techniques have been proposed for denoising ECG signals. Guler and Ubeyli used a model based on a neural network for ECG denoising [
5]. Several studies used adaptive filtering as a denoising algorithm [
6,
7], while Tracey and Miller used a nonlocal means approach [
8]. Selesnick proposed a sparsity-assisted signal smoothing (SASS) method that combined low-pass filtering and generalized total-variation denoising approaches [
9]. He et al. proposed a denoising algorithm that uses independent component analysis (ICA) [
10]. Algorithms based on various versions of the Kalman filter have been proposed [
11,
12,
13]. Denoising algorithms based on wavelet transform are well explored in the literature [
14,
15,
16,
17,
18], while some researchers proposed denoising algorithms based on empirical mode decomposition (EMD) [
19,
20,
21,
22]. Akhbari et al. proposed a method based on a nonlinear dynamic model, which uses Gaussian functions [
23]. Zhou et al. proposed an algorithm that approximates an ECG signal as the linear combination of structures and removes the additive random noise and baseline wandering [
24]. Various variations of denoising autoencoders were used in [
25,
26].
Presence of noise in ECG signals is unavoidable, and it is difficult and a challenging task to separate it from the signal. Having in mind that noise has a complex structure and often consists of various components that have different, usually unknown frequency distributions, common and simple filtering techniques (such as linear filtering) typically do not provide effective results. To this end, we applied a denoising algorithm based on the redundant convolutional encoder–decoder (R-CED) network [
27]. In order to show the robustness of our algorithm, we applied it to: (1) 24-h ECG recordings acquired with a wearable armband device developed in our lab when different noise types of varying levels were added to the data segments that were designated as clean; (2) 24-h ECG recordings corrupted with motion artifacts that are acquired with a wearable armband device developed in our lab; (3) recordings from the Massachusetts Institute of Technology-Beth Israel Hospital (MIT-BIH) arrhythmia database [
28,
29]. By doing so, we show that our algorithm was able to remove various noise types (deliberately added colored noises, and motion artifacts), as they simulate various scenarios that can occur in ECG signals acquired with different devices.
The evaluation of the denoising algorithm was performed by R-peak detection in clean, noisy, and denoised sequences and by calculating signal quality indices: signal-to-noise ratio (SNR) improvement, the ratio of power, and cross-correlation with respect to the clean sequences. While we used the armband for the development of the denoising algorithm, the method can potentially be applied to the data from any other ECG device including Holter and patch monitors. We highlight the use of an armband in this application because it provides a good test for the denoising algorithm, since the device is not common and more prone to noise, hence, it is a good testbed. Our rationale is that if the denoising algorithm works for the armband, it should be equally or more applicable to commonly available ECG devices. While the existing denoising methods require a signal from an external ECG recording device to denoise the signal, our algorithm uses only the ECG recordings from the armband wearable device, which is one of the main advantages and innovations of our algorithm. Finally, the main purpose of denoising was to obtain reliable QRS complexes, so that heart-rate estimates could be obtained. Heart rates are important clinical information, as they can be used for analysis of heart-rate variability and cardiac arrhythmia detection including atrial fibrillation [
30].
4. Discussion
An algorithm for denoising of electrocardiogram signals is presented. Long-term ECG signals were recorded with a wearable armband device that was worn by one male participant for 24 h during daily life routines on the upper left arm. Three different datasets were used for testing the proposed denoising algorithm: (1) recordings from armband device with added colored noises; (2) armband recordings corrupted with motion artifacts; (3) recordings from the MIT-BIH arrhythmia database [
28,
29].
The R-CED network was used as a denoising algorithm. The trained R-CED network was tested on noisy test sequences, and the performance of the proposed algorithm was measured by applying the Pan and Tompkins R-peak detection algorithm and by calculating signal quality indices (SNR improvement, ratio of power, and cross-correlation with respect to the clean sequences).
When the denoising algorithm was applied to sequences corrupted with added noise, the percentage of correctly detected R-peaks in denoised sequences was higher than in noisy sequences—we achieved 100% accuracy in denoised sequences when blue and purple noises were added. The improvement in SNR values varied between 7 dB and 19 dB. The ratios of power for noisy sequences were significantly lower when compared to those of both clean and denoised sequences. Similarly, cross-correlations between noisy and clean sequences were significantly lower than between denoised and clean sequences.
The results on the second dataset showed that the R-peaks in denoised sequences were detected with the highest accuracy, 91.86%, followed by clean (88.6%) and noisy sequences (61.16%). The improvement in SNR values was 0.39 ± 0.83 (mean ± sd). Ratios of power for clean, noisy, and denoised sequences were 0.74 ± 0.02, 0.61 ± 0.07, and 0.71 ± 0.03, respectively, with statistically significant differences between noisy and clean sequences, as well as between noisy and denoised sequences. The cross-correlation between noisy and clean sequences was 0.74 ± 0.08 and was lower than between denoised and clean sequences (0.77 ± 0.06). As can be observed, the proposed denoising algorithm significantly improved the quality of the signal. Note that, since the signals were recorded during daily life routines, noisy signals were corrupted with motion artifacts and muscle-induced noises.
These results were compared to results obtained by applying five other methods on the same dataset. We applied methods based on: DWT [
14], EMD-DWT [
20], EMD-ASMF [
22], SASS [
9], and VFCDM [
37]. The proposed denoising algorithm, R-CED network, achieved the highest ratio of power for denoised sequences jointly with the method based on VFCDM. Regarding the cross-correlation between denoised and clean sequences, the proposed algorithm obtained a significantly higher value than DWT-based method and a very similar value to EMD-DWT-, EMD-ASMF-, SASS-, and VFCDM-based methods. The percent of correctly detected R-peaks for denoised sequences of the proposed algorithm achieved a significantly higher value than DWT-, EMD-DWT-, and SASS-based methods and a very similar value to EMD-ASMF- and VFCDM-based methods. It is worth mentioning that both EMD-DWT- and EMD-ASMF-based methods require an external QRS complex detector and additional postprocessing steps in order to correct the R-peaks. Similarly, VFCDM-based method also requires additional postprocessing steps during the denoising process. In contrast, the proposed R-CED denoising algorithm does not use any postprocessing steps, which makes this algorithm a more general method. In addition, once trained, R-CED algorithm performs much faster than the other five existing methods. These are the few advantages and innovations of the proposed algorithm.
Two tests were performed on sequences from the MIT-BIH arrhythmia database. When the denoising algorithm, trained on 10-s armband sequences was tested on 60-s sequences from the arrhythmia database, the improvement in SNR value was 7.08 ± 0.25 dB (mean ± sd). Moreover, when the denoising algorithm was trained and tested on 60-s sequences from the same database, we achieved 7.43 ± 0.81 dB (mean ± sd) SNR improvement.
Other denoising techniques have been reported in the literature. Sayadi and Shamsollahi presented an ECG denoising algorithm based on the modified extended Kalman filter structure and validated the performance on recordings from the MIT-BIH arrhythmia database [
12]. The authors showed improvements in SNR values. We used the same test sequences from the same time frames as reported in [
12]. The SNR improvement after applying our algorithm is slightly lower (~2 dB in mean value) than in [
12], but we achieve notably lower standard deviation (0.25 dB as opposed to 0.52 dB). It is worth noting that our algorithm has several advantages over the algorithm proposed in [
12]. The first advantage is that the standard deviation achieved is twice as low and the mean value of SNR improvement is only slightly lower. Note that our results were obtained when the denoising algorithm was trained with sequences that are not from the MIT-BIH database but from sequences recorded with our wearable device. The second advantage is that the algorithm based on Kalman filters is adaptive and needs time to adjust and track the signal at hand, whereas our algorithm does not need that additional time to adapt to the signal. Lastly, our denoising algorithm is trained once and can be applied to any sequence of any duration, as opposed to the algorithm proposed in [
12] that needs to be adjusted every time a new sequence is used for testing and cannot be used on sequences of short durations (e.g., 10-s sequences).
Akhbari et al. applied a denoising algorithm on MIT-BIH arrhythmia and noise stress test databases and achieved good SNR improvement [
23]. Even though we used the same test recordings as in [
23], a direct comparison of results is not possible because the authors did not provide the time frames within recordings used for their analysis. Xiong et al. proposed a stacked contractive denoising autoencoder to denoise ECG sequences [
25] and applied it to ECG signals from the MIT-BIH arrhythmia database and noise from the MIT-BIH noise stress test database. The results reported in [
25] showed improvements in the signals; however, they were reported in a sequence-based manner and not overall, and the time frames of sequences used were not stated in the paper, thus we cannot make direct comparison to our results. Zhou et al. applied denoising algorithm to sequences from the MIMIC II database and to sequences with added simulated noise and performed QRS complex detection [
24]. The direct comparison between our results and results from [
24] cannot be performed, due to the differences in reported performance measures. B’charri et al. proposed an algorithm based on the dual tree wavelet transform and used simulated ECG recordings as well as the MIT-BIH arrhythmia and noise stress test databases [
17]. Again, the direct comparison of our results with results presented in [
17] cannot be performed due to the fact that the authors of [
17] presented results in a sequence-based and not overall manner, and the time frames of sequences used was not stated in the paper. Hesar and Mohebbi utilized the marginalized particle extended Kalman filter as a denoising algorithm and evaluated it on the MIT-BIH normal sinus rhythm and arrhythmia databases, where sequences in both databases were contaminated with Gaussian white noise and noise from the MIT-BIH noise stress test database with predefined noise levels [
13]. The direct comparison between our results and results from [
13] cannot be performed due to the differences in reported performance measures.
Most importantly, as shown in
Table 5, the denoised signal using our approach resulted in 91.86% (from 61.16% for the noise contaminated), whereas for the clean signal, it was only 88.6% accurate in correctly detecting QRS complexes. This suggests our method improves the signal quality of even the clean signal and surpasses the performance of one of the most cited peak detection methods [
35]. Therefore, this result suggests the proposed algorithm is quite effective in filtering out undesired noise sources, which preclude accurate QRS complex detection. Moreover, the proposed algorithm does not require any postprocessing steps nor any ECG signals from external devices for high denoising performance, which makes this algorithm a more general and faster method than other existing denoising methods.