# Adaptive Estimation Algorithm for Photoplethysmographic Heart Rate Based on Finite State Machine
## 1 Introduction  
With the continuous development of wearable and sensor technologies, a large number of wearable devices have emerged by virtue of real-time monitoring and location-independent advantages. These devices enable users to focus on their health and provide a foundation for personalized medical treatment [1, 2]. Among them, PPG signals for detecting the amount of blood volume change in blood vessels have been widely used in commercial medical devices as well as wearable devices like smartwatches for measuring physiological parameters such as heart rate, oxygen saturation, and blood pressure [3, 4, 5]. Although PPG overcomes the discomfort caused by the need to be tightly attached to the skin in the traditional way, it is highly sensitive to motion during the measurement process, and even slight movements can produce MA, leading to a decrease in the quality of the PPG signal and thus affecting the accuracy of the measurement [6]. In recent years, the morbidity and mortality of cardiovascular diseases have been increasing, and early identification and intervention are of great significance in curbing the increasing trend, which makes researchers pay more attention to heart rate monitoring [7]. For the problem of how to remove MA from PPG signals so as to extract heart rate effectively, researchers have also proposed some methods, mainly adaptive filtering, empirical mode decomposition (EMD), wavelet transform (WT), and singular spectrum analysis (SSA). [PERSON] et al. [8] proposed a combination of adaptive filters using a single noise reference signal (CASINOR). The acceleration signal in one direction is selected as the reference signal for RLS and normalized least mean square (NLMS) filtering based on the power value, then it is combined into a single signal using a sigmoid function, and then it is finally combined with a phase vocoder for heart rate estimation. This algorithm saves computational time and achieves a certain level ofaccuracy. [PERSON] [9] presented the WFPV algorithm, which combines Wiener filtering and a phase vocoder with refined frequencies, and the method shows good results on publicly available datasets. [PERSON] et al. [10] computed the heart rate under exercise conditions by singular spectrum reconstruction (SSR) and Kalman (hereafter referred to as SSR_Kalman), and denoising was achieved according to the maximum uncorrelation criterion between valid and noisy signals. [PERSON] et al. [11] proposed a heart rate calculation method based on FSM. The crest factor (CF) of the spectrogram after MA removal, along with the heart rate change among consecutive windows, serves as the primary criteria for determining the current window's state. The heart rate values are extracted only in the stable state, while those from other states are discarded, thereby improving accuracy. A single denoising method can present better results for some noises, but it is not robust, making hybrid denoising a viable alternative [12]. [PERSON] et al. [13] performed PPG denoising based on the ensemble empirical mode decomposition (EEMD) and wavelet threshold filtering. The combination of these two ways can effectively avoid the misjudgment caused by the noise-dominated state. The results indicate that this method can maximally retain the nonlinear and non-smooth characteristics of the PPG signal. [PERSON] [14] introduced a joint application of the cascaded RLS and the complete ensemble empirical mode decomposition with adaptive noise (CEEMDAN) algorithm to remove motion artifacts and improved the spectral peak tracking algorithm by optimizing support vector machine (SVM) based on grey wolf optimization (GWO). The above algorithms use signal sparsification and filtering of useful signals to calculate the heart rate, which can achieve certain results but still have shortcomings. Among them, CASINOR cannot avoid the dependence on the accuracy of the reference signal when using adaptive filtering for denoising.