Keywords

1 Introduction

The cardiovascular system provides blood flow to all parts of human body. Any abnormalities in the functioning of the system may lead to mortality. The world health organization reports that 17.7 million people lose their lives due to cardiovascular disease which is about 31% of the global deaths [1]. Early detection of heart diseases not only reduces the cost of treatment, it also simplifies the treatment process and aid in effective treatment. For early diagnosis, heart activity should be tracked in long-term and monitored daily to get important information. The device should also be light weight, long-lasting, ease of use and wearable. Such devices should be simple and reliable to provide instant information. Electrocardiography (ECG) and seismocardiography (SCG) are simple, non-invasive and inexpensive as well as provide much useful and reliable information about the heart [2].

Though ECG is considered to be the golden standard to access heart problems, ECG cannot show congenital heart defects including defects in heart valves. These structural abnormalities in the heart valve do not alter the electrical depolarization of myocardium and hence cannot be reflected in ECG. But these abnormalities are reflected in SCG. SCG is more sensitive to identify anatomical and physiological diseases. Seimocardiography is a non-invasive technique to assess the mechanical activity of the heart. The vibrations on chest surface are acquired from MEMS-based accelerometers. SCG signal provides reliable information that can be used for healthcare and clinical applications. During acquisition, the data are prone to power line or external interference. Hence, noises are common. Accurate measurements of fiducial points are very important to extract the features of the SCG signal. Special software is used to make decision on heart diseases.

Many authors have reported in their work to remove the noises and artifacts from the SCG signal. The literature reveals the usage of filters being used to remove the noises and artifacts from SCG signal. The methods are digital filters like FIR and IIR, wavelet-based denoising methods and empirical mode decomposition [3,4,5,6,7].

In this work, an attempt has been made to remove motion-induced noise present in the SCG using smoothing filters. The smoothing filters used are moving average, median and Savitzky Golay filter. They eliminate motion-induced artifact present in the SCG signal. The performance measures aid in identifying the best suitable denoising method. In addition, Butterworth filter is used in eliminating the low frequency respiratory sounds.

2 Methodology

2.1 SCG Signal Database

The SCG signals are obtained from CEBS publicly available database in PhysioNet archive. The signals are affected by motion-induced artifacts, trending effect, baseline drift, sudden variations in systolic and diastolic profiles and irregular rhythms. The instrument used to record the signal is BIOPAC MP36 acquisition system (Santa Barbara, CA, USA). The sampling rate is fixed as 5000 Hz. The signals are processed for 10 ms and are downsampled to 1000 Hz.

2.2 Denoising Filters

The literature reveal that adaptive filters also called as moving average filters eliminate motion-induced noise. This filter uses a sliding window to compute the average value of the data within the window. Moving average filter is defined by the difference equation:

$$y\left( n \right) = \left[ {\frac{1}{{\text{Window Size}}}} \right]\left[ {x\left( n \right) + x\left( {n - 1} \right) + \ldots + x\left( {n - \left( {\text{Window Size}} \right)} \right)} \right]$$
(1)

where \(y(n)\) is the present output data, \(x(n)\) is the present input data, and \(x(n - 1)\) is the past input [8].

It helps to remove sporadic noise but not suitable to remove sudden spikes and high amplitude noise. Higher order filter may deteriorate the signal quality. Moving average FIR filter is apt to smooth the envelope of the SCG signal [9, 10].

Median filters are non-linear digital filters that are widely used to eliminate noise from any signal. The filter operates along the signal from sample to sample such that each sample is replaced by the median value of the neighboring sample values. Window corresponds to the set of neighbors and determines the frequency and fitting of a signal [11].

For any non-linear discrete dynamic FIR system, in which the linear combinations are replaced by non-linear function of adequate number of variables,

$$y(n) = F[x(n),x(n - 1),...,x(n - M)]^{{}}$$
(2)

where M is an arbitrary positive integer, \(y(n)\) and \(x(n)\) are the present output and input sample, \(x(n - 1)\) and \(x(n-M)\) are the previous input samples, etc [12].The median filter is derived from vector of samples,

$$x(n) = \{ x(n),x(n - 1),...,x(n - M)\}^{T}$$
(3)

Savitzky Golay filter is a polynomial FIR filter that can retain moments even beyond third order around the transition points. This is not possible for a digital FIR filter [13]. The output data set of points is expressed as,

$$Y_{j} = \frac{1}{N}\sum\limits_{i = 0}^{N - 1} {C_{i} y_{j + 1} ;} \left( {\frac{m + 1}{2}} \right) \le j \le n - \left( {\frac{m - 1}{2}} \right)$$
(4)

where \(j = 1,\,2,\,3,\, \ldots ,n\) and \(y\) is an observed value, Ci is the set of \(N\) convolution coefficients of the filter, and \(m\) is the window size.

In order to remove the low frequency respiratory sounds embedded in the SCG signal, IIR filters are attempted. IIR filters have non-linear phase. Also, filtering a signal by IIR introduces delay that leads to a shift in time  in the output of the filter. This delay introduces distortion in the SCG signal. To overcome this delay, a zero-phase delay compensation FIR filter is used to remove the low frequency respiratory sounds [14]. The complete data sequence is obtained from the public database, and hence, it is non causal. This characteristic makes IIR filter a zero-phase filter where non-linear distortions are removed [15]. Hence, a fifth order Butterworth filter is used extract the desired frequency [16].

2.3 Performance Analysis

The metrics used to analyze the performance of various types of smoothing filters are mean squared error, mean absolute error, signal-to-noise ratio and peak signal-to-noise ratio [17]. Mean squared error is given by

$${\text{MSE}} = \frac{{\sum\limits_{n = 1}^{N} {[x(n) - x^{^{\prime}} (n)]^{2} } }}{N}$$
(5)

Accuracy of the filter is improved when the MSE is minimum. Accuracy of the denoising is evaluated using mean absolute error. Mean absolute error is defined as:

$${\text{MAE}} = \frac{{\sum\limits_{n = 1}^{N} {\left| {[x(n) - x^{^{\prime}} (n)]} \right|} }}{N}$$
(6)

MAE should be minimum to ensure the accuracy of denoising. Performance of denoising method is commonly examined from signal-to-noise ratio. SNR is inversely proportional to logarithmic of MSE and is given by:

$${\text{SNR}} = 10\log_{10} \frac{{\sum\limits_{n = 1}^{N} {x(n)^{2} } }}{{\sum\limits_{n = 1}^{N} {[x(n) - x^{^{\prime}} (n)]^{2} } }}$$
(7)

Peak signal-to-noise ratio is defined as:

$${\text{PSNR}} = 20\log_{10} \frac{\max [x(n)]}{{{\text{RMSE}}}}$$
(8)

For accurate denoising, PSNR should be larger. Performance of the SCG signal can further be improved by using FIR and IIR filters.

3 Results and Discussion

A typical representation of the raw SCG signal is presented in Fig. 1 (a). Savitzky Golay, median and moving average filters are attempted to eliminate the motion artifacts. Figure 1b–d shows the filtered results of the respective filters. Qualitative analysis shows that Savitzky Golay filter smoothens the signal better than median and moving average filter. This is because the Savitzky Golay filter approximates a function to a polynomial of specified order. Best match can be obtained for a given function using this filter in terms of least square sense. This filter also preserves higher-order moments than other types of FIR filters.

Fig. 1
figure 1

SCG a raw signal b Savitzky Golay c median d moving average filter output

The performance analysis of these filters over the SCG signal is presented in Fig. 2. It is observed from the bar graph that the median filter provides better SNR and PSNR than the other two filters.

Fig. 2
figure 2

SNR, PSNR of smoothing filters

The average values of the performance metrics are tabulated in Table 1. It is observed that the Savitzky Golay and moving average filter are inferior to median filter.

Table 1 Average value of the performance metrics

The reason behind the improvement in SNR is that the median filter is less sensitive to outliers as it discards the sample value that differ much from the other samples present in the window. The spike-like samples are the erroneous component present in the raw signal. The moving average filter considers all sample valves within the window. Thus, the addition of noisy spikes degrades the performance of moving average filter.

A qualitative analysis of the median filter over the SCG signals is presented in Fig. 3. Typical representative of the SCG signal that is less and highly corrupted by noise is presented in Fig. 3a and c. Figure 3b and d shows the filtered output of the respective signals. It is observed from the figures that the noisy spike-like component is smoothened by the median filters and thus eliminates the motion artifacts present in the signal.

Fig. 3
figure 3

Typical representative of a a less corrupted SCG signal b denoised signal by median filter c highly corrupted SCG signal d denoised signal by median filter

The SCG signal is infrasonic, and hence, noise (low frequency respiratory sounds) present in the signals is attempted to be removed by zero-phase delay compensation filter. This significantly improves the SNR and PSNR of the signal. Though it is a FIR filter, better performance could be achieved using IIR filter which is monotonic both in passband and stopband. A Butterworth-based median filter is thus a better option than the FIR counterpart.

Table 2 shows presents the SNR and PSNR values of zero-phase delay compensation and Butterworth-based median filter. It is observed from the table that Butterworth-based median filter performs better. This is because zero-phase delay compensation filter is an FIR filter. But IIR filter has steep transition region and hence results in better performance than FIR filter.

Table 2 Performance of the IIR and FIR filters

Figure 4 shows the bar plot variation of MSE and MAE between the FIR and IIR filter. It is observed that MSE in the zero-phase delay compensated FIR filter is much larger than that of the Butterworth filter. Butterworth filter is able to remove most of the noise present in the signal as it is an infinite response filter.

Fig. 4
figure 4

Average MSE and MAE of FIR and IIR filter

Figure 5a represents median filtered SCG signal which is given as input to the zero-phase delay compensation filter and Butterworth filter. Both qualitative and quantitative analyses depict that Butterworth-based median filter performs better in removing the motion artifact and the low frequency respiratory noise from the SCG signal.

Fig. 5
figure 5

a Median filtered SCG signal, b filtered output of zero-phase delay compensation median filter and c filtered output of Butterworth-based median filter

4 Conclusion

SCG measures cardiac-persuaded mechanical variations at the surface of the chest and is well below the human hearing. Recent advancement in signal processing methods has challenged an increased demand for quantitative details that will helpful the physician for patient monitoring and diagnosis [17]. In this work, an attempt is made to remove motion-induced noise and low frequency respiratory sounds from SCG signal. The performance of various filters has been analyzed. Though Savitzky Golay smoothens the SCG signal, quantitative result in terms of SNR proves that median filter performs better than Savitzky Golay and moving average filter. Also, it is inferred that the performance of Butterworth filter is superior in elimination low frequency` respiratory sounds from SCG signal with a significant improvement in SNR. The unique work flow adopted in this work further ease the post-processing stage in distinguishing the abnormal heart vibrations from the normal. This work involves denoising of SCG signals in time domain. As a future work, significant improvement can be achieved by analyzing the signal in frequency domain and time – frequency domain.