A Review on Separation of Heart Sounds From Lung Sounds with LMS & NLMS Adaptive Line Enhancer Implementation using TMS320C6713 DSK

Download Full-Text PDF Cite this Publication

Text Only Version

A Review on Separation of Heart Sounds From Lung Sounds with LMS & NLMS Adaptive Line Enhancer Implementation using TMS320C6713 DSK

Blessy Konnayil Roy

Department of ECE

Tejaa Shakthi Institute Of Technology for Women Coimbatore, India

Devi Aruna Maharasi. M

Department of ECE

Tejaa Shakthi Institute Of Technology for Women Coimbatore, India

Akshitha. A.V,

Department of ECE

Tejaa Shakthi Institute Of Technology for Women Coimbatore, India

Induja. M

Department of ECE

Tejaa Shakthi Institute Of Technology for Women Coimbatore, India

K. Sathesh

Department of ECE

Tejaa Shakthi Institute Of Technology for Women Coimbatore, India

Abstract- Heart sounds and lung sounds that hampers the potential of respiratory sound analysis in terms of diagnosis of respiratory disease. Lung sound signal (LSS) measurements are taken to aid in the diagnosis of various diseases. The separation of lung sound from the heart sound are analyzed here using TMS320C6713 DSK. Their interpretation is difficult however due to the presence of interference generated by the heart. Novel digital signal processing techniques are therefore proposed to automate the removal of the heart sound signal (HSS) interference from the LSS measurements. LMS and NLMS adaptive equalizer techniques are therefore proposed to automate the removal of the heart sound signal (HSS) interference from the LSS measure. The initial filter coefficients are loaded to both FIR filter and the Least Mean Square network. This output is compared with the Heart signal and the error signal is generated. The error signal is the required Lung sound. This feedback is repeated until the error becomes equal to an acceptable value. The basis for the pattern matching algorithm without feature extraction is an ECG wave from database with ECG signals and patient diagnosis information.Design blocks that may be unavailable in Simulink, will be coded in C-code and called as subroutines using the Matlab embedded function as if they were built in functions. In our project we have used a Texas Instruments TMS320C6713 DSK to generate and process the electrocardiogram signal in digital domain.

Keywords- Adaptive filter; LMS Algorithm; TMS320C6713 Implementation; Heart sounds; lung sounds; NLMS algorithm; matlab; Code Composer Studio V3.1.

  1. INTRODUCTION

    Respiratory sounds present non-invasive measures of lung airway conditions [1]. However, features of lung sounds may be contaminated by heart sounds because lung and heart sounds overlap in terms of time domain and spectral content [2]. Heart sounds are clearly audible in lung sounds recorded on the anterior chest and may be heard to a lesser extent in lung sounds recorded over posterior lung lobes. High-pass filtering of lung-sound recordings to reduce heart sounds would remove significant components of lung sounds. This study reviews the adaptive methods of cancelling heart sounds from lung sounds that have been investigated over approximately 20 years. Filtering techniques are categorized as linear adaptive filters and filters employing time-frequency based methods. Several filtering schemes are outlined within these two categories. Methods of heart sound localization are indicated in conjunction with the studies of heart-sound cancellation. Auscultation is one of the most important non-invasive and simple diagnostic tools for detecting disorders in the respiratory tract like lung diseases. It is defined as the act of listening for sounds within the body, mainly for ascertaining the conditions of lungs, heart and

    other organs. Diseases such as Asthma, Tuberculosis can be identified with this method through the analysis of lung and tracheal sounds. Research on diagnosis of respiratory, pulmonary conditions like bronchitis, sleep apnea, asthma has established the utility of stethoscopes acoustic signals in common day practice. However, despite their effectiveness these instruments only provide a limited and subjective perception of the respiratory sounds. The drawbacks of using stethoscopes and listening to the sounds are using the human ear area. Their inability to provide an objective study of the respiratory Sounds detected. They lack of sufficient sensitivity and the existence of imperfect system of nomenclature. Modern digital processing techniques along with advancement in computer analysis have become an established research method for investigation of respiratory sounds. Computerized sound analysis can quantify changes in lung sounds, de-noise the signals of interest from any artifacts and noisiness, store records of measurements made and produce graphical representation of characteristic features of respiratory sounds to help with diagnosis and treatment of patients suffering from lung diseases. Since lung sound have relatively low frequency and low intensity, it is essential to remove the noise and other interfering sounds (i.e. heart sound) from the lung sound prior to any diagnostic analysis. Respiratory sounds present non- invasive measures of lung airway conditions. However, features of lung sounds may be contaminated by heart sounds because Lung and heart sounds overlap in terms of time domain and spectral content. Heart sounds are clearly audible in lung sounds recorded on the anterior chest and may be heard to a lesser extent in lung sounds recorded over posterior lung lobes.

  2. TRANSDUCERS

    A transducer is a device that converts a physical quantity into an electrical quantity such as voltage or current. The electrical activity of heart can be converted into a measurable electrical signal by using a suitable transducer. The performance of a system depends upon the quality of ECG signal obtained from transducer.

  3. PROCESSING UNIT

    A processing unit can be a microcontroller, a microprocessor or any other hardware. For real time processing, it has been observed that ECG processing using Digital Signal Processor is most efficient. The TMS320C6713 is a fast special-purpose digital signal processor with a specialized type of architecture and instruction set appropriate for signal processing. The processing speed of DSP processor is large enough to digitize and process the incoming ECG signal in real time.

  4. CONCEPTUAL BLOCK DIAGRAM

    The following figure shows the conceptual block diagram of an ECG processing system

    An ECG processing system consists of following:

    • Input ECG signal

    • Signal Conditioning Circuit

    • TMS320C6713 DSK Board

    • Personal Computer or a monitoring device

    • Application Software (Code Composer Studio) A real- time ECG signal is applied to the signal conditioning circuit. The signal level is enhanced by the conditioning circuit and filtered by series of filters. The filtered signal is applied at the input of Digital Signal Processor where it is digitized and compressed. The ECG waveforms and the significant parameters of ECG are viewed on Personal Computer using the application software Code Composer Studio 3.1.

      Fig 4.1: ECG conceptual block diagram

  5. SCOPE OF THE PROJECT

    The term ECG processing can include digitization, noise removal, storage of the signal, correlation with database and displaying the results. Since the development of this project required a lot of literature survey, there was a limit on the implementation part of project. It is not possible to incorporate all the required processing features since time and resources have been the major constraint. Hence taking into consideration above mentioned points, the scope of this prject was limited to a smaller manageable size. The scope of this project includes:

    • capturing an ECG signal from patients body, its amplification and conditioning

    • digitization of captured signal

    • filtering to remove noise components

    • creation of a database

    • correlation with the database

    • displaying the obtained results The filtering of ECG signal is done in analog domain using RC filter networks with proper cut-off frequencies whereas the compression/decompression and determination of heart rate is implemented in digital domain.

    We have considered fair amount of modules for purpose of implementation of this project like study of Electrocardiogram waves, their frequency components, sources of noise along with the study of TMS320C6713 DSK and associated application software Code Composer Studio 3.1.The project has been designed taking into considerations the basic requirements of end user.

    Texas Instruments TMS320C6713 DSK kit includes DSK board with TMS320C6713 DSP chip, USB cable, Power supply, CD with Code composer studio IDE (v3.1) and electronic documentation, DSK technical reference manual, DSK quick start installation guide, Matlab/Simulink trial CD and other promotional material. The 225 MHz TMS320C6713 floating point DSP kit has AIC23 stereo codec (ADC and DAC) and is ideal for audio as well as real-time applications. It samples at the rate of 8 kHz – 96 kHz. It has a 16 MB dynamic RAM, 512kB non-volatile FLASH memory, General purpose I/O, 4 LEDs, 4 DIP switches, USB interface to PC, Enhanced Harvard Architecture, Rich Addressing modes, Two general purpose Register files (A0-A15 & B0-B15), 32/64- Bit Data Word, Rich Instruction set, Eight 32-Bit Instructions/Cycle, 32/64-Bit Data Word, 4.4- 6.7 ns Instruction Cycle Time, Rich Peripheral Set, Optimized for Audio and Highly Optimized C/C++ Compiler. The block diagram of the processor is as shown below:

    Fig 5.1: TMS320C6713 DSK Internal block diagram

  6. LINEAR ADAPTIVE FILTER

    There are four main components to a linear adaptive filter: the input or reference signal; the output of the adaptive filter; the desired filter response or primary signal; and the estimation error, which is the difference between the filter output and desired response. The term linear refers to the physical implementation of a linear adaptive filter, which employs the principle of superposition between its input and output signals. In reality, the internal structure of a linear adaptive filter is highly nonlinear.

    A recursive algorithm within the adaptive filter updates filter parameters with each iteration (in discrete time operation) so as to minimize the estimation error. Noise cancellation and linear prediction are the two main classes of linear adaptive filters that have been applied to lung sound recordings for reducing heart sounds. Linear prediction serves to develop a model of a signal based on

    its past or future values, or on white noise. In adaptive noise cancellation, the primary input contains both the noise to be removed by the adaptive filter, and the signal of interest. Ideally, there exists a linear (additive) relationship and minimal correlation between these components, and this ideal was assumed in all noise cancellation methods presented in this review.

    Fig 6.1:General adaptive filter configuration.

    Fig 6.2: Adaptive Noise cancellation system

    Figure 6.2 is Linear adaptive noise canceller with s(n)=breath sounds; x(n)=Heart sounds r(n)=reference heart sounds; y(n)=adaptive filter output; e(n)=lung sounds. The reference signal represents the noise portion of the primary input; thus, the filter output is a signal that models the noise in the input, and the signal of interest is determined by subtracting the filter output from the primary input. The manner in which the input samples are arranged and the formulas used to update the adaptive filter parameters depend on the specific type of filter scheme used. All of the linear adaptive filters that have been applied for heart sound reduction from lung sounds have employed adaptive filters with finite memory, which means that the internal structure of the adaptive filter contains only feed forward capability. The most common form of a finite memory, or finite- duration impulse response (FIR), filter is the transversal filter that consists of unit-delay elements that delay each of the M- samples of the input (M is the filter order); elements that multiply weights by input samples; and adders.

  7. ADAPTIVE LINE ENHANCER

    The ALE is a special form of adaptive noise canceller that is designed to suppress the wide-band noise component of

    the input, while passing the narrow-band signal component with little attenuation. An ALE consists of the interconnection of a delay element and a linear predictor, as is illustrated in the block diagram in Fig.7.1. The input signal d(n) is formed of the desired signal s(n) which is periodic, i.e. narrow-banded, and the disturbing noise r(n) , i.e., wide-banded. The predictor output d(n) is subtracted from the input signal d(n) to produce the estimation error e(n). This estimation error is, in turn, used to adaptively control the predictor. The predictor input u(n) equals d(n

    ), which is the input signal delayed with samples. The delay has to be chosen such that the noise in the original input signal d(n) and in the delayed predictor input d(n

    ). . . d(n M), where M is the filter length, is uncorrelated, so that it can be suppressed by the linear predictor. This linear predictor is a FIR filter whose tap weights are controlled by the adaptive algorithm, which in this will be implemented as least mean square (LMS) algorithm.

    Fig 7.1: Block diagram of adaptive line enhancer

  8. LMS ALGORITHM

    The LMS algorithm [2], is a type of adaptive filter known as stochastic gradient-based algorithms as it utilizes the gradient vector of the filter tap weights to converge on the optimal wiener solution. With each iteration of the LMS algorithm, the filter tap weights of the adaptive filter are updated according to the following formula:

    Here x(n) is the input vector of time delayed input values,

    The vector represents the coefficients of the adaptive FIR filter tap weight vector at time n. The parameter is known as the step size parameter and is a small positive constant. This step size parameter controls the influence of the updating factor. Selection of a suitable value for is imperative to the performance of the LMS algorithm, if the value is too small the time the adaptive filter takes to converge on the optimal solution will be too long; if is too large the adaptive filter becomes unstable and its output diverges.

  9. NORMALIZED LMS ALGORITHM

    In the standard LMS algorithm, when the convergence factor is large, the algorithm experiences a gradient noise amplification problem. In order to solve this

    difficulty, we can use the NLMS (Normalized Least Mean Square) algorithm. The correction applied to the weight vector w(n) at iteration n+1 is normalized with respect to the squared Euclidian norm of the input vector x(n) at iteration n. We may view the NLMS algorithm as a time- varying step- size algorithm, calculating the convergence factor as in Eq.(3)

    Where: is the NLMS adaption constant, which optimize the convergence rate of the algorithm and should satisfy the condition 0<<2, and c is the constant term for normalization and is always less than 1. The Filter weights are updated by the Eq. (4).

  10. IMPLEMENTATION AND RESULTS

    The heart sound was recorded from a healthy human subject using a digital stethoscope microphone with the sampling rate of 44100 Hz. Different information can be obtained from the same data if it is analyzed with different time range. First, the analysis with short time range and high temporal resolution reveals the detailed information of heart valve closing soud Heart sound was analyzed with the time range of 0.1 s. We can see that the closing sounds caused by the different valves are clearly separated. Detailed qualities of each valve closure, such as sound level, pitch, pitch strength are also analyzed. Those information are extracted in real time, and can be used for detecting abnormality. Second, by the analysis with long time range and low temporal resolution, real time monitoring of heart condition (e.g. heartbeat rate and its degree of regularity) would be possible. Although a detailed waveform like before is not obtained, the information about the heartbeat rate and its fluctuation is fully included. If the autocorrelation function is calculated for this waveform, it is possible to detect the periodic peak equivalent to a heartbeat rate .The result is taken to analyse this system. This implementation results shows that working of separation unit. One of the input data is forced to FIR filter. The adaptive FIR filter itself identifies the coefficients of the filter. The coefficients are updated automatically by co efficient update block, which is done from the reference heart sound segment Finally the output of the adaptive fir filter is given by equalizer and another input is contaminations of heart and lung sound. Which is taken from proposed results done by mark decode. The reference and contaminations signal are compared and if they are found to be alike then the corresponding segment is removed finally the lungs sound segment is obtained. The input signal coefficients are obtained from matlab. The algorithm is implemented in matlab which is equally

    implemented in code composer studio. The output separation of heart and lung sounds are obtained.

    X1. RESULTS AND ANALYSIS

    This is our result analysis for N=16 LMS FILTER

    NLMS FILTER

    1. CONCLUSION

      The primary objective of respiratory sound research is to bring about the improvements in monitoring and diagnosis of respiratory disease, the potential usefulness of any method for filtering heart sounds from lung sounds rests on its Ability to perform in a clinical setting. Because the heart and lung sound signals overlap in the time and frequency domains, removing HS interference from respiratory sound recordings is a challenging task. In this proposed methods, we are implementing in TMS320C6713 DSK also using matlab and CCS. This method uses the LMS and NLMS adaptive equalizer for detecting the HS segments from coefficients of the original signals which is required for comparison with reference HS in order to remove the HS segment from the contaminated signal. This method is more efficient than other techniques for HS cancellation in terms of speed and loading efficiency.

    2. ACKNOWLEDGMENT

      First of all, we would like to express our profound gratitude to our guide Mr.K.Sathesh (Head of the department), for his outstanding guidance and support and our Principal, Dr.N.J.R.Muniraj for his encouragement, and motivation throughout our studies at TSITW, Coimbatore.

      We would also like to thank all the faculty members of ECE Department who have given their guidance and kind co-operation during the study course.

      We would like to thank all the staff (technical and non-technical) and librarians of TSITW, Coimbatore who directly or indirectly helped us.

      Finally, We would like to thank our family and friends for their constant love and support .

    3. REFERENCES

  1. Texas Instruments, Inc TMS320C55x, Technical Overview, Dallas, TX, Feb. 2000.

  2. Integration of Matlab Tools for DSP Code Generation, Kwadwo Boateng ,Charles Badu, December 2005.

  3. Textbook on Digital Signal Processing and Applications with the C6713 and C6416 DSK, Rulph Chassaing Worcester Polytechnic Institute,2005.

  4. Digital Systems and Signal Processing, User Manual, Experiment Solutions of TMS320C6713 DSK, SANDS Instrumentation Pvt. LTD.,October 2005

  5. Texas Instruments, TMS320C6713B, Floating- Point Digital Signal Processors, Data Sheet, Dallas, TX, June 2006.

  6. GniteckiandM.K.Moussavi, (2007) Separating Heart Sounds from Lung Sounds, IEEE Engineering in Medicine and Biology Magazine.

  7. K.Sathesh, N.J.R.Muniraj,Real Time Heart And Lung Sound Separation Using Adaptive Line Enhancer With NLMS, Journal of Theoretical and Applied Information Technology, Vol. 65 No.2, 2014.

Leave a Reply

Your email address will not be published. Required fields are marked *