Skip to main content

TECHNOLOGY AND CODE article

Front. Physiol., 25 April 2022
Sec. Computational Physiology and Medicine

Robust Reconstruction of Electrocardiogram Using Photoplethysmography: A Subject-Based Model

  • 1School of Electronic Engineering and Automation, Guilin University of Electronic Technology, Guilin, China
  • 2Department of Electrical and Computer Engineering, University of British Columbia, Vancouver, BC, Canada
  • 3Biomedical and Mobile Health Technology Laboratory, Department of Health Sciences and Technology, Zurich, Switzerland

Electrocardiography and photoplethysmography are non-invasive techniques that measure signals from the cardiovascular system. While the cycles of the two measurements are highly correlated, the correlation between the waveforms has rarely been studied. Measuring the photoplethysmogram (PPG) is much easier and more convenient than the electrocardiogram (ECG). Recent research has shown that PPG can be used to reconstruct the ECG, indicating that practitioners can gain a deep understanding of the patients’ cardiovascular health using two physiological signals (PPG and ECG) while measuring only PPG. This study proposes a subject-based deep learning model that reconstructs an ECG using a PPG and is based on the bidirectional long short-term memory model. Because the ECG waveform may vary from subject to subject, this model is subject-specific. The model was tested using 100 records from the MIMIC III database. Of these records, 50 had a circulatory disease. The results show that a long ECG signal could be effectively reconstructed from PPG, which is, to our knowledge, the first attempt in this field. A length of 228 s of ECG was constructed by the model, which was trained and validated using 60 s of PPG and ECG signals. To segment the data, a different approach that segments the data into short time segments of equal length (and that do not rely on beats and beat detection) was investigated. Segmenting the PPG and ECG time series data into equal segments of 1-min width gave the optimal results. This resulted in a high Pearson’s correlation coefficient between the reconstructed 228 s of ECG and referenced ECG of 0.818, while the root mean square error was only 0.083 mV, and the dynamic time warping distance was 2.12 mV per second on average.

Introduction

Cardiovascular disease is a major cause of health loss that could be preventable (Thomas, 2018). Long-term monitoring of cardiovascular status is of great significance in preventing and treating cardiovascular diseases. Electrocardiography is widely used in cardiovascular diagnoses and cardiovascular status monitoring in clinical practice worldwide. The morphological features of an electrocardiogram (ECG) (e.g., P, Q, R, S, T and the intervals between them) can usually enable the diagnosis of abnormalities of the heart (Rai et al., 2013; Joshi et al., 2014). However, most conventional ECG devices limit subjects’ movements, to prevent ECG electrodes from detaching. To address the shortcomings of traditional devices for long term ECG monitoring, wearable ECG devices have been designed in recent years (Steinberg, 2019; Marsili, 2020). Meanwhile, another technology that can detect cardiovascular status without the need for electrodes, called photoplethysmography, has flourished in the last decade (Elgendi, 2020). Photoplethysmograms (PPGs, which is the recommended acronym based on this study (Elgendi, 2012a)) are more comfortable and less expensive to obtain than ECG signals, and PPG is expected to be an alternative in cardiovascular status monitoring (Elgendi, 2012b). In fact, recent research has shown that the ECG features are not consistently correlated with blood pressure (Bird, 2020), while PPG features are consistently correlated with blood pressure (Elgendi, 2019; Hosanee, 2020).

ECG reflects the circulatory electrical activity of the heart. Each heartbeat is triggered by electrical impulses, typically generated by the sinoatrial node and transmitted throughout the heart. At specific points during the heart’s electrical beat, the ECG records the sum of the many weak fields generated by the electrical activity of many heart cells. The electrical activity of the heart causes systole and diastole through excitation-contraction coupling (Bers, 2002). The heart contracts and relaxes periodically, thus serving as an engine that pumps blood through the body. For systemic circulation, blood is pumped from the left ventricle to the main artery and through the arterial branches to the capillaries of the organs. The blood then passes through the capillary walls, exchanging substances and gases with tissue cells, facilitated by tissue fluid. After the exchange, arterial blood becomes venous blood and flows back to the right atrium through various veins. PPG uses optical technology to record changes in blood volume at body peripherals (e.g. fingertips, ears, and wrists) (Elgendi, 2012b; Hosanee, 2020). This change is a result of the systemic circulation. As shown in Figure 1, in ECG, the beginning of systole is marked by the QRS complex, while the beginning of diastole is marked by the end of the T wave. For PPG, the beginning of systole is marked by onset, the first wave (systolic wave) reflecting the systole, and the second wave (diastolic wave) representing the diastole. Since it takes time for blood to travel from the heart to the end of the body, the onset of the PPG is delayed relative to the R peak of the ECG. This delay is called the pulse arrival time (Liang, 2019). Pulse arrival times have been removed in Figure 1 to align systole in ECG with that in PPG. The morphology of PPG is affected by many factors, such as the mechanical movement of the heart, and the compliance state of blood vessels during blood transmission. Therefore, PPG contains a wealth of information regarding the cardiovascular system. Recently, PPG has been used to evaluate cardiovascular parameters such as heart rate, oxygen saturation (Shelley, 2007), blood pressure (Liu, 2019), and cardiac output (Wang et al., 2009).

FIGURE 1
www.frontiersin.org

FIGURE 1. Systole and diastole in ECG and PPG. The “O″” stands for the onset in PPG.

Some studies have explored the relationship between ECGs and PPGs. Heart rate variability measured by PPG is highly correlated with that measured by an ECG (Weinschenk et al., 2016). In other words, the periodicity of PPGs is highly correlated with that of ECGs. Moreover, they are particularly correlated when arrhythmia occurs (Polanía et al., 2015; Paradkar and Chowdhury, 2017). In terms of the characteristics of a heartbeat, some important parameters of an ECG are also related to a PPG (Banerjee et al., 2014). The PR, QRS, QT and RR intervals can be estimated from features in the PPG. If a PPG can be used to synthesize an ECG, we can use both the rich clinical knowledge of signals detected in an ECG and the accessibility of PPG signals to better evaluate cardiovascular status.

The notion of generating ECG signals has been discussed and investigated in the literature, with great emphasis on understanding and modeling waveform morphologies (McSharry et al., 2003; Sayadi et al., 2010). Statistical modeling is generally used to generate a beat by beat synthetic ECG signal (usually RR intervals). The ECG beats are then stitched together consecutively based on beat information. Some researchers have employed three-lead ECG to reconstruct 12-lead ECG (Maheshwari et al., 2014) and compressive sensing ECG reconstruction (Craven et al., 2017). Typically, the construction of ECG does not depend on another physiological signal collected at the same time.

To our knowledge, there are two papers that have reconstructed an ECG from a PPG recorded simultaneously (Tian et al., 2020; Zhu et al., 2021). One of them is a beat-based model (Zhu et al., 2021). The study developed a linear transformation model to reconstruct ECG signals. Discrete cosine transform (DCT) coefficients for each PPG beat were mapped to coefficients for the corresponding ECG beat according to their proposed cardiovascular signaling model. The other work developed a cross-domain joint dictionary learning (XDJDL) model to establish a mapping relationship between PPG and ECG beats (Tian et al., 2020). However, the accuracy of these two methods depends on the accuracy of extraction algorithms for R waves in an ECG and systolic peak (or onset) in a PPG, which makes the algorithm more complex and introduces greater opportunities for error, thus decreasing the ECG reconstruction’s accuracy. Moreover, these two studies were conducted when the training set and the test set accounted for 80% and 20% of the data set, respectively. Their long-term performance on data longer than the training set has not been verified.

This paper proposes a deep neural network model that constructs long ECG signal from PPG. Unlike prior works, it has the advantage of not requiring R-peak detection or a beat-based ECG segmentation step prior to the analysis. It aims to mitigate the errors introduced by period division and to evaluate the performance of the model in generating long ECG signal.

Methodology

Dataset

The data we used to test the model was extracted from the MIMIC III matched subset (Johnson, 2016). The MIMIC III database contains several physiological signals from intensive care unit patients. And there are a large number of records in this subset. We used 100 records (50 subjects with circulatory diseases and 50 subjects without) of different subjects with lead II ECG and PPG signals. Every record was 5 min in length. Note that both ECG and PPG were recorded simultaneously. The reason behind the choice of 100 records is to stay consistent with the number of recordings used in the literature (Zhu et al., 2021). This will allow us to have a fair evaluation of all algorithms used.

Proposed Method

The overall structure of the proposed method is shown in Figure 2.

FIGURE 2
www.frontiersin.org

FIGURE 2. Flowchart of constructing an electrocardiogram (ECG) signal from a photoplethysmogram (PPG) signal. The bidirectional long short-term memory (BiLSTM) model is trained and validated for 1 minute to generate 3.8 min ECG signal.

Preprocessing

Filter: Both ECG and PPG signals are filtered by a fourth-order Chebyshev II filter. The frequency range of the filter used in the ECG was 0.5–20 Hz. The frequency range in the PPG was 0.5–10 Hz.

Alignment I: The R peak and systolic peak are the main features in ECGs and PPGs, respectively. For each R peak in an ECG, the corresponding systolic peak in the PPG is the one between the current and next R peaks in the ECG. The Pan-Tompkin method was used to detect the R peaks in ECG, and a block method was used to detect the systolic peaks in the PPG (Pan and Tompkins, 1985; Elgendi et al., 2013). Subsequently, the third systolic peak in the PPG was aligned to the corresponding R peak in the ECG. Note that the third beat was used to ensure that the alignment process was effectively achieved. Sometimes the first PPG beat is not completely clear, and the beat detector cannot detect it, and the second PPG beat could have a correspondence ECG beat that is appearing close to it. This step generated a pair of aligned ECGs and PPGs. Note that the alignment process here means the systolic peak of the PPG beat is exactly aligned with the R peal of the ECG beat.

Normalization: After alignment I, the PPG signals are scaled to [0,1]. Note that the aligned ECG was not normalized so that we can compare the predicted ECG with the reference ECG.

Dataset splitting: To evaluate the long-term performance of the proposed model, the first 60 s of the aligned signal are used to train and validate, while others are used to test. Note that the alignment I step causes the length of the aligned signals to be less than 300 s and the length of each record to be inconsistent. To keep the training data length consistent, we utilized the first 48 s of each record as the training set, the next 12 s as the validation set, and the next 228 s as the test set. Note that there are 12 s ignored to achieve the next step, which discusses the segmentation length, and 12 is found to be the least common that allows the remaining length dividable by 1, 2, 3, and 4.

Segmentation: To make the model faster, a common approach is to segment long signals into segments and process the segments. In this research, the ECG signal was divided according into time segments. The signals in the training, validation, and test sets were divided into segments of the same length, n seconds. To find the optimal segment length, n = 1, 2, 3, 4 was used to test the model.

Model Choice

Using the deep neural network is a promising way to achieve our goal, especially recurrent neural networks that can use their internal memory to process a sequential input. We chose bidirectional long short-term memory (BiLSTM) model because it has been successful in solving sequential and time-series problems, such as handwritten recognition (Sakib et al., 2020; Wang et al., 2020). In addition, a study using generative adversarial networks to synthesize ECG showed that the BiLSTM is a robust model for generating ECG signals (Zhu et al., 2019). Note, no other physiological signals were used, only ECG and PPG signals. Between the PPG and ECG, there may be unknown time delays in important events; long short-term memory (LSTM) and BiLSTM are suitable for processing time series in this case. As an extension of the LSTM, the BiLSTM models takes much longer to reach equilibrium than regular LSTM models, but provides better predictions (Siami-Namini et al., 2019).

The model was built based on the TensorFlow package (Version 2.5.0) in Python (version 3.9). The layers of this model included the input layer, BiLSTM layer, fully connected layer. There are further explanations regarding these below.

BiLSTM: BiLSTMs are an extension of traditional LSTMs. BiLSTM connects two LSTM layers of opposite directions to the same output, implying that BiLSTMs train two LSTMs instead of one, on the input sequence, in problems where all time steps are available. With this form of deep generative learning, the output layer can simultaneously get information from past (backward) and future (forward) states (Zhu et al., 2019). In this study, the number of hidden unites in the BiLSTM layer was 25, and the output of the BiLSTM layer is a sequence.

Dense layer: The dense layer is a fully connected layer. In neural networks, a fully connected layer means that all inputs in one layer are connected to each activation unit in the next layer. In machine-learning models, the last layer is usually a fully connected layer to facilitate compiling the data extracted from the previous layer into the final output. The input of the dense layer is the sequence output by the BiLSTM layer, while the output of Dense layer is 1.

Regularization was implemented to solve or prevent the ill-posed problem from overfitting (Bühlmann and van de Geer, 2011). In this research, both Lasso Regression (L1) and Tikhonov regularization (L2) were used in the BiLSTM layer. The kernel regularizer parameter in the BiLSTM layer is L1 = 0.0001, L2 = 0.0001.

The entire model was trained as an option in batch size = 1 and max epochs = 1000. The learning rate is 0.001.

Stitching the Reconstruction ECG Segments

The output signal length of the model was n seconds. To evaluate the long-term performance of the model, we stitched the reconstructed ECG segments together. The reconstructed ECG segments were stitched one by one according to the order of the PPG segments in the test set. Note that the stitching here is carried out by placing segments adjacent to each other.

Alignment II

The result of stitching is already the reconstructed ECG signal, and this alignment II is mainly to better evaluate the similarity of the reconstructed ECG signal with the reference signal. Note that the alignment II step is based on the cross-correlation.

Performance Evaluation

Three measures are used to evaluate the performance of the filtered ECG and the reconstructed ECG in the proposed model.

Pearsons correlation coefficient (r): This is used to measure the linear correlation between two variables (Liu, 2016). The value of r is in the range of [ − 1, 1], where ±1 indicates the strongest possible agreement and 0 indicates the strongest possible disagreement. The formula of r is as follows:

r=i=1lECGrefiECGref̄i=1lECGreciECGrec̄i=1lECGrefiECGref̄2i=1lECGreciECGrec̄2(1)

In this formula, ECGref(i) and ECGrec(i) are the individual sample points of the reference ECG and reconstruction ECG indexed with i, respectively. The variable l is the sample size of the reference ECG. The variables ECGref̄ and ECGrec̄ are the mean of sample value of reference ECG and reconstruction ECG, respectively.

Root mean square error (rmse): In machine learning, rmse is commonly used to measure the difference between the model’s estimated value and the observed value. The formula of rmse is as follows:

rmse=1li=1lECGrefiECGreci2(2)

Dynamic time warping (DTW) distance: DTW can be used to measure the similarity between two time series, which may vary in speed. (Efrat et al., 2007) This method calculates an optimal match between any two given time series. In this paper, the steps to calculate DTW are as follows:

• Suppose the length of the reference ECG is m. Create an m×m matrix. An element dij in this matrix is the Euclidean distance between the ith sample of reference ECG and the jth sample of reconstruction ECG. The formular for calculating dij is as follows:

dij=ij2+ECGrefiECGrecj2(3)

• Looking for the optimal path to minimize the sum of d11 to dmm along this path. This path is defined as the warping path, and the sum is the DTW distance.

Similar to rmse, the value range of DTW distance is zero to infinity, and the smaller the value, the more similar the two time series are (Efrat et al., 2007).

Results

We tested the model’s accuracy when the data was divided into one, two, three, and four seconds. Figure 3 shows two examples of the experimental results from patients with and without circulatory disease. This figure shows that the ECG reconstructed using different time length models can match the reference ECG. For Figure 3IV, the correlation was only 0.79; however, the morphology of the reconstruction ECG looks highly similar to the reference ECG.

FIGURE 3
www.frontiersin.org

FIGURE 3. Extracts of experimental results in patients with and without circulatory disease. The red and black curves are the reconstruction ECG and reference ECG, respectively. The abbreviations r, rmse, and d are the Pearson’s correlation coefficient, root mean square error, and dynamic time warping distance, respectively. (I), (II), (III), and (IV) are the results of a subject with a circulatory disease in segments of one, two, three, and 4 seconds, respectively. (V), (VI), (VII), and (VIII) are the results of a subject without any circulatory disease in segments of one, two, three, and 4 seconds, respectively. The PPG is the corresponding segment used to generate the ECG signals.

After checking the fitting results of different records, there was a time delay between the reconstruction ECG and the reference ECG for some records. This delay lowered the r value; to better evaluate the model’s performance, we used cross-correlation to align the reconstruction ECG with the reference ECG.

Cross-correlation can be used to measure the displacement of one time series relative to another of two similar time series. After calculating the cross-correlation between the two time series, the maximum of the cross-correlation function indicated the point at which the signals were best aligned. In this research, we applied cross-correlation with a window of 80 milliseconds. Figure 4 shows a comparison of the results with and without alignment by cross-correlation. It is a segmented result from the 3-s segment-based model. Figure 4I shows the results that are not aligned based on cross-correlation, r was 0.713, and rmse was 0.120 mV. However, with alignment, as shown in Figure 4II, r increased to 0.976 and rmse reduced to 0.035 mV. In this case, it was necessary to align the reconstructed ECG with the reference ECG.

FIGURE 4
www.frontiersin.org

FIGURE 4. Comparison of reconstruction ECG and reference ECG with and without alignment. The abbreviations ra, rmsea, and da are calculated after aligning the reconstruction ECG and reference ECG, respectively.

To better evaluate the similarity between the two signals, we introduced another similarity measure: DTW distance (d). In Figure 4, the DTW distance for the signal with alignment is not very different from that without alignment. The DTW distances of the results were 5.178 mV and 5.150 mV with alignment and without, respectively. This shows that the DTW distance may be a better measure than r when testing the similarity in time series with time delay.

The warping path of the DTW can be used as another way to express the similarity of two time series. Figure 5I shows an example of the optimal warping path between the reconstruction ECG and the reference ECG in a 1-s segment-based model. The distance between the reconstruction ECG and the reference ECG was 1.927 mV. The optimal warping path indicated that after a small amount of warping, the reconstructed ECG matched the reference ECG. Figure 5II shows the optimal warping path between the long-term reconstruction ECG and the reference ECG. The long-term reconstruction ECG comes from the result of the 1-s segment-based model after stitching the reconstructed 1-s ECG segments. The distance between the reconstructed and the reference ECG signals is 533.218 mV. Since the DTW distance increases along with the signal length, we divided this distance by the signal time length of 228 s to facilitate a better comparison of the reconstruction results. The average distance was 2.380 mV per second, indicating that, on average, the distance between the two signals per second was minuscule. The warping path of the 228-s reconstruction ECG and the reference ECG appears as a straight line. The magnified portion of the figure shows the warping path of two signals in one second. This means that after a small time shift, the reconstructed ECG can be matched to the reference ECG; that is, there is a high degree of similarity between the two signals.

FIGURE 5
www.frontiersin.org

FIGURE 5. The optimal warping path of the reconstruction and reference ECGs using DTW. (I) shows an example of a 1-s segment. (II) shows the result of the whole 228-s test set for one subject. d is the DTW distance of the 228-s reconstruction and reference ECGs. And d̄ is d divided by the signal time length of 228 s.

Table 1 shows the statistical results of the three measures for different signal length models on the 100 records. By comparing the results of the training, validation, and test sets in all the models, the results with alignment decrease more slowly than the results without alignment. In the result of the stitched ECG, the change in DTW distance (ds) was mainly due to the inconsistent time length of each data set. In the average DTW distance (ds̄), the downward trend of similarity was consistent with r. After comparing the results of the test set of the various time length models, the highest correlation of a single segment was the 1-s segment-based model, and the highest after stitching was the 4-s segment-based model. The stitching step causes the correlation to decrease, which is mainly caused by the inconsistent time delay between the reconstructed ECG and the reference ECG in each segment. By comparing the results of the validation set and test set, we found that the performance of the model degrades on the long training set, but the correlation is still above 0.8.

TABLE 1
www.frontiersin.org

TABLE 1. The results of the test in different lengths. The abbreviations r, rmse, and d refer to the Pearson’s correlation coefficient (r), root mean square error rmse, and dynamic time warping distance between the reconstruction ECG and reference ECG, respectively. The rs, rmses and ds represent the values between the reconstruction ECG and reference ECG after stitching all the segments together. The abbreviations ra, rmsea, rsa, and rmsesa is calculated after aligning the reconstruction ECG and reference ECG in the cross-correlation. Finally, d̄ and ds̄ represent d and ds divided by the signal time length, respectively.

Discussion and Limitations

We propose a model based on BiLSTM to reconstruct ECG from PPG. Table 2 shows the comparison between this method and other studies on subject-specific models. The most significant advantage of this model is that it does not rely on period information of the PPG and ECG. There is a difference between the R peak of the ECG and the systolic peak of the PPG, which is called the pulse arrival time, and the existence of the pulse arrival time makes the PPG have a lag relative to the ECG (Liang, 2019). Therefore, the Alignment I step removed pulse arrival times to align the PPG systolic peak with the ECG R peak. After Alignment I, the systolic and diastolic periods are ignored. This Alignment ensures that there is no delay between the peaks. In clinical settings, due to the various factors, such as noise, disease, and other issues, it is difficult and sometimes impossible to extract the periodic information of some PPG and ECG signals. Although some studies have shown that the heart rate variability of photoplethysmography is correlated to that of electrocardiography (Polanía et al., 2015; Weinschenk et al., 2016; Paradkar and Chowdhury, 2017), the RR interval of ECG is not completely consistent with the peak-to-peak interval of PPG, and there is an offset (Luo et al., 2012). The time delay between the reconstruction ECG and the reference ECG may arise from the PPG period information noise and the inconsistency between the ECG and PPG periods. The model proposed herein can solve this problem effectively. As the results show, in the stitched ECG, the performance of the model increases with the segment length. This means that as the segment length increases, the proposed model can work with a small difference between the RR interval and the peak-to-peak interval. Compared to the performance of the model in some of the test sets, we paid greater attention to whether the trained model can be used for long-term construction, i.e., construction of long signals. This is because the long-term performance of the model is important if the technology is to be used in wearable devices. To better evaluate the long-term performance of the model, we did not use the traditional 80% training set and 20% test set. Instead, 80% (48s) of the first minute is used for training, and 20% (12 s) is used for validation. After the model was trained, we used the next 228 s as the test set. Note that the ratio of the duration of the test set to the training set is 4.75. For short-term performance, the proposed model achieves 0.904 in the 4-s segment-based model (the validation result), which is the same as the beat-based model in the self-collected dataset. The proposed model is only trained on 0.8 min data, while the other two models use more data. Although the performance of the proposed model degrades in the long-term data operation, the correlation still reaches 0.818. These results show that the model we used above can be employed in long-term construction after training.

TABLE 2
www.frontiersin.org

TABLE 2. Comparison of this paper and other papers in the subject-specific model. The ‘NR’ stands for not reported.

To evaluate the similarity in the presence of the time delay, we utilized the metric DTW distance. Usually, the warping path of the DTW is used as a measure. The distance is the sum of the cost of DTW along the optimal warping path. However, the DTW distance increases as the signal length increases. Within one second, the average distance for 100 records between the reconstruction ECG of the proposed model and the reference ECG is only 2.120 mV in the 4-s model. The reason behind us using DTW is that the beat intervals of PPG and ECG are not precisely the same. In this paper, Pearson’s correlation coefficient and rmse are used to evaluate the linear correlation and the mathematical difference between the reconstructed result and reference ECG, respectively. At the same time, DTW provides another mathematical perspective for evaluating temporal differences, and comparing the difference between the reconstructed result and the reference. By using these three evaluation metrics, we can better evaluate the reconstruction results.

The beat-based model proposed a group model that can work for different subjects. They put those with circulatory system diseases into one group and those without circulatory system diseases into another group. In this study, we did not train based on subject grouping. Electrocardiography and photoplethysmography reflect the electrophysiological and mechanical activities of the heart, respectively. The excitation-contraction coupling suggests that the electrical signals of the heart trigger the heart to have periodic contractions. If, from a signal-processing perspective, the heart and blood transmission system are like a black box, the ECG signal is the input of the black box, and the PPG signal is the output. For each individual, there may be differences in their transfer functions due to various factors, especially in the presence of circulatory diseases. Therefore, in this study, we only considered subject-specific models.

The limitation of this paper is that the frequency range of the reconstructed ECG is below 20 Hz. However, the frequency range of abnormal ventricular conduction is above 70 Hz (Tereshchenko and Josephson, 2015). This means that the model cannot reconstruct the abnormal ventricular conduction in an ECG, a primary reason being that the commonly used frequency range in PPG is 0.5–20 Hz. This paper focuses on the commonly used frequency range in PPG. In future work, we will test the performance of this model in the different frequency ranges. It is worth noting that the purpose of this study is to develop a subject-specific model. The next step would be to examine its performance for the intra-subject case against the inter-subject performance case.

For subjects with different circulatory system diseases, the shape of their ECGs may deviate from that of the normal ECG in various ways. Therefore, using the same model to reconstruct ECGs from PPGs for multiple subjects is a challenge. Thus, to use this model effectively, abnormalities in an ECG need to be extracted from the PPG. At present, studies have shown that some arrhythmia can be detected by a PPG (Polanía et al., 2015; Paradkar and Chowdhury, 2017), but these still depend only on the correlation between the ECG and the PPG on the beat. Other deep learning algorithms with different parameter choices need to be investigated in future work. It is also desirable to carry further evaluations of the differences between the reconstructed and reference ECG features, such as QRS complex and ST segment, in future studies.

Conclusion

This study proposed a subject-based model to reconstruct an ECG from photoplethysmography. The model was trained on short ECG and PPG signals (0.8 min), but it successfully reconstructed long (3.8 min) ECG signals. For each segment of the constructed ECG, the average correlation between the constructed and the reference ECG was 0.94 when the segments were 1-s long. For the entire test ECG, the average correlation of the 4-s segment-based model was 0.91. Compared to other models, this model divides the PPG into segments of seconds (instead of beats) to generate ECG segments and solve the inconsistency between ECG and PPG beats in some signals. The long-term reconstructed ECG is highly similar to the waveform of the reference ECG. This model is expected to be used in wearable devices as an effective alternative for a low-cost, long-term health or fitness monitoring application.

Data Availability Statement

Data and code used in this article can be downloaded from this link https://github.com/Elgendi/PPG2ECG.

Author Contributions

ME designed the study. QT, ZC, YG, YL, RW, CM, and ME conceived the study, provided directions, feedback, and/or revised the manuscript. ME led the investigation and drafted the manuscript for submission with revisions and feedback from the contributing authors. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the NSERC grant RGPIN-2014-04462 and Canada Research Chairs (CRC) program. This work was also supported by the study abroad program for graduate student of Guilin University of Electronic Technology (Grant No. GDYX2018015), National Natural Science Foundation of China (grant No. 81873913), National major research instrument development project of NSFC (Grant No. 61627807), Guangxi University Key Laboratory: Biosensing and Instruments, and 2020 Guilin COVID-19 Epidemic Prevention and Control Talents Highland. Open access funding provided by ETH Zürich.

Conflict of Interest

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Publisher’s Note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors, and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

References

Banerjee R., Sinha A., Choudhury A. D., Visvanathan A., Ieee (2014). “PhotoECG: Photoplethysmography to Estimate ECG Parameter,” in 2014 IEEE International Conference on Acoustics, Speech and Signal Processing International Conference on Acoustics Speech and Signal Processing (ICASSP), Florence, Italy.

Google Scholar

Bers D. M. (2002). Cardiac Excitation–Contraction Coupling. Nature 415, 198–205. doi:10.1038/415198a

PubMed Abstract | CrossRef Full Text | Google Scholar

Bird K. (2020). Assessment of Hypertension Using Clinical Electrocardiogram Features: A First-Ever Review. Front. Med. 7. doi:10.3389/fmed.2020.583331

CrossRef Full Text | Google Scholar

Bühlmann P., van de Geer S. (2011). Statistics for High-Dimensional Data: Methods, Theory and Applications. Springer Berlin Heidelberg.

Google Scholar

Craven D., McGinley B., Kilmartin L., Glavin M., Jones E. (2017). Adaptive Dictionary Reconstruction for Compressed Sensing of ECG Signals. IEEE J. Biomed. Health Inform. 21, 645–654. doi:10.1109/jbhi.2016.2531182

PubMed Abstract | CrossRef Full Text | Google Scholar

Efrat A., Fan Q., Venkatasubramanian S. (2007). Curve Matching, Time Warping, and Light fields: New Algorithms for Computing Similarity between Curves. J. Math. Imaging Vis. 27, 203–216. doi:10.1007/s10851-006-0647-0

CrossRef Full Text | Google Scholar

Elgendi M., Norton I., Brearley M., Abbott D., Schuurmans D. (2013). Systolic Peak Detection in Acceleration Photoplethysmograms Measured from Emergency Responders in Tropical Conditions. PLoS One 8, e76585. doi:10.1371/journal.pone.0076585

PubMed Abstract | CrossRef Full Text | Google Scholar

Elgendi M. (2012). On the Analysis of Fingertip Photoplethysmogram Signals. Curr. Cardiol. Rev. 8, 14–25. doi:10.2174/157340312801215782

PubMed Abstract | CrossRef Full Text | Google Scholar

Elgendi M. (2020). PPG Signal Analysis: An Introduction Using MATLAB®. CRC Press.

Google Scholar

Elgendi M. (2012). Standard Terminologies for Photoplethysmogram Signals. Curr. Cardiol. Rev. 8, 215–219. doi:10.2174/157340312803217184

PubMed Abstract | CrossRef Full Text | Google Scholar

Elgendi M. (2019). The Use of Photoplethysmography for Assessing Hypertension. npj Digital Med. 2, 60. doi:10.1038/s41746-019-0136-7

PubMed Abstract | CrossRef Full Text | Google Scholar

Hosanee M. (2020). Cuffless Single-Site Photoplethysmography for Blood Pressure Monitoring. J. Clin. Med. 9, 723. doi:10.3390/jcm9030723

PubMed Abstract | CrossRef Full Text | Google Scholar

Johnson A. E. (2016). MIMIC-III, a Freely Accessible Critical Care Database. Scientific Data 3, 160035. doi:10.1038/sdata.2016.35

PubMed Abstract | CrossRef Full Text | Google Scholar

Joshi A. K, Tomar A., Tomar M. (2014). A Review Paper on Analysis of Electrocardiograph (ECG) Signal for the Detection of Arrhythmia Abnormalities. Int. J. Adv. Res. Electr. Elect. Instrumentation Eng. 3, 12466–12475. doi:10.15662/ijareeie.2014.0310028

CrossRef Full Text | Google Scholar

Karlen W., Raman S., Ansermino J. M., Dumont G. A. (2013). Multiparameter Respiratory Rate Estimation from the Photoplethysmogram. IEEE Trans. Biomed. Eng. 60, 1946–1953. doi:10.1109/tbme.2013.2246160

PubMed Abstract | CrossRef Full Text | Google Scholar

Liang Y. (2019). How Effective Is Pulse Arrival Time for Evaluating Blood Pressure? Challenges and Recommendations from a Study Using the MIMIC Database. J. Clin. Med. 8, 337. doi:10.3390/jcm8030337

PubMed Abstract | CrossRef Full Text | Google Scholar

Liu J. (2016). Correlation and Agreement: Overview and Clarification of Competing Concepts and Measures. Shanghai Arch. Psychiatry 28, 115–120. doi:10.11919/j.issn.1002-0829.216045

PubMed Abstract | CrossRef Full Text | Google Scholar

Liu J. (2019). Multi-wavelength Photoplethysmography Enabling Continuous Blood Pressure Measurement with Compact Wearable Electronics. IEEE Trans. Biomed. Eng. 66, 1514–1525. doi:10.1109/tbme.2018.2874957

PubMed Abstract | CrossRef Full Text | Google Scholar

Luo X., Miao F., Li Y. (2012). “PPG and ECG Feature Comparison for Healthy People and Hypertensive Patients,” in Proceedings of 2012 IEEE-EMBS International Conference on Biomedical and Health Informatics, China (Hong Kong). doi:10.1109/bhi.2012.6211701

CrossRef Full Text | Google Scholar

Maheshwari S., Acharyya A., Rajalakshmi P., Puddu P. E., Schiariti M. (2014). Accurate and Reliable 3-lead to 12-lead ECG Reconstruction Methodology for Remote Health Monitoring Applications. IRBM 35, 341–350. doi:10.1016/j.irbm.2014.07.004

CrossRef Full Text | Google Scholar

Marsili I. A. (2020). Implementation and Validation of Real-Time Algorithms for Atrial Fibrillation Detection on a Wearable ECG Device. Comput. Biol. Med. 116, 103540. doi:10.1016/j.compbiomed.2019.103540

PubMed Abstract | CrossRef Full Text | Google Scholar

McSharry P. E., Clifford G. D., Tarassenko L., Smith L. A. (2003). A Dynamical Model for Generating Synthetic Electrocardiogram Signals. IEEE Trans. Biomed. Eng. 50, 289–294. doi:10.1109/tbme.2003.808805

PubMed Abstract | CrossRef Full Text | Google Scholar

Pan J., Tompkins W. J. (1985). A Real-Time QRS Detection Algorithm. IEEE Trans. Biomed. Eng. BME 32, 230–236. doi:10.1109/tbme.1985.325532

PubMed Abstract | CrossRef Full Text | Google Scholar

Paradkar N., Chowdhury S. R. (2017). “Cardiac Arrhythmia Detection Using Photoplethysmography,” in 2017 39th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Jeju, South Korea. doi:10.1109/embc.2017.8036775

CrossRef Full Text | Google Scholar

Polanía L. F., Mestha L. K., Huang D. T., Couderc J. (2015). “Method for Classifying Cardiac Arrhythmias Using Photoplethysmography,” in 2015 37th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Milan, Italy (EMBC). doi:10.1109/embc.2015.7319899

CrossRef Full Text | Google Scholar

Rai H. M., Trivedi A., Shukla S. (2013). ECG Signal Processing for Abnormalities Detection Using Multi-Resolution Wavelet Transform and Artificial Neural Network Classifier. Measurement 46, 3238–3246. doi:10.1016/j.measurement.2013.05.021

CrossRef Full Text | Google Scholar

Sakib M. A. M., Sharif O., Hoque M. M. (2020). “Offline Bengali Handwritten Sentence Recognition Using BiLSTM and CTC Networks,” in Internet of Things and Connected Technologies Patna, India.

Google Scholar

Sayadi O., Shamsollahi M. B., Clifford G. D. (2010). Synthetic ECG Generation and Bayesian Filtering Using a Gaussian Wave-Based Dynamical Model. Physiol. Meas. 31, 1309–1329. doi:10.1088/0967-3334/31/10/002

PubMed Abstract | CrossRef Full Text | Google Scholar

Shelley K. H (2007). Beyond the Calculation of Arterial Oxygen Saturation and Heart Rate. Anesth. Analgesia 105, S31–S36. Photoplethysmography. doi:10.1213/01.ane.0000269512.82836.c9

PubMed Abstract | CrossRef Full Text | Google Scholar

Siami-Namini S., Tavakoli N., Namin A. S. (2019). “The Performance of LSTM and BiLSTM in Forecasting Time Series,” in 2019 IEEE International Conference on Big Data (Big Data), Los Angeles, United States. doi:10.1109/bigdata47090.2019.9005997

CrossRef Full Text | Google Scholar

Steinberg C. (2019). A Novel Wearable Device for Continuous Ambulatory ECG Recording: Proof of Concept and Assessment of Signal Quality. Biosensors 9, 17. doi:10.3390/bios9010017

PubMed Abstract | CrossRef Full Text | Google Scholar

Tereshchenko L. G., Josephson M. E. (2015). Frequency Content and Characteristics of Ventricular Conduction. J. Electrocardiol. 48, 933–937. doi:10.1016/j.jelectrocard.2015.08.034

PubMed Abstract | CrossRef Full Text | Google Scholar

Thomas H. (2018). Global Atlas of Cardiovascular Disease 2000-2016: The Path to Prevention and Control. Glob. Heart 13, 143–163. doi:10.1016/j.gheart.2018.09.511

PubMed Abstract | CrossRef Full Text | Google Scholar

Tian X., Zhu Q., Li Y., Wu M. (2020). “Cross-domain Joint Dictionary Learning for ECG Reconstruction from PPG,” in 2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Barcelona, Spain. doi:10.1109/icassp40776.2020.9054242

CrossRef Full Text | Google Scholar

Wang L., Pickwell-Macpherson E., Liang Y. P., Zhang Y. T. (2009). “Noninvasive Cardiac Output Estimation Using a Novel Photoplethysmogram index,” in 2009 Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Minneapolis, United States. doi:10.1109/iembs.2009.5333091

CrossRef Full Text | Google Scholar

Wang Q., Feng C., Xu Y., Zhong H., Sheng V. S. (2020). A Novel Privacy-Preserving Speech Recognition Framework Using Bidirectional LSTM. J. Cloud Comput. 9, 36. doi:10.1186/s13677-020-00186-7

CrossRef Full Text | Google Scholar

Weinschenk S. W., Beise R. D., Lorenz J. (2016). Heart Rate Variability (HRV) in Deep Breathing Tests and 5-min Short-Term Recordings: Agreement of Ear Photoplethysmography with ECG Measurements, in 343 Subjects. Eur. J. Appl. Physiol. 116, 1527–1535. doi:10.1007/s00421-016-3401-3

PubMed Abstract | CrossRef Full Text | Google Scholar

Zhu F., Ye F., Fu Y., Liu Q., Shen B. (2019). Electrocardiogram Generation with a Bidirectional LSTM-CNN Generative Adversarial Network. Sci. Rep. 9, 6734. doi:10.1038/s41598-019-42516-z

PubMed Abstract | CrossRef Full Text | Google Scholar

Zhu Q., Tian X., Wong C. W., Wu M. (2021). Learning Your Heart Actions from Pulse: ECG Waveform Reconstruction from PPG. IEEE Internet Things J. 1–1. doi:10.1109/jiot.2021.3097946

PubMed Abstract | CrossRef Full Text | Google Scholar

Keywords: digital health, data science, intensive and critical care, cardiology, electrocadiogram, vital sign analysis

Citation: Tang Q, Chen Z, Guo Y, Liang Y, Ward R, Menon C and Elgendi M (2022) Robust Reconstruction of Electrocardiogram Using Photoplethysmography: A Subject-Based Model. Front. Physiol. 13:859763. doi: 10.3389/fphys.2022.859763

Received: 24 January 2022; Accepted: 21 March 2022;
Published: 25 April 2022.

Edited by:

Kuanquan Wang, Harbin Institute of Technology, China

Reviewed by:

Lisheng Xu, Northeastern University, China
Bersain A. Reyes, Universidad Autónoma de San Luis Potosí, Mexico

Copyright © 2022 Tang, Chen, Guo, Liang, Ward, Menon and Elgendi. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

*Correspondence: Mohamed Elgendi, moe.elgendi@hest.ethz.ch; Zhencheng Chen, chenzhcheng@guet.edu.cn

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.