Original Paper
Abstract
Background: Sudden cardiac arrest is a major cause of mortality, necessitating immediate and high-quality cardiopulmonary resuscitation (CPR) for improved survival rates. High-quality CPR is defined by chest compressions at a rate of 100-120 per minute and a depth of 50-60 mm. Monitoring and maintaining these parameters in real time during emergencies remain a challenge.
Objective: This study introduces a neural network model designed to predict and assess CPR quality using accelerometer data from a smartwatch.
Methods: The study involved 83 participants performing CPR on mannequins, with accelerometer data collected via smartwatches worn by the participants. These data were aligned with gold-standard data from the mannequins. The accelerometer-derived compression data were segmented into 5-second intervals for training the neural network models. A total of 1226 neural network models were developed, incorporating variations in hyperparameters and dataset configurations to optimize performance.
Results: The optimal model demonstrated the capability to accurately predict the number of compressions and the average compression depth within a 5-second interval. The model achieved an accuracy of ±3.8 mm for compression depth and an average deviation of 0.8 compressions. The results indicated that the neural network model could accurately assess CPR quality metrics, surpassing other models discussed in the literature. The large and diverse dataset used in this study contributed to the robustness and reliability of the model.
Conclusions: This study validates the efficacy of a neural network model in accurately predicting CPR metrics using smartwatch accelerometer data. The model outperforms previous methods and shows promise for real-time feedback during CPR. Future work involves deploying the model directly on smartwatches for real-time application, potentially improving sudden cardiac arrest survival rates through immediate and accurate feedback on CPR quality.
doi:10.2196/57469
Keywords
Introduction
Sudden cardiac arrest (SCA) is identified as a principal cause of mortality in North America, particularly among young athletes [
- ]. It can affect individuals irrespective of their lifestyle or health status, leading to either irregular or nonexistent heart rhythms [ , ]. As a consequence, the flow of blood to major organs is halted, depriving them of essential oxygen, resulting in tissue damage and potentially culminating in organ failure. The probability of survival decreases by about 10% with each passing minute without intervention; therefore, immediate and effective treatment is crucial to enhance survival rates by minimizing damage to tissues and organs [ , ].Efforts to deliver prompt care to SCA victims continue, with emergency medical services (EMS) prioritizing SCAs to expedite emergency responses [
, ]. Public data indicate that the target for EMS response time to an SCA event is within 8-10 minutes [ , - ]. The initial treatment involves performing cardiopulmonary resuscitation (CPR) and using an automated external defibrillator (AED) to assist in heart pumping and maintain blood flow to the brain and other vital organs. In certain instances, an AED can also restore the heart’s electrical activity [ , ].Organizations such as the American Heart Association (AHA) and the Red Cross play a pivotal role in providing CPR and AED training to the public, empowering bystanders to administer early care to SCA victims until EMS arrives. Studies indicate that bystander-administered CPR significantly improves survival rates compared with scenarios where CPR is not administered [
- ]. The quality of CPR is critical, as high-quality CPR is associated with increased chances of survival. The AHA defines high-quality CPR as having a compression depth of 5-6 cm and a rate of 100-120 compressions per minute, standards that are also supported by the European Resuscitation Council [ , ].Training the general public in CPR administration has emerged as a key objective for numerous organizations aiming to improve survival rates for SCA patients [
, ]. If a significant portion of the populace receives training in CPR, SCA victims stand a higher chance of receiving necessary immediate care until EMS arrive, thereby enhancing their survival prospects. Public training programs instruct participants on identifying SCA victims and initiating high-quality CPR. In these sessions, participants engage in CPR practice on mannequins while trainers offer real-time feedback on their performance, ensuring proficiency [ - ]. With advancements in technology, CPR performance can now be quantified, allowing feedback to be grounded in these measurements. Technologies used in training encompass sensor-equipped mannequins and CPR feedback devices.Mannequins equipped with sensors accurately assess compression depth and frequency, providing trainers with metrics to deliver precise feedback to trainees. Beyond training devices, the industry also offers devices that can be placed on the chest of a mannequin or patient. These devices are equipped with accelerometers and pressure sensors to accurately assess CPR performance and transmit the information to another device for providing real-time feedback. The Laerdal CPRMeter2 is an example of such a device [
].For SCA incidents, emergency call operators use technologies like tele CPR and video CPR to assist individuals in achieving high-quality CPR [
- ]. Upon identifying an SCA situation, EMS is dispatched, and the caller is guided over the phone on performing CPR. Nevertheless, the operator cannot gauge the quality of compressions administered, providing only verbal instructions to help the caller maintain an appropriate pace, which leaves compression depth uncertain. Video CPR, as an advanced approach, transitions communication from audio to video, allowing the operator to observe the CPR performance and offer real-time feedback. This technology requires advancements in emergency response systems to support video calling capabilities and necessitates video capability on the caller’s part. A limitation is its dependency on 2 bystanders—one to execute CPR and another to capture it.Researchers have delved into next-generation CPR feedback technologies, including virtual reality and augmented reality–based devices [
- ]. These devices employ integrated cameras to capture and analyze compression depth and rate, displaying real-time statistics on the device screen to aid users in enhancing their CPR performance [ , ]. However, the widespread adoption of such advanced technologies encounters obstacles: they are not always accessible to those who do use them.Therefore, the challenge lies in identifying a device suitable for real-world emergencies that can precisely measure CPR performance and provide appropriate feedback without the necessity for specialized hardware. The literature identifies smartphones and smartwatches as 2 potential solutions [
- ]. Both types of devices are equipped with sensors capable of evaluating CPR performance. Song et al [ ] introduced a mobile app that leverages accelerometer data from smartphones to assess compression quality and provide feedback via screen displays and audio cues. Nonetheless, this approach faces limitations; it necessitates attaching the smartphone to the user’s arm, lacks details on data cleaning and noise removal, and does not consider variations in device orientation [ ]. Similar challenges are evident in other algorithms designed for mobile CPR apps [ - ], with many focusing solely on training scenarios rather than real emergencies.Gruenerbl et al [
] proposed a smartwatch app capable of measuring CPR parameters and offering visual feedback. This app analyzes accelerometer data to evaluate compression quality, identifying each positive peak on the y-axis as a compression and calculating the differences in y-axis peaks to determine compression depth. However, the study does not provide detailed algorithmic and data-cleaning methodologies for replication and comparison.Lu et al [
] also proposed a smartwatch app alongside an algorithm for evaluating compression metrics. They tested using a Resusci Anne QCPR training manikin (Laerdal) and an android ASUS ZenWatch 2 (model WI501Q; ASUSTeK Computer Inc). The developed polynomial model predicts compression depth and rate from smartwatch accelerometer data. Although data were collected, its limited variability—compression counts between 80-140 and depths of 4-7 cm—fails to cover the wider range expected in real-world scenarios, nor does it elaborate on data cleaning or handling irregularities.Using smartwatch accelerometer data presents several challenges, such as sensor white noise, gravitational effects, hand movements, and shifts in the watch’s position due to a loose fit. Filtering such noise from sensor data remains a significant challenge [
]. Employing noisy datasets can result in substantial variations in output results over time. To tackle noise filtration, we propose a neural network model trained on noisy data to predict compression performance, as detailed in the Methods section.Methods
Overview
This section presents the technology and equipment used during the data collection, cleaning, and processing phases. A total of 83 participants from Thunder Bay Regional Health Sciences Centre (TBRHSC) took part in the data collection by performing CPR in a controlled simulation setting, using an Apple Watch, Apple iPhone, and a Laerdal mannequin for data capture [
, ].Equipment and Hardware
Participants collected accelerometer data with an Apple Watch Series 7 while performing CPR, which was then stored on an Apple iPhone 14. These devices, chosen for their significant presence in the wearable segment, were equipped with specially developed apps for data collection and analysis [
, ]. This study differs from previous ones by focusing on the potential of the Apple ecosystem for health care apps, rather than on Android devices. The apps were designed for compatibility with Apple iPhone 10 and newer, as well as Apple Watch Series 3 and later models.CPR performance practice occurred on the Laerdal SimMan 3G mannequin, which is outfitted with sensors that record and provide feedback on key compression quality metrics such as depth, rate, and recoil. This aids in improving CPR quality [
]. Laerdal mannequins were chosen, as in other studies, for their precise data capture capabilities [ , , ].Data analysis was performed using a laptop with an i7 Intel processor, 32 GB RAM, and a 1TB hard drive, using Microsoft Excel and Python for data cleaning, processing, model training, and evaluation. Final analyses were done on a cloud server (Amazon Web Services) equipped with an NVIDIA A10G GPU (24 GB GPU Memory), 32 GB RAM, and 8 vCPUs [
].Data Collection
A convenience sampling method was used in this study. A notice was sent around the hospital and health care providers including doctors, nurses, respiratory therapists, and paramedics were recruited to participate. Data for this study were collected from 83 individuals over a 3-month period. Staff members from TBRHSC were invited to participate in the research, with their CPR experience ranging from none to more than 30 instances. Initially, participants received a brief orientation on CPR techniques and the benchmarks for high-quality CPR performance.
The simulation laboratory at TBRHSC, equipped with a Laerdal SimMan 3G mannequin capable of measuring compression depth, rate, and recoil, served as the setting for data collection. Upon arriving at the laboratory, participants received an Apple Watch containing the necessary data collection application. The participants were given training on how to perform high-quality CPR. After training, the participants were asked to perform CPR for 2 minutes, during which the data would be recorded. During these 2 minutes, participants were not provided with any feedback on their performance. A limited number of participants (n=41) performed another round of 2 minutes of CPR after taking a short 10-minute break.
When participants were ready to perform CPR after training, they were positioned correctly beside the mannequin, placing their hands on its chest, and initiated CPR compressions upon commencing data collection via the Apple Watch and mannequin. This procedure was carried out for 2 minutes, after which participants were advised to keep their hands in place on the mannequin to mitigate the potential introduction of noise in the data caused by removing their hands. The protocol was approved by TBRHSC and is attached as a
.Subsequently, data from the Apple Watch and the mannequin were exported with a unique anonymous identifier to link the datasets without disclosing the identities of the participants. The process of data collection and the following data transmission is delineated in
. The data were securely transferred daily to the lead author’s workstation. The app on the Apple Watch recorded accelerometer data, including timestamps at a 50 Hz frequency. The mannequin’s data yielded detailed insights into each compression, providing metrics on depth, recoil completeness, start and end times of compression, and the peak time of compression. It is important to note that the mannequin’s time stamps were relative to the onset of the data collection period rather than an absolute start time.
In aggregate, the study compiled 256 minutes of CPR data, which included 27,844 compressions with an average depth of 44 (SD 4) mm. Of the 83 contributing participants, 27 were male, and 56 were female; 48 of these individuals had previously performed CPR on more than 10 occasions.
The sample size was determined by the number of eligible participants available during the data collection period, using a convenience sampling approach. While no formal power analysis was conducted, the sample size of 83 participants was considered sufficient to meet the study’s objectives. Notably, previous studies in similar domains have used smaller sample sizes—Gruenerbl et al [
] included 50 participants, and Lu et al [ ] conducted their study with just 8 participants. In addition, some participants in our study performed CPR twice, resulting in 124 distinct datasets, further enhancing the dataset’s richness and utility for training and evaluation.Data Cleaning and Preparation for Model Training
Overview
This study used data from 2 sources—an Apple Watch app and exported data from a mannequin. Each source’s data were recorded in separate files, but a unique identifier linked them for consistency throughout the data cleaning and preprocessing stages.
illustrates the process of preparing the raw data for model training and the collected sample files.The mannequin’s data, exported as a comprehensive list of compressions during each session, served as the gold standard due to the sensors’ precise compression depth, rate, and recoil measurements. Meanwhile, the Apple Watch provided time-stamped accelerometer data across the x-, y-, and z-axes, formatted as comma-separated values (CSVs). Both datasets included detailed compression information, enabling analysis of 2-minute CPR sessions.

For each session involving a pair of mannequin and smartwatch datasets, a 2-minute duration was recorded. The data were segmented into smaller portions to facilitate prompt feedback, potentially enabling real-time feedback. This segmentation process involved two critical steps: (1) aligning the datasets from the mannequin and the smartwatch to ensure their data corresponded accurately for analysis, detailed in subsection “Data Matching (Process 1)”; and (2) executing the chunking algorithm, detailed in the subsection “Data Chunking (Process 2).”
While real time user feedback was beyond this project’s scope, the data were examined to assess future applicability for this purpose. A 5-second analysis window was selected for potential feedback, where high-quality CPR—defined by approximately 10 compressions within this period—was used as the feedback standard. After receiving feedback, users would need time to comprehend and adjust their technique before the next feedback prompt.
Data Matching (Process 1)
The 2 data sources have different structures: the mannequin (XML file) records a sequence of compression events and their properties, while the smartwatch logs (CSV file) contain time-series accelerometer data. Because of this difference, synchronization cannot be based on time stamps. Instead, the datasets are aligned based on compression events, as the focus is on analyzing compression depth and frequency. The first step is to identify when compressions occurred using the accelerometer data, as explained further in this study. Once these events are detected, they can be matched with the corresponding compression depth and other properties from the XML file.
A chest compression pattern typically indicates a peak in acceleration when the CPR performer compresses the chest, as shown in
. Due to sensor noise and the performer’s hand movement vibrations, various peaks can appear in the data; however, only a few of these should be considered valid compressions. The XML file from the mannequin specifies the number of compressions performed, which serves as the gold standard for creating an algorithm to identify compression peaks in the CSV file.After analyzing the accelerometer data from the compressions, 3 variables were identified to help determine if a peak is a valid compression peak. First, the acceleration difference: the change in acceleration at the compression peak should be significant. Second, the window size is the time frame within which a peak can occur; for example, 2 compressions cannot happen within 5 microseconds. Third, the minimum acceleration peak helps filter out recoil peaks or peaks caused by vibrations or sensor noise. These values may vary from one compression to another, even if performed by the same person, due to factors such as user fatigue, incomplete recoil, changes in compression rate, or varying compression force.
To handle variability, algorithm 1 (
) was designed to match the “peaksFoundInCSV” with the peaks recorded in the XML file. The authors used SciPy’s find_peaks function to detect peaks in the CSV file based on 3 key variables—acceleration difference, window size, and minimum acceleration peak. Since these values varied across files, a script iterated through a range of values—acceleration difference (0.01-2), window size (1-40), and minimum acceleration peak (–1 to 2)—with step sizes of 0.2, 3.9, and 0.3, respectively, until the detected peaks matched those in the XML file. To verify accuracy, random manual checks were performed by generating graphs, similar to , to ensure the peaks were correctly identified and aligned.

Data Chunking (Process 2)
A 5-second interval was chosen as the optimal chunking duration, with the rationale for this selection explained in the previous section. Subsequently, the aligned datasets underwent segmentation into chunks for detailed analysis.
illustrates the segmentation process applied to a representative dataset. Following the alignment of accelerometer data with the mannequin’s compression peaks, the accelerometer readings were divided into 300-point segments (indicated by a green box). Each segmented block (denoted by a green box) was then documented as a single record within the dataset used for training the proposed model, formatted in CSV. These records encompassed acceleration data for a 5-second interval (equivalent to 300 data points at a 60 Hz sampling rate), alongside the average compression depth and the total number of compressions recorded within that timeframe. For instances where the dataset was less than 5 seconds in length, the acceleration data was padded with zeros at the end to standardize it to a 5-second duration. The zero padding was performed on 124 records. The datasets prepared through this method were subsequently used to train the neural network model.
Model to Predict CPR Performance
The aim of this study was to evaluate CPR performance by analyzing accelerometer data collected from smartwatches, which inherently included various forms of sensor noise, such as vibrations due to hand movements and accelerations not associated with chest compressions. The direct elimination of this noise was deemed impractical; therefore, the decision was made to use a supervised learning approach, specifically a neural network model, to tackle this intricate challenge.
During model testing, the training data was randomly selected from 5-second chunks (2701 records), which could result in partial data from a participant appearing in both the training and test sets. However, since these chunks were not directly comparable, as determined during the review, the data were not split by participants. Although neural networks typically assume that data are independent and identically distributed, this study’s approach does not violate this assumption.
illustrates the CPR performance of 3 participants over 100 seconds, summarized in 5-second intervals. Each chunk is treated as an independent data point, with no relationship to the previous or next chunk. The objective of this research is to randomly select a 5-second chunk and predict compression depth and count based on the accelerometer data, independent of past or future data. Since the model is trained to make predictions on isolated chunks rather than sequential patterns, the independent and identically distributed assumption holds, and data splitting by participants is not necessary. shows that compression depth declined over time and compression counts varied significantly. However, since the model does not rely on temporal dependencies, each chunk remains independent, justifying the decision not to split data by participants for training and testing.The dataset was randomly split into 80% (2161/2701) training and 20% (540/2701) validation test sets. Each record consisted of 300 accelerometer data points, corresponding to a duration of 5 seconds at a 60 Hz sampling rate. The objective of the model is to predict both the number of compressions and their average depth during this interval.
The development of the model used the TensorFlow library within the Python programming environment [
]. To optimize the model’s performance, a combination of grid search and Hyperband techniques was used. In each experiment, grid search was used to explore a broad range of hyperparameters, identifying configurations that performed well or poorly. In addition, the Hyperband technique was applied to refine the search by excluding poorly performing hyperparameter sets, thereby narrowing the search space. This process was repeated iteratively, with grid search expanding the search range in each new experiment, followed by Hyperband reducing it to eliminate ineffective configurations. The key hyperparameters adjusted included the number of hidden layers, layer sizes, number of epochs, batch sizes, and dropout rates. The objective was to determine the most effective combination of hyperparameters that would allow the model to accurately interpret accelerometer data, despite sensor noise, and reliably assess CPR quality based on smartwatch data.To evaluate the normality of the data and assess the correlation between actual and predicted values, 2 statistical tests were conducted. First, the Shapiro-Wilk test was performed on the expected depth and expected compression count to determine if the data followed a normal distribution. The results showed P values of 2.69×10⁻³⁶ and 2.80×10⁻⁴⁵, respectively, indicating that both datasets deviated significantly from normality. Given this, Spearman rank correlation was chosen to measure the relationship between expected versus predicted depth and compression counts since it does not assume normality.

Ethical Considerations
The research ethics evaluation for this study was reviewed and approved by the TBRHSC Research Ethics Board (2022519), with all procedures conducted in accordance with the ethical standards of the responsible institutional committee and the principles outlined in the World Medical Association Declaration of Helsinki. Written informed consent was obtained from all participants before their inclusion in the study. To maintain privacy and confidentiality, all data collected were deidentified at the point of collection, with each participant assigned a unique identifier; a separate, secure document mapping participant identities to these identifiers was maintained independently and was not linked to the research data. Participants were compensated with a US $5 gift card for their participation.
Results
contains the demographic details of participants involved in the data collection process. A total of 83 individuals contributed, resulting in 124 mannequin-smartwatch datasets, with 41 participants completing 2 rounds of CPR. The sample included 56 females and 27 males, spanning various age groups, with the largest group being younger than 30 years old. Participants also varied in their previous CPR experience, ranging from no previous attempts to over 30, offering a diverse dataset in terms of skill level and background.
Description | Number of participants, n | ||
Number of mannequin-smartwatch datasets | 124 | ||
Number of participants | 83 | ||
Participants performing 2 rounds of CPRa | 41 | ||
Sex | |||
Female | 56 | ||
Male | 27 | ||
Age groups (y) | |||
<30 | 42 | ||
30-39 | 27 | ||
40-49 | 8 | ||
>50 | 6 | ||
Previous CPR attempts | |||
0 | 12 | ||
1-9 | 23 | ||
10-19 | 10 | ||
20-29 | 14 | ||
30+ | 24 |
aCPR: cardiopulmonary resuscitation.
A series of experiments were systematically conducted, exploring various hyperparameters and datasets, until no notable improvements in outcomes were observed. This investigative process entailed 12 different experiments to find the optimal set of hyperparameters. Within each trial, data on the variations in hyperparameters were documented, noting the discrepancies between anticipated and actual compression depths and counts. Given that the variance between expected and observed results could manifest in negative figures, potentially skewing average calculations, absolute values were used for a more accurate determination of the average and median. These analytical steps informed adjustments in hyperparameters for ensuing experiments aimed at enhancing performance.
Throughout this extensive testing phase, a total of 1226 iterations were conducted, each exploring different hyperparameter settings. The specific settings and the best outcomes from each experiment are presented in
, while detailed information on each experiment is provided in . Summarizing the testing, the most effective model across all iterations was characterized by the following hyperparameters: hidden layers configured as (2000, 1000, 250, 100, 50), a batch size of 2000 epochs, and a dropout rate of 10% after every 2 layers. Predictions from this model demonstrated an average absolute loss in compression depth of 3.8 (SD 0.16) mm and in compression count of 0.8 (SD 0.05) counts, with a median absolute loss for compression depth at 2.59 (IQR 0.24) mm and for compression count at 0.03 counts. Throughout the course of the experiments, 27 models were identified as capable of predicting an average absolute compression depth below 4.0 mm.The Spearman correlation coefficients were 0.80 and 0.78, respectively, with P values of 1e-3, indicating a strong and statistically significant positive correlation between actual and predicted values for both compression depth and compression count. These findings suggest that the model effectively predicts compression depth and count, even though the underlying data distribution is not normal.
Experiment | Epochs | Batch size | Layer sizes | Number of layers | Connection dropout | Best result (compression depth, count) |
1 | 10 | 3, 5, 7, 9, 11 | 10, 35, 60, 85, 100, 400, 700, 1000, 1200 | 3 | 10% after every 2 layers | ±4.8 mm, 1.2 counts |
2 | 100, 500 | 6, 12, 18 | 10, 35, 60, 85, 100, 400, 700, 1000, 1200 | 3, 4 | 10% after every 2 layers | ±4.0 mm, 0.9 counts |
3 | 500, 750 | 18, 24 | 5, 40, 100, 500, 900, 1300 | 4, 6 | 10% after every 2 layers | ±4.8 mm, 1.2 counts |
4 | 500, 750 | 18, 24 | 5, 40, 100, 500, 900, 1300 | 4, 6 | 10% after every 2 layers | ±3.9 mm, 0.9 counts |
5 | 500, 750 | 18, 24 | 5, 10, 60, 100, 400, 700, 1000 | 4 | 10% after every 2 layers | ±3.9 mm, 0.8 counts |
6 | 500, 750 | 6, 24 | 5, 10, 50, 100, 500, 1000, 4000 | 4, 5 | 10% after every 2 layers | ±6.2 mm, 1.2 counts |
7 | 1000 | 3 | 5, 10, 50, 100, 500, 1000, 4000 | 5 | 10% after every 2 layers | ±4.0 mm, 0.9 counts |
8 | 1000 | 12 | 5, 10, 50, 100, 500, 1000, 4000 | 5 | No dropouts | ±3.9 mm, 0.9 counts |
9 | 1000 | 3, 12 | 5, 10, 50, 100, 500, 1000, 4000 | 3 | No dropouts | ±4.1 mm, 0.9 counts |
10 | 100, 500, 1000 | 3, 9 | 5, 10, 25, 50, 75, 100, 250, 500, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000, 3250, 3500, 3750, 4000 | 3 | 10% after every 2 layers | ±4.1 mm, 0.9 counts |
11 | 100, 1000 | 3, 128 | 5, 10, 25, 50, 75, 100, 250, 500, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000, 3250, 3500, 3750, 4000 | 5 | 10% after every 2 layers | ±3.9 mm, 0.8 counts |
12 | 1000, 2000 | 256, 1024 | 5, 10, 25, 50, 75, 100, 250, 500, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000, 3250, 3500, 3750, 4000 | 5 | 10% after every 2 layers | ±3.8 mm, 0.8 counts |
Discussion
Overview
This study introduces a neural network model capable of using accelerometer data from a smartwatch to guide users in delivering high-quality CPR. To facilitate this, apps for both Apple Watch and iPhone were developed to gather accelerometer data during CPR. This research compiled data from 83 participants using Apple Watches to perform CPR on a mannequin, resulting in a total of 27,844 chest compressions. A total of 1226 experiments were conducted to evaluate different hyperparameter settings. The most effective model used hidden layers (2000,1000,250,100,50), a batch size of 2000, and a 10% dropout after every 2 layers. This model achieved an average absolute loss of 3.8 mm in compression depth and 0.8 in compression count, with median losses of 2.59 mm and 0.03 counts, respectively. In total, 27 models achieved an average absolute compression depth loss of less than 4.0 mm.
Principal Results
Considering mannequin data as the benchmark, the neural network was trained with the accelerometer data to emulate the mannequin’s feedback. After undergoing 1226 iterations of model refinement, the optimal model emerged, capable of estimating compression depth with an average discrepancy of 3.8 mm and compression count with an average discrepancy of 0.8 counts across 5-second intervals. This investigation underscores the potential of a neural network model to surpass existing models in predicting CPR quality, underpinned by a more extensive and realistic dataset than those previously reported in the literature [
, , , - ].Comparison With Previous Work
Numerous studies have highlighted significant enhancements in CPR quality when performers receive real-time feedback through intelligent technologies [
, , ]. Gruenerbl et al [ ] proposed a smartwatch app capable of measuring CPR parameters and offering visual feedback. This app analyzes accelerometer data to evaluate compression quality, providing user feedback to achieve high-quality compressions. Lu et al [ ] also proposed a smartwatch app alongside an algorithm for evaluating compression metrics. However, these proposed solutions are developed on limited datasets and do not provide sufficient details to reproduce or enhance the system. Dedicated devices, such as the Laerdal CPRMeter2, which can be placed on the chest of a mannequin or patient, are available for purchase. These devices are equipped with accelerometers and pressure sensors to accurately assess CPR performance and provide real-time feedback [ ]. However, these devices are expensive and must be carried by the user at all times, as emergencies can occur at any moment.Limitations
This study demonstrates that the accelerometer data from the smartwatch can be used to provide real-time feedback to the CPR performer and can help increase the survival chances of the patient. However, there are a few limitations worth noting. First, the developed model focuses on measuring compression depth and count but does not account for compression recoil. Compression recoil plays an important role in performing high-quality CPR, as it allows the patient’s chest to fully expand. This full expansion enables more air to enter the patient’s body. Compression recoil can also be measured using acceleration data from the smartwatch and compared with sensor data from the mannequin, similar to how compression events are measured. In future research, the authors plan to include this factor as well.
Second, the Apple Watch Series 7 was the exclusive device used to collect data during this study. However, sensors in smartwatches vary between brands, models, and versions, each having its own set of white noise that may impact the results. Therefore, it is necessary to investigate how other devices with different sensors perform with the presented model and whether the model needs to be tuned for each device type. In future studies, the authors plan to use an Android device to cover a broader spectrum of sensors.
Third, during data collection, it was observed that the sensor data frequency fluctuated between 48-60 Hz, although the collection rate was set to 60 Hz. This fluctuation could be due to several reasons: slower processing on the device, the device’s inability to write data at that frequency to the file, or the device’s processing speed being unable to read the data from the sensors at this speed. Therefore, it is important to investigate how the model’s performance would be affected if the data frequency were lowered.
Fourth, while working with the Apple Watch, the authors found a limitation that restricts its use during emergency events. The Apple Watch only allows an app to run in the background for 30 seconds before it is suspended, after which the app can only execute its tasks intermittently. This restriction hinders the use of the smartwatch for providing real-time feedback during emergencies.
Finally, in data segmentation, the acceleration data were chunked based on a fixed number of data points (300, representing 5 seconds of data at 60 Hz). This chunking may occur during a compression event, potentially splitting the compression event into 2 parts, which the algorithm may not recognize, resulting in missed compressions. In future research, the authors plan to address this problem by introducing an advanced algorithm that can recognize the completion of a compression event and then segment the data accordingly to avoid splitting compression data.
Conclusions
This study presents a neural network model designed to gauge the rate and depth of CPR compressions accurately. The model has undergone training on a large dataset, ensuring a robust foundation for its predictive capabilities. Its accuracy is remarkably close to the measurements obtained from a CPR mannequin, serving as a benchmark for comparison. Notably, this model demonstrates superior performance when compared with other models discussed within the existing literature, establishing it as a significant advancement in the field of medical emergency training and response analysis. Implementation of this model in real-world scenarios could significantly improve SCA survival rates.
Acknowledgments
We would like to thank Leanne Baird and the Ibn Sina Simulation Lab at the Thunder Bay Regional Health Sciences Centre for providing technical support and access to the simulation mannequin. The authors used the ChatGPT-4 language model (developed by OpenAI) to correct grammar and typographical errors in the manuscript. All edits were reviewed and approved by the authors to ensure accuracy and integrity.
This research was funded by the MITACS grant and received by Gaurav Rao and Avive Solutions Inc. Other research costs are covered by the NSERC Discovery Grant (RGPIN-2017-05377), held by VM.
Data Availability
The data supporting the findings of this study are available from the corresponding author upon reasonable request. Access to the data may be granted for research purposes, subject to ethical considerations and approval.
Authors' Contributions
Conceptualization and resources were contributed by GR, DWS, VM, and PL. Methodology was contributed by GR, DWS, and VM. Software, visualization, and investigation were handled by GR. Validation and formal analysis were contributed by GR and VM. Data curation was contributed by GR, GE, and NK. Writing—original draft was contributed by GR. Writing—review and editing was contributed by GR, DWS, VM, and PL. Supervision and project administration were handled by VM and PL. Funding acquisition was handled by GR, GWS, VM, and PL.
Conflicts of Interest
None declared.
Informed consent form.
PDF File (Adobe PDF File), 543 KBExperiment details.
DOCX File , 16 KBReferences
- Hosey RG, Armsey TD. Sudden cardiac death. Clin Sports Med. 2003;22(1):51-66. [CrossRef] [Medline]
- Medlineplus.gov . Sudden Cardiac Arrest ? Sudden Cardiac Death ? MedlinePlus. 2022. URL: https://medlineplus.gov/suddencardiacarrest.html, [accessed 2022-09-16]
- Heart.org F. 2025 Heart Disease and Stroke Statistics Update Fact Sheet. 2025. URL: https://www.heart.org/en/-/media/PHD-Files-2/Science-News/2/2025-Heart-and-Stroke-Stat-Update/2025-Statistics-At-A-Glance.pdf [accessed 2025-05-01]
- Research CIoH. Research program intended to help Canadians survive sudden cardiacarrest expands to all 10 Canadian provinces - CIHR. 2019. URL: https://cihr-irsc.gc.ca/ [accessed 2022-09-16]
- Heart.org C. What is CPR. 2022. URL: https://cpr.heart.org/en/resources/ [accessed 2022-09-16]
- Heart.org. (n.d.). Emergency Treatment of Cardiac Arrest | American Heart Association. Heart.Org. 2021. URL: https://www.heart.org/en/health-topics/cardiac-arrest/emergency-treatment-of-cardiac-arrest [accessed 2021-08-24]
- Rescue. RescueOne. (2013). Every Second Counts. 2013. URL: https://rescue-one.com/wp-content/uploads/aha-ruralcommunityaccess.pdf [accessed 2025-05-01]
- Valenzuela TD, Roe DJ, Cretin S, Spaite DW, Larsen MP. Estimating effectiveness of cardiac arrest interventions: a logistic regression survival model. Circulation. 1997;96(10):3308-3313. [CrossRef] [Medline]
- Weisfeldt ML, Sitlani CM, Ornato JP, Rea T, Aufderheide TP, Davis D, et al. Survival after application of automatic external defibrillators before arrival of the emergency medical system: evaluation in the resuscitation outcomes consortium population of 21 million. J Am Coll Cardiol. 2010;55(16):1713-1720. [FREE Full text] [CrossRef] [Medline]
- Brooks SC, Simmons G, Worthington H, Bobrow BJ, Morrison LJ. The PulsePoint Respond mobile device application to crowdsource basic life support for patients with out-of-hospital cardiac arrest: challenges for optimal implementation. Resuscitation. 2016;98:20-26. [CrossRef] [Medline]
- Van de Voorde P, Gautama S, Momont A, Ionescu CM, De Paepe P, Fraeyman N. The drone ambulance [A-UAS]: golden bullet or just a blank? Resuscitation. 2017;116:46-48. [CrossRef] [Medline]
- Chien CY, Tsai SL, Tsai LH, Chen CB, Seak CJ, Weng YM, et al. Impact of transport time and cardiac arrest centers on the neurological outcome after out‐of‐hospital cardiac arrest: a retrospective cohort study. JAHA. 2020;9(11). [CrossRef]
- Ko SY, Ro YS, Shin SD, Song KJ, Hong KJ, Kong SY. Effect of a first responder on survival outcomes after out-of-hospital cardiac arrest occurs during a period of exercise in a public place. PLoS One. 2018;13(2):e0193361. [FREE Full text] [CrossRef] [Medline]
- Andelius L, Hansen C, Lippert F, Karlsson L, Torp-Pedersen C, Gislason GH, et al. 40 Long ambulance response time is associated with higher incidence of cardiopulmonary resuscitation and defibrillation by dispatched citizen first-responders. BMJ Open. 2019;9(Suppl 2):A15. [CrossRef]
- Rea T, Blackwood J, Damon S, Phelps R, Eisenberg M. A link between emergency dispatch and public access AEDs: potential implications for early defibrillation. Resuscitation. 2011;82(8):995-998. [CrossRef] [Medline]
- Sanko S, Kashani S, Lane C, Eckstein M. Implementation of the los angeles tiered dispatch system is associated with an increase in telecommunicator-assisted CPR. Resuscitation. 2020;155:74-81. [CrossRef] [Medline]
- Andelius L, Hansen CM, Lippert F, Karlsson L, Torp-Pedersen C, Gislason G, et al. Will shorter distance between dispatched lay-rescuer and out-of-hospital cardiac arrest increase cardiopulmonary resuscitation and early defibrillation rates? Resuscitation. 2018;130:e56-e57. [CrossRef]
- Pijls RW, Nelemans PJ, Rahel BM, Gorgels AP. A text message alert system for trained volunteers improves out-of-hospital cardiac arrest survival. Resuscitation. 2016;105:182-187. [FREE Full text] [CrossRef] [Medline]
- Heart.org G. New resuscitation guidelines update CPR chest pushes. 2015. URL: https://www.heart.org/en/news/2018/07/23/new-resuscitation-guidelines-update-cpr-chest-pushes, [accessed 2025-05-01]
- Perkins GD, Gräsner JT, Semeraro F, Olasveengen T, Soar J, Lott C, et al. Autoren der Leitlinien des European Resuscitation Council. [Executive summary]. Notf Rett Med. 2021;24(4):274-345. [FREE Full text] [CrossRef] [Medline]
- Zègre-Hemsey JK, Grewe ME, Johnson AM, Arnold E, Cunningham CJ, Bogle BM, et al. Delivery of automated external defibrillators via drones in simulated cardiac arrest: users' experiences and the human-drone interaction. Resuscitation. 2020;157:83-88. [FREE Full text] [CrossRef] [Medline]
- Zègre-Hemsey JK, Bogle B, Cunningham CJ, Snyder K, Rosamond W. Delivery of automated external defibrillators (AED) by drones: implications for emergency cardiac care. Curr Cardiovasc Risk Rep. 2018;12(11). [FREE Full text] [CrossRef] [Medline]
- Tanaka S, Tsukigase K, Hara T, Sagisaka R, Myklebust H, Birkenes TS, et al. Effect of real-time visual feedback device 'Quality cardiopulmonary resuscitation (QCPR) classroom' with a metronome sound on layperson CPR training in Japan: a cluster randomized control trial. BMJ Open. 2019;9(6):e026140. [FREE Full text] [CrossRef] [Medline]
- Baldi E, Cornara S, Contri E, Epis F, Fina D, Zelaschi B, et al. Real-time visual feedback during training improves laypersons' CPR quality: a randomized controlled manikin study. CJEM. 2017;19(6):480-487. [CrossRef] [Medline]
- Wang SA, Su CP, Fan HY, Hou WH, Chen YC. Effects of real-time feedback on cardiopulmonary resuscitation quality on outcomes in adult patients with cardiac arrest: a systematic review and meta-analysis. Resuscitation. 2020;155:82-90. [CrossRef] [Medline]
- Laerdal.com . Laerdal Medical. 2023. URL: https://laerdal.com/ [accessed 2025-04-05]
- Rao G, Savage DW, Mago V, Lingras P. A Survey on Technologies Used During out of Hospital Cardiac Arrest. 2023. Presented at: 16th International Conference on Health Informatics; 2023 February 16 - 18; Lisbon, Portugal. [CrossRef]
- Hardeland C, Skåre C, Kramer-Johansen J, Birkenes TS, Myklebust H, Hansen AE, et al. Targeted simulation and education to improve cardiac arrest recognition and telephone assisted CPR in an emergency medical communication centre. Resuscitation. 2017;114:21-26. [CrossRef] [Medline]
- Sanko S, Feng S, Lane C, Eckstein M. Comparison of emergency medical dispatch systems for performance of telecommunicator-assisted cardiopulmonary Resuscitation among 9-1-1 callers with limited English proficiency. JAMA Netw Open. 2021;4(6):e216827. [FREE Full text] [CrossRef] [Medline]
- Hambly H, Rajabiun R. Rural broadband: gaps, maps and challenges. Telematics and Informatics. 2021;60:101565. [CrossRef]
- Lee HS, You K, Jeon JP, Kim C, Kim S. The effect of video-instructed versus audio-instructed dispatcher-assisted cardiopulmonary resuscitation on patient outcomes following out of hospital cardiac arrest in Seoul. Sci Rep. 2021;11(1):15555. [FREE Full text] [CrossRef] [Medline]
- Riou M, Ball S, O’Halloran KL, Whiteside A, Williams TA, Finn J. Hijacking the dispatch protocol: when callers pre-empt their reason-for-the-call in emergency calls about cardiac arrest. Discourse Studies. 2018;20(5):666-687. [CrossRef]
- Case R, Cartledge S, Siedenburg J, Smith K, Straney L, Barger B, et al. Identifying barriers to the provision of bystander cardiopulmonary resuscitation (CPR) in high-risk regions: a qualitative review of emergency calls. Resuscitation. 2018;129:43-47. [CrossRef] [Medline]
- Meinich-Bache O, Engan K, Birkenes TS, Myklebust H. Real-time chest compression quality measurements by smartphone camera. J Healthc Eng. 2018;2018:6241856. [FREE Full text] [CrossRef] [Medline]
- Ali S, Athar M, Ahmed S. A randomised controlled comparison of video versus instructor-based compression only life support training. Indian J Anaesth. 2019;63(3):188. [CrossRef]
- Jeon SA, Chang H, Yoon SY, Hwang N, Kim K, Yoon H, et al. Effectiveness of smartwatch guidance for high-quality infant cardiopulmonary resuscitation: A simulation study. Medicina (Kaunas). 2021;57(3):193. [FREE Full text] [CrossRef] [Medline]
- Sevil H, Bastan V, Gültürk E, El Majzoub I, Göksu E. Effect of smartphone applications on cardiopulmonary resuscitation quality metrics in a mannequin study: a randomized trial. Turk J Emerg Med. 2021;21(2):56-61. [FREE Full text] [CrossRef] [Medline]
- An M, Kim Y, Cho WK. Effect of smart devices on the quality of CPR training: a systematic review. Resuscitation. 2019;144:145-156. [FREE Full text] [CrossRef] [Medline]
- Song Y, Chee Y, Oh J, Ahn C, Lim TH. Smartwatches as chest compression feedback devices: a feasibility study. Resuscitation. 2016;103:20-23. [CrossRef] [Medline]
- Semeraro F, Taggi F, Tammaro G, Imbriaco G, Marchetti L, Cerchiari EL. iCPR: a new application of high-quality cardiopulmonary resuscitation training. Resuscitation. 2011;82(4):436-441. [CrossRef] [Medline]
- Chan T, Wan K, Chan J, Lam H, Wong Y, Kan P. New era of CPR: application of I-Technology in resuscitation. Hong Kong Journal of Emergency Medicine. 2017;19(5):305-311. [CrossRef]
- Park CS, Kang IG, Heo SJ, Chae Y, Kim H, Park S, et al. A Randomised, cross over study using a mannequin model to evaluate the effects on CPR quality of real-time audio-visual feedback provided by a smartphone application. Hong Kong Journal of Emergency Medicine. 2017;21(3):153-160. [CrossRef]
- King CE, Sarrafzadeh M. A survey of smartwatches in remote health monitoring. J Healthc Inform Res. 2018;2(1-2):1-24. [FREE Full text] [CrossRef] [Medline]
- Gruenerbl A, Pirkl G, Monger E, Gobbi M, Lukowicz P. Smart-Watch life savermartWatch interactive-feedback system for improving bystander CPR. 2015. Presented at: ISWC '15: Proceedings of the 2015 ACM International Symposium on Wearable Computers; 2015 September 7 - 11:19; Osaka Japan. [CrossRef]
- Lu TC, Chen Y, Ho TW, Chang Y, Lee Y, Wang Y, et al. A novel depth estimation algorithm of chest compression for feedback of high-quality cardiopulmonary resuscitation based on a smartwatch. J Biomed Inform. 2018;87:60-65. [FREE Full text] [CrossRef] [Medline]
- Asada HH, Jiang HH, Gibbs P. Active noise cancellation using MEMS accelerometersfor motion-tolerant wearable bio-sensors. 2004. Presented at: The 26th Annual International Conference of the IEEE Engineering in Medicine and Biology Society; 2004 September 01-05; San Francisco, CA, USA. [CrossRef]
- Apple . App Store - Apple (CA). 2023. URL: https://www.apple.com/ [accessed 2025-04-05]
- Statista.com . Statista Mobile OS share. 2023. URL: https://www.statista.com/statistics/272698/global-market-share-held-by-mobile-operating-systems-since-2009/ [accessed 2025-04-05]
- Statista.com . Statista Watch OS share. 2023. URL: https://www.statista.com/statistics/910862/worldwide-smartwatch-shipment-market-share/ [accessed 2025-04-05]
- Laerdal.com . Laerdal Medical AnneQCPR. 2023. URL: https://laerdal.com/ca/products/simulation-training/resuscitation-training/little-anne-qcpr/ [accessed 2025-04-05]
- Amazon Web Services. G5 instance types. 2023. URL: https://aws.amazon.com/ec2/instance-types/g5/ [accessed 2025-04-05]
- Abadi M, Agarwal A, Barham P, Brevdo E, Chen Z, Citro C, et al. TensorFlow: Large-Scale machine learning on heterogeneous systems. arXiv:1603.04467. 2015. [FREE Full text]
- Song Y, Oh J, Chee Y. A new chest compression depth feedback algorithm for high-quality CPR based on smartphone. Telemed J E Health. 2015;21(1):36-41. [FREE Full text] [CrossRef] [Medline]
- Ahn C, Lee J, Oh J, Song Y, Chee Y, Lim TH, et al. Effectiveness of feedback with a smartwatch for high-quality chest compressions during adult cardiac arrest: a randomized controlled simulation study. PLoS One. 2017;12(4):e0169046. [FREE Full text] [CrossRef] [Medline]
- Lu TC, Chang YT, Ho TW, Chen Y, Lee YT, Wang YS, et al. Using a smartwatch with real-time feedback improves the delivery of high-quality cardiopulmonary resuscitation by healthcare professionals. Resuscitation. 2019;140:16-22. [CrossRef] [Medline]
- Truszewski Z, Szarpak L, Kurowski A, Evrin T, Zasko P, Bogdanski L, et al. Randomized trial of the chest compressions effectiveness comparing 3 feedback CPR devices and standard basic life support by nurses. Am J Emerg Med. 2016;34(3):381-385. [CrossRef] [Medline]
Abbreviations
AED: automated external defibrillator |
AHA: American Heart Association |
CPR: cardiopulmonary resuscitation |
CSV: comma-separated value |
EMS: emergency medical services |
SCA: sudden cardiac arrest |
TBRHSC: Thunder Bay Regional Health Sciences Centre |
Edited by T de Azevedo Cardoso, L Buis; submitted 17.02.24; peer-reviewed by T Tangpaisarn, Q Dong, W Kern; comments to author 15.05.24; revised version received 03.07.24; accepted 31.03.25; published 05.05.25.
Copyright©Gaurav Rao, David W Savage, Gabrielle Erickson, Nathan Kyryluk, Pawan Lingras, Vijay Mago. Originally published in JMIR mHealth and uHealth (https://mhealth.jmir.org), 05.05.2025.
This is an open-access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work, first published in JMIR mHealth and uHealth, is properly cited. The complete bibliographic information, a link to the original publication on https://mhealth.jmir.org/, as well as this copyright and license information must be included.