A sliding-window based algorithm to determine the presence of chest compressions from acceleration data

This publication presents in detail five exemplary cases and the algorithm used in the article (Orlob et al. 2022). Defibrillator records for the five exemplary cases were obtained from the German Resuscitation Registry. They consist of accelerometry, electrocardiogram and capnography time series as well as defibrillation times, energies and impedance when recorded. For these cases, experienced physicians annotated time points of cardiac arrest and return of spontaneous circulation or termination of resuscitation attempts, as well as the beginning and ending of every single chest compression period in consensus, as described in Orlob et al. (2022). Furthermore, an algorithm was developed which reliably detects chest compression periods automatically without the time-consuming process of manual annotation. This algorithm allows for an usage in automatic resuscitation quality assessment, machine learning approaches, and handling of big amounts of data (Orlob et al. 2022).


a b s t r a c t
This publication presents in detail five exemplary cases and the algorithm used in the article (Orlob et al. 2022). Defibrillator records for the five exemplary cases were obtained from the German Resuscitation Registry. They consist of accelerometry, electrocardiogram and capnography time series as well as defibrillation times, energies and impedance when recorded. For these cases, experienced physicians annotated time points of cardiac arrest and return of spontaneous circulation or termination of resuscitation attempts, as well as the beginning and ending of every single chest compression period in consensus, as described in Orlob et al. (2022). Furthermore, an algorithm was developed which reliably detects chest compression periods automatically without the time-consuming process of manual annotation. This algorithm allows for an usage in automatic resuscitation quality assessment, machine learning approaches, and handling of big amounts of data (Orlob et al. 2022

Value of the Data
• These data are useful since they contain multichannel continuous defibrillator recordings as well as consensual annotations from experienced physicians, which allow a full description and characterization of a CPR case. Furthermore, a highly reliable algorithm to determine the presence of chest compressions directly from accelerometer data without any manual annotations is provided. • Researchers working on cardiac arrest treatment and its quality metrics benefit from this new method to detect chest compression periods automatically, since the highly time-consuming, manual annotation of single chest compressions can be avoided [4] . Thus, the new method allows for widespread usage including post-event debriefing, CPR-metric-calculations in large registries [5] , and machine learning approaches. • The present data and the presented algorithm can be used for further research in this field, providing a reliable automatic determination of the presence of chest compressions. Beside from easily computing CPR-metrics, a reliable, automatic chest compression period detection is a basic, but crucial tool for future research in this field using machine learning algorithms and big amounts of data.
• The present data and the presented algorithm allow the computation of standardized CPR quality metrics [6] like Chest Compression Fraction (CCF) with much less effort compared to conventional workflows that rely on manual annotation of single chest compressions, thereby allowing for a widespread usage of these measures to assess CPR quality. • This algorithm facilitates the computation of CCF in clinical quality management of emergency response systems as well as in clinical research as quality monitoring tool, providing feedback to emergency medical services to improve their performance in CPR. • Even though this algorithm was developed only for acceleration data of one defibrillator manufacturer, we expect the general principle to be applicable to other manufacturers and to thoracic impedance as well. Its open source nature and its generic structure allows for an incorporation into general CPR analysis frameworks [7] .

Data Description
The data consists of two different data types. Five exemplary recordings from the German Resuscitation Registry are provided in https://doi.org/10.5281/zenodo.5497699 in the subfolder cc-periods_cases . Each case is saved in its own directory which contains several csv-files.
The recording of each case consists of time series of acceleration measurement, electrocardiogram from the shock electrodes and capnography. Detailed information about these channels can be found in Table 1 . All time data is given in seconds that have elapsed since the defibrillator was switched on.
Additionally, the following side-data is provided: time and energy [ J] of defibrillation shocks, thoracic impedance [ ] while defibrillation shocks, consensual annotations (Arrest and Return of spontaneous circulation (ROSC) / CPR-termination timepoints, Start and Stop markers for each chest compression period) by two experienced physicians, Start and stop markers for each chest compression period derived from the new algorithm. Details about the annotations can be found in Table 2 .
The terms "Arrest" and "ROSC/Termination" describe the physiological state of the patient, where performing CPR is compulsory between "Arrest" and "ROSC/Termination". The timepoint annotated with "ROSC/Termination" can either mark an occurring ROSC or the termination of CPR, when the resuscitation attempt fails. Additionally, the algorithm described below allows an automatic computation of the start and stop markers of single chest compression periods for each case. These start and stop markers can be compared to the manual annotations. These markers computed by the algorithm are given in Alg_CC-periods.csv . The algorithm can  be executed directly by running the Jupyter-notebook CC-periods.ipynb , which is also part of the repository mentioned above.

Experimental Design, Materials and Methods
All the raw data was recorded by ZOLL X-Series -(ZOLL Medical Corporation, Chelmsford, Massachusetts, United States) and have been stored in the German Resuscitation Registry. The data have been processed in Python (Python v.3.7.3). For the manual annotations an interactive, web-based plotting tool [2,3] was used by experienced emergency physicians. Each case was annotated by two independent physicians and annotations deviating more than 0.5 s were reset in consensus.
The algorithm computes the start and end times of single chest compression periods directly from the accelerometer data. The process described successively is illustrated in Fig. 1 . First, the acceleration data gets broadly bandpass-filtered with a fourth order Butterworth filter and critical frequencies of 0.2 Hz and 50 Hz, respectively, in order to remove slow baseline changes of the accelerometer and the stationary contributions from gravitation acceleration as well as high frequency noise. Then a centered sliding mean over a 1 s interval of the absolute mean of the acceleration is computed. This quantity is nearly constant and non-vanishing while compressions are present and is approximately vanishing and constant during pauses. The algorithm computes the average mean of the first derivative of this quantity and performs a soft shrinkage step to remove little, non-significant minima and maxima of the first derivative.
Afterwards, the algorithm searches alternately for the absolute largest extremum of one kind (e.g. maximum) between extrema of the other kind (e.g. minima) or conversely. These positions of alternating maxima and minima are the candidates for the start and end times of the chest compression periods (see Fig. 1 ), and with that, define potential chest compression periods with pauses in between.
In a next step, the algorithm filters these candidates by requiring the following three conditions: First, the mean of the absolute acceleration during a pause must be less than 35% of the average of the two means of the absolute acceleration of the chest compression periods before and after. Second, a pause must last for at least 1.6 s. Third, during the corresponding chest compression periods the mean of the absolute acceleration must not be below a certain threshold value. Finally, if two similar large maxima of the absolute derivative are found, in order to further improve the position of marker, the start/stop marker is set in between these maxima by using a weighted mean. The weight is given by a one second long interval of the absolute derivative centered around the maximum. (see Fig. 2 ).