An algorithm for the beat-to-beat assessment of cardiac mechanics during sleep on Earth and in microgravity from the seismocardiogram

Seismocardiogram, SCG, is the measure of precordial vibrations produced by the beating heart, from which cardiac mechanics may be explored on a beat-to-beat basis. We recently collected a large amount of SCG data (>69 recording hours) from an astronaut to investigate cardiac mechanics during sleep aboard the International Space Station and on Earth. SCG sleep recordings are characterized by a prolonged duration and wide heart rate swings, thus a specific algorithm was developed for their analysis. In this article we describe the new algorithm and its performance. The algorithm is composed of three parts: 1) artifacts removal, 2) identification in each SCG waveform of four fiducial points associated with the opening and closure of the aortic and mitral valves, 3) beat-to-beat computation of indexes of cardiac mechanics from the SCG fiducial points. The algorithm was tested on two sleep recordings and yielded the identification of the fiducial points in more than 36,000 beats with a precision, quantified by the Positive Predictive Value, ≥99.2%. These positive findings provide the first evidence that cardiac mechanics may be explored by the automatic analysis of SCG long-lasting recordings, taken out of the laboratory setting, and in presence of significant heart rate modulations.

The results of the simulation are shown in the Table S1. For space reasons the results are reported with the original 0.001 step only for the PPVs ≥ 0.99, while results referring to lower PPVs are reported with a progressively larger step (0.002, 0.005, 0.01).
Table data are also plotted in Fig. S1, to facilitate the exploitation of this simulation. In the graph there are three curves: the blue continuous curve in the middle is the identity line between the simulated and the estimated PPVs, the blue squares on the left and the green triangles on the right represent the maximal and minimal estimated values reported in the table, respectively. The range of error for any given estimated PPV may be simply obtained by drawing a horizontal line at the desired level of the ordinate and by measuring the corresponding abscissa values at the points of intersection of the line with the min and max curves. Those values represents the minimal and maximal range of the error for the given estimated PPV.
It is worth noting that the range of the estimation error progressively decreases as the PPV tends to 1 and that the largest error may be observed on the left side of the identity line. This asymmetry may be expected because of the closeness with the unity boundary.
In the figure we also reported the estimation error for the minimal PPV we obtained in the evaluation of the algorithm (0.992, corresponding to the MO estimation on the on-ground recording). It appears that on the basis of the simulation, this estimation value corresponds to real PPV values ranging from 0.981 to 0.997. Thus the absolute maximal error is 0.992-0.981=0.011 corresponding to 1.1%. The PPV estimates for the remaining FPs were higher than 0.992 and thus their maximal estimation error is less than 1.1%.

PART II -ALGORITHM PORTABILITY
In the main article we described the details of the algorithm designed for the analysis of data recorded in a specific subject (the astronaut). This development demonstrated the feasibility of an automatic estimation of indexes of cardiac mechanics during sleep from SCG recordings taken in real-life scenarios very far from the traditional controlled condition of a laboratory setting. However, the positive results on the astronaut leaves virtually unaddressed the issue of the algorithm portability. In this frame, it might be conceived that the algorithm was so tightly tailored on the SCG waveform of the target subject to make it impossible its adaptation for the analysis of data from any other subject with reasonable efforts.
While the comprehensive exploration of the algorithm portability is out of the scopes of the present study and would require a separate investigation, in this ancillary analysis, we provide evidence that a tuned version of the algorithm -as obtained by the only change of some threshold values-may be employed to analyze data of different subjects.
SUBJECTS AND DATA COLLECTION -Two healthy male volunteers (age: 25 and 30 years) were recruited for this analysis. In each subject, ECG and SCG were recorded during sleep by a proprietary device, the SeisMote system, developed in our laboratory and functionally similar to the MagIC-Space system used for collecting data from the astronaut. The electronic module of SeisMote was the same used in the MagIC-Space, but, in the SeisMote system the ECG was detected by traditional gel electrodes (instead of the textile electrodes of the vest), and the SCG was acquired by an external accelerometer (instead of the accelerometer positioned inside the electronic module). During the data monitoring, the external accelerometer was placed on the lower part of the subject's sternum by a strip of adhesive tape. Similarly to the space experiments, data were sampled at 200Hz and locally stored on a memory card inside the electronic board. Structure and setup of the SeisMote system are shown in fig. S2, details of the device may be found in [2].
Each subject was instrumented and the recording was activated at around 6 p.m. in our laboratory. During the ongoing data monitoring, the subject went home, had dinner, spent the evening at home and then went to sleep. On the next morning, the subject stopped the monitoring at the wake up and dismounted the system. The times when the subject went to bed and woke up were annotated. Subsequently, data were downloaded from the system to a computer for the analysis. The first step of the elaboration was the extraction of the sleep data from the whole recording. The individual duration of the sleep data segment and the number of beats occurred at night are shown in table S2. Before being analyzed for the algorithm tuning, each sleep data segment, from now on termed "sleep recording", was pre-processed as done in the main analysis, thus the artifacts were manually removed from the ECG and the SCG was passband filtered.
THE TUNING WORKFLOW -The original algorithm keeps trace of any discarded beat and any missing FP, and annotates the algorithm step in which the failure occurred. The steps are: data segmentation, gross artifact removal, fine artifact removal, ICP identification, MC identification, AO identification, IRP identification, AC identification, MO identification, FP interpolation & resampling, congruency check. The number of discarded beats observed at each step of the algorithm in the on-ground recording of the astronaut was taken as a reference for the tuning. As detailed in the main article, each step includes a number of threshold tests. The tuning procedure was essentially based on a progressive refinement of some of the algorithm threshold values as obtained by a reiterated data analysis.
Since the quality of the new recordings was visually similar to the quality of the astronaut data, we assumed that at the end of the tuning procedure, the number of discarded beats in the new recording at each step of the algorithm should have been lower or close to the reference. On this premise, in the first iteration of the tuning procedure we analyzed the sleep recording with the algorithm in its original form (i.e. with the threshold values set for the astronaut). At the end of this iteration, we checked the number of beats discarded in each step of the procedure, and identified the first step in which the number of rejected beats exceeded the reference. Then, by a visual inspection of some of the discarded beats, we could determine which threshold test failed among those in the step, and set a new threshold value. The whole recording was then reanalyzed by the updated version of the algorithm and the procedure was reiterated till the number of discarded beats was lower or close to the reference for all the steps of the algorithm.
At the end of the tuning, we also checked the precision of the FPs identification through the PPV. For the estimation we kept the same procedure and sample size (10% of the available data) we used in the main analysis. We planned that in case of a PPV <95% the tuning had to be further refined, but in both subjects this event did not occur. Table S3. The table shows, for each subject, the algorithm step in which the change was made, the threshold test involved, and the new value of the threshold. The corresponding values set for the astronaut are also reported as reference.

RESULTS -The list of the threshold values we modified for adapting the algorithm to the analysis of the new sleep recordings is shown in
In each subject the final tuning was reached after the change of two threshold values related to two different steps of the algorithm for subject 1 (the gross artifact rejection, and the IRP identification), and of three values related to three steps for subject 2 (the gross artifact rejection, the ICP identification and the IRP identification). The largest inter-subject variability in the setting was found in the size and position of the search window around Te used for the identification of the IRP anchor point.
The signal quality and the FPs incidence resulting from the analysis of the two recordings by the tuned versions of the algorithm are shown in Table S4. For each FP, the table also includes the corresponding PPV value, and the relevant astronaut data, taken from Table 2 and 3 of the main article, as reference.
The analyses obtained by the tuned procedures indicate that when compared with the reference, the new recordings are characterized by a similar signal quality and a similar incidence of the MC and AO fiducial points; while it was observed a higher incidence of the AC and MO fiducial points, and an even higher incidence of beats with all four FPs identified (>+25%).
For both subjects PPVs were always >99%. This means that the precision of the tuned algorithms to correctly identify the FPs is comparable with that of the original algorithm applied to the astronaut data.
CONCLUSIONS -The results of this ancillary analysis provide evidence that the proposed algorithm may be tuned for the analysis of data of subjects different from the astronaut, with the only change of some threshold value without requiring any change in the algorithm structure. Although obtained from an extremely limited dataset, this finding excludes the hypothesis that our original algorithm was so tightly tailored on the SCG waveform of the astronaut to make it impossible the adaptation to any other subject with reasonable efforts. Obviously, the determination of the extent of the algorithm portability to a wider population and to different subgroups of subjects (classified by gender, age, body mass index, health status, etc.) is out of the scope of the present study and remains to be explored by a separate investigation.
A note on the workflow we used for the tuning. The design of the tuning procedure we adopted in this test was not optimized, thus it is possible that a better and faster tuning of the algorithm might be obtained by a more sophisticated and automated workflow.
As to the timing of the current tuning, the computation time of each iteration of the procedure took a couple of minutes, while the final determination of each new threshold value took 3-4 hours. However, it should be mentioned that most of the time spent for this ancillary analysis was not taken by the tuning procedure, but by our final verification of the correctness of the tuning obtained by the PPV estimation. Indeed, this task implied the visual check of 10% of the available data for each of the four FPs, for a total of (2,355+2,666)*4= 20,084 beats, and several days have been necessary for this validation.