Determining Cardiopulmonary Resuscitation Parameters with
Differential Evolution Optimization of Sinusoidal Curves
Christian Lins
1
, Andreas Klausen
2
, Sebastian Fudickar
2
, Sandra Hellmers
2
, Myriam Lipprandt
2
,
Rainer R
¨
ohrig
2
and Andreas Hein
2
1
OFFIS – Institute for Information Technology, Oldenburg, Germany
2
Carl von Ossietzky University, Oldenburg, Germany
Keywords:
CPR Training, Curve Fitting, Evolutionary Algorithm, Cardiac Massage.
Abstract:
In this paper, we present a robust sinusoidal curve fitting method based on the Differential Evolution (DE)
algorithm for determining cardiopulmonary resuscitation (CPR) parameters – naming chest compression fre-
quency and depth – from skeletal motion data. Our implementation uses skeletal data from the RGB-D (RGB
+ Depth) Kinect v2 sensor and works without putting non-sensor related constraints such as specific view an-
gles or distance to the system. Our approach is intended to be part of a robust and easy-to-use feedback system
for CPR training, allowing its unsupervised training. We compare the sensitivity of our DE implementation
with data recorded by a Laerdal Resusci Anne mannequin. Results show that the frequency of the DE-based
CPR is recognized with a variance of ±4.4 bpm (4.1%) in comparison to the reference of the Resusci Anne
mannequin.
1 INTRODUCTION
Cardiac arrests represent one of the most prominent
diseases and can significantly affect the independent
living if medical treatment is not available within 3-5
minutes. Thus, the proper training of medical person-
nel is as essential as the training of non-specialists,
which can offer resuscitation support much faster.
Since Advanced Life Support (ALS) resuscitation
training, due to the high material and training costs,
is only used for medical professionals, technological
training systems might represent a well-suited alter-
native to train both professionals and non-specialists.
The functioning of the human body depends on
a continuous support of oxygen and glucose due to
the following fundamental biological processes, cla-
rifying the urgency of support. The organs of the hu-
man body are composed of various specialized cells,
e.g., the nerve cells in the brain. These cells need
energy, i.e., in the form of glucose and oxygen to keep
structure and function. With the respiration, the air
gets into the lungs. In the lungs, the oxygen of the
air gets into the blood. The blood carries oxygen and
glucose - fragmented carbohydrates from the food -
to the cells. The heart pumps the blood through the
circulation.
Thus, in case of a cardiac arrest, the transport of
oxygen and glucose to the cells stops immediately.
First of all the reserves of glucose and oxygen in the
cells are consumed and the functionality remains. If
the cardiac arrest persists, the function of the cells
will be reduced, at first without permanent damage. If
there is no blood circulation for a long time the struc-
ture of the cells will be irreparably damaged. For the
cells of the nervous system including the brain, that
means that the functionality reduces after 10 seconds
(i.e., loss of consciousness). The death of the cells
begins after about 3 minutes. (Schmidt et al., 2011)
With medical treatment including ventilation, me-
dication, and defibrillation (Advanced Life Support,
ALS) (Soar et al., 2015) there is a high probability of
maintaining sufficient circulation. In the case of a car-
diac arrest, the most critical measure is to do a cardiac
massage ideally in combination with rescue breathing
(Basic Life Support, BLS) (Perkins et al., 2015). By
doing this, a minimal circulation to carry oxygen to
the nerve cells is sustained. During a cardiac mas-
sage, the heart is compressed by orthogonal pressure
onto the breastbone. The depth of this compression is
ideally 5 cm. The blood in the heart is ejected. A com-
plete decompression is crucial to fill the heart with
blood again. The frequency of the cardiac massage is
100 to 120 beats per minute (bpm). If it is possible
to do a sufficient rescue breathing the heart pressure
Lins C., Klausen A., Fudickar S., Hellmers S., Lipprandt M., RÃ˝uhrig R. and Hein A.
Determining Cardiopulmonary Resuscitation Parameters with Differential Evolution Optimization of Sinusoidal Curves.
DOI: 10.5220/0006732806650670
In Proceedings of the 11th International Joint Conference on Biomedical Engineering Systems and Technologies (HEALTHINF 2018), pages 665-670
ISBN: 978-989-758-281-3
Copyright
c
2018 by SCITEPRESS – Science and Technology Publications, Lda. All rights reserved
massage will be stopped for a short time and will be
continued after two accelerated breathings.
In summary, the following points are important for
the BLS:
the position of the hands in the middle of the bre-
astbone between the nipples,
orthogonal pressure onto the breastbone,
depth of pressure of 5 cm,
frequency of compressions at 100 to 120 beats,
per minute,
complete decompressions of the thorax,
and when doing a rescue breathing:
short interruptions of the heart pressure mes-
sage after every 30 compressions,
2 rapid ventilations,
fast continuation of the heart pressure message
Learning the right technique is necessary, to per-
form high-quality resuscitation. The method of resus-
citation can be trained with simulation mannequins.
Most of these mannequins provide a real-time feed-
back of the quality of cardiac massage and breathing.
Although the simulation mannequins provide imme-
diate and precise feedback, they are costly systems.
An approach with a low-cost RGB-D camera such as
the Microsoft Kinect (or even an RGB camera with
software skeleton tracking) would provide such trai-
ning to a larger audience thus improving the quality of
the CPR. Additionally, a technique only relying on ex-
ternal (ambient) sensors would retrieve feedback data
even from real resuscitations.
Two crucial parameters of the CPR are the fre-
quency at which the compressions are performed and
the compression depth of the chest. Typically, the fre-
quency is stated as beats (compressions) per minute
(bpm) and the compression depth in cm or mm. In
this paper, we focus on these two parameters and pro-
pose a method to derive these parameters from motion
data coming from an RGB-D-based skeleton tracking
(Microsoft Kinect v2). We show how the Differen-
tial Evolution optimization algorithm can be used to
fit a sinusoidal curve which robustly provides the two
wanted parameters. The outline of the paper is as fol-
lows: in section 2, we discuss related work. In section
3, we introduce the details and specifics of the Diffe-
rential Evolution algorithm. In section 4, we intro-
duce our concept and a first implementation of our
system. Afterwards, we evaluate the sensitivity as a
pilot-study in section 5. We conclude with some lear-
ned lessons.
2 RELATED WORK
There are a few approaches to support CPR training
with RGB-D sensors and resulting feedback.
Tian et al. use Kinect data to model a virtual envi-
ronment with patient and performer and drive a haptic
device in the real world (Tian et al., 2014). In the vir-
tual environment, the performer can see the CPR on a
virtual avatar while responding to the sensation of the
haptic device. The authors focus more on the basics
of cardiac massage than specific optimization of the
training.
Semeraror et al. and Loconsole et al. present re-
sults from their system called RELIVE which is si-
milar to our approach (Semeraro et al., 2017; Locon-
sole et al., 2016). RELIVE uses data from the Ki-
nect v1 and extract depth and frequency parameters
from the motion data with the intention to improve
the quality of CPR (training). In contrast to our ap-
proach they use the raw RGB pixel and depth image
data of the Kinect to identify hands, arms and the trai-
ning body. We compare our results of the frequency
detection in the last section of this paper. The prede-
cessor to RELIVE is probably the Mini-VREM tool,
which is a Kinect with a software-based audio- and
video-feedback-system (Semeraro et al., 2013) but re-
quires a colored marker at the subject’s hands.
Wang et al. have utilized the Kinect v1 sensor
to create a real-time feedback system for CPR trai-
ning (Wang et al., 2017). The system shows the cur-
rent compression depth and frequency on a computer
screen so that the trainee can adapt her or his actions
accordingly. The authors have evaluated their system
with 100 health care professionals and conclude that
the system can significantly improve the CPR quality
at least for trainees with a body weight < 71kg.
Higashi et al. developed and evaluated an aug-
mented reality system that enables the user to cor-
rect her or his posture while performing cardiac mas-
sage compression (Higashi et al., 2017). The focus of
this work lays on the correct posture of the performer
primarily to differentiate between extended position
compression and bent position compression. Unfor-
tunately, they do not provide a quantitative evaluation
of their system.
3 CONCEPT
3.1 CPR Parameters Determination
with Kinect
With our approach it is possible to derive CPR quality
parameters such as the compression (CC) frequency
Skeletal
Motion Data
Feature
Selection
Distance to
Floor Plane
Hands
Elbows
Shoulders
Sinusoidal
Curve Fitting
CPR
Parameter
Feedback
Improvement
Cardiac
massage
Figure 1: CPR training with Kinect.
and the compression depth with one (or more) exter-
nal RGB-D sensors. It does not require a simulation
mannequin and is therefor suitable for CPR trainings
or in-situ observations, e.g. in a shock room. Figure
1 shows the process of our approach within CPR trai-
ning.
3.2 Differential Evolution Optimization
of Sinusoidal Curves
The Differential Evolution (DE) algorithm (Storn and
Price, 1997) is a generic evolutionary optimisation al-
gorithm, which is used here to solve four parameters
of a sinusoidal curve. Our approach utilizes the perio-
dic nature of the CPR to fit the time series of distances
(upper limbs to ground) to a sine curve.
The generic parameters sine function can be writ-
ten as follows:
y(t) = A · sin(2 f t + ρ) + D
Parameter A and f are of primary interest here;
A is the amplitude, f the ordinary frequency. When
we assume that the arms of a person performing CPR
are orthogonal (and rigid) on the patient’s chest, then
the relative distances of his/her arms are equal to the
chest compression depth. Moreover, additionally, the
frequency of low to high to low compression depth re-
presents one compression cycle. To find a solid CPR
frequency and compression depth, we fit the time se-
ries data of upper limb distances to a sinusoidal curve.
On a fitted function, parameter f is the CPR fre-
quency and A is the compression depth.
To fit the function y(t), we minimize the least-
squares distances using an evolutionary approach. A
common evolutionary algorithm is Differential Evo-
lution that works particularly well with nonlinear i.e.
sinusoidal cost functions. DE searches and evaluates
a parameter space in parallel and finds multiple near-
optimal but distinct solutions to a problem.
As all evolutionary algorithms, DE is population-
based and optimizes the population throughout se-
veral generations:
x
i,G
with i = 1..NP, G = 1..G
max
x
i,G
is a 4-dimensional vector of individual i for ge-
neration G. So in every generation NP individuals are
optimized up to G max generations.
The optimization is done between a transition
from one generation G to another generation G + 1.
Most evolutionary algorithms - as does DE - comprise
the steps mutation, crossover and selection.
3.2.1 Mutation
For every generation a mutation step is performed for
every individual x
i,G
. We used the step from (Storn
and Price, 1997) with a fixed amplification factor:
v
i,G+1
= x
r
1
,G
+ 0.8 · (x
r
2,G
x
r
3,G
)
with v the mutated individual and r
1
, r
2
, r
3
{1, 2, . . . , NP}, r
1
6= r
2
6= r
3
6= i randomly chosen.
3.2.2 Crossover
The crossover step decides which of the four parame-
ters of one individual are preserved in the next genera-
tion. For every parameter a uniform random number
r [0, 1] is chosen. If r CR = 0.9 then the parame-
ter from the mutant is chosen, otherwise the one from
the original individual.
3.2.3 Selection
The selection step decides which individual is pas-
sed to next generation by evaluating it against the cost
function. In our approach the squared errors are sum-
med up for every solution candidate x
i,G
:
T
t=0
(s(t) y
x
i,G
(t))
2
with s being a T -length vector of samples (joint-
floor-distances) and y the parameterized sinusoid
function of individual x
i,G
.
4 IMPLEMENTATION
We implemented the Differential Evolution algorithm
and the visualization software using C# on a Win-
dows system. Figure 2 shows a typical screenshot
of the application while processing motion data from
the Kinect sensor. The RGB image is shown on the
Figure 2: Our software processing Kinect motion data from a CPR training session. The graph at the bottom shows the
distances between the floor and the limbs (red) and the fitted sinusoid curve (blue).
screen together with a green line overlay represen-
ting the arms. Additionally detected skeleton joints
are marked as small yellow dots.
The Kinect sensor API notifies our application
when a new data frame is available from the sensor
and provides the application with a Skeleton frame
containing the joint positions and the floor plane es-
timation. The application the calculates the distance
between the floor plane and the upper limb joints (i.e.,
wrists, elbows, or shoulders) and pass the result to
the sample set. On every ten new samples the last
150 samples are being evaluated against the current
fitted sine curve, and the squared errors are calcu-
lated. As soon as the error reaches a threshold, the
Differential Evolution algorithm is started with a new
updated sample set using NP = 500 individuals and
G max = 300 generations. The application continu-
ously draws the current fitting in the graph on the
bottom (see Figure 2).
5 EVALUATION
5.1 Methods
We use the Laerdal Resusci Anne Simulator man-
nequin as the reference for our system. Electro-
mechanical sensors measure the depth of thorax com-
pression and decompression, the frequency of the
compressions and the volume of ventilation. On a ta-
blet, you can see all values in real-time and a sum-
mary of the training.
A Resusci Anne mannequin was placed on the
floor. The Kinect v2 sensor was placed at a distance
of 1,5m at the height of 1m. The person performing
the CPR was placed on the other side of the manne-
quin facing the Kinect camera. The subject was as-
ked to perform CPR compressions on the mannequin
with standard CPR frequency and depth for about 90
seconds. The Kinect, as well as the Resusci Anne,
were collecting data which was synchronized manu-
ally after the recording using the RGB color image of
the Kinect. The DE optimization algorithm requires a
few compressions to adapt, so the first compressions
were omitted until the algorithm’s error drops below
a reasonable threshold (about 1% of the initial error).
5.2 Evaluation Results
5.2.1 Frequency Prediction
We compare the compressions per minute variable
of the Resusci Anne mannequin with the prediction
of our system. The Resusci Anne provides a comp-
MeanFrequency variable for every recorded compres-
sion (compEvent). The results for all four trials can
be found in Table 1 and graphically in Figure 3 for
Trial 1.
5.2.2 Depth Prediction
For every recorded compression the Resusci Anne re-
cords a maximum compression depth. We compare
these maximum compression depth value with the
doubled amplitude (2 · A) of the corresponding fitted
sinusoidal curve. The results for all four trials can
be found in Table 2 and graphically in Figure 4 for
Trial 4.
Table 1: Absolute and relative mean frequency variation (in bpm) of our method compared to Resusci Anne mannequin.
Feature Hands Feature Elbows Feature Shoulders
Trial 1 / Subject 1 9.1 (*) bpm / 7.7% 3.3 bpm / 2.8% 5.1 bpm / 4.3%
Trial 2 / Subject 2 14.1 (*) bpm / 12.3% 3.4 bpm / 3.0% 6.0 bpm / 5.1%
Trial 3 / Subject 3 5.1 bpm / 4.6% 4.9 bpm / 4.5% 4.9 bpm / 4.5%
Trial 4 / Subject 3 6.4 bpm / 6.2% 6.1 bpm / 5.9% 5.7 bpm / 5.5%
Ø 8.7 bpm / 7.7% 4.4 bpm / 4.1% 5.4 bpm / 4.9%
Table 2: Absolute and relative mean compression depth variance (in mm) of our method compared to Resusci Anne Manne-
quin.
Feature Hands Feature Elbows Feature Shoulders
Trial 1 / Subject 1 25mm / 44% 10mm / 18% 18mm / 31%
Trial 2 / Subject 2 19mm / 33% 17mm / 31% 19mm / 34%
Trial 3 / Subject 3 5mm / 15% 39mm / 110% 28mm / 80%
Trial 4 / Subject 3 15mm / 36% 16mm / 41% 6mm / 15%
Ø 16mm / 32% 21mm / 50% 18mm / 40%
112
116
120
124
105000 110000 115000 120000 125000 130000
Kinect Timestamp
Compressions per minute (bpm)
colour
Kinect v2
Resusci Anne
Figure 3: Comparison of detected compression rates of our system and Resusci Anne mannequin (Subject 1, Trial 1).
0
20
40
60
80
500 1000 1500
Timestamp
Compression depth (in mm)
colour
Kinect v2
Resusci Anne
Figure 4: Comparison of compression depths (in mm) between our system and Resusci Anne (Subject 3, Trial 4).
6 LESSON LEARNED
We presented an interactive software system that uses
motion data from an RGB-D (Kinect) sensor and the
Differential Evolution optimization algorithm to dyn-
amically fit sinusoidal curves to derive frequency and
depth parameters for cardiopulmonary resuscitation
training. We evaluated the system with three diffe-
rent subjects and tested the data of three different limb
regions (hands, elbows, and shoulders) for their suit-
ability to derive the parameters. Using the elbow fe-
atures of the Kinect skeleton, the results for the fre-
quency determination show a mean variance of 4.1%
(4.4 bpm) compared to the results of a Laerdal Re-
susci Mannequin (acting as the gold standard). This
is superior to the shoulder features with 4.9%, which
probably suffer from small dampening effects of the
elbow joint. The hand features are often occluded
even under near-optimal view situations and show a
higher variance of 7.7% variance. We will investigate
if the combined consideration of all three limb regions
will enhance the sensitivity furthermore.
While the results determining the CPR frequency
are already promising, the results for the compression
depth are not yet conclusive. The discrepancy to the
Resusci Anne results ranged between 5-39mm (15-
115%) with the hands features working best (mean
16mm). The high variance between the results made
it impossible to find a stable constant offset or factor
that may improve the accuracy. Here, more investi-
gations are needed, to determine why only singular
results are so far promising (see Figure 4).
Thus, our work represents an initial step towards a
more complete and precise modeling of the ERC CPR
using ambient sensors.
ACKNOWLEDGEMENTS
This work was supported by the funding initiative
Nieders
¨
achsisches Vorab of the Volkswagen Founda-
tion and the Ministry of Science and Culture of Lo-
wer Saxony as a part of the Interdisciplinary Research
Centre on Critical Systems Engineering for Socio-
Technical Systems II.
The authors would like to thank the anonymous
reviewers for their helpful comments.
REFERENCES
Higashi, E., Fukagawa, K., Kasimura, R., Kanamori, Y.,
Minazuki, A., and Hayashi, H. (2017). Development
and evaluation of a corrective feedback system using
augmented reality for the high-quality cardiopulmo-
nary resuscitation training.
Loconsole, C., Frisoli, A., Semeraro, F., Stroppa, F., Ma-
stronicola, N., Filippeschi, A., and Marchetti, L.
(2016). Relive: a markerless assistant for cpr trai-
ning. IEEE Transactions on Human-Machine Sys-
tems, 46(5):755–760.
Perkins, G., Handley, A., Koster, R., Castren, M., Smyth,
M., Olasveengen, T., Monsieurs, K., Raffay, V., Gras-
ner, J., Wenzel, V., et al. (2015). European resuscita-
tion council guidelines for resuscitation 2015. Resus-
citation, 95:81–99.
Schmidt, R. F., Lang, F., and Heckmann, F. (2011). Physio-
logie des Menschen. Springer Verlag.
Semeraro, F., Frisoli, A., Loconsole, C., Bann
`
o, F., Tam-
maro, G., Imbriaco, G., Marchetti, L., and Cerchiari,
E. L. (2013). Motion detection technology as a tool
for cardiopulmonary resuscitation (CPR) quality trai-
ning: A randomised crossover mannequin pilot study.
Resuscitation, 84(4):501–507.
Semeraro, F., Frisoli, A., Loconsole, C., Mastronicola, N.,
Stroppa, F., Ristagno, G., Scapigliati, A., Marchetti,
L., and Cerchiari, E. (2017). Kids (learn how to) save
lives in the school with the serious game Relive. Re-
suscitation, 116:27–32.
Soar, J., Nolan, J. P., B
¨
ottiger, B. W., Perkins, G. D., Lott,
C., Carli, P., Pellis, T., Sandroni, C., Skrifvars, M. B.,
Smith, G. B., et al. (2015). European resuscitation
council guidelines for resuscitation 2015. Resuscita-
tion, 95:100–147.
Storn, R. and Price, K. (1997). Differential Evolution A
Simple and Efficient Heuristic for global Optimization
over Continuous Spaces. Journal of Global Optimiza-
tion, 11(4):341–359.
Tian, Y., Raghuraman, S., Yang, Y., Guo, X., and Prabha-
karan, B. (2014). 3d immersive cardiopulmonary re-
suscitation (cpr) trainer. In Proceedings of the 22nd
ACM international conference on Multimedia, pages
749–750. ACM.
Wang, J.-C., Tsai, S.-H., Chen, Y.-H., Chen, Y.-L., Chu,
S.-J., and Liao, W.-I. (2017). Kinect-based real-time
audiovisual feedback device improves cardiopulmo-
nary resuscitation quality of lower-body-weight res-
cuers. The American Journal of Emergency Medicine.