How It Works
To evaluate the user's CPR performance, the CPRactice algorithm calculates the accuracy, consistency, and depth of the chest wall compression.
​
Accuracy: Calculated by applying FFT to the acceleration data and extracting the most dominant, non-zero frequency. Ideally in the range of 100-120 bpm. Points are taken off based on percentage error if the user's compression frequency is not in the range.
​
Consistency: Calculated by applying FFT to segments of data and taking standard deviation of the local dominant frequencies. This score only reflects the consistency of the frequency, not depth.
​
Depth: Calculated by taking the double integral of the average acceleration over one pressing motion (downwards only). The average acceleration is depended on the amplitude of 0 Hz frequency (offset amplitude) and amplitude of the most dominant non-zero frequency. Ideally the depth should be in the range of 5-6 cm. Points are taken off based on percentage error if the user's compression depth is not in the range.
System
Compression is a one-dimensional movement. Thus, the algorithm considers only the acceleration (without g) on the z-axis.
This system can be regarded as a spring-mass-damper system with three forces:
-
Compression force: applied by the rescuer
-
Spring restoring force: proportionate to displacement of the chest wall
-
Damping force: determined by object material
​
​
​
​

Motion
Sketches of variables in the system over time.
(In this system, we assume positive direction of Z-axis to be away from the ground.)
Forces vs Time
The two main forces in the system, compression force and spring restoring force, work in opposite directions. When the chest wall is pressed, the compression force has larger magnitude than restoring force. The moment that the pressing motion ends, the spring restoring force takes over.
The damping force, which is not shown in this graph, is always in the opposite direction of the velocity.
Net Force/Acceleration
Velocity
Displacement
vs Time
Net force oscillates around zero. When it is negative, the chest wall has a downward acceleration; vice versa. Velocity and position of the chest wall follows a similar pattern. All these variables oscillate in a frequency that matches the frequency of the CPR performed. To calculate depth of compression, our algorithm takes the double integral of acceleration over half of a period.