Next Article in Journal
3D Multiple Sound Source Localization by Proposed Cuboids Nested Microphone Array in Combination with Adaptive Wavelet-Based Subband GEVD
Previous Article in Journal
Mobility Management Based on Beam-Level Measurement Report in 5G Massive MIMO Cellular Networks
Open AccessFeature PaperArticle

A Pipeline for Adaptive Filtering and Transformation of Noisy Left-Arm ECG to Its Surrogate Chest Signal

Department of Electrical and Computer Engineering, North Carolina State University, Raleigh, NC 27606, USA
Department of Computer Engineering, Istanbul Kültür University, 34156 Istanbul, Turkey
Author to whom correspondence should be addressed.
Electronics 2020, 9(5), 866;
Received: 29 April 2020 / Revised: 16 May 2020 / Accepted: 19 May 2020 / Published: 23 May 2020
(This article belongs to the Section Microelectronics and Optoelectronics)


The performance of a low-power single-lead armband in generating electrocardiogram (ECG) signals from the chest and left arm was validated against a BIOPAC MP160 benchtop system in real-time. The filtering performance of three adaptive filtering algorithms, namely least mean squares (LMS), recursive least squares (RLS), and extended kernel RLS (EKRLS) in removing white (W), power line interference (PLI), electrode movement (EM), muscle artifact (MA), and baseline wandering (BLW) noises from the chest and left-arm ECG was evaluated with respect to the mean squared error (MSE). Filter parameters of the used algorithms were adjusted to ensure optimal filtering performance. LMS was found to be the most effective adaptive filtering algorithm in removing all noises with minimum MSE. However, for removing PLI with a maximal signal-to-noise ratio (SNR), RLS showed lower MSE values than LMS when the step size was set to 1 × 10−5. We proposed a transformation framework to convert the denoised left-arm and chest ECG signals to their low-MSE and high-SNR surrogate chest signals. With wide applications in wearable technologies, the proposed pipeline was found to be capable of establishing a baseline for comparing left-arm signals with original chest signals, getting one step closer to making use of the left-arm ECG in clinical cardiac evaluations.
Keywords: adaptive filtering; wearable ECE armband; filter optimization; left-arm ECG; single-lead ECG; ECG transformation adaptive filtering; wearable ECE armband; filter optimization; left-arm ECG; single-lead ECG; ECG transformation

1. Introduction

U.S. national health expenditure accounts for 17.9% of the GDP with a projected annual growth of 5.5% per year between 2018 and 2027, reaching $6.0 trillion by 2027 [1,2,3]. Only in 2017, the share of the U.S. medical devices market was $156 billion, accounting for 40% of the global market [4]. The main reason for this boom is the high demand for portable, affordable, and IoT-compatible health monitoring devices capable of preventing the U.S. number one killer, cardiovascular diseases [5].
Electrocardiogram (ECG) is a reliable reference for the evaluation of cardiac activity and has been adopted by the health industry as a standard method since 1954 [6]. Common types of ECG include 12-lead [7], 3-lead [8], 2-lead [9], and single-lead [10] systems. Due to the close vicinity to the heart, the chest is the most conventional location for ECG evaluations, enabling ECG mapping with high precision and signal-to-noise ratio (SNR) [11]. However, conventional one-off chest-ECG (C-ECG) tests are cumbersome, costly, interrupted, and non-user friendly, making it an unattractive option for both intermittent and continual cardiac monitoring.
Located in the proximity to the heart, left arm is a good candidate for ECG measurements, providing further comfort for continual cardiac monitoring compared to chest-wearable devices. However, there is little information on left-arm ECG (LA-ECG) characteristics, which may be due to its lower SNR compared to the chest and its higher vulnerability to different ambient noises [12]. Villegas et al. [13] managed to obtain a high-quality ECG from the arm, employing both analog and digital filtering, which, along with the used front-end amplification (AFE) resulted in a clear ECG with its major waves. Akbulut et al. [14] compared photoplethysmography (PPG) interbeat intervals (IBIs) with RR intervals from the ECG and reported the upper arm as the second-best location after the chest for beats per minute (BPM) measurements. The quality of LA-ECG signals is generally impaired by several factors such as the position of the recording and ground electrodes on the skin surface, the position of the heart with respect to the positive (+) and the negative (−) electrodes, the trajectory the electrical current takes as it travels from the atrioventricular node through the conduction system of the ventricles, and the physical mass of the heart [15]. In addition to the naturally low SNR associated with the arm-ECG signal, the interference of different noises such as muscle artifact (MA), white (W), baseline wandering (BLW), electrode movement (EM), and power-line interference (PLI) can impair the signal quality and reliability even further.
Wavelet transform and adaptive filtering techniques are among the most common post-logging filtering techniques that detect and rectify the artifacts of different noises. Adaptive filtering is strongly fitted to nonlinear signals like ECG [16,17]. In this light, the consecutive application of adaptive filtering and signal transformation techniques may be a good approach for populating reliable ECG signals, especially from limbs other than the chest.
In this study and building on our prior art [13,18], we developed a Bluetooth Low Energy (BLE)-enabled ECG armband system capable of obtaining ECG signals from both the chest and left arm with high accuracy required for wearable devices. We modified the graphical user interface (GUI) proposed by Mugdha et al. [19] to filter the sedentary chest and left-arm ECG signals that were contaminated by any of the five noises mentioned earlier. The power of the noise signals was adjusted according to their desired SNR to result in realistically noisy ECG signals. The employed GUI took advantage of three different adaptive filtering algorithms, i.e., least mean squares (LMS), recursive least squares (RLS), and extended kernel RLS (EKRLS). We optimized the filtering parameters and determined the most efficient filtering algorithms for removing the added noises with respect to their mean squared error (MSE). To process the denoised signals further, we proposed a transformation technique to convert denoised LA-ECG and C-ECG signals to a domain similar to that of the original C-ECG signal. This way, a meaningful comparison between the transformed and original C-ECG signals was made possible. Upon further development of the proposed pipeline in generating high-precision C-ECG replicas from noisy LA-ECG signals in non-sedentary and multi-subject scenarios, the diagnosis of various cardiac conditions such as atrial fibrillation of pathologic Q waves from LA-ECG signals may become possible [20,21,22,23,24,25].

2. Hardware

The multi-sensor system was entirely developed with commercial off-the-shelf (COTS) components and a custom printed circuit board (PCB) design. The hardware provides signal acquisition of integrated sensors on the body including ECG, electro-dermal activity (EDA), and photoplethysmography (PPG). The microcontroller interfaces with an external 16-bit analog-to-digital converter (ADC), which samples the ECG signal. An AD8232 specialized analog frontend was chosen for ECG readings due to its capability of providing high gain (1000), high output impedance (10 GΩ), and filter customization. The AD8232 has two input electrodes (RA and LA) and a driven electrode that senses the common mode noise at the inputs and attempts to cancel it by injecting the signal back into the user. To reduce motion artifacts, a narrow band-pass characteristic is required to separate the heart signal from the interferers. Therefore, the customized filter network for the ECG frontend is implemented such that a two-pole low-pass filter and a two-pole high-pass filter are set to 27 Hz and 7 Hz, respectively. The analog output of the AD8232 is connected to an ADC (ADS1114). The ADS114 chip is a 16-bit ADC to sample the analog signal and feed it into a Nordic NRF51822 microcontroller via inter-integrated circuit (I2C) communication. The internal ADC in the microcontroller samples an analog signal from electro-dermal activity sensing. The microcontroller unit (MCU, Nordic nRF51822, Nordic Semiconductor, Trondheim, Norway) incorporates an ARM Cortex M0 (ARM Developer, Cambridge, UK) with 32 KB of RAM, 256 KB of non-volatile flash memory, and an internal ADC. The unit also has an integrated BLE radio. In order to increase the antenna performance and the BLE range, a Raytac MDBT40 carrier board comprising a microcontroller, antenna, balun, and high-frequency crystal was used. The nRF51822 (Nordic Semiconductor, Trondheim, Norway) has flexible General Purpose Input/Output (GPIO) ports that support communication protocols including I2C, Synchronous Peripheral Interface (SPI), and Universal Asynchronous Receiver/Transmitter (UART). An ADXL345 accelerometer is interfaced over SPI to the nRF51822. The ADXL345 (Analog Devices, Norwood, MA, USA) is an ultra-low-powered tri-axial accelerometer with 13-bit resolution and supports measurement ranges up to ±16 g. In order to store the sensor data for continuous measurement, a high-volume external flash memory (128 Mb) was also implemented. The Winbond W25Q128 SpiFlash series (Winbond, Taichung City, Taiwan) is also communicated through SPI to the MCU. The entire system is powered with a 3.3 V supply regulated from a battery. A JST-type connector is used for connecting to a typical lithium polymer battery. The Microchip MCP73831 (Microchip Technology, Chandler, AZ, USA) charge management controller is implemented for charging the battery via microUSB. The TI TLV710 dual-voltage low-dropout (LDO) regulator (Texas Instruments, Dallas, TX, USA) is used to provide both 3.3 V and 1.8 V supplies. All of the hardware components take advantage of advanced surface mount technology for a minimal footprint of 1.0″ × 1.5″. The images of the developed armband, the system hardware, and the positions of the electrodes LA (+), RA (−), and ground that resulted in the closest match to the C-ECG obtained from an ISO1001-certified BIOPAC MP160 benchtop system are shown in Figure 1.
Figure 2 shows a block diagram of our wearable system with data transmission. The ECG signal can be transmitted through a wire to the computer or through a BLE communication, as seen in Figure 2. Minimal power consumption is expected with serial communication between the wearable device and a computer with the BLE off, and the flash has become inaccessible. The total power consumption for this case is calculated to be 3 mW. The system can also be used for wireless transmission through BLE. When the continuous BLE mode is engaged, the total power consumption is to be 57 mW. For extended measurement, on-chip storing of the data is required while the BLE is off. For this scenario, the maximum power consumption is about 70 mW. It should be noted that these power consumptions can be greatly reduced with data compression and optimization of data transmission time. The 150 mAh, 3.7 V lithium-ion polymer battery cell used in this can run the ECG module of the armband system for 7 h continuously.

3. ECG Data Acquisitions

The accuracy of the armband LA-ECG and C-ECG signals was tested against the C-ECG signals obtained by a bench-top MP160 BIOPAC system at the same sampling frequency (100 Hz) and in real-time. As shown in Figure 3, both the position of the PQRST complex and the heart rate (65 bpm) of the ECG signals collected by the armband systems matched those of the BIOPAC system. As anticipated, the mean amplitude range associated with the armband C-ECG was found to be over six times larger than that of LA-ECG. The V-out value of the armband baseline was kept at its original value (3.3 V) and without any modification.

4. Modeling of ECG Noises

Sensor-based non-medical ECG recordings are vulnerable to different types of noise and should be cleaned and checked for major components before further evaluation. Realistic ECG noise models can be used to identify the effect of noise on ECG signals and, thus, to remove those artifacts from the corrupted ECG. However, the denoising process for a particular noise model could be limited by the validity of the model assumptions [26] or the computational complexity of the selected algorithm [27]. In the selection of a proper noise model, the following assumptions must be considered: (1) The operating frequencies in the used model must match the ECG frequencies, and (2) the spatial variation in the noise must be statistically meaningful when compared to that of the ECG signal [28]. In natural noise modeling, the main issue is to recognize a realistic noise source [29]. Nonstationary noises like EM, BLW, and MA have complex natures and cannot be removed from ECG signals using simple filters. These noises are normally nonstationary in time and highly colored in the spectrum and, hence, are generally inadequate for ECG noise modeling. The main reason for using real ECG noises with a varying noise level is to develop a realistic noise model. We adopted the MIT-BIH database [30] to obtain real ECG noises for generating realistic noise templates.
In our study, we assessed the performance of three adaptive filtering algorithms, i.e., RLS, LMS, and EKRLS, in removing W, BLW, MA, EM, and PLI noises from the corrupted chest and left-arm ECG signals. For modeling the BLW, MA, and EM noises, we benefited from Sameni et al.’s algorithm [31]. We reduced the BLW noise of no cardiac origin and with a frequency range below 0.5 Hz to minimize variations in the beat structure [32]. It is crucial to minimize the variations in the low-frequency segments that are usually caused by body movement. Parametric time-varying models were used to generate non-stationarity noises. To converge the spectral shape of the used noises with respect to the desired signal power, we assigned SNR values of 5 dB, −0.3 dB, −10 dB and −20 dB to W, PLI, BLW, EM, and MA, respectively.

5. Adaptive Filtering Algorithms

Adaptive filtering of a corrupted ECG signal is based on closed-loop subtraction of an estimated noise from the corrupted signal. The goal of adaptive filtering is to minimize the noise power, thus maximizing the SNR of the desired ECG signal. In noise removal using an adaptive noise canceller, two input signals are required: (a) Corrupted ECG signal, d k , comprising the desired noise-free signal, S 1 , and an embedded noise signal, n 1 , and (b) reference noise signal, n 2 . To ensure the efficient filtering, the type of the reference noise signal must match that of the real noise felt by the ECG signal [33]. Reference noise, n 2 , can be simulated by a suitable noise-generating function to create a noise-estimate signal, Y k , provided the function coefficients (tap weights) are finely tuned. Figure 4 shows the diagram of an adaptive noise-cancelling system with respect to the reference noise [19].

5.1. LMS Algorithm

The least-mean-squares (LMS) adaptive filtering algorithm is a basic and memory-less iterative model based on the steepest descent method commonly used for minimizing the mean squared error (MSE) between the corrupted ECG, d k , and the reference noise, n 2 , signals [34,35]. LMS is highly sensitive to the input statistics, as well as the eigenvalue spread present on it; thus, convergence is encouraged to small values of step size to avoid the estimated error increase indefinitely [36,37]. LMS benefits from low computational complexity, stable behavior, and unbiased convolution during the signal integration process [38]. To eliminate the effect of embedded ECG noise, n 1 , the generic noise estimating function, Y ( k ) , must be defined for n 2 , Equation (1) [18,39].
Y ( k ) = i = 0 N i w k ( i ) n 2 ( k i )
where w k is the definition of a vector of filter coefficients at time k and can be calculated using Equation (2).
w k = [ w k , 1   w k , 2   w k , j w k , n ] T
The updated w k after each time step can be calculated using Equation (3).
w k + 1 = w k + 2 μ ϵ k X k
where variable μ is the step size and is chosen empirically. The higher the value of μ , the faster the convergence. X k is the input vector at time k of the samples from the reference signal, Equation (4) [32].
X k = [ x k , 1   x k , 2   x k , j x k , n ] T
To denoise the ECG signal using LMS, the filter error output, ϵ k , is initially calculated by subtracting the instantaneous estimate of the noise signal, Y k , from the corrupted ECG signal, d k , Equation (5).
ϵ k = d k Y k
By adjusting the filter coefficient, μ , of the estimated noise signal, Y ( n ) , the MSE or E [ ϵ k 2 ] will be minimized, Equation (6). This will result in the maximum reduction of the average power of the unknown embedded noise, n 1 .
M S E = E [ ϵ k 2 ]
For achieving this, the term E [ ( n 1 Y ) 2 ] in Equation (7) that is the MSE of the unknown embedded noise subtracted by the noise estimate signals should be eliminated, making the minimized E [ ϵ 2 ] the best least-squares estimate of the noise-free ECG signal, S 1 [33,38].
E [ ϵ k 2 ] = E [ ( n 1 Y k ) 2 ] + E [ S 1 2 ]

5.2. RLS Algorithm

Contrary to LMS that aims to reduce the MSE to reach optimal adaptation, the recursive least squares (RLS) repeatedly finds and updates the coefficients that minimize a weighted linear least-squares loss function of the input signals. RLS adaptation has infinite memory that can be tuned by a forgetting factor, λ , to de-emphasize the older error data compared to the newer ones [39]. Due to more computational complexity involved in RLS compared to LMS, the convergence speed associated with RLS is faster than all LMS algorithms, but this complexity may cause some overhead. The computational complexity for LMS and RLS are 2 N + 1 and 4 N 2 , respectively [40]. RLS denoises corrupted ECG signals using an inverse correlation matrix of the data with assumed zero mean. Besides, RLS simulates the noise-free signal via recursive minimization of the sum of least squares associated with the instantaneous error. This minimization is a recursive-gradient approach that accounts for the historical data up to the current data point [41]. Equation (8) is used to update RLS coefficients after each recurrence [40].
w ( n + 1 ) = w ( n ) + e ( n )   k ( n )
where k ( n ) is the gain factor, which is defined by Equation (9).
k ( n ) = p ( n )   x ( n ) λ + x T ( n )   p ( n )   x ( n )
where λ is the forgetting factor with the range of 0 < λ ≤ 1, and p ( n ) is the inverse correlation matrix of x ( n ) shown by Equation (10).
p ( n ) = 1   x ( n )
where is the initialization or regulation factor. The RLS algorithm uses Equation (11) to update the inverse correlation matrix.
p ( n ) = λ 1   p ( n ) λ 1   k ( n )   x T ( n )   p ( n )
where λ , , and filter order, T , are adjustable parameters.

5.3. EKRLS Algorithm

Kernel adaptive filters are online machine learning algorithms, where their application to a data instance such as a corrupt ECG takes the original non-linear observations to a higher-dimensional space where they can be separated into their building signals, i.e., noise-free ECG and the embedded noise [42]. The extended-kernel recursive least-squares (EKRLS) algorithm is the kernelized version of the extended recursive least-squares algorithm (ExRLS) and relies on online machine learning algorithms. The same as RLS, EKRLS uses a forgetting factor, λ , to adjust the weighs of old error values compared to the new ones. The primary aim of this model is to reproduce the Kernel Hilbert Spaces sample via sample updating. This model is based on a functional analysis framework that involves solving a set of linear equations that is nonlinearly related to the input space and is, thus, not based on approximate estimation [42]. To denoise noisy LA-ECG and C-ECG by EKRLS, we used the Mugdha et al.’s platform [19] in which the tunable variables include λ , filter power, α, and β.

6. Transformation of Denoised ECG Signals

In-tandem use of adaptive filtering and the signal transformation was considered as a means to generate low-MSE and high-SNR surrogate C-ECG signals from noisy signals. To do this, we proposed a framework to transform filtered LA-ECG and C-ECG signals into a space similar to the original C-ECG. Let us call the transformed signal T-ECG. Comparing the populated T-ECG signals against the original C-ECG provides a common ground for evaluating the transformation performance in each of the following scenarios:
  • Transformation of denoised LA-ECG into a T-ECG;
  • Transformation of denoised C-ECG into a T-ECG.
The resulting T-ECG signals are replicas of the original C-ECG from either denoised LA-ECG or C-ECG signals. The main reason for transforming the denoised C-ECG into the original C-ECG (scenario b) was to have a baseline for evaluating the transformation of LA-ECG to T-ECG (scenario a). The steps involved in the transformation of the denoised LA-ECG to T-ECG can be summarized as follows:
  • Creation of the reference C-ECG template from the original C-ECG with an averaged RR interval (Figure 5);
  • Creation of the LA-ECG template from the filtered LA-ECG with an averaged RR interval;
  • Resampling of the averaged RR interval of the filtered LA-ECG with respect to the reference C-ECG template (upsampling or downsampling is implemented if required);
  • Obtaining the transformation function through dividing the chest ECG template by the LA-ECG template;
  • Resampling of the transformation function according to individual RR intervals of the filtered LA-ECG;
  • Transformation of the filtered LA-ECG to C-ECG through multiplying the resampled transformation function by the original RR intervals of the filtered LA-ECG.
To evaluate the accuracy of the transformed signals against the original C-ECG, we calculated the customized MSE ( M S E C ) values for transformed signals using Equation (17), to be presented later. SNR values of the denoised signals were also quantified before and after transformation and compared to the SNR of the original C-ECG. As a rule of thumb, the lower the M S E C and the closer the SNR values, the closer the match between the transformed signals and the original C-ECG.

6.1. Creating the Averaged Templates

We assume that the ECG signals had a constant resting heart rate, and the QRS complexes of C-ECG signals can be easily detected and synchronized with those of LA-ECG signals. In addition, we assume that the ECG signals are recorded with a constant heart rate. In reality, we had to synchronize and, if necessary, resample the signals manually by aligning R-peaks due to sampling from different devices. The implementation was done in Matlab, where the detection and resampling make use of standard functions. Let us define σ C : [ 0 , L ] R and σ L A : [ 0 , L ] R as the C-ECG and LA-ECG, respectively, where L is the length of our recording. The averaged template based on the clean C-ECG signals σ ^ T : [ 0 , 1 ] R was defined as:
σ ^ T ( s ) = 1 K k = 1 K σ ( ( t k t k 1 ) s + t k 1 )
where σ is the LA/C-ECG signal, K the total number of RR-intervals, t k the time at the kth R-peak in the signal, s the variable that parameterizes the function between 0 and 1, and ( t k t k 1 ) the difference between two consecutive R-peaks. Figure 5 shows what the built template looks like.

6.2. Constructing the Transformation Signal

To construct a transformation from LA/C-ECG signals to T-ECG, we defined the transformed LA/C-ECG signal σ T ( k ) : [ 0 , 1 ] R over an RR-interval and calculated it as follows:
σ T ( k ) ( s ) = σ ^ T ( s ) σ ^   ( s ) σ ( ( t k t k 1 ) s + t k 1 )
where σ ^ is the averaged template of σ , and σ T is T-ECG.
Note that the domain for σ ^ T has been defined to be a normalized interval [ 0 , 1 ] . For our implementation, we used the same RR window size on this interval as per RR-interval in the original C-ECG signal. When necessary, the resampling function from Matlab (resample) was used to make sure that the RR-intervals for σ C and σ L A have the same number of samples. This Matlab function implements upsampling and downsampling for fixed or variable rates. Our implementation of transformation is available at We assumed the heart rate and, thus, the resulting transformation to be constant; therefore, our current approach does not address varying heart rate scenarios. However, this part of our research can be further explored by taking advantage of PPG IBI data to create transformation signals without having the instantaneous RR intervals of the original C-ECG. In other words, it is anticipated to automatically update the RR intervals of the templates whenever the latest heart rate picked by PPG is significantly different from the previous reading.

6.3. Computing Customized MSE and SNR

The original C-ECG signals have some noise; thus, they cannot be used as a reference for SNR computation. Instead, one can use the proposed template built from the original C-ECG as a reference for calculating the SNR. The template represents an average chest signal with reduced variability, justifying its use. To calculate the SNR, we need to define the average power for the signal and the noise, as shown in Equations (14) and (15), respectively.
P s i g n a l = 0 1 σ ^ T ( s ) 2   d s
P n o i s e = 1 K k = 1 K 0 1 ( σ T ( k ) ( s ) σ ^ T ( s ) ) 2   d s
where σ ^ T is the template obtained from the C-ECG.
The SNR can be calculated by Equation (15).
S N R = P s i g n a l P n o i s e
Note that for our analyses, we will have different SNR values for the original, noisy, and filtered LA and C-ECG signals.
We defined a customized MSE ( M S E C ) between the LA/C-ECG and the C-ECG as a measure of adaptation:
M S E C = 1 K k = 1 K t k 1 t k ( σ T ( k ) ( ( s t k 1 ) / ( t k t k 1 ) ) σ C ( t ) ) 2 d t

7. Results and Discussion

Our developed prototype presented in Section 2 provides a low-noise signal, which we want to evaluate under distinct controlled noisy scenarios and examine its applicability for obtaining surrogate chest signals. In order to do that, we artificially added different noise types to the measured signals as described in Section 4. We then evaluated the denoising performance by the presented adaptive filters of Section 5 under a simulated environment. The denoised signals were finally processed by a transformation pipeline proposed in Section 6 to obtain the surrogate chest counterparts. In the following subsections, the observed results are explored. It is important to note that such studies under controlled scenarios are necessary to devise a primary means for assessing real noisy signals, which is intended for future work.

7.1. Optimization of Filter Parameters

For LMS, the optimum values of filter parameters including step size, μ , and filter order were determined empirically. Plugging different filter orders ranging from 1 to 10, the minimum MSE and maximum SNR values at a fixed μ were achieved when the filter order was set to 5. As both left arm and chest signals exhibited the same trend, only the chest data are presented. As shown in Figure 6, the MSE and SNR values of noisy C-ECG signals were plotted against μ after filtering by LMS. It was found that, except for EM with an optimal μ of 0.005, all noisy signals were optimally denoised (with reasonably low MSE and maximal SNR) when the μ value was set to 1 × 10−5. Using Equation (7), the resulting MSE values were calculated as shown in Table 1. The SNR values of the signals initially corrupted by different noises were −18.60 dB for BLW, −21.22 for MA, −31.74 for EM, −18.57 for PLI, and −20.91 for W noise.
EKRLS and RLS filter parameters were fine-tuned to reach optimal filtering performance. Agreeably, the parameters used by Mugdha et al. [19] were found to output the lowest MSE values for EKRLS and RLS when applied to the noisy signals.

7.2. Evaluation of Adaptive Filtering Algorithms

The MSE between the denoised and original LA-ECG and C-ECG signals were considered the main factor in determining the filtering performance of the used algorithms. Equation (7) was used to calculate the MSE between the denoised and original signals. Table 2 shows that LMS by exhibiting the lowest MSE values was the most effective adaptive filtering algorithm in removing all noises. However, it was found that where maximal SNR and reasonably low MSE were desired, the RLS removed the PLI with a lower MSE than LMS, provided μ was 1 × 10−5. Contrary to other noises, the non-stochastic nature of PLI noises with predictable frequencies (50/60 Hz) makes their patterns detectable and, thus, easy-to-remove by algorithms such as RLS and EKRLS [36]. As mentioned earlier, in situations where the noise is walking and exhibits varying patterns, the use of RLS and EKRLS with their intrinsic memorization aspect can hinder their use [36].
Figure 7, Figure 8, Figure 9, Figure 10 and Figure 11 show the denoising quality of LMS, RLS, and EKRLS in removing different noises from corrupted signals after optimizing the filter parameters (Section 7.1).

7.3. Evaluation of Transformation

The transformation showed a reasonable approximation to the original C-ECG for several types of noise filtered by LMS and RLS. Figure 12 shows an example of visual matching of QRS complexes between the transformed LA-ECG that was previously contaminated with W noise and cleaned by LMS. In this example, the initial section of the original C-ECG is not covered in transformation, as the template can function when consecutive R peaks are available. The same happens for the end of the signal, in the case the signal terminates before an R peak.
All denoised LA-ECG and C-ECG signals were transformed into their chest surrogate signals as per Section 6.1 and Section 6.2. Table 3 shows the SNR values of denoised signals before and after transformation. It was observed that the SNR of the transformed signals that were calculated by Equation (16) improved by up to 144% and 155% for LA-ECG and C-ECG, respectively. The M S E C values calculated by Equation (17) showed that the difference between the left arm T-ECG and the original C-ECG was about twice as much as that between the chest T-ECG and the original C-ECG. This may be due to the bigger loss of information during templating the denoised LA-ECG compared to C-ECG. The MSEc values between the templates and the original C-ECG were the same within the chest and arm categories, showing that the transformation is capable of generating optimal T-ECG regardless of the type of noise involved and for as long as the major components of the signals are uncovered by filtering.
It was observed in multiple cases that the SNR values of denoised signals were higher than those of the original signals. This is because, in order to create the template, the original signal with its embedded noise is first stripped from its noise and thus results in a higher SNR. Therefore, the transforming function can create high-SNR templates according to the new reference. Note that this does not guarantee that the filtered signal is “better,” as the SNR is also capturing natural variations in the ECG waveform that may have been remoted by filtering and, hence, part of the signal information may have been lost during the transformation process. In general, one can observe that the transformed signals are a little biased toward the template as most SNR values are larger than that of the original C-ECG. This also allows one to conclude that the transformation also reduces variabilities present in the denoised signals. Although the generated transformation templates from the denoised left-arm ECG do not ignore the heart rate variations, further investigations are required to conclude its impact on waveform quality and the reproducibility of the data from one subject to another.

8. Conclusions

A new technique for in-tandem adaptive filtering and signal transformation was proposed to create C-ECG replicas from noisy LA-ECG with high accuracy and in a sedentary fashion. Initially, the accuracy of the LA-ECG and C-ECG signals obtained from a multi-metric armband system was validated against a BIOPAC benchtop system. Three adaptive filtering algorithms, namely LMS, RLS, and EKRLS, were optimized to denoise C-ECG and LA-ECG signals corrupted by different sources of noise. The adaptation performance of the used algorithms was determined according to MSE, and LMS was found to be the most effective algorithm in removing all noises from the arm and chest signals. However, for removing PLI with maximal SNR, RLS resulted in a lower MSE value than LMS, where the optimal step size was set to 1 × 10−5. In this study, we observed that the transformed LA-ECG has the potential to be used as a surrogate of C-ECG signals for ECG studies. The proposed method of transforming LA-ECG signals into their chest counterparts demonstrates the ability to reduce variability in the denoised signals and establishes a baseline for meaningful comparison between the transformed and clean chest signals. Although chest signals have been used in this study to calculate MSE and SNR, they are not required for transforming LA signals into the chest domain provided the transformation function has been obtained once. The heart rate variability of the transformed signals showed conformity with the signals they originated from and exhibited the main waveforms of the ECG signals with low MSE and high SNR. Building on the current pipeline, the accuracy and reproducibility of the chest templates can be further examined for non-sedentary ECG signals (signals affected by motion artifacts). In addition, this methodology can be improved by verifying how generalizable the proposed transformation is to different subjects and real sources of noise. Finally, to work around the issue of dealing with varying heart rates, one could recompute a transformation once the heart rate varies beyond a specific threshold value; we leave that for future work.

Author Contributions

Conceptualization, F.M., B.L., R.L.d.S. and E.L.; methodology, F.M., R.L.d.S. and E.L.; software, F.M., Y.Z., F.P.A., R.L.d.S. and E.L.; validation, B.L., F.M. and E.L.; formal analysis, F.M., F.P.A., R.L.d.S. and E.L.; investigation, F.M., A.T., and R.L.d.S.; resources, F.M. and R.L.d.S.; data curation, F.M., F.P.A., R.L.d.S. and E.L.; writing—original draft preparation, F.M., F.P.A. and R.L.d.S.; writing—review and editing, B.L., E.L. and V.M.; visualization, F.M. and R.L.d.S.; supervision, B.L., E.L. and V.M.; project administration, B.L. and V.M.; funding acquisition, B.L. and V.M. All authors have read and agreed to the published version of the manuscript.


This research was supported by the National Science Foundation Nanoscience Engineering Research Center for Advanced Self-Powered Systems of Integrated Sensors and Technologies (EEC-1160483).

Conflicts of Interest

The authors declare no conflict of interest.


  1. Gross Domestic Product | Fourth Quarter and Annual 2018 (Initial Estimate). Available online: (accessed on 25 June 2019).
  2. NHE-Fact-Sheet. Available online: (accessed on 25 June 2019).
  3. National Health Accounts Historical. Available online: (accessed on 25 June 2019).
  4. Medical Technology Industry Spotlight. Available online: (accessed on 25 June 2019).
  5. Heart Disease Fact Sheet | Centers for Disease Control and Prevention. Available online: (accessed on 25 June 2019).
  6. Alghatrif, M.; Lindsay, J. A brief review: History to understand fundamentals of electrocardiography. JCHIMP 2012, 2, 14383. [Google Scholar] [CrossRef] [PubMed]
  7. Ogura, R.; Hiasa, Y.; Takahashi, T.; Yamaguchi, K.; Fujiwara, K.; Ohara, Y.; Nada, N.; Ogata, T.; Kusunoki, K.; Yuba, K.; et al. Specific Findings of the Standard 12-Lead ECG in Patients with Takotsubo Cardiomyopathy. Circulation 2003, 67, 687–690. [Google Scholar] [CrossRef] [PubMed]
  8. Klootwijk, P.; Meij, S.; Es, G.V.; Müller, E.J.; Umans, V.A.W.M.; Lenderink, T.; Simoons, M.L. Comparison of usefulness of computer assisted continuous 48-h 3-lead with 12-lead ECG ischaemia monitoring for detection and quantitation of ischaemia in patients with unstable angina. Eur. Heart J. 1997, 18, 931–940. [Google Scholar] [CrossRef] [PubMed]
  9. Moody, G.B.; Mark, R.G. Development and evaluation of a 2-lead ECG analysis program. Comput. Cardiol. 1982, 9, 39–44. [Google Scholar]
  10. Kardia Clinical Research Updated September 2019 00MKT0004.10. Available online: (accessed on 8 April 2020).
  11. Skordalakis, E. Syntactic ECG processing: A review. Pattern Recognit. 1986, 19, 305–313. [Google Scholar] [CrossRef]
  12. Raj, P.S.; Hatzinakos, D. Feasibility of single-arm single-lead ECG biometrics. In Proceedings of the 22nd EUSIPCO, Lisbon, Portugal, 1–5 September 2014; pp. 2525–2529. [Google Scholar]
  13. Villegas, A.; McEneaney, D.; Escalon, O. Arm-ECG Wireless Sensor System for Wearable Long-Term Surveillance of Heart Arrhythmias. Electronics 2019, 8, 1300. [Google Scholar] [CrossRef]
  14. Akbulut, F.P.; Lawless, K.; Tanneeru, A.; Rao, S.; Lee, B.; Misra, V. Estimation of Beat-to-Beat Interval from Wearable Photoplethysmography Sensor on Different Measurement Sites During Daily Activities. In Proceedings of the IEEE Sensors, New Delhi, India, 28–31 October 2018; pp. 1–4. [Google Scholar]
  15. QRS AMPLITIUDE & RESPIRATORY MODULATION. Available online: (accessed on 8 April 2020).
  16. Venkatesan, C.; Karthigaikumar, P.; Varatharajan, R. FPGA implementation of modified error normalized LMS adaptive filter for ECG noise removal. Clust. Comput. 2018, 22, 12233–12241. [Google Scholar] [CrossRef]
  17. Venkatesan, C.; Karthigaikumar, P.; Varatharajan, R. A novel LMS algorithm for ECG signal preprocessing and KNN classifier based abnormality detection. Multimed. Tools Appl. 2018, 77, 10365–10374. [Google Scholar] [CrossRef]
  18. Misra, V.; Bozkurt, A.; Calhoun, B.; Jackson, T.; Jur, J.S.; Lach, J.; Lee, B.; Muth, J.; Oralkan, Ö.; Öztürk, M.; et al. Flexible Technologies for Self-Powered Wearable Health and Environmental Sensing. Proc. IEEE 2015, 103, 665–681. [Google Scholar] [CrossRef]
  19. 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 ICIEV, Fukuoka, Japan, 15–18 June 2015; pp. 1–6. [Google Scholar]
  20. Jonas, D.E.; Kahwati, L.C.; Yun, J.D.Y.; Middleton, J.C.; Coker-Schwimmer, M.; Asher, G.N. Screening for Atrial Fibrillation with Electrocardiography: Evidence Report and Systematic Review for the US Preventive Services Task Force. JAMA 2018, 320, 485–498. [Google Scholar] [CrossRef] [PubMed]
  21. Baakek, Y.N.; Hadj Slimane, Z.E.; Bereksi Reguig, F. The Quantification of the QT-RR Interaction in ECG Signal Using the Detrended Fluctuation Analysis and ARARX Modelling. J. Med. Syst. 2014, 38, 62. [Google Scholar] [CrossRef] [PubMed]
  22. Clifford, G.D.; Azuaje, F.; Mcsharry, P. ECG statistics, noise, artifacts, and missing data. In Advanced Methods and Tools for ECG Data Analysis; Artech House: Boston, MA, USA, 2006; Volume 6, p. 18. [Google Scholar]
  23. Gonzalez, L.; Paniagua, T.; Starliper, N.; Lobaton, E. Signal Quality for RR Interval Prediction on Wearable Sensors. In Proceedings of the IEEE Engineering in Medicine and Biology Conference (EMBC), Berlin, Germany, 23–27 July 2019. [Google Scholar]
  24. Mohammadzadeh, F.; Nam, C.S.; Lobaton, E. Prediction of Physiological Response over Varying Forecast Lengths with a Wearable Health Monitoring Platform. In Proceedings of the IEEE Engineering in Medicine and Biology Conference (EMBC), Honolulu, HI, USA, 18–21 July 2018. [Google Scholar]
  25. Gonzalez, L.; Zhong, B.; Lobaton, E. A Framework for Physiological Response Prediction with Joint Activity State Optimization. In Proceedings of the IEEE Engineering in Medicine and Biology Conference (EMBC), Honolulu, HI, USA, 18–21 July 2018. [Google Scholar]
  26. Zhong, B.; Qin, Z.; Yang, S.; Chen, J.; Mudrick, N.; Taub, M.; Azevedo, R.; Lobaton, E. Emotion Recognition with Facial Expressions and Physiological Signals. In Proceedings of the IEEE Symposium Series on Computational Intelligence (SSCI), Honolulu, HI, USA, 27 November–1 December 2017. [Google Scholar]
  27. Lokare, N.; Gonzalez, L.; Lobaton, E. Comparing the Effect of Muscle Activation in Wearable Devices using Wet and Textile Electrodes. In Proceedings of the IEEE Engineering in Medicine and Biology Conference (EMBC), Orlando, FL, USA, 16–20 August 2016. [Google Scholar]
  28. Starliper, N.; Mohammadzadeh, F.; Songkakul, T.; Hernandez, M.; Bozkurt, A.; Lobaton, E. Activity-Aware Wearable System for Power-Efficient Prediction of Physiological Responses. Sensors 2019, 19, 441. [Google Scholar] [CrossRef] [PubMed]
  29. Dogrusoz, Y.S.; Bear, L.R.; Svehlikova, J.; Coll-Font, J.; Good, W.; Dubois, R. Reduction of Effects of Noise on the Inverse Problem of Electrocardiography with Bayesian Estimation. Computing 2018, 45, 1. [Google Scholar]
  30. Moody, G.B.; Mark, R.G. The impact of the MIT-BIH arrhythmia database. IEEE Eng. Med. Biol. Mag. 2001, 20, 45–50. [Google Scholar] [CrossRef] [PubMed]
  31. Sameni, R.; Shamsollahi, M.B.; Jutten, C.; Babaie-Zade, M. Filtering noisy ECG signals using the extended Kalman filter based on a modified dynamic ECG model. In Proceedings of the IEEE: Computers in Cardiology, Leon, France, 25–28 September 2005; pp. 1017–1020. [Google Scholar]
  32. Zhao, Z.D.; Chen, Y.Q. A new method for removal of baseline wander and power line interference in ECG signals. In Proceedings of the IEEE: International Conference on Machine Learning and Cybernetics, Dalian, China, 16–18 August 2006; pp. 4342–4347. [Google Scholar]
  33. 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]
  34. Widrow, B.; Weiss, S. Adaptive Signal Processing; Prentice-Hall Inc.: Saddle River, NJ, USA, 1985. [Google Scholar]
  35. Sankar, A.B.; Kumar, D.; Seethalakshmi, K. Performance study of various adaptive filters algorithms for noise cancellation in respiratory signals. Signal Process. Int. J. 2010, 4, 267–278. [Google Scholar]
  36. Zhao, S. Performance Analysis and Enhancements of Adaptive Algorithms and Their Applications. Ph.D. Thesis, Nanyang Technological University, Singapore, 2009. [Google Scholar]
  37. Sayed, A.H. Adaptive Filters; John Wiley & Sons: Hoboken, NJ, USA, 2008. [Google Scholar]
  38. Sultana, N.; Kamatham, Y.; Kinnara, B. Performance analysis of adaptive filtering algorithms for denoising of ECG signals. In Proceedings of the Institute of Electrical and Electronics Engineers, Inc. (IEEE) Conference, Coimbatore, India, 5–7 March 2015; pp. 297–302. [Google Scholar]
  39. Haykin, S. Adaptive Filter Theory; Prentice-Hall Inc: Upper Saddle River, NJ, USA, 1996. [Google Scholar]
  40. Dhiman, J.; Ahmad, S.; Gulia, K. Comparison between Adaptive filter Algorithms (LMS, NLMS and RLS). International Journal of Science. Eng. Technol. Res. 2013, 2, 1100–1103. [Google Scholar]
  41. Li, G.-Q.; Yang, J.-M.; Li, X.-C. An improved RLS adaptive filter algorithm used to process human body balance signal. Comput. Sci. Educ. 2011, 275–278. [Google Scholar] [CrossRef]
  42. Liu, W.; Park, I.; Wang, Y.; Principe, J.C. Extended Kernel Recursive Least Squares Algorithm. IEEE Trans. Signal Process. 2009, 57, 3801–3814. [Google Scholar]
Figure 1. ECG armband (left); arm and chest electrode positions (middle); system hardware (right).
Figure 1. ECG armband (left); arm and chest electrode positions (middle); system hardware (right).
Electronics 09 00866 g001
Figure 2. Block diagram of the biometric armband.
Figure 2. Block diagram of the biometric armband.
Electronics 09 00866 g002
Figure 3. ECG signals simultaneously obtained from the chest and left arm.
Figure 3. ECG signals simultaneously obtained from the chest and left arm.
Electronics 09 00866 g003
Figure 4. Noise-referenced adaptive noise-cancelling system structure [19].
Figure 4. Noise-referenced adaptive noise-cancelling system structure [19].
Electronics 09 00866 g004
Figure 5. Template obtained from chest-ECG (C-ECG) signal using Equation (12).
Figure 5. Template obtained from chest-ECG (C-ECG) signal using Equation (12).
Electronics 09 00866 g005
Figure 6. Changes in mean squared error (MSE) and signal-to-noise ratio (SNR) values of C-ECG signals against step size after filtering (a) baseline wandering (BLW), (b) electrode movement (EM), (c) power line interference (PLI), (d) muscle artifact (MA), and (e) white (W) noises by least mean squares (LMS). Note the X-axis is in log scale.
Figure 6. Changes in mean squared error (MSE) and signal-to-noise ratio (SNR) values of C-ECG signals against step size after filtering (a) baseline wandering (BLW), (b) electrode movement (EM), (c) power line interference (PLI), (d) muscle artifact (MA), and (e) white (W) noises by least mean squares (LMS). Note the X-axis is in log scale.
Electronics 09 00866 g006
Figure 7. Removal of W from C-ECG (left) and left-arm (LA)-ECG (right). From the top: Raw ECG signal, corrupted ECG, ECG denoised by LMS, RLS, and EKRLS.
Figure 7. Removal of W from C-ECG (left) and left-arm (LA)-ECG (right). From the top: Raw ECG signal, corrupted ECG, ECG denoised by LMS, RLS, and EKRLS.
Electronics 09 00866 g007
Figure 8. Removal of MA from C-ECG (left) and LA-ECG (right). From the top: Raw ECG signal, corrupted ECG, ECG denoised by LMS, RLS, and EKRLS.
Figure 8. Removal of MA from C-ECG (left) and LA-ECG (right). From the top: Raw ECG signal, corrupted ECG, ECG denoised by LMS, RLS, and EKRLS.
Electronics 09 00866 g008
Figure 9. Removal of EM from C-ECG (left) and LA-ECG (right). From the top: Raw ECG signal, corrupted ECG, ECG denoised by LMS, RLS, and EKRLS.
Figure 9. Removal of EM from C-ECG (left) and LA-ECG (right). From the top: Raw ECG signal, corrupted ECG, ECG denoised by LMS, RLS, and EKRLS.
Electronics 09 00866 g009
Figure 10. Removal of BLW from C-ECG (left) and LA-ECG (right). From the top: Raw ECG signal, corrupted ECG, ECG denoised by LMS, RLS, and EKRLS.
Figure 10. Removal of BLW from C-ECG (left) and LA-ECG (right). From the top: Raw ECG signal, corrupted ECG, ECG denoised by LMS, RLS, and EKRLS.
Electronics 09 00866 g010
Figure 11. Removal of PLI from C-ECG (left) and LA-ECG (right). From the top: Raw ECG signal, corrupted ECG, ECG denoised by LMS, RLS, and EKRLS.
Figure 11. Removal of PLI from C-ECG (left) and LA-ECG (right). From the top: Raw ECG signal, corrupted ECG, ECG denoised by LMS, RLS, and EKRLS.
Electronics 09 00866 g011
Figure 12. Sample portion of transformed signal. Match of transformed LA-ECG signal initially corrupted with W noise and denoised by LMS.
Figure 12. Sample portion of transformed signal. Match of transformed LA-ECG signal initially corrupted with W noise and denoised by LMS.
Electronics 09 00866 g012
Table 1. SNR of LMS-filtered C-ECG signals and MSE values against step size for different noises.
Table 1. SNR of LMS-filtered C-ECG signals and MSE values against step size for different noises.
1 × 1064.30 × 10−59.46742.51 × 10−89.01304.27 × 10−59.46601.98 × 10−59.32202.54 × 10−59.3627
5 × 1061.07 × 10−311.50006.25 × 10−78.97141.06 × 0−311.49104.91 × 10−410.62526.31 × 10−410.8616
1 × 1054.23 × 10−314.93062.49 × 10−68.92004.20 × 10−314.90411.95 × 10−312.57322.50 × 10−313.1680
5 × 1059.76 × 10−26.24525.90 × 10−58.53059.70 × 10−26.28934.60 × 10−212.99275.77 × 10−210.6586
1 × 1043.54 × 10−1−1.91472.21 × 10−48.09313.52 × 10−1−1.88441.71 × 10−12.39912.10 × 10−11.1424
5 × 1044.31−14.37593.25 × 10−35.89494.31−14.36692.51−11.83372.56−11.9311
1 × 1038.07−17.25426.45 × 10−34.88128.09−17.26335.64−15.61344.81−14.8776
5 × 1031.06 × 10−18.49761.51 × 10−230.55551.09 × 10−18.60318.57−17.52966.50−16.2656
1 × 1021.05 × 10−18.43731.76 × 10−12.24081.09 × 10−18.60372.08−10.96126.55−16.2992
5 × 1021.06 × 10−18.48134.64 × 10−1−3.35021.09 × 10−18.60021.24 × 102−29.64586.70−16.4053
1 × 1011.07 × 10−18.54485.37 × 10−1−4.12041.08 × 10−18.59575.35 × 102−35.92686.65−16.3671
5 × 1011.09 × 10−18.62205.22 × 10−1−3.9871.12 × 10−18.73874.38 × 103−45.03196.55−16.3029
Table 2. MSE of noisy LA and C-ECG signals filtered by LMS, recursive least squares (RLS), and extended kernel recursive least squares (EKRLS).
Table 2. MSE of noisy LA and C-ECG signals filtered by LMS, recursive least squares (RLS), and extended kernel recursive least squares (EKRLS).
NoiseAlgorithmFiltered ECG MSE
BLWLMS4.25 × 10−34.22 × 10−3
EM *LMS1.41 × 10−21.51 × 10−2
EKRLS1.22 × 101.21 × 10
PLILMS4.22 × 10−34.20 × 10−3
RLS6.01 × 10−47.84 × 10−4
EKRLS1.03 × 10−21.04 × 10−2
MALMS1.91 × 10−31.95 × 10−3
WLMS2.50 × 10−32.50 × 10−3
RLS1.02 × 101.02 × 10
EKRLS1.07 × 101.07 × 10
* The MSE values for removing EM from L.A. and chest by LMS were calculated for μ = 0.005, which resulted in the highest SNR. The rest were calculated for μ = 1 × 10−5.
Table 3. MSEc and SNR values of transformed signals initially denoised by LMS.
Table 3. MSEc and SNR values of transformed signals initially denoised by LMS.
ECG TypeNoise TypeNoisy Signal SNR (dB) *Transformed Signal SNR (dB) **Original C-ECG SNR (dB)MSEc of T-ECG and Original C-ECG ***
* calculated using Equations (12)–(16) with σ T ( k ) as the noisy signal. The used step size for denoising EM was μ = 0.005 and μ = 1 × 10−5 for the rest of the artifacts. ** calculated using Equation (16). *** calculated using Equation (17).
Back to TopTop