You are on page 1of 5

3rd In!'1 Conf.

on Recent Advances in Information Technology I RAIT-20161

AReal-Time Heartbeat Detection Technique Using


TMS320C6713 Processor and Multi-rate Signal
Processing

D.Mandal 1 M. Ganguly
Department ofElectronics and Communication Department ofElectronics
Engineering West Bengal State University, Barasat, West Bengal,
Heritage Institute ofTechnology, Kolkata, India India
E-mail:dulal.mandal@heritageit.edu E-mail:ray_madhabi@yahoo.co.in

Abstract- A lot of works have been done on In the last few years, on data compression a lot of works
Electrocardiogram and Phonocardiogram (ECG and PCG). have been done. Several efficient ECG compression
But in most of the cases data for ECG or PCG have been taken techniques such as linear predictive, sub-band coding
from standard database Iike MIT-BIß Arrhythmia or any waveform coding etc. have been reported in literature [3].
other sourees. In this work a real-time signal processing task
During last decade The Wavelet Transform, especially
(RTST) on heart sound is presented. In the first part it is
shown that the phonocardiogram signal (pCG) could be Discrete Wavelet Transform has appeared as powerful and
detected using an electronic circuit along with the DSP robust tool for analyzing and extracting information from
(TMS320C6713) processor from human heart. In the second non-stationary signal such as speech signal and ECG signal
part reduction of PCG signal and analysis of PCG signal have [3]. In some work it is shown that the amplitude zone time
been shown using different digital signal processing techniques epoch coding (AZTEC), and coordinate reduction time
Iike Decimation, Interpolation, Windowing, Discrete Fourier encoding system (CORTES) were developed. In those work
Transform, Fast Fourier Transforms etc. In this work we have compression is achieved by eliminating redundancy between
applied the Multi-rate Signal Processing Technique to reduce different ECG sampies in the time domain [4-5] based on
the size of the heart sound signal. The MSPT deals with
direct scheme. Some other examples are the turning-point
different sampling frequencies. The chaUenging part of this
work is to apply the DSP KIT to achieve the heart sound data (TP) data reduction algorithm [6], the scan-along polygonal
and to apply the different signal processing techniques to reach approximation (SAPA) and differential pulse code
the goal. An electronic circuit is designed and implemented modulation (DPCM). These techniques involve simple
a10ng with a stethoscope to receive the heart sound signal signal processing task and produce minimum distortion with
(PCG signal) from the human heart. The DSP KIT is good compression. A detailed review on these techniques is
incorporated to proceed to the main work. The task has been presented in [7-9] and the references there in.
completed through taking near about 20 person's real time Considering all the facts, we have presented some signal
heart sound sampies (pCG sampies). processing task to reduce the problems of compressing and
analyzing the heart sound signals. In the second section we
Keywords-Decimation; Interpolation; Multi-rate signal have described the process of obtaining the digital heart
processing; Stethoscope; PCG.
sound signal using the DSP processor TMS320C6713.
Decirnation and interpolation techniques have been described
I. INTRODUCTION in section III. Results have been discussed in section V.
R eart Auscultation is a non-invasive low-cost screening
method , which is defined as the process of interpreting 11. HEART SOUNDS AND THEIR PHYSICAL CAUSES
acoustic waves produced by the mechanical action of heart,
and for the diagnosis of cardiac diseases it is used as Human heart divided into four cavities that are known as
fundamental tool [1]. It can provide necessary information the left and right atria and ventricles. A set of valves:
regarding the function of heart valves and the hemo- tricuspid, bicuspid (mitrai), pulmonary and aortic help to
dynamics of the heart. Also it has high potential for flow blood through cavities. Human heart can be modeled as
detecting various heart disorders especially valvular a four chambers pump where blood is collected from veins
problems [2]. Now-a-days heart sound signals are detected by two superior atria and other two inferior ventricles which
with the computers and other specially designed digital pump blood into arteries [10]. Its pumping action is divided
equipment. But they are very costly and installed in a into two halves; the systole and diastole. Systole is the period
particular place and they are not easy to handle. Moreover of contraction of the heart muscles and the period of
they need more memory space to store the digital signals relaxation is called diastole. Due to closure of the major
and consume more power to run. Therefore it requires some valves [11] heart sounds are produced.
techniques to reduce the size ofthe signals.

978-1-4799-8579-1116/$31.00 ©20 16 IEEE

Authorized licensed use limited to: G Narayanamma Institute of Technology & Science. Downloaded on March 17,2023 at 16:36:07 UTC from IEEE Xplore. Restrictions apply.
3rd In!'1 Conf. on Recent Advances in Information Technology I RAIT-20161

III. DETECTION OF HEART SOUND +35v

A. Application 0/ DSP processor (TMS320C6713)


..1 0.01 uF

J
02
Heart sounds are nonnally very weak signals. Nonnal 01

microphones or other sensors can be used for the conversion STIT~


HO;OPE 47k 2k

of the heart sound signal to electrical signal [12]. Fig. 1


shows heart sound sampIe received by the DSPKlT. 1.5k

[D
OOI",I1---r-ir-w~t).J-Ir--:;;':;;-'-~-4),1
Eltample o f he'artso und s ampl,e r,eceiv ed' Dy th.e OSP'KIT M

NPN Q.OIUF
.' d MIC
-12v

-'-

Fig. 3. Electronic circuit diagram to follow- up the heart sound signal

., '" - "",v·

Fig. 1. A typical heart sound signal. X axis represents the no of sampies. It


also shows the presence of noise and positions of heart sound components
Sland S2

In this present work a stethoscope receives the heart


sound signal (PCG) and it is fed to a microphone. Next it is
processed through an amplifier circuit and an analog low
pass filter to remove some high frequencies noise. For
Fig. 4. Photograph of experimental setup to take heart sound sampIe
further processing a DSP KlT is incorporated. It detects the
analog heart sound signal fonn the analog filter circuit. The
CODEC convert the analog heart sound signal to digital
signal which is inbuilt in the DSP KlT. For further IV. COMPRESSION TECHNIQUES FOR REDUCING THE
processing of the signal the DSP processor uses the digital SIZE OF HEART SOUND DATA
filters and windows. After processing, the results are sent to
the PC through the CODEC. Data save option of this kit A. Multi-rate Signal Processing Technique
provide a wonderful job to save the digital data in PC. After
In the state-of-art many advanced instruments have been
getting the data in PC MATLAB software has been
designed to detect different biomedical signal like ECG,
appointed to get the pure cardiac cycle and other results
related to heart. Block diagram and the actual circuit are EEG etc. But in most of the cases they use high frequencies
shown in the following figures. A block diagram of the for sampling the signals. So the size of the stored signals is
experimental setup is illustrated in Fig. 2. Fig. 3 shows the very high. Moreover when it is required to analyze the
electronic circuit diagram. Fig. 4 shows the experimental signal a low sampling frequency is required. As a result we
setup. need some system with different sampling frequencies
which are called Multi-rate signal processing.
The basic concept behind the MSPT is the up-sampling
and down-sampling or decimation of a signal.
With the help of up-sampling we get more no of sampIes.
This can be expressed as y(n) = x(n/2)
Now if x{n) = {1,2,1,2,3,2,1,2,3,2,1,3}

,-
P _-,Ho 0 PK
IT ~I-_...I
then y{n) = {1,O,2,O,I,O,2,O,3,O,2,O,I,O,2.0,3,O,2,O,I,O,3} .
This is done with the help of interpolation technique.
Here we see that the size ofthe y(n) is doubled ofthe x{n).
Fig. 2 Block diagram of heart sound detection Up sampling operation is shown in Fig. 5.

978-1-4799-8579-1116/$31 .00 ©20 16 IEEE

Authorized licensed use limited to: G Narayanamma Institute of Technology & Science. Downloaded on March 17,2023 at 16:36:07 UTC from IEEE Xplore. Restrictions apply.
3rd In!'1 Conf. on Recent Advances in Information Technology I RAIT-20161

Origi na I Si.gna I ~ignal


~ after -
up<~arn-p<l iIl~
" response FT(.J"lV) = { 1 "lV E[- ~::'1, ' ~,
::'1 ]
o ot-herlVise

Now if the impulse response of the filter is h{t) then

I

r 1 I
••
J • 1" Ir i .• i
I I ~ j
i ;,
X2 (t) can be recovered as
Time· Time
(a l (bI

Fig. 5. Up sampling operation of discrete time signal Now ifwe want to get the resample version of

In the same way down sampling or decimation can be X2 (t) with the sampling frequency fs2 = 1/T2 we can
used to reduce the size of the sampled signal. The down resample it with the expression
sampling process can be expressed as
x(n) = {1,3,2,4,5,3,6,7,4,4,3} x'(n)=~
:z;
L x(m)Sinc[~(nT2-mT2)l
oo

Tl
-00 J (3)
If it is down sampled by a factor of 2 then it is expressed
From this equation we see that two sampling frequencies
as
y(n) = x(2n) = {1,2,5,6,4,3} . are used i.e. 1/TJ and 1/T2 also it is the general equation,
Therefore it is c1ear that the size of the y{n) is reduced by determining sampling rate changes.
a factor ofhalf.
The down sampling operation is shown in Fig. 6. Therefore we can use some systems with different
sampling frequency to reduce the size of a signal. But
Origin31 Sign<!1 Sign,al .3fter down sa mpling practically it is not possible to implement the above equation
because it consists of infinite no of sampies. The equivalent
operation can be done with the help of decimation operation

1,1
iI
i f [ I I I [ 11 11
1 ! I ! I r I I ~ '!1 ..1"-...."
II,........:.--==-~-:-:-...L-~".......,O-,·
which is done in this work. Results are shown in section V.

Time Time B. Multi-rate Signal Processing Technique


(a}
Fig. 6. Down sampling operation of a discrete time signal Let us take a discrete time signal x{n) . The decimation
operation can be done by reducin~ its sampling rate. And it
But if we go for higher and higher of up sampling or can be expressed as xAn)=x{nM). With the help ofthis we
lower and lower of down sampling then aliasing effect may can keep only every M sampies of the original. As a result
occur. To avoid the aliasing effect the down sampling we are reducing the number of sampies in the new signal. To
frequency is fixed as fsP = 1/ PT where P is the down avoid aliasing effect we keep equal no of zeros by
sampling factor and the original signal is passed through a interpolation technique. Fig. 7 shows the block diagram
low pass filter with cut-off frequency = Fs / P . representation of the decimation technique. Original signal
with the decimated versions has been shown in Fig. 8.
We can prove that it is possible to take different sampling
frequency to process the signal without affecting the signal in
time domain and in the frequency domain.
Let us take an analog signal X2 (t) with band limited to
[tZ/I] ,1Z'/ T2 l Now ifwe sampie it with sampling time TI we Fig.7. Block diagram ofthe decimation technique

get the digital signal x{m). Now x{m)=x2{mTJ ) for


mE Z .
1:l b f l f : Tl 1 o ; y, l r : T'b ! ~ !
As we know that a discrete time signal can be restored o 5 10 15 20 25
from its sampies by replacing each sampie by an impulse Time :a)

I] " f " Y : T " l " ; " ! " r : j " , "~ !


Theorjginal signal

proportional of it. Therefore we can recover the analog signal


by the expression

n"""! "J":"!"":
o
Xi (t)= L:=-=x(m}5(t-m71) (I) Time
5 10
(b) Deci_ed by 2
15 20 25

: L "~I
Now the spectrum of this signal is periodic with
period21Z'/11 .
To recover the original analog signal x 2 (t) it must be o
Time
5
(c )
10
Deci_ed by 4
15 20 25

passing through a low pass filter with the frequency Fig. 8. (a) Original signal (b), (c) Decimated Version

978-1-4799-8579-1116/$31 .00 ©20 16 IEEE

Authorized licensed use limited to: G Narayanamma Institute of Technology & Science. Downloaded on March 17,2023 at 16:36:07 UTC from IEEE Xplore. Restrictions apply.
3rd In!'1 Conf. on Recent Advances in Information Technology I RAIT-20161

It can be proved that if the spectrum of x(m )is X(e iw )


x Onainol <I"""",. 11 by ""oCh.. farn"
(n)
\0'
~ . ~~--~~~~~~~~~~~~~-------,
then the spectrum of the decimated signal Xd is
j o ~-*~--~~~~--~~--~~--~~~.
~d(eJ>V)= ~ L~:~~(eJ(a>-2 _)/A-f) t 50!.-----:A~----~1~----~l5~----~.----~~--~
T'",,~, ( O)
v • •

In = nJVf,.n E Z
o therl-Vise

Fourier transform of Xd (n) is given by T'1IlI ~ ' lI0II

xAe
tE =;~ ' :~
iw )= L :=_oo xAn)e- i <lN1
~Ae.Ja» = L~=_oo xAn~-.J<U'J Q 111 ~ r"".l0 .cO (~l ~O 60 ro 110 ~
Fig. 10. Represents tbe original signal with other decimated factors
= L~=-oo x(nU-}-.JaNt
= L~=-oo x'(11Af),-.Jwn TABLE.- l
Time domain and frequency domain result applying MSPT
=X'(dw / m ) % Du rationof Du rat ionofh eart Heart bit rate Frequenc.ie sp resent

Where X(e jW )= 1/27~\'-(ejW )' f 1:::,: .o(m - tLIIf)


No card iac cycle

CM1·T CTE
sound
components
SE SH CMI -T CTI-T M-F SU Sl-F

)* L..J
ISec) ISec) ISec ) ISec ) 1Hz) 1Hz) 1Hz)
= _1 X{e jOJ
21<
~ 8(w - 2nk)j M 0 .714
0 .652
0 ,666
0 ,779
0 ,013
0 ,013
0 ,024
0 ,024
75 .7
69 .9
72.6
76 .9
150.06
200 .8 7
32
35 ,0 6
70.23
76 ,56
-a 0 .659 0 ,769 0 ,014 0 ,02 3 75.1 77.9 Nil 34 ,65 79 ,78
0 .689 0.857 0 ,01 5 0 ,022 77 .5 69 .9 Nil 35 .67 72 .47
0 .69 7 0 ,72 2 0 ,014 0 ,024 71.4 82 ,9 306.68 30 ,4 5 78 ,2
0 .82 1 0 ,659 0 ,014 0 ,0 23 68 ,9 90 .9 302.5 6 40 ,4 5 8 7,4 3
= _l_~M -l X{ej(m- 27lk)jM) 0 .722 0 ,666 0 ,013 0 ,024 73.5 89 .9 Nil 36 ,4 6 80
M .L..JK= O ~ 0 .731 0 ,689 0 ,014 0 ,031 66 .6 87 Nil 31,35 85 ,67

xd (n).
0 .666 0 ,705 0 ,013 0 ,02 1 70.4 85 376,56 40 ,56 76 ,69
This is the spectrum ofthe decimated signal 10 0 .722 0 ,869 0 ,012 0 ,0 2 66 ,2 69 Nil 41,56 76 ,58
11 0 ,659 0 ,84 5 0 ,0 14 0 ,022 68 ,4 71 Nil 35 76 ,83

Therefore one can apply this to analyze the signals. We 12


13
0 .769
0 .789
0 ,821
0 ,714
0 ,014
0 ,013
0 ,022
0 ,02 3
71.9
72.9
72.9
83 .9
200 ,56
Nil
4 5,09
37 ,4 6
77
62 ,56
have used this to the heart sound signal. 14 0.869 0 .7:11 ~l.O 15 0 .024 63 .4 82 300 .76 35 .6 6 7.67
15 0.874 0 ,681 0 .014 0 ,02 3 70 .4 88 350 .34 38 .4 5 70 .87
16 0 ,698 0.731 0 ,01 5 0 ,024 67 ,4 82 Nil 32 ,4 6 63 ,08
V. COMPRESSION TECHNIQUES FOR REDUCING THE
**Notes:
SIZE OF HEART SOUND DAT A
SI-T: Duration of 1st heart sound in second.
A. Result 0/ MSPT S2-T: Duration of 2nd heart sound in second.
CM1-T: Duration of a cardiac cycle measuring the duration
The purpose of the MSPT is to reduce the size of the
oftwo consecutive MI in second.
heart sound signal by changing the samp1ing frequencies. It
CT1-T: Duration of a cardiac cycle measuring the duration
is shown that frequency domain characteristics will not be
oftwo consecutive Tl in second.
affected if we consider different sampling frequencies within
a certain limit. Therefore we can reduce the size of the heart Sl-F: Frequency of 1st heart sound in Hz.
sound signal to analyze the heart sound signal in the time
domain and in the frequency domain we have considered the
VI. CONCLUSION
reduced heart sound signal. Some results related to heart
sound components like SI, S2 etc. and frequencies present , The aim of this work was to detect the heart sound signal
heart bit rate etc. have been calculated. Table-l shows all the applying the DSP processor and to reduce the size of the
relevant results. The direct result ofMSPT is shown in Fig. 9 same using multi-rate signal processing technique. In the first
and Fig.1 0 given below. part we have shown that one can detect and process the heart
sound signal using the DSP processor. In the second part it is
shown that the size of the heart sound signal can be reduced
j :X 10 using the multi-rate signal processing technique. After
f·o~--~o~.----~----~s----~----~'~S----~' getting the reduced heart sound signal it is easy to analyze. In
T UDe- 1 (.3 '" _ "'10" ~ the analysis part we have found some time domain and some
~ Decin:aated by 2
2)(.1 1)'
frequency domain results which have been shown in section-
.jl J--..1--~""-+-......,II----i-~......- f -- +-IH
0
IV. Clinically significant results like heartbeat rate, duration
J 20!.--;::>O...O--:.;:;OO;;-Ti-......,.;:;:OO;;--.""":v.(b-)';;;OOO=---;.;;:>OO;;;;-.....,~.OO;n!..."'600;;:;;;--..,_=' of heart sound components etc. have been shown. In this
Deci:mat.ed by 10
work sixteen (16) person' s heart sound data have been

".,
TlDlle
~t
,60 110
(c)
100 120 14.0
collected and analyzed. In every case we have got heartbeat
rate in between 60 and 90 which is normal. The duration of
Fig. 9. (a) Represents the original heart sound signal with the no of sampies SI and S2 also gives an excellent result. Therefore it can be
3600. (b) The original signal is decimated by 2 and the no of sampies is concluded that this can be app1ied to heart sound signal for
reduced to 1800. (c) The original signal is decimated by a factor of 10. The
clinical purpose
size has been reduced to 180.

978-1-4799-8579-1116/$31 .00 ©20 16 IEEE

Authorized licensed use limited to: G Narayanamma Institute of Technology & Science. Downloaded on March 17,2023 at 16:36:07 UTC from IEEE Xplore. Restrictions apply.
3rd Int'l Conf. on Recent Advances in Information Technology 1RAIT -20161

REFERENCES stenosis using short-term Fourier and wavelet transform methods"


IEEE Trans. on Biomed. Eng., Vo1.41, No. 10, pp.921-928.
[7] T. Ning and K.S. Hsieh, (May 22-23, 1995) "Delineation of systolic
[I] Y. M. Akay and M. Akay, W. Welkowitz, J.L. Semrnlow, JB Kostis murmurs by autoregressive modeling," Proc. IEEE 21st Northeast
(June, 1993) "Noninvasive acoustical detection of coronary artery Bioeng. Conf. pp.19-21, Bar Harbor, Maine.
disease: a comparative study of signal processing methods, " IEEE [8] N. Atanasov and T. Ning (March 1O-1l, NY, 2007) "Quantitative
Trans. on Biomed. Eng., Vo1.40, No.6, pp.571-578 delineation of heart murmurs using features derived from
[2] A. R. Freeman and S. A. Levin, "The clinical significance of the autoregressive modeling" Proc. IEEE 33th Annual Northeast Bioeng.
systolic murrnur," Ann Intern Med., 1933:6, 1371-1385. Conf. pp.167 -168, Stony Brook
[3] D. Mason, Davis F A "Listening to the Heart: Heart Sounds and [9] M. Unser and A. Aldroubi (April 1996) "A review of wavelets in
Murrnurs" Aug., 2000. biomedical applications", Proc. IEEE, vol. 84, no. 4.
[4] J. P. Burg (1978) "A new analysis technique for time series data, in [10] M. Vetterli and J. Kovacevic Wavelets and Subband
Modem Spectrum Analysis" (D. G. Childers, ed.), IEEE Press, New Coding.Englewood Cliffs, NJ: Prentice Hall, 1995.
York. [ll] S. Qian and D. Chen,( 1996) "Joint Time-frequency Analysis:
[5] T. Ning and 1. D. Bronzino, (March,1990) "Autoregressive and Methods and Applications" NJ: Prentice Hall.
spectral analysis techniques: EEG applications" Special Issue on [12] D.Mandal, M. Chattopadhyay and I. SahaMishra, (2012) "A Low cost
Biomedical Signal Processing for IEEE Engineering in Medicine and Non-invasive Digital Signal Processor Based (TMS320C67J3) Heart
Biology Magazine,VoI.9, No.l, pp.47-50. Diagnosis System" I" Int Conf. on Recent advances in Information
[6] Y. M. Akay, et al (October, 1994) "Investigating the effects of Technology (RAIT) ..
vasodilator drugs on the turbulent sound caused by femoral artery

978-1-4799-8579-1/16/$31.00 ©20 16 IEEE

Authorized licensed use limited to: G Narayanamma Institute of Technology & Science. Downloaded on March 17,2023 at 16:36:07 UTC from IEEE Xplore. Restrictions apply.

You might also like