ABSTRACT
For computerized analysis of respiratory sounds to be effective, the acquired signal must be free from all the interfering elements. Different forms of noise which can degrade the quality of lung sounds are recording artifacts, power line/Radio Frequency (RF) interferences, ambient acoustic interferences, heart sound interference etc. Such interferences adversely affect the diagnostic interpretations. Powerful denoising techniques are necessary to resolve this issue. A denoising scheme for lung sounds, based on SavitzkyGolay (SG) filter is proposed in this paper. The order and frame length of the SG filter is determined objectively using the Signal to Noise Ratio (SNR) and computational time as objective function. Maximum SNR is observed when the frame length is nearest to the value just higher than the polynomial order. This observation holds good for different levels of simulated addictive Gaussian noise. The polynomial order of 8 and frame size of 9 are found to be promising with SNR of 10.401db at computation time of 2.1ms.
Keywords:
Denoising; Frame length; Lung sound; Polynomial order; SavitzkyGolay filter
INTRODUCTION
Lung sounds are generated due to the aggravated flow of inspired air inside the lungs. Throughout its journey from inhale to exhale, the airflow remains turbulent.This turbulent airflow presses the respiratory walls until its passage through the distal airways [^{1}1 Pasterkamp, H, Kraman, S.S., Wodicka, G. R. Respiratory sounds advances beyond the stethoscope. Am J Respir Crit Care Med, 156:974987,(1997).]. These generated lung sounds can be heard over chest walls through stethoscopes [^{2}2 Jones, A. A brief overview of the analysis of lung sounds. Physiotherapy, 81: 3742(1995).] or can be recorded through electronic stethoscopes [^{3}3 Leng, S, Tan, RS, Chai, KTC, Wang, C, Ghista, D, Zhong, L. The electronic stethoscope. Bio Medical Engineering Online, 14:66, (2015).]. Lung sounds are observed to get vital information about diseases and respiratory health. Continuous monitoring of lung is extremely important in the situation in case of patients with severe lung disorder. Also, to recognize critical conditions during surgeries, the regular lung and heart observation is desired. Advanced computerized based lung sound analysis methods have paced its acceptance in clinical practice to do the observation and continuous monitoring of lung functioning [^{5}5 Haider, N. S., Joseph, J, Periyasamy, R. An investigation on the statistical significance of spectral signatures of lung sounds.Biomedical Research, 28 (4): 28012810, (2017).]. Typically, the lung sound recording is done in a clinical environment where different sources of ambient noises may be present. Lung sound signal is usually corrupted with different forms of contaminations which include background noises,power line/Radio Frequency (RF) interferences, environmental noises, heart sound interferences and recording artifacts[^{4}4 Mondal, A, Bhattacharya, P, Saha,G. Detection of lungs status using morphological complexities of respiratory sounds. The Scientific World Journal, 182938:19, (2014).]. Such sounds are automatically recorded while recording lung sound signal. Different diagnostic interpretations are made based on the computerized lung sound analysis. Therefore, for a successful automated lung sound based disease observation, the recorded lung sound signal should be free from any interference. However,noises are the unpreventable factors which interfere and pollutes lung sound signal. Therefore, noise interferes with its ability to bring effective diagnostic inferences[^{6}6 Wang, H, Wang, L.Y. Multisensor adaptive heart and lung sound extraction. Proceedings of IEEE Sensors,2: 10961099, (2003).
7 Wang, Z, Nuno, da Cruz J, Wan, F. Adaptive fourier decomposition approach for lungheart sound separation.IEEE International Conference on Computational Intelligence and Virtual Environments for Measurement Systems and Applications (CIVEMSA), Shenzhen, 15, (2015).
8 Gnitecki, Moussavi, M.K.Z. Separating heart sounds from lung soundsaccurate diagnosis of respiratory disease depends on understanding noises. IEEE Engineering in Medicine and Biology Magazine,26(1):2029, (2007).^{9}9 Iyer, V.K., Ramamoorthy, P. A., Fan, H, Ploysongsang, Y. Reduction of Heart Sounds from Lung sounds by Adaptive Filtering. IEEE Transactions on Biomedical Engineering, 33(12):11411148, (1986).].
Several studies have been proposed to solve noise issues to upgrade the performance of healthcare devices. Hadjileontiadis et al. [^{10}10 Hadjileontiadis, L. J. A novel technique for denoising explosive lung sounds empirical mode decomposition and fractal dimension filter. IEEE Engineering in Medicine and Biology Magazine, 26(1): 3039, (2007).] showed the combination of fractal dimension and empirical mode decomposition method to suppress noise from explosive lung sounds. This method decomposes the data into a series of intrinsic mode functions and then rejects the noisy portions for estimation of lung sound. Molaie et al. [^{11}11 Molaie, M, Jafar, S, Moradi, M. H., Sprott, J. C., Golpayegani, S.M.R.H. A chaotic viewpoint on noise reduction from respiratory sounds. Biomedical Signal Processing and Control, 10:245249, (2014).] demonstrated new method based on modified local projection algorithm to reduce noise. Considering the chaotic nature of respiratory sounds, stretching and folding features were evaluated for appropriate curve selection out of the trajectory. This method was found superior in contrast to adaptive line enhancement filter and frequency filtration method in 502500Hz bandwidth at whole ranges of SNR. Emmanouilidou et al. [^{12}12 Emmanouilidou, D, McCollum, E.D., Park, D.E., Elhilali, M. Adaptive noise suppression of pediatric lung auscultations with real applications to noisy clinical settings in developing countries. IEEE Transactions on Biomedical Engineering, 62(9): 22792288, (2015).] reported an automated multiband denoising scheme for suppressing noise contaminations to upgrade the quality of pediatric auscultation signal. Heavy noises were suppressed using adaptive subtraction scheme. It operated in short time windows and used present frame’s signal to noise information to relax or strengthen the noise suppression. The algorithm operated in spectral domain and required prior information regarding signal of interest. This proposed algorithm was found effective in suppressing environmental noise and preserving the original lung sound, also validated by expert panel.
SG filter is widely acceptable for multiple applications from the field of chemistry to biomedical signal processing [^{13}13 Rivolo, S, Patterson, T, Asrress, K.N., Marber, M, Redwood, S, Smith, N.P., Lee, J. Accurate and standardized coronary wave intensity analysis.IEEE Transactions on Biomedical Engineering, 64(5):11871196, (2017).]. Baba et al. [^{14}14 Baba, K, Bahi, L, Quadif, L. Enhancing geophysical signals through the use of SavitzkyGolay filtering method. Geofísica Internacional,53(4):399409, (2014).] introduced SG filter to denoise geophysical signals. This filter was more appropriate as filter designing was done in accordance with the noisy signal. It preserved the height and width of the original signal. Therefore, noise reduction efficiency was significantly better using this filter. Acharya et al. [^{15}15 Acharya, D, Rani, A, Agarwal, S, Singh, V. Application of adaptive SavitzkyGolay filter for EEG signal processing.Perspectives in Science,8: 677679,(2016).] showed the application of adaptive SG filter in EEG signal processing. It was the self evaluative and iterative process, which replaced the lengthy trial and error process. This method supported for easy selection of optimal parameter values. Liu et al. [^{16}16 Liu, Y, Dang, B, Li, Y, Lin, H, and Ma, H. Applications of SavitzkyGolay Filter for Seismic Random Noise Reduction. Acta Geo physica, 64(1):101124, (2016).] presented the SG filter to remove noise from the seismic signal. With this study, good performance was obtained in contrast to wavelet and wiener methods. Hargittai et al. [^{17}17 Hargittai, S. SavitzkyGolay leastsquares polynomial filters in ECG signal processing. Computers in Cardiology, 32:763−766, (2005).] proposed SG filter for decreasing the undesired noise signal from electrocardiographic (ECG) signal and got significant response. Liu et al. [^{18}18 Liu, J., Li, S., Li, X., Klein, C., Rymer, W. Z., Zhou, P. Suppression of stimulus artifact contaminating electrically evoked electromyography. Neuro Rehabilitation, 34(2): 381389, (2014).] demonstrated the stimulus artifact suppression from electromyography (EMG) signal or M wave signal using SG filter. Increased correlation coefficient and reduced root mean square error between clean and reconstructed M wave was obtained which indicated good performance.
There are many gaps in the existing literature in terms of algorithmic complexity and issues in accurate noise segregation from lung sound signal. Hence, there is a need to developsuch a method which could accurately denoise lung sound signal to improve its ability to aid a reliable computerized lung sound analysis. This article introduces lung sound noise cancellation using SG filter method. This filter can be better described as finite impulse response filter, obtained during smoothening operation with the help of approximation of local leastsquare polynomial [^{19}19 Krishnan, S. R., Seelamantula, C.S. On the selection of optimum SavitzkyGolay Filters. IEEE Transactions on Signal Processing, 61(2): 380391, (2013).]. The noise rejection ability of this filter is tested by conducting several experiments on lung sound signal by adjusting the SG filter parameter values. The SNR and computation time are calculated for each parameter setting. Following this, optimal parameter values are identified based on the performance analyzing factors. Contributions of this study are summarized as follows:
The application of SavitzkyGolay filter for Lung sound denoising.
A significant result is obtained at certain parameter tuning of SavitzkyGolay filter.
The rest of the paper is organized as follows: Section 2 presents materials and methods used in this study, section 3 presents results followed by discussion and conclusions in section 4 and 5 respectively..
MATERIALS AND METHODS
Data Recording
Lung sound recording obtained from 30 healthy subjects in the age group of 1845 years were included in this study. Informed consent was obtained from the subjects before conducting the study. Electronic stethoscope model 3200 was used to record the breath sound signal of subjects. Recoding was done from the thorax position of each subject in sitting position. Subjects were instructed to first relax so that recording could be done at normal breathing rate. Each subject’s tidal breath was recorded for 20 seconds. All the signals were recorded in .wav file format. The sounds format was mono, 32 bits with 8000 samples per second.
SavitzkyGolay filter
The SaviztkyGolay (SG) filtering can be considered as a generalized moving average filter. It is a low pass filter whose structure is similar to a finite impulse response (FIR) filter. It is well suited for its signal smoothening operation, thereby increasing the signaltonoise ratio without altering the signal. This is accomplished with a process called convolution, by placing a low degree polynomial in place of successive adjacent data points by the linear least squares method.
The SG filters are designed to fit a specific polynomial to a signal frame using least squares method. The central point of the window is replaced with that of the polynomial to produce the smoothened signal output. The polynomial can be expressed as:
Where ^{‘}ρ’ indicates the related apparent resistivity data vector, ‘r_{i} ^{’} shows the north coordinate point of resistivity map. The designing of SG filter can be done by first deciding the length of filter ‘k’, order of derivative n order of polynomial ‘p’ and the smoothing window size ‘N’.
N value is taken as odd with N≥p+1. The polynomial is substituted to points N=N_{r}+ N_{l}+1 of the signal when the coefficients of SG filter are applied to the signal. Here, N_{l} and N_{r} indicate the left and right signal point of a present signal point.
The polynomial coefficients can be estimated as:
Where M can be expressed as,
Vector of polynomial coefficient ‘c’ can be represented as:
‘ρ’ is the vector of data values of size k.
Using least squares of the matrix, the vector of polynomial coefficients could be obtained as
The polynomial coefficients of ‘c’ could be represented as a linear combination of row values of (M^{t}M)^{1}M^{t}ρ. The polynomial value at ρ_{0} can be equal to c_{0} as other values of polynomial are zero. At derivative order 0, the SavitzkyGolay can be showed as the coefficients of central row of matrix (M^{t}M)^{1}M^{t}ρ.
Proposed Methodology
The recorded signals were filtered by passing them through SG filter to suppress the noise contaminants. Polynomial order and window size were the two filter parameters which were optimized to obtain good SNR values. SNR was computed by varying one parameter while keeping another as fixed and vice versa. Good SNR values were observed by simulating at many different parameter settings. Since, for each experiment SNR computation took different time hence computation time was also estimated along with calculation of SNR.
Performance Evaluation
Signal to noise ratio (SNR) and computation time were used as performance measures. SNRis estimated after filtering the lung sound signal. SNR is calculated by determining the ratio of root mean squareof signal to root mean square of noise which is further multiplied by 20× log_{10}to obtain SNR in decibels.The input and output spectrum were analyzed based on these performance analyzing factors.
RESULTS
This section presents the results of experiments conducted. The noisy lung sound and the corresponding filtered signal using SG filter is shown in Figure 1(a) and 1(b) respectively.
Lung sound signal before and after filtering: (a) noisy signal and, (b) filtered signal using SG filter
The noise suppression can be controlled with two parameters; window size and polynomial degree. To optimizethese filter parameters, one parameter is kept constant while varying another one. While varying the parameters it was assured that the order should be smaller than frame length and frame length should be always chosen as odd. It is observed that at constant polynomial degree, if the window length is increased, the output signal gets smoothened as shown in Fig. 1(b).
Filter performance is tested for all the possible combination of parameter values. Table1 shows the maximum SNR value obtained for different combination of filter parameters along with corresponding computation time. Here, SNR_{1} and SNR_{2} are corresponding signal to noise ratio with T_{1} and T_{2} their respective computation time while denoising two different lung sound signals.
The filter performance was evaluated by calculating Signal to noise ratio(SNR) and computation time. Figure 1(c) and 1(d) showed SNR plot against polynomial order keeping frame length as constant. Figure 2 shows SNR plot against frame length keeping polynomial order as constant. Figure 3 shows SNR plot against frame length keeping polynomial order as constant.
As a result, SNR was found to maximum when frame length was selected nearest to the value just higher than polynomial order. This observation holds good for different noise levels as well.Though for an effective response good SNR is expected, but on the other hand it is also expected that high SNR should be obtained in less computation time.Therefore, computation time was also estimated after each filtration. The selection of optimum parameter was necessary to obtain the best filtered output signal. That parameter was selected as the optimalthatyields better SNR at minimum computation time.Maximum SNR values were estimated after closely observing the filter performance by adjusting the various parameter values. Referring Table 1, the polynomial order 8 and frame length 9 produced significant SNR of 10.401db in small computation time of 2.1ms. Also, the polynomial order 14 and frame length 15 produced SNR value of 10.385db at computation time of 3ms. On the other hand, the polynomial order 32 and frame length 33 resultedinto highest SNR value of 15.928db with very high computation time of86.7ms. Though very high SNR was obtained but performance was unreliable as computation time also was high. With parameter setting of polynomial order 8 and frame size 9, good SNR is obtained at low computation time. This performance is found to be better than outcomes of all other parameter settings. Figure 4 shows the single sided amplitude spectrum of noisy and filtered lung sound signal at parameter tuning of polynomial order 8 and frame size 9. With this spectrum analysis, it is clear that this filter successfully attenuates all the high frequency components present in the signal. SG is a kind of low pass filter which attenuates the high frequency components present in the noisy lung sound signal as shown in Figure 4.Therefore, the results hold more promising at polynomial order 8 and frame length 9.
SingleSided Amplitude Spectrum of: (a) noisy lung sound signal and, (b) filtered lung sound signal.
DISCUSSION
This is a novel method to reduce the noise contaminations from the lung sound signal using SG filter. The SG found to be simple and versatile. The proposed work involved a simple algorithm in contrast to all the available studies. It involved selection of only two parameters and original signal structure is maintained during denoising operation. Existing studies has several drawbacks. The empirical mode decomposition and fractal dimension algorithm for noise suppression from lung sound is very complicated as demonstrated by Hadjileontiadis et al.[^{10}10 Hadjileontiadis, L. J. A novel technique for denoising explosive lung sounds empirical mode decomposition and fractal dimension filter. IEEE Engineering in Medicine and Biology Magazine, 26(1): 3039, (2007).]. Also, this method has mode mixing issues. This method improves the signal to noise ratio but at the same time degrades the original signal.Formulation of modified local projection algorithmwas difficult as discussed by Molaie et al. [^{11}11 Molaie, M, Jafar, S, Moradi, M. H., Sprott, J. C., Golpayegani, S.M.R.H. A chaotic viewpoint on noise reduction from respiratory sounds. Biomedical Signal Processing and Control, 10:245249, (2014).]. It involved complex stretching and folding procedure for curve selection from trajectory. Overall, the procedure was lengthy and complex.Prior knowledge of signal of interest was required for noise rejection operation using adaptive subtraction scheme method as per Emmanouilidouet al. [^{12}12 Emmanouilidou, D, McCollum, E.D., Park, D.E., Elhilali, M. Adaptive noise suppression of pediatric lung auscultations with real applications to noisy clinical settings in developing countries. IEEE Transactions on Biomedical Engineering, 62(9): 22792288, (2015).]. Also, signal and noise are not clearly separated due to their spatial predictability. Only pediatric lung sound was assessed. Adaptive subtraction is not suitable when signal and noise arecorrelated.
In contrast to the existing noise reduction methods, this proposed work demonstrates improved performance in terms of both qualitative and quantitative measurements. This work produced good signal to noise ratio (SNR) for all noise levels. Suppression of noiseand the filter performance evaluation were conducted in MATLAB^{®} on computer system with Intel® core ™ i34030U, 1.90GHz processor, 64 bit operating system and 4GB RAM. After analyzing the characteristics of the entire spectrum, the optimum parameters were found to be polynomial order 8 and frame length 9. Hence, SG filter could successfully reduce noises from the lung sound signal.
CONCLUSION
SG filter has several benefits. It supports straightforward and easy way of running the least squares polynomial fitting. It is easy to get filter coefficients. It involves easy implementation of convolution than least squares calculation. This filter is entirely very simple, of will full lengths and involve low computation cost.
SG filter has several advantages over the standard filtering methods. It surpasses moving average filter in valid signal preservation. Additionally, this filter is superior in contrast to wiener filter. Wiener is also another method based on least square estimation similar to SG filter, but wiener filter working is limited only for input characterized with wide sense stationary, and required prior information of statistical characteristics of input signal. Performance of wiener filter is affected as the existence of these two criteria’s are practically very difficult. Wavelet based denoising is also widely acceptable in denoising the seismic signal. SG filter is better than wavelet as it has better signal perseverance quality. Though the results of proposed study are promising, there are certain limitations of this study: (i) several experiments were conducted to obtain optimal parameters of filter; (ii) the proposed approach was evaluated on limited database consisting of healthy subjects. In future, an automated parameter optimization technique can be incorporated to improve the performance of proposed methodology. Further, the method can be evaluated on larger database.
In this paper, SG filter was used to suppress noise to improve the quality of lung soundby varying polynomial degree and frame size. SNR and computation time was taken as a performance analyzing factor. From simulation outcomes, better result is found when frame length is nearest to the value just higher than the polynomial order.With this method,lung sound noise removal was done without deforming the original signal structure.Thus, the proposed method is a significant approach for denoising lung sound signal.
REFERENCES

^{1}Pasterkamp, H, Kraman, S.S., Wodicka, G. R. Respiratory sounds advances beyond the stethoscope. Am J Respir Crit Care Med, 156:974987,(1997).

^{2}Jones, A. A brief overview of the analysis of lung sounds. Physiotherapy, 81: 3742(1995).

^{3}Leng, S, Tan, RS, Chai, KTC, Wang, C, Ghista, D, Zhong, L. The electronic stethoscope. Bio Medical Engineering Online, 14:66, (2015).

^{4}Mondal, A, Bhattacharya, P, Saha,G. Detection of lungs status using morphological complexities of respiratory sounds. The Scientific World Journal, 182938:19, (2014).

^{5}Haider, N. S., Joseph, J, Periyasamy, R. An investigation on the statistical significance of spectral signatures of lung sounds.Biomedical Research, 28 (4): 28012810, (2017).

^{6}Wang, H, Wang, L.Y. Multisensor adaptive heart and lung sound extraction. Proceedings of IEEE Sensors,2: 10961099, (2003).

^{7}Wang, Z, Nuno, da Cruz J, Wan, F. Adaptive fourier decomposition approach for lungheart sound separation.IEEE International Conference on Computational Intelligence and Virtual Environments for Measurement Systems and Applications (CIVEMSA), Shenzhen, 15, (2015).

^{8}Gnitecki, Moussavi, M.K.Z. Separating heart sounds from lung soundsaccurate diagnosis of respiratory disease depends on understanding noises. IEEE Engineering in Medicine and Biology Magazine,26(1):2029, (2007).

^{9}Iyer, V.K., Ramamoorthy, P. A., Fan, H, Ploysongsang, Y. Reduction of Heart Sounds from Lung sounds by Adaptive Filtering. IEEE Transactions on Biomedical Engineering, 33(12):11411148, (1986).

^{10}Hadjileontiadis, L. J. A novel technique for denoising explosive lung sounds empirical mode decomposition and fractal dimension filter. IEEE Engineering in Medicine and Biology Magazine, 26(1): 3039, (2007).

^{11}Molaie, M, Jafar, S, Moradi, M. H., Sprott, J. C., Golpayegani, S.M.R.H. A chaotic viewpoint on noise reduction from respiratory sounds. Biomedical Signal Processing and Control, 10:245249, (2014).

^{12}Emmanouilidou, D, McCollum, E.D., Park, D.E., Elhilali, M. Adaptive noise suppression of pediatric lung auscultations with real applications to noisy clinical settings in developing countries. IEEE Transactions on Biomedical Engineering, 62(9): 22792288, (2015).

^{13}Rivolo, S, Patterson, T, Asrress, K.N., Marber, M, Redwood, S, Smith, N.P., Lee, J. Accurate and standardized coronary wave intensity analysis.IEEE Transactions on Biomedical Engineering, 64(5):11871196, (2017).

^{14}Baba, K, Bahi, L, Quadif, L. Enhancing geophysical signals through the use of SavitzkyGolay filtering method. Geofísica Internacional,53(4):399409, (2014).

^{15}Acharya, D, Rani, A, Agarwal, S, Singh, V. Application of adaptive SavitzkyGolay filter for EEG signal processing.Perspectives in Science,8: 677679,(2016).

^{16}Liu, Y, Dang, B, Li, Y, Lin, H, and Ma, H. Applications of SavitzkyGolay Filter for Seismic Random Noise Reduction. Acta Geo physica, 64(1):101124, (2016).

^{17}Hargittai, S. SavitzkyGolay leastsquares polynomial filters in ECG signal processing. Computers in Cardiology, 32:763−766, (2005).

^{18}Liu, J., Li, S., Li, X., Klein, C., Rymer, W. Z., Zhou, P. Suppression of stimulus artifact contaminating electrically evoked electromyography. Neuro Rehabilitation, 34(2): 381389, (2014).

^{19}Krishnan, S. R., Seelamantula, C.S. On the selection of optimum SavitzkyGolay Filters. IEEE Transactions on Signal Processing, 61(2): 380391, (2013).
Publication Dates

Publication in this collection
2018
History

Received
27 Apr 2018 
Accepted
22 Aug 2018