Embedded System for ECG Biometrics
Andr
´
e Matos
1
, Andr
´
e Lourenc¸o
1,2
and Jos
´
e Nascimento
1,2
1
Instituto Superior de Engenharia de Lisboa, Lisbon, Portugal
2
Instituto de Telecomunicac¸
˜
oes, Lisbon, Portugal
Keywords:
Electrocardiogram, ECG, Embedded System, ARM, Biometrics, STM32.
Abstract:
Biometric recognition has recently emerged has an alternative solution for applications where the privacy of
the information is crucial. In this paper we present an embedded biometric recognition system based on the
Electrocardiographic signals (ECG). The proposed system implements a real-time state-of-the-art recognition
algorithm, which extracts information from the frequency domain, on an architecture based ARM Cortex 4.
Using a sensor based on a two electrodes apparatus, the system is designed to be autonomous, non-intrusive
and easy to use on different scenarios. Preliminary results show the successful real-time implementation on
the embedded platform enabling its usage on a myriad of applications.
1 INTRODUCTION
Many of our daily tasks are becoming dependent of
automatic and accurate identity validation systems.
Traditional strategies for recognition include PIN
numbers, tokens, passwords and ID cards. Despite
the wide deployment of such mechanisms, the means
for authentication is either entity-based or knowledge-
based which raises serious security concerns with re-
gards to the risk of identity theft (Jain et al., 2005;
Jain et al., 2004; Ross et al., 2006).
The major benefit of security systems based on
biometrics is the full dependency on the individual.
There are no dependencies on objects or memories as
it occurs on the traditional strategies. This leads to a
higher use of biometric systems in order to increase
the difficulty in falsification of credentials. Currently
one of the major flaws of these systems is the ease of
falsification of credentials. For instance, a photo can
fake a face, the iris can be falsified by contact lenses
and even the fingerprint may be exchanged for a gel
finger (Jain et al., 2007).
Recently, physiological signals are being used for
this purpose, being the electrocardiogram (ECG), an
emergent and viable alternative (Agrafioti et al., 2011;
Biel et al., 2001; Silva et al., 2013; Ye et al., 2010;
Israel et al., 2005; Singh and Gupta, 2009; Odinaka
et al., 2010). The fact that there are subject de-
pendent features in the ECG, enhances its applica-
bility for user recognition. Furthermore, the ECG
has unique properties when looked at in traditional or
multi-biometrics approach; in particular, it is:
universally available in live subjects, which make
it a never ending source of information, allowing
redundancy on undesirable pieces of acquired sig-
nal;
measurable non-intrusively using suitable de-
vices;
acceptable due to the latest advances in the sens-
ing technologies;
not easily circumvented through latent patterns,
since is rare to see an equipment acquiring at low
sampling frequencies.
The main downside of an ECG recognition is the
intra-person variation caused by different heart-rates
(Ye et al., 2010; Israel et al., 2005; Singh and Gupta,
2009). The frequency domain approach (Odinaka
et al., 2010) aims at an reduction of this thread.
Tipically the ECG-based biometric systems pre-
sented in the literature, are non-integrated systems,
which process the information in two phases: 1) the
acquisition is performed using a dedicated appara-
tus capable of transmiting the signal into a process-
ing unit; 2) the signal processing and recognition al-
gorithm is perfomed on a computer (tipically in an
off-line process). In this paper we propose an inte-
grated solution for ubiquitous ECG biometric recog-
nition. It consists on an embedded system with an
integrated ECG sensor based on a two electrodes ap-
paratus that enables real-time, non-intrusive ECG ac-
quisition at user’s fingers/hands. The proposed sys-
27
Matos A., Lourenço A. and Nascimento J..
Embedded System for ECG Biometrics.
DOI: 10.5220/0004703300270033
In Proceedings of the International Congress on Cardiovascular Technologies (CARDIOTECHNIX-2013), pages 27-33
ISBN: 978-989-8565-78-5
Copyright
c
2013 SCITEPRESS (Science and Technology Publications, Lda.)
tems focus ubiquitous solution enabling autonomous
and embedded recognition based on ECG.
The proposed embedded system allows real time
processing, samples the ECG using the embed-
ded system internal Analog to Digital Converters
(ADC’s), and uses Odinaka’s recognition approach
(Odinaka et al., 2010) for biometric authentication.
The remain of the paper is organized as follows,
Section 2 introduces the architecture of the embedded
platform, focusing the capacities, advantages and dis-
advantages of the system compared to other possible
solutions. In section 3 the signal filtering, peak detec-
tion, feature selection and the classification steps are
described. Section 4 presents some results and section
5 concludes the paper with some remarks.
2 EMBEDDED PLATFORM
An embedded platform is a computer system with a
dedicated function within a larger mechanical or elec-
trical system, often with real-time computing con-
straints. By contrast, a general-purpose computer is
designed to be flexible and to meet a wide range of
end-user needs.
This embedded platforms vary in many ways, of-
ten depending on the usage, or project necessity.
These devices can generally divided in:
A microprocessor is a multi-purpose, pro-
grammable, clock driven register and an arith-
metic and logic unit (ALU) based electronic de-
vice. Many more microprocessors are part of
embedded systems, providing digital control over
myriad objects from appliances to automobiles
to cellular phones and industrial process control
(Godse, 2008);
A MicroController(sometimes abbreviated µC,
uC or MCU) is a small computer on a single inte-
grated circuit containing a processor core, mem-
ory, and programmable input/output peripherals.
Microcontrollers incorporates all the features that
are found in a microprocessor, however, it has
also added features to make a complete micro-
computer system on its own. Microcontrollers are
designed for embedded applications, in contrast to
the microprocessors used in personal computers
or other general purpose applications due to on-
chip (build-in) peripheral devices (Godse, 2008);
A Digital Signal Processor (DSP) is a specialized
microprocessor with an architecture optimized for
the operational needs of digital signal processing;
A field-programmable gate array (FPGA) is, in-
formally thought, a ”blank slate” on which any
digital circuit can be configured. Moreover, the
desired functionality can be configured in the
field. That is, after the device has been manufac-
tured, installed in a product, or, in some cases,
even after the product has been shipped to the
consumer. In short, and FPGA provides pro-
grammable ”hardware” to embedded system de-
velopers (Sass and Schmidt, 2010).
In this paper the real-time constrain must be ful-
filled. Samples cannot be lost and the authentication
procedure must be as close as real time as it can be.
Memory is also a need, in order to store the charac-
teristics of the subjects. The microprocessor was dis-
carded for his low versatility and costs to manufacture
the embedded system, such as the FPGA for their high
costs. The proposed system is a mix of a regular MCU
and a DSP processor. The development MCU board,
STM32F4-Discovery, was chosen due to its versatil-
ity, low power consumption, high speeds and DSP in-
tegration.
Figure 1: Hardware block diagram of the system.
An ARM-Based Cortex4 32 bit RISC
STM32F407VGT6, was chosen as the processor
in our system. It works at 168MHZ, with characters
of strong performance and low power consumption,
real-time and low-cost. The processor includes: 1M
FLASH, 192K+4K RAM, and a bluetooth module
will be used for communication with an auxiliary
external visualization Application Programming
Interface (API). The system have the A/D converter
with 12 bits resolution, and the fastest conversion
up to 0.41us, with 3.6 V full-scale of the system.
It also includes an Floating Point Unit (FPU) and
a DSP inside the processor, making floating point
mathematics faster than integers calculus.
Figure 1 shows the processor peripherals and
hardware used. The bluetooth module uses a stan-
dard serial communication (USART) to flow the data
from/to microprocessor. The acquiring module am-
plifies the ECG signal to the range used by the ADC
peripheral, and digitalizes it using 1000 Hz.
Bluetooth communication allows the system con-
CARDIOTECHNIX2013-InternationalCongressonCardiovascularTechnologies
28
figuration (selecting between train and test scenarios)
and shows the authentication result. Additionally it
can also be used as debug or simple signal display.
3 RECOGNITION ALGORITHM
The problem of human recognition based on a bio-
metric system, can be formulated in the pattern recog-
nition framework. Fig. 2 contextualize the steps in-
volved in such a system: 1) first the signal is ac-
quired by the sensors; 2) the signal is preprocessed
and described in a convenient representation; 3) fea-
tures are extracted; 3) from the extracted features the
most discriminative are selected; 4) a classification
block processes the features and delivers a decision
corresponding to the recognition of the subject (Wang
et al., 2008).
Figure 2: Classic structure of a reckoning system applied to
an identification issue.
The proposed approach follows a partial fiducial
approach (Agrafioti et al., 2011), using the wave on-
set, peak (the R complex) as characteristic point for
segmentation. The feature extraction is based on a
frequency approach, and follows Odinaka algorithm
(Odinaka et al., 2010). In Odinaka’s work (Odinaka
et al., 2010) each single heartbeat is segmented into
64ms windows with an overlap between of 54ms.
The analysis is performed in the frequency domain
computing the short time Fourier transform (STFT)
(Oppenheim and Schafer, 1975) for each window (an
Hamming is used for better estimation), in order to es-
timate a mean and a variance of each frequency bin.
The performance of this method, and its suitability
for a real time implementation on embedded system
implementation, were the main aspects considered on
choosing this method for this implementation.
3.1 Frequency Extraction Approach
and Implementation in embedded
System
In Fig. 3 we represent the block diagram of the imple-
mented approach. Our target is to design the system
for real time operation; since each sample comes pe-
riodically each 1 ms (sampling frequency 1KHz), the
system has this time frame for processing all the infor-
mation. This real time constrain lead to a segmenta-
tion of every heartbeat waveform in 140ms windows
without overlap, instead of Odinaka’s 64ms windows
(Odinaka et al., 2010). The processing routine starts
by the arrival of a new digitalized sample, which in-
duces an high-priority interrupt (INT) that adds it to a
First In First Out (FIFO) array. This array is used for
two different tasks: 1) single heart beat segmentation;
2) feature extraction.
For the segmentation the raw signal is filtered with
a band-pass filter (BPF) with pass-band [5, 15]Hz, and
then fed to the Slope Sum Function (SSF) (Zong
et al., 2003) algorithm, which enables the detection
of the R-complex. The delineation of a single-heart-
beat consists on a fixed window of 700 ms, beginning
200ms prior to the peak, and ending 500 ms after the
peak. The STFT of each segment is then computed
using each segmented piece of the single-heartbeat.
Figure 3: Software block diagram of the system.
The STFT uses a spectral zoom approach, i.e., it
makes a 1024 point STFT for each 50ms window and
subsequently cutting the results to the first 50 STFT
points. This creates a low pass digital filter with
approximately [0, 50]Hz pass-band, to remove noise
present at the acquisition conditions and since the
band of interested of biometric applications is mostly
focused on this frequency bandwidth. This STFT
computation is the step that is most time-consuming,
taking 1.2ms for each STFT alone, making a total of
8.4ms for all the STFT phase.
A study has been made to determine the frame
size and overlap time between frames, which results
in terms of Equal Error Rate (EER) and identifica-
tion performance are presented in figures 4, 5, 6, 7.
Frame size tests were performed without any over-
lap and overlap tests were performed with a frame
size of 140ms, being this the top performance value.
These tests were performed with 50 separated runs in
order to create a mean and a variance for each vari-
able (frame size and overlapped time). Regarding the
experiment, the best solution is an 140ms frame size
without overlap. Overlapping barely increase the per-
formance and substantially increases processing time.
The STFT is applied to each of the 140ms win-
EmbeddedSystemforECGBiometrics
29
Figure 4: Identification performance over frame size vari-
ance.
Figure 5: Equal Error Rate (EER) performance over frame
size variance.
dow, leading to the creation of 50 frequency bins, to-
talizing a vector with 250 features. The l-th feature
corresponds to the STFT obtained over each segment
window.
3.2 Feature Selection and Classification
Odinaka’s work (Odinaka et al., 2010) proposes an
effective away to select informative features using a
robust feature selection method. The two key ele-
ments considered in this feature selection method are
distinguish-ability and stability. The feature should
help distinguish the subject from a reasonably large
subset of other subjects, and it should be stable across
sessions. Let µ
il
and σ
il
be mean and standard devia-
tion of the l-th feature of the i-th subject.
The l-th feature of the i-th subject is selected if
the symmetric relative entropy, i.e., the symmetric
Kullback-Leibler divergence, between N (µ
il
, σ
2
il
) and
the nominal distribution N (µ
0l
, σ
2
0l
) is larger than a
threshold κ > 0, being (µ
0l
, σ
2
0l
) the maximum like-
lihood estimate from all database. The Kullback-
Leibler divergence is a non-symmetric measure of
Figure 6: Identification performance over overlap time be-
tween frames.
Figure 7: Equal Error Rate (EER) performance over overlap
time between frames.
the difference between two probability distributions
P and Q, defined by
D(p||q) =
Z
plog
p
q
. (1)
The symmetric relative entropy between the two
densities is defined as
d(p, q) = D(p||q) +D(q||p) (2)
For the Gaussian distributions used in this model,
the symmetric relative entropy between N (µ
il
, σ
2
il
)
and N (µ
0l
, σ
2
0l
) is
d(
ˆ
θ
i
(l),
ˆ
θ
0
(l)) =
σ
2
il
+ (µ
il
µ
0l
)
2
2σ
2
0l
+
σ
2
0l
+ (µ
il
µ
0l
)
2
2σ
2
il
1
(3)
where the nominal model is obtained by using the
spectrograms of all the subjects in the database and
ˆ
θ denotes the maximum likelihood estimate for the
individual in test,
ˆ
θ
i
(l), and the train database,
ˆ
θ
0
(l).
Using the symmetric relative entropy for feature se-
lection ensures that only those bins whose distribu-
tions are far from the nominal are selected for each
subject, thereby ensuring distinguish-ability.
CARDIOTECHNIX2013-InternationalCongressonCardiovascularTechnologies
30
The score of a test heartbeat using the i-th
subject’s model is given by the log-likelihood ratio
(LLR):
Λ =
"
p
i
(Y(l)|
ˆ
θ
i
(l))
p
0
(Y(l)|
ˆ
θ
0
(l))
#
I
d(θ
i
(l),θ
0
(l))>κ
(4)
where I is the truth function indicating which time-
frequency bins are selected; l is the index of the bins.
For authentication, the LLR given in expression 4 is
compared with a threshold τ, so that if Λ > τ, the
heartbeat with the claimed identity is accepted, oth-
erwise the heartbeat is rejected.
4 EXPERIMENTAL EVALUATION
The dataset used to evaluate the this approach was ac-
quired using the proposed system. It is composed by
11 subjects, with two recording sessions per subject.
The acquired signals were obtained following the re-
cent trend “the off-the-person approach”, where the
ECG data is acquired at the fingers with dry Ag/AgCl
electrodes. The ECG sensor consists of a custom, two
lead differential sensor design with virtual ground,
found in (Silva et al., 2011). Figure 8 presents the pro-
totype, composed by the STM32F4-Discovery board
and ECG sensor, used in the experiments.
Figure 8: Prototype of the embedded system.
The features used in this work consist in
frequency-domain representation. In figure 9 we il-
lustrate the potential of this representation, showing
for two different users, the time (on the left) and fre-
quency (on the right) domain representation. Observ-
ing both the figures, it is possible to distinguish visu-
ally the difference between both subjects. In the liter-
ature, frequency domain representation is considered
more robust to heart-rhythm variation then the time
domain counterpart (Odinaka et al., 2012).
The performance evaluation over the entire dataset
is summarized in figure 10, where we plot the false ac-
ceptance rate (FAR) and the false rejection rate (FRR)
curves in terms of the threshold of the system. We
superimpose the equal error rate (EER) point, cor-
responding to the point where the FAR is equal to
the FRR, and in this case corresponds to EER=9.3%.
With this approach we achieve a 100% identification
rate with 30 seconds of train signals.
Figure 10: FAR vs FRR curve.
5 CONCLUSIONS AND FUTURE
WORK
Biometric systems are moving towards multi modal
approaches, combining several modalities to over-
come some of the limitations exhibited by each sepa-
rately. Some behavioural biometrics modalities have
the potential to complement existing approaches due
to their intrinsic nature, and the ECG is one such case.
In this paper we present an embedded system
where we implemented a state-of-the-art method for
ECG-based recognition. The implement method is
based on a frequency-domain representation adapted
from Odinaka et. al. (Odinaka et al., 2010). Our sys-
tem also includes an ECG sensor that enables the ac-
quisition at the fingers with dry Ag/AgCl electrodes,
and implements all the steps of recognition workflow
focusing real-time processing.
As future work, we intend to test the proposed
method with a larger datasets and compare with other
state-of-the art methods.
EmbeddedSystemforECGBiometrics
31
(a) time (b) frequency
(c) time (d) frequency
Figure 9: Comparison of time and frequency domain representation for two different users (arranged by line).
ACKNOWLEDGEMENTS
This work was partially funded by FCT un-
der grants SFRH/PROTEC/49512/2009, PTDC/EEI-
SII/2312/2012 (LearningS project), and by the
ADEETC from Instituto Superior de Engenharia de
Lisboa, whose support the authors gratefully ac-
knowledge.
REFERENCES
Agrafioti, F., Gao, J., and Hatzinakos, D. (2011). Biomet-
rics, chapter Heart Biometrics: Theory, Methods and
Applications, Biometrics. InTech.
Biel, L., Pettersson, O., Philipson, L., and Wide, P. (2001).
ECG analysis: a new approach in human identifica-
tion. Instrumentation and Measurement, IEEE Trans-
actions on, 50(3):808–812.
Godse, D. (2008). Microprocessor, Microcontroller & Ap-
plications. Technical Publications.
Israel, S. A., Irvine, J. M., Cheng, A., Wiederhold, M. D.,
and Wiederhold, B. K. (2005). {ECG} to identify in-
dividuals. Pattern Recognition, 38(1):133 – 142.
Jain, A. K., Bolle, R. M., and Pankanti, S. (2005). Bio-
metrics: Personal Identification in Networked Society.
Springer.
Jain, A. K., Flynn, P., and Ross, A. A. (2007). Handbook of
Biometrics. Springer-Verlag New York, Inc., Secau-
cus, NJ, USA.
Jain, A. K., Ross, A., and Prabhakar, S. (2004). An intro-
duction to biometric recognition. IEEE Trans. Circuits
Syst. Video Techn., 14(1):4–20.
Odinaka, I., Lai, P.-H., Kaplan, A., O’Sullivan, J., Sirevaag,
E., Kristjansson, S., Sheffield, A., and Rohrbaugh,
J. (2010). Ecg biometrics: A robust short-time fre-
quency analysis. In Information Forensics and Secu-
rity (WIFS), 2010 IEEE International Workshop on,
pages 1 –6.
Odinaka, I., Lai, P.-H., Kaplan, A., O’Sullivan, J., Sirevaag,
E., and Rohrbaugh, J. (2012). Ecg biometric recogni-
tion: A comparative analysis. Information Forensics
and Security, IEEE Transactions on, 7(6):1812 –1824.
Oppenheim, A. V. and Schafer, R. W. (1975). Digital Signal
Processing. PrenticeHall.
Ross, A. A., Nandakumar, K., and Jain, A. K. (2006). Hand-
book of Multibiometrics (International Series on Bio-
CARDIOTECHNIX2013-InternationalCongressonCardiovascularTechnologies
32
metrics). Springer-Verlag New York, Inc., Secaucus,
NJ, USA.
Sass, R. and Schmidt, A. G. (2010). Embedded Systems
Design with Platform FPGAs: Principles and Prac-
tices. Morgan Kaufmann Publishers Inc., San Fran-
cisco, CA, USA, 1st edition.
Silva, H., Lourenc¸o, A., Canento, F., Fred, A., and Ra-
poso, N. (2013). ECG biometrics: Principles and ap-
plications. In Proceeding of the 6th Conference on
Bio-Inspired Systems and Signal Processing (BIOSIG-
NALS).
Silva, H., Lourenc¸o, A., Lourenc¸o, R. L., Leite, P. L.,
Coutinho, D., and Fred, A. L. N. (2011). Study and
evaluation of a single differential sensor design based
on electro-textile electrodes for ECG biometrics ap-
plications. In IEEE Sensors, pages 1764–1767.
Singh, Y. and Gupta, P. (2009). Biometrics method for
human identification using electrocardiogram. In
Tistarelli, M. and Nixon, M., editors, Advances in Bio-
metrics, volume 5558 of Lecture Notes in Computer
Science, pages 1270–1279. Springer Berlin Heidel-
berg.
Wang, Y., Agrafioti, F., Hatzinakos, D., and Plataniotis,
K. N. (2008). Analysis of human electrocardiogram
for biometric recognition. EURASIP J. Adv. Signal
Process, 2008.
Ye, C., Coimbra, M., and Kumar, B. (2010). Investigation
of human identification using two-lead electrocardio-
gram (ecg) signals. In Biometrics: Theory Applica-
tions and Systems (BTAS), 2010 Fourth IEEE Interna-
tional Conference on, pages 1–8.
Zong, W., Heldt, T., Moody, G., and Mark, R. (2003). An
open-source algorithm to detect onset of arterial blood
pressure pulses. In Computers in Cardiology, 2003,
pages 259–262.
EmbeddedSystemforECGBiometrics
33