Use of the Heart Rate Variability as a Diagnostic Tool
Raquel Gutiérrez Rivas
1
, Juan Jesús García Domínguez
1
and William P. Marnane
2
1
Electronics Department, University of Alcalá, Alcalá de Henares (Madrid), Spain
2
Department of Electrical and Electronic Engineering, University College Cork, Cork, Ireland
1 RESEARCH PROBLEM
The electrocardiographic signal represents the
electrical activity of the heart. It has several nodes
able to generate synchronized electrical impulses to
sequentially activate its valves. All this impulses
overlapped form the well-known QRS complex
(Figure 1). Usually, the position of the R peak is
taken as the instant in which the heartbeat has place.
Thus, to determine the heart rate it is necessary to
find all the R peaks present during the measurement
of the ECG signal.
Heart Rate (HR) is controlled by the
Autonomous Nervous System (ANS), which is
composed by the Sympathetic Nervous System
(SNS) and the Parasympathetic Nervous System
(PNS). Both of them, SNS and PNS, respond to the
necessities of the rest of physiologic systems
(thermoregulatory, vasomotor, respiratory, central
nervous, etc. systems) which make possible to
correlate variations in the HR with the performance
of all those systems. In short, due to the easiness
with which is possible to obtain the ECG signal, and
taking into consideration that is taken through a non-
invasive measurement, several parameters of it have
been studied for helping to the diagnosis of several
diseases and as a tool to study the patients’ fitness.
However, to study carefully the performance of
those physiological systems, in most of the cases it
is not only enough to know just the HR, but also the
Heart Rate Variability (HRV), which is the focus of
the study carried out through this thesis.
HRV signal represents the variation of the heart
rate beat-to-beat, i.e. represents all the durations of
the intervals between adjacent R peaks, or RR
intervals. Thus, it is extremely important to correctly
detect all the R peaks. Most of the times, this is not a
trivial task as some noises and artefacts that affect
the ECG signal difficult that detections. The most
important of those noises and artefacts are the
electromyographic noise, produced by the activation
of the thorax muscles, and the artefacts produced by
the movement of the electrodes. There are more
noises (respiration noise, 50/60 Hz noise, etc.) as is
stated by Friesen et al in (G. M. Friesen et al., 1990),
but the peaks produced but electromyogram and
those produced by the movement (motion artefacts)
are very similar to the R peaks, so their presence can
provoke false detections. In general, to avoid those
false detections, time constrains are used, setting an
interval in which after an R peak detection, a new
heartbeat cannot be produced (in this work, a
minimum RR interval has been set to 300 ms. which
corresponds to 300 bpm).
Figure 1: QRS complex peaks and segments and their
correspondences with heart valves and muscles.
A great number of R peak detection algorithms
have been proposed during the lasts 30 years.
However, with the increasing computational
capabilities of the computers, those algorithms tent
to be more and more complex by using filters and
tools with a large number of computations in order
to avoid all the sources of noise and artefacts.
Nevertheless, in the real-time monitoring area, in
which portable devices are used, complex algorithms
can not be used due to the fact that those portable
devices must have a long life battery, and they have
a limited number of resources. Also, R peak
detections algorithms only show the position of the
R peaks, but HRV signal must be analysed on one
manner or another to study different kinds of factors,
so the R peaks detection algorithm are the basis of
other algorithms, and they must be implemented
together with the main algorithm. That is why, in
real-time monitoring applications, R peaks
detections must be as simple as possible. For those
reasons, a new R peaks detection algorithm is
proposed in this thesis. This algorithm is able to
work in real-time on reduced resources platforms
obtaining a good performance in terms of sensitivity
25
Gutiérrez Rivas R., García Domínguez J. and P. Marnane W..
Use of the Heart Rate Variability as a Diagnostic Tool.
Copyright
c
2015 SCITEPRESS (Science and Technology Publications, Lda.)
and positive predictivity.
Once we have the R detections problem solved,
we can access to the HRV signal features which can
be related to several physiological systems
performance. For instance, as will be commented
later on, the study of the respiration rate through the
HRV signal has led to the study of the sleeping
phases or to the development of several apnoea
detectors; relationship between HRV signal and the
Central Nervous System has been used to study the
mental state in order to detect stressing situations or,
even, to classify the mood of the subjects (anger,
confusion, happiness, anxiety, etc.); in the neonatal
context, this signal has been used to detect seizures,
or pain episodes of new-born infants, or even, to
perform an assessment of the foetal health state; etc.
In this thesis we study the relationship between
changes on the HRV signal and the presence of
allergic reactions to drugs or food. Today, there is a
process called provocation test to detect this kind of
allergies. The steps followed during this test are:
1. When the patient arrives to the hospital, his basal
state is established by measuring blood pressure,
heart rate, SpO2 and the volume of the expired air
(peak flow).
2. The suspected allergen is divided into several
doses of different sizes (the number of doses and
their sizes depend on the allergen). The smallest
dose is then administered to the subject.
3. After an observation period of 30 or 60 minutes
(again, depending on the allergen) if the patient does
not present any symptom, the next smallest dose is
administered to him.
The process continue until all the doses are given
to the subject. When the allergen is finished, there is
an observation period of 120 minutes. If nothing
happens to the subject, neither in the next 24 hours,
it is classified as non-allergic. In the case in which
any symptom appears during the tests, the symptoms
are treated, and the patient is classified as allergic.
Figure 2 summarizes a generic provocation test.
As can be deduced, this process is not risk free:
even with the constant observation of the medical
staff, the allergic reaction can be of different levels
of dangerousness: from the appearance of hives, or
conjunctivitis, to breathing difficulties or, even,
anaphylaxis. It is neither possible to know which
patient may suffer a more or less dangerous reaction,
nor the kind of the reaction. So it is really a complex
and dangerous process. Through a previous study
carried out by the research group, we have
concluded that there is a relationship between
changes on several patients’ HRV signal and a
posterior occurrence of allergic reactions. Thus, the
objective is to employ the measurement and analysis
of the HRV signal to detect allergic reactions. In this
way, it is possible, first of all, the automation of the
process, so the medical staff could receive an alert as
soon as the allergic reaction is detected by analysing
the HRB; and, secondly, the number of doses needed
during the test could be reduced. Due to the fact that
the lasts doses are the biggest and more dangerous,
we could reduce the risk to which patients are
exposed during the provocation tests. The rest of this
paper is organized as follows: Section 2 lists the
main objectives of the presented thesis; Section 3
introduces the state of art regarding QRS complex
detection algorithms and application fields of HRV
as a diagnostic tool; Section 4 introduces the
proposed algorithms; Section 5 explains the
expected outcome and finally, Section 6 states the
stay of the research.
2 OUTLINE OF OBJECTIVES
The main objective of this thesis is the study of the
HRV signal to demonstrate its worth as an
Start
Treatment ofsymptoms
Allergic
Dose remaining?
Administer dose
NO
Observefor 30or 60min.
Observefor 90120min.atthe hospital
Reaction?
NO
Reaction?
NO
YES
Initial Checkup
Nonallergic
Observefor 24h.athome
Reaction?
NO
YES
YES
YES
Figure 2: Provocation tests flowchart.
BIOSTEC2015-DoctoralConsortium
26
alternative or a helping tool to diagnose and control
health problems of different natures. To reach this
objective, it is necessary:
1. To design an R peak detection algorithm
capable to work in real-time and to be implemented
on low-cost devices.
2. To study the HRV of patients (allergic and
non-allergic) during provocation tests.
3. To design an algorithm that, based on the
HRV signal, detects the presence of allergic
reactions before the appearance of physical
symptoms.
Besides, it is planned to propose another interesting
use of the HRV monitoring as a diagnostic tool for
its use with diabetics
3 STATE OF THE ART
3.1 QRS Complex Detection
R peak detection algorithms can be divided into two
stages (Figure 3). The first phase (pre-processing)
processes the ECG signal in order to reduce or
remove the most part of the artefacts and noises
commented above. At the second stage, the ECG
signal is analysed to find the R peaks.
Pre-processing stage:
noise/artefact reduction
R peaks/ QRS complex
detection
RRR
R
R
R
Figure 3: Typical structure of a QRS complex detection
algorithm.
3.1.1 Pre-processing Stage
Some of the most common techniques used to pre-
process an ECG signal are the following ones:
- Wavelet transform (M. W. Phyu et al., 2009; a.
Ghaffari et al., 2008): Through this technique,
ECG signal can be divided into a set of basic
functions and the ones that do not provide valid
information are removed.
- Hilbert transform (C. Xiaomeng, 2011; R.
Rodriguez et al., 2013): An interesting property
of this technique is that it produces a zero
crossing every time there is an inflexion on the
raw signal (as in the R peaks case). However the
features of some artefacts are very similar to the
R peaks detected in this way, so they can be
misinterpreted.
- EMD (S. Pal and M. Mitra, 2012; S. Pal and M.
Mitra, 2010): As wavelet, this is a decomposition
technique in which ECG signal is divided into
oscillatory functions (Intrinsic Mode Functions,
IMF). Some authors combine EMD with
Wavelet (M. K. Das et al., 2011; B. Khiari et al.,
2013) as well as with Hilbert (S. Kouchaki et al.,
2012; M. Zhang and C. Zhang, 2010) to improve
the performance of the pre-processing stage.
- Differentiation based computations (J. Moraes et
al., 2002; M. Adnane et al., 2009): These
techniques are based on the well-known Pan and
Tompkins (J. Pan and W. J. Tompkins, 1985)
algorithm. Although these are the most efficient
techniques from a power consumption and
computational complexity point of view, they
require a more complex detection stage.
Most of this techniques are sometimes combined
with different kinds of high and low pass filters, not
without a level of complexity.
3.1.2 Detection Stage
Regarding the detection stage, most of the
algorithms use one or more fixed thresholds to
detect the R peaks. This is a good technique only if
the processed ECG signal is very clear, without
noise or. However, this is not the most common
situation so, usually, this threshold or thresholds
have to be adaptive i.e. their amplitude should
change depending on the features of the ECG signal.
Furthermore, time intervals are usually employed for
which it has to be considered the maximum and
minimum possible heart rates (usually 220 – 40
bpm), and the minimum and maximum RR intervals.
Another technique used to detect the R peaks, is the
analysis of the QRS complex morphology (slopes
analysis, position of the peaks and intervals, etc.);
nevertheless the morphology of a QRS complex
depends on the position of the electrodes and,
mainly, on each person. Actually, the morphology of
a person’s QRS complex can change during a
measurement, what invalidates this technique.
As is commented below, in most of the proposed
R peak detection algorithms, the main concern of the
authors is the completely removal of all the noises,
without taking into account the computational
complexity. That fact, make most of them unable to
be implemented on battery-driven devices. In the
area in which this research is carried out it is
extremely important to reach a trade-off between
performance and computational efficiency.
3.2 HRV Study Applications
The use of the HRV signal to study some diseases or
UseoftheHeartRateVariabilityasaDiagnosticTool
27
the analysis of the health state of a person is being
used more and more lately. The main reason is the
previously mentioned relationship between this
signal and almost all the physiologic systems,
through the ANS. The next selection of works
represents the use of the HRV signal in different
areas:
- The most direct use of the HRV signal is to
optimize high performance trainings or to
analyse the state of subjects during stress tests
(R. Bailón et al., 2013: R. Bailón et al., 2011).
Through the HRV it is possible to obtain
information related to the effort made, energy
expenditure, the oxygen, fat and carbohydrates
consumption, or the recover ability of each
individual. So, a physical trainer is able to adjust
each training session in a personalized way,
obtaining the best results from each participant.
- Another important application can be found on
the study of people’s mood trough HRV signal
(M. Kumar et al., 2007; P.-Y. Hsieh and C.-L.
Chin, 2011). Due to the relationship between the
HRV and the CNS, it is possible to infer if a
person is stressed, relaxed, happy, depressed, etc.
This can be used to improve the quality of life of
all the workers in an office and, thus, their
throughput.
- A novel and very interesting application of the
HRV signal is the detection of pain episodes (J.
De Jonckheere et al., 2011; A. Fanelli et al.,
2013) and seizures (M. B. Malarvili and M.
Mesbah, 2009) of neonatal and, even, foetal
patients. In this way, just measuring and
analysing their ECG signal, it is possible to
reduce their mortality.
- Due to the relation between the HRV signal and
the respiration rate, it is possible to automatically
detect apnea episodes (J. Hayano, et al., 2011; E.
Gil et al., 2009) or analyse the quality of the
sleeping phase (S. Eyal et al., 2012).
4 METHODOLOGY
As is commented above, the main objective is to
analyse the HRV signal in order to relate its changes
with an abnormality, as can be the presence of an
allergic reaction. Another constrain is the realisation
of this analysis in real-time. For that reasons, one of
the basis of this thesis is the design of a real-time R
peaks detection algorithm capable to work on
portable devices. Once we are able to obtain the
positions of all the heartbeats, the next steps will
consists in the study of the relationship between the
changes on the HRV signal and the situations at
which the subjects are exposed.
4.1 QRS Complex Detection Algorithm
Each of the stages of the designed algorithm have
been optimized to reach the “low-cost”
requirements. Figure 4 shows the block diagram of
the proposed R peak detection algorithm.
Preprocessing stage
Threshold stage
Figure 4: R peaks detection algorithm’s blocks diagram.
This algorithm is based on the Pan & Tompkins
algorithm, mainly the pre-processing stage. The first
stage processes the ECG signal as follow: First, raw
ECG signal is derived by using (1). This operation
reduces the low frequency noises (as the one
produced by the respiration). Then an integration
window (2) is used to reduce the high frequency
artefacts; and, finally, all the samples are squared (3)
in order to empathize the R peaks, while reducing
the noise peaks. Results of the pre-processing stage
are shown in Figure 5.
0
[] [] [ ]
d
y n xn xn N
(1)
with
3
128
S
d
F
N round
1
10
0
[] [ ]
N
k
yn yn k
(2)
with

3
128
1
S
F
N round

2
1
[] []yn y n
(3)
Once the noises and artefacts have been reduced,
next steps consist in detecting the positions of the R
peaks. The output of the last stage is a positive
signal that has two high-amplitude peaks
corresponding to each QRS complex. At the
detection stage, the objective is to detect one of
these peaks. However, some noise peaks could
appear due to electromyographic noises that produce
the same high amplitude peaks. To avoid the
generation of false positives (i.e. noise peaks
classified as R peaks), we use a dynamic threshold
controlled by the state machine of Figure 6. The
value of the threshold changes with each new
sample as follows:
State 1: During interval RR
min
+ QRS
int
(minimum
BIOSTEC2015-DoctoralConsortium
28
possible RR interval + standard QRS duration), a
maximum is searched. When this interval finishes,
the maximum found is taken as an R peak, and the
threshold value is set to the median value of all the
detected R peaks.
State 2: Taking d as the difference between the
position of the last peak and the ending of State 1,
this state waits during RR
min
– d. This avoids the
detection of large T waves and artefact as a new R
peak.
State 3: Threshold level decreases following (4)
until its value reaches again the processed ECG
signal.
[] * [ 1]th n Pth th n
(4)
with
0.7 *
4.7
128
S
Pth
F
Figure 7 represents the correspondence between
the State and the value of the threshold.
Parameters that depend on the frequency have
been chosen by evaluating the performance of the
algorithm over 90 signals of different frequencies
and different features (Table 1). First database is the
MIT Arrhythmia database (MITDB), composed by
48 signals of patients with different kinds of
arrhythmias; second one is Normal Sinus Rhythm
Database (NSRDB), its 18 ECG signals corresponds
to healthy adults; and, finally, Allergy database
(ADB) is composed by 24 ECG signals of children
(aged 7 months to 10 years) exposed to provocation
test at the Paediatrics section of the University Cork
Hospital. 2100 combinations of the 3 parameters
were tested: 10 values of N (1 to 10), 10 values of
Nd (1 to 10), and 21 values of Pth (4.5 to 6.5 in steps
of 0.1). Table 1 summarizes the overall performance
of the algorithm on each database. Metrics used are:
- Sensitivity:
TP
Se
TP FN
(5)
- Positive predictivity:
TP
P
TP FP

(6)
-1
0
1
Subject 100m ECG signal (F
S
= 360 Hz)
-1
0
1
Derivation result
1 200 400 600 800 1000 1200 1400
0
0.5
1
x 10
-3
Preprocessing output
n (samples)
y[n]
y
0
[n]
x[n]
Figure 5: Pre-processing stage results.
UseoftheHeartRateVariabilityasaDiagnosticTool
29
State 1
Find maximum value
counter 
State 2
counter

State 3
counter R
R
mi
n

R
in
t
save
R
peak
Pos
ykt
h
counter 0
counter RR
min
X
Figure 6: Threshold value setting finite state machine.
RR
min
+ QRS
int
d
RR
min
-d
RR
min
+ QRS
int
d
RR
min
-d
Figure 7: Correspondence between the states of the FSM and the value of the threshold.
Table 2: Features and Overall Performance of the R Peaks Detection Algorithm over the Used Databases.
Database
#
of
subjects
F
s
(Hz)
Length
TP
FN
FP
Se
(%)
+P
(%)
MITDB
48 360 24 h
109107 308 295
99.719 99.730
NSRDB
18 128 15 h
195846 60 11
99.969 99.994
ADB
24 256 10 h
195872 1137 1396
99.423 99.292
4.2 Allergy Detection Algorithm
Thanks to the studies about the HRV signal and its
relation with most of the physiological systems of
the body, some works have been published on how
to obtain a great number of its features and the
meaning of their variations. Depending on the final
application, it would be necessary to select one HRV
feature of a group of them.
In a previous work, 18 features of the HRV were
selected to study the heart performance during an
allergic reaction. These features were obtained using
60 seconds windows with 1 second shift: mean of all
the RR intervals within the window; standard
deviation (STD); coefficient of variation:
STD/mean; RMS of differences between adjacent
RR intervals; number of pairs of adjacent RR
intervals differing by more than 50 ms, NN50.;
pNN50, pNN25: NN50/NN25 divided by the total of
RR intervals; positive and negative sequential trend:
percentage of consecutive RR increasing/decreasing
pairs; cardiac sympathetic/vagal indexes and their
relations (CSI, CVI, CSI*CVI and CSI/CVI);
histogram index; very low, low and high frequency
power: total power of the HRV spectrum in the VLF
band (0 to 0.04 Hz), LF band (0.04 to 0.15 Hz) and
HF band (0.15 to 0.4 Hz); ratio LFHF.
The process needed to obtain all these features
and detect an allergic reaction has a very high
computational cost. Another objective of this thesis
consists in reducing this group in order to be able to
perform the allergy detection in real-time. Through
the analysis of a previous obtained database (ADB),
we can study all these features on 24 subjects
BIOSTEC2015-DoctoralConsortium
30
exposed to provocation tests: 15 of them allergic,
and 9 non-allergic. Table 3 summarizes the features
of each test.
Table 3: ADB features.
ID Age Gender Allergen OFC length Total doses Result
1 18 months M Wheat 0h. 14min. 1
Fail
2 6 years M Peanut 1h. 40min. 5
3 9 years M Egg 1h. 34min. 5
4 12 months M Milk 1h. 44min. 4
5 8 years M Peanut 2h. 13min. 7
6 9 years F Peanut 0h. 36min. 1
7 6 years M Soy 0h. 57min. 3
8 5 years M Peanut 1h. 45min. 5
9 8 years F Egg 0h. 50min. 2
10 3 years M Milk 1h. 23min. 3
11 6 years F Peanut 1h. 25min. 5
12 5 years F Milk 0h. 41min. 2
13 3 years F Milk 1h. 46min. 5
18 8 years M Soy 0h. 33min. 1
21 9 years F Wheat 1h. 37min. 7
14 12 months M Milk 2h. 10min. 4
Pass
15 6 years M Egg 1h. 42min. 5
16 10 years M Egg 2h. 09min. 9
17 4 years F Soy 2h. 11min. 8
19 6 years M Peanut 1h. 51min. 8
20 7 months F Milk 0h. 56min. 2
22 4 years F Wheat 1h. 29min. 6
23 2 years M Peanut 1h. 03min. 4
24 18 months F Milk 1h. 33min. 6
Mean
4 years 9
months
-- -- 1h. 15 min. 4.5 ---
The diagnostic ability of each feature can be
obtained by analysing its Area under the ROC curve
(AUC). Sensitivity (7) and Specifity (8) for each
value of each feature’s standard deviation is
represented.
#
#
ofAllergicSubjectsCorrectlyClassified
Se
ofAllergicSubjects
(7)
#
#
ofNonAllergicSubjectsCorrectlyClassified
Sp
ofNonAllergicSubjects
(8)
If the AUC is 50% (the lowest possible value),
the result of the classification is random; above this
value, the greater the AUC value is, the better the
diagnostic ability is. Also, computational time
employed by Matlab to obtain each feature has been
obtained. These two values are represented in Figure
8. Best AUC is obtained by using mean feature
(94.07 %), while worst one (50.7 %) was obtained
with CSI feature.
Due to the fact that with the mean, the best result
is obtained and the computational load needed to
compute it is low, this was the selected feature to
detect the allergic reactions. The next step involves
the analysis of this feature during all the provocation
tests, in order to establish the differences between
allergic and non-allergic subjects.
Black line of Figure 9 shows the mean of the
HRV, MRR, (computed in windows of 60 seconds
with 1 second shift) of an allergic subject and Figure
10, of a non-allergic subject. First grey area
represents the interval until the patients gets the first
dose, information during this interval will be used as
patients’ background. Next grey areas represent the
intervals in which they get the next doses. During
these intervals, MRR signal will not be analysed
because patients are having the allergen, medical
staff could be taken measurements, or even,
reallocating the electrodes, etc., so, ECG signal
could being corrupted, and a false positive can be
produced.
There is a clear difference between these two
signals: the elevations produced on the subject 7
MRR are not present on the other one. It has been
observed that this kind of elevations appears (more
or less clearly) in all the allergic subjects, while they
are not on the non-allergic ones. Another interesting
thing is that they appear, in most of the cases,
several minutes before the tests ended (i.e. the
instant in which the allergic subjects manifested
symptoms). The allergy detection process consists,
thus, in modelling them and detect these peaks.
Normal HRV of a subject depends on his/her
age, sex, health state, weight, etc. so, it is necessary
to normalize the MRR signal. Due to the fact that the
algorithm does not know these features, it is
necessary to normalize each signal depending on its
own features. First grey area (background interval)
has been used to compute the mean MRR of each
subject, as during this time, they are in a “normal”
situation. Once they take the first dose, the value of
the mean is subtracted from the MRR signal (red
line of the figures 9 and 10), the value of the mean is
recomputed each time the subjects have a new dose.
The new mean’s value is computed with the
MRR values from the last time the subjects ate a
dose, to the instant in which they had a new one. As
we are looking for positive peaks (HR increases), if
the MRR decreases, it will not represent an allergic
reaction so, values lower than zero are removed,
obtaining what we call normalized MRR signal
(NMRR). NMRR represent how the MRR signal
moves away from its mean normal value.
Finally, the mean value of all the peaks within
the NMRR signal are computed as follows: a
threshold called ParamZero has been established.
The mean of all the consecutive values higher than
this threshold is obtained. If this value is higher than
allergy_threshold, the peak represents an allergic
reaction. To set the allergy_threshold, the maximum
value of all the peaks present on the NMRR signal
has been computed for each subject. As Figure 11
shows, there is a clear difference between allergic
subject’s maximum peak value (green bars); and
non-allergic’s ones (orange bars). Finally, several
UseoftheHeartRateVariabilityasaDiagnosticTool
31
values of ParamZero have been tested, obtained
performances to those values are plotted on Figure
12.
The selected value of these two parameters allow
us to correctly detect 14 of 15 allergic subjects (all
except for the number 18), and none of the non-
allergic subjects are misclassified as allergic. Also,
the detection of the allergic subjects occur in an
average time of 42 minutes before they are detected
by the medical staff (mean provocation tests length:
79 min.). This time reduction implies also a
reduction of the number of doses needed from 3.93
to 1.5 (mean value).
Mean CSI/CVI STD STNN RMSSD STPP CV LF ratioLFHF VLF Histo pNN25 HF pNN50 CSI*CVI CVI NN50 CSI
0
20
40
60
80
100
Feature
ROC area
Features' Roc areas
AUC
% computational time
Figure 8: AUC vs. computational time of each feature.
Figure 9: Mean of the HRV of an allergic subject.
Figure 10: Mean of the HRV of a non-allergic subject.
BIOSTEC2015-DoctoralConsortium
32
1 2 3 4 5 6 7 8 9 10 11 12 13 18 21 14 15 16 17 19 20 22 23 24
0
10
20
30
40
50
Maximum NRR integration value comparison between groups
Sub
j
ect ID
Maximum NRR integration value
Allergic
Non-allergic
mean allergic
mean non-allergic
Figure 11: Maximum peak value for all the subjects.
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
60
65
70
75
80
85
90
95
100
105
X: 1.244
Y: 100
Allergy detection performance vs. ParamZero values
ParamZero
X: 0.065
Y: 93.33
X: 0.064
Y: 86.67
X: 0.016
Y: 73.33
X: 0.007
Y: 66.67
X: 1.246
Y: 88.89
X: 1.429
Y: 77.78
X: 1.494
Y: 66.67
X: 0.028
Y: 80
%
Sensitivity
Specificity
Figure 12: ParamZero values vs. Se and Sp.
5 EXPECTED OUTCOME
Among all objectives, this thesis pretends to
demonstrate the utility of the analysis of the HRV to
the early detection of allergic reactions. For that, the
main objective is the design of a system composed
by a local positioning system, a host and multiple
devices to analyse continuously and remotely all the
subjects’ HRV present in the same room.
In the case of an allergic reaction is detected, the
system will alert the personal staff, reporting the
name or ID of the patient, as well as his/her location.
6 STAGE OF THE RESEARCH
During the realization of this thesis, two algorithms
have been designed. The first algorithm, the QRS
detector, have been tested thanks to the existence of
a great number of annotated ECG databases.
However, as there is no preceding studies
showing the relationship between the ECG signal
and the allergies, there are no databases that the
authors could use to test the allergic reactions
detection algorithm. For that reason, and due to the
fact that the available database (allergy database) is
UseoftheHeartRateVariabilityasaDiagnosticTool
33
composed only by 24 subjects (15 allergic), the
author is nowadays carrying out a collection process
at allergy section of the Guadalajara University
Hospital (Spain). Subjects of this database are adults
and children exposed to allergy provocation test
involving drugs and food.
Nevertheless, only 2 of 11 subjects that come up
are allergic and not all of them could be detected due
to several circumstances.
Moreover, another application for the use of the
HRV signal is just starting: the detection of
hypoglycaemia in diabetic patients. At present, if a
diabetic patient believes he is in a state of
hypoglycaemia, he needs to do himself a blood
analysis or carry continuously a device that
measures the glucose level on the interstitial tissue.
This devices are carried inserted, and apart from
they affect the comfort of the patients, they are very
expensive. Besides, this devices have a big delay on
the level of glucose measurement on situations of
abrupt changes: immediately after a big meal or
during the realisation of physical activity.
It has been studied that, during a hypoglycaemia,
the body generates adrenaline (like during a stress
situation), which provokes a HR elevation (O.
Hamdy et al., 2014). In this case, what makes
difficult the detection of this situations are the daily
activities that also elevate the HR, like the
realization of physical activity. In this way, it is
planned to study the HR and the movement (by
using inertial sensors) of a series of diabetic subjects
to establish the differences between normal HR
elevations and those produced during normal
situations.
ACKNOWLEDGEMENTS
This work is supported in part by the Spanish
Ministry of Economy and Competitiveness (LORIS
Project, TIN2012-38080-C04-01) and by the
University of Alcalá trough the FPI program.
REFERENCES
G. M. Friesen, T. C. Jannett, M. a Jadallah, S. L. Yates, S.
R. Quint, and H. T. Nagle, “A comparison of the noise
sensitivity of nine QRS detection algorithms.,” IEEE
Trans. Biomed. Eng., vol. 37, no. 1, pp. 85–98, Jan.
1990.
M. W. Phyu, Y. Zheng, B. Zhao, L. Xin, and Y. S. Wang,
“A real-time ECG QRS detection ASIC based on
wavelet multiscale analysis,” in 2009 IEEE Asian
Solid-State Circuits Conference, 2009, pp. 293–296.
S.-W. Chen, H.-C. Chen, and H.-L. Chan, “A real-time
QRS detection method based on moving-averaging
incorporating with wavelet denoising.,” Comput.
Methods Programs Biomed., vol. 82, no. 3, pp. 187–
95, Jun. 2006.
C. I. Ieong, M. I. Vai, and P. U. Mak, “ECG QRS
Complex detection with programmable hardware.,”
Conf. Proc. IEEE Eng. Med. Biol. Soc., vol. 2008, pp.
2920–3, Jan. 2008.
A. Ghaffari, H. Golbayani, and M. Ghasemi, “A new
mathematical based QRS detector using continuous
wavelet transform,” Comput. Electr. Eng., vol. 34, no.
2, pp. 81–91, Mar. 2008.
C. Xiaomeng, “A NEW real-time ECG R-wave detection
algorithm,” in Proceedings of 2011 6th International
Forum on Strategic Technology, 2011, vol. 1, no. 2,
pp. 1252–1255.
R. Rodriguez, A. Mexicano, J. Bila, R. Ponce, S.
Cervantes, and A. Martinez, “Hilbert transform and
neural networks for identification and modeling of
ECG complex,” in Third International Conference on
Innovative Computing Technology (INTECH 2013),
2013, pp. 327–332.
S. Pal and M. Mitra, “Empirical mode decomposition
based ECG enhancement and QRS detection.,”
Comput. Biol. Med., vol. 42, no. 1, pp. 83–92, Jan.
2012.
S. Pal and M. Mitra, “QRS Complex detection using
Empirical Mode Decomposition based windowing
technique,” in 2010 International Conference on
Signal Processing and Communications (SPCOM),
2010, pp. 1–5.
M. K. Das, S. Ari, and S. Priyadharsini, “On an algorithm
for detection of QRS complexes in noisy
electrocardiogram signal,” in 2011 Annual IEEE India
Conference, 2011, no. ii, pp. 1–5.
B. Khiari, E. Ben Braiek, and M. Jemni, “R-wave
detection using EMD and bionic wavelet transform,”
in 2013 International Conference on Electrical
Engineering and Software Applications, 2013, pp. 1–
5.
S. Kouchaki, A. Dehghani, S. Omranian, and R. Boostani,
“ECG-based personal identification using empirical
mode decomposition and Hilbert transform,” in The
16th CSI International Symposium on Artificial
Intelligence and Signal Processing (AISP 2012), 2012,
no. Aisp, pp. 569–573.
M. Zhang and C. Zhang, “A novel ECG signal denoising
method based on Hilbert-Huang Transform,” in 2010
International Conference on Computer and
Communication Technologies in Agriculture
Engineering, 2010, pp. 284–287.
J. Moraes, M. M. Freitas, F. N. Vilani, and E. V. Costa,
“A QRS complex detection algorithm using
electrocardiogram leads,” in Computers in Cardiology,
2002, pp. 205–208.
C. Choi, Y. Kim, and K. Shin, “A PD control-based QRS
detection algorithm for wearable ECG applications.,”
BIOSTEC2015-DoctoralConsortium
34
Conf. Proc. IEEE Eng. Med. Biol. Soc., vol. 2012, pp.
5638–41, Jan. 2012.
M. Adnane, Z. Jiang, and S. Choi, “Development of QRS
detection algorithm designed for wearable
cardiorespiratory system.,” Comput. Methods
Programs Biomed., vol. 93, no. 1, pp. 20–31, Jan.
2009.
J. Pan and W. J. Tompkins, “A real-time QRS detection
algorithm.,” IEEE Trans. Biomed. Eng., vol. 32, no. 3,
pp. 230–6, Mar. 1985.
R. Bailón, N. Garatachea, I. de la Iglesia, J. A. Casajús,
and P. Laguna, “Influence of running stride frequency
in heart rate variability analysis during treadmill
exercise testing.,” IEEE Trans. Biomed. Eng., vol. 60,
no. 7, pp. 1796–805, Jul. 2013.
R. Bailón, G. Laouini, C. Grao, M. Orini, P. Laguna, and
O. Meste, “The integral pulse frequency modulation
model with time-varying threshold: application to
heart rate variability analysis during exercise stress
testing.,” IEEE Trans. Biomed. Eng., vol. 58, no. 3,
pp. 642–52, Mar. 2011.
M. Kumar, M. Weippert, R. Vilbrandt, S. Kreuzfeld, and
R. Stoll, “Fuzzy Evaluation of Heart Rate Signals for
Mental Stress Assessment,” IEEE Trans. Fuzzy Syst.,
vol. 15, no. 5, pp. 791–808, Oct. 2007.
V. Shusterman and O. Barnea, “Sympathetic nervous
system activity in stress and biofeedback relaxation,”
IEEE Eng. Med. Biol. Mag., vol. 24, no. 2, pp. 52–57,
Mar. 2005.
D. Giakoumis, D. Tzovaras, K. Moustakas, and G.
Hassapis, “Automatic Recognition of Boredom in
Video Games Using Novel Biosignal Moment-Based
Features,” IEEE Trans. Affect. Comput., vol. 2, no. 3,
pp. 119–133, Jul. 2011.
P.-Y. Hsieh and C.-L. Chin, “The emotion recognition
system with Heart Rate Variability and facial image
features,” in 2011 IEEE International Conference on
Fuzzy Systems (FUZZ-IEEE 2011), 2011, pp. 1933–
1940.
J. De Jonckheere, T. Rakza, R. Logier, M. Jeanne, R.
Jounwaz, and L. Storme, “Heart rate variability
analysis for newborn infants prolonged pain
assessment.,” Conf. Proc. IEEE Eng. Med. Biol. Soc.,
vol. 2011, pp. 7747–50, Jan. 2011.
A. Fanelli, G. Magenes, M. Campanile, and M. G.
Signorini, “Quantitative Assessment of Fetal Well-
Being Through CTG Recordings: A New Parameter
Based on Phase-Rectified Signal Average,IEEE J.
Biomed. Heal. Informatics, vol. 17, no. 5, pp. 959–
966, Sep. 2013.
M. B. Malarvili and M. Mesbah, “Newborn seizure
detection based on heart rate variability.,” IEEE Trans.
Biomed. Eng., vol. 56, no. 11, pp. 2594–603, Nov.
2009.
J. Hayano, E. Watanabe, Y. Saito, F. Sasaki, K. Kawai, I.
Kodama, and H. Sakakibara, “Diagnosis of sleep
apnea by the analysis of heart rate variation: a mini
review.,” in Annual International Conference of the
IEEE Engineering in Medicine and Biology Society.
IEEE Engineering in Medicine and Biology Society.
Conference, 2011, vol. 2011, pp. 7731–4.
E. Gil, M. Mendez, J. M. Vergara, S. Cerutti, A. M.
Bianchi, and P. Laguna, “Discrimination of sleep-
apnea-related decreases in the amplitude fluctuations
of PPG signal in children by HRV analysis.,”
IEEE
Trans. Biomed. Eng., vol. 56, no. 4, pp. 1005–14, Apr.
2009.
S. Eyal, Y. Dagan, and A. Baharav, “Sleep in the Cloud:
On How to Use Available Heart Rate Monitors to
Track Sleep and Improve Quality of Life,” in
Computing in Cardiology (CinC), 2012, pp. 329–332.
O. Hamdy, V. A.R. Srinivasan, and K. J Snow,
“Hypoglycemia,” Medscape, Medscape, pp. 1–5,
2014.
UseoftheHeartRateVariabilityasaDiagnosticTool
35