Next Article in Journal
A Visual Measurement Method for Deep Holes in Composite Material Aerospace Components
Previous Article in Journal
Novel Reference Method for the Characterization of PD Measuring Systems Using HFCT Sensors
Previous Article in Special Issue
Clinical Effect Analysis of Wearable Sensor Technology-Based Gait Function Analysis in Post-Transcranial Magnetic Stimulation Stroke Patients
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Artificial Intelligence-Based Atrial Fibrillation Recognition Method for Motion Artifact-Contaminated Electrocardiogram Signals Preprocessed by Adaptive Filtering Algorithm

1
Shanghai Institute of Microsystem and Information Technology, Chinese Academy of Sciences, Shanghai 200050, China
2
Key Laboratory of Intelligent Perception, and Image Understanding of Education Ministry of China, School of Artificial Intelligence, Xidian University, Xi’an 710071, China
3
Academy of Advanced Interdisciplinary Research, Xidian University, Xi’an 710071, China
*
Authors to whom correspondence should be addressed.
These authors contributed equally to this work.
Sensors 2024, 24(12), 3789; https://doi.org/10.3390/s24123789
Submission received: 2 April 2024 / Revised: 30 May 2024 / Accepted: 6 June 2024 / Published: 11 June 2024
(This article belongs to the Special Issue Novel Wearable Sensors and Digital Applications)

Abstract

:
Atrial fibrillation (AF) is a common arrhythmia, and out-of-hospital, wearable, long-term electrocardiogram (ECG) monitoring can help with the early detection of AF. The presence of a motion artifact (MA) in ECG can significantly affect the characteristics of the ECG signal and hinder early detection of AF. Studies have shown that (a) using reference signals with a strong correlation with MAs in adaptive filtering (ADF) can eliminate MAs from the ECG, and (b) artificial intelligence (AI) algorithms can recognize AF when there is no presence of MAs. However, no literature has been reported on whether ADF can improve the accuracy of AI for recognizing AF in the presence of MAs. Therefore, this paper investigates the accuracy of AI recognition for AF when ECGs are artificially introduced with MAs and processed by ADF. In this study, 13 types of MA signals with different signal-to-noise ratios ranging from +8 dB to −16 dB were artificially added to the AF ECG dataset. Firstly, the accuracy of AF recognition using AI was obtained for a signal with MAs. Secondly, after removing the MAs by ADF, the signal was further identified using AI to obtain the accuracy of the AF recognition. We found that after undergoing ADF, the accuracy of AI recognition for AF improved under all MA intensities, with a maximum improvement of 60%.

1. Introduction

Atrial fibrillation (AF), commonly referred to as AF, is a prevalent arrhythmia, and its timely diagnosis is crucial for patient management and treatment. The occurrence of AF is associated with various physiological and pathological conditions, including exercise. Studies have shown that high-intensity, short-duration exercise can lead to overactivation of the sympathetic nervous system, while prolonged endurance exercise may increase parasympathetic tone. These physiological responses can shorten the action potential duration and effective refractory period of atrial myocytes, increase the autoactivation of atrial myocytes, and thereby increase the risk of AF [1,2]. Unfortunately, electrocardiogram (ECG) monitoring in non-static environments, especially during exercise, is often disturbed by motion artifacts (MAs). These artifacts are primarily caused by relative movement between the electrodes and the skin. Nearly all non-rest activities generate electromagnetic noise, which is particularly common in routine ECG monitoring [3]. The presence of these artifacts not only affects the quality of the ECG signal but also reduces the accuracy of QRS wave recognition [4]. In ECG, AF is typically characterized by irregularity of QRS waves and the absence of P waves [5]. Therefore, the presence of MAs poses a significant barrier to the accurate identification of AF.
However, it remains challenging to remove the disturbance of MAs from an ECG signal. Due to the overlap of MAs and the components of the ECG signal in frequency [6], as shown in Figure 1 (MAs are marked with red arrows) and Table 1, traditional filtering methods are difficult to effectively remove MAs.
To address the issue of MA, it has been previously proposed to sand the skin to remove the stratum corneum [7]. However, damaged skin will grow back during long-term monitoring, and the skin may also become infected due to damage, so this method is not suitable for early screening of AF. Another approach to eliminate MA is through signal processing, which commonly involves adaptive filtering algorithms and blind source separation algorithms [8].
Blind source separation (BSS) algorithms can extract independent source signals from measured signals based on statistically independent relationships between the source signals [9]. Due to the origin of biometric signals from the activities of different organs and tissues in the human body, they are statistically independent and orthogonal in multidimensional space. Therefore, BSS methods can be used to extract different independent signals, including MA signals that are different from the source of ECG signals. However, this method requires a large amount of computation and requires multi-channel ECG signals for correlation analysis, which is not suitable for long-term early screening applications of AF.
Adaptive filtering technology combined with a reference signal with a strong correlation to MAs can effectively eliminate MAs and improve the accuracy and reliability of the ECG signal [10]. Adaptive filtering is a technique that can automatically adjust filter parameters based on the characteristics of the reference signal [11], and is widely used in biometric signal processing. It can be used to process ECG signals of the fetus [11], eliminate 50 Hz power line interference [11,12], eliminate electromyographic noise interference [13], and eliminate base-line shifts in ECG signals [12,13]. In addition, it has a low computational burden [14], high reliability, and can handle single-channel ECG signals [15], making it very suitable for long-term early screening applications of AF.
In recent years, deep learning models have played a pivotal role in the detection and diagnosis of AF [1,2,3,4,5]. To enhance the efficiency and accuracy of AF recognition, researchers have proposed ECG signal classification models based on convolutional neural networks (CNN) [16] and improved deep learning models that combine CNN with long short-term memory (LSTM) networks [17]. These models effectively extract and deeply mine features from ECG signals to achieve AF recognition [18]. Additionally, there have been studies presenting intelligent diagnosis methods based on one-dimensional convolutional neural networks [19] and AF detection methods combining the Hilbert–Huang transform with deep convolutional neural networks [20]. These methods have demonstrated a reasonable performance and proved its strong generalization ability and robustness. However, MAs still significantly undermine the performance of deep learning models when processing real-world data [21]. Recent study has focused on denoising methods based on neural network autoencoders, achieving encouraging results [22]. Nevertheless, the test sets used in these studies are relatively small and do not include real-time dynamic ECG signals, limiting their widespread application in practical scenarios.
In summary, MAs can affect the accuracy of AF recognition, adaptive filtering can effectively eliminate MAs, and deep learning algorithms can effectively identify AF. Therefore, it is necessary to study whether the preprocessing of adaptive filtering algorithm for ECG signals containing MAs can help deep learning further improve the accuracy of AF recognition. However, due to the fact that existing databases of AF ECG signals generally do not contain MAs, there is no reference signal required for adaptive filtering that is correlated with MAs. There has not been study available reporting on the accuracy of AF recognition for ECG signals containing MA.
Given the lack of strong correlated reference signals in publicly available ECG databases provided by authoritative institutions, research worldwide had adopted methods of self-developed reference signal detection equipment to address this issue. Reference signals were mainly divided into three categories: electrode skin contact impedance, skin deformation, and three-axis acceleration, and Table 2 provides their classification. We developed a reference signal detection device that can detect skin stretch deformation synchronized with the ECG signal.
Therefore, in this study, our research can be separated as three steps:
  • Proposing a method of artificially adding MA to AF ECG signals.
  • Proposing preprocessing of the aforementioned ECG signals containing MA using adaptive filtering algorithms before identifying AF by AI algorithms.
  • The AI algorithm that combines knowledge guidance and attention has been applied in AF identification.
In summary, this paper innovatively combines an adaptive filter algorithm with AI techniques, proposing a novel multi-stage algorithm to identify atrial fibrillation in ECG signals affected by motion artifacts.
The second section of this paper will introduce the basic ECG features for recognizing AF, introduce the detection methods for skin stretch deformation signals strongly related to MAs, introduce the algorithm for adding MAs to the ECG, introduce the adaptive filtering algorithm, and introduce the neural network algorithm for AF recognition. The third section of this paper will introduce the experimental methods and results, and the fourth section will discuss the final experimental results (accuracy of AF recognition). The fifth section will summarize this paper.

2. Method

2.1. Basic ECG Characteristics of AF

The occurrence of AF arises from abnormal electrical impulses suddenly originating from the atria. These impulses disrupt the normal rhythm of the heart and overshadow its natural pacemaker activity. AF causes irregular and abnormally rapid contractions of myocardial cells, leading to alterations in the heart’s rhythm and resulting in an irregular heartbeat, palpitations, dizziness, shortness of breath, and fatigue. Diagnosis of AF from an ECG primarily involves observing the following three characteristics in the electrocardiographic signal: unequal RR intervals, the disappearance of the P wave, and the appearance of the F wave, as shown in Figure 2. When these three features are present in the ECG, a diagnosis of AF can be made [50].

2.2. Detection of Skin Stretching Signals

To detect skin stretching signals, we employed flexible and stretchable sensors made from liquid metal particles [51]. These sensors were attached to the skin surface a few millimeters away from the electrodes, with one sensor placed horizontally and the other vertically to the ground plane, as shown in Figure 3. The circular patch in the top right corner represents a traditional electrocardiogram electrode, while two elongated stretch sensors are placed to the left and below it. The sensor signals were processed through an amplifier, converted to digital signals by an analog-to-digital converter, and then saved as data files on a computer. Figure 4 shows the deformation signals captured by the sensors when the skin was stretched manually, with a total of five stretches performed.

2.3. Algorithm for Adding MA to ECG

In our study, we utilized the AF dataset from the PhysioNet Challenge 2017 database, which contains a large collection of ECG signal data from patients with AF. To better understand and evaluate the performance of deep learning models in processing ECG signals contaminated with MA, we artificially added motion artifact signals with signal-to-noise ratios (SNRs) ranging from +8 dB to −16 dB.
First, we conducted all experiments using authentic ECG data from the PhysioNet Challenge 2017 database [52]. This dataset comprises 8528 de-identified (aimed at ensuring data privacy and preventing identification of specific individuals) ECG records, including 738 from AF patients and 7790 from a non-AF control group. The durations of these records range from 9 s to just over 60 s, with a sampling frequency of 300 Hz. The richness of this dataset makes it an ideal choice for evaluating models for arrhythmia recognition and classification.
Next, we added calibrated amounts of noise from various motion artifact noise records to the authentic ECG data (from the PhysioNet Challenge 2017 database) to assess the noise tolerance and performance improvement of our approach. Since the ECG signals in the clean records were sampled at 300 Hz, and the motion artifact noise records were sampled at 1000 Hz, resulting in a frequency difference exceeding 10%, we down sampled the motion artifact noise records to generate new 300 Hz sampled noise records.
In the testing phase, we characterized the noise level using the SNR. SNR is a metric that describes the relative strength of a signal compared to the background noise, typically measured in decibels (dB). It is a crucial indicator for assessing signal quality and is particularly important in fields such as communication systems and signal processing. The SNR is calculated using the following formula:
S N R = 10 log S / N
where S represents the power of the signal, and N represents the power of the noise.
Each clean ECG signal ( c l e a n   s i g n a l ) was paired with a noise signal ( n o i s e   s i g n a l ). From the noise record, the calibrated amount of noise ‘ a n o i s e   s i g n a l ’ was added to the c l e a n   s i g n a l using the following formula:
o u t p u t _ s i g n a l = c l e a n   s i g n a l + a n o i s e   s i g n a l
Where the ‘output signal’ represents the motion artifact ECG signal with MA, and ‘a’ is the gain. The gain ‘a’ is specified by the SNR and is influenced by the signal’s power S and the noise’s power N:
a = S N × 1 0 S N R 10
This scaling factor adjusts the amplitude of the noise signal so that the power of the noise signal added to the original signal equals the target noise power, maintaining a specific SNR. This allows us to simulate ECG signals in real-world scenarios where patients are performing daily activities. This is crucial for evaluating and improving the performance of deep learning models in processing ECG signals contaminated with MA.

2.4. Adaptive Filter Algorithm

The adaptive noise cancellation algorithm requires the output signal of a primary sensor as the desired signal d k and the output signal of another sensor as the reference signal x k . The desired signal consists of an ideal, undistorted signal s k and a noise signal n k . It is assumed that there is no correlation between the ideal undistorted signal s k and the noise signal n k , while the reference signal x k is correlated with the noise signal n k , as shown in Figure 5.
Widrow [11] demonstrated that minimizing the mean square error (MSE)—the mathematical expectation E e k of e k —results in the undistorted, ideal signal with the noise removed.
Assuming that s k , n k , x k , and y k are statistically stationary signals with zero mean, the output of the filter is given by:
e k = s k + n k y k
Taking the mean square of both sides of the equation above, and given that the signal s k is uncorrelated with both n k and y k , we obtain the following expression:
E e 2 k = E s 2 k + E n k y k 2 + 2 E s k n k y k = E s 2 k + E n k y k 2
By employing an appropriate filter algorithm, we can minimize E e 2 k . At this point, the second term on the right-hand side of the equation is also minimized.
m i n E e 2 k = E s 2 k + m i n E n k y k 2
Therefore, the output y k of the filter serves as the least squares estimate of the noise n k . Similarly, since e k s k = n k y k , when E n k y k 2 is minimized, E e k s k 2 is also minimized. Consequently, minimizing the mean square error results in the error signal e(k) being the best least squares estimate of the original undistorted signal s(k). When E n k y k 2 = 0 , we have E e 2 k = E s 2 k , indicating that at this point, n k = y k and e k = s k . Therefore, the error signal e k represents the ideal, undistorted signal s k free from noise.
In our study, we used the standard ADF structure, as shown in Figure 4. The least mean square (LMS) was used as adaptive algorithm. The equation of this ADF is as follows:
Y k = W k · X k W k + 1 = W k + μ · e ( k ) · X ( k ) μ = β · 0.5 + e x p α · e ( k ) α = 0.01 β = 0.0005

2.5. Brief Overview of the Neural Network Algorithm for AF Recognition

Multi-layer knowledge-guided attention network: This is a deep learning-based approach that can predict cardiac diseases from ECG signals while providing intuitive interpretations.
Multi-layer feature extraction and fusion: This method utilizes convolutional neural networks and bi-directional long short-term memory networks to extract rhythm, morphology, and frequency features from ECG signals. These features are then fused through a multi-layer attention mechanism.
Knowledge-guided attention mechanism: This approach leverages knowledge from the ECG domain to guide the computation of attention, enabling the model to focus on signal portions relevant to diagnosis. This enhances the interpretability and accuracy of the model.

2.5.1. Introduction to Neural Networks for AF Recognition

In our study, we introduce a neural network model for atrial fibrillation detection, which processes single-lead ECG signals and employs multi-level attention mechanisms, as depicted in Figure 6. The model initially segments the single-lead ECG signals into multiple fragments, and then applies a beat-level convolutional attention layer and a rhythm-level recurrent attention layer to each fragment to capture beat-level and rhythm-level attention information. Subsequently, a fusion and prediction layer perform dimension transformation and integrates hierarchical information to predict the category probabilities of heartbeat signals. The incorporation of a knowledge-guided attention mechanism further enhances the model’s performance and interpretability, specifically learning attention weights at the rhythm and tempo levels. This mechanism enables the model to focus more on key features related to atrial fibrillation detection within the ECG signals, thereby improving the accuracy of predictions. From a medical point of view, the diagnostic criteria of AF are mainly the changes in the morphology of the ECG signal caused by the inconsistent RR interval and the disappearance of the P wave. These two morphological changes have been taken into account in Section 2.5.3 and Section 2.5.4 of our models.

2.5.2. Signal Preprocessing and Segmentation

Prior to atrial fibrillation recognition, it is indispensable to subject the single-lead ECG signal x to a meticulous series of preprocessing steps, aimed at ensuring high data quality and enhancing the accuracy of subsequent analyses. Initially, a bandpass filter (typically set within the range of 0.5 Hz to 40 Hz) is utilized to eliminate high-frequency noise and low-frequency drift in the signal, thereby ensuring its clarity. Herein, the cutoff frequency for the low-pass filter, F L P , is set to 40 Hz, and that for the high-pass filter, F H P , to 0.5 Hz. The selected bandpass filter is a finite impulse response (FIR) filter, the length and design of which are determined based on the sampling rate of the signal and the characteristics of the required frequency band. Subsequently, the signal is normalized to eliminate differences in amplitude, using the z-score normalization method.
After preprocessing, the ECG signal x is segmented into M equal-length segments, denoted as s. In contrast to previous deep learning models that employed QRS complex detection for segmentation, which is susceptible to signal quality issues, we opt not to use it. Instead, a straightforward sliding window method is employed for segmentation. By setting the index range for each ith segment from ( i 1 × T ) to ( i × T 1 ) , M segments of equal length T are obtained. This method enables more detailed analysis and modeling of each segment.

2.5.3. Heartbeat-Level Attention Convolutional Layer

The core of the attention mechanism is defined by the formula:
Attention Q , K , V = Softmax Q K T d k V
where d k represents the dimensionality of the keys (key). This formula begins by calculating the dot product similarity between the queries (query, Q ) and keys (key, K ), followed by normalization through the Softmax function, and finally multiplying by the values (value, V) to produce a weighted output. Q , K , and V are obtained by linearly transforming the input matrix X with different trainable parameter matrices W Q ,   W K , and W V , respectively:
Q = X W Q
K = X W K
V = X W V
where W Q , W K , and W V are trainable parameter matrices. The input matrix X is linearly transformed by multiplying with these three parameter matrices to generate the matrices Q , K , and V .
To effectively capture the beat-level features in ECG signals, especially for recognizing abnormal waveforms or edge features, we designed a heartbeat-based attention convolutional layer. This layer, leveraging the local connections, weight sharing, and pooling operations of convolutional neural networks, efficiently processes abnormal waveforms and edges in the signals, demonstrating outstanding performance. Notably, we introduce attention mechanism parameters W Q , W K , and W V , using features extracted by the convolutional layer to guide the attention and improve interpretability at the beat level.
The process unfolds as follows: The signal undergoes a differentiation operation diff x , followed by a padding function pad x to compensate for dimension changes caused by differentiation, highlighting the rate of change in the signal. The differentiated and padded signal is then processed through a one-dimensional convolution operation C o n v x , with different convolutional kernels generating specific convolutional features for Q , K , and V . These convolutional features are normalized norm x , distributing weights between 0 and 1, which helps stabilize computation and gradients. Finally, the normalized convolutional features are used in a matrix multiplication operation with the original signal x to generate Q h e a r t b e a t , K h e a r t b e a t , and V h e a r t b e a t .
Q h e a r t b e a t = x n o r m C o n v Q p a d ( d i f f ( x ) T
K h e a r t b e a t = x n o r m C o n v K p a d ( d i f f ( x ) T
V h e a r t b e a t = x n o r m C o n v V p a d ( d i f f ( x ) T
Through this methodology, our model focuses more precisely on key locations within the ECG signal, enhancing its ability to recognize and analyze beat-level features and providing robust support for accurate anomaly detection in heartbeats. The design of this layer not only improves the model’s interpretability regarding heartbeat signals but also enhances the overall performance and interpretability of the model. The CNN in the heartbeat-level attention convolutional layer is instrumental in discerning intricate morphological details. This layer is trained to identify small fluctuations in the data by exploiting the property that the convolution operation is sensitive to data fluctuations. By guiding the attention mechanism with features by convolution, we hope that these features encapsulate the subtle differences in P-wave patterns in various signals as much as possible, thus enhancing the model to distinguish AF based on these subtle morphological changes to some extent.

2.5.4. Rhythm-Level Attention Recurrent Layer

For the identification of rhythm-level patterns, our focus lies in detecting abnormal rhythm variations within the ECG signal, crucial for accurately capturing arrhythmic events. The gated recurrent unit (GRU) [53,54], known for its sensitivity to time series data, serves as our ideal tool for analyzing rhythm changes. Incorporating a knowledge-guided attention mechanism allows us to effectively integrate physiological knowledge at the rhythm level, enhancing the model’s focus on rhythm-level concerns and its ability to recognize and interpret significant rhythm changes within the signal. The implementation is as follows:
For a given ECG signal x R N × T , where N represents the batch size and T the sequence length, we first apply a differentiation operation to highlight signal changes, followed by padding to maintain sequence length:
Diff x = x : , 0 , : , x : , 1 : , : x : , : 1 , :
The signal, after differentiation and padding, is processed by a GRU network. This network is preferred over traditional LSTM networks due to its simplified structure, which improves computational efficiency while preserving the ability to capture long-term dependencies. Features necessary for query, key, and value are extracted using three distinct configurations of the GRU network:
GRU Q Diff x , GRU K Diff x , GRU V Diff x
The GRU outputs are transformed into corresponding weights through linear transformation layers, followed by normalization to ensure weight distribution between 0 and 1, enhancing model learning efficiency:
W Q r h y t h m = softmax Linear Q GRU Q Diff x
W K r h y t h m = softmax Linear K GRU K Diff x
W V r h y t h m = softmax Linear V GRU V Diff x
Finally, by performing dot product operations between the processed signal x and the normalized weights, query, key, and value are generated, completing the attention mechanism construction:
Q r h y t h m = x W Q r h y t h m T , K r h y t h m = x W K r h y t h m T , V r h y t h m = x W V r h y t h m T
Through these steps, our model not only captures significant rhythm changes in the ECG signal but also effectively enhances the accuracy and interpretability of arrhythmia detection through the knowledge-guided attention mechanism. This process underscores the potential and advantages of deep learning models in ECG signal processing, particularly in rhythm-level analysis. The rhythm-level attention recurrent layer utilizes the power of GRU, a variant of recurrent neural networks, to analyze and interpret the sequential patterns of ECG rhythms. GRU is good at capturing temporal dependencies, making it partly an ideal tool for identifying abnormal RR intervals, a hallmark of atrial fibrillation. After training, this layer operates on higher feature dimensions to guide the attention mechanism to extract features. Somewhat further enhances the ability of the model to distinguish between normal and abnormal rhythms based on the inherently complex, time-varying features of AF signals.

2.5.5. Fusion and Prediction

In our deep learning analysis of ECG signals, we employ an innovative end-to-end architecture integrating two key attention modules: a beat-level recurrent attention layer and a heartbeat-based attention convolutional layer. Furthermore, the model dynamically adjusts its focus on different parts of the ECG signal through a fully connected layer, optimizing its ability to predict atrial fibrillation.
Adaptive allocation of attention weights, guided by knowledge, fuses the beat-level recurrent attention layer with the heartbeat-based attention convolutional layer. Given the heartbeat-level features A t t e n t i o n h e a r t b e a t and rhythm-level features A t t e n t i o n r h y t h m , the model computes the contribution of each feature type to the final prediction and dynamically adjusts their weights. Combining both beat-level and heartbeat-level features, along with their weights, the model generates the final prediction probability P A F , determining whether the ECG signal indicates the presence of atrial fibrillation:
A t t e n t i o n h e a r t b e a t = Softmax Q h e a r t b e a t × K h e a r t b e a t T d k V h e a r t b e a t
A t t e n t i o n r h y t h m = Softmax Q r h y t h m × K r h y t h m T d k V r h y t h m
P A F = sigmoid softmax FC concat A t t e n t i o n h e a r t b e a t , A t t e n t i o n r h y t h m
where the ( sigmoid ) function maps the output to a probability space between 0 and 1, representing the likelihood of the signal being atrial fibrillation. ( FC ) denotes a fully connected layer, and ( concat ) indicates the operation of feature concatenation.

3. Experimental Methodology and Results

The post-training model undertakes AF identification upon receiving ECG signals. The experiments were conducted on a workstation equipped with an Intel i7 9700k CPU, NVIDIA GeForce RTX 4090 GPU, and 24 GB RAM, leveraging the PyTorch framework. The dataset, divided into records, was organized into a training set (75%), validation set (10%), and test set (15%), constituting the foundation for all training and evaluation tasks. Model optimization was facilitated by the Adam optimizer, initialized with a learning rate of 0.001, halved every 10 epochs in the absence of improvement on the validation set. A batch size of 96 was employed to optimize computational resources and learning stability, with cross-entropy loss utilized for this classification task. Performance metrics comprised accuracy, precision, recall, and F1-score.
In Section 2.5.2, preprocessing and segmentation of single-lead ECGs, denoted as x, sampled at 300 Hz and with a duration of 9000 samples, were carried out. Segments of length T = 3000 samples were extracted with a step size of 500 samples, thereby dividing the ECG signal x into M = 12 equal-length segments. Section 2.5.3 details the heartbeat-level attention convolutional layer, configured with a depth of 2. This layer employs 8 attention heads, each with a dimensionality of 8, balancing expressiveness and computational efficiency. Three distinct one-dimensional CNNs, each configured with 32 filters, a kernel size of 3, a stride of 1, and padding of 1, guide the initialization of query (Q), key (K), and value (V) for the attention mechanism. Section 2.5.4 discusses the beat-level attention recurrent layer, also featuring a depth of 2, and maintaining the configuration of 8 attention heads with a dimension size of 8. For initializing QKV, three separate GRU (gated recurrent unit) layers are adopted, each GRU composed of 2 layers with 32 hidden units. Subsequently, a linear layer follows each GRU, transforming the segment length input of 3000 to an output dimension of 64, aligning with the combined head count and dimension size for attention computations.
Figure 7 summarizes the experimental procedure. In the experiment, (a) we extracted 771 AF recordings from the MIT-BIH Database (MIT-BIH contains a total of 8528 ECG recordings) to serve as the original dataset without added MA interference. (b) Subsequently, we obtained the deformation of the skin surface on the right chest during running exercise from a stretch sensor. (c) Referring to the Equation (1), we superimposed the stretch sensor signal onto the AF signal to generate an artificially synthesized AF signal with MAs, termed the noise signal (NS). (d) We employed an adaptive filtering algorithm (described in Section 2.4) to process both the AF signal with MAs and the stretch sensor signal, resulting in an AF signal with MAs removed, termed the filter signal (FS). (e) Finally, we used a neural network recognition algorithm to process both the AF signal with MAs and the AF signal without MAs, obtaining recognition results for each signal.
In this experiment, a volunteer participated after being informed of the relevant experimental content. The volunteer wore a self-developed, single-lead ECG detection module [10] with ECG electrodes placed on the right chest and hips. Additionally, a stretch sensor was attached to the left and lower sides of the ECG electrode on the right chest, with a 0.5 cm interval. During the experiment, the volunteer sat in a chair for 10 min of rest before the experiment began. The experiment consisted of a 30-s period of standing still (a), followed by 30 s of running exercise, where arm swinging induced skin stretching on the chest (b). Afterward, there was another 10-s period of standing still (c). Each experiment lasted for 70 s, and a total of five experiments were conducted. Among these five experiments, the most stable result was selected for subsequent data analysis. Figure 7 presents the results of this selected data.
As observed in Figure 8, (a) during the initial 30 s of stillness, the stretch sensor signal remains stable, and the ECG signal is relatively stable without significant interference. (b) From 30 to 60 s, during the running exercise, the stretch sensor detects a pronounced skin stretching signal, and there are evident MAs present in the ECG signal. (c) In the final 10 s of stillness, the stretch sensor signal returns to a stable value, and the ECG signal also stabilizes. This indicates that skin stretching is a source of MAs in ECG signals and is correlated with these artifacts.
In subsequent experiments, we superimposed the stretch sensor signal onto the AF database using the formula presented in Section 2.3, resulting in AF signals containing MAs, referred to as noise signal (NS), as shown in Figure 9.
In the experiment, we modified the weighting coefficient ‘a’ in Equation (2) to obtain 13 different noise signals (NS) with a uniformly distributed SNR ranging from +8 to −16 dB. Subsequently, we analyzed the correlation between the NS signals and the stretch sensor signals to obtain correlation data under different SNR conditions, as presented in Table 3. As observed from Table 3, the correlation between the two signals increases as the SNR decreases, indicating an increase in the energy of MA.
The core of correlation analysis lies in computing the correlation coefficient between two signals. Among the most commonly used is the Pearson correlation coefficient, which quantifies the strength and direction of the linear relationship between two variables. The value of the correlation coefficient ranges from −1 to 1, where 1 indicates a perfect positive correlation, −1 indicates a perfect negative correlation, and 0 indicates no correlation.
In this formula, x and y represent the observed values of the signals, and n is the number of observations.
Now, we have two sets of signals: one is the AF signal contaminated with MAs, and the other is the stretch sensor signal. Subsequently, we fed these two signal sets into an adaptive filtering algorithm. After processing with the adaptive filtering algorithm, we obtained the AF signal with MAs removed, referred to as the filter signal (FS), as shown in Figure 10.
The formula for calculating the Pearson correlation coefficient is given as follows:
[ r = n x y x y n x 2 x 2 n y 2 y 2 ]
We further examined the signal-to-noise ratio (SNR) of the filter signal (FS) after removing MAs from 900 sets of noise signals (NS) with different SNRs to assess the effectiveness of motion artifact removal, as presented in Table 4. Our findings indicate that as the SNR of the NS decreases, the SNR of the FS after adaptive filtering to remove MAs also decreases. This suggests that while the adaptive filtering can eliminate a portion of the MAs, it does not completely remove all the motion artifact energy.
The basic formula for calculating SNR is shown in Equation (1). The formula for computing the SNR of the FS after removing MAs from the NS is given as follows:
SNR   ( dB ) = 10 log 10 P s i g n a l N S P n o i s e N S
In this formula, s i g n a l N S represents the signal after removing MA from the NS, n o i s e N S =   s i g n a l N S   s i g n a l o r i g i n , where s i g n a l o r i g i n is the original signal without added noise. P refers to the power of the signal.
Neural network algorithm described in Section 2.5 is to identify both the NS and FS, resulting in the detection of AF. By comparing our findings with the annotations provided in the MIT-BIH database, we obtained the final accuracy data for AF detection.
Figure 11 shows the F1 scores for detecting ECG signals at varying SNR levels. The F1 score is a metric that measures the balance between the precision and recall of a classification model, particularly in datasets where class distribution is imbalanced. It is the harmonic mean of precision and recall, thus requiring both to be high for the F1 score to be high. In binary classification tasks, a high F1 score indicates that the model is both accurate and comprehensive in identifying positive cases (such as positive disease diagnoses). The F1 score is especially crucial for applications where the cost of both false negatives and false positives is significant.
In Figure 11, two curves are presented: the red curve represents the F1 score for AF detection in noisy ECG signals—those not subjected to any filtering process. The blue curve signifies the F1 score for AF detection in filtered ECG signals—those processed to remove noise using a filter. The graph illustrates that the F1 scores for AF detection improve with an increase in SNR for both conditions, but the filtered ECG consistently demonstrates higher F1 scores across the SNR spectrum than the noisy ECG. Particularly at low SNR levels (SNR < 0 dB), filtering significantly enhances the F1 score for AF detection, underscoring the effectiveness of filtering in improving AF detection performance in low-quality ECG signals.

4. Discussion: Accuracy of AF Detection

After performing the aforementioned experiments on 900 sets of AF data, we obtained the AF detection accuracy with and without MAs, as shown in Figure 10. The red dots represent the AF detection accuracy with MA across a signal-to-noise ratio (SNR) range of −16 to 8, while the blue dots represent the accuracy with MAs removed within the same SNR range. From the figure, it can be observed that when the SNR is above four, the AF detection accuracy is nearly identical for both signals with and without MAs. However, when the SNR is below two, the AF detection accuracy for signals containing MAs drops significantly, nearing 0%. In contrast, the accuracy for signals with MA removed does not decrease as sharply, slowly declining to around 70%.
The accuracy in Figure 10 is calculated by the following equation:
F 1   S c o r e = 2 × P r e c i s i o n × R e c a l l P r e c i s i o n + R e c a l l
where recall and precision are obtained using the following formulas:
R e c a l l = T P R T P R + F N R
P r e c i s i o n = T P R T P R + F P R  
Corresponding to the three parameters in the above equation, the results obtained in the experiment are shown in Figure 12.
From Figure 12a,b, it can be observed that for AF signals containing MAs, there are fewer true positive detections and more false negative detections when the signal-to-noise ratio (SNR) is below −12 dB. However, when the SNR is above −10 and less than 4, there are more true positive detections and fewer false negative detections.
These results suggest that when MAs are strong, it is necessary to remove them for accurate AF detection. However, when MAs are not strong, the algorithm for removing them may introduce additional distortion, leading to poorer detection results. Therefore, the algorithm can first identify the strength of MAs and then apply different data processing strategies for different levels of MAs.
It is evident from Figure 12a,b that the separation between the red and blue points is smaller when the SNR is above −10 dB and less than 4 compared to when the SNR is below −12. Statistical analysis of this observation is presented in Table 5. It can be seen that the difference between the red and blue points for strong MAs with an SNR below −10 dB is three times greater than that for weak MA with an SNR above −10 dB and less than 4 dB.
The results suggest that the distortion caused by the motion artifact removal algorithm leads to a decrease in AF detection accuracy in the presence of low-intensity MAs, although the magnitude of this decrease is smaller than the improvement achieved in high-intensity MAs. In other words, if the strength of the MA is not distinguished and the algorithm is applied to all intensities of MAs, the improvement in detection accuracy achieved in high-intensity MAs is significantly higher than the decrease in detection accuracy achieved in low-intensity MAs.
From Figure 12c, it can also be observed that AF signals containing MAs exhibit fewer false positive detections compared to signals with MAs removed. This finding demonstrates the significant role of motion artifact removal methods.

5. Conclusions

The aim of this study was to investigate the accuracy of AF detection in signals with artificially added MAs after adaptive filtering. To achieve this, we used the AF dataset from the PhysioNet Challenge 2017 database and artificially added motion artifact signals with SNR ranging from 8 dB to −16 dB. First, we performed AF detection using an artificial intelligence algorithm on these signals with MAs to obtain the detection accuracy in the presence of MAs. This step provided baseline data for subsequent comparative analysis. Next, we applied adaptive filtering to these signals to remove the MAs. After adaptive filtering, we performed AF detection again to obtain the detection accuracy without MAs. By comparing the AF detection accuracy with and without MAs, we could assess the impact of adaptive filtering on AF detection. We found that in the case of strong MAs, the motion artifact removal algorithm improved the accuracy of AF detection, while in the case of weak MAs, the algorithm slightly decreased the accuracy. We also found that the AF detection accuracy of the signals after adaptive filtering improved across all intensities of MAs, with a maximum improvement of 60%. Our study demonstrates that, given a reference signal strongly correlated with MAs, the use of adaptive filtering techniques can significantly improve the accuracy of AF detection in ECG signals with strong MAs.
Stretch deformation, being one typical source of MAs within ECG recordings, is primarily studied in this paper. As running is the most common cause of MAs, our research mainly focuses on MAs induced by running. Additionally, other activities or body movements, including respiratory and muscular activities, could also induce MAs in the ECG signal. Due to the complexities of detecting these activities using conventional sensors, they pose great challenges in signal interpretation. Our future research will explore advanced methodologies to more accurately detect and analyze these diverse sources of artifacts, ranging from subtle movements between the sensor and the body to broad types of physical activity.

Author Contributions

Conceptualization, H.Z. (Huanqian Zhang); methodology, H.Z. (Huanqian Zhang); software, H.Z. (Hantao Zhao); validation, H.Z. (Huanqian Zhang) and H.Z. (Hantao Zhao); formal analysis, H.Z. (Huanqian Zhang); investigation, H.Z. (Huanqian Zhang) and H.Z. (Hantao Zhao); resources, H.Z. (Huanqian Zhang) and H.Z. (Hantao Zhao); data curation, H.Z. (Huanqian Zhang) and H.Z. (Hantao Zhao); writing—original draft preparation, H.Z. (Huanqian Zhang) and H.Z. (Hantao Zhao); writing—review and editing, H.Z. (Huanqian Zhang) and H.Z. (Hantao Zhao), Z.G.; visualization, H.Z. (Huanqian Zhang) and H.Z. (Hantao Zhao); supervision, H.Z. (Huanqian Zhang) and Z.G.; project administration, H.Z. (Huanqian Zhang); funding acquisition, H.Z. (Huanqian Zhang). All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Shanghai Pujiang Program (22PJ1415300), the Open Research Fund of State Key Laboratory of Digital Medical Engineering (2023-K06), the National Natural Science Foundation of China (62301395), and the Shaanxi Province Postdoctoral Science Foundation (2023BSHEDZZ177).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data are contained within the article.

Acknowledgments

The author would like to thank Shuiping Gou from Xidian University for her advice. The author would like to thank Dongyi Chen from the University of Electronic Science and Technology of China for his advice.

Conflicts of Interest

The authors declare no conflicts 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.

References

  1. Parry-Williams, G.; Sharma, S. The effects of endurance exercise on the heart: Panacea or poison? Nat. Rev. Cardiol. 2020, 17, 402–412. (In English) [Google Scholar] [CrossRef]
  2. Calvo, N.; Brugada, J.; Sitges, M.; Mont, L. Atrial fibrillation and atrial flutter in athletes. Br. J. Sports Med. 2012, 46 (Suppl. 1), i37–i43. (In English) [Google Scholar] [CrossRef]
  3. Redmond, S.J.; Xie, Y.; Chang, D.; Basilakis, J.; Lovell, N.H. Electrocardiogram signal quality measures for unsupervised telehealth environments. Physiol. Meas. 2012, 33, 1517–1533. (In English) [Google Scholar] [CrossRef]
  4. Mont, L.; Sambola, A.; Brugada, J.; Vacca, M.; Marrugat, J.; Elosua, R.; Paré, C.; Azqueta, M.; Sanz, G. Long-lasting sport practice and lone atrial fibrillation. Eur. Heart J. 2002, 23, 477–482. [Google Scholar] [CrossRef]
  5. Turagam, M.K.; Flaker, G.C.; Velagapudi, P.; Vadali, S.; Alpert, M.A. Atrial Fibrillation in Athletes: Pathophysiology, Clinical Presentation, Evaluation and Management. J. Atr. Fibrillation 2015, 8, 1309. (In English) [Google Scholar] [CrossRef]
  6. Berwal, D.; Vandana, C.R.; Dewan, S.; Jiji, C.V.; Baghini, M.S. Motion Artifact Removal in Ambulatory ECG Signal for Heart Rate Variability Analysis. IEEE Sens. J. 2019, 19, 12432–12442. [Google Scholar] [CrossRef]
  7. Burbank, D.P.; Webster, J.G. Reducing skin potential motion artefact by skin abrasion. Med. Biol. Eng. Comput. 1978, 16, 31–38. [Google Scholar] [CrossRef]
  8. Sweeney, K.T.; Ward, T.E.; McLoone, S.F. Artifact Removal in Physiological Signals—Practices and Possibilities. IEEE Trans. Inf. Technol. Biomed. 2012, 16, 488–500. [Google Scholar] [CrossRef]
  9. Li, C. Study on Some Algorithms for Blind Source Separation and Their Applications; Xidian University: Xi’an, China, 2010. [Google Scholar]
  10. Zhang, H.; Zhang, S.; Du, X.; Tao, R.; Jin, Q.; Li, Q.; Yang, J.; Zhao, J. A multi-channel electrode tissue impedance detection approach for motion artifact suppression in ambulatory electrocardiography. In Proceedings of the 2015 Computing in Cardiology Conference (CinC), Nice, France, 6–9 September 2015; pp. 117–120. [Google Scholar] [CrossRef]
  11. Widrow, B.; Glover, J.R.; McCool, J.M.; Kaunitz, J.; Williams, C.S.; Hearn, R.H.; Zeidler, J.R.; Dong, E., Jr.; Goodlin, R.C. Adaptive noise cancelling: Principles and applications. Proc. IEEE 1975, 63, 1692–1716. [Google Scholar] [CrossRef]
  12. Mugdha, A.C.; Rawnaque, F.S.; Ahmed, M.U. A study of recursive least squares (RLS) adaptive filter algorithm in noise removal from ECG signals. In Proceedings of the 2015 International Conference on Informatics, Electronics & Vision (ICIEV), Fukuoka, Japan, 15–18 June 2015; pp. 1–6. [Google Scholar] [CrossRef]
  13. Thakor, N.V.; Zhu, Y.S. Applications of adaptive filtering to ECG analysis: Noise cancellation and arrhythmia detection. IEEE Trans. Biomed. Eng. 1991, 38, 785–794. [Google Scholar] [CrossRef] [PubMed]
  14. Diniz, P.S.R.; Yazdanpanah, H. Data censoring with set-membership algorithms. In Proceedings of the 2017 IEEE Global Conference on Signal and Information Processing (GlobalSIP), Montreal, QC, Canada, 14–16 November 2017; pp. 121–125. [Google Scholar] [CrossRef]
  15. Zhang, H.; Zhang, S.; Jin, Q.; Liu, X.; Li, Q.; Yang, J.; Zhao, J. Motion artifact suppression in ambulatory ECG with feed forward combined adaptive filter. In Proceedings of the 2016 Computing in Cardiology Conference (CinC), Vancouver, BC, Canada, 11–14 September 2016; pp. 1–4. [Google Scholar]
  16. Nurmaini, S.; Tondas, A.E.; Darmawahyuni, A.; Rachmatullah, M.N.; Partan, R.U.; Firdaus, F.; Tutuko, B.; Pratiwi, F.; Juliano, A.H.; Khoirani, R. Robust detection of atrial fibrillation from short-term electrocardiogram using convolutional neural networks. Future Gener. Comput. Syst. 2020, 113, 304–317. [Google Scholar] [CrossRef]
  17. Petmezas, G.; Haris, K.; Stefanopoulos, L.; Kilintzis, V.; Tzavelis, A.; Rogers, J.A.; Katsaggelos, A.K.; Maglaveras, N. Automated Atrial Fibrillation Detection using a Hybrid CNN-LSTM Network on Imbalanced ECG Datasets. Biomed. Signal Process. Control 2021, 63, 102194. [Google Scholar] [CrossRef]
  18. Subramanyan, L.; Ganesan, U. A novel deep neural network for detection of Atrial Fibrillation using ECG signals. Knowl.-Based Syst. 2022, 258, 109926. [Google Scholar] [CrossRef]
  19. Chen, X.; Cheng, Z.; Wang, S.; Lu, G.; Xv, G.; Liu, Q.; Zhu, X. Atrial fibrillation detection based on multi-feature extraction and convolutional neural network for processing ECG signals. Comput. Methods Programs Biomed. 2021, 202, 106009. [Google Scholar] [CrossRef]
  20. Rodríguez, R.; Bila, J.; Mexicano, A.; Cervantes, S.; Ponce, R.; Nghien, N.B. Hilbert-Huang transform and neural networks for electrocardiogram modeling and prediction. In Proceedings of the 2014 10th International Conference on Natural Computation (ICNC), Xiamen, China, 19–21 August 2014; pp. 561–567. [Google Scholar] [CrossRef]
  21. Xiong, P.; Wang, H.; Liu, M.; Lin, F.; Hou, Z.; Liu, X. A stacked contractive denoising auto-encoder for ECG signal denoising. Physiol. Meas. 2016, 37, 2214–2230. (In English) [Google Scholar] [CrossRef]
  22. Chiang, H.T.; Hsieh, Y.Y.; Fu, S.W.; Hung, K.H.; Tsao, Y.; Chien, S.Y. Noise Reduction in ECG Signals Using Fully Convolutional Denoising Autoencoders. IEEE Access 2019, 7, 60806–60813. [Google Scholar] [CrossRef]
  23. Hamilton, P.S.; Curley, M.G.; Aimi, R.M.; Sae-Hau, C. Comparison of methods for adaptive removal of motion artifact. In Proceedings of the Computers in Cardiology 2000. Vol. 27 (Cat. 00CH37163), Cambridge, MA, USA, 24–27 September 2000; pp. 383–386. [Google Scholar] [CrossRef]
  24. Ottenbacher, J.; Kirst, M.; Jatoba, L.C.; Großmann, U.; Stork, W. An approach to reliable motion artifact detection for mobile long-term ECG monitoring systems using dry electrodes. In Proceedings of the IV Latin American Congress on Biomedical Engineering 2007, Bioengineering Solutions for Latin America Health, Margarita Island, Venezuela, 24–28 September 2007; Springer: Berlin/Heidelberg, Germany, 2007. [Google Scholar]
  25. Lilienthal, J.; Dargie, W. Comparison of Reference Sensor Types and Position for Motion Artifact Removal in ECG. In Proceedings of the 2021 29th European Signal Processing Conference (EUSIPCO), Dublin, Ireland, 23–27 August 2021; pp. 1296–1300. [Google Scholar] [CrossRef]
  26. Romero, I.; Geng, D.; Berset, T. Adaptive filtering in ECG denoising: A comparative study. In Proceedings of the 2012 Computing in Cardiology, Krakow, Poland, 9–12 September 2012; pp. 45–48. [Google Scholar]
  27. Helleputte, N.V.; Kim, S.; Kim, H.; Kim, J.P.; Hoof, C.V.; Yazicioglu, R.F. A 160 μA Biopotential Acquisition IC With Fully Integrated IA and Motion Artifact Suppression. IEEE Trans. Biomed. Circuits Syst. 2012, 6, 552–561. [Google Scholar] [CrossRef]
  28. Pholpoke, B.; Songthawornpong, T.; Wattanapanitch, W. A Micropower Motion Artifact Estimator for Input Dynamic Range Reduction in Wearable ECG Acquisition Systems. IEEE Trans. Biomed. Circuits Syst. 2019, 13, 1021–1035. [Google Scholar] [CrossRef]
  29. Kim, S.; Kim, H.; Helleputte, N.V.; Hoof, C.V.; Yazicioglu, R.F. Real time digitally assisted analog motion artifact reduction in ambulatory ECG monitoring system. In Proceedings of the 2012 Annual International Conference of the IEEE Engineering in Medicine and Biology Society, San Diego, CA, USA, 28 August–1 September 2012; pp. 2096–2099. [Google Scholar] [CrossRef]
  30. Berset, T.; Geng, D.; Romero, I. An optimized DSP implementation of adaptive filtering and ICA for motion artifact reduction in ambulatory ECG monitoring. In Proceedings of the 2012 Annual International Conference of the IEEE Engineering in Medicine and Biology Society, San Diego, CA, USA, 28 August–1 September 2012; pp. 6496–6499. [Google Scholar] [CrossRef]
  31. Hamilton, P.S.; Curley, M.G. Adaptive Removal of Motion Artifact. In Proceedings of the 19th Annual International Conference of the IEEE Engineering in Medicine and Biology Society. ‘Magnificent Milestones and Emerging Opportunities in Medical Engineering’ (Cat. No.97CH36136), Chicago, IL, USA, 30 October–2 November 1997; Volume 1, pp. 297–299. [Google Scholar] [CrossRef]
  32. Liu, Y.; Pecht, M.G. Reduction of Skin Stretch Induced Motion Artifacts in Electrocardiogram Monitoring Using Adaptive Filtering. In Proceedings of the 2006 International Conference of the IEEE Engineering in Medicine and Biology Society, New York, NY, USA, 30 August–3 September 2006; pp. 6045–6048. [Google Scholar] [CrossRef]
  33. Lee, W.C.; Yang, Y.S.O.; Ke, T.C.; Wei, C.S.; Lee, H.C. Adaptive reduction of motion artifact in a portable ECG system. In Proceedings of the SENSORS, 2010 IEEE, Waikoloa, HI, USA, 1–4 November 2010; pp. 704–707. [Google Scholar] [CrossRef]
  34. Tong, D.A.; Bartels, K.A.; Honeyager, K.S. Adaptive reduction of motion artifact in the electrocardiogram. In Proceedings of the Second Joint 24th Annual Conference and the Annual Fall Meeting of the Biomedical Engineering Society] [Engineering in Medicine and Biology, Houston, TX, USA, 23–26 October 2002; Volume 2, pp. 1403–1404. [Google Scholar] [CrossRef]
  35. Raya, M.A.D.; Sison, L.G. Adaptive noise cancelling of motion artifact in stress ECG signals using accelerometer. In Proceedings of the Second Joint 24th Annual Conference and the Annual Fall Meeting of the Biomedical Engineering Society] [Engineering in Medicine and Biology, Houston, TX, USA, 23–26 October 2002; Volume 2, pp. 1756–1757. [Google Scholar] [CrossRef]
  36. Zhang, Z.; Silva, I.; Wu, D.; Zheng, J.; Wu, H.; Wang, W. Adaptive motion artefact reduction in respiration and ECG signals for wearable healthcare monitoring systems. Med. Biol. Eng. Comput. 2014, 52, 1019–1030. [Google Scholar] [CrossRef] [PubMed]
  37. Pandey, V.K. Adaptive filtering for baseline wander removal in ECG. In Proceedings of the 10th IEEE International Conference on Information Technology and Applications in Biomedicine, Corfu, Greece, 3–5 November 2010; pp. 1–4. [Google Scholar] [CrossRef]
  38. Martini, N.; Milanesi, M.; Vanello, N.; Positano, V.; Santarelli, M.F.; Landini, L. A real-time adaptive filtering approach to motion artefacts removal from ECG signals. Int. J. Biomed. Eng. Technol. 2010, 3, 233–245. [Google Scholar] [CrossRef]
  39. Milanesi, M.; Martini, N.; Vanello, N.; Positano, V.; Santarelli, M.F.; Paradiso, R.; De Rossi, D.; Landini, L. Multichannel Techniques for Motion Artifacts Removal from Electrocardiographic Signals. In Proceedings of the 2006 International Conference of the IEEE Engineering in Medicine and Biology Society, New York, NY, USA, 30 August–3 September 2006; pp. 3391–3394. [Google Scholar] [CrossRef]
  40. Kim, H.; Kim, S.; Van Helleputte, N.; Berset, T.; Geng, D.; Romero, I.; Penders, J.; Van Hoof, C.; Yazicioglu, R.F. Motion artifact removal using cascade adaptive filtering for ambulatory ECG monitoring system. In Proceedings of the 2012 IEEE Biomedical Circuits and Systems Conference (BioCAS), Hsinchu, Taiwan, 28–30 November 2012; pp. 160–163. [Google Scholar] [CrossRef]
  41. Xiong, F.; Chen, D.; Huang, M. A Wavelet Adaptive Cancellation Algorithm Based on Multi-Inertial Sensors for the Reduction of Motion Artifacts in Ambulatory ECGs. Sensors 2020, 20, 970. [Google Scholar] [CrossRef]
  42. Huang, M.; Chen, D.; Xiong, F. An Effective Adaptive Filter to Reduce Motion Artifacts from ECG Signals Using Accelerometer. In Proceedings of the 2019 9th International Conference on Biomedical Engineering and Technology, Tokyo, Japan, 28–30 March 2019. [Google Scholar]
  43. Ghaleb, F.A.; Kamat, M.B.; Salleh, M.; Rohani, M.F.; Razak, S.A. Two-stage motion artefact reduction algorithm for electrocardiogram using weighted adaptive noise cancelling and recursive Hampel filter. PLoS ONE 2018, 13, e0207176. (In English) [Google Scholar] [CrossRef]
  44. Xu, L.; Rooijakkers, M.J.; Rabotti, C.; Peuscher, J.; Mischi, M. Use of power-line interference for adaptive motion artifact removal in biopotential measurements. Physiol. Meas. 2016, 37, 25. [Google Scholar] [CrossRef]
  45. Shen, L.; Tompkins, W.J. Experimental study: Brachial motion artifact reduction in the ECG. In Proceedings of the Computers in Cardiology 1995, Vienna, Austria, 10–13 September 1995; pp. 33–36. [Google Scholar] [CrossRef]
  46. An, X.; Stylios, G.K. Comparison of Motion Artefact Reduction Methods and the Implementation of Adaptive Motion Artefact Reduction in Wearable Electrocardiogram Monitoring. Sensors 2020, 20, 1468. [Google Scholar] [CrossRef]
  47. Ko, B.H.; Lee, T.; Choi, C.; Kim, Y.H.; Park, G.; Kang, K.; Bae, S.K.; Shin, K. Motion artifact reduction in electrocardiogram using adaptive filtering based on half cell potential monitoring. In Proceedings of the 2012 Annual International Conference of the IEEE Engineering in Medicine and Biology Society, San Diego, CA, USA, 28 August–1 September 2012; pp. 1590–1593. [Google Scholar] [CrossRef]
  48. Ur, R.M.Z.; Ahamed, S.R.; Reddy, D.V.R.K. Adaptive noise removal in the ECG using the Block LMS algorithm. In Proceedings of the 2009 2nd International Conference on Adaptive Science & Technology (ICAST), Accra, Ghana, 14–16 January 2009; pp. 380–383. [Google Scholar] [CrossRef]
  49. Alkhidir, T.; Sluzek, A.; Yapici, M.K. Simple method for adaptive filtering of motion artifacts in E-textile wearable ECG sensors. In Proceedings of the 2015 37th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Milan, Italy, 25–29 August 2015; pp. 3807–3810. [Google Scholar] [CrossRef]
  50. Liu, C.; Li, J. Feature Engineering and Computational Intelligence in ECG Monitoring; Springer: Singapore, 2020. [Google Scholar]
  51. Tang, L.; Shang, J.; Jiang, X. Multilayered electronic transfer tattoo that can enable the crease amplification effect. Sci. Adv. 2021, 7, eabe3778. [Google Scholar] [CrossRef] [PubMed]
  52. Clifford, G.D.; Liu, C.; Moody, B.; Li-wei, H.L.; Silva, I.; Li, Q.; Johnson, A.E.; Mark, R.G. AF Classification from a Short Single Lead ECG Recording: The PhysioNet/Computing in Cardiology Challenge 2017. In Proceedings of the 2017 Computing in Cardiology (CinC), Rennes, France, 24–27 September 2017; Volume 44. (In English). [Google Scholar] [CrossRef]
  53. Cho, K.; Van Merriënboer, B.; Gulcehre, C.; Bahdanau, D.; Bougares, F.; Schwenk, H.; Bengio, Y. Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, Doha, Qatar, 25–29 October 2014. [Google Scholar]
  54. Chung, J.; Gulcehre, C.; Cho, K.; Bengio, Y. Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling. arXiv 2014, arXiv:1412.3555. [Google Scholar]
Figure 1. An ECG with MA caused by running.
Figure 1. An ECG with MA caused by running.
Sensors 24 03789 g001
Figure 2. AF ECG signal.
Figure 2. AF ECG signal.
Sensors 24 03789 g002
Figure 3. Installation of stretch sensors.
Figure 3. Installation of stretch sensors.
Sensors 24 03789 g003
Figure 4. Skin stretching deformation signals.
Figure 4. Skin stretching deformation signals.
Sensors 24 03789 g004
Figure 5. The block diagram of noise cancelling AF.
Figure 5. The block diagram of noise cancelling AF.
Sensors 24 03789 g005
Figure 6. Atrial fibrillation recognition neural network structure diagram.
Figure 6. Atrial fibrillation recognition neural network structure diagram.
Sensors 24 03789 g006
Figure 7. Flowchart of experimental procedure.
Figure 7. Flowchart of experimental procedure.
Sensors 24 03789 g007
Figure 8. Experimental data of MAs from ECG and stretch sensors during running exercise.
Figure 8. Experimental data of MAs from ECG and stretch sensors during running exercise.
Sensors 24 03789 g008
Figure 9. Original AF signal and AF signal with added MAs (SNR = 0 dB, −2 dB).
Figure 9. Original AF signal and AF signal with added MAs (SNR = 0 dB, −2 dB).
Sensors 24 03789 g009
Figure 10. AF Signal with MAs removed: (a) the raw ECG data, (b) ECG plus MAs with SNR = 0 dB, (c) filtered ECG of signal in (b,d) ECG plus MAs with SNR = −2 dB, (e) filtered ECG of signal in (d).
Figure 10. AF Signal with MAs removed: (a) the raw ECG data, (b) ECG plus MAs with SNR = 0 dB, (c) filtered ECG of signal in (b,d) ECG plus MAs with SNR = −2 dB, (e) filtered ECG of signal in (d).
Sensors 24 03789 g010
Figure 11. Comparison of F1 Scores for AF detection in noisy vs. filtered ECG signals at different SNR levels.
Figure 11. Comparison of F1 Scores for AF detection in noisy vs. filtered ECG signals at different SNR levels.
Sensors 24 03789 g011
Figure 12. Ratio of true positive rate (TPR), false negative rate (FNR), and false positive rate (FPR) for AF detection in AF signals with and without MAs.
Figure 12. Ratio of true positive rate (TPR), false negative rate (FNR), and false positive rate (FPR) for AF detection in AF signals with and without MAs.
Sensors 24 03789 g012
Table 1. Characteristics of motion artifact signal.
Table 1. Characteristics of motion artifact signal.
AmplitudeFrequencySource of the MA
MAMaximum 500% ECG peak amplitude1–10 HzChanges in charge distribution at the interface between skin and electrodes
Table 2. The type of reference signal sensor and its corresponding research literature.
Table 2. The type of reference signal sensor and its corresponding research literature.
Type of Reference Signal SensorReferences
Impedance of electrode skin interface[10,23,24,25,26,27,28,29,30]
Skin deformation[23,31,32,33]
Triaxial acceleration[25,26,33,34,35,36,37,38,39,40,41,42,43]
Others[13,44,45,46,47,48,49]
Table 3. Correlation between NS signals and stretch sensor signals under different SNR Conditions.
Table 3. Correlation between NS signals and stretch sensor signals under different SNR Conditions.
SNR (dB)Correlation of NS and Stretch Sensor SignalSNR (dB)Correlation of NS and Stretch Sensor Signal
80.373−60.894
60.45−80.929
40.536−100.954
20.624−120.969
00.708−140.981
−20.784−160.988
−40.846
Table 4. Average SNR of the FS after removing MAs from 900 sets of NS with different SNRs.
Table 4. Average SNR of the FS after removing MAs from 900 sets of NS with different SNRs.
SNR (dB)Average SNR (dB)SNR (dB)Average SNR (dB)
86.314−6−1.239
65.625−8−1.277
44.828−10−3.66
21.767−12−7.324
00.292−14−9.063
−20.188−16−9.883
−4−0.053
Table 5. Classification of the gap between red and blue points based on true positive and false negative for different signal-to-noise ratio ranges.
Table 5. Classification of the gap between red and blue points based on true positive and false negative for different signal-to-noise ratio ranges.
Gap between Red and Blue PointsTrue PositiveFalse Negative
−10 < SNR (dB) < 4 0.053−0.053
SNR (dB) < −10 −0.1660.166
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhang, H.; Zhao, H.; Guo, Z. Artificial Intelligence-Based Atrial Fibrillation Recognition Method for Motion Artifact-Contaminated Electrocardiogram Signals Preprocessed by Adaptive Filtering Algorithm. Sensors 2024, 24, 3789. https://doi.org/10.3390/s24123789

AMA Style

Zhang H, Zhao H, Guo Z. Artificial Intelligence-Based Atrial Fibrillation Recognition Method for Motion Artifact-Contaminated Electrocardiogram Signals Preprocessed by Adaptive Filtering Algorithm. Sensors. 2024; 24(12):3789. https://doi.org/10.3390/s24123789

Chicago/Turabian Style

Zhang, Huanqian, Hantao Zhao, and Zhang Guo. 2024. "Artificial Intelligence-Based Atrial Fibrillation Recognition Method for Motion Artifact-Contaminated Electrocardiogram Signals Preprocessed by Adaptive Filtering Algorithm" Sensors 24, no. 12: 3789. https://doi.org/10.3390/s24123789

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