4
A Multi-Channel Device for Respiratory Sound Data Acquisition and Transient Detection I. Sen, Y. P. Kahya Department of Electrical and Electronic Engineering, Bogazici University, Istanbul, Turkey Abstract-In this study, a multi-channel analog data acquisition and processing device with the additional feature of detecting adventitious sounds has been designed and implemented. The overall system consists of fourteen microphones attached on the backside, an airflow measuring unit, a fifteen-channel amplifier and filter unit connected to a personal computer (PC) via a data acquisition (DAQ) card, and an interface and adventitious sound detection program prepared using LabVIEW (6.0, National Instruments) and MATLAB (7.0.1, MathWorks). The system records the fourteen-channel respiratory sound data at the posterior chest wall and in addition measures the air flow to synchronize the pulmonary signal on the respiration cycle. Respiratory data are amplified and band-pass filtered, whereas flow signal is only low-pass filtered since it is a low-frequency signal with sufficiently high amplitude. All data are sent to a PC to be digitized by DAQ card, then to be processed and stored. An algorithm based on wavelet decomposition is developed which detects the adventitious pulmonary sounds, mainly the crackles and wheezes. This system is intended to be used for mapping the pulmonary sounds and detecting and locating the adventitious pulmonary sounds. I. INTRODUCTION Adventitious sounds are additional respiratory sounds superimposed on normal breath sounds and can be discontinuous (crackles) or continuous (wheeze) [1]. Crackles are explosive, transient in character [2] and can be classified as fine (higher pitch) or coarse (lower pitch). As a general rule, their duration is less than 20 ms, with a wide frequency range (100 to 2000 Hz) [2]. Wheeze is a sinusoidal waveform with duration of at least 80 ms (the smallest value proposed) [3]. Different suggestions have been made about its frequency range, the widest being from 80 to 1600 Hz [4]. The presence of adventitious sounds usually indicates a pulmonary disorder [1]. The type of the adventitious sounds, the number of occurrence per one breath and their location within the flow cycle give valuable information about the type and severity of the disease. Stethoscope auscultation is an easy, cheap and common method in the diagnosis of respiratory diseases, but is considered to be of low diagnostic value due to its unreliability. The main shortcomings of this method stem from its subjectivity since it strongly depends on the physician’s experience, its incapacity to keep records and This project was sponsored by Bogazici University Research Fund under Project No. 02A202. the limited bandwidth of the stethoscope which attenuates the frequencies above 120 Hz, in spite of the fact that respiratory sounds are known to include frequencies up to 2000 Hz and human ear is not very sensitive to frequencies below 120 Hz [5]. Using computerized techniques in respiratory sound processing has led to the solution of such problems and hereby to tools that have higher diagnostic value. Studies on this issue have been summarized together with their historical background, in some articles [3, 6]. Recently, electronic circuits are being used to acquire and process respiratory sounds. Newly developed methods allow the storage of sound data and their visualization via graphical representations. These methods can be summarized as first capturing the sound (by means of microphones attached on the chest wall), then analog pre-processing and digitization, and finally signal processing. Fig. 1. Sample waveforms for a fine crackle, a coarse crackle, and a wheeze Proceedings of the 2005 IEEE Engineering in Medicine and Biology 27th Annual Conference Shanghai, China, September 1-4, 2005 0-7803-8740-6/05/$20.00 ©2005 IEEE. 6658

[IEEE 2005 IEEE Engineering in Medicine and Biology 27th Annual Conference - Shanghai, China (2006.01.17-2006.01.18)] 2005 IEEE Engineering in Medicine and Biology 27th Annual Conference

  • Upload
    yp

  • View
    218

  • Download
    4

Embed Size (px)

Citation preview

Page 1: [IEEE 2005 IEEE Engineering in Medicine and Biology 27th Annual Conference - Shanghai, China (2006.01.17-2006.01.18)] 2005 IEEE Engineering in Medicine and Biology 27th Annual Conference

A Multi-Channel Device for Respiratory Sound Data Acquisition and Transient Detection

I. Sen, Y. P. Kahya Department of Electrical and Electronic Engineering,

Bogazici University, Istanbul, Turkey

Abstract-In this study, a multi-channel analog data acquisition and processing device with the additional feature of detecting adventitious sounds has been designed and implemented. The overall system consists of fourteen microphones attached on the backside, an airflow measuring unit, a fifteen-channel amplifier and filter unit connected to a personal computer (PC) via a data acquisition (DAQ) card, and an interface and adventitious sound detection program prepared using LabVIEW (6.0, National Instruments) and MATLAB (7.0.1, MathWorks). The system records the fourteen-channel respiratory sound data at the posterior chest wall and in addition measures the air flow to synchronize the pulmonary signal on the respiration cycle. Respiratory data are amplified and band-pass filtered, whereas flow signal is only low-pass filtered since it is a low-frequency signal with sufficiently high amplitude. All data are sent to a PC to be digitized by DAQ card, then to be processed and stored. An algorithm based on wavelet decomposition is developed which detects the adventitious pulmonary sounds, mainly the crackles and wheezes. This system is intended to be used for mapping the pulmonary sounds and detecting and locating the adventitious pulmonary sounds.

I. INTRODUCTION

Adventitious sounds are additional respiratory sounds superimposed on normal breath sounds and can be discontinuous (crackles) or continuous (wheeze) [1]. Crackles are explosive, transient in character [2] and can be classified as fine (higher pitch) or coarse (lower pitch). As a general rule, their duration is less than 20 ms, with a wide frequency range (100 to 2000 Hz) [2]. Wheeze is a sinusoidal waveform with duration of at least 80 ms (the smallest value proposed) [3]. Different suggestions have been made about its frequency range, the widest being from 80 to 1600 Hz [4].

The presence of adventitious sounds usually indicates a pulmonary disorder [1]. The type of the adventitious sounds, the number of occurrence per one breath and their location within the flow cycle give valuable information about the type and severity of the disease.

Stethoscope auscultation is an easy, cheap and common method in the diagnosis of respiratory diseases, but is considered to be of low diagnostic value due to its unreliability. The main shortcomings of this method stem from its subjectivity since it strongly depends on the physician’s experience, its incapacity to keep records and

This project was sponsored by Bogazici University Research Fund under Project No. 02A202.

the limited bandwidth of the stethoscope which attenuates the frequencies above 120 Hz, in spite of the fact that respiratory sounds are known to include frequencies up to 2000 Hz and human ear is not very sensitive to frequencies below 120 Hz [5].

Using computerized techniques in respiratory sound processing has led to the solution of such problems and hereby to tools that have higher diagnostic value. Studies on this issue have been summarized together with their historical background, in some articles [3, 6]. Recently, electronic circuits are being used to acquire and process respiratory sounds. Newly developed methods allow the storage of sound data and their visualization via graphical representations. These methods can be summarized as first capturing the sound (by means of microphones attached on the chest wall), then analog pre-processing and digitization, and finally signal processing.

Fig. 1. Sample waveforms for a fine crackle, a coarse crackle, and a wheeze

Proceedings of the 2005 IEEEEngineering in Medicine and Biology 27th Annual ConferenceShanghai, China, September 1-4, 2005

0-7803-8740-6/05/$20.00 ©2005 IEEE. 6658

Page 2: [IEEE 2005 IEEE Engineering in Medicine and Biology 27th Annual Conference - Shanghai, China (2006.01.17-2006.01.18)] 2005 IEEE Engineering in Medicine and Biology 27th Annual Conference

In this project, respiratory sounds are captured via microphones and band-pass filtered after being amplified. Air flow signal is measured simultaneously by a flow-meter and low-pass filtered. Pre-processed respiratory data and flow data are then digitized using a DAQ card, displayed on the screen and stored on PC, by means of an interface prepared with LabVIEW. The same interface program is augmented as to detect adventitious respiratory sounds such as crackles and wheezes, to determine their location on the flow cycle, and to tabulate their type and count information. The final aim is to extract a map of lungs in terms of adventitious sounds.

II. DESIGN

Below is given a summary of the system part requirements from literature and the pertinent components chosen accordingly.

A. Microphones Microphones (Sony ECM-44BPT electrets) have been

located and fixed into Teflon capsules with conical air cavity which have been designed and implemented following the conclusions of [7]. These capsules are attached on the chest wall at fourteen locations which have been determined with the collaboration of a physician as to scan the lung area properly. The distribution of locations is shown in fig. 2.

B. Amplifier and Filter This unit is a stand-alone module that acquires the

fourteen microphone outputs and the flow-meter output as input through ports on its front panel and sends amplified and filtered 15-channel data to the PC to be digitized from the output port on the back panel. For each one of the respiratory sound channels, first stage is an instrumentation amplifier (IA) with programmable gain. The following band-pass filter is constructed by cascading one high-pass and one low-pass stage, each with unity gain [8]. The output stage is a level adjuster, that is, a low-pass filter with a gain of two. For the flow signal a unity gain low-pass filter is used.

The IA should be a low-noise and low-voltage (for ease of use and safety) amplifier with high common-mode rejection ratio (CMRR) and programmable gain. For this, INA128 (Burr-Brown) has been chosen. By selecting

between two resistors with jumpers, one of either gain values (100 and 200) can be selected.

High-pass filter is needed in order to filter out the distortions due to heart and muscle noise, and to external low-frequency noise. Cut-off frequency is chosen between 30 and 150 Hz by most researchers [6]. Pass-band ripples are not allowed, and a linear phase response is recommended in order not to distort transients with a wide bandwidth and short duration [8]. Skirt slope is usually chosen to be larger than 18 dB/oct in respiratory sound analysis [8]. Following these requirements, a 6th order Bessel type filter has been chosen, yielding a slope of 36 dB/oct in the reject-band. Cut-off frequency is 80 Hz. The filter is implemented using MC33204 (OnSemi) rail-to-rail low-voltage quad-opamps, and cascading three second order stages in unity gain KRC configuration [9].

Low-pass filtering is necessary in digitization in order to prevent aliasing. Cut-off frequency should be at most half of the sampling frequency of the analog to digital converter (Nyquist frequency). Our DAQ card allows a maximum of 13 kHz sampling rate per channel (200 kHz in total for fifteen channels). Our sampling rate has been chosen 9.6 kHz to be safe and to be consistent with a previous study carried out in our laboratory. Our cut-off frequency is 4 kHz, which is higher than the bandwidth usually chosen for respiratory sound applications, which is 1.6-3 kHz [6], in order to include the fine crackles in the higher frequency content. Since pass-band ripples are not allowed, filter type is Butterworth, and the order is 8 for a steep skirt slope (48 dB/oct). For the implementation, MAX295 (Maxim) has been used. It is an 8th order low-pass Butterworth filter with programmable cut-off. Cut-off programming can be done by selecting either of two capacitors connected to one of the pins. The two possible values are 4 kHz (for 9.6 kHz sampling rate) and 2 kHz (for 4.8 kHz sampling rate).

Level adjuster filter is needed to smooth the staircase-like output of MAX295, which is due to its switched-capacitor nature. The filter is realized using second order Butterworth filters in equal-component KRC configuration, again with MC33204 opamps. Since low frequency distortions can saturate the IA at input stage before high-pass filtering, the IA gain can not be set to the overall gain desired. Instead, the gain is shared between the IA and this level adjuster at the output stage. A gain of two is suitable for final level adjustment. Cut-off frequency of the filter is 10 kHz.

Fig. 3 shows the frequency response of the amplifier & filter unit for one respiratory signal channel and the flow channel. This is the case when IA gain is 100 (i.e. an overall gain of 200 46 dB with the level adjuster), and higher cut-off is 4 kHz.

Flow signal is measured using a Fleisch-type flow-meter (Validyne CD379). A low-pass filter with a low cut-off frequency (35 Hz) is used since the flow cycle (inspiration and expiration) is a low frequency signal. Hardware gain is unity and the multiplier factor obtained from calibration is inserted in the software. For the filter, TL081 (FET input, low-power opamp) has been used in second order Butterworth KRC configuration.

Fig. 2. Placement of fourteen microphones on the chest wall

6659

Page 3: [IEEE 2005 IEEE Engineering in Medicine and Biology 27th Annual Conference - Shanghai, China (2006.01.17-2006.01.18)] 2005 IEEE Engineering in Medicine and Biology 27th Annual Conference

Using the typical/maximum supply voltage and current values of the integrated circuits, approximate power consumption of the unit can be calculated. For fourteen respiratory sound channels and one flow channel the power consumption is typically 3 W, and maximally 4.5 W.

C. Digitization Amplified and filtered signal is sent to the DAQ card

(National Instruments DAQ Card – 6024E, 12-bit) connected to a PC, in order to be digitized. The total sampling frequency for all channels is 200 kilo samples/second, as mentioned before.

D. Interface Program An interface has been prepared using LabVIEW in order to capture the signals that arrive at the DAQ card, to plot the data, to allow listening to the recorded sounds when desired and to store them for further use. Finally, an acoustic map of the subject indicating the locations and number of fine crackles, coarse crackles and wheezes is also plotted. All actions are possible both for newly acquired data and previously stored data. Some important information about the subject (name, family name, diagnosed disease if exists, hospital name and date) is also saved together with the respiratory data.

III. ALGORITHM

The crackle and wheeze detection algorithm is mainly based on separating the signal into frequency bands by wavelet decomposition, applying a nonlinear energy operator to the relevant bands in order to enhance transients, then by keeping the coefficients that remain above a selected threshold (according to a rough estimation of information that each band carries), reconstructing the bands to be further processed.

The algorithm is written in MATLAB and inserted in the LabVIEW interface as a MATLAB script.

A. Wavelet Decomposition Adventitious components in respiratory sounds are short-

time waveforms with differing frequency characteristics from those of normal lung sounds and the detection algorithm is intended to locate their time of occurrence, thus a wavelet decomposition is used in this algorithm for time-frequency analysis.

Wavelet decomposition is applied to respiratory signals, using Daubechies 6 (Db6, 12 coefficients), which most resembles a typical crackle. The decomposition is performed at six levels, partitioning the signal into seven frequency bands (i.e. c0:0-75 Hz, d0:75-150 Hz, d1:150-300 Hz, d2:300-600 Hz, d3:600-1200 Hz, d4:1200-2400 Hz, and d5:2400-4800 Hz, where sampling rate is 9600 Hz) [10].

The coarsest level (c0) is assumed to carry the low-frequency information of the background lung sound with an approximation to healthy case without adventitious components. It is also assumed that crackles and wheezes occur within the 150 to 1200 Hz frequency band. The rationale behind this assumption is that frequency spectra of coarse crackles make a peak around 200 Hz whereas those of fine crackles make a peak around 600 Hz, although the band may extend from 100 to 2000 Hz. These peaks have been calculated regarding the two-cycle duration (2CD) values for coarse and fine crackles as suggested in [11] and [12], taking the maximum suggestion for coarse (9.5 ms) and the minimum for fine (3.3 ms). (A single crackle can be thought of a two-cycle sinusoid although it is not, when estimating the peak frequency component in its spectrum). Several suggestions exist in literature about the frequency range of wheezes; [4] and [13] suggest 80 to 1600 Hz and 350 to 950 Hz respectively. Although there is a small probability that wheeze may be present at frequencies above 1200 Hz, the frequency band from 75 Hz (starts with d0) to 1200 Hz (ends with d3) have been used for the detection algorithm, sacrificing algorithm accuracy for faster processing time.

To summarize, a reconstruction that is carried out using only c0 would give us a background approximation, while d0, d1, d2 and d3 carry crackle and wheeze information.

B. Transient Enhancement The coefficients calculated through wavelet

decomposition can be evaluated as a means to locate transients in time. Since crackles and wheezes appear in decomposed bands as noticeable peaks, a nonlinear operator that enhances such sharp occurrences is expected to increase the success of thresholding. For this purpose, Teager energy operator is used. The teager of a series is obtained by subtracting the product of the previous and subsequent sample from the square of each sample, after which operation, the sharp peaks are amplified and the rest is attenuated.

C. Thresholding Following a previous study conducted in our laboratory,

Otsu method is applied for thresholding. Otsu method divides the histogram of samples into two classes by a threshold level as to maximize the interclass variance [14].

Fig. 3. Frequency responses of respiratory and flow channels.

6660

Page 4: [IEEE 2005 IEEE Engineering in Medicine and Biology 27th Annual Conference - Shanghai, China (2006.01.17-2006.01.18)] 2005 IEEE Engineering in Medicine and Biology 27th Annual Conference

Since this method is unsupervised and always separates into two, an empirical criterion is employed for the purpose of preventing noise to be interpreted as crackle or wheeze.

Kurtosis is a measure of how outlier-prone a distribution is. Our requirement is that the kurtosis of wavelet decomposition bands d0, d1, d2 and d3 be significantly larger than 3, the value for a Gaussian distribution (noise). That the kurtosis is much higher than 3 is an indication that the band carries relevant information in our case. As kurtosis gets higher, the histogram level count is increased in Otsu threshold calculation, which leads to a higher resolution, thus less loss of increased information. If it is close to 3, the band is replaced by zeros before reconstruction.

D. Reconstruction Thresholded d0, d1, d2 and d3 bands are subjected to

wavelet reconstruction, the reverse process of decomposition, to project the results back to the original signal measures. Since the samples have been passed through two nonlinear processes such as “Teagering” and thresholding, the reconstructed signal does not depict the original waveforms of crackles and wheezes. Instead, it is like a template that shows the possible locations of important transients. Thus windowing on the original respiratory signal is applied using this reconstructed version. Due to inevitably limited control on thresholding, transients that are neither crackles nor wheezes are also marked as important items, so further processing is needed in order to correctly detect real crackles and wheezes.

E. Final Processing The end-result of windowing is a host of sound signal

segments separated by zeroes. Fast Fourier Transform (FFT) of these segments is calculated and a sharp peak is searched in the spectrum for a wheeze. In the absence of a wheeze, a rough estimate about the crackle type is made and the relevant teagered decomposition band is searched for a nonzero component within the corresponding interval. After obtaining the exact index of the maximum deflection point, a small window is allocated centering the corresponding index in the original data in order to test some criteria regarding crackle definition, such as zero crossings, peak amplitude, local maxima of first derivative, etc.

At the end of the algorithm, the locations of maximum deflection points of crackles and mid-points of wheezes are kept in an array, together with the type information (fine/coarse crackle, wheeze). Their occurrence in the flow cycle (early/mid/late inspiration/expiration) is tabulated also.

IV. CONCLUSIONS

In this study, a system that captures and processes respiratory sounds has been developed. The respiratory sounds are recorded via fourteen microphones attached on the chest wall, with the simultaneous measurement of the air flow for synchronization. Fourteen channels are amplified, band-pass filtered and digitized to be processed on PC, while flow signal is only low-pass filtered before digitization. LabVIEW is used to capture the signal via a

compatible DAQ card, and to run a user interface for basic actions such as plotting captured signals, saving them with subject information, listening to the desired channel, and plotting the acoustic map containing adventitious sounds of the subject. A detection algorithm is developed in MATLAB to detect and locate different crackle types and wheezes. LabVIEW accepts MATLAB scripts, which allows the detection algorithm to be integrated with our interface program.

REFERENCES

[1] Sovijarvi A.R.A., Dalmasso F., Vanderschoot J., Malmberg L.P., Righini G., Stoneman S.A.T., “Definition of Terms for Applications of Respiratory Sounds”, Eur. Respir. Rev., vol.10, no.77, pp. 597-610, December 2000.

[2] Sovijarvi A.R.A., Malmberg L.P., Charbonneau G., Vanderschoot J., Dalmasso F., Sacco C., Rossi M., Earis J.E., “Characteristics of Breath Sounds and Adventitious Respiratory Sounds”, Eur. Respir. Rev., vol.10, no.77, pp. 591-596, December 2000.

[3] Pasterkamp H, Kraman SS, Wodicka GR., “Advances Beyond the Stethoscope”, Am J Respir Crit Care Med., 156(3 Pt 1), pp. 974-987, September 1997.

[4] Gavriely N., Palti Y., Alroy G., Grotberg J.B., “Measurement and Theory of Wheezing Breath Sounds”, J Appl Physiol, vol. 57, pp 481-492, 1984.

[5] Sovijarvi A.R.A., Vanderschoot J., Earis J.E., “Standardization of Computerized Respiratory Sound Analysis”, Eur. Respir. Rev., vol.10, no.77, p. 585, 2000

[6] Earis J.E., Cheetham B.M.G., “Current Methods Used for Computerized Respiratory Sound Analysis”, Eur. Respir. Rev., vol. 10, no.77, pp. 586-590, 2000.

[7] Kraman S. S., Wodicka G. R., Oh Y., Pasterkamp H., “Measurement of Respiratory Acoustic Signals - Effect of Microphone Air Cavity Width, Shape, and Venting”, Chest, vol. 108, pp. 1004-1008, 1995.

[8] Vanuccini L., Earis J.E., Helistö P., Cheetham B.M.G., Rossi M., Sovijarvi A.R.A., Vanderschoot J., “Capturing and Preprocessing of Respiratory Sounds”, Eur. Respir. Rev., vol. 10, no. 77, pp. 616-620, 2000.

[9] Franco S., Design with Operational Amplifiers and Analog Integrated Circuits, 3rd Ed., McGraw-Hill, 2002.

[10] Burrus. C.S., Gopinath. R.A., Guo H., Introduction to Wavelets and Wavelet Transforms, Prentice Hall, 1998.

[11] A. Cohen, “Signal Processing Methods for Upper Airway and Pulmonary Dysfunction Diagnosis”, IEEE Eng. Med. Biol.,Mag., pp. 72-75, Mar. 1990.

[12] Hoevers, J. and Laudon, R.G., “Measures Crackles”. Chest.Vol. 98, pp. 1240-1243, 1990.

[13] Pasterkamp H., Tal A., Leaby F., Fenton R., Chernick V., “The Effect of Anticholinergic Treatment on Postexertional Wheezing in Asthma Studied by Phonopneumography and Spirometry”, Am Rev Respir Dis, vol. 132, pp. 16-21, 1985.

[14] Otsu N., “A Threshold Selection Method from Gray-level Histograms”, IEEE Transactions on Systems, Man and Cybernetics, vol. 9, no. 1, January 1979.

6661