## 4 Results and Discussion
### Automatic Identification of S1 and S2 Heart Sounds  
To test the performance of the proposed smart stethoscope for automatic identification of S1 and S2 heart sounds using the developed algorithm based on PPG signal reference, the measured PCG signals were interpreted by the developed algorithm to compare with the envelogram-calculation approach commonly used to find the boundaries of S1 and S2 heart sounds. One cardiac cycle is equal to one set of S1 and S2 heart sounds, as well as to one cycle of PPG signals. Therefore, the measured PPG signals were designated as the basis from which to calculate the heart rates of each subject and to predict the number of cardiac cycles first. As shown in Figure 11, the average heart rates of the 20 subjects measured by the prototype device and by MP160 were 68.3 \(\pm\) 3.2 bpm and 69.2 \(\pm\) 5.2 bpm, respectively. The Wilcoxon paired-samples test showed that two data points were similar (\(p\) = 0.736). Thus, the predicted total number of S1 and S2 heart sounds was set as 138 for each subject in this experiment. Based on the detected PCG signals, the total number of S1 and S2 heart sounds as calculated by the envelogram approach is shown in Figure 12. The sum totals of S1 and S2 heart sounds were 132.6 \(\pm\) 5.27 as PCG signals measured by the prototype device, and 138.4 \(\pm\) 8.32 as PCG signals measured by the MP160. The PCG signals measured by the prototype device were also imported as raw data into BIOPAC's AcqKnowledge software for signal segmentation under the same conditions as the experiments, and the resulting sum totals of the prototype device were less than those of the MP160, which was assumed to be due to the resolution of the proposed device's microphone sensor being lower than that of the MP160's acoustic transducer, causing PCG signals to be detected with \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Signal Group**} & \multicolumn{2}{c}{**Heart Sounds**} & \multicolumn{2}{c}{**PPG Signals**} \\ \cline{2-5}  & **Mean** & **Std.** & **Mean** & **Std.** \\ \hline Original & 0.98 & 0.02 & 0.96 & 0.03 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Cross-correlation values for heart sounds and PPG signals measured by the prototype device and the MP160. Figure 11: Boxplot of similarity analysis with Wilcoxon paired-samples test for heart rates of 20 subjects measured by the prototype device and the MP160. lower amplitudes. These problems were also reported in several studies for automatic identification of S1 and S2 heart sounds based on the envelogram approach with no physiological signal reference [26; 27; 28]. To improve the accuracy of heart-sound detection and distinguish S1 and S2 heart sounds, we attempted automatic S1 and S2 heart sound identification for one subject using the developed algorithm based on calculating the time interval between peaks of the PPG signals and start-points of the heart sounds (Figure 13). First, the detected PCG signal and PPG signal were combined in the same time domain to observe the relationship between the heart sounds and PPG signals. Second, the positive peaks of the PPG signals for each cycle were detected and the start-points of the heart sound variation were calculated simultaneously. Finally, using the identification rule as developed and mentioned in Section 2, the start-points of S1 and S2 heart sounds that referred to the time of the PPG signal's peak were identified. Figure 13 shows the heart sounds interpreted by the developed algorithm to identify the start-points of S1 and S2 heart sounds. The number of start-points of heart sounds detected by the developed algorithm was 138.2 \(\pm\) 7.8, which was higher than the results acquired by the envelogram approach with no PPG signal reference. In addition, the accuracy of heart-sound detection was increased to 98%, which was close to the results acquired by the MP160 with a small difference error (\(p\) = 0.840), as shown in Figure 14a.