Next Article in Journal
Examining the Drivers of E-Commerce Adoption by Moroccan Firms: A Multi-Model Analysis
Next Article in Special Issue
Deep-Learning-Based Human Chromosome Classification: Data Augmentation and Ensemble
Previous Article in Journal
A Comparison of Machine Learning Techniques for the Detection of Type-2 Diabetes Mellitus: Experiences from Bangladesh
Previous Article in Special Issue
Nonlinear Activation-Free Contextual Attention Network for Polyp Segmentation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Subject-Independent per Beat PPG to Single-Lead ECG Mapping

1
Department of Electrical Engineering, Faculty of Engineering, Sohag University, Sohag 82524, Egypt
2
Department of Electrical Engineering, Faculty of Engineering, Aswan University, Aswan 81542, Egypt
*
Author to whom correspondence should be addressed.
Information 2023, 14(7), 377; https://doi.org/10.3390/info14070377
Submission received: 26 May 2023 / Revised: 22 June 2023 / Accepted: 26 June 2023 / Published: 3 July 2023
(This article belongs to the Special Issue Biosignal and Medical Image Processing)

Abstract

:
In this paper, a beat-based autoencoder is proposed for mapping photoplethysmography (PPG) to a single-lead electrocardiogram (single-lead ECG) signal. The main limiting factors represented in uncleaned data, subject dependency, and erroneous beat segmentation are regarded. The dataset is cleaned by a two-stage clustering approach. Rather than complete single–lead ECG signal reconstruction, a beat-based PPG-to-single-lead-ECG (PPG2ECG) conversion is introduced for providing a simple lightweight model that meets the computational capabilities of wearable devices. In addition, peak-to-peak segmentation is employed for alleviating errors in PPG onset detection. Furthermore, subject-dependent training is highlighted as a critical factor in training procedures because most existing work includes different beats/signals from the same subject’s record in both training and testing sets. So, we provide a completely subject-independent model where the testing subjects’ records are hidden in the training stage entirely, i.e., a subject record appears once either in the training or testing set, but testing beats/signals belong to records that never appear in the training set. The proposed deep learning model is designed for providing efficient feature extraction that attains high reconstruction quality over subject-independent scenarios. The achieved performance is about 0.92 for the correlation coefficient and 0.0086 for the mean square error for the dataset extracted/cleaned from the MIMIC II dataset.

1. Introduction

Nowadays, cardiovascular disease (CVD) has become a widespread cause of death [1]. In 2020, the World Health Organization (WHO) reported that CVD was the leading reason for human mortality, accounting for 32% of global deaths [1]. The early diagnosis and detection of CVD help in treating and avoiding the complications of the disease which may lead to death [2]. So, the continuous monitoring of heart health status is urgent. There are many biological signals reflecting our medical condition. However, electrocardiogram (ECG) and photoplethysmography (PPG) are the most common signals employed in monitoring heart status and the circulatory system. An ECG signal introduces detailed information about electrical heart activity. Heart abnormalities can be detected by examining the structural characteristics of an ECG signal that is described by some featured impulses (P, Q, R, S, and T waves) [3,4]. It can be used for detecting diseases such as hypertension [5], cardiac arrhythmia [6,7], coronary artery disease [8], heart attack [9], and cardiomyopathy [10].
Unfortunately, continuous long-term and direct ECG monitoring have some limitations during normal human activities. There is a great deal of research being conducted, mostly in vain, to design wearable devices able to monitor ECG [11]. Wearable devices [12] may be worn on the chest, such as a Zio Patch, or the wrist, such as an Apple Watch. Regarding the Zio Patch, for people with sensitive skin, the extended usage of self-adhesive sensors, during multi-day monitoring, may raise the risk of skin irritations [13]. For the Apple Watch, it can measure ECG signal by having the user tap the device’s crown with their fingertip but because it calls for active user involvement, long-term monitoring is not possible. It does not match many users for long-term measurements because it needs some sort of active user involvement.
On the other side, PPG is a simple and cheap optical method that is used for detecting blood volume changes in microvascular tissue. The PPG waveform comprises a pulsatile (‘AC’) physiological waveform attributed to cardiac synchronous changes in the blood volume with each heartbeat and is superimposed on a slowly varying (‘DC’) baseline with various lower frequency components attributed to respiration, sympathetic nervous system activity, and thermoregulation [14]. PPG signal features are used in measuring respiration rate [15], heart rate [16], heart rate irregularity [17], blood pressure [18], blood oxygen saturation [19], and to assess vascular function [20]. Many devices, such as smartwatches and oximeters, used to measure PPG signals are cheaper and more comfortable compared to devices used to measure ECG signals. It is thus expected that PPG will be an alternative to ECG in heart-rate-variability monitoring [21]. Therefore, ECG signal inference from a simple measure of a PPG signal has become highly motivated recently. Fortunately, PPG and ECG signals are strongly correlated, as shown in Figure 1, because variation in the peripheral blood volume is a result of myocardial activities, and the electrical signals coming from the sinoatrial (SA) node regulate these activities. Some researchers have explored the relationship between ECG and PPG. For example, heart rates measured using ECG and PPG are strongly correlated. This means that PPG periodicity and ECG periodicity are highly correlated [22]. Moreover, PPG and ECG are correlated when an arrhythmia occurs [23]. Concerning the characteristics of a heartbeat, some important parameters of a PPG are also related to an ECG [24]. The PPG’s features can be used to estimate the PR, QRS, QT, and RR intervals of ECG. So, inferring the single-lead ECG signal from the corresponding PPG signal introduces simple single-lead ECG reconstruction from a single wearable sensor. Hence, the extensive clinical knowledge found in the reconstructed single-lead ECG signal helps to assess cardiovascular health more accurately.
In this paper, we are interested in resolving the main following challenging limitations in PPG-based single-lead ECG reconstruction:
  • Noisy training dataset: There is a great impact of noisy training samples on the overall model learning accuracy;
  • Long signal reconstruction: The problems arising from complete signal reconstruction are represented in (1) the impact of noise interval on the overall reconstruction where the signal quality may vary due to sensor movement/user activity. (2) Moreover, long signal reconstruction results in a deep learning model with higher computational complexity;
  • Beat segmentation errors: The problem arising from per-beat reconstruction resides in a high chance of errors in PPG onset detection\segmentation in both sensed signals and training datasets;
  • Low reconstruction quality/Subject dependency: There are many claims for excellent performance over subject-dependent models where the model is trained for specific subject signals only. However, the achieved performance of single-lead ECG reconstruction is poor in subject-independent models where the model is trained over the whole dataset signals.
So, this paper introduces a subject-independent PPG-to-single-lead-ECG per-beat reconstruction. Initially, the training dataset is cleaned effectively by a two-stage clustering approach. Rather than complete signal reconstruction, a beat-based PPG-to-single-lead-ECG conversion is introduced for providing a lightweight model that meets the low computational capabilities of wearable devices. Onset errors are alleviated by following peak-to-peak segmentation instead of onset (minimum) segmentation. Subject independence is regarded by employing an efficient feature extraction model and effective data augmentation.
The rest of the paper is organized as follows: Section 2 describes the related works; Section 3 describes the proposed scheme including the dataset, preprocessing, and the proposed deep learning model; Section 4 provides model training, evaluation, and discussion; and finally, Section 5 concludes the paper.

2. Related Work

ECG reconstruction from PPG signal has been introduced recently in many pieces of research, with great emphasis on modeling and understanding waveform morphologies [25,26]. These studies vary in applied techniques and the size of the signal they deal with. Some authors use a fixed-length signal irrespective of the number of included beats [27,28], while others operate on a beat-by-beat basis [29,30,31]. The CardioGAN paper [27] introduces the generation of single-lead ECG from PPG using a generative adversarial network (GAN). The input is a fixed length of the PPG signal, and the output is the same length as the single-lead ECG signal. This GAN is based on CycleGAN [32] and uses a dual-discriminator network. The main evaluation of CardioGAN [27] concentrates on the achieved reduction in heart rate estimation error based on the reconstructed ECG compared to that estimated from PPG. It is worth mentioning that wearable devices have limited computational power and memory, so CardioGAN is not suitable for wearable devices because it uses an attention-based network which increases the number of model parameters. In [28], the authors propose a subject-based model that uses dense and BiLSTM layers to generate an ECG signal from a PPG signal. This model suffers from the problem that if only a part of the signal is noisy, it will affect the overall output. Moreover, the model was not tested on PPG signals from subjects the model was not trained on. In other words, the model is trained on some signals from all subjects in the dataset without excluding particular subjects for the test. In [29], the authors propose a beat-based linear regression model; its input is a discrete cosine transform (DCT) of a PPG beat, and the output is a single-lead ECG beat. The problem with this model is that the relation between single-lead ECG and PPG beats is not linear. In addition, the model needs a lot of preprocessing to segment the PPG signal and convert a PPG beat to its DCT. In [30], the nonlinear relationship between single-lead ECG and PPG beats is learned in the scattering wavelet transform (SWT) domain. In [31], the authors use dictionary learning to map the features of PPG beats and ECG beats, with a correlation coefficient of 0.82 on the BIDMC dataset [33]. In [34], the authors introduce a beat-based autoencoder deep learning model. Although the authors introduce a compressed version which has a low number of parameters, it still exhibits a low performance with about a 0.89 correlation coefficient between reconstructed and actual single-lead ECG beats on the BIDMC dataset [33].
To the best of our knowledge, most PPG-to-single-lead-ECG approaches include some sort of subject dependency. From a training point of view, as shown in Table 1, the training process may be classified according to subject dependency as follows:
  • Subject-Dependent: Signals/beats from the same subject are divided into training and testing datasets. The model is trained on some beats and tested on other beats related to the same subject;
  • Partial Subject-Independent: The training is performed on 80% of beats from multiple subjects and tested on the last 20% of beats from the same subjects. A part of all subjects’ records is involved in training, whereas the other part is used for testing. It provides more generalization than subject-dependent models;
  • Completely Subject-Independent: The training is performed on subjects and tested on completely different subjects. This represents the most interesting scenario addressed in this paper.

3. Proposed System

In this paper, rather than complete signal reconstruction, a beat-based PPG-to-single-lead-ECG conversion is introduced for providing a simple surpass model. Data outliers are cleaned by a two-stage clustering approach (the cleaned dataset can be provided for interested researchers upon request.). The proposed deep learning model is designed for providing efficient feature extraction and regarding the data nature as a time series (signal). Hence, an efficient subject-independent model can be attained. Regarding the common problem of beat segmentation, peak-to-peak segmentation is employed for alleviating errors in PPG onset detection. The complete proposed system is shown in Figure 2. The individual stages are explained in detail in this section.

3.1. Dataset

In this paper, we work on three different datasets individually. The first dataset is PhysioNet’s MIMIC II dataset (Multiparameter Intelligent Monitoring in Intensive Care) [35]. It is employed in our study through a compiled/organized version presented in [36]. It contains 12,000 records of different lengths. Each record contains three signals: ABP (arterial blood pressure (mmHg)), PPG (from fingertip), and ECG (from channel II) signals sampled at Fs = 125 samples/sec. However, in this paper, we are interested in both PPG and corresponding ECG signals only. The long records are divided into sections 1024 samples long for proper filtering and inspection for further cleaning.
The second dataset is BIDMC [33]; this dataset was extracted from the MIMIC II dataset with manual annotation of breath. The number of records in the dataset is 53 from 53 different subjects. The dataset waveforms are PPG and single-lead ECG sampled at 125 HZ. In addition, physiological parameters, such as heart rate (HR), respiratory rate (RR), and blood oxygen saturation level (SpO2) are available. These are sampled at 1 Hz. Manual breath annotation is available. The BIDMC dataset provides additional parameters such as gender and age. However, we are interested in ECG and PPG waveforms only.
The last dataset is extracted from the MIMIC dataset [37]. The training is performed on one subject, while the testing is performed on a completely different subject. However, it is better to consider subjects with similar heart diseases. The only advantage of the dataset over the MIMIC II dataset is that the ECG signals are sampled at a higher sampling rate (500 HZ).

Pre-Preprocessing

  • Filtering
A band-pass ideal filter [38] is applied on PPG and ECG sections over the [0.5–8] Hz range and [0.5–30] Hz range, respectively. These band-pass filters help dispose of high-frequency and low-frequency noise, as shown in Figure 3. This filter is a frequency domain filter (noncausal filter) where the signal is transferred into the frequency domain through DFT. Unwanted frequency bins are replaced by zeros before coming back to the time domain by IDFT operation.
  • Peak detection
We believe that one of the main challenges in beat-based single-lead ECG reconstruction resides in PPG onset detection and segmentation [39]. Common PPG segmentation may be characterized by detecting local minima points before systolic activity; however, PPG has many variants/classes that violate the most common form where the diastolic notch may be negative [40]. Hence, we follow peak-to-peak beat segmentation instead of minimum onset segmentation. The peak detection algorithms used for ECG and PPG are the Pan–Tompkins algorithm [41] and block method [42], respectively, as shown in Figure 4. Then, we aligned ECG R peaks and PPG peaks, as shown in Figure 5. After alignment, we detect peaks again to make segmentation based on the peaks detected.
  • Alignment failure
Outlier removal starts by excluding them in signal level. Some records have to be excluded where one signal (at least) is distorted. So, if the PPG, ABP, or ECG (lead II) signal was distorted, the whole record will be dropped out where the missing peak alignment is considered an indication of being a noisy signal. In signal-level cleaning, peak alignment of the PPG/ABP/ECG signal is regarded as a necessary condition for accepting the record for the further beat segmentation stage. Thus, over the selected record (time window), peak alignment failure excludes that record completely. An alignment example is shown in Figure 5. For the second and third datasets, that do not have ABP signals, alignment is performed between ECG and PPG signals.
  • Segmentation and normalization
After successful signal alignment, signals are divided into beats. Each beat is normalized in amplitude in the range [0, 1] and in length to comprise 128 samples.
  • Outlier beat removal
To make sure that no bad segmented or distorted beats are in our data, we used density-based clustering based on hierarchical density estimates (HDBSCAN) [43]. It extends density-based spatial clustering of applications with noise (DBSCAN) [44]. An example of detected noisy clustering is shown in Figure 6. This step helps in decreasing the model mean square error. Our cleaned dataset will be made available to those concerned upon request.

3.2. Proposed Deep Learning Model

3.2.1. Model Choice

Our deep learning model is an encoder–decoder-based architecture (autoencoder). The encoder part consists of multiple layers of a 1D convolution neural network (CNN) to extract features from PPG beats. It is well-known that CNNs outperform recurrent neural networks (RNNs) in parallelization. Since an RNN operates sequentially, it will not benefit from GPUs or any sort of parallelization. Already, CNNs have been widely employed for ECG processing such as ECG beat classification [45]. The last part of the encoder is the bottleneck which is used to allow the combination of features for the decoder part.
The decoder part consists of multiple 1D deconvolution layers. Many deep learning models have extensively used transposed convolutional layers for up-sampling, such as encoder–decoder networks for semantic segmentation and deep generative models for unsupervised learning. It is used to increase the resolution of the output. It is equivalent to a convolution layer followed by up-sampling. The last decoder layer is the bidirectional long short-term memory (BiLSTM). The decoder part is used to reconstruct ECG beats from features extracted from PPG beats. However, to obtain the benefits of an RNN structure which relates past and present, we have chosen to make the last layer only of BiLSTM that exhibits remarkable success in the problem of sequential and time series [46].

3.2.2. Model Details

Our model consists of main two parts, the encoder and the decoder, as shown in Figure 7.
A.
The encoder part consists of four blocks and a bottleneck. Each block consists of a 1D CNN layer for feature extraction, a batch normalization layer that helps in making training more stable and faster (allowing every layer of the network to do learning more independently), and a max pooling layer for feature reduction to dispose of unnecessary features. The kernel size of beginning layers was chosen to be of small dimensions to extract small features. Kernel dimensions increase with advancing layers to extract and combine features from small features. The activation function used in almost all model layers is Leaky ReLU, which has proved its efficiency in generative networks with fast training compared to other activation functions. The bottleneck consists of a flattening layer that flattens the output of the previous convolution layer to feed it to a dense layer. Another benefit of flattening layers is to allow a combination of features that come from different places of the previous convolution layer.
B.
The decoder part consists of four blocks followed by a convolution transpose layer and only one BiLSTM layer at the end. Each block of the decoder blocks consists of a convolution transpose layer and batch normalization followed by the Leaky ReLU activation function. The last layer is a BiLSTM layer that was chosen to make samples of reconstructed ECG beats related to each other. Other than normal LSTM, which can detect the dependency of the next sample on previous samples, the chosen BiLSTM can detect the dependency of the next samples on previous samples and vice versa.

4. Model Training and Results

4.1. Model Training

From a training point of view, the training process may be classified according to subject dependency into three main classes, as shown in Table 1.
The model was trained and tested three times on three different datasets individually, as shown in Table 2:
The training process is stated as follows:
  • MIMIC II dataset
The model is trained on a dataset extracted from MIMIC II for about 35 epochs with a batch size of 32 beats. The used optimizer is the Adam optimizer, and the loss function is a mean square error (MSE). We have tried loss functions that depend on similarity and MSE. Datasets are divided into train, validation, and test by ratios of 80%, 10%, and 10%, respectively.
2.
BIDMC dataset
To compare our model’s performance with previous models’ performance, the same BIDMC dataset was chosen, preprocessed in the same way mentioned in Section 3, and divided into a ratio of 80% for training and 20% for testing. The used loss function and optimizer are the same as those used in MIMIC II training.
3.
Completely subject-independent training
At this time, we trained the model on subject beats from the MIMIC dataset that has CHF (congestive heart failure). The training subject is male and is 84-years-old, whereas the model is tested on another subject (male, 73-years-old) from the MIMIC dataset, which also has CHF. ECG and PPG signals were preprocessed as mentioned in Section 3 but along with an additional data augmentation step. There are many models for data augmentation suitable for ECG signals [47]. It includes adding some shapes (sine, square, or random noise) to some random intervals of the signal/beat. However, in this paper, we selected to add a Gaussian shape to some intervals in each beat in the ECG and PPG beats. It is worth mentioning that the randomness of adding a Gaussian shape to ECG beats is independent of the randomness of adding a Gaussian shape to PPG beats. This helps in obtaining some shape of ECG and PPG that is not found in the original training dataset and is similar to the test dataset. Then, we choose 5000 beats from the training person after augmentation and tested the model on about 6000 beats from the test person. That augmentation step results in posting Pearson’s correlation coefficient.
For evaluation model results, we have used two factors of the following:
  • Pearson’s correlation coefficient (r)
Pearson’s correlation coefficient expresses the correlation between two variables [48]. The absolute value of r ranges from [0 to 1]. Values near one indicate a strong correlation, and small values indicate a weak correlation.
r = i = 1 l ( E C G a c t i E C G a c t ¯ ) i = 1 l ( E C G r e c i E C G r e c ¯ ) i = 1 l ( E C G a c t i E C G a c t ¯ ) 2 i = 1 l ( E C G r e c i E C G r e c ¯ ) 2
In this formula, ECGact(i) and ECGrec(i) are the individual sample points of the actual single-lead ECG (lead II) and reconstructed single-lead ECG indexed with “i”, respectively. The variable l is the beat length of the actual ECG. The variables E C G a c t ¯ and E C G r e c ¯ are the mean sample values of the reference single-lead ECG and reconstruction single-lead ECG, respectively.
  • Relative root mean square error (rRMSE)
rRMSE metrics are commonly used for determining how far a model’s output is from the real output. rRMSE values have a range from [0 to infinity]. rRMSE is given from the following equation:
r R M S E = 1 l i = 1 l ( E C G a c t i E C G r e c ( i ) ) 2 i = 0 l ( E C G a c t ( i ) ) 2
  • Mean square error (MSE)
MSE metrics are commonly used for determining how far a model’s output is from the real output. MSE values have a range from [0 to infinity]. MSE is given from the following equation:
M S E = 1 l i = 1 l ( E C G a c t i E C G r e c ( i ) ) 2
  • Complexity criteria
The measure of complexity is chosen to be platform-independent FLOPs (floating point operations) which represent the number of addition, subtraction, multiplication, and division operations required to obtain the output of the deep learning model. The FLOPs of our model is 2.28 M for the input beat of 128 samples.

4.2. Results

As mentioned, we perform model training/testing on three different datasets separately. So, this section demonstrates the model performance on these sets.

4.2.1. MIMIC II Subject-Independent Training

After training the model on datasets and evaluating it on a test set of about 80,000 beats of our dataset, we obtained the results shown in Figure 8a,b. This figure represents the relation between mean square error and the number of beats generated by the model at this value of the mean square error and also shows the relation between MSE and correlation coefficient. The results summary is shown in Table 3. Figure 9 shows examples of the model output in test beats from the MIMIC II extracted dataset. To make the model output in the form of a signal, all we need is to concatenate the extracted beats together, as shown in Figure 10.

4.2.2. BIDMC Subject-Independent Training

As shown in Table 4, the results of model training and testing on the BIDMC dataset reveal that our model outperforms previous works in terms of Pearson’s correlation coefficient and relative root mean square error. Figure 11 shows the model output on a test dataset from BIDMC. Figure 12 shows the generalization of the model by providing the r and rRMSE of each subject individually from the BIDMC dataset.

4.2.3. Completely Subject-Independent Training Scheme Results

As shown in Table 5, there is an obvious improvement in the results due to oriented data augmentation which includes adding a Gaussian shape during random beat instants, as shown in Figure 13. An example of ECG (lead II) prediction over a completely subject-independent scheme is presented in Figure 14.

4.3. Discussion

Many deep-learning-based models try to reconstruct ECG (lead II) from PPG using complex architectures, which leads to a corresponding increase in the number of parameters and the complexity of the training process. However, we find that the model architecture and layer-type choice are more important than the complexity of the model architecture.
The superiority of our results can be justified based on four factors affecting model performance:
  • The data preprocessing step: It is as important as the model architecture design. Cleaned data support good training and evaluation by excluding disturbing data. For example, the choice of segmentation to be peak-to-peak and the outlier removal step help to increase the Pearson’s correlation coefficient between the model output and actual single-lead ECG beats.
  • Data augmentation step: For resolving data shortage, proper data augmentation is applied. The augmentation procedure adds a Gaussian shape randomly that resembles the encountered signal variations. For example, in the case of the completely subject-independent scheme, data augmentation helps in boosting the Pearson’s correlation coefficient by 4%.
  • Model architecture: The optimal architecture (including a good choice of the number of model layers, the size of the filters of each layer, and the number of filters for convolution layers and optimizer) is more important than the complexity of the architecture of the model. Moreover, adding the BiLSTM layer at the end of the decoder enables detecting the dependency of the next samples on previous samples and vice versa. Furthermore, this layer makes beat samples related to each other, which leads to a smoothing of model output, which leads to boosting the Pearson’s correlation coefficient by 1%. It is worth mentioning that the output of the model without the BiLSTM layer was noisy.
  • Complexity adaptation: The number of layers is adapted for properly describing underlying features without being highly complicated. So, this provides a lightweight model with low complexity order. Hence, it is proper to integrate it into wearable devices satisfying the computation power limitation of mobile devices. It only has about 57 K parameters with a size of 850 KB. Another measure of complexity is the FLOPs of our model: 2.28 M for the input beat of 128 samples. Moreover, it can be used to provide input for another model to detect heart diseases that cannot be detected very well using only PPG.
The limitations of this paper are the following:
  • The frequency band of the band-pass filter is one of the data and model’s limitations. The frequency band is from 0.5 to 30 Hz, which will affect signals with a frequency band more than 30 HZ, which happens in some arrhythmias. This limitation will be addressed in future work. The reason behind this choice is that ECG with frequency bands more than 30 HZ is not popular, and this range helps in disposing of noisy signals. It is worth mentioning that some research uses smaller bands, for example, the authors in [28] chose the band to be from 0.5 to 20 HZ.
  • The second limitation of this paper is inaccurate peak detection. Inaccurate peak detection will have an effect in the training stage and testing stage. In the training stage, inaccurate peak detection will result in wrong beats which will be removed in the outlier removal step during data cleaning. If the number of inaccurate beats increases, the number of outliers will increase, so it will lessen the number of training beats. In the testing stage, the performance of almost any beat-based deep learning model will be negatively affected if it is fed inaccurate beats. For our model, it will be dependent on the amount of bias between the correct peaks and the detected peaks. A small amount of bias will not have a significant effect on model output. The effect of bad segmentation (inaccurate peak detection) varies; sometimes it appears in the T wave, P wave, or both of them, as shown in Figure 15. This problem can be solved by ensuring that the algorithm used to detect peaks is accurate and removes inaccurate peaks before feeding them to model. This problem will be addressed in future work.
  • As known ECG signals (lead II) have a large variation from one to another, so in a completely subject-independent training scheme, we have some limitations and conditions to obtain good results. Training and testing datasets should come from people with the same gender and same health status; their ages should also be near to each other. The previous condition ensures that the variation between testing and training can be captured by the deep learning model. This limitation will be addressed in future work by using deep learning generalization techniques and searching for a large dataset that meets the previous conditions.

5. Conclusions

This paper introduces a lightweight subject-independent deep learning model for reconstructing single-lead ECG beats from PPG beats. Data cleaning, data augmentation, beat segmentation, and model construction are regarded carefully for enhancing PPG2ECG inference. The model is based on BiLSTM and convolution layers. The proposed model achieves an outstanding generalization performance even over subject-independent scenarios. The Pearson’s correlation coefficient of test data was 0.92, and the mean square error was 0.0086. The resulting model is lightweight and proper to be integrated into mobile devices without the need to be trained for every new user.

Author Contributions

K.M.A. and M.S. contributed to the investigation and implementation of algorithms presented in this work, performed simulations, and prepared all the figures, A.E.A.F. and A.S.M. wrote the main manuscript, and O.A.O. reviewed the manuscript. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Available upon request.

Acknowledgments

At the time of this writing, the only contributors to the content of this work are the authors. We would be happy to thank reviewers for useful feedback.

Conflicts of Interest

The authors declare no conflict of interest.

Ethical Approval

The authors declare that the manuscript consists of the public dataset for PPG signals and does not include any human or animal studies. Our cleaned dataset will be made available to those concerned upon request.

Competing Interests

The authors declare that the manuscript does not include competing financial or personal interests.

Abbreviations

µmean
ABParterial blood pressure
BiLSTMbidirectional long short-term memory
CNNconvolutional neural network
CVDcardiovascular disease
DBSCANdensity-based spatial clustering of applications with noise
DCTdiscrete cosine transform
ECGelectrocardiogram
FLOPsfloating point operations
GANgenerative adversarial network
HDBSCANdensity-based clustering based on hierarchical density estimates
MIMICMultiparameter Intelligent Monitoring in Intensive Care
MSEmean square error
PPGphotoplethysmography
rPearson’s correlation coefficient
RNNrecurrent neural network
rRMSErelative root mean square error
SAsinoatrial
WHOWorld Health Organization
σstandard deviation

References

  1. Organization World Health. World Health Statistics 2022; Organization World Health: Geneva, Switzerland, 2022. [Google Scholar]
  2. Rosiek, A.; Leksowski, K. The risk factors and prevention of cardiovascular disease: The importance of electrocardiogram in the diagnosis and treatment of acute coronary syndrome. Ther. Clin. Risk Manag. 2016, 12, 1223. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  3. Vicar, T.; Novotna, P.; Hejc, J.; Janousek, O.; Ronzhina, M. (Eds.) Cardiac abnormalities recognition in ECG using a convolutional network with attention and input with an adaptable number of leads. In 2021 Computing in Cardiology (CinC); IEEE: Piscataway, NJ, USA, 2021. [Google Scholar]
  4. Aublin, P.; Ben Ammar, M.; Achache, N.; Benahmed, M.; El Hichami, A.; Barret, M.; Fix, J.; Oster, J. (Eds.) Cardiac abnormality detection based on an ensemble voting of single-lead classifier predictions. In 2021 Computing in Cardiology (CinC); IEEE: Piscataway, NJ, USA, 2021. [Google Scholar]
  5. Dawber, T.; Kannel, W.; Love, D.E.; Streepe, R.B. The electrocardiogram in heart disease detection; a comparison of the multiple and single lead procedures. Circulation 1952, 5, 559–566. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  6. Afkhami, R.G.; Azarnia, G.; Tinati, M.A. Cardiac arrhythmia classification using statistical and mixture modeling features of ECG signals. Pattern Recognit. Lett. 2016, 70, 45–51. [Google Scholar] [CrossRef]
  7. Dilmac, S.; Korurek, M. ECG heart beat classification method based on modified ABC algorithm. Appl. Soft Comput. 2015, 36, 641–655. [Google Scholar] [CrossRef]
  8. Acharya, U.R.; Hagiwara, Y.; Koh, J.E.W.; Oh, S.L.; Tan, J.H.; Adam, M.; Tan, R.S. Entropies for automated detection of coronary artery disease using ECG signals: A review. Biocybern. Biomed. Eng. 2018, 38, 373–384. [Google Scholar] [CrossRef]
  9. Oresko, J.J.; Jin, Z.; Cheng, J.; Huang, S.; Sun, Y.; Duschl, H.; Cheng, A.C. A wearable smartphone-based platform for real-time cardiovascular disease detection via electrocardiogram processing. IEEE Trans. Inf. Technol. Biomed. 2010, 14, 734–740. [Google Scholar] [CrossRef]
  10. Nasimov, R.; Muminov, B.; Mirzahalilov, S.; Nasimova, N. (Eds.) Algorithm of Automatic Differentiation of Myocardial Infarction from Cardiomyopathy based on Electrocardiogram. In Proceedings of the 2020 IEEE 14th International Conference on Application of Information and Communication Technologies (AICT), Tashkent, Uzbekistan, 7–9 October 2020; IEEE: Piscataway, NJ, USA, 2020. [Google Scholar]
  11. Steinberg, C.; Philippon, F.; Sanchez, M.; Fortier-Poisson, P.; O’hara, G.; Molin, F.; Sarrazin, J.-F.; Nault, I.; Blier, L.; Roy, K.; et al. A novel wearable device for continuous ambulatory ECG recording: Proof of concept and assessment of signal quality. Biosensors 2019, 9, 17. [Google Scholar] [CrossRef] [Green Version]
  12. Kamga, P.; Mostafa, R.; Zafar, S. The Use of Wearable ECG Devices in the Clinical Setting: A Review. Curr. Emerg. Hosp. Med. Rep. 2022, 10, 67–72. [Google Scholar] [CrossRef]
  13. Wang, D.; Yang, X.; Liu, X.; Jing, J.; Fang, S. Detail-preserving pulse wave extraction from facial videos using consume-level camera. Biomed. Opt. Express 2020, 11, 1876–1891. [Google Scholar] [CrossRef]
  14. Allen, J. Photoplethysmography and its application in clinical physiological measurement. Physiol. Meas. 2007, 28, R1. [Google Scholar] [CrossRef] [Green Version]
  15. Karlen, W.; Raman, S.; Ansermino, J.M.; Dumont, G.A. Multiparameter respiratory rate estimation from the photoplethysmogram. IEEE Trans. Biomed. Eng. 2013, 60, 1946–1953. [Google Scholar] [CrossRef]
  16. Temko, A. Accurate heart rate monitoring during physical exercises using PPG. IEEE Trans. Biomed. Eng. 2017, 64, 2016–2024. [Google Scholar] [CrossRef] [Green Version]
  17. Harju, J.; Tarniceriu, A.; Parak, J.; Vehkaoja, A.; Yli-Hankala, A.; Korhonen, I. Monitoring of heart rate and inter-beat intervals with wrist plethysmography in patients with atrial fibrillation. Physiol. Meas. 2018, 39, 065007. [Google Scholar] [CrossRef]
  18. Slapničar, G.; Luštrek, M.; Marinko, M. Continuous blood pressure estimation from PPG signal. Informatica 2018, 42, 33–42. [Google Scholar]
  19. Mohan, P.M.; Nisha, A.A.; Nagarajan, V.; Jothi, E.S.J. (Eds.) Measurement of arterial oxygen saturation (SpO2) using PPG optical sensor. In Proceedings of the 2016 International Conference on Communication and Signal Processing (ICCSP), Noida, India, 26–28 December 2016; IEEE: Piscataway, NJ, USA, 2016. [Google Scholar]
  20. Kuznetsova, T.; Szczesny, G.; Thijs, L.; Jozeau, D.; D’hooge, J.; Staessen, J.A. Assessment of peripheral vascular function with photoplethysmographic pulse amplitude. Artery Res. 2011, 5, 58–64. [Google Scholar] [CrossRef]
  21. Elgendi, M. On the analysis of fingertip photoplethysmogram signals. Curr. Cardiol. Rev. 2012, 8, 14–25. [Google Scholar] [CrossRef] [PubMed]
  22. Lin, W.-H.; Wu, D.; Li, C.; Zhang, H.; Zhang, Y.-T. (Eds.) Comparison of heart rate variability from PPG with that from ECG. In Proceedings of the International Conference on Health Informatics: ICHI 2013, Vilamoura, Portugal, 7–9 November 2013; Springer: Berlin/Heidelberg, Germany, 2014. [Google Scholar]
  23. Polanía, L.F.; Mestha, L.K.; Huang, D.T.; Couderc, J.-P. (Eds.) Method for classifying cardiac arrhythmias using photoplethysmography. 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; IEEE: Piscataway, NJ, USA, 2015. [Google Scholar]
  24. Banerjee, R.; Sinha, A.; Choudhury, A.D.; Visvanathan, A. (Eds.) PhotoECG: Photoplethysmographyto estimate ECG parameters. In Proceedings of the 2014 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Florence, Italy, 4–9 May 2014; IEEE: Piscataway, NJ, USA, 2014. [Google Scholar]
  25. Gidea, M.; Gidea, C.; Byrd, W. Deterministic models for simulating electrocardiographic signals. Commun. Nonlinear Sci. Numer. Simul. 2011, 16, 3871–3880. [Google Scholar] [CrossRef]
  26. McSharry, P.E.; Clifford, G.D.; Tarassenko, L.; Smith, L.A. A dynamical model for generating synthetic electrocardiogram signals. IEEE Trans. Biomed. Eng. 2003, 50, 289–294. [Google Scholar] [CrossRef] [Green Version]
  27. Sarkar, P.; Etemad, A. (Eds.) Cardiogan: Attentive generative adversarial network with dual discriminators for synthesis of ECG from PPG. In Proceedings of the AAAI Conference on Artificial Intelligence, Vancouver, BC, Canada, 2–9 February 2021. [Google Scholar]
  28. Tang, Q.; Chen, Z.; Guo, Y.; Liang, Y.; Ward, R.; Menon, C.; Elgendi, M. Robust Reconstruction of Electrocardiogram Using Photoplethysmography: A Subject-Based Model. Front. Physiol. 2022, 645. [Google Scholar] [CrossRef]
  29. Zhu, Q.; Tian, X.; Wong, C.-W.; Wu, M. Learning your heart actions from pulse: ECG waveform reconstruction from PPG. IEEE Internet Things J. 2021, 8, 16734–16748. [Google Scholar] [CrossRef]
  30. Omer, O.A.; Salah, M.; Hassan, A.M.; Mubarak, A.S. Beat-by-Beat ECG Monitoring from Photoplythmography Based on Scattering Wavelet Transform. Traitement Signal 2022, 39, 1483–1488. [Google Scholar] [CrossRef]
  31. Tian, X.; Zhu, Q.; Li, Y.; Wu, M. (Eds.) Cross-domain joint dictionary learning for ECG reconstruction from PPG. In Proceedings of the ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Barcelona, Spain, 4–8 May 2020; IEEE: Piscataway, NJ, USA, 2020. [Google Scholar]
  32. Zhu, J.-Y.; Park, T.; Isola, P.; Efros, A.A. (Eds.) Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 27–29 October 2017. [Google Scholar]
  33. Pimentel, M.A.; Johnson, A.E.; Charlton, P.; Birrenkott, D.; Watkinson, P.J.; Tarassenko, L.; Clifton, D.A. Toward a robust estimation of respiratory rate from pulse oximeters. IEEE Trans. Biomed. Eng. 2016, 64, 1914–1923. [Google Scholar] [CrossRef]
  34. Li, Y.; Tian, X.; Zhu, Q.; Wu, M. Inferring ECG from PPG for Continuous Cardiac Monitoring Using Lightweight Neural Network. arXiv 2023, arXiv:201204949. [Google Scholar]
  35. Saeed, M.; Lieu, C.; Raber, G.; Mark, R.G. (Eds.) MIMIC II: A massive temporal ICU patient database to support research in intelligent patient monitoring. In Computers in Cardiology; IEEE: Piscataway, NJ, USA, 2002. [Google Scholar]
  36. Kachuee, M.; Kiani, M.M.; Mohammadzade, H.; Shabany, M. (Eds.) Cuff-less high-accuracy calibration-free blood pressure estimation using pulse transit time. In Proceedings of the 2015 IEEE international symposium on circuits and systems (ISCAS), Lisbon, Portugal, 24–27 May 2015; IEEE: Piscataway, NJ, USA, 2015. [Google Scholar]
  37. Moody, G.; Mark, R. A database to support development and evaluation of intelligent intensive care monitoring. In Computers in Cardiology; IEEE: Indianapolis, IN, USA, 1996; pp. 657–660. [Google Scholar]
  38. The MathWorks I. Timeseries Ideal Filter—MATLAB Idealfilter—MathWorks. Help Center. Available online: https://www.mathworks.com/help/matlab/ref/timeseries.idealfilter.html, (accessed on 1 March 2023).
  39. Salah, M.; Omer, O.A.; Hassan, L.; Ragab, M.; Hassan, A.M.; Abdelreheem, A. Beat-Based PPG-ABP Cleaning Technique for Blood Pressure Estimation. IEEE Access 2022, 10, 55616–55626. [Google Scholar] [CrossRef]
  40. Tusman, G.; Acosta, C.M.; Pulletz, S.; Böhm, S.H.; Scandurra, A.; Arca, J.M.; Madorno, M.; Sipmann, F.S. Photoplethysmographic characterization of vascular tone mediated changes in arterial pressure: An observational study. J. Clin. Monit. Comput. 2019, 33, 815–824. [Google Scholar] [CrossRef]
  41. Pan, J.; Tompkins, W.J. A Real-Time QRS Detection Algorithm. IEEE Trans. Biomed. Eng. 1985, BME-32, 230–236. [Google Scholar] [CrossRef]
  42. Elgendi, M.; Norton, I.; Brearley, M.; Abbott, D.; Schuurmans, D. Systolic peak detection in acceleration photoplethysmograms measured from emergency responders in tropical conditions. PLoS ONE 2013, 8, e76585. [Google Scholar] [CrossRef] [Green Version]
  43. Campello, R.J.; Moulavi, D.; Sander, J. (Eds.) Density-based clustering based on hierarchical density estimates. In Proceedings of the Pacific-Asia Conference on Knowledge Discovery and Data Mining, Gold Coast, Australia, 14–17 April 2013; Springer: Berlin/Heidelberg, Germany, 2013. [Google Scholar]
  44. Ester, M.; Kriegel, H.-P.; Sander, J.; Xu, X. (Eds.) A Density-Based Algorithm for Discovering Clusters in Large Spatial Databases with Noise. Kdd; AAAI Press: Portland, OR, USA, 1996; Volume 226, p. 231. [Google Scholar]
  45. Degirmenci, M.; Ozdemir, M.A.; Izci, E.; Akan, A. Arrhythmic heartbeat classification using 2d convolutional neural networks. Irbm 2022, 43, 422–433. [Google Scholar] [CrossRef]
  46. Wang, Q.; Feng, C.; Xu, Y.; Zhong, H.; Sheng, V.S. A novel privacy-preserving speech recognition framework using bidirectional LSTM. J. Cloud Comput. 2020, 9, 36. [Google Scholar] [CrossRef]
  47. Nonaka, N.; Seita, J. Data augmentation for electrocardiogram classification with deep neural network. arXiv 2020, arXiv:200904398. [Google Scholar]
  48. Liu, L.; Tang, W.; Chen, G.; Lu, Y. Correlation and agreement: Overview and clarification of competing concepts and measures. Shanghai Arch. Psychiatry 2016, 28, 115. [Google Scholar] [PubMed]
Figure 1. PPG and ECG correlation.
Figure 1. PPG and ECG correlation.
Information 14 00377 g001
Figure 2. Proposed system.
Figure 2. Proposed system.
Information 14 00377 g002
Figure 3. Example of band-pass filtering for the (a) PPG signal and (b) ECG signal.
Figure 3. Example of band-pass filtering for the (a) PPG signal and (b) ECG signal.
Information 14 00377 g003
Figure 4. Example of peak detection for the (a) PPG signal and (b) ECG signal.
Figure 4. Example of peak detection for the (a) PPG signal and (b) ECG signal.
Information 14 00377 g004
Figure 5. Example of corresponding PPG/ECG signals (a) before peak alignment and (b) after peak alignment.
Figure 5. Example of corresponding PPG/ECG signals (a) before peak alignment and (b) after peak alignment.
Information 14 00377 g005
Figure 6. Example of noisy clustered signals of (a) ECG bad beats and (b) PPG bad beats.
Figure 6. Example of noisy clustered signals of (a) ECG bad beats and (b) PPG bad beats.
Information 14 00377 g006
Figure 7. Model block diagram.
Figure 7. Model block diagram.
Information 14 00377 g007
Figure 8. Model training and evaluation on the MIMIC II extracted dataset: (a) histogram of the MSE of test data; (b) scatter plot between r and MSE.
Figure 8. Model training and evaluation on the MIMIC II extracted dataset: (a) histogram of the MSE of test data; (b) scatter plot between r and MSE.
Information 14 00377 g008
Figure 9. Examples of model output in testing the MIMIC II extracted dataset.: (a) Example 1, (b) Example 2.
Figure 9. Examples of model output in testing the MIMIC II extracted dataset.: (a) Example 1, (b) Example 2.
Information 14 00377 g009
Figure 10. Signals after beat concatenation: (a) PPG input of our dataset example; (b) ECG (lead II) actual and predicted by the model output of our dataset example.
Figure 10. Signals after beat concatenation: (a) PPG input of our dataset example; (b) ECG (lead II) actual and predicted by the model output of our dataset example.
Information 14 00377 g010aInformation 14 00377 g010b
Figure 11. Model output on the BIDMC test dataset: (a) input; (b) model output and reference ECG.
Figure 11. Model output on the BIDMC test dataset: (a) input; (b) model output and reference ECG.
Information 14 00377 g011
Figure 12. (a) Bar plot of the correlation coefficient of each subject and (b) bar plot of the rRMSE of each subject.
Figure 12. (a) Bar plot of the correlation coefficient of each subject and (b) bar plot of the rRMSE of each subject.
Information 14 00377 g012
Figure 13. Example of data augmentation.
Figure 13. Example of data augmentation.
Information 14 00377 g013
Figure 14. Example of model output in the case of a completely subject-independent scheme on the MIMIC dataset.
Figure 14. Example of model output in the case of a completely subject-independent scheme on the MIMIC dataset.
Information 14 00377 g014
Figure 15. Effect of inaccurate peak detection: (a) model output in case of inaccurate peak detection and (b) model output in case of accurate peak detection.
Figure 15. Effect of inaccurate peak detection: (a) model output in case of inaccurate peak detection and (b) model output in case of accurate peak detection.
Information 14 00377 g015
Table 1. Classes of subject dependency.
Table 1. Classes of subject dependency.
Subject DependencyNumber of Subjects per ModelRelation between Test and Train DatasetExamples
Subject-DependentSingle subjectSignals/beats from the same subject are divided into training and testing datasets[28,29]
Partial Subject-IndependentMultiple subjects80% of beats from each subject for training and 20% for testing[27,30,31]
Completely Subject-IndependentMultiple subjectsTraining and testing datasets come from different subjects who have the same diseases, gender, and age rangeOur Proposed
Table 2. Datasets used in training and testing schemes.
Table 2. Datasets used in training and testing schemes.
DatasetTraining/Testing SchemeNumber of Subjects Train/TestNumber of Beats Training/TestDuration of Training/Test Dataset in Hours
Extracted from MIMIC II [35]Partially subject-independent12,000/12,000622,776/77,848About 177.72/14.7
BIDMC [33]Partially subject-independent53/5317,650/4413About 3.28/0.82
MIMIC database [37]Completely subject-independent1/15000/5876About 1/1
Table 3. Model results on our dataset (extracted from MIMIC II).
Table 3. Model results on our dataset (extracted from MIMIC II).
Criteriaµσ
MSE0.00860.0125
r0.9230.092
rRMSE0.350.083
Table 4. Comparison among some of the beat-based models on the BIDMC dataset and complexity of models.
Table 4. Comparison among some of the beat-based models on the BIDMC dataset and complexity of models.
AlgorithmrrRMSEFLOPs(M)
µ ± σµ ± σ-
DCT [29]0.70 ± 0.350.66 ± 0.230.36
XDJDL [31]0.82 ± 0.270.48 ± 0.3660.21
Lightweight neural network [34] full version 0.90 ± 0.160.35 ± 0.2628.32
Lightweight neural network [34] compressed version0.89 ± 0.160.39 ± 0.2518.63
Proposed model0.91 ± 0.100.31 ± 0.072.95
Table 5. Results of the completely subject-independent scheme.
Table 5. Results of the completely subject-independent scheme.
Without data augmentationrRMSE0.582 ± 0.703
R0.846 ± 0.0396
With oriented data augmentationrRMSE0.379 ± 0.361
R0.908 ± 0.0305
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

Abdelgaber, K.M.; Salah, M.; Omer, O.A.; Farghal, A.E.A.; Mubarak, A.S. Subject-Independent per Beat PPG to Single-Lead ECG Mapping. Information 2023, 14, 377. https://doi.org/10.3390/info14070377

AMA Style

Abdelgaber KM, Salah M, Omer OA, Farghal AEA, Mubarak AS. Subject-Independent per Beat PPG to Single-Lead ECG Mapping. Information. 2023; 14(7):377. https://doi.org/10.3390/info14070377

Chicago/Turabian Style

Abdelgaber, Khaled M., Mostafa Salah, Osama A. Omer, Ahmed E. A. Farghal, and Ahmed S. Mubarak. 2023. "Subject-Independent per Beat PPG to Single-Lead ECG Mapping" Information 14, no. 7: 377. https://doi.org/10.3390/info14070377

APA Style

Abdelgaber, K. M., Salah, M., Omer, O. A., Farghal, A. E. A., & Mubarak, A. S. (2023). Subject-Independent per Beat PPG to Single-Lead ECG Mapping. Information, 14(7), 377. https://doi.org/10.3390/info14070377

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