Abstract
Background
Although many smartphone application (app) programs provide education and guidance for basic life support, they do not commonly provide feedback on the chest compression depth (CCD) and rate. The validation of its accuracy has not been reported to date. This study was a feasibility assessment of use of the smartphone as a CCD feedback device. In this study, we proposed the concept of a new real-time CCD estimation algorithm using a smartphone and evaluated the accuracy of the algorithm.
Materials and Methods
Using the double integration of the acceleration signal, which was obtained from the accelerometer in the smartphone, we estimated the CCD in real time. Based on its periodicity, we removed the bias error from the accelerometer. To evaluate this instrument's accuracy, we used a potentiometer as the reference depth measurement. The evaluation experiments included three levels of CCD (insufficient, adequate, and excessive) and four types of grasping orientations with various compression directions. We used the difference between the reference measurement and the estimated depth as the error. The error was calculated for each compression.
Results
When chest compressions were performed with adequate depth for the patient who was lying on a flat floor, the mean (standard deviation) of the errors was 1.43 (1.00) mm. When the patient was lying on an oblique floor, the mean (standard deviation) of the errors was 3.13 (1.88) mm.
Conclusions
The error of the CCD estimation was tolerable for the algorithm to be used in the smartphone-based CCD feedback app to compress more than 51 mm, which is the 2010 American Heart Association guideline.
Key words: : cardiopulmonary resuscitation, chest compression depth, accelerometer, smartphone
Introduction
Cardiopulmonary resuscitation (CPR) is an emergency procedure for manually preserving brain function until further measures can be taken to restore spontaneous blood circulation and breathing in a person who is in cardiac arrest. CPR primarily consists of chest compressions (CCs) and rescue breathing. It is an important technique in hospitals, at home, and in the accident field. According to the 2010 American Heart Association (AHA) Guidelines for adults, high-quality CPR includes chest compressions of an adequate rate (at least 100 compressions/minute) and depth (at least 2 inches [51 mm]) that allow for full chest recoil after each compression and minimize interruptions during compressions.1 The CC depth (CCD) and CC rate are important factors that are related to the survival rates of cardiac arrest.1–4
However, insufficient CC according to the current recommendation was observed during CPR in both out-of-hospital and in-hospital studies.5,6 To avoid insufficient CC, healthcare workers and emergency medical participants periodically receive basic life support education. In addition, they use several devices that offer feedback for the CC rate and CCD.7–10 The feedback devices measure the CCD based on an accelerometer or pressure sensor. Several studies showed that feedback devices improve CCD in simulated cardiac arrest.8–10
Cardiac arrest often occurs outside of hospitals, where experienced rescuers or CCD feedback devices are unavailable. However, smartphones have enjoyed widespread use with 22% of the population worldwide.11 Many smartphone applications (apps) have been developed and are available from the app market (e.g., Google Play Store), and smartphone sales are increasing. Several CPR-related apps are available from Google Play Store and App Store. Most of these apps only guide users in their CPR procedures via text and pictures or video. Among them, PocketCPR® for Android™ (Google, Mountain View, CA) offers a feedback function for CCD training.12–14 It estimates the CCD based on the built-in accelerometer in the smartphone. However, the app lacks a nominal specification or report on its accuracy of the CCD estimation.
Because the CCD cannot be directly measured using the accelerometer in a smartphone, errors in the estimation based on the acceleration signal are inevitable. Specifically, three-axis accelerometers may result in different errors depending on the grasping orientation of the smartphone. The rescuers may need to continue the CC in an oblique direction, such as in elevators. In oblique directional compression, the CCD estimation error may increase. For a pregnant patient in cardiac arrest, the 2010 AHA Guidelines recommend that the providers place the patient in a left-lateral tilt of 30° using a firm wedge to support the pelvis and thorax because the pregnant uterus can compress the inferior vena cava.15,16 To evaluate the accuracy of the CCD, we must assess the gravity direction as well as the oblique directional compression.
In this study, we proposed a new concept of real-time CCD estimation algorithm (called “U-CPR”) using a smartphone with a built-in three-axis accelerometer and evaluated the accuracy of the algorithm in various grasping orientations and compression directions. This proof-of-concept study was conducted to describe the algorithm of the U-CPR and investigate the tolerability.
Materials and Methods
CCD Estimation Using Accelerometer
Three-axis accelerometers provide the accelerations in each axis [ax(t), ay(t), az(t)] in m/s2. Equation 1 was used to calculate the distances of each axis from the accelerations. The accumulation of error due to the integration constant (Ca, Cv), which is the bias component in the accelerometer, is considerable and increases over time:
![]() |
The simple integration to estimate the CCD alone may introduce an error. Some devices use an additional pressure switch to detect the starting point of each compression to solve this problem, which cannot be implemented with a smartphone.17 To avoid the accumulation of error over time, we reset the integral constant to 0 at the start of each compression. To calculate the distance of the compression, we integrated only one period of the compression. One period can be defined as the positive peaks.18 After determining the distance of each axis, we estimated the distance of moving in a three-dimensional space using the vector sum of the three axes as shown in Eq. 2. In Eq. 2, dx, dy, and dx are the calculated distance from the x-, y-, and z-axes of the accelerometer, respectively, where d is the distance of movement in three-dimensional space:
![]() |
Real-Time Implementation for CCD Estimation
Figure 1 shows the flow chart used to determine the distance of one axis. Normally, the signal from the accelerometer includes noise and bias in the gravity axis. To minimize this noise, we used the weighted smoothing technique as shown in Eq. 3, where β is 0.7.19 We can obtain the velocity by integrating the filtered signal. The cumulative error is due to the bias, which is given by the integral constant Ca. This error produces the drift effect on the vx (t) waveform, as shown in Figure 1. We used the transient components emphasizing technique to reduce the slowly changing components, as shown in Eq. 4, where α is 0.9.19 The velocity was integrated again to obtain the distance data. The drift effect is due to the integral constant, Cv, as shown in the dx (t) waveform of Figure 1. We used the transient components emphasizing technique again to reduce the drift components. We estimated the CCD as the difference of the positive peak and negative peak in the distance data18:
![]() |
![]() |
Fig. 1.
Flowchart of chest compression depth (CCD) estimation algorithm for one axis.
The raw data were sampled for every event, which fires whenever the Android OS determines that the input signal of the accelerometer has changed. Because of the varying activity loads of the OS, this event is not fired periodically. Because of the irregular acquisition, the conventional frequency selection filter cannot be used. To remove the noise, we applied the weighted smoothing technique, which has the role of a low-pass filter. To remove drift, we used the technique emphasizing transient components, which has the function of a high-pass filter.
For the real-time processing, the program calculates the distance for every event. Moreover, the program checks whether the current point is the peak. If the peak point is found, the data are saved until the next peak. We determined three peaks, and the CCD was calculated as in Eq. 5. In Eq. 5, peak [n] is the latest positive peak (the chest is fully decompressed), peak [n − 1] is the latest negative peak (the chest is fully compressed), and peak [n − 2] is the previous positive peak:
![]() |
After we obtained the distance of each axis, we measured the CCD via the vector sum of the three axes, as in Eq. 2. Because the user can hold the smartphone in any orientation and the compression direction may be different in some conditions, we required the data from the three-axis accelerometer.
To be used as the feedback device for continuous CC, the depth should not be shown instantaneously. The rescuers should compress deeper or shallower according to the feedback value, and showing an average of previous compression depths is preferred to ensure a smoother change in depth. As shown in Eq. 6, our program shows the depth as the average of previous compressions with the current compression until the fifth compression. Furthermore, it shows the average depth of the previous four compressions with the current compression after the fifth compression:
![]() |
Development Environment
A VEGA Racer (model IM-A760S; Pantech Co., Ltd., Seoul, Korea) smartphone with Android OS (Jellybean) was used to develop the CCD estimation algorithm. JAVA and Eclipse (Eclipse Foundation Inc., Ottawa, ON, Canada) with Android SDK 2.3.3 (Google) were used to implement the algorithm. To facilitate the built-in accelerometer of the smartphone, we used Android Sensor API.20 In using API, we took TYPE_LINEAR_ACCELERATION to determine the linear acceleration excluding the acceleration of gravity and used SENSOR_DELAY_FASTEST to obtain as many samples as possible. The smartphone used in our study features a three-axis accelerometer and storage.
Experiment for the Accuracy Evaluation
To evaluate the accuracy of the algorithm, a linear variable differential transformer (LVDT) (model RDP-100S; Radian Co., Ltd., Seoul) was used as the reference measurement. The LVDT directly transduces the linear distance to voltage. As shown in Figure 2, the analog voltage that was obtained from the LVDT was acquired using NI-DAQ 920S with a sampling rate of 1 kHz. The signal can be monitored by the in-house program composed with LabVIEW version 9.0 software (National Instrument Co., Austin, TX). To compare the accuracy with PocketCPR for Android, two identical smartphones were stacked, as shown in Figure 2. PocketCPR was performed on one smartphone, and our algorithm, U-CPR, was performed on the other smartphone. When manually simulating the CC, two estimated depth data points from the smartphones and the reference depth data were simultaneously recorded.
Fig. 2.
Configuration of the experimental setting for evaluation. CCD, chest compression depth.
To evaluate the accuracy of CCD estimation, we defined the error with Eq. 7. The error was the difference between the estimated depth (d) and the reference measurement (dLVDT):
![]() |
While observing the depth via a PC monitor, we engaged in up-and-down movements to simulate CC in CPR. In each experiment, 200 CCs were performed, and the error for each compression was calculated. The mean and standard deviation (SD) of errors were calculated as the results.
The first experiment served to evaluate the accuracy at the various depths of CC. We divided CCD into three levels: insufficient compression (40–45 mm), adequate compression (50–55 mm), and excessive compression (60–65 mm), based on the AHA guidelines. In the first experiment, the patient is thought to be laid on the flat ground, as shown in Figure 3a; the smartphone is placed orthogonal to the ground, and the compressing direction is the same as the gravity direction.
Fig. 3.
The various grasping orientations and directions of compression. ax,y,z is the acceleration signal from the smartphone, g is the direction of gravity, and
is the direction of chest compression: (a) the smartphone is placed orthogonal to gravity (az=g), and the compression direction is
; (b) the smartphone stands perpendicular to the ground (
), and the compression direction is
; (c) the smartphone is tilted at θ (θ=30°), and the compression direction is
; and (d) the smartphone is tilted at θ (θ=30°), and the compression direction is oblique to gravity as θ (θ=30°).
In the second, we designed four types of conditions, as shown in Figure 3. The conditions varied the grasping orientation of the smartphone (Fig. 3a–c) and compressing direction (Fig. 3d). Figure 3a is the condition recommended by PocketCPR. Figure 3b simulates that the smartphone is attached to the armband. Figure 3c simulates the possibility of any person partially grasping the smartphone. Figure 3d simulates compressing at an angle to the gravity direction, which simulates CPR for pregnant women or CPR in an elevator. In all cases, we compressed 200 times with an adequate level of CCD (50–55 mm).
Results
Table 1 shows the mean (SD) of errors (Eq. 7), which is the absolute value of the difference between the reference measurement and the smartphone-based CCD estimation at three levels of compression depths. In U-CPR, the mean (SD) errors for the insufficient case, adequate case, and excessive case were 1.24 (0.87) mm, 1.43 (1.00) mm, and 2.46 (1.38) mm, respectively. The mean (SD) errors in PocketCPR were 1.43 (0.75) mm, 1.01 (0.74) mm, and 2.46 (1.38) mm, respectively. At all depths, the mean absolute error did not exceed 3 mm, and the difference between U-CPR and PocketCPR was not significant.
Table 1.
Errors in Three Levels of Compression Depths
| CHEST COMPRESSION DEPTH (MM) | |||
|---|---|---|---|
| INSUFFICIENT (40–45 MM) | ADEQUATE (50–55 MM) | EXCESSIVE (60–65 MM) | |
| U-CPR | 1.24 (0.87) | 1.43 (1.00) | 2.45 (1.76) |
| PocketCPR | 1.43 (0.75) | 1.01 (0.74) | 2.46 (1.38) |
Data are mean (standard deviation) values.
Table 2 shows the mean (SD) errors of the absolute value of the difference between the reference method and the smartphone-based method for various grasping orientations and compression directions (from Fig. 3). When the compressing direction was the gravity direction, as shown in Figure 3a–c, the means (SD) of the absolute errors were 1.42 (1.04) mm, 2.21 (1.64) mm, and 2.16 (1.48) mm, respectively, for U-CPR, whereas the errors were 0.93 (0.84) mm, 3.54 (1.42) mm, and 1.57 (1.20) mm, respectively, for PocketCPR. When the compressing direction was tilted 30° from the gravity direction, as shown in Figure 3d, the mean of errors in U-CPR was 3.13 (1.88) mm, but the mean of errors in PocketCPR was 11.56 (1.29) mm. The error in PocketCPR is four times larger than the error in U-CPR.
Table 2.
Errors in Four Types of Conditions
| GRASPING ORIENTATION AND COMPRESSION DIRECTION (MM) | ||||
|---|---|---|---|---|
| (a) | (b) | (c) | (d) | |
| U-CPR | 1.42 (1.04) | 2.21 (1.64) | 2.16 (1.48) | 3.13 (1.88) |
| PocketCPR | 0.93 (0.84) | 3.54 (1.42) | 1.57 (1.20) | 11.56 (1.29) |
Data are mean (standard deviation) values. Conditions (a), (b), (c) and (d) are shown in the respective panels of Figure 3.
Additionally, we tested the CCD estimation for a sudden change in the CCD. As shown in Figure 4, U-CPR followed the reference measurement more quickly than PocketCPR. In U-CPR, we showed the depth as an average of five compressions. In PocketCPR, the average requires more than eight to nine compressions.
Fig. 4.
Result of an experiment to observe the sudden change of chest compression depth. The linear variable differential transformer (LVDT) (○) is the reference measurement as a step function. U-CPR (×) follows faster than PocketCPR (Δ).
Discussion
In this study, we described the concept of a new real-time CCD estimation algorithm that was implemented on an Android smartphone. For evaluation of the algorithm, we analyzed the accuracy for various depths, grasping orientations, and compressing directions. As a result, the means of errors were below 2.5 mm for all conditions except the oblique compression, where the mean error was 3.13 mm. Because the 2010 AHA guidelines on CC for an adult patient recommend a compression that exceeds 2 inches (51 mm),1 2.5 mm is 5% of the minimal recommended depth, and U-CPR underestimates this depth. This error is in the acceptable range to be used as a feedback device for CCD.
When the compressing direction was tilted 30° from the gravity direction as in Figure 3d, the mean error in U-CPR was 3.13 (1.88) mm, but the mean error in PocketCPR was 11.56 (1.29) mm. With the exception of this condition, the mean errors in U-CPR and PocketCPR were similar. PocketCPR seems to measure the depth in the gravity direction only (the portion of * in Fig. 3d). As explained in the Introduction, CCs for pregnant women should be performed in a direction oblique to the gravity direction. In a narrow space, such as an elevator, oblique compression is also necessary to continue CC without interruption. Because U-CPR is more accurate for oblique compressions, it may constitute an advantage over PocketCPR (Fig. 5a and c). However, U-CPR overestimates the actual CCD when the rescuer compresses the chest at angles other than a flat surface, as shown in Figure 5b. In this case, PocketCPR estimates the CCD more correctly because it estimates only the gravity direction component. According to the right CPR posture, the center of mass of the rescuer should be directly above the patient. The possibility of oblique compression is not high, and the difference in the angle from the gravity direction is not large. Thus, we prefer U-CPR.
Fig. 5.

Three cases of different chest compression (CC). (a) When the patient is lying on a flat floor and the compressing direction is the gravity direction, U-CPR and PocketCPR correctly estimate the CC depth. (b) When the patient is lying on a flat floor and the compressing direction is oblique to the patient's chest, PocketCPR correctly estimates and U-CPR overestimates the CC depth. (c) When the patient lying on an oblique floor (as recommended for pregnant women) and the compressing direction is orthogonal to the floor, U-CPR correctly estimates and PocketCPR underestimates the CC depth.
As shown in Figure 4, U-CPR follows the stepwise changes of depths more quickly than PocketCPR. When the rescuer uses the feedback device, he or she must change the depth when it shows an alarm. If the device shows the instantaneous depth, the rescuer may oscillate between insufficient and excessive compression. Therefore, U-CPR displays the depth as the average of the five previous depths. A delay should occur simultaneously. A detailed examination of Figure 4 indicates that an average of eight or nine compression results in a long delay for PocketCPR.
U-CPR suffers from some limitations. When the patient lies down on a foam mattress, U-CPR can overestimate the CCD because it also measures the compression of the mattress.21 This problem is common in feedback devices that contain one sensor. The mattress compression can be reduced by using a backboard.22 Increasing the CCD to at least 65 mm if the patient is lying on a mattress could also compensate for the mattress compression depth, as suggested by Handley.23 In addition, the AHA guidelines for adult CPR recommend a full chest recoil after each compression, but U-CPR cannot detect whether the recoil was sufficient because it calculates the depth as the difference between the positive peak and the negative peak. This limitation is also caused by using an accelerometer.24
In addition to the feedback function, many other helpful functions are necessary for CPR-related apps. To implement a completion app, we will validate the app with the mannequin for large numbers of rescuers. Future work includes the development of a useful app with a CCD feedback function to ensure its widespread use to save more people.
Conclusions
The error of the CCD estimation was tolerable for the algorithm to be used in a smartphone-based CCD feedback app to ensure a compression of more than 2 inches (51 mm), which is the 2010 American Heart Association Guideline for adult CPR.
Acknowledgments
This work was supported by National Research Foundation grant NRF-2013R1A1A4A01006381 funded by the Korean Government.
Disclosure Statement
No competing financial interests exist.
Y.S. and Y.C. conceived the study, designed the trial, and obtained research funding. Y.C. and Y.S. developed the algorithm. Y.C. and J.O. supervised the trial conduct and data collection. Y.S. drafted the manuscript, and all authors contributed substantially to its revision. Y.C. takes responsibility for the article as a whole.
References
- 1.Berg RA, Hemphill R, Abella BS, Aufderheide TP, Cave DM, Hazinski MF, et al. Part 5: Adult basic life support: 2010 American Heart Association Guidelines for Cardiopulmonary Resuscitation and Emergency Cardiovascular Care. Circulation 2010;122(18 Suppl 3):S685–S705 [DOI] [PubMed] [Google Scholar]
- 2.Edelson DP, Abella BS, Kramer-Johansen J, Wik L, Myklebust H, Barry AM, et al. Effects of compression depth and pre-shock pauses predict defibrillation failure during cardiac arrest. Resuscitation 2006;71:137–145 [DOI] [PubMed] [Google Scholar]
- 3.Bellamy RF, DeGuzman LR, Pedersen DC. Coronary blood flow during cardiopulmonary resuscitation in swine. Circulation 1984;69:174–180 [DOI] [PubMed] [Google Scholar]
- 4.Christenson J, Andrusiek D, Everson-Stewart S, Kudenchuk P, Hostler D, Powell J, et al. Chest compression fraction determines survival in patients with out-of-hospital ventricular fibrillation. Circulation 2009;120:1241–1247 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Abella BS, Alvarado JP, Myklebust H, Edelson DP, Barry A, O'Hearn N, et al. Quality of cardiopulmonary resuscitation during in-hospital cardiac arrest. JAMA 2005;293:305–310 [DOI] [PubMed] [Google Scholar]
- 6.Wik L, Kramer-Johansen J, Myklebust H, Sørebø H, Svensson L, Fellows B, et al. Quality of cardiopulmonary resuscitation during out-of-hospital cardiac arrest. JAMA 2005;293:299–304 [DOI] [PubMed] [Google Scholar]
- 7.Gruber J, Stumpf D, Zapletal B, Neuhold S, Fischer H. Real-time feedback systems in CPR. Trends Anaesth Crit Care 2012;2:287–294 [Google Scholar]
- 8.Perkins GD, Augré C, Rogers H, Allan M, Thickett DR. CPREzy™: An evaluation during simulated cardiac arrest on a hospital bed. Resuscitation 2005;64:103–108 [DOI] [PubMed] [Google Scholar]
- 9.Skorning M, Beckers SK, Brokmann JC, Rörtgen D, Bergrath S, Veiser T, et al. New visual feedback device improves performance of chest compressions by professionals in simulated cardiac arrest. Resuscitation 2010;81:53–58 [DOI] [PubMed] [Google Scholar]
- 10.Pozner CN, Almozlino A, Elmer J, Poole S, McNamara D, Barash D. Cardiopulmonary resuscitation feedback improves the quality of chest compression provided by hospital health care professionals. Am J Emerg Med 2011;29:618–625 [DOI] [PubMed] [Google Scholar]
- 11.Heggustuen J. One in every 5 people in the world own a smartphone, one in every 17 own a tablet. Business Insider Dec. 15, 2013. Available at http://www.businessinsider.com/
- 12.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:436–441 [DOI] [PubMed] [Google Scholar]
- 13.Kovic I, Lulic I. Mobile phone in the chain of survival. Resuscitation 2011;82:776–779 [DOI] [PubMed] [Google Scholar]
- 14.ZOLL Medical Corporation. PocketCPR for Droid™. 2014. Available at www.pocketcpr.com/android.html (last accessed March20, 2014)
- 15.Hoek TLV, Morrison LJ, Shuster M, Donnino M, Sinz E, Lavonas EJ, et al. Part 12: Cardiac arrest in special situations: 2010 American Heart Association Guidelines for Cardiopulmonary Resuscitation and Emergency Cardiovascular Care. Circulation 2010;122(18 Suppl 3):S829–S861 [DOI] [PubMed] [Google Scholar]
- 16.Rees G, Willis B. Resuscitation in late pregnancy. Anaesthesia 1988;43:347–349 [DOI] [PubMed] [Google Scholar]
- 17.Aase SO, Myklebust H. Compression depth estimation for CPR quality assessment using DSP on accelerometer signals. IEEE Trans Biomed Eng 2002;49:263–268 [DOI] [PubMed] [Google Scholar]
- 18.Song Y, Chee Y. The development of feedback monitoring device for CPR. Conf Proc IEEE Eng Med Biol Soc 2011:3294–3297 [DOI] [PubMed] [Google Scholar]
- 19.Milette G, Stroud A. Errors and sensor signal processing. In: Professional Android sensor programming. Hoboken, NJ: John Wiley & Sons, 2012:103–120 [Google Scholar]
- 20.Android Developers Motion sensors. 2014. Available at http://developer.android.com/guide/topics/sensors/sensors_motion.html (last accessed March10, 2014)
- 21.Perkins GD, Kocierz L, Smith SC, McCulloch RA, Davies RP. Compression feedback devices over estimate chest compression depth when performed on a bed. Resuscitation 2009;80:79–82 [DOI] [PubMed] [Google Scholar]
- 22.Nishisaki A, Maltese MR, Niles DE, Sutton RM, Urbano J, Berg RA, et al. Backboards are important when chest compressions are provided on a soft mattress. Resuscitation 2012;83:1013–1020 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23.Handley AJ. In-hospital chest compressions—The patient on a bed. Resuscitation 2012;83:795–796 [DOI] [PubMed] [Google Scholar]
- 24.Oh J, Song Y, Kang B, Kang H, Lim T, Suh Y, et al. The use of dual accelerometers improves measurement of chest compression depth. Resuscitation 2012;83:500–504 [DOI] [PubMed] [Google Scholar]











