M2ECG: Wearable Mechanocardiograms to Electrocardiogram Estimation Using Deep Learning

Chest surface vibrations induced by cardiac activities can provide valuable insights into various heart conditions. Seismocardiogram (SCG) and Gyrocardiogram (GCG) signals, collectively referred to as Mechanocardiograms (MCG) and collected using a chest-mounted accelerometer and gyroscope, respectively, have the potential to serve as an effective alternative to Electrocardiograms (ECG) for continuous cardiac monitoring. In many cases, both modalities (MCG and ECG) can be used in tandem to monitor cardiac functions in both healthy subjects and Intensive Care Unit (ICU) patients. Direct acquisition of ECGs can be challenging in certain scenarios, such as with wearable devices, or due to issues with disconnections arising from loose contact surfaces or gel corrosion during long-term usage. ECG considered the gold standard for heart monitoring, is essential for a comprehensive assessment of cardiac parameters and patient health. MCGs have the potential to reliably estimate ECGs and can replace direct ECG acquisition procedures in such cases. In this study, we introduce M2ECG, a 1D-segmentation-based approach for translating ECG signals from the corresponding MCG signals acquired by an Inertial Measurement Unit (IMU) attached to the chest wall. Using the proposed SA-UNet, we achieved an average Pearson Correlation Coefficient (PCC) of 81.76% on a subject-independent test set. We also compared the estimated heart rates (HR) from the reconstructed ECGs to the ground truth ECGs to validate our model’s performance. The overall HR correlation achieved on the subject-independent test set was around 94.167%. The highest correlation of the HR and HRV calculated from the translated and the ground truth ECGs were around 99.073% and 96.289%, respectively for the best test case. The strong correlation observed in cardiac parameters (HR, HRV) underscores the effectiveness of MCG, suggesting its potential use for continuous monitoring of cardiac patients.


I. INTRODUCTION
According to the World Health Organization (WHO), cardiovascular diseases or CVDs are one of the leading causes of death worldwide, causing around 17.9 million deaths each year [1].Cardiovascular mechanical movements or vibrations can be an effective strategy for continuously monitoring patients in clinical settings.Seismocardiogram (SCG) and Gyrocardiogram (GCG), combinedly known as Mechanocardiograms (MCG), are recordings of a human heart's mechanical activity to derive diagnostically relevant information about cardiovascular and cardiopulmonary health [2], [3].SCG signal, collected with a chest-mounted accelerometer, detects mechanical vibrations caused by the heart at the chest surface [4], [5].GCG uses a gyroscope as an angular motion sensor to assess heart motions without utilizing any surgical procedures [6].It records small-scale cardiac events such as the opening and closing of heart valves and the contraction and relaxation of heart chambers [7].These two signals can be used to precisely time fine-grained heart events, such as the opening and closing of valves that allow blood to flow between the heart chambers and into the blood arteries [8], [9].
In recent studies, SCG and GCG have demonstrated robust individual performance in heart rate variability analysis [2], [10], heartbeat detection [11], and respiratory rate (RR) estimation [12], when compared to ground truth ECGs.Although ECG is widely considered the gold standard for cardiovascular monitoring and diagnosing heart-related complexities, MCG modules can be used in conjunction with, or as alternatives to, ECG acquisition setups in wearable devices and for ICU patient monitoring.For chest-based wearable applications, MCG modules can be utilized to estimate ECG waveforms, potentially serving as replacements or enhancements for cardiovascular parameter estimation [10], [11], [12].On the other hand, during continuous and longterm ICU monitoring, patients may experience discomfort due to the sticky ECG electrodes.Prolonged usage of these electrodes might reduce their performance due to corrosion, sometimes resulting in disconnection due to loose connections.Gel electrodes, frequently used for ECG acquisition, can cause patients to experience itching and discomfort [13].Furthermore, 12-lead ECG connections are much more complex than MCG connections, which consist solely of an Inertial Measurement Unit (IMU) and can be rapidly set up during emergencies or for daily home monitoring.Moreover, in some specific situations such as Cardiopulmonary Resuscitation (CPR) and for wearable applications [14], electrical signals that coordinate the heart's beats may malfunction due to motion artifacts and noise generated by movements, posing a challenge for medical experts and clinical devices in accurately assessing the heart's characteristics from the corrupted ECG waveforms [15].Given that SCG and GCG are IMU-based solutions, they hold the potential to rectify motion artifacts [14] and enhance the effectiveness of ECG in estimating cardiovascular parameters, including Heart Rate (HR), Heart Rate Variability (HRV), and Blood Pressure (BP) using Pulse Transit Time (PTT) [16].Consequently, estimating ECGs from MCG waveforms based on a deeplearning-based framework can serve as a viable alternative to ECGs in certain applications or be used to correct motion artifacts in clinical-grade ECGs.
To enhance the precision of heart rhythm and arrhythmia analysis, Neeraj et al. [17] introduced a technique for deriving ECG from SCG signals using the ''Combined measurement of ECG, breathing, and Seismocardiogram (CEBS)'' dataset [18].Given that SCG provides a straightforward data-gathering modality and ECG offers more accurate heart rate analysis due to its distinct R-peaks, their primary objective was to extract ECG information from SCG signals.
A review of the existing literature underscores that MCG can serve as a valuable non-invasive approach for monitoring cardiac conditions, such as aortic stenosis [19], [20], [21], atrial fibrillation [22], [23], and others, all of which are characterized by abnormal heart function.SCG and GCG analyze the mechanical vibrations and chest movements occurring with each heartbeat, enabling the evaluation of aortic valve function.In cases of aortic stenosis, where the valve may not open fully or close correctly, these techniques can detect unusual mechanical patterns [20].Combined SCG and GCG were used by Yang et al. [20] for the classification of aortic stenosis (AS) [21].They applied Continuous Wavelet Transform (CWT) to the signals, feeding them into both conventional machine learning (ML) and deep learning (DL)-based 2D Convolutional Neural Network (2D-CNN) models.Tadi et al. [5] introduced an innovative non-invasive method for measuring heart movements using an angular motion-gyroscope sensor.They utilized Pulse Wave Doppler (PWD) images, GCG signals, and visual inspection to identify specific GCG waveforms corresponding to particular mechanical cardiac events in each cardiac cycle.Another combined analysis, which utilized SCG-GCG and ECG algorithms independently as standalone measurements, demonstrated the feasibility of non-invasive electro-mechanical heart monitoring on stationary, supine participants [24].Importantly, pseudo-heart rate (pulse rate), HRV (or pulse rate variability, PRV), and various other physiological parameters can be derived from both ECG and MCG [25], [26].Autonomic balance, blood pressure, gas exchange, gut health, heart health, and vascular tone (the width of blood vessels controlling blood pressure) are all reflected in HRV.Over the years, various algorithms have been employed for HRV detection from ECG, with many based on R-peak detection in QRS complexes [27].Laurin et al. [28] demonstrated the reliability of HRV indices derived from SCG signals, and Tadi et al. [29] confirmed a strong association between HRV indices derived from ECG and SCG.Beyond traditional ECG applications, MCG signals have proven effective in classifying cardiovascular anomalies through smartphones [1], [30], estimating respiratory rate (RR) [12], [31], determining tidal volume alongside ECG from SCG [32], estimating cardiac time intervals from SCG [33], real-time cardiovascular disease detection for drivers [34], among other applications.Thus, based on the aforementioned discussions, ECG estimated from MCG components possesses the capability to detect and classify cardiac anomalies in non-healthy patients in advanced applications.
In recent years, Deep-learning-based 1D-segmentation models have been used in multifarious physiological signal reconstruction (also known as segmentation, translation, and synthesis) [35], [36], [37], [38], [39] and restoration studies [40], [41].In the realm of signal reconstruction, these models have been employed for tasks such as Photoplethysmogram (PPG) to Arterial Blood Pressure (ABP) estimation [37], [38], [42] non-invasive Fetal ECG synthesis [35], Pulse Train segmentation from Magnetohydrodynamics (MHD) corrupted ECG for enhanced cardiac gating [36], and so forth.Furthermore, 1D-segmentation networks have proven useful for restoring or cleaning physiological waveforms, including tasks such as Electroencephalogram (EEG) denoising from motion [41] and/or physiological [40] artifacts.The 1D version of the UNet model [43] (and its derivatives) commonly used in such applications was originally proposed for medical image segmentation [44], [45].These models follow an encoderdecoder architecture.In the present study, where the goal is to estimate ECG from MCG, we employed a deepsupervision-based modified 1D-SA-UNet.The SA-UNet, initially introduced by Guo et al. [46] for retinal vessel segmentation from 2D images, features a structured dropout convolutional block with a spatial attention module that infers the attention map alongside the spatial dimension to mitigate overfitting.
To enhance the estimation of cardiovascular parameters using ECGs, with MCGs serving as a supporting or alternative method, especially for continuous monitoring of heart patients through wearables or in clinical settings, this study introduces the M2ECG framework.This framework employs a modified SA-UNet with 1D deep supervision to reconstruct continuous ECG signals from various combinations of 6-axis MCG (SCG, GCG) waveforms collected using an IMU.It also extracts essential physiological parameters such as heart rate (HR) and heart rate variability (HRV) from the estimated ECG signals, demonstrating superior performance compared to relying solely on the ground truth MCG data.In essence, our proposal revolves around generating simultaneous ECG signals from a combination of SCG and GCG using 1D-segmentation techniques.The primary contributions of this study are as follows: • In this study, following the proposed M2ECG framework, our objective is to reconstruct continuous ECG signals from Mechanocardiogram (MCG) signals (SCG, GCG) by employing 1D-CNN-based segmentation networks.
• We utilize different combinations of the 6-axis MCG data collected with an IMU to identify the most effective channel combination for ECG estimation.
• M2ECG can offer a more cost-effective, comfortable, and safer solution during the resting phase.This MCG-based system remains unaffected by electrical imbalances in critical situations, and there is no direct electrical connection to the body.
• The estimated ECG signals from M2ECG exhibit excellent performance when measuring HR and HRV in comparison to the ground truth ECG signals, as demonstrated in this study, in addition to the findings in established literature.The rest of the manuscript is organized as follows: In Section II, we provide a comprehensive description of the materials and methodology used in this study, including details about the dataset and the proposed M2ECG framework.In Section III, we summarize the experimental setup and the findings of this work.In Section IV, we discuss the limitations and challenges encountered in the current study and elaborate on future research directions in this domain.Finally, we conclude the study in Section V.

II. METHODOLOGY
In this section, we will elaborate on the methodology employed in this study.First, we will provide a brief overview of the proposed M2ECG framework and subsequently discuss the properties of the dataset used for experimentation, data collection strategies, and the data preprocessing steps.After that, we will delve into the details of the proposed M2ECG framework, which includes the architecture of the 1D-segmentation models and the training setup for the deep learning framework.

A. PROPOSED M2ECG FRAMEWORK OVERVIEW
The general framework of the proposed M2ECG framework is illustrated in Fig. 1 during data acquisition, the SCG and the GCG (i.e., MCG) signals were recorded simultaneously with the ECG signals, which served as the ground truth during both training and evaluation in this study.Initially, the signals undergo a few preprocessing steps, such as resampling, baseline correction, filtering, breaking into segments, and normalization elaborated afterward.Various variants of 1D-segmentation models are trained using different combinations of channels or axes from the SCG and GCG signals to improve the accuracy of ECG signal estimation.Subsequently, these trained models are applied to estimate the ECG signals from the MCG signals in the test set, which also undergo the same preprocessing steps.The optimal model is then selected based primarily on two types of evaluation metrics, namely correlation and error.In the following sections, we will delve into the materials utilized and the methods employed in this study.

B. DATASET DESCRIPTION
In this study, we utilized the ''Mechanocardiograms with ECG Reference'' [47] dataset to conduct experiments focused on translating MCG signals into corresponding ECG waveforms.The dataset included recordings from both healthy subjects and individuals with heart disease.Among the healthy group, there were twenty-nine male volunteers who provided approximately 260 minutes of recording in total.Additionally, twelve patients with coronary artery disease (ten males and two females) participated, contributing about 120 minutes of recording.The dataset's metadata [47] also provides statistical properties (minimum, maximum, mean, standard deviation) for demographic features, including age, height, weight, and BMI, for both groups.Physiological signals, including ECG Lead-II, and their corresponding mechanocardiogram signals (SCG and GCG), were collected from all subjects [48].

C. DATA COLLECTION SETUP
The ECG, SCG, and GCG data were recorded at a sampling rate of 800 Hz.Electrodes were placed on the right arm, left arm, and lower left abdomen to measure Lead-II ECGs.SCG and GCG data were obtained by digital accelerometer and gyroscope sensors, respectively enclosed in an Inertial Measurement Unit (IMU).Cardiogenic motions of the upper chest were measured by six degrees of freedom of the IMU, consisting of the embedded accelerometer and gyroscope sensor array.Left to right, head to foot, and back to chest orientations were defined to point to the x-axis, y-axis, and z-axis of rotation or translation [5], [49], [50].The measurements were taken from the subjects either in a supine position or from their left or right side while the sensor modules were linked to the sternum using doublesided tape.The duration of data acquisition and processing was up to 10 minutes per subject [48].We have used only the publicly available healthy subjects' data for our experiments.Fig. 2 represents the data collection setup of the ''Mechanocardiograms with ECG Reference'' Dataset [47].

D. DATA PREPROCESSING
Data preprocessing steps have a significant impact on the deep learning model performance [33], [42] making it of high importance.Well-prepared and preprocessed data can improve a model's performance.The signals in this study are resampled, baseline corrected, segmented, and normalized to prepare them for deep learning pipelines.All signals in the dataset were sampled at a rate of 800 Hz during data collection [47].We decimated (downsample through linear interpolation and lowpass filtering) the signals into a lower sampling rate of 256 Hz [51].This was done to lower the number of total data points to ensure lower data footprints for the deep learning framework and fit more ECG cycles within a fixed segment length.Nevertheless, to synchronize signals in the time domain, signals must be resampled to a single sampling frequency.All corresponding segments should be synchronized in the time domain and of the same length for deep learning applications [42].The dataset's [47] raw signals were highly distorted and noisy.The Butterworth bandpass filter of sixth order, with a cutoff frequency of 0.1 Hz and 40 Hz for the ECG signals and 1 Hz and 40 Hz for the MCG signals [52], is implemented to remove the unwanted frequency components.The majority of the baseline drift is eliminated with the lower cutoff frequency of the bandpass filter.We also implemented a 7th-order polynomial-based baseline drift corrector to remove the remaining baseline wanderings from the signals.
Now, longer segments have a higher likelihood of including numerous properties that the deep learning model might overlook during training.Moreover, the resource requirements associated with the training would be reduced significantly due to using shorter segments.So, the whole duration signals were cropped into segments of 1024 sampling points with a 50% overlap between adjacent segments [1], [42].According to (1), each extracted segment is at first ''Z-Score'' normalized, then ''range'' normalized between 0 and 1.For normalizing signals with large variation, ''Z-Score'' normalization is crucial [42], and 'range' normalization is utilized to constrain the amplitudes between 0 and 1, which is important for deep learning algorithms [1], [42].
Here, µ i and σ i are the mean and standard deviation of the i th segment (signal i ), respectively.

E. 1D SEGMENTATION MODEL ARCHITECTURE
The filtered MCG signals undergo processing through a set of 1D reconstruction or segmentation models designed to approximate the ECG waveforms.In this section, we describe the architecture of the best-performing ''Deeply Supervised Spatial Attention UNet (DS-SA-UNet)'' 1D-segmentation model, as depicted in Fig. 3.The DS-SA-UNet [46] is organized into two major parts, namely the encoder and decoder, akin to the original UNet [43].In the encoder, blocks are employed to downsample and compress the input data into dense feature maps.Meanwhile, the decoder is responsible for decoding the compressed features through upsampling or transposed convolution, ultimately generating the desired output in the final layer.Each encoder step is comprised of a structured dropout convolutional block and a 2 × 2 max pooling operation.These components facilitate the model in learning from the most salient features of the dataset.Each convolutional block shown in Fig. 3 commences with a convolutional layer, followed by a Dropout layer, a Batch Normalization (BN) layer, a Rectified Linear Unit (ReLU) activation function, and concludes with a max pooling operation featuring strides of 2. Additionally, the number of feature channels is augmented by two at each downsampling step.Within each stage of the decoder, a 2 × 2 transposed convolution operation is incorporated for up-sampling, reducing the number of feature channels by half.Between the encoder and decoder, a spatial attention module is introduced, with a 1 × 1 convolution serving as the top layer.Feature maps from each encoder block are directly concatenated to their corresponding decoder blocks at the same feature level.
To approximate an ECG signal, the final decoder executes a 1 × 1 convolution, followed by a 'Sigmoid' activation function.

1) DEEPLY SUPERVISING SA-UNET
We also incorporated deep supervision into the modified DS-SA-UNet segmentation model, operating like auxiliary losses at each decoder level [53].These auxiliary losses were applied to the outputs of the convolutional layers in each decoder level just before the transposed convolution.
The weights assigned to these losses were configured as [1, 0.9, 0.8, 0.7, 0.6], signifying that the final output holds the most weight during optimization through the loss function.Meanwhile, the weights of the intermediate, auxiliary outputs from the deeper decoder layers are gradually reduced [53].The Spatial Attention Module: The Spatial Attention module is utilized to generate spatial attention maps through the application of both maximum and average pooling techniques.It is integrated into the convolutional block to enhance classification and/or detection performance.As depicted in Fig. 4, the Spatial Attention module is initiated by performing max-pooling and average-pooling operations in parallel along the channel axis, subsequently concatenating ( * ) the results to form an effective feature descriptor.Next, a convolutional layer is applied to this concatenated feature descriptor, and the 'Sigmoid' activation function is used to generate non-linearity in the features.It is important to note that the width of the input feature, denoted as W, always remains 1, as we are dealing with 1D signals in this study.
In short, the output feature map F ′ is calculated by multiplying (×) the input feature map F and spatial attention map 'SA', as shown in (2).

F. PREPARATION OF TRAIN AND TEST SETS
As previously mentioned, we selected twenty-nine healthy subjects for the utilization of the proposed M2ECG framework as non-healthy ECG is out of the scope of the current study.

III. EXPERIMENTATION AND RESULTS
In this section, we discuss the experimental setup adopted for this study and the evaluation criteria followed to assess the performance of the models through various evaluation metrics.We also discuss and visualize various quantitative and qualitative evaluation outcomes of the model in detail.

A. EVALUATION METRICS
To rigorously assess the performance of the 1D-Segmentation models in reconstructing ECG from SCG and GCG signals, we primarily rely on two types of metrics: temporal correlation and temporal error.Temporal correlation measures the linear correlation of data points between two sets of data in the time or temporal domain.In this context, it quantifies the correlation between the estimated ECG signals and the ground truth ECG signals.Several methods can be employed to measure temporal correlation, and in this case, we utilize the Pearson Correlation Coefficient (PCC) [54].
Pearson Correlation Coefficient, PCC Here, x i and y i represent the two signals under comparison, while 'n' signifies the number of segments, and x and ȳ denote the mean or average of X and Y sets (i.e., the input and the target sets), respectively.In (3), the Pearson Correlation Coefficient (PCC) is particularly reliant on pointto-point correlation and may exhibit substantial inaccuracies if the phases do not align for the signals being correlated.Fortunately, in this case, there were no consistent phaseshifting issues between the estimated and ground truth ECG waveforms.
Among the various temporal error metrics utilized in this research, Mean Absolute Error (MAE) serves as a measure of the absolute errors between paired observations describing the same phenomenon.The MAE, as defined in (4), is calculated by summing the absolute of the errors between the ground truth (y i ) and the estimated ( ȳi ) ECG signals [55].Here, M denotes the total number of samples or segments in the dataset while i denotes a particular sample.
The squared difference between the estimated ( ȳi ) and the actual value (y i ) is measured by an estimator's Mean Squared Error (MSE) [56], as formulated in (5). (5) On the other hand, the square root of the mean of the square of all the errors is known as the Root Mean Squared Error (RMSE) [57], as shown in (6).
Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

B. QUANTITATIVE AND QUALITATIVE EVALUATION
We conducted some empirical studies to determine the optimal combination for MCG to ECG reconstruction.These studies involve the exploration of various mechanocardiogram signal or channel combinations and variations in segmentation models and model hyperparameters for the best-performing model.The primary objective of these ablation studies is to optimize the Pearson Correlation Coefficient (PCC) between the ground truth and the reconstructed ECGs.

1) MCG CHANNEL COMBINATIONS
A total number of six channels are found from the MCG signals (3-axes from the SCG and 3-axes from the GCG, as collected by the IMU) according to the ''Mechanocardiograms with ECG reference'' dataset [47].Based on our experimentations, the best ECG estimations are obtained by using the combination of the z-axis of SCG and the yaxis of GCG.Heartbeat detection by using these two axes produced the best outcomes, according to Kaisti et al. [48].
The bar graph in Fig. 5 represents the PCC(%) between the ground truth and the reconstructed ECG signals at different channel combinations.The best 81.76% PCC is obtained on the test set by using the two aforementioned channels.Here, TABLE 2 demonstrates the estimated construction errors (MAE, MSE and RMSE) between the ground truth and the estimated ECGs at different channel combinations, expressed as mean ± standard deviation (SD) of the error.The errors are computed on the entire test set using the trained model after completing several epochs of training with a patience of 20.We can see that the SCG (z-axis) and GCG (y-axis) dual-channel combination produces the best error outcomes in terms of all metrics (0.054 MAE, 0.008 MSE and 0.08 RMSE).
Mentionable that we monitor the MSE loss and accuracy based on the randomly split 10% validation set during training and decide on the optimal epoch and early stopping criteria based on the loss.Now, since the highest correlation obtained by using 2 channels, Fig. 6 below depicts a sample segment of ground and reconstructed ECG signals by using the z and the y axes of SCG and GCG, respectively, for qualitative evaluation.The x and y axes of the accelerometer data and the x and z axes of the gyroscope data were not helpful in better ECG estimation due to high motion artifacts.FIGURE 6. Reconstructed sample ECG segment by using the 2 most optimum channels (SCG z-axis, GCG y-axis), plotted against the corresponding ground truth.

2) MODEL HYPERPARAMETER TUNING
Hyperparameters consistently impact the learning process of a model, and the learning algorithm is optimized by selecting the most crucial hyperparameters after appropriate tuning.Over multiple experiments, we have explored various combinations of hyperparameters for the DS-SA-UNet architecture to attain the highest correlation coefficient.To achieve optimal generalization, it is imperative to fine-tune parameters such as the learning rate and batch size [58].The bar graph below clearly indicates that the highest correlation coefficient (81%) is attained after approximately 100 epochs with a learning rate [59], [60], [61] of 10 −5 and a batch size [62] of 4. The model undergoes training across 50 to 150 iterations to achieve the optimum Pearson Correlation Coefficient (PCC) for artificial ECG generation [63].After around 100 epochs, the PCC generally starts to decline.These parameters are adjusted to evaluate performance across a broader range of hyperparameters, as part of the tuning process [64].Throughout these analyses, the two best channels from the previous experiment are consistently employed as input.For all experiments, the Adam optimizer [65] is used.We have also explored batch sizes ranging from 4 to 16, as well as a smaller learning rate of 10 −4 .However, it is evident from the composition depicted in the bar plot in Fig. 7 that this particular configuration yields the most favorable results.

3) 1D-SEGMENTATION MODEL VARIANTS
In addition to DS-SA-UNet, two other 1D-segmentation models, namely Self-SA-UNet and SA-MultiResUNet, were employed to identify the model with the best performance.Among these models, the DS-SA-UNet architecture yielded the most favorable results across all metrics.This was achieved by utilizing the two best-performing channels, a learning rate of 10 −5 , a batch size of four, and running the training process for 100 epochs.The Pearson Correlation Coefficient (PCC) and the errors from all the 1D-segmentation models used in this study are presented in TABLE 3, each metric expressed as mean ± standard deviation (SD) over the entire dataset.

C. CLINICAL EVALUATION
The primary purpose of the peak detection analysis explored in this section is to perform clinical evaluation by assessing the accuracy of mechanocardiograms in reconstructing ECGs while maintaining cardiac features.All applications related to electrocardiograms (ECG) rely on R-peak detection [66] to extract vital diagnostic information.Recognizing R-peaks in long-term ECG signals [67], [68], [69] is particularly crucial in measuring heart rate (HR), heart rate variability (HRV) analysis, biometrics, and ECG coding systems.The peak detection process for both the original and estimated ECG signals is executed using the BioSPPY module [70], which offers innovative peak detection algorithms.In this context, we have employed the Christov algorithm [71] for peak detection.Fig. 8 below illustrates the detected peaks in a sample of both the original and estimated ECG signals.The interval between two successive R-peaks is commonly denoted as the RR-interval (RRI or RR-I for brevity) [72].By computing the mean RRI, represented as (RR) using (7), one can estimate the mean heart rate (HR) as per (8).
Scatter plot depicting the correlation between mean heart rates (beats/min) from ground truth and reconstructed ECG segments from the entire subject-independent test set.
HR is a crucial biomarker [73] with a pivotal role in the identification of critical conditions such as COVID-19 [74], diabetes [75], chronic pain [76], cardiovascular diseases [1], [77], [78] and more.Consequently, the 1503 estimated ECG segments of the test and their respective ground truth ECGs are separately used to determine HR (beats/min).The scatter plot in Fig. 9 illustrates the correlation between the calculated HR (beats/min) from the ground truth and the reconstructed ECG segments of the subjectindependent test set.This analysis reveals a PCC of 94.167%, underscoring the effectiveness of the proposed approach.In Fig. 10, a subject-wise analysis of the correlation of mean heart rate (HR) between the ground truth and the reconstructed ECGs is presented with the help of scatter plots.Notably, among the three subjects, Subject 24 exhibits the highest correlation for HR.Consequently, the heart rate variability (HRV) for this individual is estimated.
At this stage, it is essential to emphasize that the difference between two consecutive heartbeats is commonly termed heart rate variability, or HRV [79].To measure the beat-to-beat variability of heart rate and identify changes in HRV, the root mean square of consecutive deviations between normal heartbeats (RMSSD) [80] is employed.By initially figuring out each subsequent time difference between heartbeats in milliseconds (ms), the RMSSD in ( 9) is derived.The square root of the total is then calculated by first multiplying each number by its square, followed by averaging [80], [81].
Here, RR i represents the interval of two successive R-peaks and RR i+1 denotes the RR-I for the next cycle.The scatter plot in Fig. 11 represents the HRV correlation between the ground truth and the reconstructed ECG signals.
As a proof of concept for our proposed approach, we also compare the correlation (PCC) between the mean HR and mean HRV for each MCG segment (separately for SCG and GCG) with the corresponding ECG segment before and after processing through the M2ECG framework.TABLE 4 demonstrates the effectiveness of the M2ECGbased approach for estimating HR and HRV.The PCC is calculated for cardiac parameters (mean HR, HRV) in comparisons between ground truth (GT) MCG and ground truth ECG, as well as between the estimated ECG and ground truth ECG.The results reveal a significant enhancement in PCC for both HR and HRV when ECG is reconstructed from MCG. Notably, the GCG exhibits superior performance compared to the SCG, and the overall PCC is at its highest when comparing the parameters of the estimated ECG with the original ECG.For HR estimation, there is an improvement of approximately 35.593% compared to GT SCG and a 22.243% improvement compared to GT GCG.In contrast, for HRV estimation, we observe an improvement of 32.318% compared to GT SCG and 29.532% compared to GT GCG.Mentionable that for extracting HR and HRV, we use the ECG estimates from the most efficient SCG and GCG channels (the z-axis of SCG and the y-axis of GCG), as outlined in Section III.

IV. LIMITATIONS AND FUTURE DIRECTIONS
Despite the novelties achieved in the current study, there are a few important limitations that warrant discussion for the benefit of future researchers.First and foremost, Mechanocardiography, as a technique, cannot surpass the diagnostic capabilities of ECG in cardiac monitoring, at least not with the current state of the technology.That is why we have attempted to estimate ECG from MCG using Artificial Intelligence (AI).Instead, MCG has the potential to function as a valuable complementary tool for evaluating specific aspects of heart function associated with mechanical activity, particularly in cases such as aortic valve stenosis and their impact on cardiac health.This potential is even more evident when MCG is translated into corresponding ECG, as explored in this research.MCG as a tool has already been explored for arrhythmia detection, as well as for assessing and classifying other cardiac complexities, as discussed earlier.
In this study, the PCC was utilized as the evaluation metric.It is crucial to select the evaluation metric in alignment with the study's objectives and intended outcomes.However, extensive research is necessary to establish MCG a robust solution for diagnosing cardiac anomalies.Specifically, future researchers can focus on improving ECG estimation from unhealthy MCGs to closely match the performance of ground truth ECGs in cardiac anomaly detection and classification.Ultimately, the choice of a diagnostic tool, whether it's ECG, MCG, or a combination of modalities, depends on the specific clinical context and objectives.Additionally, in cases of severe cardiac complications where the heart condition heavily relies on signal structure, the selection of evaluation metrics should be tailored to correspond with the complexity level of the cardiac issues.Healthcare providers and researchers often utilize these tools in conjunction to gain a more comprehensive understanding of cardiac function, recognizing that each offers unique insights into different aspects of heart health.

V. CONCLUSION
In this study, we have reconstructed Electrocardiogram (ECG) waveforms from Seismocardiogram (SCG) and Gyrocardiogram (GCG), combinedly Mechanocardiograms (MCG) signals using 1D-segmentation networks and measured cardiac diagnostic parameters such as heart rate (HR) and heart rate variability (HRV) from the reconstructed ECG signals instead of MCG signals as performed in the most studies in the literature.Our solution achieves excellent retainment of signal with an average of 81.76% on a subjectindependent test set.We have attempted several channel combinations as well as various 1D-segmentation models, but SA-UNet performed best with 2 channels (z and the y axes of SCG and GCG, respectively).Moreover, the average of the mean absolute error (MAE), mean squared error (MSE), and the root mean squared error (RMSE) over the whole subjectindependent test set is 0.054, 0.008, and 0.08, respectively.However, the performance could be enhanced if the MCG and the ground truth ECG signals were of a higher quality and the data was available for a more diverse set of healthy subjects.In the future, more extensive work can be done on processing the MCG waveforms for better performance.Similar works can be done but on a diverse set of healthy and non-healthy subjects (subjects with cardiac problems) to realize the performance of 1D-segmentation models in retaining cardiac abnormalities from MCG to the generated ECG signals.

FIGURE 2 .
FIGURE 2. Diagrams showing the (a) placement of the ECG, SCG, and GCG sensors on the chest wall in 3D, and the (b) data collection setup of the ''Mechanocardiograms with ECG Reference'' dataset.

FIGURE 3 .
FIGURE 3. Deeply-Supervised 1D-SA-UNet (DS-SA-UNet) model architecture to estimate ECG from the preprocessed MCG (SCG and GCG) signals.In this figure, we only show the optimal input IMU channels for ECG reconstruction.

FIGURE 4 .
FIGURE 4. The building blocks of the Spatial Attention (SA) module.

FIGURE 5 .
FIGURE 5. Bar graph depicting the Pearson Correlation Coefficient (PCC) between the ground truth and reconstructed ECG for different channel combinations.

FIGURE 7 .
FIGURE 7. Bar Graph of Pearson Correlation Coefficient (PCC) between ground truth and reconstructed ECG at different model hyperparameters combinations.

FIGURE 8 .
FIGURE 8. Detected R-peaks on the ground truth and the reconstructed ECG waveforms using BioSPPY.

FIGURE 10 .
FIGURE 10.These scatter plots depict the subject-specific mean heart rate (beats/min) correlation between the ground truth and the reconstructed ECG segments extracted from the test set.

FIGURE 11 .
FIGURE 11.The scatter plot illustrates the heart rate variability (HRV) correlation between the ground truth and the reconstructed ECG signals for Subject 24, who exhibits the strongest HR correlation.

TABLE 1 .
Distribution of data for the M2ECG framework.

TABLE 2 .
Construction errors between the ground truth and the estimated ECGs at different channel combinations.

TABLE 3 .
Estimated errors between ground truth and estimated ECG obtained by different 1D-segmentation models.

TABLE 4 .
Quantitative comparison of extracted cardiac parameters (HR and HRV) between MCG and M2ECG estimations.