# Adaptive Estimation Algorithm for Photoplethysmographic Heart Rate Based on Finite State Machine
## 3 Experiment and Results
### Experimental Results  
Some of the algorithms using the same dataset in the public dataset were selected for comparison, and the results are shown in Table 1. As a whole, the heart rate results calculated by the algorithm in this paper have an MAE of 0.93 bpm and a MAPE of 0.77%. Compared with other algorithms, this method demonstrates a higher level of accuracy. From the statistical results, it can be seen that all the algorithms have the worst results in the tenth dataset, in which the better performance of WFPV has a MAE of 2.06 bpm on this dataset, while the MAE of this paper's algorithm is 1.41 bpm. WFPV achieves denoising through Wiener filtering and refines the spectrum using a phase vocoder, which enhances the precision of spectral analysis and improves calculation accuracy. From Figure 11b, it can be seen that the algorithm shows better tracking in the early stage, but the calculation results in the 87 th and 100 th windows, which are strongly influenced by MA, deviate more. As shown in Figure 11a, the proposed algorithm removes the outliers as well as smoothes the curves through post-processing so that the heart rate in the vicinity of these two windows does not differ much from the true value, and the heart rate information can be better captured, even though a large deviation from the true value occurs in the 18 th window, which is in an unstable state due to significant motion artifacts. However, the algorithm employs adaptive spectral peak tracking, considering both the distance factor and spectral amplitude, enabling the tracking to quickly return to the true value. This reduces the long-term impact of motion artifacts on heart rate estimation, ensuring that the algorithm maintains high accuracy and stability even in dynamically changing environments. The proposed algorithm not only achieves higher overall accuracy but also demonstrates superior robustness in scenarios with significant motion artifacts. Figure 10: Signal acquisition devices. ECG signals the acquisition device on the left, and PPG signals the acquisition device on the right. In the self-test dataset, the open-source algorithms WFPV and SSR_Kalman were selected for comparison, and the comparison results are shown in Table 2. From the calculation results, the MAE of this paper's algorithm is the smallest, and the MAPE is slightly higher than that of SSR_Kalman. The WFPV algorithm demonstrates significant advantages in periodic motion scenarios but lacks robustness, resulting in poorer performance on certain datasets. The 8 th data set with the largest error in the calculation results of the algorithm in this paper is selected for comparison, as shown in Figure 12. Locally, WFPV and SSR_Kalman have better tracking. However, the proposed algorithm in this paper more effectively captures the overall trend of heart rate changes and maintains higher robustness in long-term heart rate estimation. This is due to the combination of adaptive spectral peak tracking and FSM, which help mitigate the effects of motion artifacts. Even in the presence of large motion artifacts or noisy data, it provides a more reliable representation of heart rate trends. Therefore, the proposed method provides more comprehensive and stable heart rate estimation in practical applications.