Abstract
Cardiopulmonary resuscitation (CPR) is one of the most critical emergency interventions for sudden cardiac arrest. In this paper, a robust sinusoidal modelfitting method based on a Evolution Strategy inspired algorithm for CPR quality parameters – naming chest compression frequency and depth – as measured by an inertial measurement unit (IMU) attached to the wrist is presented. The proposed approach will allow bystanders to improve CPR as part of a continuous closedloop support system once integrated into a smartphone or smartwatch application. By evaluating the model’s precision with data recorded by a training mannequin as reference standard, a variance for the compression frequency of \(\pm 2.22\) compressions per minute (cpm) has been found for the IMU attached to the wrist. It was found that this previously unconsidered position and thus, the use of smartwatches is a suitable alternative to the typical placement of phones in hand for CPR training.
1 Introduction
Sudden cardiac arrest (SCA) is one of the most prominent diseases (350,000700,000 individuals a year in Europe are affected [1,2,3]). SCA can significantly affect the independent living of the victims if medical treatment is not available within a few minutes [4, 5]. In the case of cardiac arrest, the transport of oxygen and glucose to the human body’s cells stops immediately due to the disrupted heart function. This leads to irreparable cell damage if blood circulation is not quickly reestablished, e.g. supported by cardiopulmonary resuscitation (CPR). If the blood circulation is interrupted, the cells of the nervous system, including the brain, reduce their functionality after 10 seconds, which leads, for example, to unconsciousness [6]. The death of the cells begins after about 3 minutes without blood circulation [6].
Medical personnel such as paramedics are trained in Advanced Life Support (ALS) [7] methodology that includes CPR. Unfortunately, paramedics are usually not immediately available if a cardiac arrest occurs in the field. The typical median reaction time of paramedics is about 58 minutes [5] and with every minute the chances of survival of the victims without CPR decrease. Thus, victims rely on the initial CPR support of bystanders within the first socalled golden minutes after cardiac arrest to prevent longterm adverse effects or death. Since these bystanders can offer essential initial resuscitation support, corresponding technical solutions to support them with online feedback regarding the quality of CPR are beneficial.
For the following discussion, the optimal Basic Life Support (BLS) [5] procedure (the methodology aiming for nonspecialists) is worthwhile to be briefly recapitulated (see Fig. 1): In case of a cardiac arrest, it is essential to ensure sufficient oxygenation of the nerve cells via correctly conducted cardiac massages (chest compressions) as the most critical countermeasure. During this cardiac massage, the heart is compressed by orthogonal pressure onto the breastbone. In order to sustain a minimal blood circulation, a chest compression frequency (CCF) of the cardiac massage should range within 100120 compressions per minute (cpm), and a chest compression depth (CCD) of 56 cm is required. With a CCF below 100 cpm, blood circulation is insufficient to fullfill the essential tissue oxigenation, while with a CCF over 120 cpm the heart complete refillment with blood is not assured, thus resulting in to little amount of blood being circulated in the next compression. Ideally, but not necessarily, the procedure is combined with rescue breathing, to improve the chance of survival and reduce neurological deficits [5].
While typical bystanders can develop a sufficient feeling of semiideal compression depth, the consistent application of the correct compression frequency and depth is challenging, especially for extended periods of cardiac massage with the associated musclefatigue and mental pressure. Thus, instant feedback regarding the correct execution (regarding CCD and CCF) during a cardiac arrest will be beneficial for untrained bystanders. Such feedback could be derived from online monitoring of the quality of the cardiac massage from the vertical acceleration measured by inertial measurement units (IMUs) and giving continuous feedback and adjustment hints. Corresponding smartphone applications are well suited for this purpose due to their high availability [8, 9]. Renshaw et al. have confirmed the general benefit regarding CCF/CCD for the BHF PocketCPR application and recognized an improved performance (from 66 to 91 cpm) and increased confidence of bystanders [10]. However, for such CPR training apps, accurate CPR information (regarding CCF and CCD) is an essential requirement [8], which is achieved partially by the existing implementations (as summarized in Table 1).
Most of these approaches use Fast Fourier Transformation (FFT) to determine the regular frequencies from the inertial data and identify the frequency spectrum’s central frequencies via peak detection. While being straightforward, this approach is susceptible to erroneous peak selection and a resulting frequency shift of the CCFs by orders of magnitudes. Also, the doubleintegration of the acceleration signal – a standard processing step to determine the displacementvector as a preprocessing step for the CCD – is challenging due to the signal drift if the accelerometer is not perfectly aligned with the gravity axis [17]. Consequently, the typical integration process is inherently unstable and leads to relevant errors unless boundary conditions are applied for each compression cycle (e.g. in very short windows) [14].
The motion in cardiopulmonary resuscitation is primarily a rhythmic movement that approximates the natural rhythm of the human heartbeat. Thus, the use of a robust sinusoidal model, i.e., sine curve, might not suffer from disadvantages of the FFT and its subsequent effects on the derived CPR parameters (see Fig. 2), due to its implicit periodic accordance with the CPR. A concept that was shown for depthimage based motion capture of CPR movements [21] but still needs to be confirmed for use with acceleration data recorded directly via IMUs at rescuers.
Furthermore, the discussed algorithms have been mainly evaluated for the use of IMUs in a graspinhand use (i.e., the sensor or smartphone is held between the back of the lower hand and the palm of the upper hand during the procedure). A position that has been reported to be a slightly uncomfortable and disturbing positioning for bystanders [18], which as well might mislead them into learning incorrect postures [19]. To overcome this drawback, Park et al. [18] proposed the fixation of smartphones via an armband on the dorsum manus or at the arm and had shown an increased convenience compared to the common graspinhand approach. However, they reported a reduced sensitivity, which they explained with the amplified inertial forces resulting from the additional device’s swing. Similarly, Ruiz de Gauna et al. [20] compared sensor placement at the dorsum manus with one fixed to the forearm 7 cm above the wrist. They confirmed a significantly increased error for the forearm placement.
Consequently, while IMUs have generally proven to be a precise and practical approach to measuring chest compression depth and frequency during CPR, userfriendliness via smartphones is a challenging task as it affects the quality of CPR for bystanders. Smartwatches hold benefits over the use of smartphones regarding usability. They could be expected to achieve higher reliability towards armmovements because they are potentially less affected by hand movements and rigidly attached to the wrist. Furthermore, they overcome challenging aspects of reduced tactile pressure sensation at the hands. However, the use of IMUs on alternative placements was repetitively found challenging for sufficient accuracy. The suitability of smartwatches for CPR training and onlinesupport regarding the sensitivity of CCD and CCF detection has yet to be investigated.
Our approach is the combination of a wristworn IMU with a sinusoidal model. To fit the accelerometer data to the sine curve of the model, an appropriate optimization algorithm is required. Evolutionary methods have already been found to be principally suitable for a similar approach: Lins et al. [21] use a Differential Evolution (DE) algorithm to fit optical motion capture data to a sinusoidal model. In this context DE is used for continuous windowbased curve fitting of the model by optimizing the parameters of a sine function. The article at hand proposes a Evolution Strategy (ES) inspired algorithm for the continuous modelfitting (i.e., without complete reinitialization of the population) with IMU data.
Natureinspired algorithms such as a Genetic Algorithm (GA) have also already proven useful in signal processing [22,23,24]. In addition, there is already some work that has used GAs for curve fitting, e.g. Zhao et al. use a GA to fit the parameters of a Bezier curve [25]. GAs have also been used to fit polynomials [26]. In the recent work of Jiang et al. a modified GA is used to optimize the parameters of sine signals [27, 28]. Consequently, in this study, we aim to investigate the following two research questions:

1.
How suitable are wristworn inertial sensors (e.g. smartwatches) for the online detection of the chest compression during CPR regarding the accuracy of resulting CCF and CCD parameters compared to both the Resusci Anne training mannequin and the typical handholding as the gold standard?

2.
How suitable is the algorithmic approach for fitting a sinusoidal model of the chest compression during CPR regarding the accuracy of resulting CCF and CCD parameters for the considered sensor placements compared to the Resusci Anne training mannequin as reference system?
In Section 2, our system approach, details of the used algorithm, study design, and applied evaluation methodology is introduced. In Section 3, the results of the study are presented and discussed in Section 4. The article is concluded in Section 5.
2 Materials and Methods
2.1 System Approach
In the proposed system (Fig. 3), the curve of chest compressions during CPR is analyzed from data of a wristworn (and handheld as reference) threedimensional inertial sensor containing accelerometer, gyroscope, and magnetometer (9DOF). The accelerometer signal contains earth gravity as a constant component distributed among all three accelerometer axes, depending on the sensor orientation. For fitting the model function, only the acceleration caused by the orthogonal pressure on the patient’s chest is relevant. Unfortunately, when placed on the wrist, the orientation of the sensor is never entirely orthogonal to the chest. So the earth’s gravity is distributed over all three axes with different magnitudes. The approach to handle this is to consider only the total acceleration a, i.e. the Euclidean distance over all axes and subtract the constant gravity (\(9.81 \frac{m}{s^2}\)) from the total acceleration, which is onedimensional (see Equation 1).
This onedimensional timeseries data are windowbased (window length \(S_{len}\)) fitted to a sinusoidal function model. The fitting generates adapted models per \({f_U}^{1}\) seconds, from which the CPR parameters frequency (CCF) and compression depth (CCD) can be derived (recap Fig. 3).
2.2 Model function
The approach is to fit the time series of the accelerometer readings to a sinusoidal function. This is possible because of the periodic nature of CPR (see Fig. 4). The sought CPR quality parameters can then be derived directly from the parameters of the sinusoidal function. The generic parameterized sine function can be written as follows:
Parameter A and \(\omega\) are of primary interest: A is the amplitude, \(\omega\) the angular frequency (D is the vertical displacement, \(\rho\) the phase shift). \(A, \omega , \rho\) are adapted so that the sine curve fits the accelerometer data. Assuming that the arms of a person performing CPR are orthogonal (and rigid) on the patient’s chest, the relative movements of the bystanders’ arms are equal to the chest compression depth. It is also assumed that the chest is wholly relieved after each compression (full chest recoil as recommended by ALS/BLS guidelines). Additionally, the frequency of low to high to low compression depth represents one compression cycle. Since it is not applicable to fit the accelerometer data (total acceleration) directly to the sine curve (see Equation 2) and derive the displacement of the arm from it, the accelerometer data must be integrated twice to determine the vertical displacement (\(\int \int\) acceleration \(\rightarrow \int\) velocity \(\rightarrow\) displacement). However, the double integration of the acceleration values induces errors since the accelerometer can not be assumed to be perfectly calibrated, so this is rarely a practical way. To avoid this integration errors, we use the second derivative of the sine function as a model function. Thus, the analytical solution of the double integration is already known (\(\hat{f}\), see Equation 2):
On a fitted function, parameter \(\omega\) is the CPR frequency (CCF), and \(2\cdot A\) is the compression depth (CCD). To fit the function \(f\left( t\right)\), we minimize the root mean squared error (RMSE). Thus, we formulate the minimization problem (loss function L) as follows:
In Equation 5, a is the Tdimensional tuple of accelerometer measurements (total acceleration or vertical acceleration), \(\left a\right\) is the dimension of the tuple a, i.e., its number of elements. T is derived from the window length \(S_{len}\) (e.g., \(S_{len}=3s\) with 100 Hz \(\rightarrow T = 300\)), which has been optimized in [blinded citation].
2.3 Evolutionary fitting of the model function
Lins et al. [21] use the Differential Evolution (DE) algorithm with a comparatively large population of candidate solutions that are evaluated in each generation. Populationbased algorithms such as DE can use the diversity of their population to optimize several local minima (in case of a minimization problem) in parallel over generations. In the case of the sine model, there are not several different local minima (only periodic ones), so only \(\lambda\) individuals of the population are mutated and recombined per generation G. This reduces the computational effort per generation. The approach of working with only a few candidate solutions is thus better suited for use on an embedded device that operates under more difficult constraints in terms of performance and energy consumption.
In order to estimate the three variables \(\omega , A, \rho\) of the sine function f (Equation 4), herein a Evolution Strategy inspired algorithm is applied (see Algorithm 1). The algorithm uses also elements from GA, e.g. it is populationbased and optimizes the population throughout several generations (\(\mu +\lambda\))EvolutionStrategy based on [29] but with a GAlike population). The populationelement of the algorithm is used as archive for possible good solutions.
The optimization is done between a transition from one generation G to the next generation \(G+1\). Within each transition from one generation to the next, the algorithm comprise the steps mutation, crossover, and selection, which are discussed in the next sections. Algorithm 1 is continuously applied on \(S_{len}\) long data windows while retaining fractions of the population until \(G = G_{max}\) or the convergence of G is smaller than \(c_{min}\).
2.3.1 Initialization of the parameter space
Be \(x_{i,G}\) a 3dimensional vector (containing sought parameter \(A, \omega , \rho\)) of individual i for generation G:
In every generation G \(\lambda =1+1+3=5\) individuals are newly generated (\(\hat{x}_{\mu +1}\) to \(\hat{x}_{\mu +\lambda }\)). Every of the \(\mu\) individuals represents a possible solution to the minimization problem (see Equation 5).
At the first start, the population is initialized by drawing parameters from an uniform random distribution (exploration). In the optimization process, individual solutions will move closer and closer to the optimum, and the variance within the population will decrease (exploitation). Every new individual of the population is also initialized taking random variables from a uniform random distribution to foster the exploitation of the parameter space. For the specific task of fitting a sinusoidal function, the interval of the random distribution can be restricted to the problem’s bounds. Table 2 summarizes the parameter space over all dimensions for the given task of fitting the CPR sinusoidal model.
2.3.2 Mutation
In the applied approach, mutation occurs in two ways. The first child \(\hat{x}_{\mu +1}\) is simply a newly generated random individual. This ensures that the algorithm can still exploit the parameter space. Then, in each generation G, the currently best individual \(x_0\) is mutated minimally and forms the second child \(\hat{x}_{\mu +2}\) of the current generation. This mutation is a finetuning element to optimize the current solution. The following \(\lambda 2\) offspring are created as follows (with constant \(M = 0.999\)), where \(\mathcal {U}\) generates a random value from a uniform random distribution within the interval:
k is the index of the 3dimensional solution vector (see Table 2).
2.3.3 Crossover
The crossover step is used to transfer information, i.e., possible solutions, from the current generation to the next generation and to recombine it. In the approach chosen here, three (\(\lambda  2\)) offspring per generation are generated from two randomly selected parent individuals.
This crossover method corresponds to the blended crossover (or BLX\(\alpha\) or heuristic crossover) with \(\alpha = 0\) [30, 31].
2.3.4 Selection
The selection step determines which individuals are passed to the next generation by evaluating them against the cost function. Herein, the RMSEs are summed up for every solution candidate \(x_{i,G}\) as cost function:
with a being a Tdimensional tuple S of samples (accelerometer data) and \(f_{x_{i,G}}\) the parameterized sinusoidal function of individual \(x_{i,G}\). After the steps mutation and crossover \(\mu +\lambda\) individuals exist. The population is therefore reduced to the \(\mu\) fittest individuals after the evaluation of the population. Once the optimization has finished, i.e. when \(G_{max}\) or \(c_{min}\) has been reached, the individual with the lowest RMSE represent the parameter of the sinusoidal model (\(x_0\)). From these parameters, the CCF and CCD can be obtained with \(CCF=\frac{\omega }{2 \pi } \cdot 60\) cpm and \(CCD=2A\) cm.
2.4 Reconsideration of the population
Herein, the algorithm is initially only executed for a small window of 3 seconds (\(S_{len} = 3\)) of IMU data. Once a subsequent datawindow is available (next 3s with 2s overlap \(\rightarrow f_U = 1s^{1}\)), the algorithm is executed for a new fitting run. In a previous approach [21], the evolutionary optimization was performed with a completely new population. Possible solutions that are very similar to the current solutions must always be found and optimized anew. In contrast, herein a part of the population is retained and only one fraction \(\epsilon\) is completely reinitialized. On the one hand, a large diversity of the initial population can be ensured. On the other hand, good solutions from the past are retained in the expectation that they will also fit the current data window with a few adjustments. Fraction \(\epsilon\) is being optimized in the hyperparameter optimization step (see Section 1).
Initially, the favorable hyperparameters of the algorithm (\(\mu , G_{max}, \epsilon , c_{min}\)) are determined based on simulated data of sinusoidal curves (see Section 1). With these specific hyperparameters, the algorithm is then evaluated within a study with human participants.
Based on the results of Monte Carlo simulations, we select \(\mu = 400\), \(G_{max} = 10\), \(\epsilon = 0.5\), \(c_{min} = 0.05\) as suitable hyperparameters for further evaluation with human participants.
2.5 Experimental setup
The Laerdal Resusci Anne Simulator mannequin^{Footnote 1} was used as a reference system and was placed on the floor (see Fig. 5). Within the Resusci Anne simulator, sensors measure the depth of thorax compression and decompression, the frequency of the compressions, and the volume of ventilation.
While conducting CPR trainings on the Recusci Anne, the participants have been equipped with two IMU sensors (see Fig. 6) to evaluate the relevance of their placement. One IMU sensor was placed at the left wrist of the participant with a bracelet, and the other one was placed between the hands of the participant (between the back of the hand of the first hand and the palm of the second hand). Otherwise, no specific arm or upper body posture was explicitly required. The sensors and the training mannequin were collecting data that was synchronized manually after the recording via visual inspection of the accelerometer signal. The Resusci Anne recording starts and stops automatically with the first and last chest compressions. The rising and falling edges of the accelerometer signal are clearly visible on a plot and were synchronized with the start of the chest compressions.
A sensor system (humotion^{Footnote 2} sensor belt) was chosen and modified for the intended use, which allows the raw sensor data to be recorded unfiltered and in a wide variety of formats. This 9DOF IMU sensor system consists of a triaxial accelerometer with sensitivity ranges from 1G up to 16G (Bosch BMA180, Bosch Sensortec GmbH, Reutlingen, Germany), gyroscope (STMicroelectronics L3GD20H, STMicroelectronics, Geneva, Switzerland), and a magnetometer. A sampling rate of 100 Hz was selected, which is considered a typical sampling rate on smartwatches and also represents a reasonable compromise between computing effort and precision.
The participants were asked to place themselves on any side of the training mannequin and perform the CPR within 80140 cpm. The study director monitored the correct implementation of the CPR and, where necessary, corrected with verbal advice. The recording lasted for two minutes.
2.6 Statistical analysis
For every compression cycle recognized by the reference system, a 3second window S (\(S_{Len} = 3s\)) of the sensor data is used to fit the sinus model every second (\(f_U = 1s^{1}\)) as recommended by [21]. Here, it is \(S_{len} > f^{1}_{U}\), so the used datasets S are interleaved (see Fig. 7).
Also, one Resusci Anne event E (a complete compression/decompression cycle) may be smaller, equal, or larger than \(f^{1}_{U}\) so that we must combine one or more model predictions before comparing it with E (Equation 13). Thereby, the weighted mean of n subsequent model predictions within each interval \((E_{Start}, E_{End})\) is calculated with the overlap ratio \(\sigma\) representing the weight:
For each compression event E, a corresponding prediction p is determined according to Equation 13.
The measurementerror is calculated as the absolute difference between predicted CCF/CCD and the CCF/CCD of the reference system for every CCF/CCD prediction over every participant.
For comparison with the predictions of the sine models, onedimensional 1000point Discrete Fourier Transformations (DFT) were calculated for the identical windows using the FFT algorithm.
3 Results
The study cohort consisted of 18 participants, aged 1948, 12 male, 6 female. The participants were recruited amongst students and staff of the University of Oldenburg, Germany. The study received ethics approval number “Drs.EK/2018/31” of the IRB of the University of Oldenburg.
Table 3 contains the overall results of the comparison between model predictions and reference data. The results show the least error (\(\pm 2.22\) cpm) for CCF prediction for the sinusoidal model based on the sensor data from the wristworn sensor. The alternative method FFT shows a much higher error with \(\pm 7.42\) cpm. When predicting the compression depth CCD, the wrist sensor’s data with \(\pm 0.69\) cm show an slightly higher error as the handheld sensor, which median error is \(\pm 0.64\) cm.
The statistical significance of the differences between the sensor positioning at hand versus at wrist was tested with the Wilcoxon Rank Sum Test (onesided). The differences in absolute errors between wrist and hand (\(H_1\): wrist position produces lower error) are not significant for CCD prediction (\(p = 0.999\)), whereas the differences for CCF prediction are significant (\(p = 0.001\)).
Figure 8 shows the error distribution of the CCF prediction of the sine model versus FFT considering the two sensor positions. The sine models’ errors are predominantly in the area of [0, 5] cpm showing little outliers. The error distribution for the FFT variants is mainly in the area of about [0, 15] showing more outlier sets between [25, 50] cpm.
Figure 9 shows the error distribution of the CCD prediction of the sine models for the two considered sensor positions. The distribution of the model based on the handheld sensor is centered around 0.5 cm with no notable outlier groups (some outliers up to 4 cm). The wristworn sensor’s distribution is also centered around 0.5 cm, also with no notable outlier groups but some outliers up to 5 cm.
In Figs. 10 and 11 – unique forms of point diagrams (BlandAltman plots) – the differences between the predictions of the sinusoidal models and the measurement of the reference system are plotted against the mean value of the two methods. For the compression frequency (Fig. 10) the error is within one standard deviation in most cases. A closer look reveals a linear relationship between increasing error and measured frequency (diagonal arrangement of data points). In case of the compression depth (Fig. 11) most measurements and predictions are between 46.5 cm and within two standard deviations and few outliers.
4 Discussion
In this study, two research questions have been investigated. To clarify the suitability of smartwatchlike inertial sensors for the detection of the chest compression frequency (CCF) and depth (CCD) during CPR in comparison to the typical handheld smartphone sensor, both sensor positions were evaluated with the Resusci Anne training mannequin as reference system.
With an error of \(\pm 2.22\) cpm, the CCF accuracy of the wrist sensor was slightly more accurate compared to an error of \(\pm 2.38\) cpm for the common graspinhand use. Both errors remain in the same order of magnitude, confirming the algorithm’s robustness and the general suitability of the sinusoidal modelbased approach. Consequently, we could confirm the suitability of the smartwatchrelated wrist positioning for CCF calculation.
Considering the CCD, we found a slightly higher error (0.69 cm) for the wrist sensor when compared to the graspinhand use (0.64 cm). Nevertheless, even with the relatively high error of the wrist sensor, a fundamental qualitative statement can be made about the compression depth, since relevant deviations from the optimal compression depth of 56 cm (e.g., too low compression depths of 3 cm) might be still detectable. However, it should be noted that the CCD prediction errors are probably too high for quantitative statements.
Concerning the second research question, the applicability of the evolutionary approach for curvefitting of the chest compression during CPR was examined, especially regarding the accuracy of resulting CCF and CCD parameters for the considered two sensor placements in comparison to the Resusci Anne as a reference system. The predictions of the sinusoidal model were compared to the FFT method and achieved significantly low error values both for sensor position hand (Sine Model: \(\pm 2.38\) cpm, FFT: \(\pm 8.05\) cpm) and sensor position wrist (Sine Model: \(\pm 2.22\) cpm, FFT: \(\pm 7.42\) cpm).
With an error of \(\pm 2.22\) cpm in predicting the CCF, it is higher than the range given in the literature. Even though Ruiz de Gauna et al. [14] reported a lower median error of 0.9 cpm for their approach, differences among both studies could as well be affected by variations among reference system (photoelectric sensor) and IMU sensor (ADXL330, Analog Devices, USA). It thereby might not only be related to the algorithmic specifics. In any case, the error of 2.22 cpm is far below the critical target range of 100120 cpm and thereby does not affect the practical applicability of the algorithm.
In comparison to the related approaches, the proposed system achieves a comparable CCF accuracy within the ERC guideline requirements of \(\pm 10\) cpm [5]. However, we found a high intersubject variability of the sensitivity to measure the CCD. In contrast to the CCD prediction results here, Lu et al. [32] used the accelerometer data to fit a polynomial model to predict the CCD with high accuracy (about \(0.03\pm 0.5\) cm within 95%CI). GonzálezOtero et al. [33] report an CCD prediction error below 0.35 cm in 95% of 2swindows of accelerometer data using the peaktopeak value of the reconstructed compression signal.
Consequently, wristworn devices can accurately predict the CCF, while CCD measure can be expected to hold an error of up to 0.69 cm. Although CCD prediction still shows potential for improvement (e.g. with modified model function), the results are sufficient for practical applications in smartwatches to make qualitative statements about the quality of the CPR. Smartwatches are therefor a well suited, unobtrusive, and high available alternative platform for giving CPR feedback for bystanders in emergencies.
While the proposed CPR modeling via a sinusoidal model is intended for an online system, it was tested as an offline system for evaluation purposes. Due to its iterative nature, the sine model fitting can probably be used well on (mobile) embedded devices. In contrast, the populationbased optimization of the evolutionary algorithm is well suited for parallelization on multicore systems, which become defactostandard in current mobile devices. As the algorithm can be dynamically adapted to varying processing power conditions, e.g. by adjusting hyperparameters such as number of generations and individuals the given approach is well suited for use in smartwatch application where even with cheaper hardware good results can be achieved, albeit not with the highest precision. The convergence ensures that each offspring generation is at least as good as the previous one, and even in limited generations, models can be expected to be finetuned to the physiological characteristics of the users and the sensor environment.
A more complex sine function, such as a linear combination of several sine terms, may be also an appropriate model function. For the usage scenario here, namely to determine the frequency and compression depth of the CPR in a straightforward way, a more complex function would be a hindrance, even though it might fit better to the data. Therefore a comparatively simple sine function was chosen here.
5 Conclusion
The article introduces and evaluates an approach to predict frequency and depth parameters of CPR training via accelerometer data of a wristworn IMU in comparison to a handheld IMU. The sinusoidal models for estimating the compression frequency and depth were dynamically adapted using a Evolution Strategy inspired evolutionary algorithm. The approach was evaluated with 18 human participants for both handheld and wristworn sensor positions. The chest compression frequency (CCF) was predicted with a median error of \(\pm 2.22\) cpm and the compression depth (CCD) with a median error of \(\pm 0.69\) cm for the wrist sensor position. The CCF prediction is considered suitable for practical applications whereas the CCD requires refinement of the approach. Thus, our work represents an essential step towards complete and precise modeling of the CPR using mobile sensors as can be found in smartwatches. While focusing on the algorithmic aspects of the detection of the CPR parameters, the general feasibility of smartwatches for CPR feedback (e.g. via a fullfeatured smartwatch application) has to be investigated further. The next steps are the development of a corresponding smartwatch application with a refined CCD prediction model, its evaluation, and subsequent usability studies to show that the application is of value in CPR training and emergency scenarios.
Notes
Details on the Laerdal Resusci Anne Simulator mannequin can be found at https://laerdal.com/en/products/simulationtraining/emergencycaretrauma/resusciannesimulator/
References
Berdowski J, Berg RA, Tijssen JGP, Koster RW. Global incidences of outofhospital cardiac arrest and survival rates: Systematic review of 67 prospective studies. Resuscitation. 2010. https://doi.org/10.1016/j.resuscitation.2010.08.006.
Gräsner JT, Bossaert L. Epidemiology and management of cardiac arrest: What registries are revealing. Best Practice & Research Clinical Anaesthesiology. 2013. https://doi.org/10.1016/j.bpa.2013.07.008.
Gräsner JT, Herlitz J, Koster RW, RosellOrtiz F, Stamatakis L, Bossaert L. Quality management in resuscitation  Towards a European Cardiac Arrest Registry (EuReCa). Resuscitation. 2011. https://doi.org/10.1016/j.resuscitation.2011.02.047.
De Maio VJ, Stiell IG, Wells GA, Spaite DW. Optimal defibrillation response intervals for maximum outofhospital cardiac arrest survival rates. Ann Emerg Med. 2003;42(2):242–50. https://doi.org/10.1067/mem.2003.266.
Perkins GD, Handley AJ, Koster RW, Castrén M, Smyth MA, Olasveengen T, Monsieurs KG, Raffay V, Gräsner JT, Wenzel V, Ristagno G, Soar J, Bossaert LL, Caballero A, Cassan P. Granja C, Sandroni C, Zideman DA, Nolan JP, Maconochie I, Greif R. European Resuscitation Council Guidelines for Resuscitation 2015. Section 2. Adult basic life support and automated external defibrillation. Resuscitation 2015:95;81–99. https://doi.org/10.1016/j.resuscitation.2015.07.015.
Schmidt RF, Lang F, Heckmann F. Physiologie des Menschen. Springer. 2011. http://www.springer.com/us/book/9783642016509.
Soar J, Nolan JP, Böttiger BW, Perkins GD, Lott C, Carli P, Pellis T, Sandroni C, Skrifvars MB, Smith GB, Sunde K, Deakin CD, Koster RW, Monsieurs KG, Nikolaou NI. European Resuscitation Council Guidelines for Resuscitation 2015. Section 3. Adult advanced life support. Resuscitation 2015;95:100–147. https://doi.org/10.1016/j.resuscitation.2015.07.016.
Ahn C, Cho Y, Oh J, Song Y, Lim TH, Kang H, Lee J. Evaluation of Smartphone Applications for Cardiopulmonary Resuscitation Training in South Korea. Biomed Res Int. 2016. https://doi.org/10.1155/2016/6418710.
Kalz M, Lenssen N, Felzen M, Rossaint R, Tabuenca B, Specht M, Skorning M. Smartphone apps for cardiopulmonary resuscitation training and real incident support: A mixedmethods evaluation study. J Med Internet Res. 2014. https://doi.org/10.2196/jmir.2951.
Renshaw J, Eaton G, Gregory P, Kilner T. The BHF PocketCPR smartphone application: Staying alive’ with bystander CPR. Resuscitation. 2017;118:e3–e4. https://doi.org/10.1016/j.resuscitation.2017.08.232.
GonzálezOtero DM, Ruiz J, Ruiz De Gauna S, Irusta U, Ayala U, Alonso E. A New Method for Feedback on the Quality of Chest Compressions during Cardiopulmonary Resuscitation. BioMed Research International. 2014. https://doi.org/10.1155/2014/865967.
Aase SO, Myklebust H. Compression depth estimation for CPR quality assessment using DSP on accelerometer signals. IEEE Trans Biomed Eng. 2002. https://doi.org/10.1109/10.983461.
Song Y, Oh J, Chee Y. A New Chest Compression Depth Feedback Algorithm for HighQuality CPR Based on Smartphone. Telemedicine and eHealth 2015;21(1):36–41. http://online.liebertpub.com/doi/abs/10.1089/tmj.2014.0051.
Ruiz de Gauna S, GonzálezOtero DM, Ruiz J, Russell JK. Feedback on the rate and depth of chest compressions during cardiopulmonary resuscitation using only accelerometers. PLoS ONE 2016:11(3);1–17. http://dx.doi.org/10.1371/journal.pone.0150139.
Peperzaken: SamCPR (2019). URL https://www.peperzaken.nl/samcprsavingliveswithyoursmartwatch/.
Gruenerbl A, Pirkl G, Monger E, Gobbi M, Lukowicz P. SmartWatch life saver: SmartWatch interactivefeedback system for improving bystander CPR. ISWC 2015  Proceedings of the 2015 ACM International Symposium on Wearable Computers (September), 2015:19–26. https://doi.org/10.1145/2802083.2802086.
Ladetto Q. On foot navigation: continuous step calibration using both complementary recursive prediction and adaptive kalman filtering. In: Proceedings of ION GPS, vol. 2000;1735–1740.
Park J, Lim T, Lee Y, Kim W, Cho Y, Kang H. Assessment of chest compression depth obtained using the PocketCPR as an educational tool according to smartphone attachment site. Am J Emerg Med. 2016;34(11):2243–6. https://doi.org/10.1016/j.ajem.2016.08.066.
Park J, Kang H. The authors’ respond the letter: The use of the PocketCPR® application in basic life support training. Am J Emergency Med. 2017;35(1):190. http://www.sciencedirect.com/science/article/pii/S0735675716308051.
Ruiz de Gauna S, GonzálezOtero DM, Ruiz J, Chicote B, Ruiz J, Russell JK. Estimation of the chest compression depth using an accelerometer positioned on the rescuer’s back of the hand or forearm. Resuscitation 2015;96:16. https://doi.org/10.1016/j.resuscitation.2015.09.036.
Lins C, Eckhoff D, Klausen A, Hellmers S, Hein A, Fudickar S. Cardiopulmonary resuscitation quality parameters from motion capture data using differential evolution fitting of sinusoids. Appl Soft Comp. 2019. https://doi.org/10.1016/j.asoc.2019.03.023
Aggarwal A, Rawat TK, Kumar M, Upadhyay DK. Optimal design of FIR high pass filter based on L1 error approximation using real coded genetic algorithm. Eng Sci Tech, an International J. 2015;18(4), 594–602. http://dx.doi.org/10.1016/j.jestch.2015.04.004.
Kumar M, Rawat TK. Optimal design of FIR fractional order differentiator using cuckoo search algorithm. Exp Sys Appl. 2015;42(7):3433–3449. http://www.sciencedirect.com/science/article/pii/S0957417414007982.
Upadhyay K, Kumar M, Rawat TK. Optimal design of Weighted Least Square based fractional delay FIR filter using Genetic Algorithm. 2014 International Conference on Signal Propagation and Computer Technology, ICSPCT 2014 (I), 2014;53–58. https://doi.org/10.1109/ICSPCT.2014.6884908.
Zhao L, Jiang J, Song C, Bao L, Gao J. Parameter optimization for bezier curve fitting based on genetic algorithm. In: Tan Y, Shi Y, Mo H, editors. Advances in Swarm Intelligence. Berlin Heidelberg, Berlin, Heidelberg: Springer; 2013. p. 451–8.
Clegg J, Dawson JF, Porter SJ, Barley MH. The use of a genetic algorithm to optimize the functional form of a multidimensional polynomial fit to experimental data. 2005 IEEE Congress on Evolutionary Computation, IEEE CEC 2005. Proceedings 2005;(1):928–934. https://doi.org/10.1109/cec.2005.1554782.
Jiang C, Chen Y, Cho C. A Novel Genetic Algorithm for Parameter Estimation of Sinusoidal Signals. Proceedings  2019 12th International Congress on Image and Signal Processing, BioMedical Engineering and Informatics, CISPBMEI 2019. 2019;0–4. https://doi.org/10.1109/CISPBMEI48845.2019.8966081.
Jiang C, Serrao P, Liu M, Cho C. An enhanced genetic algorithm for parameter estimation of sinusoidal signals. Applied Sciences (Switzerland). 2020;10(15):26–9. https://doi.org/10.3390/app10155110.
Simon D. Evolutionary Optimization Algorithms. Wiley. 2013.
Herrera F, Lozano M, Verdegay JL. Tackling realcoded genetic algorithms: Operators and tools for behavioural analysis. Artif Intell Rev. 1998;12(4):265–319.
Houck CR, Kay MG. A genetic algorithm for function optimization: A matlab implementation.
Lu TC, Chen Y, Ho TW, Chang YT, Lee YT, Wang YS, Chen YP, Fu CM, Chiang WC, Ma MHM, Fang CC, Lai F, Turner AM. A novel depth estimation algorithm of chest compression for feedback of highquality cardiopulmonary resuscitation based on a smartwatch. Journal of Biomedical Informatics 2018;87:60–65. https://doi.org/10.1016/j.jbi.2018.09.014.
GonzalezOtero DM, Ruiz JM, Ruiz de Gauna S, Gutierrez JJ, Daya M, Russell JK, Azcarate I, Leturiondo M. Monitoring chest compression quality during cardiopulmonary resuscitation: Proofofconcept of a single accelerometerbased feedback algorithm. PLOS ONE 2018;13(2):1–15. https://doi.org/10.1371/journal.pone.0192810.
Funding
Open Access funding enabled and organized by Projekt DEAL.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Ethics statement
The study received ethics approval number “Drs.EK/2018/31” of the IRB of the University of Oldenburg.
Conflict of interest
The authors declare that they have no conflict of interest.
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Evaluation with simulated data
Evaluation with simulated data
For the simulationbased optimization, periodic acceleration data for ten random frequencies were generated within the interval [1, 3] Hz (60180 cpm). For each frequency, a threesecond sample was generated using the model function (see Equation 4) and normaldistributed Gaussian noise was applied. The amplitude of the function was randomly selected from [0.01, 0.05] m. This one test round with ten random frequencies was considered as one individual for a meta evolution using the Differential Evolution (DE) algorithm (Python/scipy implementation).
A cost function was chosen that considers the number of individuals and the maximum number of generations (less is better):
with M being the number of model predictions and F and D the random frequency and depth values. The DE algorithm was optimizing with a population size of 100 and 100 iterations.
Simulation Data Results
The metaoptimization of the hyper parameters using the DE algorithm produced the near optimal values shown in Table 4. Since the results of heuristic algorithms are subject to random fluctuations, the metaoptimization was performed 100 times in total and the deviations were noted. Table 4 gives mean and median deviations of the optimizations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Lins, C., Friedrich, B., Hein, A. et al. An evolutionary approach to continuously estimate CPR quality parameters from a wristworn inertial sensor. Health Technol. 12, 161–173 (2022). https://doi.org/10.1007/s12553021006187
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s12553021006187
Keywords
 Cardiopulmonary Resuscitation
 Sinusoidal Model
 Evolutionary Algorithm
 Evolution Strategy
 Inertial Measurement Unit
 Smartwatch
 Parameter Estimation