Heart Murmur Recognition Based on Hidden Markov Model

Heart murmur recognition and classification play an important role in the auscultative diagnosis. The method based on hidden markov model (HMM) was presented to recognize the heart murmur. The murmur was isolated on basis of the principle of wavelet analysis considering the time-frequency characteristics of the heart murmur. This method uses Mel frequency cepstral coefficient (MFCC) to extract representative features and develops hidden Markov model (HMM) for signal classification. The result shows that this method is able to recognize the murmur efficiently and superior to BP neural network (94.2% vs 82.8%). And the findings suggest that the method may have the potential to be used to assist doctors for a more objective diagnosis.


Introduction
The heart sound signal contains much useful information which may help the clinician in diagnoses and the researcher in learning more of the heart's function [1].Heart sound auscultation is an important way to check the integrity of cardiac function, and the patients with heart diseases can be probably diagnosed by means of the stethoscope.Heart murmurs are auscultatory sounds produced by turbulent blood flow in and around the heart.These sounds usually signify an underlying cardiac pathology, which may include diseased valves or an abnormal passage of blood flow.Heart murmurs are classified based on their occurrence in different parts of the heart cycle [2].The systolic murmurs occur during contraction of ventricles while the diastolic murmurs occur during their relaxation.Murmurs are noise-like events, which can appear either during systole or diastole representing different cardiac pathologies.Therefore, those murmurs have important clinical and prognostic implications in heart disease and would be regarded as one of the crucial indicators to make a definite diagnosis on a certain type of disease.
Many heart disorders can be effectively diagnosed using auscultation techniques.Most of lethal heart diseases, such as heart valve dysfunction or even in heart failure, heart sound auscultation is one of the most reliable and successful tools for early diagnosis.However, in the telemonitoring heart sound system, auscultation is not feasible for its requirement of well-trained doctors.In order to facilitate the work of doctor and be suitable for long time monitoring, a computer-aided automatic heart murmurs recognition method was needed to assist doctors for a more objective diagnosis.
In this paper, we proposed a new method of heart murmur recognition based on HMM and MFCC, and did comparative study with BP neural network approach.The method includes wavelet threshold de-noising which was used to isolate murmurs by considering the frequency characteristics of the heart murmur.In order to keep the pathological information integrity, heart sound analysis is on the basis of each cardiac cycle.And the heart murmur is classified according to the type of various heart diseases.

Method
We use heart sound detection instrument to acquire heart sound signals.The sounds were recorded with 16-bit accuracy and 11,025 Hz sampling frequency and stored as wav form in computer.The recorded signals were first preprocessed before performing envelope extraction and segmentation.Heart sound signals were normalized ac-cording to (1) as shown below: where x(t) is the original signal.The square operation aims to make peak signal more prominent while weaken the noise.Here we do not apply any digital filter because the frequency of original signals has been confined in 10 to 400 by the hardware.The procedure of the heart sound recognition is shown in Figure 1.

Murmurs Separation
After various wavelets comparing experiment, we selected the coiflets 3 wavelet which got better results in murmurs separation to function based on the reconstructed factor.5 points frequency sampling and threelevel wavelet transform is applied.The frequency bands of the details and approximations are:

Segmentaion of Heart Sound
1) Envelope extraction method using Morlet wavelet Wavelet function can be regard as a band-pass filter from signal analysis perspective.Morlet wavelet is a complex wavelet and therefore the corresponding filter is a complex one.From Equation (4), the real part and the imaginary part is equivalent to a zero phase shift filter and a 90-degree phase shift filter respectively.So the real part and the imaginary part wavelet coefficients have a phase difference of 90-degree after using Morlet wavelet transformation.According to the envelope detection principle, if two signals which are in the same amplitude and their phase difference is 90-degree, the envelope can be extracted by demodulation method.The envelope amplitude can be obtained by the follow equation: 2) Detection and classification of S1 and S2 sounds The heart sounds S1 and S2 are identified and classified through the following steps: First, set the amplitude threshold and remove the peaks whose amplitude is less than the set one.Second, calculate the first order difference of the above envelope signal and determine differential threshold.Third, find positive and negative difference pairs.Fourth, tag all of S1 and S2 locations.Fifth, S1 and S2 differentiation.Last, find the starting and ending point of S1 and S2.This method to identify the S1 and S2 has been fully explained in our earlier study [3].Through the two procedures that mentioned above, S1 and S2 can be identified.The segmentation result is shown in Figure 3.

MFCC Features Extraction
The Flowchart of MFCC extraction is shown in Figure 4. MFCC coefficients were obtained by taking a discrete cosine transform (DCT) of the logarithmic spectrum scale after it was warped to the Mel scale [4] by using Equation ( 4).The MFCC coefficients of one heart sound cycle with mitral regurgitation are shown in Figure 5.

Hidden Markov Model
Following feature extraction, an automatic classification process was performed by using HMM.HMM can be recorded as and characterized by the following four parameters [5]: 1) M, the number of distinct observation symbols per state.M is the number of Gaussian mixtures denoted as

Results and Discussions
The heart sound data set in this research contained 600 different heartbeats covering 5 types of murmurs (including mitral regurgitation, mitral stenosis, aortic regurgitation, aortic stenosis and pulmonary stenosis) and normal heart sound signals.Therefore four HMM models were trained to represent the corresponding six types of heart sounds with its component characteristic.300 heartbeats were used to train the HMMs while 300 are left for testing, and the recognition results are shown in Table 1.And using then did comparative study with BP neural network [6] in order to prove the superiority of this method.The results and summarized are shown in Table 2.
HMM model got good performance in heart sound signals recognition, and the correct recognition rate (CCR) varies from 91.9% to 100% with the mean of 96.3% from Table 1.Furthermore, it provided much better results compared to BP neural network, an excellent CCR of 94.5% in murmurs recognition was obtained using the HMM while the CCR is only 82.5% by using BP neural network.This method was confirmed to be available for recognizing the murmur efficiently and superior to BP neural network in our study.

Conclusions
A new method based on hidden markov model was presented to recognize the heart murmur was presented in this paper.This method used wavelet theory to separate murmurs and normal signals, used a robust envelope extraction algorithm to heart sound segmentation and detection, extracted MFCC features and developed HMM    for signal classification.
From the results obtained, this method recognized the murmur efficiently and superior to BP neural network (94.2% vs 82.8%).And it can be used in heart murmurs recognition and may have the potential to be used to assist doctors for a more objective diagnosis.
1 th -level details (d1): 551 Hz -1102 Hz 2 th -level details (d2): 276 Hz -551 Hz 3 th -level details (d3): 138 Hz -276 Hz 3 th -level approximations (a3): 0 Hz -138 Hz The murmurs distribute mainly in high-frequency section, d2(276 Hz -551 Hz)while the normal component of heart sound such as S1 and S2 distribute in low-frequency section (a3: 0 Hz -138 Hz).The murmur and the normal component of heart sound would be separated by reconstruction because of the differences between them in the frequency.The result is shown in Figure 2.

4 )Figure 1 .
Figure 1.Flowchart of the heart sound recognition

Figure 4 .
Figure 4. Flowchart of MFCC extraction.state sequence that maximizes the probaility of generation of the observation sequence O, and uses forwardbackward procedure to calculate the probability   P O  .

Figure 5 .
Figure 5. MFCC of one heart sound cycle with mitral regurgitation.

Figure 6 .
Figure 6.HMM of left to right type with 4 states.