tion (Kohler et al., 2002). In particular, algorithms
must be computationally efficient for mobile applica-
tions, where power and computational resources are
limited. Algorithms are commonly trimmed in or-
der to achieve computational efficiency (Kohler et al.,
2002). However, this comes at the expense of accu-
racy and performance. Our aim was to design an ac-
curate HR estimation algorithm for PPG that requires
low processing power so as to be suitable for battery-
powered mobile applications.
2 ALGORITHM DEVELOPMENT
Since cardiac signals are quasi periodic, a time-
frequency transformation algorithm could be appro-
priate to extract HR. However, Fourier or wavelet
based transformations on time series require segmen-
tation of the signal, which is not always practical in an
on-line, low-cost system. Their relatively high pro-
cessing power and memory usage requirements add
to this unsuitability. Instead, we propose to operate in
the time domain, using a methodology inspired by the
phase vocoder originally developed for the compres-
sion of voice signals in telecommunications (Flana-
gan et al., 1965). In this method, a vocoder models
the input signal with one or multiple sinusoidal waves
that vary in time. The parameters that have to be es-
timated are the time varying amplitude and frequency
of each sine wave that comprises the original signal.
The phase vocoder can be seen as a filter bank con-
sisting of a series of band-pass filters with successive
center frequencies (Dolson, 1986).
In our case, we are solely interested in the dom-
inant frequency in the signal (the heart beat). It is,
therefore, sufficient to represent the input signal by
only one sinusoidal wave that varies over time. The
filter-bank with a distinguished set of frequencies is
replaced with a single band-pass filter whose center
frequency is adapted over time. This can be achieved
by scanning the incoming signal and computing the
difference in phase. The obtained frequency parame-
ter, where the system eventually locks-in, can be seen
as a filtered frequency of the incoming signal that
would correspond to an averaged HR. The method
can also find the location in time of each heart beat
by using the output sine wave as an envelope to locate
maximal peaks in the input waveform.
2.1 Algorithm Description
The raw PPG signal is high-pass filtered to remove
the baseline using a second-order Butterworth filter
with a cut-off frequency at 0.5 Hz (Figure 1-1). The
filtered signal is then routed into two parallel streams.
The signal is multiplied by a sine wave in one stream
and by a cosine wave in the other (Figure 1-2). Co-
sine and sine waves have the same unitary amplitude
and frequency w
v
. The frequency w
v
is set to the es-
timated vocoder frequency of the previous iteration
(Figure 1-8). The two parallel streams are, therefore,
identical with the exception of the π/2 shifted phase
of the multiplying waveform. This step creates a new
signal that is composed of two periodic signals with
shifted frequencies of ±w
v
as follows:
cos(w
v
∗t) ∗cos(w
s
∗t) =
cos((w
s
−w
v
) ∗t) + cos((w
s
+ w
v
) ∗t),
(1)
where w
s
is the frequency of the incoming wave at
timestep t. Next, each of the two streams is fed to
a moving average low-pass filter (Figure 1-3). The
application of this heterodyning step has two effects.
First, input frequencies in proximity of the vocoder
frequency w
v
are shifted down close to DC and are
allowed to pass the filter. All other frequency compo-
nents will also be shifted but they will not go through
the low-pass filter. Secondly, the heterodyning pro-
vides a way to compute the time-varying amplitude
and frequency of the resulting signal in the next step.
The two filtered waveforms are subsequently trans-
formed from Cartesian to Polar coordinates to obtain
a single amplitude r
v
and phase θ
v
(Figure 1-4). The
amplitude is calculated as the square root of the sum
of the squares of the two heterodyned signals as fol-
lows:
r
v
= 4 ∗
q
y
2
sin
∗y
2
cos
, (2)
where y
sin
and y
cos
are the heterodyned signals for the
sine and the cosine streams, respectively. Similarly,
θ
v
at each point in time t is the angle whose tangent
is the ratio of the vertical to the horizontal position as
follows:
θ
v
= arctan(
y
sin
y
cos
). (3)
The phase is subsequently unwrapped. The real time-
varying frequency of the original wave is then esti-
mated by computing the difference between the ac-
tual and previous phase (Figure 1-5), and subtracting
it from the current center frequency (Figure 1-6) as
follows:
ˆw
s
= w
v
= w
(t
−1
)
v
−∆θ, (4)
where ∆θ = θ
(t
−1
)
v
−θ
v
. The amplitude and the newly
computed center frequency are used to compute the
vocoder output y
out
(Figure 1-7) as follows:
y
out
= r
v
∗sin(2 ∗π ∗w
v
∗t). (5)
The output signal frequency w
v
is also used to esti-
mate the instantaneous HR. Algorithm 1 shows a pos-
sible implementation of the adaptive single-frequency
phase vocoder in pseudo C code.
AN ADAPTIVE SINGLE FREQUENCY PHASE VOCODER FOR LOW-POWER HEART RATE DETECTION -
Development of a Fast and Low-power Heart Rate Estimation Algorithm for Mobile Phone Applications
31