Skip to main content

An automated tool for localization of heart sound components S1, S2, S3 and S4 in pulmonary sounds using Hilbert transform and Heron’s formula

Abstract

The primary problem with lung sound (LS) analysis is the interference of heart sound (HS) which tends to mask important LS features. The effect of heart sound is more at medium and high flow rate than that of low flow rate. Moreover, pathological HS obscures LS in a higher degree than normal HS. To get over this problem, several HS reduction techniques have been developed. An important preprocessing step in HS reduction is localization of HS components. In this paper, a new HS localization algorithm is proposed which is based on Hilbert transform (HT) and Heron’s formula. In the proposed method, the HS included segment is differentiated from the HS excluded segment by comparing their area with an adaptive threshold. The area of a HS component is calculated from the Hilbert envelope using Heron’s triangular formula. The method is tested on real recorded and simulated HS corrupted LS signals. All the experiments are conducted under low, medium and high breathing flow rates. The proposed method shows a better performance than the comparative Singular Spectrum Analysis (SSA) based method in terms of accuracy (ACC), detection error rate (DER), false negative rate (FNR), and execution time (ET).

Introduction

The conventional stethoscope based auscultation technique is a cost-effective and non-invasive diagnostic procedure. This technique is very popular among the physicians and commonly used by them since 1816 (Laennec1962). However, the performance of this diagnostic technique degrades due to the presence of noise in lung sound signals. Modern electronic stethoscope can reduce the ambient noises from lung sounds, but they are inefficient to avoid heart sound noise.

During the recording of lung sound, heart sound interferes and changes the temporal and spectral contents of the respiratory sound. This may lead to misinterpretation of the underlying lung diseases. Heart sounds comprise of two primary sounds S1 and S2. In addition, it may have components like S3, S4 and murmurs associated with pathological conditions. The first heart sound, S1 and second heart sound, S2 are produced by the openings of the atrioventricular valves and closures of semilunar valves, respectively and vice versa (Pourazad2004). The third (S3) HS occurs at the end of S2 due to the vibration of blood inside the ventricles and the fourth (S4) HS is appeared just before the S1 due to the contraction of atria (Webster1998; Balasubramaniam and Nedumaran2010). These components carry important information regarding the cardiac system and are segmented to diagnose the valvular heart diseases (Schmidt et al.2010; Tang et al.2012; Sanei et al.2011; Patidar and Pachori2013). However, lung sounds are produced by stochastic and disruptive flow of air within lung airways (Blake1986). Most of the heart sound information lies in the frequency range of 20-150 Hz (Arnott et al.1984; Lu et al.1988; Cromwell et al.2002) but murmur sounds have a higher frequency range of 600 Hz (Patidar and Pachori2013). On the other hand, lung sound information spread out over a wide range of frequency approximately 20-1600 Hz (Gavriely et al.1981). However, a major part of the lung sound information is confined to a frequency less than 200 Hz (Sovijarvi et al.2000).

With the advances in modern technologies, computer science, and statistical signal processing, a lot of research work has been conducted to overcome the problem of HS removal to highlight the LS (Iyer et al.1986; Lu et al.1988; Kompis and Russi1992; Hadjileontiadis and Panas1997; Gnitecki et al.2003; Gnitecki and Moussavi2003; Ahlstrom et al.2005; Yadollahi and Moussavi2006; Pourazad et al.2006; Flores-Tapia et al.2007; Ghaderi et al.2011). This is an important preprocessing step in lung sound analysis. A common approach of heart sound reduction is high pass filtering of lung sounds. However, this approach attenuates the lung sound components that resemble to heart sound in spectral domain (Donoho1995). Except the wavelet de-noising technique, the performance of all the other heart sound cancellation methods depends on a properly defined heart sound location. Many research groups have developed methods to detect the heart sounds locations in LS signals. These methods are based on adaptive filtering (Iyer et al.1986; Lu et al.1988; Kompis and Russi1992; Hadjileontiadis and Panas1997; Gnitecki et al.2003), time-frequency filtering (Pourazad et al.2006), multiscale product based (Flores-Tapia et al.2007), and statistical signal analysis (Gnitecki and Moussavi2003; Ahlstrom et al.2005; Yadollahi and Moussavi2006; Ghaderi et al.2011) approaches. Adaptive filtering techniques need a reference heart sound signal which is produced either by the noisy lung sound signal itself or by an external source, e.g., electrocardiogram (ECG) signal. A combined theory of spectrogram and wavelet transform analysis is proposed to detect the HS components in (Pourazad et al.2006). A multiscale product based method is implemented in (Flores-Tapia et al.2007) to localize the HS segments. Several statistical methods are used to find out the heart sound locations, such as variance fractal dimension trajectory (Gnitecki and Moussavi2003), recurrence time statistics (Ahlstrom et al.2005), entropy (Yadollahi and Moussavi2006), and singular spectrum analysis (SSA) (Ghaderi et al.2011). Entropy (ENT) and SSA based algorithms give comparatively better results than other techniques. However, SSA method gives better results than that of ENT method in terms of false negative rate, error in localization and correlation coefficient. Moreover, SSA method is much faster than ENT method. Gadheri et al. has shown the superiority of SSA method over ENT technique in (Ghaderi et al.2011).

All these techniques highlight their performances for normal lung sound signals at low and medium flow rate but not at high flow rate.

The objective of this work is to develop an effective and efficient algorithm to localize primary heart sounds (S1 and S2) and pathological heart sounds (S3 and S4) components that is applicable to both normal as well as abnormal cases of lung sounds for three different breathing flow rates: low, medium and high. In this paper, a novel heart sounds (S1, S2, S3 and S4) localization algorithm is proposed by using Hilbert transform (Johansson1999; Mertins1999) and Heron’s formula (Stanojevié1997) and the proposed method is referred to as Hilbert Heron Algorithm (HHA). The HS and non HS segments are discriminated by investigating the morphological characteristics of the cardiac sounds. It has been taken under consideration that each HS component extends for a certain duration (Khandpur2003; Schlant and Alexander1994) and defined by two global minima and one maximum points. The minima points are correspond to the starting and ending of the HS component and the maximum point is correspond to the highest energy peak of the HS component. By connecting the global extrema points some scalene triangles can be drawn and their areas will be used to identify the HS and non HS segments. The area of the triangle can be computed from the envelope signal using Heron’s formula. The envelope signal is estimated from the filtered mixed LS signal using HT. The decision regarding the heart sound included segment or heart sound excluded segment is taken by comparing the area with an adaptive threshold value. The threshold value is calculated from the variance of the area vector as discussed in Section "Methodology". The performance of the proposed method is compared with the SSA method by evaluating the results for both cases of simulated mixed lung sound signals (normal and pathological) and real recorded lung sound signals. The method gives better performance than the SSA method in terms of false negative rate, accuracy, detection error rate, and execution time.

The remaining part of this paper is organized as follows. Section "Theoretical background on Hilbert transform and Heron’s formula" provides theoretical background on the Hilbert transform and Heron’s formula and Section "Methodology" describes in detail the methodology. The experimental database and certain implementation issues are described in Section "Experimental data sets and implementation issues" and Section "Results and discussion" presents the experimental results and discusses the efficiency of the method. The conclusion is given in section "Conclusion".

Theoretical background on Hilbert transform and Heron’s formula

The Hilbert transform

Hilbert transform was developed by German scientist David Hilbert (Johansson1999; Mertins1999) in the beginning of the 20th century for interpreting the Euler formula

e j θ =cosθ+jsinθ
(1)

where j is an imaginary unit, i.e.,j= - 1 . The Hilbert transform of a real valued continuous time domain signal, y(t) is defined by

H{y(t)}= ŷ H (s)= 1 π - y ( t ) t - s dt
(2)

where s is real and H{·} is the Hilbert operator. Here, the integration has to be carried out according to the Cauchy principle value, that is,

- y ( t ) t - s dt= lim ε 0 ( - s - ε + s + ε ) y ( t ) t - s dt,ε>0.
(3)

However, real world signals are discontinuous in nature and can be expressed as a discrete-time signal. In the discrete domain, the envelope of the real discrete signal y[n] is estimated by the discrete Hilbert transform denoted by H d {·}. The discrete Hilbert transform H d {·} of a sequence y[n] having a finite period R can be computed using its Discrete Fourier transform (DFT). The DFT of y[n] is denoted by Y[m] is calculated by

Y[m]= n = 0 R - 1 y[n] Z R - nm ,0mR-1.
(4)

where Z R = e j 2 π R , m is the discrete frequency and n is the discrete time. The DFT Y[m] of the discrete time domain signal y[n] can be expressed as a combination of a real and an imaginary component, i.e.,

Y[m]= Y Re [m]+ jY Im [k]

The discrete Hilbert transform ŷ DHT [n]= H d {y[n]} of y[n] is calculated as

ŷ DHT n = 1 R m = 0 R - 1 2 Y Re [ m ] sin 2 π mn R + m = 0 R - 1 2 Y Im [ m ] cos 2 π mn R - m = R + 1 2 R - 1 Y Re [ m ] sin 2 π mn R - m = R + 1 2 R - 1 Y Im [ m ] cos 2 π mn R
(5)
ŷ DHT n = 1 R m = 0 R 2 - 1 Y Re [ m ] sin 2 π mn R + m = 0 R 2 - 1 Y Im [ m ] cos 2 π mn R - m = R 2 + 1 R - 1 Y Re [ m ] sin 2 π mn R - m = R 2 + 1 R - 1 Y Im [ m ] cos 2 π mn R
(6)

The equation (5) is applicable when R is even and equation (6) for odd R.

Heron’s formula

Heron was a Greek mathematician and engineer in 10-70 AD (Stanojevié1997). He contributed much in the field of optics, mathematics and enginering. But Heron is popular for deriving the formula for computing the area of the triangle. The formula consists of two steps:

Step 1: Compute the semiperimeter h of the triangle using the lengths of its sides, u, v, and w as

h= u + v + w 2
(7)

Step 2: Calculate the area A of the triangle using semiperimeter and the lengths of its sides by the equation (8).

A = 1 4 v 2 c 2 1 - cos 2 θ = 1 4 v 2 c 2 1 - v 2 + w 2 - u 2 2 vw 2 = 2 u 2 w 2 + 2 u 2 v 2 + 2 v 2 w 2 - u 4 - v 4 - w 4 16 = h ( h - u ) ( h - v ) ( h - w )
(8)

where

θ=vw=arccos v 2 + w 2 - u 2 2 vw

The detail of the formula is given in proposition 1.8 of his book, Metrica. The proof of Heron’s formula has been done by Roger Boscovich and stated in (Stanojevié1997).

Methodology

The proposed method distinguishes HS element from non HS element based on the principle that heart sound component has higher area than that of the non heart sound component. A flow chart of the proposed method is given in Figure1. The entire process is comprised of the following steps:

Figure 1
figure 1

Flow chart of the proposed method. Sub-figures (a)-(f) depict the outcomes of the different steps of the proposed method. The sound signal displayed in (a) corresponds to high flow mixed signal. The white arrowheads in (d) indicate the the events that correspond to HS and LS components.

Amplitude normalization

The amplitude of the mixed signal varies considerably due to various factors such as recording instrument gain, different recording locations over the anterior and posterior chest, physiology, age and sex of the subject. The amplitude variation creates a difficulty during analysis of different signals of non-uniform amplitude. This problem is minimized by setting the maximum value of variance of the signal to +1 and minimum to -1. Let y(n) be the signal value at nth sample, and M be the absolute maxima in the sample space. The normalized signal y norm (n) is given by

y norm (n)= y ( n ) G
(9)
G= max i y ( i )
(10)

Here n = 1,2,3,…, K and K is the total number of samples in the signal.

Filtering

The intensity and frequency components of the pulmonary sound change according to the variation in flow rate. The amplitude of the lung sound increases with an increase in respiratory flow (Yadollahi and Moussavi2006). Hence, HS may become invisible for medium and high flow rates. It is very difficult to localize the HS segments for high flow than medium and low flow cases. In this study, the flow rate effect is minimized by filtering the mixed lung sound signals using a 10t h order Butterworth finite impulse response (FIR) filter with a cutoff frequency of 150 Hz. The filtering operation enhances the HS components by attenuating the higher frequency LS and murmur components as shown in Figure2. The filtered sound is used as input to the next step to detect the HS segments.

Figure 2
figure 2

(a) A typical example of a normal LS signal. (b) A time domain representation of an abnormal HS signal (pan systolic murmur). (c) Wave form of the mixed signal and (d) wave form of the filtered signal.

Hilbert Envelope Extraction

The envelope curve gives a simple and demonstrable representation of a narrow band signal to investigate its intrinsic characteristics (Choi and Jiang2008). The envelope of a signal can be computed by different techniques like Hilbert transform and Shannon energy based approach. In this study, we have chosen HT to compute envelope of HS dominated filtered mixed sound signal because of two reasons. Firstly, Shannon energy based envelope detection algorithm performs well for medium intensity signal and it gives poor result for high and low intensity signal (Choi and Jiang2008; Ari and Saha2007). Secondly, the computational complexity of Shannon envelope is much greater than that of the Hilbert envelope because Shannon method takes into considerations the windowing and overlapping processes (Choi and Jiang2008; Ari and Saha2007). We have experimentally observed that HT takes only 0.02 sec for calculating the Hilbert envelope and Shannon energy based method takes 3.97 sec for computing the Shannon envelope for the same signal of length 40313 samples. As lung sound shows a wide band spectrum and heart sound gives a narrow band spectrum, the Hilbert transform facilitates to detect the heart sound elements in lung sound signals in spite of their spectral overlap. Hilbert envelope can trace the variation of heart sound components in lung sound as a periodic train. The Hilbert envelope is computed based on Hilbert Transform as described in Section "Theoretical background on Hilbert transform and Heron’s formula". Let x nf (n) be the normalized, filtered mixed signal. The complex analytic signal A[x nf (n)] of the given signal x nf (n) is expressed as

A[ x nf (n)]= x nf (n)+ jH d { x nf (n)}
(11)

The envelope curve E H (n) of the given signal x nf (n) can be computed from the magnitude of the analytic signal A[x nf (n)], and is expressed as

E H (n)= x nf ( n ) 2 + H d { x nf ( n ) } 2
(12)

The phase ϕ(n) information of the analytic signal A[x nf (n)] is determined by the following equation

ϕ(n)=arctan[ H d { x nf ( n ) x nf ( n ) ]
(13)

Peak Detection in the Envelope

The Hilbert envelope curve E H (n) is estimated from the filtered mixed signal using equation (12) and is shown in Figure1(c). The envelope signal consists of many peaks which are originated from the HS components and from the low frequency LS components of the filtered mixed signal as shown in Figure1(b). Each peak of the envelope curve E H (n) has a rising and a falling edges, respectively. The rising edge gives the positive gradient values and falling edge gives negative gradient values at each point over the envelope. These peaks are detected through the following steps:

Step 1: Smoothening of the envelope: The Hilbert envelope E H (n) of the signal is not smooth because of the presence of lung sound components. Hence, it is required to smoothen for more accurate peak detection which is associated with HS. To accomplish this, a filtering operation is done using a 5t h order Butterworth FIR filter with a cutoff frequency varying in a range of 7-25 Hz. We discuss the effect of variation in cut-off frequency in Section "Results and discussion".

Step 2: Identification of local maxima and minima: The extreme points of the envelope signal can be calculated by considering the sign changes across the first derivative of the envelope. A sample value E H (i) of the smoothed envelope curve will be a minimum valued point for d ( E H ( n ) ) dn n = i =0 d ( E H ( n - 1 ) ) dn n = i <0 d ( E H ( n + 1 ) ) dn n = i >0 and will be a maximum valued point for d ( E H ( n ) ) dn n = i =0 d ( E H ( n - 1 ) ) dn n = i >0 d ( E H ( n + 1 ) ) dn n = i <0.

Step 3: Estimation of peaks: A peak consists of three consecutive extrema points which include two minima and one maximum. Each peak has a finite extension from one minimum point to another as shown in Figure1(d). The duration of the individual peak varies according to its source characteristics. The peak locations are identified by calculating their extreme points and marked with a white arrow head in Figure1(d).

Picking up the S1, S2, S3 and S4 peaks

The peaks detected using the above described peak detection framework do not always correspond to heart sound components. Some peaks occur due to the presence of artifacts and unfiltered lung sound components. The non-heart sound peaks are rejected and the heart sound peaks are selected using a geometrical formula derived by Greek mathematician Heron.

Selection criteria of S1, S2, S3 and S4 peaks: The area of individual peak is calculated using Heron’s triangular formula. The triangles are formed by connecting the extreme points of the peaks. Let us consider the minima and maximum points for ith peak are L min 1 i , L min 2 i , and L max i , respectively. The length of each side of the triangle associated with ith peak are calculated as follows:

a i = [ E H ( L max i ) - E H ( L min 1 i ) ] 2 b i = [ E H ( L max i ) - E H ( L min 2 i ) ] 2 c i = [ E H ( L min 2 i ) - E H ( L min 1 i ) ] 2
(14)

where c i is the base, a i is the left lateral side and b i is the right lateral side of the triangle. The three angles of the triangle are defined by the following equation

α i = a i c i = arccos ( a i ) 2 + ( c i ) 2 - ( b i ) 2 2 a i c i β i = b i c i = arccos ( b i ) 2 + ( c i ) 2 - ( a i ) 2 2 b i c i γ i = a i b i = arccos ( a i ) 2 + ( b i ) 2 - ( c i ) 2 2 a i b i
(15)

where α i, β i and γ i are the angles between the three sides. The lengths of the three sides of the triangle are unequal in magnitude and the angles in between them are also unequal in degree. Hence this triangle satisfies the criterion of scalene triangle. The area i of the ith triangle is calculated as

i = S i ( S i - a i ) ( S i - b i ) ( S i - c i )
(16)
S i = a i + b i + c i 2
(17)
Γ= j = 1 P L min j + j = 1 Q L max j
(18)

where i indicates the number of triangle and lies in the range defined by 1 i Γ-2 × Q, P and Q are the total number of minima and maximum points in the envelope, respectively. The area of heart sound components is higher than that of the artifacts or low frequency lung sound components because heart sound components have a high peak amplitudes as shown in Figure1(b). The heart sound components S1, S2, S3 and S4 are identified by comparing the area of the peak with an adaptive threshold value that is calculated from the variance σ of the area vector A = [A 1, A 2, A 3,…, A Q ]T, where A r (r = 1,2,…, Q) indicates the area of individual peak in corrupted LS. The heart sound peaks P HS are selected using the Algorithm 1.

Algorithm 1 Calculate P HS

Boundary estimation of S1, S2, S3 and S4 peaks

The primary HS components (S1 and S2) extend on both sides of its peak position as shown in Figure1(e) for a finite length due to the time gap between the closures and openings of the heart valves (Pourazad2004) but the third (S3) and fourth (S4) HS components extend due to the relaxation of the ventricle and atrium heart chambers (Webster1998; Balasubramaniam and Nedumaran2010). To estimate the HS boundary, peak location identification is needed. The peak locations are detected using Algorithm 1, and after that their boundary B HP are calculated by using Algorithm 2.

Algorithm 2 Calculate B HP

Experimental data sets and implementation issues

Subjects and data acquisition

The lung sound signals are recorded from the normal as well as abnormal male and female subjects using a single channel stethoscope based data acquisition system as described in (Mondal et al.2011). The data acquisition system has been constructed by making a circuit using active devices (Transistors. Operational Amplifiers) and passive elements (Resistors, Capacitors and Inductors) fitted to a stethoscope to capture the LS using the diaphragm mode. The LS data are recorded from different auscultation locations over the body surface (e.g., left mid clavicular area, 2nd intercostal and third intercostal spaces) of the patients in the sitting position and under relaxing mood conditions. The recordings are not associated with any particular age group. The recorded data are arranged in 16 bit, PCM, Mono audio format and stored as *.wav files at sampling frequency of 8 kHz. The pathological LS are recorded from 8 female and 20 male subjects with different types of pulmonary dysfunctions: Chronic Obstructive Pulmonary Diseases (COPDs), Interstitial Lung Disease (ILD) and asthma. The pathological HS are recorded from 10 female and 22 male subjects with various valvular heart diseases. On the other hand, the normal LS are recorded from 5 male healthy subjects and normal HS from 3 female and 5 male subjects. The pulmonary sound records are collected from various resources: Institute of Pulmocare and Research, Kolkata, Audio & Biosignal Processing laboratory, IIT Kharagpur, India and also from R.A.L.E. dataset available at:http://www.rate.cal. The cardiac sound data are collected from the two institutes mentioned above and also from the Maulana Azad Medical Institute, Delhi, India. The abnormal lung sounds include wheezes, crackles and squawks sounds and abnormal heart sounds include late systolic murmur, pulmonary stenosis, early systolic murmur, ejection click, aortic insufficiency, pan systolic murmur, etc.

Synthetic data

The synthesized mixed lung sound data at different flow rates are generated by a convoluting mixture producing technique as described in (Ghaderi et al.2011). The convolutive mixtures are simulated by imposing the filtered heart sound components F S HS (t) onto the filtered lung sound components F S LS (t) as given next.

S CM (t)= FS LS (t)+ FS HS (t)
(19)
FS LS (t)= p = 0 3 a p S LS (t-p)
(20)
FS HS (t)= q = 0 3 b q S LS (t-q)
(21)

where a p and b q are the vectors of lung sound and heart sound filter coefficients, respectively. These are four dimensional vectors, i.e., a p  = [a p 0, a p 1, a p 2, a p 3]T and b q  = [b q 0, b q 1, b q 2, b q 3]T. The heart sound filter coefficient vector b q is normalized to one, i.e., b q  = 1. These filter coefficients are generated randomly.

The high, medium and low flow rates mixed signal are synthesized by varying the amplitude ratios of the heart and lung sound signals. In this study, four types of mixtures at three different flow rates are examined. The range of the norm of the lung sound filter coefficients vector a p corresponding to different flow rates for various types of mixtures are given in Table1. The classifications of flow rates have been done empirically by a pulmonologist.

Table 1 The values of norms for different flow rates

Implementation platform

The whole analysis is implemented on an ACER-PC with 3.29 GHz Intel core 2 quad CPU and 3.49 GB of RAM. The MATLAB (R2008a, The Mathworks, Inc., Natick, MA) tool is used for conducting the all experiments.

Results and discussion

The efficiency of the proposed method is measured by evaluating the results in terms of false positive rate (FPR), false negative rate (FNR), accuracy (ACC), detection error rate (DER), and execution time (ET), and compared with the SSA method. These performance measuring units are calculated by the following equations:

FNR(%)= FN TP + FN ×100
(22)
FPR(%)= FP TN + FP ×100
(23)
ACC(%)= TP + TN TN + TP + FP + FN ×100
(24)
DER(%)= FP + FN TN + TP + FP + FN ×100
(25)

False negative (FN) occurs when HS segment is missed and false positive (FP) occurs due to misidentification of non HS as HS. On the other hand, true negative (TN) and true positive (TP) occur when HS segment and LS segment are correctly detected. All the experiments are conducted on the same database mentioned in Section "Experimental data sets and implementation issues" with the proposed and SSA method.

Graphical interpretation of the results

The effectiveness of the proposed method is evaluated qualitatively through a visual display of the results and compared with the baseline method (SSA). Figure3 shows a graphical representation of the results for a simulated high flow mixed LS signal [Figure3(a)] along with a reference HS signal which consists of S1, S2 and S3 components [Figure3(b)] and the outputs of these two methods [Figures3(c-d)]. On the other hand, Figure4 shows a graphical representation of the results for a simulated high flow mixed LS signal [Figure4(a)] along with a reference HS signal which consists of S1, S2 and S4 components as shown in Figure4(b) and the outputs of these two methods are depicted in Figures4(c-d). In spite of these two figures, a pictorial illustration of the results for a real time recorded high flow mixed LS signal is shown in Figure5 (a) along with the outputs of the two referred methods [Figures5(b-c)]. From Figures3(c-d) and Figures4(c-d), it is seen that the proposed method detects the HS segments more correctly than the SSA method. The baseline method is incompetent to detect the third (S3) heart sound component as shown in Figure3(d). In contrast to the baseline method, the proposed method (HHA) is competent to detect the S1, S2, S3 and S4 components of heart sounds as shown in Figure3(c) and Figure4(c). From the Figures3(d),4(d) and5(c), it is observed that some part of HS included segment is not estimated and some non HS segment is detected as HS by SSA technique. On the basis of visual inspection, it is seen that the proposed method estimates HS boundary which is relatively larger in size than the reference HS boundary, but SSA method estimates HS boundary which is relatively less in size than the reference HS boundary. The performance of the proposed method is measured by comparing its output HS boundary with the reference HS boundary. In this study, the boundary of reference HS signal is calculated by three expert physicians based on auditory test and visual inspection of spectrogram and waveform of the reference HS signal.

Figure 3
figure 3

Localization results of S1, S2 and S3 HS components. (a) A high flow simulated mixed signal of heart and lung sounds. (b) Heart sound consists of S1, S2 and S3 components. (c) Output of HHA method (black curve corresponding to mixed sound data and red curve for heart sound region) and (d) depict the output of SSA method (black curve corresponding to mixed sound and red curve for heart sound segment).

Figure 4
figure 4

Localization results of S1, S2 and S4 HS components. (a) A high flow simulated mixed signal of heart and lung sounds. (b) Heart sound consists of S1, S2 and S4 components. (c) Output of HHA method (black curve corresponding to mixed sound data and red curve for heart sound region) and (d) depict the output of SSA method (black curve corresponding to mixed sound and red curve for heart sound segment).

Figure 5
figure 5

Results of different heart sound localization methods for real recorded lung sound data. (a) High flow real LS signal, (b) shows the output of HHA method and (c) displays the result of the SSA method.

Quantitative evaluation of the results

A quantitative comparisons of these two methods are given in Tables2,3,4,5,6. Tables2,3,4,5, present the results for normal and pathological simulated data and Table6 gives results for real recorded data. The FNR, ACC, and DER of the proposed method are significantly better than the SSA method for various types of mixture (Tables2,3,4,5,) and real LS data (Table6) at different flow rates. Moreover, the proposed method is faster than the SSA method. On the other hand, SSA method is better in term of FPR. However, the performance of any heart sound reduction technique which follows a preprocessing step of HS localization, depends on a correct estimation of HS segments. So, it is more important to estimate the segment that contains HS information than the detection of non HS segment as HS segment. The FNR value of SSA method and FPR value of the proposed method are greater for pathological HS signal than the normal HS signal due to the presence of murmur in cardiac sound signal. The performance of the two methods degrades gradually with increase of flow rate because of the superimposition of LS over HS. The SSA method gives a higher valued FNR for medium and high flow pathological signals. To overcome these difficulties, two modifications have been done with SSA technique: (1) first two principal components are chosen to reconstruct the HS dominated time series because the eigenvalue spectra have a bending point at the 2n d pair and (2) the threshold value and cutoff frequency of high pass filter mentioned in (Ghaderi et al.2011) are reduced.

Table 2 Performance of the different HS localization methods, HHA and SSA for the synthetic mixtures of normal HS and normal LS at three different flow rates
Table 3 Performance of the different HS localization methods, HHA and SSA for the synthetic mixtures of normal HS and abnormal LS at three different flow rates
Table 4 Performance of the different HS localization methods, HHA and SSA for the synthetic mixtures of abnormal HS and normal LS at three different flow rates
Table 5 Performance of the different HS localization methods, HHA and SSA for the synthetic mixtures of abnormal HS and abnormal LS at three different flow rates
Table 6 Performance of the different HS localization methods, HHA and SSA for the real time recorded lung sounds at three different flow rates

Effect of cut off frequency (f c ) on the performance of the proposed method

In this experiment cutoff frequency f c of LPF used for the smoothing of the envelope signal, is set in the range of 7–25 Hz. In fact the performance of the method is directly influenced by f c . The FNR increases and FPR decrease with increasing f c as shown in Figure6. The reason for increment of FNR and decrement of FPR for high f c is the shifting of minima points toward the maximum points. This occurs because of the presence of high frequency components in the filtered envelope signal as shown in Figure7. In other words the estimated HS boundary is smaller than the actual HS boundary. The actual HS boundary is validated through several tests: auditory, visual inspection, spectrogram analysis, and WaveSurfer toolkit. The efficiency of the proposed method may be improved to a higher degree by deriving an optimum f c value based on an adaptive filter. This issue may be addressed in a future work. The analysis of the results shows that the performance of HS localization algorithms is affected by flow rates and by pathological states. In spite of these shortcomings, the proposed method is superior than other technique in all aspects except FPR.

Figure 6
figure 6

The variation of FNR and FPR values with cut off frequency f c for a typical normal artificial mixed lung sound.

Figure 7
figure 7

The effect of cut off frequency f c on the calculation of extrema points.

Conclusion

A new HS localization algorithm is proposed in this work. This method is developed by using the Hilbert transform for envelope detection and Heron’s formula for area calculation. Here, HS segments are estimated by comparing their area with an adaptive threshold value. The performance of the method is compared with the SSA method described in (Ghaderi et al.2011). The results are obtained by implementing the proposed and SSA method on simulated and real recorded LS data. In this study, different flow rate and various pathological conditions are considered. The results for simulated and real data show that the proposed method superior in terms of FNR, ACC, DER, and ET. However, the SSA method is better in term of FPR. The proposed technique gives a false negative rate of zero for all cases under all conditions and is faster. Hence, it is expected to have a high impact in real-life applications that interpret lung sounds.

References

  • Ahlstrom C, Liljefeldt O, Hult P, Ask P: Heart sound cancellation from lung sound recordings using recurrence time statistics and nonlinear prediction. Signal Process Lett, IEEE 2005, 12(12):812-815.

    Article  Google Scholar 

  • Ari S, Saha G: On a robust algorithm for heart sound segmentation. JMMB 2007, 7(2):129-150. 10.1142/S0219519407002200

    Article  Google Scholar 

  • Arnott P, Pfeiffer G, Tavel M: Spectral analysis of heart sounds: relationships between some physical characteristics and frequency spectra of first and second heart sounds in normals and hypertensives. J Biomed Eng 1984, 6(2):121-128. 10.1016/0141-5425(84)90054-2

    Article  Google Scholar 

  • Balasubramaniam D, Nedumaran D: Efficient computation of phonocardiographic signal analysis in digital signal processor based system. IJCTE 2010, 2(4):660-664.

    Article  Google Scholar 

  • Blake WK: Mechanics of flow-induced sound and vibration. FL: Academic Press, Orlando; 1986.

    Google Scholar 

  • Choi S, Jiang Z: Comparison of envelope extraction algorithms for cardiac sound signal segmentation. Expert Syst Appli 2008, 34(2):1056-1069. 10.1016/j.eswa.2006.12.015

    Article  Google Scholar 

  • Cromwell L, Weibell FJ, Pfeiffer EA (Eds): Biomedical instrumentation and measurements. New Delhi, India: PHI Publication; 2002.

    Google Scholar 

  • Donoho DL: De-noising by soft-thresholding. IEEE Trans Inf Theory 1995, 41(3):613-627. 10.1109/18.382009

    Article  Google Scholar 

  • Flores-Tapia D, Moussavi Z, Thomas G: Heart sound cancellation based on multiscale products and linear prediction. IEEE Trans Biomed Eng 2007, 54(2):234-243.

    Article  Google Scholar 

  • Gavriely N, Palti Y, Alroy G: Spectral characteristics of normal breath sounds. J Appl Physiol 1981, 50(2):307-314.

    Google Scholar 

  • Ghaderi F, Mohseni H, Sanei S: Localizing heart sounds in respiratory signals using singular spectrum analysis. IEEE Trans Biomed Eng 2011, 58(12):3360-3367.

    Article  Google Scholar 

  • Gnitecki J, Moussavi Z, Pasterkamp H: Recursive least squares adaptive noise cancellation filtering for heart sound reduction in lung sounds recordings. Engineering in medicine and biology society, Proceedings of the 25th annual international conference of the IEEE, Cancun, Mexico 2416–2419. 2003.

    Google Scholar 

  • Gnitecki J, Moussavi Z: Variance fractal dimension trajectory as a tool for heart sound localization in lung sounds recordings. Engineering in medicine and biology society, Proceedings of the 25th annual international conference of the IEEE, Cancun, Mexico 2420–2423. 2003.

    Google Scholar 

  • Hadjileontiadis L, Panas S: Adaptive reduction of heart sounds from lung sounds using fourth-order statistics. IEEE Trans Biomed Eng 1997, 44(7):642-648. 10.1109/10.594906

    Article  Google Scholar 

  • Iyer VK, Ramamoorthy PA, Fan H, Ploysongsang Y: Reduction of heart sounds from lung sounds by adaptive filtering. IEEE Trans Biomed Eng 1986, 33(12):1141-1148.

    Article  Google Scholar 

  • Johansson M: The Hilbert transform. Master thesis, Växjö University. 1999.

    Google Scholar 

  • Khandpur RS (Ed): Handbook of biomedical instrumentation. New Delhi, India: Tata McGraw Hill; 2003.

    Google Scholar 

  • Kompis M, Russi E: Adaptive heart-noise reduction of lung sounds recorded by a single microphone. Engineering in medicine and biology society, Proceedings of the 14th annual international conference of the IEEE. Paris, France; 1992:691-692.

    Chapter  Google Scholar 

  • Laennec RTH: Invention of the stethoscope. Acoustic historical and philosophical development. Stroudsburg, PA: Dowden: Hutchinson and Ross Inc; 1962.

    Google Scholar 

  • Lu YS, Liu WH, Qin GX: Removal of the heart sound noise from the breath sound. Engineering in medicine and biology society, Proceedings of the 25th annual international conference of the IEEE. New Orleans, LA, USA; 1988:175-176.

    Google Scholar 

  • Mertins A: Signal analysis; wavelets, filter banks. England: Wiley; 1999.

    Google Scholar 

  • Mondal A, Bhattacharya PS, Saha G: Reduction of heart sound interference from lung sound signals using empirical mode decomposition technique. JMET 2011, 35(6):344-353.

    Article  Google Scholar 

  • Patidar S, Pachori RB: Segmentation of cardiac sound signals by removing murmurs using constrained tunable-q wavelet transform. Biomed Signal Proc Control 2013, 8(6):559-567. 10.1016/j.bspc.2013.05.004

    Article  Google Scholar 

  • Pourazad M: Heart sounds reduction from lung sounds recordings applying signal and image processing techniques in time-frequency domain. Master thesis,. 2004.

    Google Scholar 

  • Pourazad M, Moussavi Z, Thomas G: Heart sound cancellation from lung sound recordings using time-frequency filtering. MBEC 2006, 44(3):216-225.

    Google Scholar 

  • Sanei S, Ghodsi M, Hassani H: An adaptive singular spectrum analysis approach to murmur detection from heart sounds. Med Eng & Physics 2011, 33(3):362-367. 10.1016/j.medengphy.2010.11.004

    Article  Google Scholar 

  • Schlant RC, Alexander RW (Eds): The heart arteries and veins. Ch. 11 New York, USA: McGraw Hill Inc.; 1994.

    Google Scholar 

  • Schmidt S, Holst-Hansen C, Graff C, Toft E, Struijk JJ: Segmentation of heart sound recordings by a duration-dependent hidden markov model. Physiol Meas 2010, 31(4):513-529. 10.1088/0967-3334/31/4/004

    Article  Google Scholar 

  • Sovijarvi A, Malmberg L, Charbonneau G, Vanderschoot J, Dalmasso F, Sacco C, Rossi M, Earis J: Characteristics of breath sounds and adventitious respiratory sounds. Eur Respir Rev 2000, 10(77):591-596.

    Google Scholar 

  • Stanojevié M: Proof of the Hero’s formula according to R. Boscovich. Math Commun 1997, 2(1):83-88.

    Google Scholar 

  • Tang H, Li T, Qiu T, Park Y: Segmentation of heart sounds based on dynamic clustering. Biomed Signal Proc Control 2012, 7(5):509-516. 10.1016/j.bspc.2011.09.002

    Article  Google Scholar 

  • Webster J: Medical instrumentation: Application and design. New York: John Wiley & Sons; 1998.

    Google Scholar 

  • Yadollahi A, Moussavi Z: A robust method for heart sounds localization using lung sounds entropy. IEEE Trans Biomed Eng 2006, 53(3):497-502. 10.1109/TBME.2005.869789

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ashok Mondal.

Additional information

Competing interests

The authors declare that they have no competing interests.

Authors’ contributions

Sample was collected by PSB and AM. Analysis of the sample was carried out by AM. Final manuscript was drafted and edited by AM, GS and PSB. All authors read and approved the final manuscript.

Authors’ original submitted files for images

Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 2.0 International License (https://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Reprints and permissions

About this article

Cite this article

Mondal, A., Bhattacharya, P. & Saha, G. An automated tool for localization of heart sound components S1, S2, S3 and S4 in pulmonary sounds using Hilbert transform and Heron’s formula. SpringerPlus 2, 512 (2013). https://doi.org/10.1186/2193-1801-2-512

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/2193-1801-2-512

Keywords