Continuous blood oxygen estimation using PPG based on VMD

Existing photoplethysmography(PPG) signal is extremely susceptible to interference from baseline drift, and the training interval of traditional algorithms is basically fixed between 80% and 100%, which leads to the low accuracy of blood oxygen detection, especially in patients with severe hypoxemia. Based on the PPG acquisition system developed by ourselves, we use moving average filtering and variable mode decomposition(VMD) to remove high-frequency and baseline drift interference, and use the 30%-100% SpO2 data interval of the Fluke ProSim8 vital signs simulator as the SpO2 algorithm guarantee. Finally, the paper proposed a continuous blood oxygen saturation measurement algorithm based on VMD. The final experimental results show that in the five types of patient data of the simulator, high-precision measurement can be ensured in the normal SpO2 range and in the low SpO2 or even ultra-low SpO2 range; at the same time, the sensitivity of the algorithm to SpO2 is better than that of the reference oximeter. The response speed is faster; finally, in the process of detecting simulated apnea, compared with the reference oximeter, the error of the blood oxygen saturation in the stable interval is ±1, the error of the lowest SpO2 is ±3, and the calculated consistency of the blood oxygen reduction duration reaches 89.10%.


Introduction
Clinical equipment plays a vital role in diagnosing and monitoring human health. As one of the important parameters of a person's health, blood oxygen saturation is receiving more and more attention. PPG is a non-invasive method that can continuously sense breathing, blood oxygen saturation, and heart rate. PPG sensors are small in size, simple to operate, portable, and relatively low-cost, and can be implemented in wearable devices. However, the PPG signal is mainly affected by noise, baseline drift and ambient light. The calculation of blood oxygen saturation requires the calculation of the characteristic value R, and the characteristic value R is affected by the amplitude of the PPG signal, so how to minimize the influence of interference becomes an improvement key to the accuracy of blood oxygen saturation. The method of obtaining a clean PPG signal mainly includes fast Fourier transform, moving average filter, wavelet transform and independent quantity analysis and other methods [1,2]. However, in addition to FFT, other methods need to be built on complex system resources, which are generally applied to offline calculations and cannot be conveniently applied to real-time calculations. Mohan PM et al. used adaptive noise cancellation (ANC) technology to obtain a clean PPG signal. With the aid of an accelerometer, the error of calculating blood oxygen saturation is within the range of 0.1% to 1.01% [3]. J.I. Rodriguez-labra et al. used multiple sensors to fuse and collect the PPG signal of the foot, and used a machine learning model to predict blood oxygen saturation with a root mean square of 0.07 and an accuracy of 99.5% [4] device to obtain a clean PPG signal through circuit design, and compared the blood oxygen calculated under the interference of three types of motion artifacts, and the calculation accuracy reached 98.96% [5]. The model algorithm used in most papers is basically between 85-100%, which covers a small range and is not enough to include special groups. This article proposes a continuous blood oxygen measurement method based on VMD, which has a wide coverage and fast response speed, and can be applied to the analysis of blood oxygen-related diseases at the same time.

Method framework
The basic flow of the blood oxygen algorithm in this paper is mainly divided into four parts: Raw PPG signal acquisition, Signal preprocessing, The calculation of DC and AC values and characteristic values R, SpO 2 calculation.

Raw PPG signal acquisition
The system uses the STM32H743IIT6 single-chip microcomputer as the control chip, which can meet the requirements of real-time high-sampling, high-precision and high-speed transmission. The sampling frequency is set 500HZ through a large number of experiments, which makes the collected pulse wave information more accurate and detailed, so that makes the blood oxygen calculation more accurate. Using the AFE4490 analog front end, which integrates signal transmission, analog-to-digital conversion, and filter circuits, effectively solves the defects of signal distortion caused by traditional discrete design and realizes the portability of the device. NELLCOR's DS100A sensor is used as a pulse wave acquisition sensor.

Signal preprocessing
The signal mainly contains high frequency and baseline drift interference. Since the PPG signal is mainly concentrated in the signal around 1Hz-5Hz, common methods to remove high-frequency interference include low-pass filter, moving average filter, and FIR filter. Here we use moving average filtering to remove high-frequency interference and smooth the signal. The baseline drift is mainly distributed in 0Hz-0.7Hz, which is caused by human breathing jitter or environmental factors. Common effective methods to remove baseline drift include wavelet transform, empirical mode decomposition(EMD) and other methods. Wavelet transform is relatively troublesome in the method of selecting wavelet base and threshold parameters, and the selection of wavelet base and the determination of threshold will directly affect the authenticity of the signal. Although the EMD algorithm solves the problem of wavelet transform, the method often appears in the non-stationary signal processing the state of modal aliasing, which leads to signal distortion. In view of the above problems, this article uses VMD to remove baseline drift. method.
VMD is an adaptive and completely non-recursive modal variation and signal processing method proposed by Dragomiretskiy et al. in 2014 [6]. This technology has the advantage of being able to determine the number of modal decompositions. Its adaptability lies in determining the number of modal decompositions of a given sequence according to the actual situation, and it can adaptively match the number of modal decompositions in the subsequent search and solution process. Optimal center frequency and limited bandwidth, and can achieve effective separation of intrinsic modal components (IMF), signal frequency domain division, and then obtain effective decomposition components of a given signal, and finally obtain the optimal solution of the variational problem.
Assuming that the original acquired signal is f, the constraint expression of the variational model is: where, μ = , … represents the K modal components after decomposition, = , … represents the center frequency of each modal component, ∑ = ( ) represents the constraint condition, that is, the sum of all modes is equal to the original signal.
Introducing the quadratic penalty factor α and Lagrange multiplication operator σ(t) to better solve the above-mentioned optimal solution of variational constraints, where α is a sufficiently large positive number, which can guarantee the accuracy of signal reconstruction under the influence of Gaussian noise , σ(t)is the constraint condition to maintain strictness, and the extended Lagrange expression is as follows: This paper uses VMD method to remove the detailed steps of pulse wave baseline drift as follows: a) Set the PPG signal decomposition layer number K = 8 based on the decomposition of the pulse wave signal with the baseline drift b) Perform K-layer VMD decomposition of the detected PPG signal to obtain K modal components c) Determine the modal component corresponding to the baseline drift interference d) Remove the modal components confirmed in the step c, and reconstruct the remaining modalities to obtain a clean PPG signal with the baseline drift removed.
The comparison chart of the results before and after the original signal processing is shown in figure 1.

The calculation of DC,AC and R
According to the Lambert-Beer law, the formula for calculating the characteristic value R and SpO 2 can be derived: where, I and I are respectively the measured AC and DC values of the reflected light intensity of light with a wavelength of num nanometers, ε 、 ε 、 ε and ε are all constants related to the human body and can be ignored. It can be seen that the calculation of SpO 2 is only related to the characteristic value R, but in actual measurement, because biological tissue is a complex tissue with strong scattering, weak absorption, and anisotropy, it is often necessary to use the empirical formula calibration curve method to determine the mapping relationship between R and SpO 2 . With the calibration curve, the calculation of SpO 2 can be performed, which is the fourth step.
This article defines that the pulse wave collected is calculated by sliding window method every 4s window, and the DC value is the average value of the pulse wave baseline in the window: where represents the sampling point corresponding to the PPG at the current moment, and represents the amplitude corresponding to the baseline.
The AC value is the fluctuation size of the pulse wave in the window: where represents the amplitude of the pulse wave after removing the baseline drift.

Experimental results
The experimental PPG acquisition equipment in this article is a self-built acquisition system, and the control blood oxygen equipment: BERRY-2000A oximeter. The experimental objects are Fluke ProSim8 vital signs simulator and humans.

Calibration of R-SpO 2 relationship
The PPG signal of different blood oxygen saturations of the Fluke vital sign simulator is collected by a self-built pulse wave acquisition system. The SpO 2 range covers 30%-100%. The R value is used as the independent variable, and the corresponding SpO 2 value is used as the dependent variable to find the mapping between the two relationship. The calibration curve is shown in the figure 2.  The accuracy of blood oxygen saturation in the 90-100% interval is as high as 100%, the error rate in the 75-90% interval is 1%, and the error rate in the 50-75% interval is only 2%~3%. The error rate of blood oxygen saturation below 50% is 4%, that is, the error rate of each item is within a reasonable range.

Algorithm response speed.
In order to test the response speed of the algorithm to the drop of blood oxygen, this paper collects the data of the sharp drop of blood oxygen from the simulator, and compares and analyzes it with the trend chart of the reference blood oximeter. First, take the 10s stable interval blood oxygen, the blood oxygen is greatly reduced, refer to the oximeter and the algorithm of this paper to calculate the blood oxygen to restore the simulator blood oxygen, and then take the recovery data from low blood oxygen to high blood oxygen. The comparison chart during the fall is shown in the figure 4.The is defined as the time from the highest blood oxygen to the lowest blood oxygen, and the is the time from the lowest blood oxygen to the highest blood oxygen. The statistics results are shown in the table 1.  It can be seen from the figure 4 and table 1 that although the data output of the simulator is abrupt, the response speed of the algorithm in this paper to changes in blood oxygen is better than that of the reference oximeter. The response time of falling is shortened by 41.60% on average, and the response time of rising is shortened on average 42.98%.

Algorithm application.
The experimental testers were 5 people in the same laboratory, of which 1 was a female and 4 were males. Since the behavior of artificial holding of breath will cause the SpO 2 value to decrease after a period of delay, this experiment uses artificial holding of breath to test and verify the applicability of the algorithm. The tester started to hold his breath after breathing normally for 20 seconds. After the maximum holding time, the tester continued to collect 40s time data so that the Spo 2 value could rise. The comparison of the SpO 2 curves of 3 of them is shown in the figure 5. It can be seen from the figure 5 that the blood oxygen trend of the algorithm in this paper is similar to that of the reference oximeter, and can more quickly reflect changes in SpO 2 . This paper selects  It can be seen from the table 2, based on the comparison between the blood oxygen curve related indicators obtained by the acquisition device and the algorithm simulation pause and the Berry blood oximeter, the blood oxygen saturation error in the stable interval is ±1, and the minimum blood oxygen error is ±3, the calculated coincidence degree of oxygen reduction time reached 89.10%.

Conclusion
In this paper, VMD is used to find the baseline of the pulse wave, which is different from the wavelet transform that requires different wavelet bases and the disadvantages of modal aliasing in the EMD method. It does not affect the true information of the pulse wave on the basis of removing the baseline drift. This method can perfectly embed the continuous in the blood oxygen calculation, the data set of the simulator covers a wide range, which makes the blood oxygen calibration equation more suitable for high-precision blood oxygen detection in a variety of situations. At the end of the article, the applicability of the algorithm in the case of apnea is discussed, and the algorithm and the acquisition system can be used in the subsequent evaluation of obstructive sleep apnea hypopnea syndrome or other related diseases.