# Adaptive Estimation Algorithm for Photoplethysmographic Heart Rate Based on Finite State Machine
## 4 Conclusions  
In order to reduce the influence of motion artifacts and improve the accuracy of heart rate estimation, this algorithm adds RLS filtering and EWT for denoising on the basis of the FSM framework while incorporating adaptive spectral peak tracking. The comparison results from the public dataset and the self-measurement dataset show that the algorithm in this paper further improves the accuracy of heart rate calculation and has a certain degree of anti-interference ability. Compared with other algorithms, this paper's algorithm improves the stability of the algorithm by introducing the FSM to evaluate the reliability of the historical heart rate and selecting appropriate heart rate search rules for each state. Although our algorithm has some advantages in computational accuracy and anti-interference, it still has some limitations. First, the PPG signal is susceptible to random noise introduced by ambient light and other electromagnetic interference signals during the acquisition process. Furthermore, the placement of the sensor can also have an impact on the quality of the PPG signal because of the differences in sensitivity to the volumetric fluctuations of blood in different parts of the body [20]. All these factors affect the performance of the algorithm. To address these challenges, future research can improve the sensor design in terms of hardware, as well as optimize the preprocessing process of the algorithm to suppress noise more effectively and improve the robustness of the algorithm. Furthermore, while FSM enables the algorithm to better adapt to motion artifacts of varying degrees, it has inherent limitations due to its reliance on historical values. This reliance may result in insufficient adaptability when encountering unknown or unpredictable scenarios. Therefore, further testing with more diverse datasets is crucial to assess the algorithm's performance across a broader range of real-world conditions. In future work, we plan to enhance data diversity by incorporating scenarios such as office and daily life activities. We will also collect data from various age groups, genders, and body types to ensure the algorithm's robustness. Additionally, introducing more state transition conditions to \begin{table}
\begin{tabular}{c c c c} \hline  & **WFPV [9]** & **SSR_Kalman [10]** & **Proposed** \\ \hline
1 & 3.12 (3.79\%) & 2.23 (2.70\%) & 1.95 (2.35\%) \\
2 & 1.12 (1.26\%) & 1.18 (1.34\%) & 1.40 (1.59\%) \\
3 & 2.09 (1.93\%) & 2.36 (2.22\%) & 2.07 (1.95\%) \\
4 & 0.93 (0.76\%) & 1.84 (1.51\%) & 1.53 (1.29\%) \\
5 & 2.27 (1.94\%) & 1.28 (1.12\%) & 1.42 (1.28\%) \\
6 & 1.73 (2.26\%) & 1.21 (1.29\%) & 1.50 (1.60\%) \\
7 & 1.01 (1.06\%) & 1.30 (1.75\%) & 1.65 (2.23\%) \\
8 & 2.80 (3.53\%) & 2.72 (3.49\%) & 2.56 (3.28\%) \\ Average & 1.88 (2.07\%) & 1.77 (1.93\%) & 1.76 (1.95\%) \\ \hline \end{tabular}
\end{table} 
Table 2: Comparison of MAE and MAPE results for the self-test dataset. Figure 12: Comparison of results of different algorithms for calculating heart rate for the eighth set of data. handle various situations and employing more complex models, such as advanced neural networks, could help extract richer data features and enable the algorithm to adapt more effectively to different situations. Conceptualization, T.L. and J.Z. ; methodology, T.L. ; software, T.L. ; validation, T.L., Y.B. and D.H.; investigation, T.L. and Y.B. ; resources, D.H. and J.Z. ; writing--original draft preparation, T.L. ; writing--review and editing, T.L. and J.Z. ; project administration, J.Z. All authors have read and agreed to the published version of the manuscript. This research was funded by the National Key R&D Program of China, grant number 2023 YFC3604804, and the Key R&D Program of Jiangsu Province, grant number BE2022064-2. The study was conducted in accordance with the Declaration of Helsinki and approved by the Ethics Committee of the People's Hospital of SND (protocol code 2024-021 and date of approval: 15 March 2024).