Analysis Of The Second Cardiac Sound Using The Fast Fourier And The Continuous Wavelet Transforms
S Debbal, F Bereksi-Reguig
Keywords
component a2, component p2, continuous wavelet transform, fast fourier transform, phonocardiogram, second cardiac sound, time delay, time-frequency analysis
Citation
S Debbal, F Bereksi-Reguig. Analysis Of The Second Cardiac Sound Using The Fast Fourier And The Continuous Wavelet Transforms. The Internet Journal of Medical Technology. 2005 Volume 3 Number 1.
Abstract
This paper is concerned with a synthesis study of the fast Fourier transform (FFT) and the Continuous Wavelet Transform (CWT) in analysing the second cardiac sound of the phonocardiogram signal (PCG).
It is shown that the continuous wavelet transform provides enough features of the PCG signals that will help clinics to obtain qualitative and quantitative measurements of the time-frequency PCG signal characteristics and consequently aid to diagnosis. Similarly, it is shown that the frequency content of such a signal can be determined by the FFT without difficulties.
The second heart sound S2 consists of two major components (A2 and P2) with a time delay between them very important for a medical diagnosis.
Introduction
Heartbeat sound analysis by auscultation is still insufficient to diagnose some heart diseases. It does not enable the analyst to obtain both qualitative and quantitative characteristics of the phonocardiogram signals [1,2].
Abnormal heartbeat sounds may contain, in addition to the first and second sounds, S1 and S2 , murmurs and aberrations caused by different pathological conditions of the cardiovascular system [2]. Moreover, in studying the physical characteristics of heart sounds and human hearing, it is seen that the human ear is poorly suited for cardiac auscultation [3]. Therefore, clinic capabilities to diagnose heart sounds are limited.
The characteristics of the PCG signal and other features such as heart sounds S1 and S2 location; the number of components for each sound; their frequency content; their time interval; all can be measured more accurately by digital signal processing techniques.
The FFT (Fast Fourier Transform) can provide a basic understanding of the frequency contents of the heart sounds. However, FFT analysis remains of limited values if the stationary assumption of the signal is violated. Since heart sounds exhibit marked changes with time and frequency, they are therefore classified as non - stationary signals. To understand the exact feature of such signals, it is thus important, to study their time – frequency characteristics.
Furthermore, the wavelet transform has demonstrated the ability to analyse the heart sound more accurately than other techniques STFT or Wigner distribution [6] in some pathological cases. This technique has been shown to have a very good time resolution for high-frequency components. In fact the time resolution increases as the frequency increases and the frequency resolution increases as the frequency decreases [4, 5].
In fact the spectrogram (STFT) cannot track very sensitive sudden changes in the time direction. To deal with these time changes properly it is necessary to keep the length of the time window as short as possible. This however, will reduce the frequency resolution in the time-frequency plane. Hence, there is a trade-off between time and frequency resolutions [6].
However the Wigner distribution (WD) and the corresponding WVD (Wigner Ville Distribution) have shown good performances in the analysis of non-stationary signals. This comes from the ability of the WD to separate signals in both time and frequency directions. One advantage of the WD over the STFT is that it does not suffer from the time-frequency trade-off problem. On the other hand,
The WD was applied to heart sound signal it shows no success in displaying or separating the signal components in both the time and frequency direction [6], although it provides high time-and frequency- resolution in simple monocomponent signal analysis[8].
To overcome these difficulties with the STFT and the WD an alternative way to analyse the non-stationary signals is the wavelet transform (WT). It expand the signal some basis functions. The basis functions can be constructed by dilation, contractions and shifts of a unique function called the “
The wavelet Transform is a technique in the domain of time-frequency distributions. The main idea of this method is the representation of an arbitrary signal as a superposition of basic signals, “atoms”, located in time and frequency. These atoms may be derived by means of a special operation on a single parent atom. Parent atoms and derivation operation are usually chosen such as to enable the construction of an orthonormal system [9].
The study of the decomposition of the signal in “ atoms “ was first carried out by Gabor however, it was quickly abandoned be cause of :
-
The nonsimultaneous Representation in time and frequency
-
grid made up of rectangular cells is not a flexible device
-
the mathematical theory of the phenomenon is badly structured.
The representation time-scale of WT based on a dyadic paving appears more flexible. It a mathematical structure governed by a formula of exact inversion [10] making possible the existence of orthonormal basis. This makes the wavelet to be a simultaneous function of time and frequency.
In this paper the continuous wavelet transform (CWT) is applied to analyse pathological PCG signals. The CWT is more appropriate than the discrete wavelet transform (DWT) , since we are interested in the analysis of non-stationary signals and not signal coding where DWT is found to be more useful
This paper will concentrate an analysing the second heart sound S2 and this two major components A2 and P2. The aortic valves normally closes before the pulmonary valves leads to a time delay between these two components respectively A2 and P2. This delay is know as the “split” in the medical community [4,5,6].
Within a patient, the splitting can be variable or fixed, and which of these patterns it follows provides an important clue for diagnosis. This diagnostic importance of S2 has long been recognised, and its significance is considered by cardiologist as the “
Specifically during expiration, A2 and P2 are separated by a relatively short interval typically less than 30ms [14]. A2 has higher frequency contents than that of P2 and A2 precedes P2 generally. Moreover the order of occurrence of this two components of the sound S2 may reverse due to disease [1].
Therefore, the continuous wavelet transform allows us to measure and determine this time delay between A2 and P2 and the bandwidth frequency for the two components. All this information aids diagnosis medical. The continuous wavelet transform is a technique in the domain of time-frequency distributions. This technique has demonstrated the ability to analyse the heart sounds more accurately than other techniques, STFT or wigner distribution [6].
In this paper the Fast Fourier and the continuous wavelet transforms are used to analyse the component A2 and P2 for the second heart sound for the normal and pathological cases of the phonocardiogram in both time and frequency domains.
Theoretical Background
In this section we present a brief description of some properties of each of the FFT (Fast Fourier Transform)and the CWT (Continuous wavelet Transform).
Fast Fourier Transform (FFT)
The Fourier transform S(w) of a signal s(t) is defined as :
S(w) = ∫s(t).exp(-jwt)dt
Where t and w are the time and frequency parameters respectively. S(w) defines the spectrum of the signal s(t). It consists of components at all frequencies over the range for which s(t) is non zero.
Continuous wavelet transform (CWT)
Wavelet analysis represents a windowing technique with variable-sized regions. It allows the use of long time intervals where we want high frequency information.
The wavelet does not use a time-frequency region analysis, but rather a time scale region analysis. One major advantage provided by wavelets is the ability to perform local analysis. That is to analyse a localised area of a larger signal.
The CWT of a signal s(t) can be presented as an inner product of the analysed signal with a function that depends on two parameters : t and a (time and scale respectively) :
where
-
b is the time location
-
a is called scale factor and it is inversely proportional to the frequency (a ∊ R + -{0})
-
denotes a complex conjugate.
-
g(t) is the analysing wavelet .
-
S(w) and G(w) are, respectively, the Fourier transforms of s(t) and g(t).
The analyzing wavelet function g(t) should satisfy a number of properties. The most important ones are continuity, integrability, square integrability, progressivity and it has no d.c component. Moreover, the wavelet g(t) has to be concentrated in both time and frequency as much as possible. It is well known that the smallest time-bandwidth product is achieved by the Gaussian function [4,11]. Hence the most suitable analyzing wavelet for time-frequency analysis is the complex exponential modulated Gaussian function. If we choose the analyzing wavelet that has the following Fourier Transform (FT) :
G(w) = A.exp[-
∊ is a small correction term, theoretically necessary to satisfy the admissisibility conditions of wavelets, where
This is known as the Gabor wavelet. It was shown [4] that
Where g(t) is the wavelet “prototype” or mother which can be thought of as a band pass function. The factor /a/-1/2 is used to ensure energy preservation [12,13]. There are various ways of discretizing time-scale parameter (b,a), each one yields a different type of wavelet transform. The CWT method consist of computing coefficients C(a,b) that are inner products of the signal and a family of “wavelets”.
Results and Discussion
The Fast Fourier Transform (FFT) and the Continuous Wavelet Transform (CWT) techniques are applied to analyse different PCG signals. In fact three cases are considered, one normal and two abnormal or pathological (the aortic-coarctation case and the mitral stenosis) . The sampling rate used is 8000 samples/s. This is was chwon so that the to obtain better reconstitution of the signal under study. The scale of both time and frequency is a linear scale. The frequency scan is from 1Hz to 500Hz.
Frequency Analysis Of The PCG ( FFT)
Normal phonocardiogram
An FFT algorithm is first applied to the sound S2 given in Figure1a. The two components A2 (due to the closure of the aortic valve) and P2 (due to the closure of the pulmonary valve) of the second S2 of the normal PCG are obvious in Figure4a. The spectrum for this sound is distinctly resolved in time into two majors components (A2 and P2) as shown in Figure4a. The spectrum of the sound S2 has reasonable values in the range 50-300Hz.
However the FFT analysis of S2 cannot tell neither which of A2 and P2 precedes the other, nor the value of the time delay known as the “split” which separate them. For a normal heart activity usually A2 precedes P2 [6,16] and the value of the split is lower than 30ms [14]. This time delay between A2 and P2 is very important to detect some pathological cases.
Pathologicals phonocardiograms
A similar analysis is carried out on the pathological PCG signal. The PCG which considered is the case of the aortic-coarctation. At first glance, the temporal representation of this pathological case with respect to the normal case does not show appreciable differences from that of the normal PCG (Figure1a and Figure2a). However the spectral study by FFT show a difference in the frequential extent.
The spectrum of the sound S2 has reasonable values in the range 50-340 Hz. The spectrum for this sound is resolved in time into three major components, for the frequencies lower than 200Hz as shown in (Figure 4b), instead of two components as in the case of the normal PCG (Figure4a).
On the other hand the spectrum frequency for the mitral_stenosis is resolved in time into two components in the range 50-340Hz with only one major component for the frequency lower than 170Hz.
With regard to normal PCG the basic frequency components are obviously detected by the FFT but not the time delay between these components. In fact as it was shown for example in Figure4a, the components A2 and P2 of the second sound S2 are obvious. However the FFT analysis of S2 cannot tell what is the value of the time delay between A2 and P2. It is thus essential to look for a transform which will describe a kind of “ time-varying” spectrum.The CWT can give better results under the same conditions and same sampling rate.
Time-Frequency Analysis Of The Second Sound Using The Continuous Wavelet Transform
Three cases are considered, one normal and two abnormal (the aortic-coarctation and the mitral-stenosis). For the representation of the coefficients C, the x-axis represents position along the signal (time), the y-axis represents scale (related at the frequencies), and the color at each x-y point represents the magnitude of the wavelet coefficient C.
Normal phonocardiogram
An algorithm of the Continuous Wavelet Transform under MATLAB environment is elabored then applied to analyse the sound S2 of the normal signal phonocardiogram as illustrated in Figure1b.
Figure5a shows the result of this analysis. The two internals components A2 and P2 of the second heart sounds are clearly shown in dark color. Figure5b is the contour plot of the surface in Figure5a. This contour provides more details of the major components and their frequency extent.
Thus the second sound (S2) is resolved in time into two majors components A2 and P2 corresponding respectively to the aortic and pulmonary activities; respectively these are localised at 490ms and 496ms.
For a normal heart usually A2 precedes P2, in some pathological case A2 and P2 may be reversed in time order [2]. The time delay between these two components is therefore very important to detect in some pathological cases. This time delay in normal condition is smaller than the 30ms [14]. In our study and for the case which has been considered the time delay between A2 and P2 is measured and estimated at 6ms.
It can be concluded that :
-
The component A2 precedes in time the component P2.
-
A2 have higher frequency content than P2
-
The amplitude of A2 is more important than that of P2.
-
The delay “ d “ between A2 and P2 is lower that 30 ms (Table 1)
Abnormal phonocardiograms
In this section we will consider two pathological phonocardiogram cases: the aortic-coarctation, which is similar in shape as the normal case and the mitral-stenosis case which is quite different in shape. These cases are respectively depicted in Figures 2a and 3a. An corresponding sound S2 are shown respectively in Figures 2b and 3b.
A first glance to Figures 1b, 2b and 3b, shows a visible differences in time domain between these three case (table II). The continuous wavelet transform is then applied to these pathological cases.
Figure 12
The results are shown respectively in Figures 6a and 6a where Figure6a present the wavelet transform of the second sound S2 for the aortic-coarctation and Figure7a the mitral stenosis .Figure6b and Figure7b show respectively the contour plot. These contours provide more details on the temporal and frequential differences between the two sound case also the number of the major components of each sound S2.
It is shown in Figure 6b that the sound S2 is resolved in time into three major components localised in 400ms, 407ms and 412ms. The appearance of this third component next to A2 and P2 is commonly named by the specialist cardiologist as being the
We can notice an appreciable difference of the frequency extents between the three cases (85 to 107).
Table III resumes the differences observed between the normal PCG and the two pathological cases under study.
We notice that the time delay between A2 and P2 of the normal case normal (6ms) differs slightly from those of the two studied pathological cases (4 and 4.3 ms). If these values remain however acceptable regarding of the normal case (d<30ms), it is the number of components within the sound S2 and their frequency extent which makes it possible to separate between the pathological case.
The shape of the mitral – stenosis signal informs about the pathological aspect of case. The sound S2 is very reduced in amplitude and frequential extension compared to the properties of normal S2.
Conclusion
The cardiac (heartbeat sound) cycle of phonocardiogram (PCG) is characterized by transients and fast changes in frequency as time progresses. It was shown that basic frequency content of PCG signal can be easily provided using FFT technique. However, time duration and transient variation cannot be resolved; the CWT wavelet transform therefore is a suitable technique to analyse such a signal. It was also shown that the coefficients of the continuous wavelet transform give a graphic representation that provides a quantitative analysis simultaneously in time and frequency. It is therefore very helpful in extracting clinically useful information.
The measurement of the time difference between the A2 and P2 components in the sound S2, the number of major components of the sounds S1 and S2 and the frequency range and duration for all these components and sounds can be accurately achieved for the CWT simultaneously as was clearly illustrated.
It is shown that the wavelet transform provides a detailed description of the structure of the cardiovascular sound cycle and provides a method with which analysis of heart sounds can be performed using a quantitative procedure based on timing, frequency, intensity, evolution and shape.
In particular, and because of its time resolution, it allows an exact measurement of the time delay between the A2 and P2 components of the second sound S2 of the phonocardiogram signal.
It is found that the wavelets transform is capable of detecting the two components (the aortic valve component A2 and the pulmonary valve component P2) of the second sound S2 of a normal PCG signal . These components are not accurately detectable using the STFT or WD [8].
However the standard FFT can display the frequencies of the components A2 and P2 but cannot display the time delay between them.
The wavelet transform provides more features and characteristics of the PCG signals. This will help physicians to obtain qualitative and quantitative measurements of the time-frequency characteristics of the PCG signals. Normal and pathological signals have been considered to give some idea of the generality of the evaluation.