Best subsequence selection of heart sound recording based on degree of sound periodicity
transform. That is,
T. Li, H. Tang, T. Qiu and Y. Park
Sx (a, f ) is called the cyclic spectral density. In any stochastic process for which Rx(a, t) = 0 or Sx(a, f ) = 0, the process exhibits a certain degree of periodicity at cycle frequency a. In this Letter, the analysis in the cycle frequency domain is of primary interest. We can get the cycle frequency spectral density (CFSD) using the integral, 1 gx (a) = |Sxa ( f )|df (5)
0
where b is the maximum cycle frequency considered and h is the basic cycle frequency indicated by the first peak location of gx (a). Noise distorts the heart sound signal, thus degrading the periodicity. It is therefore reasonable to conclude that a heart sound sequence with less noise will have a high degree of periodicity and thus high quality. The quality index thus has the ability to act as a quality score for heart sound signals. Here is an example. A heart sound signal lasting 6s is shown in Fig. 1a. It was acquired at the authors’ laboratory with a sampling rate of 2 KHz, where a sensor was placed on the mitral site. The CFSD of the signal at a from 0 to 1.5 Hz is given in Fig. 1b. It can be seen that the signal has only one basic cycle frequency, as indicated by the first peak location at 1.02 Hz. The quality index is calculated according to (6). We get d(1.02) = 2.07. The signal quality degrades if the signal is contaminated by interference and noise. For example, the signal contaminated by simulated interference and noise is shown in Fig. 1c. The interferences are indicated by the ellipses and the noise has the same frequency band as that of the heart sounds. The CFSD is given in Fig. 1d. It is found that the peak still occurs at 1.02 Hz, but the quality index at this cycle frequency decreases to 1.44. This simulation shows that the quality score reflects the signal quality. 2
1
1
amplitude
2
0 –1 –2
0
2
4
–2
6
D
Rx (t, t) = lim
N 1 2N
1 x(t + t/2 + nT )x∗ (t − t/2 + nT ) + 1 n=−N
(1)
Rx (t, t) is a periodic function. N is the number of cycles involved in analysis. We expand Rx (t, t) using the Fourier series as Rx (t, t) =
+1
a=−1
Rx (a, t)e j 2p a t
(2)
where a is a real number. It is called the cycle frequency. The coefficient of the Fourier series is given as Rx (a, t) = kx(t + t/2)x∗ (t − t/2)e−j2p a t lt
(3)
where the operator , . . t denotes the time average. Rx (a, t) is called the cyclic correlation function. It degenerates into a traditional correlation when the cycle frequency a is zero. In the extreme case, the basic cycle frequency of the heart sound signal is a ¼ 1/T. Rx(a, t) = 0 only if the cycle frequency is k a and Rx (a, t) = 0 elsewhere, where k is an integer. However, the cycle duration of a normal heart sound signal is not fixed; it varies with time. This is known as heart rate variability. Thus, Rx(a, t) = 0 even if a is any real number. Rx (a, t) can be transformed into the frequency domain via the Fourier
ELECTRONICS LETTERS 21st July 2011 Vol. 47
0
2
4
6
time, s
a
c 0.15
0.15 0.10
0.10 0.05
0.05 N
0 –1
time, s
CFSD
Methodology: It is known that heart sounds are generated by heart valve closure, blood flow, and cardiac muscle contractions. These events repeat in each cardiac cycle. Furthermore, heart rate does not change abruptly in a short time. As such, it is safe to assume that heart sound signals are quasi-periodic [2, 3]. Let x(t) be a digital heart sound signal sequence. In extreme cases, the cycle duration T is constant. The time-varying autocorrelation is given as,
(4)
The relative rate defines the quality index for a heart sound signal b d(h) = gx (h)/ gx (a)da (6)
amplitude
Introduction: A practical problem often occurs in computer-based analysis of digital heart sound signals. That is, a recording may be longer than necessary, as algorithms only require a particular subsequence. In addition, some parts of the recording may be contaminated by noise. These contaminated parts should be pruned away before further analysis, and human intervention is needed to select the subsequence with the best quality. It is of interest to develop techniques to automatically select the subsequence with the best quality. This leads to a practical question: what is a suitable criterion for evaluating the quality of a subsequence? To the best of our knowledge, Beritelli and Spadaccini [1] were the first to propose a quality index, based on the cepstral distance between homogeneous cardiac sounds, to gauge the quality of recordings of heart sounds (first and second heart sounds, S1 and S2, respectively). They defined the reciprocal of the cepstral distance as the quality score, based on the reasoning that the greater is the quality score, the higher is the degree of consistency in the continuous heart sounds. They concluded that continuous heart sounds with the maximum quality score have the best quality. This quality index performed very well. However, we note that their scheme requires a preprocessing step, i.e. segmentation of the heart sound signals, which is often inaccurate. Manual segmentation is needed for improved accuracy, making their scheme only partially automatic in this sense. Moreover, we note that a subsequence of a heart sound signal will contain not only heart sounds (S1, S2, S3, S4) but also murmurs. However, their quality index only takes into account S1 and S2. To realise complete automation, this Letter proposes a subsequence selection scheme that exploits the periodic nature of heartbeats.
Rx (a, t)e−j2p f t dt
−1
−1
CFSD
Noise often appears in parts of heart sound recordings, which may also be longer than necessary for subsequent analysis. Human intervention is needed to select the subsequence with the best quality. Presented is an automated scheme for best subsequence selection to obviate such human intervention. The scheme is based on the finding that heart sound signals with less random noise contamination have a greater degree of periodicity. Both simulations and experiments validate the scheme.
1 Sx (a, f ) =
0
0 0
0.5 1.0 cycle frequency, Hz
0
1.5
b
0.5 1.0 cycle frequency, Hz
1.5
d
Fig. 1 Examples of CFSD calculation a Normal heart sound signal b CFSD of normal signal c Normal signal contaminated with simulated interference and noise d CFSD of contaminated signal
Most digital heart sound recordings span 20 – 70 cardiac cycles. However, only 4 – 10 continuous cardiac cycles are needed for the subsequent analysis. In order to select the subsequence with the best quality, a sliding window can be used. In other words, the time-varying quality index can be defined as b d(h, t) = gx (h, t)/ gx (a, t)da (7) 0
where gx (a, t) is the CFSD for a subsequence defined in [t − z, t + z], and h is the basic cycle frequency. The sliding window covers 2z in the time domain. From the nature of heartbeats, we know that a quality index does not exist for a subsequence spanning less than two cardiac cycles, where the heartbeat does not repeat. We thus conclude that the minimum
No. 15
length of a sliding window must be equal to or greater than two cardiac cycles so that the heartbeat repeats at least once. A heart sound recording spanning 27 cardiac cycles was recorded in the same conditions given above. The signal had little noise and was manually segmented into three equal parts, each being approximately 9s long. The first part and the third part were deliberately contaminated with simulated interference and noise, as shown in Fig. 2a. A sliding window covering 8s moves in steps of 0.1s. The time-varying CFSD is shown in Fig. 2b. The time-varying quality index is given in Fig. 2c. It can be seen that the local quality index accurately follows our expectation. The local quality index is low when the signal is contaminated, but increases when the window enters a low-noise region. The time-varying quality index has a maximum at 13.1s, indicated by the arrow in Fig. 2c. The best subsequence is given in Fig. 2d.
0
5
10
20
25
1.5 1.0 0.5 0 0
15 time, s a
5
10
15 time, s b
20
25
Experiments and conclusions: The proposed scheme was evaluated in a practical setting through an environment. The sensor was placed on the mitral site to acquire the heart sound signal. Skin contact, muscular activity, and surrounding speech contaminate the recordings, as can be seen in Fig. 3a. The recording is 48s long, and visual inspection clearly reveals signal contamination from 6 to 12s and from 25 to 33s. A sliding window spanning 8s moves along the recording. The local quality index is shown in Fig. 3b. It can be seen that the quality index has a high value in the low-noise parts and a low value in the noisy parts. The quality index exactly reflects the quality of a windowed subsequence. The best subsequence, that is, the sequence with the maximum score, is indicated by the arrow in Fig. 3c. From the simulations and experiments described above, we conclude that the proposed scheme has the following advantages. 1. The quality indicator essentially reflects the degree of periodicity of heart events in continuous cardiac cycles. The subsequence with the highest quality score has all events repeated with the highest periodicity. In other words, the subsequence has the least amount of noise and interference. It is therefore reasonable to conclude that the subsequence has the best quality. 2. The score signifies the overall quality of a subsequence, unlike Beritelli and Spadaccini’s score, which only indicates the quality of S1 and S2 events in a subsequence. 3. The selection is automatic; no human intervention is needed. This is very useful as it allows completely automatic analysis.
15 time, s c
20
25
# The Institution of Engineering and Technology 2011 2 June 2011 doi: 10.1049/el.2011.1693 One or more of the Figures in this Letter are available in colour online.
amplitude
1 0
amplitude
quality index
CF, Hz
–1
2 1 0 0
5
10
T. Li, H. Tang and T. Qiu (Department of Biomedical Engineering, Dalian University of Technology, 116024, People’s Republic of China)
0.5 0 –0.5
E-mail:
[email protected] 10
11
12
13 time, s d
14
15
16
17
References
Fig. 2 Simulation of best subsequence selection
amplitude
a Heart sound recording contaminated with interference and noise b Time-varying CFSD c Time-varying quality index enabled by sliding window d Best subsequence indicated by maximum quality score 4 2 0 –2 –4 0
5
10
15
20
25
Y. Park (Department of Information and Communication, Yeungnam University, 712749, Republic of Korea)
30
35
40
45
30
35
40
45
1 Beritelli, F., and Spadaccini, A.: ‘Heart sounds quality analysis for automatic cardiac biometry applications’. IEEE Int. Workshop Information Forensics and Security, London, UK, December 2009, pp. 61–65 2 Tang, H., Li, T., and Qiu, T.: ‘Noise and disturbance reduction for heart sounds in cycle-frequency domain based on nonlinear time scaling’, IEEE Trans. Biomed. Eng., 2010, 57, (2), pp. 325– 333 3 Tang, H., Li, T., Park, Y., and Qiu, T.: ‘Separation of heart sound signal from noise in joint cycle frequency-time-frequency domains based on fuzzy detection’, IEEE Trans. Biomed. Eng., 2010, 57, (10), pp. 2438–2447
time, s quality index
a 2 1 0
0
5
10
15
20
25 time, s
amplitude
b 0.5 0 –0.5 17
18
19
20
21
22
23
24
time, s
c
Fig. 3 Experiments on best subsequence selection a Heart sound signal recorded at authors’ laboratory b Time-varying quality index c Best subsequence indicated by maximum quality score
ELECTRONICS LETTERS 21st July 2011 Vol. 47 No. 15