Mathematical Algorithm For Heart Rate Variability Analysis: Aldalb@inbox - LV Buikis@latnet - LV
Mathematical Algorithm For Heart Rate Variability Analysis: Aldalb@inbox - LV Buikis@latnet - LV
Abstract: - Paper is destined for use in medicine, psychology and psychophysiology, in man’s self-
development training, breathing technique’s training, in the field of stress resistance, health promotion,
strengthening of the capacity for work; and it relates to the apparatus and methods for detection of the heart
rate variability and it’s use in providing biofeedback during training sessions of organism’s vegetative balance
and coherence.
Key-Words: Heart, Heart rate variability, Biofeedback, Method for detection, Self-development
training, Stress resistance, Coherence.
changed SRV indicators. HRV may be used as a frequency variations in heart rate and thus are
indicator of risk prediction after myocardial highly correlated. Since many of the measures
infarction [3], for assessing of Autonomic correlate closely with others, the following four
dysfunction in patients with fibromyalgia [4], measures are recommended for time
[5], as an Indicator of Mental Workload [6], of domain HRV assessment (1) SDNN (estimate of
state anxiety in healthy individuals [7], as
overall HRV), (2) HRV triangular index
indicator of sleep disorders [8], as indicator of
(estimate of overall HRV), (3) SDANN
validity of different Breathing styles [9], as tool
for analysis of different emotional states [10]. (estimate of long-term components of HRV),
2.4. Mathematical aspects of the SRV and (4) RMSSD (estimate of short-term
methodology and measurement standards. components of HRV).
Time Domain Methods 2.5. Frequency Domain Methods
The variations in heart rate may be evaluated by The analysis of the tachogram has been applied
a number of methods. Perhaps the simplest to since the late 1960s. Power spectral
perform are the time domain measures. In these density (PSD) analysis provides the basic
methods, either the heart rate at any point in information of how power (variance) distributes
time or the intervals between successive normal as a function of frequency. Independent of the
complexes are determined. In a continuous ECG method used, only an estimate of the true PSD
record, each QRS complex is detected, and the of the signal can be obtained by proper
so-called normal-to-normal (NN) intervals (that mathematical algorithms.
Methods for the calculation of PSD may be
is, all intervals between adjacent QRS
generally classified as nonparametric and
complexes resulting from sinus node
parametric. In most instances, both
depolarisations) or the instantaneous heart rate methods provide comparable results. The
is determined. The simplest variable to calculate
advantages of the nonparametric methods are (1)
is the standard deviation of the NN intervals the simplicity of the algorithm used (fast
(SDNN), that is, the square root of Fourier transform [FFT] in most of the cases)
variance. Other commonly used statistical and (2) the high processing speed, while the
variables calculated from segments of the total advantages of parametric methods are (1)
monitoring period include SDANN, the standard smoother spectral components that can be
deviation of the average NN intervals calculated distinguished independent of preselected
over short periods, usually 5 minutes, which is frequency bands, (2) easy post processing of
an estimate of the changes in heart rate due to the spectrum with an automatic calculation of
cycles longer than 5 minutes, and the SDNN low- and high-frequency power components
index, the mean of the 5-minute standard with an easy identification of the
deviations of NN intervals calculated over 24 central frequency of each component, and (3) an
hours, which measures the variability due to accurate estimation of PSD even on a small
cycles shorter than 5 minutes. number of samples on which the signal is
The most commonly used measures derived supposed to maintain stationery. The basic
from interval differences include RMSSD, the disadvantage of parametric methods is the need
square root of the mean squared differences of of verification of the suitability of the chosen
successive NN intervals, NN50, the number of model and of its complexity (that is, the order of
interval differences of successive NN intervals the model).
greater than 50 ms, and pNN50, the proportion
derived by dividing NN50 by the total number 3 Training Method for Promotion of
of NN intervals. All of these measurements of Emotional Stress Reduction,
short-term variation estimate high-
the calculation algorithm is characterized by any 3.2. Practical application of the proposal in
of the similar characteristics - the time interval, detail
necessary for heart rate records to allow quality The first part is exactly the same for all pulse
and standards of appropriate HRV calculations. variability detecting methods. It is as follows.
Classical case, by international agreement, this By means of any standard EKG or pulse beat
amount of time should be 5 minutes long [1]. recording device time intervals between each
After the prototype and analogues, the most successive electrocardiogram QRS complex or
modest calculating the required number of pulse pulse wave must be fixed with an accuracy of at
beats, which can calculate the approximate data least 1 ms. It is generally recognized series of
SRV - 100 pulse beats (1950-up to a 80-year numbers (768, 753, 728, 764, 801, 853, etc.),
Soviet scientific data, which occurred in the which means that, for example, between the first
Soviet cosmonaut psycho physiological and second QRS complex onset elapses 768 ms
monitoring of the condition). Absolutely the or 0.768 seconds; respectively, during 1 minute
smallest number of pulse beats needed to make exist 60/0,768=78,12 heart beats, and that is so
something quite inaccurate, but calculate the called instantaneous heart rate or instantaneous
average heart rate, pulse rate is 10-15 beats, but pulse. The time elapsed between the second and
the average pulse is not the pulse rate the third QRS complex or the second and the
variability. third pulse beat is 79.68, the following
This means that when working on a prototype or instantaneous pulse is 82.43 per minute and so
analogue techniques, on.
a) To collect data before the feedback signal for But the momentary heart cycle length (or
generation must wait at least 1-6 minutes; instantaneous pulse) rates in practice are not
b) Each subsequent result can be obtained again used as pulse feedback indicators. They are very
only after 1-6 minutes; changeable, and physiological benefits lies
c) the work in "moving average" mode is in precisely in its ability to characterize this
better shape, because the waiting for "dead" variability mathematically, i.e., to find an
period is necessary only in the beginning, and algorithm that is the best and more practical to
then we are able to be calculate for each pulse characterize a specific physiological condition
all SRV figures for the previous 1.5-6-minute or situation, and can be used as feedback
period, but the improvement is somewhat indicators. Standard HRV indicators are
apparent (illusory), because in essence we do appropriate for scientific purposes, but are less
not obtain a HRV description of each concrete adequate for practical purpose as biofeedback
short time moment, but we have the result of elements. Our work allowed us to see the
previous period average. possibility to derive a special mathematical
All these methods are satisfactory, if we are algorithm for processing the instantaneous pulse
interested in slow, tens of minutes and hours data with the aim to generate a realistic
changing physiological responses. But usually indication of the vegetative n.s. regulatory
all the physiological and psychological processes, and, thus, create a parameter, which
processes that we want to adjust to the reverse could serve as a convenient indicator used
link are not so long. Even breathing, is used to biofeedback.
improve the pulse variability. Very rarely, Usually offered calculations, used for
including yoga exercises, one respiratory cycle biofeedback signal, need at least 100 -500 test
lasts longer than one minute. So, with the points, located before the instantaneous time
prototype and its analogues, we only very point recorded. For realisation of our algorithm
conditionally can hope that we as a feedback only 2 points before the instantaneous time
signal truly use peculiar HRV indicators. But point recorded are necessary, and, more
any stress during minutes may generate importantly, the conclusions we make with only
enormous changes, and that is why adequate one, the most recent time interval, with his
HRV record figures are essential. relationship to the previous interval, which is
just a report. The result therefore does not
describe the average physiological state of For time period of 20 sec or longer the “Central
several minutes, but about 1 second. Thus, Index (CI)” is calculated as following:
feedback signal can be shown immediately after Central Index (CI) = amount of all PBFS / (all
the fourth heart beat. PBFS and NBFS amount) * 100 (percent)
3.3. Our algorithm is implemented as follows This calculation can be performed in both ways:
The following convention is adopted: immediately after each heart beat, or as a
P(n) = the time moment of the current heart retrospective analysis of a particular situation,
beat (fourth, if the calculations carried out at the particular time interval may be made. Since CI
fourth heart percussion); is always within the range between 0 and 100%,
P(n-1) = (third, if the calculations carried out at and the value estimate is unchangeable, it may
the fourth heart percussion); well be used as comparative indicator and
P(n-2) = (second, if the calculations carried out benchmark for the one and the same person at
at the fourth heart percussion); different life, work and health situations, as well
P(n-3) = (first, if the calculations carried out at as various human condition inter-comparisons.
the fourth heart percussion); CI is very dynamic, if you use it as a moving
T(n) = time interval between P(n) and P(n-1); average, for example, from 20 heart beats, and,
T(n-1) = time interval between P(n-1) and P(n- at the same time, it is also a solid, stable
2); indicator, that can be used to compare averages
T(n-2) = time interval between P(n-2) and P(n- for different people, or one and the same human
3); figures on different days, months or years, if the
Beginning from 4-th pulse beat and forth, each expense of a 5-minute long recorded is
pulse beat is granted with following designation performed in standardized conditions. Many of
(Parameter V(x)=+ or V(x)=–) according to our measurements allow introducing
following algorithm: approximate boundaries of this index - readings
V(n)=”+”, if T(n)>T(n-1); above 50% usually mean good health and high
V(n)=”-”, if T(n)<T(n-1); performance. Specially trained people, who
V(n)=”0”, if T(n)=T(n-1); manage yoga and deep breathing techniques, are
V(n-1)=”+”, if T(n-1) >T(n-2); able to increase this figure, and long to hold 70-
V(n-1)=”-”, if T(n-1)<T(n-2); 90% range. To emotional stress, the figure falls
V(n-1)=”0”, if T(n-1)=T(n-2) below 30%, and in some situations, it is only 3-
On each pulse beat beginning from the fourth 6%.
beat, the following calculations are made:
If V(n)=”+” and V(n-1)=”+” then PBFS 4 Conclusions
(Positive Biofeedback Signal)=PBFS+1 Training technique to reduce the emotional
If V(n)=”-” and V(n-1)=”-” then stress, physiological coherence and autonomic
PBFS=PBFS+1 balance, through a special breathing
If V(n)=”+” and V(n-1)=”-” then NBFS movements, body postures, psychological,
(Negative Biofeedback Signal)=NBFS+1 spiritual and other practices that comply with
If V(n)=”-” and V(n-1)=”+” then heart rate variability feedback control, in which
NBFS=NBFS+1 the parameter estimate can be made and the
If V(n)=”0” and V(n-1)=”+” then feedback signal is generated at each pulse of
NBFS=NBFS+1 percussion, the calculations are made for direct-
If V(n)=”+” and V(n-1)=”0” then time, and are played on portable devices or PC
NBFS=NBFS+1 screen, and the parameters used in various
If V(n)=”0” and V(n-1)=”-” then systems management (physical medicine
NBFS=NBFS+1 equipment, stress management, training and
If V(n)=”-” and V(n-1)=”0” then work on capacity-building, light - sound
NBFS=NBFS+1 stimulation systems) varies with the fact that, in
If V(n)=”0” and V(n-1)=”0” then order to improve the efficiency of the method
NBFS=NBFS+1 1st than 20 seconds over a longer period,