You are on page 1of 4

A Novel Heart Rate Detection Algorithm in Ballistocardiogram Based on Wavelet

Transform

Jingjing Jin, Xu Wang and Shilong Li
School of Information Science & Engineering
Northeastern University
Shenyang, China
e-mail: dovejin@126.com
Yingnan Wu
School of Mechanic & Electronic
Eastern Liaoning University
Dandong, China
e-mail: wyingnan@163.com


AbstractThe heart's mechanical activity while pumping out
blood causes the vibration of physical and the object connecting
with physical. The vibration is rhythmically with the heart rate and
record as ballistocardiogram (BCG) on the spinal axis of the body.
It is able to know humans heart rate by measuring the vibration.
BCG is weak non-stationary random signal and contains a lot of
noise caused by the impact of human and equipment. So heart rate
detection from the original acquisition BCG is difficult. Through
discrete sequence wavelet transform, BCG is preprocessed by
translation invariant method based on adaptive threshold wavelet
shrinkage. Choosing proper wavelet base and adaptive threshold
function, estimating the noise variance are done at the same time.
The characteristics of BCG are retained while eliminating noise.
Based on de-noised BCG, the heart rate of subject is detected by
using pseudo-period detection method. A single channel ECG is
recorded synchronously to test the veracity. The result shows that
it is the same as heart rate gained from ECG.
Keywords-heart rate; ballistocardiogram; wavelet transform;
pseudo-period detection
I. INTRODUCTION
Ballistocardiogram (BCG) is a physical vibration signal
relative to mechanical activity of the heart. When the heart
pumping out blood a certain force exerts to amount of blood,
according to Newton's third law, the blood exerts reaction to
body and caused physical synchronous vibration with the
heart. The vibration corresponds to the heart rate and should
be an effective tool to inspect and evaluate the cardiac
function. BCG can be measured on the spinal axis of the
body by some sensitive force sensor [1]. Such measurement
is low-cost and no electrode contacting with body, the heart
rate of subject can be gained by measuring the vibration of
objects holding up subject without felling. It provides
condition to home screening procedure.
The original acquisition BCG contains a lot of noise
components caused by the impact of equipment and the
human unconscious activities, such as deep breathing,
unintentional activities. BCG is weak, low signal-to-noise
ratio, non-stationary random signal and contains more
singular characteristics. In order to remove noise, while
retaining the BCG characteristics and gain heart rate
accurately, in this paper, through discrete sequence wavelet
transform, translation invariant method based on adaptive
threshold wavelet shrinkage is used to preprocess original
acquisition BCG. Proper wavelet base and adaptive threshold
function choice together with noise variance estimation are
also discussed. The heart rate of subjects is extracted from
de-noised BCG by using a new pseudo-period detection
method.
II. DISCRETE SEQUENCE WAVELET TRANSFORM AND FAST
ALGORITHM
f(t) is discretely sampled to N points discrete signal f(n),
n=0,1, ,N-1.The discrete sequence wavelet transform
(DSWT) is:
( ) ( ) ( ) k n n f k j W
j
N
n
f
=

2 2 ,
1
0
2
1

(1)
In application, equation (1) is too complex to calculate
and wavelet function (x) is usually no explicit expression,
so recursive methods of wavelet transform is gained from
two-scale equation:
( ) ( ) ( )

= +
m
f f
k j S k m h k j S , 2 , 1
(2)
( ) ( ) ( )

= +
m
f f
k j S k m g k j W , 2 , 1
(3)
In equation (2) and (3), m=0,1,,N-1.
Corresponding reconstruction equation is
( ) ( ) ( )

=
k
f f
k m h k j S m j S 2 , , 1

( ) ( )

+
k
f
k m g k j W 2 ,
(4)
In equation (4), W
f
(j,k) is wavelet coefficient, simply
marked to
j,k
. S
f
(j,k) is scale coefficient, and S
f
(0,k) is
original signal f(k). h and g are low pass filter and high pass
filter corresponding scale function (x) and wavelet function
(x) separately. j is decomposing layer. This algorithm was
first brought forward by Mallat, so called Mallat algorithm
[2].
III. WAVELET TRANSLATION INVARIANT DENOISING BASED
ON ADAPTIVE THRESHOLD
Signals wavelet coefficient increases but the noises
decreases with the scale increases. According to the
characteristics of signal and noise coefficients in every scale,
Second International Workshop on Knowledge Discovery and Data Mining
978-0-7695-3543-2/09 $25.00 2009 IEEE
DOI 10.1109/WKDD.2009.98
76
signal and noise could be separated. Donoho and Coifman
put forward wavelet shrinkage method based on this rule [3].
Choosing proper wavelet base, doing j layers wavelet
transform, using per-determined threshold to process wavelet
coefficient, reconstructing signal based on processed wavelet
coefficient, then de-noised signal is gained. But at
discontinuous points of original signal the de-noised signal
has Pseudo-Gibbs phenomenon by using this method.
Translation invariant is the improvement of wavelet
shrinkage method. Because of restraining the Pseudo-Gibbs
phenomenon, it is thoroughly studied and widely used [4].
A. Wavelet base choices
In the commonly used wavelet, considering of the
orthogonality, vanishing moment and regularity of the
wavelet function, Biorthogonal wavelet and Symlet wavelet
are suitable to process BCG. However, the symmetry of
Biorthogonal wavelet is poor. Symlet wavelet improved in
symmetry, but it also lead to phase distortion of
decomposition and reconstruction. From the view of scale
function, the scale coefficient reflects the profile information
of signal. If the shape of scaling functions is closer to the
shape of signal, it will more benefit to retain the original
signal characteristics in different scales. So the Sym8
wavelet whose wavelet function is symmetry and scale
function is close to the shape of BCG is chosen to de-noise
the original acquisition BCG.
B. Threshold selection and noise variance estimation
Threshold plays a decisive role in the de-noising
process. If is too small, the processed wavelet coefficient
will contain excessive noise component, and cant achieve
the purpose of de-noising. By contrary, a part of signal
components will be removed, resulting in the distortion of
reconstructing signal. At present, the threshold selecting
methods are fixed threshold, Rigrsure threshold, heuristic
threshold and minimax threshold. Donoho presented a
typical wavelet threshold selection method [5].
Set the original BCG is x(n), n=1,2,,N. is:
N ln 2 = (5)
is noise standard variance.
Because noise wavelet coefficient decreases with the
increase of the scale, it is unreasonable to handle all scales
wavelet coefficients by a threshold with uniform noise
variance, as equation (5) shows. Therefore, it is necessary to
estimate variances of different scales. Wavelet transform of
signal has a higher center frequency in small scales.
Especially in the two smaller scales, the signal wavelet
coefficients drowned in noise wavelet coefficients. So the
original BCG noise variance can be estimated from the two
smaller scales [6].
Supposed is the standard variance of noise e and
j
is
the noise standard variance of scale j. According to DSWT
filter algorithm:
1 2 1 0
* * * *

=
j j j
g h h h
(6)
in equation (6) is the energy of limited energy
sequence. The noise standard variance at scale j is:
( )
0
1 2 1 0 1
* * * *
g
g h h h k N P
j j
j


=

(7)
In equation (7) ( )

=
n
k
P
2
, 1 1
is wavelet coefficients
energy. The elimination number of large value points caused
by acute change of signal is k.
C. Adaptive threshold function
Against the shortage of wavelet shrinkage method based
on hard and soft threshold, [7] puts a new adaptive threshold
function:
( )

=
0
exp
sgn
~
,
, ,
,
p
j k j
j
k j k j
k j
N



j k j
j k j


<

,
,

In equation (8), N
p
called adjustment factor is an arbitrary
positive constant. New threshold function has the same
continuity as the soft threshold function. The asymptote
is
k j k j , ,
~
= .
k j ,
~
approaches to
k j ,
along with the increase
of
k j ,
gradually. When
j k j

,
the deviation
between
k j,
~
and
k j,
isnt a constant, it overcomes the
shortage of soft threshold approach. Equation (8) is equal to
hard threshold approach when 0
p
N , and equal to soft
threshold approach when

p
N
The appropriate value of
N
p
can be determined by repeating experiment to make the
de-noised reconstruction signal smoothness and preserve
singular points characteristics at the same time.
D. Algorithm realization
The noisy signal is cycling translated by n times. The
translated signal is averaged to avoid the Pseudo-Gibbs
phenomenon at the discontinuities points caused by
traditional wavelet shrinkage. It is called "translationde-
noising-average", the translation invariant (TI) wavelet de-
noising.
Original BCG is x(n), n=1,2, ,N, translation cycle
operator is S
h
, translation range is { } n h h H
n
< = 0 , and Ave
denote average. So TI wavelet de-noising by cycling
translated n times is:
( ) ( ) ( ) ( ) x S T S Ave S x T
h h H h
H h h
n n

= , (9)
Translation invariant (TI) wavelet BCG de-noising
procedure based on adaptive threshold wavelet shrinkage
may therefore be achieved as follows:
(1) Set a translation range { } n h h H
n
< = 0 for original
BCG x(n), n=1,2,,N and cycling translate x(n) according to
H
n
.
(8)
77
(2) Do DSWT to the signal before and after translation.
In order to ensure the number of decomposition coefficient
unchanged, the type of wavelet transform is set to
periodization.
(3) Save all the wavelet coefficients to a coefficients
table. The low frequency coefficients of each resolution are
saved in the first column of table. They arent be updated
until the low frequency coefficients of last decomposition are
saved.
(4) Estimate the noise variance according to the wavelet
coefficients of the highest resolution. Process every wavelet
coefficients at all levels by using new adaptive threshold
function based on typical wavelet threshold.
(5) Do IDSWT according to each resolutions wavelet
coefficients of the coefficients table. The type is also
periodization.
(6) The reconstruction signal is reversely cycling
translated and averaged. Low frequency coefficients of each
resolution are saved at the first column, until the final
reconstruction signal is gained. The result is the de-noised
BCG, y(n), n=1,2,,N.
IV. HEART RATE DETECTION ALGORITHM
As Figure 2 shows, BCG changes periodically with
cardiac cycle. But its different from ECG that the period of
BCG is not strict, so called pseudo-period. If the pseudo-
period of BCG is identified, it is able to detect the heart rate.
Reference [8] presents a method to calculate pseudo-period
and extract heart rate by calculate the largest swing. This
method requires calculating the local minimum and local
maximum value of signal and preserving them and their
coordinates. In this paper, the method is improved to only
calculate and preserve the value and coordinates of local
maxima to detect heart rate. The improved heart rate
detection algorithm will be realized as follows:
(1) Search de-noised BCG sequence y(n), n=1,2,,N,
from left to right, the local maxima are saved as a sequence
l
max
(n), n=1,2,,N
1
.
(2) Arrange l
max
(n) by sort ascending and become the
threshold sequence threshold(i), i=1,2,,N
1
.
(3) Search l
max
(n) from left to right, if l
max
(n)>
threshold(i), save the value and coordinates of point n.
(4) In step (3), the interval between approaching two
local maxima is recorded as pseudo-period. If the first local
maximums position is bigger than the biggest value of
pseudo-periods, it is also recorded as one pseudo-period.
(5) Calculate the quotient of pseudo-periods standard
deviation and average, and save as q(i), i=1,2,,N
1
.
(6) Return (3) until calculate all threshold. Choose
threshold T which makes q least.
(7) Research y(n) again. If y(n)>T, mark it with circle and
calculate heart rate.
V. EXPERIMENT RESULT
The de-noising effect is shown in Figure 1.The upper is
original BCG and its power spectral density (PSD). The
lower is de-noised BCG and its PSD. In time domain, the de-
noised BCG is smoother than the original BCG. In frequency
domain the PSD of the de-noised BCG is smoother than the
original BCG at high frequency. Through discrete sequence
wavelet transform, adaptive threshold wavelet shrinkage
translation invariant method based on typical wavelet
threshold gains well effect in preprocessing original
acquisition BCG.
Figure 2 shows the detected heart rate on de-noised BCG
by using improved heart rate detection algorithm. The
subject is a healthy young man. A signal channel ECG is
recorded synchronously.
The circle presents the biggest BCG amplitude of one
cardiac cycle, called J wave, along with systolic wave [9].
Red line presents the threshold which is chosen
automatically by heart rate algorithm. Every interval between
two circles determines one cardiac cycle. The sample
frequency of BCG and ECG are both 500Hz, so the heart
rate of the subject calculated from BCG is 61 times per
minute. The result is the same to gain from ECG.
0 1000 2000 3000
-0.2
0
0.2
0.4
0.6
Time(samples)
N
o
r
m
a
l
i
z
d

A
m
p
l
i
t
u
d
e
Original BCG
0 200 400 600
-80
-60
-40
-20
0
PSD of Original BCG
Frequency(Hz)
P
S
D
(
d
B
/
h
z
)
0 1000 2000 3000
-0.2
0
0.2
0.4
0.6
Time(samples)
N
o
r
m
a
l
i
z
d

A
m
p
l
i
t
u
d
e
Denoised BCG
0 200 400 600
-80
-60
-40
-20
0
PSD of Denoised BCG
Frequency(Hz)
P
S
D
(
d
B
/
h
z
)

Figure 1. Original and de-noised BCG with their PSD
0 500 1000 1500 2000 2500
-0.05
0
0.05
0.1
0.15
Time(samples)
N
o
r
m
a
l
i
z
d

A
m
p
l
i
t
u
d
e
0 500 1000 1500 2000 2500
-0.2
0
0.2
0.4
0.6
Time(samples)
N
o
r
m
a
l
i
z
d

A
m
p
l
i
t
u
d
e

Figure 2. Heart rate detection on de-noised BCG compared with a signal
channel ECG
78
VI. CONCLUSION
Through discrete sequence wavelet transform, this paper
applies adaptive threshold wavelet shrinkage translation
invariant method based on typical wavelet threshold in
preprocessing original acquisition BCG, and this method
gains well effect. The improved new pseudo-period is used
to detecting the subjects heart rate, and gained the same
result compared with a signal channel synchronous ECG.
ACKNOWLEDGMENT
This work has been supported by the National Natural
Science Foundation of China under project No. 50477015.
REFERENCES
[1] P. Pollock, Ballistocardiography: a clinical review, M. A. J,
Ottawa Canada, vol. 76, pp. 778-783, May 1, 1957.
[2] S. Mallat, A theory for multiresolution signal decomposition:
the wavelet representation, IEEE Trans Patt Recog And
Mach. Intell, , vol. 11, 1989, pp. 674-693.
[3] D.L. Donoho and I.M. Johnston, Adapting to unknown
smoothness via wavelet shrinkage, J Am Stat Assoc, vol. 90,
1995, pp. 1200-1224.
[4] T.D. Bui and G.Y. Chen, Translation-invariant denoising
using multiwavelets, IEEE Transactions on Signal
Processing, vol. 46, 1998, pp. 3414-3420.
[5] D.L. Donoho and I.M. Johnston, Ideal denosing in an
orthogonal basis chosen from a library of bases, C R Acad
Sci I-Math, vol. 319, 1994, pp. 1317-1322.
[6] X.F. Yang, X. Zhang and J.P. Wang, Doppler Fetal Heart
Rate Detection Based on Wavelet Transform, Journal of
Xian Jiao Tong University, vol. 41,2007, pp.917-921.
[7] W.Q. Zhang and G.X.Song, Signal de-noising in wavelet
domain based on a new kind of threshold function, Journal
of Xidian University, vol.31, 2004, pp. 297-303.
[8] P. Smrcka, M. Jirina and Z. Trefny, New Method for Precise
Detection of Systolic Complexes in the Signal Acquired from
Quantitative Seismocardiograph, Proc. IEEE Intenational
Workshop on Intelliqent Signal Processing (WISP
2005),IEEE Press, Sept 2005, pp. 375-380, doi:
10.1109/WISP.2005.1531688.
[9] A. Akhbardeh, M. Koivuluoma and T. Koivistoinen, BCG
Data Discrimination using Daubechies compactly supported
Wavelet Transform and Neural Networks towards Heart
Disease Diagnosing, Proc. IEEE Intenational Symposium on
Mediterrean Conference on Contral and Automation,IEEE
Press, June 2005, pp. 1452-1457, doi: 10.1109/.2005.1467228.


79

You might also like