cardio pulmonary resuscitation ( cpr ) is an emergency procedure performed on people under cardiac arrest and on people who stop breathing due to reasons such as drowning .
cpr 's main benefit is that it maintains blood flow , which prevents tissue and brain damage .
the procedure involves creating artificial blood circulation by applying rhythmic pressure to a person 's chest .
references to resuscitation attempts can be found in ancient texts that date back thousands of years , but the first known attempts at resuscitation in modern times occurred in the 18th century .
practitioners , then , used various techniques to resuscitate a person who was unconscious or not breathing .
these included  blowing air  into the mouth , massaging the chest , tickling the throat , or applying manual pressure to the abdomen .
these methods were most effective when used for drowning victims . over the years , practitioners refined the techniques , and until 1950s , the accepted resuscitation method was applying back pressure and arm lifting .
he along with dr . peter safar demonstrated the superiority of their cpr method to earlier methods .
their method used chest compressions in combination with periodic mouth - to - mouth breathing .
latest guidelines from the american heart association have modified the elam and safar cpr approach ; the aha recommends using continuous chest compression ( ccr ) because this approach works better than periodically stopping compressions for mouth - to - mouth breathing , . the first organized attempt to make citizens a part of the emergency procedure in cases of cardiac arrest was made in seattle in march of 1970 , .
fire department personnel were trained in cpr so that they could perform it on the victim before paramedics arrived to attempt defibrillation .
the data gathered from this exercise proved that when cpr was started within 23 minutes of the event , survival chances increased . in 1972
, community - based cpr training of general public has expanded across the united states . in 1981 ,
effective cpr consists of the following procedure , : 
 lay the person flat on his back.place your hand flat on the person 's upper chest between the nipples . for infants
only two fingers are used - the middle finger and the index finger . for adults
only , place your second hand above the first hand ( for children only one hand is used).start applying pressure to compress the chest.the recommended rate of chest compressions is about 100 per minute .
for infants only two fingers are used - the middle finger and the index finger .
for adults only , place your second hand above the first hand ( for children only one hand is used ) .
the depth of chest compression is about 2 - 2.5 inches for adults , about 1 - 1.5 inches for children , and about 1/3 inch for infants .
original aha guidelines emphasize a - b - c as a cpr guideline . in the acronym , a stands for airways , meaning that the person giving cpr needs to make sure that the airways are open ; b stands for breathing , meaning that the person giving cpr does mouth - to - mouth breathing ; and c stands for chest compressions . in traditional methods , periodic mouth - to - mouth breathing
is also done to replenish oxygen supply , but newer guidelines suggest that continued compression is more important .
consequently , mouth - to - mouth breathing has now become the third , optional , portion of cpr , .
the primary reason for the change is that most bystanders or paramedics hesitate to use mouth - to - mouth breathing with unknown people because mouth - to - mouth breathing may cause spread of infectious diseases . apart from concerns over infections , there has also been discussion on how often to give mouth to mouth breathing .
normally there is enough oxygen in the blood stream to only do continuous chest compressions .
since an oximeter may not be available at that moment , there is no way to determine the oxygen level ; therefore , it is difficult to determine whether mouth - to - mouth breathing is required . making mouth - to - mouth breathing
experts are also debating the need to give mouth - to - mouth breathing in cases where the blood oxygen saturation level falls . a person 's blood oxygen saturation level ( bos ) indicates how efficiently a body 's blood cells retain oxygen .
cardiopulmonary resuscitation is performed to force the movement of oxygenated blood through the circulatory system and prevent the damage of vital organs in the body .
the level is measured by analyzing the ratio between the amount of oxygenated hemoglobin and the total amount of hemoglobin present .
bos level ranges can help to determine a person 's risk of lung disease and tissue death .
this paper , however , focuses on the bos level 's ability to determine the cardiopulmonary resuscitation 's efficiency . with the knowledge of a victim 's blood oxygen saturation level
, the decision to give mouth - to - mouth breathing may be necessary to keep oxygenation at a healthy level . over the years ,
these devices improve the quality of cpr by providing feedback on proper placement of hands on chest and the correct frequency and depth of compressions . mechanical devices which give accurate frequency and depth of chest compression provide automatic cpr .
studies have shown that these automated cpr devices improve the survivability of patients who need out - of - hospital cpr . during an emergency it is likely that a person trained in cpr may not be available . in such situations
9 - 1 - 1 operators help the caller to administer cpr by giving instructions over a phone .
in such instances , a readily available technology would be useful in ensuring that people untrained could deliver cpr properly .
if the application is not available , a 9 - 1 - 1 operator can help in downloading that application .
however , having to download the application and then watch the video seriously reduces the window of survivability for the injured person . alternatively , there exist devices that give real - time feedback on the quality of cpr .
during an emergency situation , it is highly likely that persons trained in cpr are unavailable . even though devices can provide automatic cpr , these devices are highly unlikely to be accessible at the time of need . in such cases
9 - 1 - 1 operators provide cpr instructions over a phone . however , the success of such an approach depends upon the emotional and physical capabilities of the person actually administering the cpr . with newer technology ,
the operator may even attempt to send video instructions , which may assist in improving the cpr given .
however , again , the 9 - 1 - 1 operator may not have all the information necessary to determine whether the cpr is being done efficiently and helping the injured person .
currently , 9 - 1 - 1 operators can not evaluate the results of cpr remotely and , in fact , there is no proven method to evaluate cpr effectiveness even when a trained person is giving the cpr . a recent report from american heart association
strongly recommends that methods and technology should be developed to evaluate the quality metrics of cpr .
some of the highlights of their recommendations include the use of at least 1 modality of monitoring cpr performance , i.e. the compression depth and the frequency ; use at least one modality to monitor patient 's physiological response to resuscitative efforts ; and continually adjust resuscitative efforts based on the patient 's physiological response . in this paper
, we present a method to evaluate cpr performance in real - time without the need of special devices . we also show that many of the recommendations can be met by using the methods we propose . using the sensors in a smartphone , such as an accelerometer
, this paper describes an application that can evaluate and guide a person in giving effective cpr while providing timely feedback to the 9 - 1 - 1 operator .
the smartphone 's sensors provide feedback about chest compression frequency and depth , and about blood oxygen saturation levels .
the smartphone 's sensors provide feedback about chest compression frequency and depth , and about blood oxygen saturation levels . a smartphone controller ( box 1 ) holds an algorithm to evaluate data from sensors ( box 3 ) .
the system ( box 2 ) consists of the affected person and the person giving the cpr .
as mentioned in prior sections , continuous chest compressions have been emphasized over cardiopulmonary resuscitation as the most critical cpr procedure to perform in an emergency .
that said , mouth - to - mouth breathing remains a viable option in certain cases , especially when trained personnel are present .
we present a smartphone application which measurers the blood 's oxygen saturation without specialized equipment . in conjunction
, one smartphone can be used by the person giving the cpr where it measures the frequency and depth of compressions .
the data from these smartphones is continuously reported to the 9 - 1 - 1 operator who can use the information to guide the cpr giver .
a patent has been filed by one of the authors for devices that can measure the vital signs using sensors of the smartphones .
figure 2.cpr and its evaluation . the compression frequency , depth and the oxygen saturation levels are reported to the 9 - 1 - 1 operator .
the person giving cpr has a phone tied to her hands , as shown in the picture below the arrow .
a smartphone is also placed near the hand of the person receiving the cpr with finger on the camera lens as shown in the second picture below the arrow .
the compression frequency , depth and the oxygen saturation levels are reported to the 9 - 1 - 1 operator .
the person giving cpr has a phone tied to her hands , as shown in the picture below the arrow .
a smartphone is also placed near the hand of the person receiving the cpr with finger on the camera lens as shown in the second picture below the arrow .
it involves integrating acceleration readings to compute velocity and further integration of the calculated velocity to find the displacement or distance of movement .
several sources of error may arise in this process : 
 errors inherent in the accelerometer or caused by noise from the electronic signal.external errors  errors caused by force applied to the accelerometer such as lateral movements of the hands during cpr or movement in a vehicle when a patient is being transported while receiving cpr).error due to drift : these errors are introduced during the compression of the chest .
for example , the chest may not fully recover to its normal position before the next compression is started .
errors inherent in the accelerometer or caused by noise from the electronic signal . external errors  errors caused by force applied to the accelerometer such as lateral movements of the hands during cpr or movement in a vehicle
error due to drift : these errors are introduced during the compression of the chest . for example , the chest may not fully recover to its normal position before the next compression is started .
unfortunately the process of double - integration on these readings compounds these accelerometer reading errors  even a small error can produce large variation in calculated displacement .
measuring blood oxygenation levels using a smartphone is even trickier because the method has to be non - invasive , should not require additional devices , and should be simple and quick for anyone to use , even if not a health professional .
this section discusses the methods to measure the frequency and depth of chest compressions and the oxygen saturation levels using smartphones .
these three figures can guide persons administering cpr , even when they lack cpr training .
frequency of compressions : an accelerometer measures acceleration of movement in the x , y , and z axes .
when people lie on their backs , chest compressions are in the direction of the z axis .
so , each upward movement is considered to be negative acceleration ; each downward movement is considered to be positive acceleration . a complete up and down movement counts as one compression .
we can , therefore , calculate the frequency of compressions as up - down movements .
their straight - forward approach is to : 
 1)calculate velocity from acceleration as follows : given acceleration ( \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(a)\ ) 
 \end{document } and a period of time ( \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(t)\ ) 
 \end{document } , it is possible to calculate the change in velocity during the relevant time period . if the original velocity is available , the change in velocity at the end of the time period can be calculated using the equation:\documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \begin{equation * } \delta \textit{v } = at;\end{equation * } 
 \end{document } where \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(\delta \ ) 
 \end{document}v is the change in velocity during time \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(t\ ) 
 \end{document}. if the velocity at the start of the time 0 is \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(v_{0}\ ) 
 \end{document } , then velocity at time t is:\documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \begin{equation * } \textit{v}= \textit{v}_{0}+ \delta \textit{v}\end{equation * } 
 \end{document}2)calculate the distance as follows:\documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \begin{equation * } \delta d = \frac { ( \textit{v}_{0}+\textit{v})}{2 } \ast t.\end{equation * } 
 \end{document } where \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(\delta d\ ) 
 \end{document } is the change in distance , \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(v_{0}\ ) 
 \end{document } is the velocity at time \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(0,\ ) 
 \end{document } and \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(v\ ) 
 \end{document } is the velocity at the time \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(t\ ) 
 \end{document}.if \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(d_{0}\ ) 
 \end{document } is the distance at time 0 , the distance at the time \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(t\ ) 
 \end{document } is:\documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \begin{equation * } d = \delta d + d_{0}.\end{equation * } 
 \end{document } calculate velocity from acceleration as follows : given acceleration ( \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(a)\ ) 
 \end{document } and a period of time ( \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(t)\ ) 
 \end{document } , it is possible to calculate the change in velocity during the relevant time period .
if the original velocity is available , the change in velocity at the end of the time period can be calculated using the equation:\documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \begin{equation * } \delta \textit{v } = at;\end{equation * } 
 \end{document } where \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(\delta \ ) 
 \end{document}v is the change in velocity during time \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(t\ ) 
 \end{document}. if the velocity at the start of the time 0 is \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(v_{0}\ ) 
 \end{document } , then velocity at time t is:\documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \begin{equation * } \textit{v}= \textit{v}_{0}+ \delta \textit{v}\end{equation * } 
 \end{document } calculate the distance as follows:\documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \begin{equation * } \delta d = \frac { ( \textit{v}_{0}+\textit{v})}{2 } \ast t.\end{equation * } 
 \end{document } where \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(\delta d\ ) 
 \end{document } is the change in distance , \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(v_{0}\ ) 
 \end{document } is the velocity at time \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(0,\ ) 
 \end{document } and \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(v\ ) 
 \end{document } is the velocity at the time \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(t\ ) 
 \end{document}. if \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(d_{0}\ ) 
 \end{document } is the distance at time 0 , the distance at the time \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(t\ ) 
 \end{document } is:\documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \begin{equation * } d = \delta d + d_{0}.\end{equation * } 
 \end{document } unfortunately , these calculations assume a straight - line motion , which is not the case for cpr .
this means we need to find velocity and displacement while the accelerometer readings are still being logged , and so we need to use numerical methods that allow for integration on data readings as they are logged .
one method , trapezoidal rule , offers an approximation technique for calculating the integration . the existing literature on calculating displacement from accelerometer readings is based on devices that are dedicated to cpr compressions .
may not be easily accessible , but a smartphone with an accelerometer is more likely to be available .
our project assumed that an untrained person administers the cpr and does not have access to such dedicated devices .
for our experiments , we collected data by placing the smartphone in the middle of the chest . blood oxygen saturation level : we determined blood oxygen saturation levels using the camera lens of the smartphone .
pulse oximeters measure the visible and infra - red spectrum of the oxy - hemoglobin and de - oxy hemoglobin , respectively . a pulse oximeter works by exploiting particular properties of light .
when light passes through a substance ( such as blood ) , the substance absorbs a certain amount of light .
the amount of absorbed light depends on the sample 's concentration , the sample 's absorbance capacity , and the light 's path length .
we calculated the bos level using beer - lambert 's law:\documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \begin{equation * } a = abc\end{equation * } 
 \end{document } where , \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(a\ ) 
 \end{document } is absorption ; \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(a\ ) 
 \end{document } is molar absorptivity of the sample , \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(c\ ) 
 \end{document } is concentration of the sample , and \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(b\ ) 
 \end{document } is path length .
oxy - hemoglobin ( hbo2 ) and deoxy - hemoglobin ( hb ) absorb light at different wavelengths .
oxy - hemoglobin ( hbo2 ) absorbs more infra - red light than deoxy - hemoglobin ( hb ) ; hb absorbs more red light .
oxygen saturation is calculated using the following relation:\documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \begin{equation * } \mathrm { spo2 = f(\varphi ) ; \;\;\ ; { \rm where}\;\;\ ; \varnothing = } \left ( \frac { ac_{red}/dc_{red}}{ac_{ir}/dc_{ir}}\right ) \!.\end{equation * } 
 \end{document }
in this section we discuss issues we encountered during data collection and the steps we took to resolve them .
one of the first problems resolved concerned placement of the smartphone on the person receiving cpr .
such a placement can be extremely uncomfortable and can cause injury if the smartphone is pressed against the chest during cpr . placing the smartphone between the palms of the person giving cpr
the screen may crack under pressure . additionally , this placement is uncomfortable for the person giving the cpr .
the ideal solution was to place the phone above the hands of the person giving the cpr ( see figure 2 ) . in these experiments
, we tied the smartphone to the hands so that it did not fall off .
this can be done by any piece of cloth such as a shirt or undershirt .
there are two kinds of manikins used for training - a soft - chest ( sponge ) manikin and a hard - chest manikin .
figure 3 shows the accelerometer plot for a student performing cpr on a soft - chest manikin ; figure 4 shows a similar plot for an instructor performing cpr on a soft - chest manikin .
it may be observed that the best results were from the instructor doing the cpr on a hard - surface manikin .
figure 4.accelerometer readings for an instructor doing cpr using a sponge manikin . the compression frequency and depth are not uniform .
when the accelerometer moves towards gravity , the acceleration is considered positive and when it moves against the gravity , it is considered as the negative direction .
we can count the number of times the accelerometer readings show a change in the sign of magnitude from positive to negative number .
however , calculating depth of compression is subject to errors from several sources , and so our algorithm had to be fine - tuned to reduce the influence of such errors on our results . in this section we document efforts to improve the accuracy of calculation of depth of cpr compressions . when we used a simple method of double integration to calculate the compression depth ( see figure 6 ) , the depth of compression varied up to 40 cm .
the integration function uses the magnitude of acceleration and velocity over the time period between two successive readings .
so , if the time between two successive readings was large , the algorithm calculated too large a displacement value .
the first change used the fact that cpr involves restricted and repeated movements in a vertical direction .
we found even a minor error in the acceleration magnitude can result in a large error in displacement measurements .
we modified our algorithm to calculate a rolling average after a number of accelerometer readings were logged .
figure 7 shows a plot of the acceleration magnitude and the corresponding velocity and the calculated distance .
this solution localized errors of magnitude to within one compression , which provided further correction to errors that build over time .
dots indicate points where velocity is reset to zero . the y - axis is m / s\documentclass[12pt]{minimal } 
 \usepackage{amsmath } 

\usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(^{2}\ ) 
 \end{document } for acceleration , dm / s for velocity and cm for distance .
the y - axis is m / s\documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(^{2}\ ) 
 \end{document } for acceleration , dm / s for velocity and cm for distance . in this section
the experimental setup consists of the following steps : 
 write an android application to calculate the cpr depth from the smartphone 's accelerometer.use a commercially - available manikin designed for cpr training to collect data .
the force required to press the manikin 's chest must match the actual force required to press a human 's chest during a real cpr.use a mobotix camera to record cpr compressions .
the professional security mobotix camera allows us to study video frame by frame and determine actual depth of compression.compare the calculated cpr depth for each compression with the actual movement observed on video .
write an android application to calculate the cpr depth from the smartphone 's accelerometer . use a commercially - available manikin designed for cpr training to collect data .
the force required to press the manikin 's chest must match the actual force required to press a human 's chest during a real cpr .
the professional security mobotix camera allows us to study video frame by frame and determine actual depth of compression .
compare the calculated cpr depth for each compression with the actual movement observed on video .
we overlaid a scale on the image to allow us to calibrate the actual movement during cpr as compared to the observed movement on the video frame .
after recording 40 seconds of cpr , the video file was played frame by frame and the actual depth of cpr was measured .
our algorithm then compared the two to determine the difference between the actual depth of compression ( as observed on the video frame ) and the depth calculated by our application . 

lines of scale are superimposed to calibrate movement as the manikin chest is compressed . in this section
the application prompts the cpr giver to increase or decrease the depth of chest compression to meet the 2 - 2.5  depth requirement .
similarly , our application gives a prompt when the frequency of compressions is not within a range of 90100 .
the number of compressions volunteers performed during these 30 seconds ranged from 30 to 50 .
it shows the accuracy of the depth calculation done by our application as compared to the actual depth as observed in the mobotix video .
our application 's accuracy ranged from a low of 57% to a high of 98% .
the range is from a low of 57% to a high of 98% . in the previous section we discussed the accuracy of our application to determine the depth of compression .
the focus was on how accurately the application can calculate the depth as compared to the actual depth . in this section
as has been noted earlier , the person administering the cpr must accurately judge whether the chest has been compressed to the recommended depth before releasing the chest to return to normal .
our application gives an alert when the depth of the compression falls outside an acceptable standard range .
 one of the factors we considered was the accuracy of our application 's calculation .
if the accuracy of a particular calculated depth of compression is low , then the decision to provide an alert by the application may be inaccurate . figure 10 shows a bar plot comparing the actual compression depth and the calculated compression depth for the same volunteer as in figure 9 .
it may be observed that the calculated depth value reaches near 2  inch value for many compressions , but the actual depth never reaches the 2  inch value .
so , for these compressions , the algorithm will not give an alert , even though it should have given one .
some of the calculated errors have a positive magnitude and some have a negative magnitude .
table-1 shows the accuracy of average over different time durations ranging from 1 second to 10 seconds . 

figure 10.comparison of calculated compression depth and the actual compressions depth for an individual . 

the rows show accuracy for alerts given for each compression , and for each second between 1 and 10 seconds .
total alerts shows the total number of alerts that occur during the specified time period .
accuracy range for alerts% shows , in 5% increments , the number alerts with compression accuracy .
for example , when an alert is given every second , 6 alerts of the 20 alerts have a compression accuracy of less than 85% . however , when an alert is given every 5 seconds , all the alerts have compression accuracy greater than 85% .
the rows show accuracy for alerts given for each compression , and for each second between 1 and 10 seconds .
total alerts shows the total number of alerts that occur during the specified time period .
accuracy range for alerts% shows , in 5% increments , the number alerts with compression accuracy .
for example , when an alert is given every second , 6 alerts of the 20 alerts have a compression accuracy of less than 85% .
however , when an alert is given every 5 seconds , all the alerts have compression accuracy greater than 85% .
a person requires a few seconds to understand and respond to an alert . by the time the person reacts
this leads to confusion and the person may not be able to adjust their compressions accurately and in a timely manner .
we did an analysis to decide how frequently the alert should be given ( table 1 ) .
when our application gave an alert for each compression , out of a total of 38 alerts ( for 38 compressions in that session ) , 21 alerts were less than 90% accurate .
this means that for 21 alerts the accuracy of calculated depth as compared to the actual depth was less than 90% .
the total of 38 alerts assumes that we give an alert for each compression ( assuming no compression is going to be 100% accurate ) .
when our application gave an alert every second , we averaged the calculated depth of all compressions within each second .
as table-1 indicates , the total number of alerts for one second will be 20 .
when our application gave an alert every 6 seconds , then 4 alerts were more than 90% accurate .
we continued this analysis through 10 seconds . at 10 seconds , our application gave two alerts , each 100% accurate .
we conclude that the accuracy of alerts increases when an alert is given every few seconds rather than for every compression .
the accuracy improves because the errors with negative magnitude adjust the errors with positive magnitude with in the time period .
so the overall accuracy improves . within the \documentclass[12pt]{minimal } 
 \usepackage{amsmath } 
 \usepackage{wasysym } 
 \usepackage{amsfonts } 
 \usepackage{amssymb } 
 \usepackage{amsbsy } 
 \usepackage{upgreek } 
 \usepackage{mathrsfs } 
 \setlength{\oddsidemargin}{-69pt } 
 \begin{document } 
 } { } \(6 -7\ ) 
 \end{document } second range , our application 's accuracy is reasonable at more than 90% .
but , our experiments suggest an alert every 67 seconds does not provide persons giving cpr enough time to adjust their cpr compression depth .
our experiments also suggest that an optimum time for giving alerts is every 10 seconds .
as explained , alerts provide feedback to a person giving cpr so that person can adjust the compression depth or frequency to fall within a prescribed range .
the application issued alerts when the compression depth fell below 1.5  ( low alert ) or rose above 2.5  ( high alert ) .
the application provided a low alert at 10 seconds and then , again , at 20 seconds . at 30 seconds
the compression depth then increased to more than 2  for a 30-second period , so no alerts were issued . at 80 seconds ,
we concluded that our application achieved its purpose of providing alerts to the cpr giver , which enabled the cpr giver to adjust to more effectively administer cpr . 

the results show that the accuracy ranges from a low of 77% to a high of 99% .
one may have to give cpr as the patient is being transported in a moving vehicle to the hospital .
several factors come into play in a moving vehicle that increases the difficulty of calculating the compression depth accurately when using a smartphone accelerometer .
if shock absorbers are inadequate , an accelerometer records vehicle movements in the z axis , skewing the z axis motion of the chest compressions . road condition presents another major factor that contributes to increased errors .
bumps in the road , lane changes , and traffic turns also affect readings . traffic patterns also add to the randomness of readings .
the vehicle may have to be slow at times and then accelerate as the traffic moves .
it may have to stop at traffic lights and then accelerate . even if we keep factors constant , such as using the same vehicle , driving on the same road and even driving at the same speed , randomness of a traffic pattern still produces different results each time the cpr is attempted .
the road had almost no traffic , required no turns for a few miles , and had no traffic lights .
we , then , drove at a constant speed of 30 mph to minimize movements due to vehicle motion .
table 3results of cpr in a moving vehicle , showing the depth of compressions in inches .
results of cpr in a moving vehicle , showing the depth of compressions in inches .
should the injured person 's blood oxygen saturation level drop precipitously , the person may suffer physical deterioration and even death . to reduce this risk ,
our algorithm must monitor the bos levels while it is measuring compression frequency and depth . in this section
we describe a procedure that uses smartphones to measure the bos level using principles of optics . while a person gives cpr , this information can assist in deciding whether to give breathing .
however , many prefer to avoid using the technique unless absolutely necessary because of possible exposure to infectious diseases . our algorithm needed to provide a method for the 9 - 1 - 1 dispatcher or the person giving the cpr to determine whether mouth - to - mouth breathing was really necessary . to resolve this issue
the surface of the injured person 's fingertip ( the area of analysis ) is placed on the smartphone 's camera lens . by taking a video , a beam of near - infrared light is passed through the finger .
as the light passes through , the smartphone creates video of the area of analysis . the video is then analyzed to determine the rgb values ( red green blue ) .
rgb values of the refracted light in the blood are then analyzed for the scattering effect of near - infrared light .
the two phones can simultaneously send information to the 9 - 1 - 1 operator .
after measuring the oxygen saturation level under normal circumstance , we wanted to confirm that our system can detect reduced levels of oxygen in the blood .
we used occlusion spectroscopy , the method of using over - systolic pressure to temporarily stop the flow of blood to the finger to collect data , ( figure 12 ) . in our study
this allowed us to measure blood flow in the upper layers of the finger . .
later when occlusion is removed , the oxygen saturation level reaches the normal value and our system can measure this return to the normal value .
the occlusion experiment confirmed that we can indeed measure the depletion of oxygen saturation in the blood using the optical features of a smartphone .
in fact , occlusion allowed us to obtain a set of data points instead of one data point .
the blood flow to the finger is decreased by applying pressure to it . to establish standardization
, we also required a method of dividing the intensity of the blood pulse ( ac ) by the intensity of the blood color ( ad ) .
we applied this to data to analyze both the intensity of green and of red values .
the green ac / dc value was then divided by the red ac / dc value .
this value corresponds to the percentage of blood oxygen saturation . figure 13 shows the oxygen saturation level as it drops to 50% after occlusion .
the graph also shows that the oxygen saturation level recovers back to 100% after occlusion is removed . 

about 50% occurs . then the saturation level returns to 100% after occlusion is removed .
a drop in oxygen saturation level to about 50% occurs . then the saturation level returns to 100% after occlusion is removed .
, we found that the rate of the decay of oxygen varies with each subject . while some subjects experienced a quick decrease of blood oxygen , other subjects experienced a slow decay .
the amount of oxygen within the blood in the finger dropped significantly for the first few seconds and then finally stabilized for each subject .
the amount of oxygen within the blood in the finger dropped significantly for the first few seconds and then finally stabilized for each subject .
. the application can then provide feedback to the person administering cpr to improve its effectiveness .
existing applications available on smartphones simply furnish a short video tutorial on how to perform cpr .
our smartphone application prompts the cpr giver in real time on when and how to adjust their frequency and depth of chest compressions to meet cpr guidelines .
our experiments ' results show that our smartphone application can be used to effectively administer cpr , even by people who have not been trained to give cpr . in emergency situations , where a trained person may not be easily available and timing is crucial
, these devices can mean the difference between life and death . additionally , the devices ' sensors can also help by continuing to provide vital information to paramedics as they rush a patient to a hospital . by measuring oxygen decay using the smartphone camera as occlusion
is induced upon the finger , our application allows accurate determination of the blood oxygen saturation level . by using the ubiquitous smartphone , people performing cardiopulmonary resuscitation can also determine when the frequency and depth of their compressions enhance blood flow .
for example , the oxygen saturation level may offer a better indicator of cpr effectiveness than the depth or frequency of compressions .
the method we have proposed and developed helps in meeting the latest recommendations of the america heart association .
our method helps in monitoring the cpr , it provides real time feedback to the person giving cpr and insures that the quality of cpr meets the guidelines 
 . for future work
, additional experiments may improve the cpr depth calculations in a moving vehicle , in actual traffic and in uncontrolled conditions .
also future studies may help determine a more accurate time between alerts rather than the 10 seconds we used .
 timely cardio pulmonary resuscitation ( cpr ) can mean the difference between life and death . 
 a trained person may not be available at emergency sites to give cpr . 
 normally , a 9 - 1 - 1 operator gives verbal instructions over the phone to a person giving cpr . in this paper , we discuss the use of smartphones to assist in administering cpr more efficiently and accurately . 
 the two important cpr parameters are the frequency and depth of compressions . in this paper 
 , we used smartphones to calculate these factors and to give real - time guidance to improve cpr . 
 in addition , we used an application to measure oxygen saturation in blood . 
 if blood oxygen saturation falls below an acceptable threshold , the person giving cpr can be asked to do mouth - to - mouth breathing . 
 the 9 - 1 - 1 operator receives this information real time and can further guide the person giving cpr . 
 our experiments show accuracy > 90% for compression frequency , depth , and oxygen saturation . 
Introduction
Motivation
Experiments and Results
Conclusion