Elimination of Motion Artifacts in Signal of Photoplethysmography Sensor

motion artifacts were created using two types of finger movements: random finger shaking and rapid finger shaking. In this study, research results included the waveforms of the filtered PPG signals in the frequency and time domains, independent ingredients after the separation of independent components, and the measurements of the heart rate.


Introduction
With the improvements of living standards and the advancements of medical equipment and technology, the average life expectancy of the general population will continue to rise. According to the year-end analysis of the demographic structure annually conducted by the Statistics Division of the Ministry of the Interior in Taiwan, (1) an aging population means a drop in average death rate. According to the statistics of the cause of death provided by the Ministry of Health and Welfare in Taiwan, (2) heart disease was the fourth leading cause of death in 1996. The death rate due to heart disease has increased annually from 1996 to 2021, and in 2012, it had become the second leading cause of death. This information suggests that although medical technology has increased the average life expectancy in Taiwan, it has not reduced the mortality rate linked to heart disease. To reduce the mortality rate, preventive measures must be taken against heart disease. The probability of heart disease can be effectively reduced by constantly monitoring physical health. Therefore, the instantaneous monitoring of physiological information is extremely beneficial for maintaining health.
Among the methods used to monitor physiological information, photoplethysmography (PPG) and electrocardiography (ECG) are the most well known. These measurement methods are noninvasive and harmless to the human body. Devices based on PPG for the measurement and immediate monitoring of physiological information are preferred over those based on ECG because they are more convenient and easier to use. However, PPG measurement results are susceptible to motion artifacts, leading to interference with the PPG waveform and false detections of physiological information, resulting in frequent misjudgments. Therefore, the properties and compositions of PPG signals must be clearly understood, so that physiological information can be accurately measured. In addition, the types of signals caused by motion artifacts and the causes of the motion artifacts must be analyzed, then the interfering signals can be removed or separated. In this study, we created motion artifacts using two types of finger movements: rapid finger shaking and random finger shaking. We included the waveforms of the filtered PPG signals in the frequency and time domains, the analyses of independent components, and the measurements of the heart rate.

Methodology
A photoplethysmogram contains a large amount of physiological information that can be revealed by analyzing the waveform and the frequency spectrum. However, because PPG measurements are prone to the effects of motion artifacts, which significantly alter the accuracy of PPG waveforms, various methods have been proposed for eliminating motion artifacts. (3)(4)(5)(6)(7)(8)

PPG
PPG is a noninvasive method that can be used to measure physiological signals. Two PPG signal measurement methods are currently available: transmission and reflection (Fig. 1). In the transmission measurement method, light penetrates a finger, which enables a light sensor to detect changes in the transmitted light. In the reflection measurement method, the light sensor detects changes in the reflected light, as shown in Fig. 2. PPG signals contain information such as pulse wave velocity, pulse reflection index, oxygen saturation, respiratory rate, and heart rate. In medical applications, PPG is commonly used to detect the heart rate and oxygen saturation (SpO 2 ); measurements are performed on fingers and earlobes. (9) PPG is also frequently used in sports-related products such as sports watches, which enable users to monitor their physical condition at any given time.

Composition of PPG signal waveform
PPG signals comprise two different waveforms, (11) which are created when the heart is in the systole and diastole phases. In the systole phase, an increase in blood flow volume can cause a pressure change in the blood vessels. The corresponding waveform is indicated by the red solid line in Fig. 3. The second waveform (green solid line) is generated during the diastole phase when the blood that has been released during the previous systole strongly collides with the heart valves during blood backflow, creating reflections. At this point, the pressure in the blood vessels and the blood flow volume undergo a second change. The PPG signals reveal the combined changes in the systole and diastole phases, the pressure in the blood vessels, and the blood flow volume, as indicated by the blue dashed line. A complete PPG waveform is produced by the convolution of the red and green solid lines.

Motion artifacts
When PPG signals are measured, the motion artifacts from external factors tend to interfere with physiological signals. There are many different types of motion artifacts, and they are primarily divided into signals caused by interference from surrounding light and those caused by poor contact with sensing elements. In addition, participant movement (shaking) during measurements generates interference with measuring instruments, (12) and this is the most common cause of motion artifacts. The effects of motion artifacts on PPG waveforms are shown in Fig. 4, which displays the motion artifacts in signals for various body parts generated by instrument movement. The left side of the diagram shows the original PPG signals without motion artifacts, and the right side shows the PPG signals containing motion artifacts. For this experiment, a total of six movements were performed: elbow movement, vertical finger movement, horizontal finger movement, wrist movement, measuring instrument movement, and random finger shaking.
Before the analysis of this study, we summarized the production of movement interference into several changes to consider. For example, concerning finger-based measurements, variables comprise finger displacement, changes in the light source in the external environment, and  (10) changes in the force applied by the fingers when pressing measuring instruments. After performing crossover experiments for each individual variable, the following results were obtained: finger displacement did not produce signals with motion artifacts. Changes in the light   (13) source in the external environment generated signals with motion artifacts, but this problem can be solved by improving the design of the measuring instrument. Changes in the force applied by the fingers when pressing the measuring instruments produced varying degrees of motion artifacts in the PPG waveform based on the amount of force applied. Therefore, changes in the unit area where the finger touches the measuring instrument were concluded to be the true cause of motion artifacts.

Independent component analysis (ICA)
ICA is a computational, statistical, and linear transformation method (13)(14)(15)(16)(17)(18)(19)(20) that can be used to separate observed mixed signals into non-Gaussian-distributed and independent signals. The independent signals obtained from ICA are occasionally recognized as the independent components of mixed signals.

Basic definition of ICA
In general, the signals collected are mixed signals, where the pattern of the raw signals and the signal mixtures are unknown, and the raw signals are very difficult to identify. However, ICA can be used to separate the raw signal s(t) from the mixed signal x(t). When x(t) is known, the following equation is the basic model equation of ICA: ( ) ( ) 13 (1) Here, A is an m × n mixing matrix, which represents the parameter weighting between the original independent signal s(t) and the observed mixed signal x(t). To obtain the raw signal s(t), the observed mixed signal x(t) is assumed to comprise a group of signal sources that are independent of each other. The signal sources are combined using linear combination. Next, the approximate inverse of mixing matrix A is determined, which can be represented by the following equation: ( Here, W is the approximate inverse matrix of A, which is also called the demixing matrix. u(t) is the estimated value of independent signal s(t). A conceptual diagram of ICA is shown in Fig. 5.

ICA process
The most crucial assumption when conducting ICA is that the source signals are statistically independent of each other. When discussing the results obtained from ICA, the most critical goal is to ensure that the output signals are independent of each other. The statistical method used to calculate the non-Gaussian distribution is used to define the objective function, after which an optimization algorithm is applied to maximize or minimize the objective function, thus maximizing the mutual independence of the output signals and correcting the demixing matrix W. The estimated independent component signals are then obtained. Furthermore, prior to ICA, preprocessing, including centering and whitening, is performed on mixed signals to acquire useful information from the mixed signals to reduce the computational complexity of ICA. The analysis procedure is shown in Fig. 6.
To reduce the computational complexity of ICA and extract useful information from the mixed signals, mixed signal preprocessing, including centering and whitening, was performed prior to computing the objective function.

Actual and simulation examples
In this section, the signals created by simulation and actual examples of mixed signals were used, and ICA was used to calculate the changes in mixed signals. When the simulation was used, the actual PPG signals could be analyzed. Figure 7 shows that when the PPG signals were mixed with motion artifacts, which were created by vertical finger movements, the waves were displayed as the frequency spectrum. Then, ICA was used to separate the components into signals with different frequencies.

Correlation coefficient
Karl Pearson designed the correlation coefficient as a statistical indicator that can be used to reflect the correlation between different variables. The correlation coefficient between variables X and Y is between −1 and +1; a value of less than 0 indicates a negative correlation, whereas a value greater than 0 signifies a positive correlation. The closer the absolute value of the correlation coefficient to zero, the weaker the correlation. By contrast, the closer the absolute value of the correlation coefficient is one, the stronger the correlation.
In this study, correlation coefficients were used to select the independent components. The frequency spectrum was used to examine the correlation between PPG signals without motion artifacts and the analyzed independent components. The independent component with the highest correlation coefficient was recognized as the primary component. Figure 8 shows the correlation coefficients between independent components 1, 2, and 3 and the PPG signal without motion artifacts, which were 0.1549, 0.1519, and 0.5278, respectively. Because independent component 3 had the highest correlation value, it was selected for further analysis.

Spectrum analysis
The analysis of PPG signals in frequency spectra was described in Sect. 2. The PPG signals presented in the frequency spectra are composed of a fundamental wave and different harmonic waves. To obtain clean PPG signals, we must first identify the frequencies and locations of the fundamental wave and harmonic waves. The signals contaminated by motion artifacts would cause misjudgments of the frequencies and locations of the fundamental wave and harmonic waves. Therefore, in Sects. 3.1 and 3.2, we analyzed and compared the correlation coefficients between the independent components and the PPG signals by ICA and the frequency domain method, which enabled the desired independent components to be separated successfully. In this section, we designed a simple method to determine the peak frequencies of the fundamental wave and harmonic waves.
The flow chart in Fig. 9 shows the procedure used to determine the peak frequencies. First, the maximum value in the frequency range of the 0.5-5 Hz band is identified. Subsequently, the peak frequency f 1 is recognized as the fundamental wave. Next, the characteristics of the harmonic waves are used, and the frequency region of f 1 is expanded by a factor of 2-3 to find the maximum value in this region. The detection ranges are 2f 1 ± 0.3 Hz and 3f 1 ± 0.3 Hz. Figure 10 shows the results for the detected peak frequencies.
After the peak frequencies of the fundamental wave and the first and second harmonic waves are acquired, the components of the three waves are extracted using a filter, where filter design is explained in Sect. 3.4.

Multi-bandpass filter
As reported in this section, after the peak frequencies of the fundamental and harmonic waves of the independent components were obtained, a designed multi-bandpass filter was used  to extract the fundamental wave and harmonic waves from the original PPG signals. A digital filter with a finite impulse response (FIR) was used in this study. Unlike infinite impulse responses, the FIR did not exhibit a feedback loop; therefore, the input frequency responses of the pulse signals approached zero, and the investigated system has superior stability. Figure 11 shows a schematic diagram of the bandpass filter, where f c is the center frequency and f l and f h are the lower and upper cutoff frequencies, respectively.
Prior to designing the multi-bandpass filter, the center frequency of the filter must first be defined and the frequency bandwidth and lower and upper boundaries must be established. The center frequency, the frequency bandwidth, and the lower and upper boundaries are explained as follows. The center frequencies are the peak frequencies of the fundamental wave and the second and third harmonic waves. The frequency bandwidth is designed to measure the change in heart rate per unit of time to ensure that the heart rate information is complete. The frequency    bandwidth must be greater than the maximum change in heart rate. Because the difference between the minimum and maximum heart rates within a 10 s time span will generally be less than 40 beats, we set the frequency bandwidth to 0.6 Hz, which was equivalent to a difference of 36 beats. The upper and lower boundaries were set at f c ± 0.3 Hz. Next, the degree and order of filter-stopband attenuation were studied. To produce favorable filtering results, the filter order was set at 1000 despite the difficulty involved in this type of filter design. The degree of stopband attenuation was set at −20 dB. Figure 12 shows the frequency responses of the multibandpass filter, and Fig. 13 shows the results of actual PPG signals with motion artifacts after passing through the multi-bandpass filter.

Algorithm for heart rate detection
When PPG signals are obtained, the heart rates can be obtained by calculating the time differences between two different wave peaks. Therefore, to obtain accurate heart rate information, the locations of the wave peaks must be precisely detected. By observing the complete PPG waveforms, no turning points could be found between the peaks of waves and the adjacent troughs, and the vertical distance between the two extrema was maximum. Therefore, to observe and obtain all the extrema in a PPG waveform, to calculate the differences between these extrema, and to set a determination condition for detecting the locations where the greatest difference occurred, the locations of the wave troughs and peaks were identified. The relevant procedure is shown in Fig. 14. An example of the use of the crest-trough detection algorithm is shown in Fig. 15.

Experimental equipment and procedure
In this study, the reflective method was used to measure PPG signals. Figure 16 shows a schematic diagram of the investigated method. In the experiment, the tip of the index finger was used to touch the PPG measuring device, and a green LED was used as the index for analysis. Three light sensors were installed on the device to receive the light signals, and the three light sensors collected the reflected green light LED simultaneously. The detection process uses three light sensors to collect the signals that bounced back after the green light signals transmitted to the finger, producing three original data for further analyses. The sampling frequency of the measuring device was set at 100 Hz, and MATLAB was used for further simulation analyses.
In the experiment, two different types of continuous motion artifacts were produced using various movements: rapid finger shaking and random finger shaking. Two experiments were performed for each scenario. The experimental results are described as follows. Figure 17 shows the original PPG signals. The waveform observed in the time domain is shown on the left of the figure and the corresponding frequency spectrum is displayed on the right of the figure. The algorithm described in Sect. 3.4 was used to compute the processed PPG signals to calculate heart rate information, as shown in Fig. 18.   Figure 19 shows the original PPG signals. The waveform observed in the time domain is shown on the left of the figure, and the corresponding frequency spectrum is displayed on the right of the figure. The algorithm described in Sect. 3.4 was used to compute the processed PPG signals to calculate heart rate information, as shown in Fig. 20.

Experiment scenarios and results analyses
First, in the experiments, we used the average heart rate measured by ECG as the reference and compared it with the average heart rate measured by PPG. Next, the average heart rate  obtained from the PPG signal analysis was compared with the reference value, where Table 1 shows the results. In Experiment 1 of rapid finger shaking, the average heart rate measured by ECG is 90.9 bpm and that measured by PPG is 91.6 bpm, then the average heart rate difference percentage is 0.77%. In Experiment 2 of rapid finger shaking, the average heart rate measured by ECG is 83.2 bpm and that measured by PPG is 82.4 bpm, then the average heart rate difference percentage is 0.96%. In Experiment 1 of random finger shaking, the average heart rate measured by ECG is 86.2 bpm and that measured by PPG is 87.8 bpm, then the average heart rate difference percentage is 1.85%. In Experiment 2 of random finger shaking, the average heart rate measured by ECG is 83.9 bpm and that measured by PPG is 85 bpm, then the average heart rate difference percentage is 2.16%. The average heart rate difference percentage between EEG and PPG is about 2%.

Conclusion
In this study, experimental results indicated that the proposed analysis method can effectively eliminate the motion artifacts of PPG signals and the obtained signals have favorable waveforms. These results demonstrate that when waveform information is accurately obtained, the heart rate detection is precise. The integrated data in Sect. 4.3 showed that the average heart rates obtained from the PPG and ECG signals ranged between 0.77 and 2.16%, indicating that the results obtained by both methods were almost identical. Concerning other factors affecting physiological information, such as differences in the time of signal transfer and body movements, the differences in average heart rate obtained from the PPG and ECG signals were within a reasonable range. Simulation analyses were performed using MATLAB software. In future studies, the real-time and instant processing in the fields of sports equipment and medical treatments could be implemented practically.

Future prospects
In this study, MATLAB was used to perform the simulation and analysis processes. In the future, we will study the real-time and instant processing of PPG signals. The method of detecting heart rate through PPG is actually implemented in the fields of medical treatments and sports equipment.