| With the continuous improvement of social development and living standards,people pay more and more attention to their health.Heart rate,as an important human physiological parameter,is often used to assess physical health.Heart rate detection methods based on PPG signals are widely used in wearable devices due to their fast detection and low cost.However,the PPG signal intensity is weak,and it is easily disturbed by external noise when the human body is moving.Common wearable devices usually use low-cost microcontrollers,which are difficult to run complex anti-noise algorithms.The heart rate data detected by these devices during human movement is often inaccurate,incoherent,and lacks reference value.It needs to rely on high-performance devices such as mobile phones and computers to obtain more accurate heart rate data,which severely limits its application in sports scenarios.Therefore,it is of great practical significance to study a heart rate detection algorithm suitable for sports scenarios with low computational complexity,and to design a low-cost microcontroller system that can run the algorithm.After studying the heart rate detection algorithm and microcontroller system architecture,a lightweight four-stage anti-motion interference heart rate detection algorithm framework is proposed and a microcontroller system for heart rate sensor chip is designed.The system can accurately detect the heart rate from the PPG signal interfered by motion noise,no longer needs to rely on high-performance equipment,and reduces the system complexity and usage cost.The main research contents and innovations of this thesis are as follows:(1)In view of the high complexity of the existing anti-motion interference heart rate detection algorithms and difficult to run on low-cost microcontrollers,a lightweight fourstage heart rate detection algorithm framework is proposed.The algorithm framework uses LMS adaptive filter to replace the denoising algorithm with high computational complexity and improves the frequency domain heart rate detection algorithm.At the same time,a heart rate data smoothing post-processing algorithm is added,which has the characteristics of low computational complexity,high detection accuracy and good data consistency.(2)Aiming at the problem that the ARM core is not open-source and the licensing cost is high,it is proposed to use the open source RISC-V to replace it.The RISC-V core has the advantages of clear structure and easy function expansion,which can effectively reduce system cost and improve system scalability.(3)In view of the problem that it is difficult to run the algorithm directly due to the low operation efficiency of the kernel,the signal preprocessing module,the LMS adaptive filter module and the FFT hardware acceleration module are designed according to the principle of the algorithm.The operating efficiency of the algorithm in the microcontroller has been effectively improved.(4)Aiming at the different communication protocols used by various micro sensors required by the system and the slow transmission of sensor data by the core,a variety of functional peripherals are integrated on the microcontroller system through IP multiplexing.The sensor compatibility and internal data transmission efficiency of the microcontroller system are improved.In this thesis,the performance of the algorithm is verified on the public data set.The results show that the mean absolute error of this algorithm is 2.76 beats per minute,the Pearson correlation coefficient is 0.995,and 95.25% of the detection error is within the 95%consistency limit,which has good detection accuracy and data consistency.To verify the heart rate detection accuracy of the microcontroller system in the real motion scene,this thesis carries out heart rate detection experiments in the two motions.The experimental results show that in the swing arm walking scene,the maximum mean absolute error of heart rate detection is 4.78 beats per minute,and the maximum mean absolute percentage error is4.62%.In the constant speed jogging scene,the maximum mean absolute error of heart rate detection is 8.15 beats per minute,and the maximum mean absolute error percentage is6.92%.The Pearson correlation coefficient of the two motion scenes is 0.982,and 93.67%of the detection error is within the 95% consistency limit.The system has good detection accuracy and data consistency. |