Motion artifact cancellation from a single channel SCG using adaptive forgetting factor recursive least square filter

This work proposes a novel filter for motion artifact cancellation from a single channel seismocardiography (SCG) data recorded by a tri-axis accelerometer. A real time adaptive forgetting factor recursive least square filter (AFFRLSF) was developed and embedded in our designed single channel SCG recorder system (SCSRS) for motion artifact cancellation, heartbeat signal extraction, and heart rate calculation. This SCSRS was placed on the chest wall of 24 subjects who were asked to perform standing, walking, jogging, and jumping movements on a treadmill. We recorded the single channel SCG signal and the standard Electrocardiogram (ECG) lead I signal by placing one electrode on the right arm (RA) and another on the left arm (LA) of the subjects. The heartbeat signals were extracted and heart rates were calculated from the output of AFFRLSF. The graphs of the extracted heartbeat signals were very clear under all the standing, walking, jogging, and jumping motions. The results indicate an average correlation coefficient of up to 0.9878 between heart rates estimated from SCG and ECG of all the 24 subjects. This observation shows that the proposed AFFRLSF could be an effective method for motion artifact cancellation from recorded single channel SCG signals.

The recorded SCG contains the heartbeat signal and motion artifact information, and it is difficult to extract the heartbeat signal from the recorded SCG.Motion artifact in the recorded SCG mainly contains the vibration generated by organs and body motion, which is unexpected, irregular, and mixed with the heartbeat signal in both the time and frequency domains [14][15][16][17].Most of SCG studies to date have focused on the motion artifact cancellation [18][19][20][21][22][23][24][25][26][27][28][29].A chest-worn tri-axis accelerometer sensor and an ECG sensor are utilized together to remove motion artifact from ECG signal [18][19][20], while two tri-axis accelerometers are used for motion artifact cancellation from SCG recordings with one accelerometer placed at the center of the sternum and the other attached to the right side of the back of the subjects [21][22].In all these studies using multi-sensor systems, independent component analysis (ICA) method and least mean square (LMS) filter are developed and performed on the ECG and SCG recordings respectively.Results have shown that the multi-sensor system has good performance on motion artifact cancellation and the heartbeat signals have been separated successfully.Nevertheless, these multi-sensor systems have increased the complexity of the SCG measurement and assessment, and simplified sensor systems should be designed for SCG studies.
In recent ten years, some researchers have focused on motion artifact cancellation from SCG recordings using simplified sensor system which only contains a tri-axis accelerometer [23][24][25][26][27][28][29].Pandia et al. proposed a polynomial smoothing method based on Savitzky Golay model to remove motion artifact from the recorded acceleration data of the walking subjects in 2010 [23].The primary heart sound detection rate was up to 99.36% with the trade-off of distorting the graph of the extracted SCG.Rienzo et al. recorded a 24-hour SCG signal using an accelerometer from freely moving subjects in 2012 [24].The motion artifact was removed from the recorded SCG signal using a continuous 5-second segment based method.The results were promising, but the physiological parameters were not extracted from the signal.Jain et al. applied a kurtosis based method that could enhance the detection of the fundamental heart sounds, S1 and S2, from SCG recordings in 2016 [25].In 2017, Javaid and Taebi proposed an ensemble averaging and empirical mode decomposition method to remove white noise from a synthetic vibrocardiographic signal and to reduce the motion artifacts generated due to walking at normal and moderately fast speeds at treadmill respectively [26,27].All these signal processing methods have good performances on motion artifact cancellation from recorded acceleration data, but the graph of the extracted SCG signal could not be recovered.While in other methods, Chen et al. developed a time delay based normalized least mean square filter to remove motion artifact [28].The heart rates were successfully estimated but the graph of the extracted SCG was recovered by using an extra moving average method.
To solve this problem, our research group has recently developed a real time adaptive forgetting factor recursive least square filter (AFFRLSF) for motion artifact cancellation from the single channel SCG signal which is recorded by only one accelerometer.The heartbeat signal graph is very clear in the extracted SCG signal without any other signal processing procedures.Compared to our previous work in [29], some significant improvements have been achieved which are listed as below: (1) The proposed filter in this paper is more robust by adaptively updating the forgetting factor, which can be used for accurately extracting SCG signal when motion artifact changes unexpectedly; (2) More daily motions including standing, walking, jogging, and jumping are considerate in the experiment in this paper; (3) The proposed filter is designed for real time processing which has been embedded in the hardware system; In section 2 of this paper, the basic theory of the proposed AFFRLSF is introduced.The measurement system including the hardware system, experiment setup and the software system are discussed in Section 3. Section 4 shows the results and section 5 concludes this paper.

A. The system model
In the standard recursive least square (RLS) filter [30,31], the update of coefficient vector ˆ() n w , gain vector () n k and noise covariance matrix () n P at timestamp n can be described as follows: where ( ) [ ( ), ( 1), , ( is the input vector with the filter length M,   (0, 1] is the forgetting factor [32] and () n  is the a priori error that is described in equation ( 4): where () dn is the desired signal or reference signal which can be modeled as equation ( 5): where () yn is the filtered output of the input signal () un and () vn is the noise signal with the covariance Figure 1 illustrates the framework of the proposed adaptive forgetting factor recursive least square filter (AFFRLSF).The single channel SCG data is the recorded acceleration data which contains motion artifact and the heartbeat signal.The primary channel and reference channel of the AFFRLS filter are obtained by band pass filtering the single channel SCG data from 1Hz to 25Hz and 3.5Hz to 25Hz respectively, which has been verified in our previous work [29].

B. Theory of adaptive forgetting factor
The relationship between the a priori error () n  and the a posteriori error () en can be described as equation (7)   according to equations ( 1), ( 4) and ( 6). ( Substituting equation ( 2) into equation ( 8) and equation ( 8) can be rewritten as follows:   ˆ( ) Theoretically,

(
) is the measurement noise at timestamp n and it is very difficult to accurately calculate the value.A similar equation mentioned in [33] is utilized Coefficients  and  in equations (12-14) should meet the criterion mentioned in [33,34].
where M is the filter length of the proposed AFFRLSF.
Practically, an upper threshold value max  should be utilized to prevent () n  larger than 1.Thus, the forgetting factor of the proposed AFFRLSF is updated by equation (17).
where max  is a constant value that is smaller than 1 but infinitely close to 1.

A. Hardware System
A single channel SCG recorder system (SCSRS) is developed to record the heartbeat signal and motion artifact.Figure 2(b) shows the prototype of SCSRS, which integrates a tri-axis micro electro mechanical system (MEMS) accelerometer (ICM-20602 manufactured by InvenSense), a high precision crystal (FA-20H manufactured by EPSON) and a microprocessor (STM32F411CEY6 manufactured by STMicroelectronics).The tri-axis accelerometer is used to record the acceleration data induced by heartbeat, human motion, and vibrations from other organs.The recorded acceleration data is sampled at the rate of 800Hz and transferred to the microprocessor via a serial peripheral interface (SPI) at a rate of 10MHz.The microprocessor works at a full speed of 100MHz and runs the proposed real time AFFRLSF with the aid of the float point unit (FPU).The high precision crystal is used to synchronize the accelerometer and microprocessor.These three components and their peripheral components are integrated in a small printed circuit board with a size of 9.5*9.5mm² .Figure 2(a) illustrates the setup of the SCSRS which is attached to the chest wall and placed at the left of the sternum of the subject.The x-axis, y-axis, and z-axis of the SCSRS describe the head to foot direction, the shoulder to shoulder direction, and dorsoventral direction of the subject respectively.In addition to the acceleration data captured by the tri-axis accelerometer, a standard ECG lead I signal is collected by the ECG recorder system (ERS) which can be seen in Figure 2. The ERS contains two electrodes with one electrode placed at the right arm (RA) and the other placed at the left arm (LA) respectively.Lead I ECG signal is collected at the sampling rate of 800Hz before transmitted to a host PC.

B. Experiment Setup
Dynamic motions including standing, walking, jogging, and jumping are considered in our experiment.24 subjects are asked to perform these motions on a treadmill in this order: subjects are asked to keep standing for at least 60s before walking for 60 s, jogging for 60 s, and jumping for 60s respectively.At the end of these motions, subjects need to keep standing again for 120 s which is divided into two recovery periods: the first 60 s named recovery 1 and the last 60 s named recovery 2. The walking and jogging speeds of the subjects are limited to less than 1.5m/s and about 2m/s by setting the treadmill working at low speed (3-5km/h) and medium speed (6-8km/h) respectively.
During the jumping motion, the treadmill works at an ultralow speed (0-2km/h) and subjects are asked to jump freely.All the subjects can breathe freely during the whole experiment, and the single channel SCG signal and ECG lead I signal are recorded simultaneously.

C. Software System
The proposed real time AFFRLSF is embedded in the microprocessor which mainly contains two parts: signal preparation and the AFFRLSF.These parts are described below.

1) SIGNAL PREPARATION
The recorded a-axis, y-axis and z-axis acceleration data are plotted in Figure 3(a-c) respectively.It can be observed that motion artifact strength increases when the speed of the subject increases.Most of motion artifact energy concentrates on x-axis, but less on y-axis and z-axis acceleration data.Besides, the z-axis acceleration data which contains the heartbeat signal is selected to be the single channel SCG signal.
The single channel SCG signal contains the heartbeat signal, the motion artifact, the respiratory component, the noise of the hardware system and sounds from the other organs which are mixed in both the time and frequency domains.To remove the gravity component, the respiratory component and the high-frequency noise, a band pass FIR filter that passes from 1Hz to 25Hz is used to filter the single channel SCG signal.The filtered signal contains the expected SCG signal and motion artifact within a frequency range from 1 to 25 Hz is fed into the primary channel of the AFFRLSF and plotted in Figure 3(d).Another band pass filter with the cutoff frequencies 3.5Hz and 25Hz is used to filter the single channel SCG signal, and the filtered data is plotted in Figure 3(e) and fed into the reference channel as described in section II.

2) AFFRLSF
The forgetting factor plays an important role in the proposed AFFRLSF which is adaptively updated using equation (17), and the upper threshold is set at 0.999999 according to its definition.Figure 4 illustrates the adaptively updated forgetting factor, the black line represents the adaptively updated forgetting factor at each iteration step and the blue line represents the 4-th order fitted curve of the forgetting factor which reflects the changing trend of the forgetting factor.It can be observed that the forgetting factor increases and decreases with the strength of motion increases and decreases respectively.What's more, the forgetting factor finally decreases to the same level with the initial value, all these results have well coincided the characteristics of the forgetting factor [35,36].

IV. Results
Figure 5 represents the raw data and processing results from one subject using single channel SCG and the reference standard lead I ECG signal.The recorded single channel SCG is plotted in Figure 5(a), and the processed signal using Savitzky Golay-based polynomial smoothing method and the proposed AFFRLSF are illustrated in Figure 5(b) and 5(c) respectively.Figure 5(d) is the reference standard lead I ECG signal which is recorded simultaneously.It is obvious that the amplitude of motion artifact increases from standing to jumping condition, and the extracted heartbeat signal is visually noticeable in Figure 5(c) while polluted by motion artifact in Figure 5(b), which well proves that the proposed AFFRLSF outperforms the Savitzky Golay based polynomial smoothing method.For better visualization, six segmented signals selected from the center of standing, walking, jogging, jumping, recovery 1 and recovery 2 conditions are plotted in Figure 6 (a-f) respectively.It can be observed that the features and graphs of heartbeat signals which polluted by motion artifact are visually unnoticeable are extracted to be visually noticeable under walking, jogging, and jumping conditions.In addition, the features and graphs of the heartbeat signals are clear in both the raw data and the output of the proposed AFFRLSF under standing, recovery 1 and recovery 2 conditions, which has well proved that the proposed AFFRLSF has good consistency on the recorded single channel SCG.

A. Heart rate correlation analyzation
The detected SCG peaks and ECG peaks evaluate the heartbeat signals from the perspective of the signal graph without considering the correctness.Heart rate can be an effective factor to verify the correctness of the detected peaks.As a gold standard in the clinical field, the heart rate estimated from the detected ECG peaks can be considered as the reference for the ground truth.The R peaks and AO peaks are extracted from the ECG signal and the extracted SCG signal using the classical Pan Tompkin algorithm [37] and the method developed in our previous work [29] respectively.Figure 7 illustrates the heart rates estimated from the detected SCG peaks and ECG peaks which are marked as black stars and red points respectively.It can be observed that heart rates estimated from the extracted SCG and ECG signals stay low during standing period, then increase slowly to about 110bpm with the energy of motion increases during the walking and jogging period.A rapid increase of heart rates occurs during jumping, and the maximum heart rate reaches to about 140bpm at the end of jumping motion.After that the heart rates decrease rapidly and slowly during recovery 1 and recovery 2 respectively.The results show that the heart rates estimated from the extracted SCG and ECG signals match very well in the whole experiment.A correlation analysis method is utilized to assess the accuracy of the heart rate estimated from SCG. Figure 8 shows the correlation between the heart rates estimated from ECG and SCG, with the x-axis and y-axis represent the heart rates estimated from ECG and SCG respectively.Heart rate estimated from standing, walking, jogging, jumping, recovery 1 and recovery 2 motions are marked as black points, red points, blue points, black stars, red stars and blue stars respectively.It can be observed that heart rates estimated from jumping motion are more scattered than that estimated from other motions.The black line in Figure 8 is the fitted line with a regression slope of 0.9905 and a correlation coefficient r = 0.9873.Table I summarizes the correlation coefficient 1 and correlation coefficient 2 calculated from different motions, using the proposed AFFRLSF and the method in [29] respectively.The results show that the correlation coefficients decrease as the motion speed increase, which is similar to the trend of heart rate discreteness in Figure 7.

B. Heart rate Bland-Altman analyzation
To further analyze the accuracy of the heart rate estimated from SCG, a Bland-Altman plot [38] is used and shown in Figure 9. Based on the definition of a Bland-Altman plot, the x-axis and y-axis represent the average and difference heart rates estimated from SCG and ECG signals respectively.Heart rate estimated from standing, walking, jogging, jumping, recovery 1 and recovery 2 motions are marked as black points, red points, blue points, black stars, red stars and blue stars respectively.As shown in Figure 9, heart rates estimated from jumping motion are more scattered than that estimated from other motions, which is consistent with the trend of heart rate discreteness in Figure 8.A 95% confidence region is marked with blue dashed lines that have an upper threshold of 4.3 and a lower threshold of -6.3.It is observed that there are a few outliers, but overall most measurements lie in the 95% confidence region.

V. Discussion and conclusions
In this paper, a real time method based on adaptive forgetting factor recursive least square filter is proposed for motion artifact cancellation from a single channel SCG .The theory of adaptive forgetting factor is proposed and verified on single channel SCG signals recorded from 24 subjects under standing, walking, jogging, jumping and recovery motions.The adaptively updated forgetting factor increases and decreases with the strength of motion increases and decreases respectively and the forgetting factor decreases to the same level with the initial value.The SCG peaks and heart rate signals are extracted from the output of AFFRLSF.The graphs of the extracted heartbeat signals are very clear under all the standing, walking, jogging and jumping motions, and the results indicate an average correlation coefficient of up to 0.9878 between heart rates estimated from SCG and ECG of all the 24 subjects.These results show that the proposed AFFRLSF could be an effective method for motion artifact cancellation from recorded single channel SCG signals, which has great potential in wearable dynamic SCG monitoring applications.However, heart rates estimated from the extracted heartbeat signal under jumping motion are more scattered than that estimated from other motions.The amplitude of motion artifact under jumping motion is much larger than others, and the reference channel of the proposed AFFRLSF is obtained using a fixed band pass filter which may not be the optimal solution for jumping motion.It is assumed to be the leading cause and will be investigated in the future work.In addition, a flexible wearable single channel SCG and ECG recorder system which integrates tri-axis accelerometer, ECG sensor, MCU, and Bluetooth module will be designed to simplify the SCG measurement and assessment.

FIGURE 1 .
FIGURE 1.The framework of the proposed AFFRLSF.
timestamp n into account, the forgetting factor can be obtained by equation(11).

FIGURE 2 .
FIGURE 2. (a) ECG electrode 1 and electrode 2 placement for measuring ECG.The coordinate system used in the paper is defined and the location of the single channel SCG recorder system are shown in the figure.(b) An image of the single channel SCG recorder system which shows the dimensions.

FIGURE 3 .
FIGURE 3. (a-c) X-axis, y-axis, z-axis acceleration of the recorded raw data respectively.(d-e) The primary and reference channel of the proposed AFFRLSF respectively.(The unit of acceleration is g.)

FIGURE 5 .
FIGURE 5. (a) Raw data of recorded single channel SCG.(b) Extracted heartbeat signal using Savitzky Golay based polynomial smoothing method.(c) Extracted heartbeat signal using AFFRLSF.(d) The reference ECG lead I signal.(The units of acceleration and voltage are g and mV respectively.)

2 FIGURE 9 .
FIGURE 9. Bland-Altman plot of the heart rate estimated from ECG and SCG.

TABLE I
Besides, correlation coefficients are calculated from all the 24 subjects and listed below.As shown in the Table, the average values of correlation coefficient 1 and correlation coefficient 2 are 0.9878 and 0.8702 respectively, which has well proved that the heart rate estimated from SCG and ECG match very well and the proposed AFFRLSF has great improvement on the accuracy of motion artefact cancellation and heart rate estimation.