Recursive Least Squares Adaptive Noise Cancellation Filtering for

14 downloads 0 Views 197KB Size Report
recursive least squares (RLS) adaptive noise cancellation. (ANC) filtering has ... A. Lung sounds and ECG recording. Lung sound ... Hz. The only information in the ECG signal of use in this ... adaptive filter, y(n), is as close to the interference.
Recursive Least Squares Adaptive Noise Cancellation Filtering for Heart Sound Reduction in Lung Sounds Recordings 1

J. Gnitecki1, Z. Moussavi1, H. Pasterkamp2 Department of Electrical and Computer Engineering, University of Manitoba, Winnipeg, MB, Canada 2 Biology of Breathing Group, Manitoba Institute of Child Health, Winnipeg, MB, Canada

Abstract—It is rarely possible to obtain recordings of lung sounds that are 100% free of contaminating sounds from nonrespiratory sources, such as the heart. Depending on pulmonary airflow, sensor location, and individual physiology, heart sounds may obscure lung sounds in both time and frequency domains, and thus pose a challenge for development of semi-automated diagnostic techniques. In this study, recursive least squares (RLS) adaptive noise cancellation (ANC) filtering has been applied for heart sounds reduction, using lung sounds data recorded from anterior-right chest locations of six healthy male and female subjects, aged 10-26 years, under three standardized flow conditions: 7.5 (low), 15 (medium) and 22.5 mL/s/kg (high). The reference input for the RLS-ANC filter was derived from a modified band pass filtered version of the original signal. The comparison between the power spectral density (PSD) of original lung sound segments, including, and void of, heart sounds, and the PSD of RLS-ANC filtered sounds, has been used to gauge the effectiveness of the filtering. This comparison was done in four frequency bands within 20 to 300 Hz for each subject. The results show that RLS-ANC filtering is a promising technique for heart sound reduction in lung sounds signals. Keywords—Adaptive noise cancellation, heart sounds, lung sounds, recursive least squares I. INTRODUCTION The turbulence involved with the movement of air through the respiratory airways is the predominant mechanism responsible for the generation of basic lung sounds. Chest-surface lung sounds have been used for the indication and diagnosis of underlying physiological conditions since the invention of the stethoscope [1]. It has been shown that the intensity of breath sounds increases with increasing airflow; however, the time and frequency domain combination of sounds originating from pulmonary airflow with sounds from heart and muscle in signals acquired on the chest wall, complicates the definition of flow-specific lung sounds as a function of underlying airway conditions for diagnostic purposes. A few researchers have employed adaptive filtering schemes for reducing heart sounds in lung sounds recordings using recursive least squares (RLS) filtering [2, 3], as well as least mean squares (LMS) filtering [4-6], reduced order Kalman filtering (ROKF) [2], and a fourth order statistics filtering technique [7]. However, a preferred signal processing method for this purpose has not been established. In order to quantitatively evaluate the effectiveness of the RLS adaptive noise cancellation (ANC) filtering for heart sounds reduction in lung sounds recordings that was used in this study, a “gold standard” reference was

0-7803-7789-3/03/$17.00 ©2003 IEEE

developed based on a method presented in [8]. The method involves using segments of lung sounds or breath hold signals both including and void of heart sounds and determining power spectral density (PSD) of each signal. Results were compared within four frequency bands with corresponding segments of the RLS-ANC filtered signals. II. METHODOLOGY A. Lung sounds and ECG recording Lung sound data were acquired with a piezoelectric contact accelerometer (Siemens EMT25C) at the 3rd intercostal space anteriorly on the right (right upper lung lobe or RUL) from six healthy subjects (three females) aged 10-26 years. Three lung sounds recordings took place according to three target flows: 7.5 (low), 15 (medium), and 22.5 mL/s/kg (high). Each recording consisted of target breathing for 50 seconds followed by a 10-second breath hold, with ECG (lead I) and flow recorded simultaneously. The sounds signals were filtered to remove DC and to prevent aliasing, using custom-built 8th order Butterworth band pass filters with pass band 7.5 to 2500 Hz, and amplified by a gain of 200. A SensorMedicsTM V6200 Autobox body plethysmograph with accompanying flow sensor provided both a room-noise-resistant environment, and apparatus and software by which to acquire flow information. All signals were digitized at 10.24 kHz and 12bits per sample (National Instruments DAQ). Flow and ECG (Lead I) signals were subsequently down-sampled to 320 Hz. The only information in the ECG signal of use in this project was the R-wave peak location. B. Selective PSD calculation Lung sounds and breath hold signals were sectioned according to three criteria: target inspiratory flow ± 20%; portions free of artifacts; and last 30% of each ECG R-R interval. (Signals were inspected visually and confirmed by listening to detect any artifacts using R.A.L.E.® software.) The PSD of each signal was calculated on 1024-sample (100 ms) segments, Hanning-windowed, with an overlap of 50%. The average PSD analysis was calculated over the segments falling within target flow ± 20% that were also free of artifacts to provide reference spectra of segments that include both heart sounds and lung sounds. Average PSD was also calculated for lung sound segments that were free of heart sounds, using the last 30% of each ECG R-R interval as well as the two other criteria. The hypothesis was

2416

EMBC 2003

that the RLS-ANC filter output signal would fall between these bounds and would be closer to the latter than to the former, indicating reduction in heart sounds without loss or alteration of lung sounds information.

where, y ( n) =

(1)

The algorithm serves to process the reference data U(n) column-by-column and the primary signal x(n) sample-bysample, in order to estimate the tap weights ωk of the transversal filter such that the actual output of the RLS adaptive filter, y(n), is as close to the interference component of the primary input as possible in the MSE sense [9]. Likewise, the output of the ANC filter, e(n), is the minimum MSE (MMSE) estimate, b~ ( n) , of the informationbearing component of the primary signal:

Fig. 1. Block diagram of RLS-ANC filtering scheme

* k

H

(3)

( n )u ( n )

and w (n) = w (n − 1) + k (n)( x(n) − w H (n − 1)u(n) ,

The standard RLS adaptive filtering scheme consists of a transversal filter with finite-duration impulse response (FIR) and an RLS adaptation algorithm, which updates the tap weights ωk of the transversal filter so that the mean square error (MSE) is minimized and an estimate of the desired output results [9]. The RLS scheme was implemented in software, employing the method of least squares in a recursive manner. Fig. 1 depicts the specific configuration in which the general RLS filter was used in this project for ANC. As shown in Fig. 1, the algorithm accepts two input vectors: a reference and a primary input. The primary signal, x(n), contains an interference, m(n), alongside an informationbearing signal component, b(n), and the reference signal, r(n), represents a version of the primary input with a weak or essentially undetectable information-bearing component [9]. Reference data is arranged in an M-by-N rectangular matrix U(n) using the covariance method of data windowing, where M is the filter order (2 in this study), and N is the length of each input vector:

~ b ( n) = e( n) = x ( n) − y ( n ) = [b( n) + m( n)] − y ( n)

∑ ω r (n − k ) = w k =0

C. RLS-ANC filtering

r ( M ) r ( M + 1) ... r ( N )  U (n) =   − + r ( 1 ) r ( 2 ) ... r ( N M 1 )  

M −1

(2)

(4)

in which, wH(n) is the Hermitian transposition of the tapweight vector (4) calculated for the current iteration n, u(n) is the nth column of U(n) (1). Using (2), the MSE is determined as

[

] [

] [

]

E e 2 (n) = E b 2 (n) + E {m(n) − y (n)}2 + 2 E [b(n){m(n) − y (n)}] . (5)

Since all signals in the third term of (5) have been filtered to remove DC and hence have zero mean, this term vanishes. Minimizing the remaining terms, the MMSE is shown as,

[

]

[

]

[

]

min E e2 (n) = min E b 2 (n) + min E {m(n) − y (n)}2 . (6)

Rearranging (2) as e(n) – b(n) = m(n) – y(n), it is clear that both the RLS filter output y(n) and the ANC output e(n) are MMSE estimates of the interference m(n) and the information-bearing component b(n) of the primary input, respectively [10]. Elaborating on the operation of the RLS algorithm, for every u(n), the Kalman gain, k, is determined as P(n − 1)λ−1u(n) . (7) k ( n) = (1 + u(n) H P(n − 1)λ−1u(n)) The matrix P is initialized as P(0) = Iδ, where I is the identity matrix, and δ is a regularization parameter, chosen as less than 0.01 times the variance of the primary input [9]. The “forgetting factor”, λ, represents the memory of the algorithm, and for this study λ = 1, which implies infinite memory. The rest of the algorithm serves to update the Pmatrix, tap weights (initialized to zeros), and outputs y(n) and e(n) based on these values. Table I presents a summary of the use of the RLS filter for both heart sounds detection and reduction in lung sounds signals. In order to provide the reference input, r(n), for the RLS-ANC filter, the original signal was band pass filtered between 20-300 Hz. Adopting the RLS adaptive segmentation method of [11], the heart sounds were located. The start and end points of each heart sound location were applied to the band pass filtered signal and r(n) was constructed using these corresponding portions with zeros in between. The order, M, of the RLS-ANC filter was chosen to be 2 for both heart sound localization and reduction so as to track all of the statistical variations in the input signals. The primary input x(n) represents the lung sounds recording, with m(n) the heart sounds, and b(n) the lung sounds component.

2417

TABLE I STEPS FOR OBTAINING REFERENCE AND FILTERED LUNG SOUNDS SIGNALS USING RLS-ANC ALGORITHM Step 1 2 3 4

Description Band-pass filter lung sounds: FIR filter, 400 tapsa, programmed via Matlab®. Low and high cut off values: 20 and 300 Hz, chosen based on PSD findings (Fig. 2). Output was appropriately delayedb. Use the RLS-ANC configuration with x(n) = original lung sounds, r(n) = x(n-1024), order M = 2, and λ = 1. Output e2(n) provides heart sounds locations (delayed by 1 sample because M = 2). Apply start and end points for each heart sound location to the band pass filtered signal (from step 1) and construct reference using these portions only with zeros in between. Run the RLS-ANC algorithm using x(n) as above and r(n) = the reference obtained as per step 3, with M = 2 and λ = 1. The output e(n) is the RLS-ANC filtered lung sounds signal. a http://www.mathworks.com/support/solutions/data/11108.shtml b http://www.dspguru.com/info/faqs/fir/props.htm

III. RESULTS The results of the average PSD analysis of lung sounds and breath hold signals were averaged within four frequency bands: 20 to 40 Hz, 40 to 70 Hz, 70 to 150 Hz, 150 to 300 Hz. The differences (ratios) between the two PSD calculations, described in section II-B, for original signals per band and section (lung or breath hold sounds) were statistically analyzed with paired t-tests (via SPSS® software). Up to 300 Hz, there was at least a 7.8 dB difference in average PSD of the breath hold segments with and without heart sounds (p < 0.0001). Fig. 2 shows the results for lung sounds for these four bands. As can be seen in Fig. 2, there is a significant difference between the average power of the segments with and without heart sounds in low and medium flow up to 150 Hz. At high flow, however, this difference is significant only below 75 Hz. This was expected, because lung sounds increase with flow and therefore have a masking effect on heart sounds. For this reason, the focus of this study was to remove heart sounds from breath sounds in low and medium flow rates.

Fig. 3. Comparison between the PSD of the original signal with lung sounds (LS) and heart sounds (HS), RLS-filtered signal calculated using this criteria, and original signal without HS, for subject 5, low flow. Values in watts/Hz were referenced to 1E-08 to determine values in dB

Fig. 3 shows the PSD of the RLS-ANC filtered signal in comparison to the average PSD of the original signal without heart sounds, for both lung sounds and breath hold. The average PSD of the output of the RLS-ANC filter closely match the PSD of heart-sound-free lung sounds. For lung sounds, statistical analysis indicated that the differences between these two particular PSD values across subjects per frequency band are not significant for either low or medium flow (with p > 0.05 and p > 0.17 respectively). For breath hold sounds, the differences are statistically significant (p < 0.05) for all four bands, with values per flow and frequency band shown in Table II. Results for both lung sounds and breath hold indicate that in the RLS-ANC filtered signals, heart sounds have been significantly quantitatively reduced. IV. DISCUSSION Methods of RLS-ANC filtering are applicable for signals that are non-stationary in terms of second-order statistics [9, 10]. Lung and heart sound signals may be considered stationary in segments although not as whole signals [12]. Therefore, the algorithm was designed to have infinite memory (λ = 1), and low order (M = 2): to track all of the statistical variations. Regarding steps 2 and 3 of Table 1, which explain the use of the original signal as both inputs TABLE II DIFFERENCES (MEAN ± STANDARD ERROR) IN dB BETWEEN AVERAGE PSD OF RLS-ANC FILTERED AND HEART-SOUND-FREE-ORIGINAL BREATH HOLD SIGNALS, PER FLOW AND BAND Flow

20-40 Hz

40-70 Hz

70-150 Hz

150-300 Hz

Low Med

2.63 ± 0.94 3.79 ± 0.70

4.07 ± 1.28 5.56 ± 0.61

4.68 ± 2.03 6.24 ± 1.49

2.86 ± 1.03 5.10 ± 1.07

Fig. 2. Differences between PSD calculated for lung sounds including and excluding heart sounds, RUL, flows 7.5 mL/s/kg (low), 15 mL/s/kg (med), and 22.5 mL/s/kg (high), 6 subjects. Error bars depict mean standard error.

2418

to the RLS-ANC to locate heart sounds, a delay of 100 ms was chosen based on a few considerations. First, heart sound peaks were observed to occur within approximately 100 ms; second, the time between first and second heart sounds is longer than this, so that heart sounds in x(n) do not correspond with those in r(n) and thus the RLS filter will preserve them, while minimizing the rest of the signal, ideal for heart sound localization. A key point in using adaptive filtering for noise cancellation is that the interference component in the primary input m(n) (heart sounds in this case) and the reference signal r(n) (band pass filtered signal with heart sounds localized) must be highly correlated with each other and ideally not correlated at all with the desired information component of the primary input, b(n) (lung sounds) [9]. Thus, the choice of the reference input in adaptive filtering is crucial. Some researchers have used an ECG signal as the reference and designed a filter with a large number of tap weights (300 [4] and 1000 [5], for example). Ideally, the reference and primary inputs should be of the same type (i.e., both should be sound signals), and therefore the choice of ECG as a reference input for adaptive filtering of lung sounds to reduce heart sounds seems to be unsuitable. To obtain the reference signal, others have used a specialized algorithm [7], which detected heart sound peaks in windows across the original lung sounds recording and applied these locations to a band-pass filtered version of the original signal. In our study, a band-pass filtered signal was used as the reference as well, though with different cut off frequencies and a different method of obtaining the reference all together (Table I). Both cut off frequencies are critical, and depend largely on sensor location. For the signals used in this paper the cut off frequencies used by others [7] were not optimal. Another approach to obtain a reference input for RLS adaptive filtering is to place a sensor especially for this purpose near the heart for congruent acquisition with lung sounds [3]. Inevitably, there is lung sounds information in any band between 20 and 1000 Hz [1]. Separately acquired reference signals said to contain mainly heart sounds were also used by another group [2]. However, these required a time-alignment procedure with the main input. This approach would have been difficult in our study since it would have required the recording of heart sounds without lung sounds during 50 seconds of breath hold in repeated acquisitions. One drawback of using ECG-based localization of heart sounds for selected sampling of lung sounds is the rejection of at least two thirds of the data. Also, the resulting segments of the recordings cannot be listened to conveniently because the segments are short in duration and splicing would introduce artifacts. Finally, the choice of filter order used by other groups for RLS filtering differed from the order used here. One choice [2] had been tested for our study and proved unsuccessful, perhaps because in that study, simulated breathing signals had been used. The filter order was similar

to that used by another group [3], though with different reasoning; they had cited that a low filter order is appropriate because the various frequency components lung and heart sounds are affected similarly in terms of attenuation and phase after passing through pulmonary tissue [3], whereas we had considered statistical variations. V. CONCLUSION The results obtained for heart sounds reduction in lung sounds signals using RLS-ANC filtering for low and medium flow signals show promising results in heart sound reduction from lung sound recordings without hampering the breath sounds. Future work includes analyzing the data set used in this study with previously-tested adaptive filtering methods, as well as testing other techniques that have been used for heart sound reduction, for a full comparative study.

2419

REFERENCES [1] H. Pasterkamp, S. S. Kraman, and G. R. Wodicka, “Respiratory sounds: Advances beyond the stethoscope,” Am. J. Respir. Crit. Care Med., vol. 156, no. 3.1, pp. 974-87, 1997. [2] S. Charleston and M.R. Azimi-Sadjadi, “Reduced order Kalman filtering for the enhancement of respiratory sounds,” IEEE Trans. Biomed. Eng., vol. 43, no. 4, pp. 421-424, Apr. 1996; vol. 43, no. 6, p. 668, June 1996. [3] L. Yang-Sheng, L. Wen-Hui, and Q. Guang-Xia, “Removal of the heart sound noise from the breath sound,” in Proc. 10th Ann. Int. Conf. IEEE Engineering in Medicine Biology Society, EMBC’88, pp. 175-176. [4] V. K. Iyer, P. A. Ramamoorthy, H. Fan, and Y. Ploysongsang, “Reduction of heart sounds from lung sounds by adaptive filtering,” IEEE Trans. Biomed. Eng., vol. 33, no. 12, pp. 11411148, Dec. 1986. [5] L. Yip and Y. T. Zhang, “Reduction of heart sounds from lung sound recordings by automated gain control and adaptive filtering techniques,” in Proc. 23rd Ann. Int. Conf. IEEE Engineering in Medicine Biology Society, EMBC’01, Istanbul, Turkey, pp. 2154-2156. [6] M. Kompis and E. Russi, “Adaptive heart-noise reduction of lung sounds recorded by a single microphone,” in Proc. 14th Ann. Int. Conf. IEEE Engineering in Medicine and Biology Society, EMBC’92, pp. 691-692. [7] L.J. Hadjileontiadis and S.M. Panas, “Adaptive reduction of heart sounds from lung sounds using fourth-order statistics,” IEEE Trans. Biomed. Eng., vol. 44, no. 7, pp. 642-648, Jul. 1997. [8] H. Pasterkamp, R. Fenton, A. Tal, and V. Chernick, “Interference of cardiovascular sounds with phonopneumography in children,” Am. Rev. Respir. Dis. vol. 131, no. 1, pp. 61-64, Jan. 1985. [9] S. Haykin, Adaptive Filter Theory. Upper Saddle River, NJ: Prentice-Hall, 2002, ch. 1, 8, and 9. [10] R. Rangayyan, Biomedical Signal Analysis. Indianapolis, IN: John Wiley & Sons, 2001, ch. 3. [11] Z. Moussavi et al., “Screening of Vibroarthrographic Signals via Adaptive Segmentation and Linear Prediation Modeling,” IEEE Trans. Biomed. Eng., vol. 43, no. 1, pp. 15-23, Jan. 1996. [12] A. Cohen, Biomedical Signal Processing Volume I: Time and Frequency Domains Analysis. Boca Raton, FL: CRC Press, 1986, ch. 6.