1. Introduction
The monitoring of oxygen saturation (SpO2) for premature babies carries Photo-plethysmograph (PPG) signals are widely used in monitoring patients’ oxygen saturation (SpO2) and Heartbeat Rate (HB), which are detected by pulse oximeters [1]. Due to the accuracy required by oxygen therapy for premature infants, PPG signals that carry high quality are essential to the monitoring of infants’ health conditions. Motion artifacts caused by patients’ physical movements, however, add obvious noise to the clean PPG signals in the long-term monitoring of premature babies’ SpO2 and HR. Newborn infants’ uncontrollable body movements can cause severe motion artifacts and affect the accuracy of measurement [2]. Such unavoidable imprecision can result in both overestimated and underestimated outcomes [3], leading to unreal alarms. Thus, to improve the quality of PPG signals during infants’ continuous health monitoring, efforts to remove motion artifacts from PPG signals have been made.
Through this paper, the development of artifact resistance techniques is comprehensively reviewed in section 2. Based on the review, the methodology of a Kalman filter-based algorithm that incorporates the use of both accelerator and gyroscope to eliminate motion artifacts is introduced in the third section, involving both the description of algorithms and related simulations. The results of this study simulations will be discussed in section 4.
Based on the results, the quality of PPG signals is ensured. Further improvement in medical monitoring for newborns can also be made. Medical workers will relatively have less stress inside the NICU. Additionally, the theory and work can be continuously used in health monitoring by providing a new method to design a multi-detector monitoring system involving adaptive adjustment.
2. Literature Review
This section reviews different means to remove motion artifacts from PPG signals. The efficiency of a multi-detector-based pulse oximeter to eliminate effects caused by patients’ physical movements is shown.
As proposed by Hertzman [4], the PPG signal carries great significance and popularity in today’s medical monitoring. Through years of development, imprecisions, such as different kinds of noises, can be resolved with both software and hardware methods. Lee et al. [5] successfully decreased the effects caused by baseline drift in SpO2 monitoring with the algorithm called adaptive threshold peak detection (ATPD). However, motion artifacts cannot be efficiently removed through ATPD. To tackle motion artifacts, Poets & Stebbens [6] used the Edentec Motion Annotation System to remove motion artifacts, while Cho et al. [7] utilized methods such as dual-trace detection, DC-level continuity monitoring, and St/Dt ratio analysis to ensure clean PPG signals in the presence of motion artifacts. Zahari et al. [8] developed an algorithm to deal with distribution patterns in SpO2 monitoring to eliminate motion artifacts. Banik et al. [9] built an algorithm in a wearable reflection-type pulse oximeter system to compensate for motion artifacts, and carefully designed light modules to improve their design. While these studies provided several practicable ways to decrease imprecision caused by motion artifacts, they focused solely on software solution without involving multi-detector design to provide reliable and meantime reference signals. Harrison et al. [10] proved that the adaptive noise cancellation algorithm (ANC), which involved other sensors like an accelerometer, efficiently corrects the contaminable PPG signal. However, ANC fails to remove motion artifacts if a close main frequency component to the heartbeat rate is contained by the motion artifacts. Wu et al. [11] used an accelerometer to design their pulse oximeter by directly removing intervals of PPG signals involving physical movements, but their software design was not powerful enough. ATPD, ANC, and adaptive spectrum noise cancellation approach (ASNC) were tested by Yang et al. [12], which showed accuracy and resistance to the effects of similar close main frequency component that makes ANC fail to gain clean PPG signals. However, the crucial filter of ASNC was simply LMS, which had a lack of more powerful and complicated algorithm design to handle complex noise. Lee et al. [13] compared the Kalman smoother to traditional filters, demonstrating its superior performance. However, they only used an accelerator to build the reference signal, which might cause incompleteness in the noise cancellation.
Based on the review, an accelerator and a gyroscope are added into the hardware design to improve the capability of the Kalman filter, providing a new approach to adaptively improve the quality of the PPG signal by removing motion artifacts.
3. Methodology
In this section, the design of the algorithm is completely introduced. The algorithm that improves the quality of the PPG signal is used to evaluate the HR. Related simulations are also done and explained.
3.1. Overall Structure
Figure 1 shows the complete process of the elimination of motion artifacts. It consists of three main parts: (1) Raw data collection and preprocessing; (2) adaptive filtering and (3) HR calculation and output.
Figure 1: Flow chart of the Kalman Filter based algorithm
Step 1: Raw data collection and preprocessing. Normally a pulse oximeter will detect a PPG signal through both red light and infrared light. Both raw PPG signals are collected in respect, and signals from the accelerator and the gyroscope are also detected. After the collection, all signals are smoothed by a sliding window. The size of the sliding window is 150, which is assumed to be nearly double of a normal person’s HR. A sliding window approach is employed to meticulously preserve the integrity of the original data and its physical features, which are crucial for the evaluation of results. Subsequent to the application of the sliding window, the square root of the signals obtained from the accelerometer and gyroscope is computed to ensure signal normalization.
Step 2: Adaptive filtering. This research uses accelerator and gyroscope signal magnitudes to create the reference signal, which is later used to adaptively adjust the Kalman filter so that the motion artifacts can be effectively removed. After filtering, filtered red light PPG signal and filtered infrared PPG signal are outputted.
Step 3: HR calculation and output. We first combine two filtered PPG signals by calculating their weighted mean value. Next, we use peak detection to calculate the heartbeat rate.
3.2. Adaptive Filtering and Related Calculations
As mentioned before, all signals will be preprocessed through a sliding window, which has a size of 150. For each signal, it is calculated by formula (1):
\( \hat{x}(t)=\frac{1}{N}\sum _{i=0}^{N-1}x(t-i)\ \ \ (1) \)
Where \( \hat{x}(t) \) is the smoothed signal, \( N \) is the window size, and \( x(t) \) is the raw state variable.
To normalize the acceleration signal, we take the square root to get the accelerator’s magnitude:
\( a=\sqrt[]{a_{x}^{2}+a_{y}^{2}+a_{z}^{2}}\ \ \ (2) \)
Where \( a \) is the acceleration magnitude, and \( {a_{x}} \) , \( {a_{y}} \) , and \( {a_{z}} \) respectively represent the components of acceleration vectors in three axels.
Similarly, the square root of angular momentum vectors of three axels are taken to get the angular magnitude \( g \) :
\( g=\sqrt[]{g_{x}^{2}+g_{y}^{2}+g_{z}^{2}}\ \ \ (3) \)
Values of \( a \) and \( g \) play a role in adaptively adjusting the parameters of the Kalman filter by (1) increasing the process noise covariance \( Q \) to the value of \( 1e-4 \) and the measurement noise covariance \( R \) to 0.05, if at least one of \( a \) or \( g \) is greater than or equal to 1.5; (2) decreasing \( Q \) to \( 1e-5 \) and \( R \) to 0.01 if both \( a \) and \( g \) are less than 1.5.
Kalman filter is designed to estimate and update \( x (t) \) to build clean signal. Formula (4) and (5) estimates the state variable:
\( \hat{x}(t|t-1)=A∙x(t-1)+B∙u(t)\ \ \ (4) \)
\( P(t|t-1)=A∙P(t-1)∙{A^{T}}+Q\ \ \ (5) \)
Where \( A \) is the state transition matrix, \( B \) is the control matrix, \( u(t) \) represents the control input, P is the error covariance, and Q is the process noise covariance. To update the estimate PPG signal:
\( K(t)={P(t|t-1)∙{C^{T}}∙(C∙P(t|t-1)∙{C^{T}}+R)^{-1}}\ \ \ (6) \)
\( x(t)=\hat{x}(t|t-1)+K(t)∙(z(t)-C∙\hat{x}(t|t-1))\ \ \ (7) \)
\( P(t)=(I-K(t)∙C)∙P(t|t-1)\ \ \ (8) \)
Where \( K(t) \) is the Kalman Gain, \( z(t) \) is the observation value, \( R \) is the measurement noise covariance, \( I \) is the identity matrix, and \( C \) represents the measurement matrix.
By adaptively using the Kalman filter to eliminate motion artifacts, two PPG signals are calculated by weighted mean and combined:
\( {ppg_{combined}}(t)=α∙{ppg_{1}}(t)+(1-α)∙{ppg_{2}}(t)\ \ \ (9) \)
Where \( {ppg_{1}}(t) \) and \( {ppg_{2}}(t) \) respectively represent the red-light PPG signal and the infrared-light PPG signal. \( α \) is the weighting coefficient. The value of \( α \) can be adjusted based on the patients’ physical characteristics (i.e., colour of skin) or the quality of signals, but it is assumed that patients’ physical characteristics have no effect to the HR measurement, and \( α \) exactly equals to 0.5.
Finally, combined PPG signal are used to calculate HR through peak detection:
\( {HR_{PPG}}=\frac{60}{mean({T_{peak}})}\ \ \ (10) \)
Where \( {T_{peak}} \) is the time interval between adjacent peaks.
3.3. Simulation
Database published by Mehrgardt et al. at PhysioNet provides PPG and ECG signals monitoring when patients are sitting, walking, and running, along with simultaneous accelerator and gyroscope signals. In this simulation, 5 cases of data of walking and running are chosen.
The algorithm is designed on MATLAB 2021a, and this paper employs built-in functions (i.e., std for calculating standard deviation) to calculate three evaluations, including absolute error, relative error, and standard deviation (SD), by assuming the HR calculated by ECG signal is the patients’ real HR. The process can be represented as:
\( Abs Error=|{HR_{PPG}}-{HR_{ECG}}|\ \ \ (11) \)
\( Rel Error=\frac{Abs Error}{{HR_{ECG}}}×100\%\ \ \ (12) \)
\( σ=\sqrt[]{\frac{1}{N}\sum _{i=1}^{N}{({e_{i}}-μ)^{2}}}\ \ \ (13) \)
Where \( σ \) is the SD, \( {e_{i}} \) is the error within each window, \( μ \) is the average value of errors, and \( N \) is the number of errors.
4. Results and Discussion
Figure 2: Signals detected during the elimination
Figure 2 (a) shows the results of the sliding window. Both PPG signals become smoother after the preprocessing. Although the smoothed signals still carry noises, the physical characteristics are greatly protected.
Figure 2 (b) represents the HR estimation errors during the Kalman filtering. Relatively high density and degree of errors are reasonable since the patients are having intense physical movements. Those errors are recorded by the Kalman filter and are later used to update the estimated PPG signal and build clean PPG signals.
Figure 2 (c) compares the filtered PPG signal with the raw data. Despite some incompatibilities, the physical information is well represented, and the signal is greatly smoothed. The accuracy of later HR calculations is ensured.
Table 1: Results and errors of the algorithm compared to the HR calculated by ECG signal
\( {HR_{ECG}} (BPM) \) | \( {HR_{PPG}} (BPM) \) | \( Abs Error (BPM) \) | \( Rel Error \) | \( SD (BPM) \) | |
Case 1 | 102.38 | 101.10 | 1.28 | 1.25% | 7.27 |
Case 2 | 92.76 | 92.67 | 0.08 | 0.09% | 7.32 |
Case 3 | 101.44 | 97.78 | 3.66 | 3.61% | 10.78 |
Case 4 | 75.70 | 73.48 | 2.22 | 2.93% | 15.57 |
Case 5 | 98.33 | 97.14 | 1.19 | 1.21% | 5.90 |
Table 1 shows the HR calculation and the error of the algorithm completely. On average, the algorithm has an absolute error of 1.69 BPM, a relative error of 1.82%, and an SD of 9.37 BPM. According to [12], the traditional ATPD algorithm has an absolute error of 2.29 BPM and a relative error of 8.38%, and the ANC approach has an absolute error of 1.79 BPM and a relative error of 2.02%. The Kalman filter-based algorithm shows higher accuracy in both absolute and relative error calculation, reflecting that the approach works well to eliminate motion artifacts and successfully measure accurate HR by improving the quality of PPG signals.
The relatively high SD, however, reflects the instability in the approach. This could be improved through a more complete preprocess and a more specific method to combine PPG signals.
5. Conclusion
In this paper, the Kalman filter is improved by using the accelerator and the gyroscope to remove motion artifacts from the PPG signal. The algorithm contains three main steps: data collecting and preprocessing, adaptive Kalman filtering, and HR calculation.
The algorithm in this study is tested through simulation. On average, it has an absolute error of 1.69 BPM, a relative error of 1.82%, and a SD of 9.37 BPM. Through the comparison with traditional ATPD and ANC approaches, the algorithm has relatively higher accuracy and acceptable stability.
The issue of motion artifacts caused by a newborn’s uncontrollable physical movement can be reduced. Higher security of premature infants and lower working pressure of medical workers are reached. To consider the varying economic capacities of users, complex machine learning models were excluded, resulting in reduced costs but slightly higher errors. Future research could focus on developing cost-effective ways to incorporate accelerometer and gyroscope-based modeling, as well as refining the algorithm to improve the quality of PPG signals further while maintaining affordability in medical devices.
References
[1]. Majumder, S., Mondal, T., Deen, M.J. (2017) Wearable sensors for remote health monitoring. J. Sensors, 130: 1-45.
[2]. Brostowicz, H.M., Rais-Bahrami, K. (2010) Oxygen saturation monitoring in the Neonatal Intensive Care Unit (NICU): Evaluation of a new alarm management. J. Neonatal-Perinatal Med, Vol. 3: 201-205.
[3]. Subhagya D.S., Keshava. M.C., Aruna N., Janardhan, L., Ramakrishna H.S. (2017) Case study on measurement of SpO2 from PPG signals in the presence of motion artifacts. In: International Conference on Recent Advances in Electronics and Communication Technology. pp. 318-323.
[4]. Hertzman, A.B. (1938) The blood supply of various skin areas as estimatedby the photoelectric plethysmograph. J. Physiol.-Legacy Content,vol. 124, no. 2: 328–340.
[5]. B.-L. Lee, B.-L. Lee, W.-Y. Chung, (2015) Smartwatch-based driver alert-ness monitoring with wearable motion and physiological sensor, in Proc.37th Annu. Int. Conf. IEEE Eng. Med. Biol. Soc., vol. 1., pp. 6126–6129.
[6]. Poets, C.F., Stebbens, V.A. (1997) Detection of movement artifact in recorded pulse oximeter saturation. J. EUROPEAN JOURNAL OF PEDIATRICS.,156 (10): 808-811.
[7]. Cho, J.H., Kim, J.C., Yoon, G.W. (2014) Robust design of pulse oximeter using dynamic control and motion artifact detection algorithms. J. JOURNAL OF ELECTRICAL ENGINEERING & TECHNOLOGY., Vol. 5: 1780-1787.
[8]. Zahari, M., Lee, D.S., Darlow, B,A. (2016) Algorithms that eliminate the effects of calibration artefact and trial-imposed offsets of Masimo oximeter in BOOST-NZ trial. J. Clin Monit Comput., 30(5): 669-78.
[9]. Banik, P.P., Hossain, S., Kwon, T., Kim, H., Kim, K. (2020) Development of a wearable reflection-type pulse oximeter system to aquire clean PPG signals and measure pulse rate and SpO2 with and without finger motion. J. Electronics., Vol. 9.
[10]. Harrison, W., Lim, J., Singer, E. (1986) A new application of adaptive noise cancellation. J. IEEE TRANSACTIONS ON ACOUSTICS SPEECH AND SIGNAL PROCESSING., Vol 34: 21-27.
[11]. Wu, C.H., Lee, J.H., Yang, C.C.H. (2020) Improving the diagnostic ability of the sleep apnea screening system based on oximetry by using physical activity data. J. JOURNAL OF MEDICAL AND BIOLOGICAL ENGINEERING., Vol. 40: 858-867.
[12]. Yang, D., Cheng, Y.Q., Peng, Y.H. (2018) A novel adaptive spectrum noise cancellation approach for enhancing heartbeat rate monitoring in a wearable device. J. IEEE ACCESS., Vol. 6: 8364-8375.
[13]. Lee, B., Han, J., Yi, W.J. (2010) Improved elimination of motion artifacts from a photoplethysmographic signal using a Kalman smoother with simultaneous accelerometry. J. PHYSIOLOGICAL MEASUREMENT., Vol. 32: 1585-1603.
Cite this article
Ao,W. (2025). Enhancing Kalman Filter Performance for PPG Signal Denoising: Adaptive Integration of Accelerometer and Gyroscope Data. Applied and Computational Engineering,133,142-148.
Data availability
The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.
Disclaimer/Publisher's Note
The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of EWA Publishing and/or the editor(s). EWA Publishing and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
About volume
Volume title: Proceedings of the 5th International Conference on Signal Processing and Machine Learning
© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and
conditions of the Creative Commons Attribution (CC BY) license. Authors who
publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons
Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this
series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published
version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial
publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and
during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See
Open access policy for details).
References
[1]. Majumder, S., Mondal, T., Deen, M.J. (2017) Wearable sensors for remote health monitoring. J. Sensors, 130: 1-45.
[2]. Brostowicz, H.M., Rais-Bahrami, K. (2010) Oxygen saturation monitoring in the Neonatal Intensive Care Unit (NICU): Evaluation of a new alarm management. J. Neonatal-Perinatal Med, Vol. 3: 201-205.
[3]. Subhagya D.S., Keshava. M.C., Aruna N., Janardhan, L., Ramakrishna H.S. (2017) Case study on measurement of SpO2 from PPG signals in the presence of motion artifacts. In: International Conference on Recent Advances in Electronics and Communication Technology. pp. 318-323.
[4]. Hertzman, A.B. (1938) The blood supply of various skin areas as estimatedby the photoelectric plethysmograph. J. Physiol.-Legacy Content,vol. 124, no. 2: 328–340.
[5]. B.-L. Lee, B.-L. Lee, W.-Y. Chung, (2015) Smartwatch-based driver alert-ness monitoring with wearable motion and physiological sensor, in Proc.37th Annu. Int. Conf. IEEE Eng. Med. Biol. Soc., vol. 1., pp. 6126–6129.
[6]. Poets, C.F., Stebbens, V.A. (1997) Detection of movement artifact in recorded pulse oximeter saturation. J. EUROPEAN JOURNAL OF PEDIATRICS.,156 (10): 808-811.
[7]. Cho, J.H., Kim, J.C., Yoon, G.W. (2014) Robust design of pulse oximeter using dynamic control and motion artifact detection algorithms. J. JOURNAL OF ELECTRICAL ENGINEERING & TECHNOLOGY., Vol. 5: 1780-1787.
[8]. Zahari, M., Lee, D.S., Darlow, B,A. (2016) Algorithms that eliminate the effects of calibration artefact and trial-imposed offsets of Masimo oximeter in BOOST-NZ trial. J. Clin Monit Comput., 30(5): 669-78.
[9]. Banik, P.P., Hossain, S., Kwon, T., Kim, H., Kim, K. (2020) Development of a wearable reflection-type pulse oximeter system to aquire clean PPG signals and measure pulse rate and SpO2 with and without finger motion. J. Electronics., Vol. 9.
[10]. Harrison, W., Lim, J., Singer, E. (1986) A new application of adaptive noise cancellation. J. IEEE TRANSACTIONS ON ACOUSTICS SPEECH AND SIGNAL PROCESSING., Vol 34: 21-27.
[11]. Wu, C.H., Lee, J.H., Yang, C.C.H. (2020) Improving the diagnostic ability of the sleep apnea screening system based on oximetry by using physical activity data. J. JOURNAL OF MEDICAL AND BIOLOGICAL ENGINEERING., Vol. 40: 858-867.
[12]. Yang, D., Cheng, Y.Q., Peng, Y.H. (2018) A novel adaptive spectrum noise cancellation approach for enhancing heartbeat rate monitoring in a wearable device. J. IEEE ACCESS., Vol. 6: 8364-8375.
[13]. Lee, B., Han, J., Yi, W.J. (2010) Improved elimination of motion artifacts from a photoplethysmographic signal using a Kalman smoother with simultaneous accelerometry. J. PHYSIOLOGICAL MEASUREMENT., Vol. 32: 1585-1603.