Published on 19.04.18 in Vol 6, No 4 (2018): April
Preprints (earlier versions) of this paper are available at http://preprints.jmir.org/preprint/9290, first published Oct 31, 2017.
Measuring Risky Driving Behavior Using an mHealth Smartphone App: Development and Evaluation of gForce
Background: Naturalistic driving studies, designed to objectively assess driving behavior and outcomes, are conducted by equipping vehicles with dedicated instrumentation (eg, accelerometers, gyroscopes, Global Positioning System, and cameras) that provide continuous recording of acceleration, location, videos, and still images for eventual retrieval and analyses. However, this research is limited by several factors: the cost of equipment installation; management and storage of the large amounts of data collected; and data reduction, coding, and analyses. Modern smartphone technology includes accelerometers built into phones, and the vast, global proliferation of smartphones could provide a possible low-cost alternative for assessing kinematic risky driving.
Objective: We evaluated an in-house developed iPhone app (gForce) for detecting elevated g-force events by comparing the iPhone linear acceleration measurements with corresponding acceleration measurements obtained with both a custom Android app and the in-vehicle miniDAS data acquisition system (DAS; Virginia Tech Transportation Institute).
Methods: The iPhone and Android devices were dashboard-mounted in a vehicle equipped with the DAS instrumentation. The experimental protocol consisted of driving maneuvers on a test track, such as cornering, braking, and turning that were performed at different acceleration levels (ie, mild, moderate, or hard). The iPhone gForce app recorded linear acceleration (ie, gravity-corrected). The Android app recorded gravity-corrected and uncorrected acceleration measurements, and the DAS device recorded gravity-uncorrected acceleration measurements. Lateral and longitudinal acceleration measures were compared.
Results: The correlation coefficients between the iPhone and DAS acceleration measurements were slightly lower compared to the correlation coefficients between the Android and DAS, possibly due to the gravity correction on the iPhone. Averaging the correlation coefficients for all maneuvers, the longitudinal and lateral acceleration measurements between iPhone and DAS were rlng=0.71 and rlat=0.83, respectively, while the corresponding acceleration measurements between Android and DAS were rlng=0.95 and rlat=0.97. The correlation coefficients between lateral accelerations on all three devices were higher than with the corresponding longitudinal accelerations for most maneuvers.
Conclusions: The gForce iPhone app reliably assessed elevated g-force events compared to the DAS. Collectively, the gForce app and iPhone platform have the potential to serve as feature-rich, inexpensive, scalable, and open-source tool for assessment of kinematic risky driving events, with potential for research and feedback forms of intervention.
JMIR Mhealth Uhealth 2018;6(4):e69
- kinematic risky driving behavior;
- naturalistic driving studies;
- elevated g-force;
- lateral acceleration;
- longitudinal acceleration;
Teenage drivers, compared to other age groups, have the highest risk of fatal automobile crashes per driven mile . In 2015, there were 221,313 teenage drivers admitted to hospital emergency rooms, which resulted in 2333 fatalities (Centers for Disease Control statistics, average of 6 per day) [ ]. Contributing factors to teenage crashes include night-time driving, speeding, impairment due to alcohol or other drugs, and secondary task engagement such as mobile phone use, teenage passenger presence, and eating [ , ].
While there is substantial individual variability in risk  and rapid improvement in driving outcomes with age and experience, the first year of driving is particularly risky [ , ]. The high risk among novice teenage drivers has been attributed to young age, inexperience, and risky driving behaviors [ ]. A unique characteristic of teenage risky driving is a high rate of elevated acceleration (g-force) events due to hard stops, rapid starts, sharp turns, and over-correction maneuvers, reflecting poor speed control or volitionally erratic driving [ ]. The rate of elevated g-force events, termed kinematic risky driving (KRD), are 4-5 times higher among young drivers than adults [ ] and are prospectively associated with crash likelihood [ ]. KRD can be assessed by accelerometers installed in vehicles in naturalistic driving studies (NDSs) and are sometimes employed to provide driving performance feedback to teenage drivers and their parents [ ]. NDSs [ , ], designed to objectively assess driving behavior and outcomes, are conducted by equipping vehicles with dedicated instrumentation (eg, accelerometers, gyroscopes, Global Positioning System [GPS], and cameras) that provide continuous recording of acceleration, location, videos, and still images for eventual retrieval and analyses. However, this research is limited by several factors: the cost of equipment installation; management and storage of the large amounts of data collected; and data reduction, coding, and analyses. Modern smartphone technology includes accelerometers built into phones, and the vast, global proliferation of smartphones could provide a possible low-cost alternative for assessing KRD.
Research to date on driver-monitoring smartphone apps have mainly focused on monitoring driver behavior as indicated by vehicle lateral and longitudinal accelerometer data [- ]. Unfortunately, most of these apps do not provide features (eg, video capture, event selectivity, real-time feedback) or tools (eg, downstream data collection, processing, and reporting) for a comprehensive analysis of events. Currently, smartphone video capability has only been used for driver fatigue detection, disregarding other driver distractions such as eating or drinking. Applying these existing apps to driving research presents significant challenges, including the following: (1) proprietary code (eg, not open source, therefore not modifiable); and (2) data accessibility, scalability, and research suitability (eg, provide raw data) for innovative data analysis and development of methods to provide feedback as a means of preventive intervention.
Advances in mHealth solutions and data-centralization methods, including smartphone assessments, could result in reduced cost and complexity associated with collecting comprehensive driving data, and enabling increased and innovative driving research. Additionally, driving data could be collected by smartphones from previously unmeasured populations (eg, lower socio-economic strata, low-income countries), which could result in further app diversification, research insights, and a wider impact on driving safety.
A recent survey confirmed the continued popularity and dominant market share of the iPhone among teenagers; 81% of surveyed US teenagers owned an iPhone, and this number is projected to grow . However, no research has reported the utility of the iPhone for assessing KRD. The purpose of this work was to evaluate the utility of a simple, nonproprietary iPhone app to assess teenage KRD behavior. The research evaluates the feasibility of using iPhone devices as a research tool for NDS by comparing linear acceleration acquired with iPhone devices to acceleration measurements obtained simultaneously with an Android smartphone (Samsung Galaxy S5) and the in-vehicle miniDAS data acquisition system (DAS) developed at the Virginia Tech Transportation Institute (VTTI).
The smartphone Application to Measure Risky Driving Behavior and Predict Crashes (gForce App), was developed in Swift, which is a general-purpose, multi-platform, programming language for iOS using an Xcode environment (Apple, Inc). The gForce App was tested on the iPhone 6 (Apple, Inc) running iOS 10.3.1. The iPhone incorporates the Sensortec BMA280 3-axis accelerometer and the InvenSense MP67B 6-axis accelerometer, gyroscope, and magnetometer combined sensor with an on-chip digital motion processor (DMP) with sensor-fusion capabilities. Sensor-fusion is a technology (ie, firmware) that algorithmically combines data from multiple sensors to mitigate the limitations of the individual sensors to more accurately calculate the real-time position and orientation of the iPhone device. In addition, but not part of this research, the gForce app utilizes the iPhone dual cameras (ie, front and back cameras). The front camera records a video of the driver, while the back camera captures still images outside the vehicle.
The gForce App is designed to continuously record (ie, 10 Hz nominal sampling rate) linear acceleration (acceleration of the device, excluding the effect of gravity on the device) and rotation data for the x, y, and z axes. Immediately, the gForce App calculates a directionless g-force by combining the linear acceleration data from all three axes. The data is stamped with Coordinated Universal Time and GPS location. Other app features include: an audio warning when a g-force event is triggered, a capability of uploading JSON formatted files to a centralized database, and a fully integrated navigation solution.
This navigation feature may reduce the driver’s desire to switch to another app, which, due to iOS limitations, would effectively disable gForce camera acquisitions even though the app would continue to run otherwise (eg, measure and upload g-forces).
The iPhone acceleration measurements were compared with the acceleration values acquired by a custom-built app on a Galaxy S5 (Samsung, Inc) running Android 4.5.2 (Google, Inc), and the DAS. Similar to the iPhone gForce App, the Android app and DAS system continuously record acceleration and rotation measurements along three axes, stamped with time and location. The Galaxy S5 utilizes a InvenSense MP65M 6-axis gyroscope, accelerometer, and magnetometer-combined sensor with a DMP. The DAS device is equipped with a STMicroelectronics LSM303DLM sensor module, which includes a 3-axis accelerometer and three-axis magnetometer. The DAS device does not provide onboard sensor-fusion technology. Similar to the iPhone gForce App, the Android app features wireless uploading of data to a centralized database in JSON and, in addition, CSV file format. The DAS system requires data transfer via a Secure Digital card. The Android app was pilot tested and refined based in small-scale field tests in Washington D.C. and was compared to the DAS in a previous experiment . The DAS has been widely employed in NDSs and is considered to provide reliable g-force measures [ , ].
Device testing consisted of the following two parts: (1) test track driving on the Virginia Smart Road research facility, which is managed by VTTI and owned and maintained by the Virginia Department of Transportation; and (2) street driving in Christiansburg, VA.
shows the orientation and location of the devices used in this study. These devices included an Android phone (#1) and two iPhones (#2 and #3) mounted on the dashboard, two Android phones (#4 and #5) mounted on the windshield, and the permanently installed DAS device (#6). A fourth Android phone (not shown) provided the driver with a g-force estimation during each maneuver, which helped to ensure the desired g-forces were generated. Experimental testing on the Smart Road consisted of consecutive groups of driving maneuvers, including: 10 moderate and 5 hard cornering for each left and right directions on a roundabout ( a), braking (15 hard) and acceleration (5 mild) driving in a straight line ( b), and 12 moderate and 6 hard turning maneuvers in each left and right directions ( c). The street-driving phase of the test (Christiansburg, VA, ) was comprised of normal driving maneuvers and road conditions, such as: 3 stop signs, 2 traffic lights, 2 left and 6 right turns, 4 left and 2 right U-turns, 7 left and 5 right cornering, 14 speedbumps, and 8 potholes. The duration of the test was 10 minutes 14 seconds. There were four passengers in the car.
Data Processing and Analysis
Postprocessing was performed in MATLAB (MathWorks, Inc). To reduce noise and the number of false positives (ie, g-force events associated with speedbumps and potholes), a second-order low-pass Butterworth digital filter with a cutoff frequency of 0.4 Hz was applied to iPhone and Android measurements. DAS sensor data was processed on the device with a 5 Hz low-pass filter, followed by a MATLAB low-pass filter with parameters identical to iPhone and Android data post-processing. The Pearson correlation coefficients, r, for acceleration along x (lateral, rlat), y, and z (longitudinal, rlng) axes were estimated for the iPhone (the average of two iPhones) versus DAS, and Android (the average of two Androids) versus DAS.
Lateral (ie, x-axis) acceleration corresponds to sideways movement in relationship to the direction of travel, while longitudinal (ie, z-axis) acceleration corresponds to acceleration in the direction of travel. In this work, we report correlation coefficients for the longitudinal and lateral acceleration measurements only. The average duration of the g-force events over 0.45 g were estimated for each device. This threshold was selected for all events to provide consistent values for analyses.
Gravity Correction on the Android and Data Acquisition System
Preliminary analyses indicated a poor correlation between the Android linear acceleration and the DAS acceleration measurements. In addition, the amplitude of the signal consistently below the threshold of 0.45 g for all maneuvers revealed that the gravity correction on the Android device was ineffective in correctly adjusting for the effect of gravity. This gravity correction issue was especially pronounced during the braking maneuvers where the correlation coefficients between the Android linear longitudinal (a) and lateral ( b) acceleration and DAS acceleration measurements were rlng=0.05 and rlat=0.10, respectively, while the correlation coefficients for the same maneuvers without gravity correction on the Android device were rlng=0.93 and rlat=0.89 for the longitudinal and lateral acceleration measurements, respectively. shows a similar trend between the Android and iPhone gravity-corrected acceleration measurements. Therefore, in this work, the Android acceleration measurements without gravity correction were used for estimating correlation coefficients between the Android and DAS devices.
Effect of Weight Distribution on Kinematic Measures
The weight distribution (ie, vehicle lean) within the vehicle (ie, number of passengers and their location) had an effect on the DAS acceleration measurements. As seen in, the baseline offset shifted (black arrows) as passengers entered or exited the vehicle. shows the Android acceleration measurements were similarly affected by weight distribution, while the iPhone baseline offset correctly remained at zero.
and show that in the absence of gravity correction, the DAS and Android acceleration amplitude measurements were either overestimated or underestimated, depending on the baseline offset. The iPhone acceleration amplitude measurements were not affected by the changing weight distribution within the vehicle ( ).
Correlations of Acceleration Measures
In the test track assessment, the correlation coefficients between acceleration measurements acquired with DAS and Android devices were consistently higher than the correlation between DAS and iPhone devices for the same measurement, possibly because neither of these devices correct for gravity (, , and ). Averaging all maneuvers, the correlation coefficients between longitudinal and lateral accelerations between iPhone and DAS were rlng=0.71 and rlat=0.83, respectively, while the corresponding acceleration measurements between Android and DAS were rlng=0.95 and rlat=0.97 ( ). This study also revealed that the correlation coefficients between the iPhone and DAS lateral accelerations were higher than the corresponding longitudinal accelerations for most maneuvers ( ). A similar lateral versus longitudinal correlation difference was observed between the Android and DAS measurements ( ).
As shown in, the average duration of the g-force events above 0.45 g for the hard cornering maneuvers in the lateral direction were 9.5, 8.4, and 9.5 seconds for the DAS, iPhone, and Android devices, respectively. Similarly, the average duration of the hard-braking maneuvers above threshold were 3.5, 3.4, and 3.1 seconds for the DAS, iPhone, and Android devices, respectively. The average duration of the g-force events above 0.45 g during the hard turns were 3.9, 2.7, and 3.6 seconds for the DAS, iPhone, and Android devices, respectively.
In the street driving phase, the correlation coefficients (and ) were lower than those for the data obtained during experimental testing on the Smart Road, perhaps due to false positives (eg, speedbumps and potholes). The correlation coefficient between the iPhone and DAS longitudinal and lateral accelerations were rlng=0.62 and rlat=0.71, respectively; the corresponding correlation coefficients between the Android and DAS measurements where rlng=0.86 and rlat=0.91.
|Left hard (>0.45 g)||0.86||0.94||0.65||0.88|
|Right hard (>0.45 g)||0.78||0.97||0.63||0.98|
|Braking hard (>0.45 g)||0.76||0.93||0.84||0.89|
|Left hard (>0.45 g)||0.87||0.99||0.90||0.93|
|Right hard (>0.45 g)||0.85||0.98||0.75||0.96|
aPearson correlation coefficients, r, for acceleration along x (lateral, rlat) and z (longitudinal, rlng) axes.
The main objective of this study was to evaluate performance of a custom-built gForce iPhone app as a potential research tool. This evaluation compared the iPhone gForce acceleration measurements with data collected with the DAS device, which is the standard equipment in on-road NDSs. The findings indicated that correlations between measures of elevated g-forces from the iPhone gForce App and the DAS were reasonably high, ranging from r=0.78 to 0.81. This finding suggests that the iPhone 6 with integral sensor-fusion technology may be a viable data acquisition platform for detecting elevated g-forces, with the added benefit of decoupling measurements from gravity (ie, vehicle orientation relative to gravity). In comparison, Android and DAS measurements were highly sensitive not only to road topography (eg, road lateral slope or banking), but also to the weight distribution within the vehicle (ie, vehicle lean), thus altering acceleration amplitudes along individual axes. Due to this sensitivity, the average durations of the elevated g-force events captured with the iPhone device differed from the corresponding durations acquired with DAS and Android devices. This effect was especially pronounced during cornering and turning, since the vehicle was leaning during these maneuvers. In contrast, the highest similarity between the average durations of the elevated g-force events for all three devices was observed during braking, since this maneuver was less susceptible to vehicle leaning.
Future research will examine the association between g-forces collected by the iPhone and a device that includes in-built gravity adjustment, and is unaffected by weight distribution in the vehicle. Beyond this, the utility of the app would be assessed by recruiting participants to use the app while driving their own vehicles under usual driving. In this context, participant preferences for downloading an app on their existing iPhone device or using a dedicated device for data collection would need to be established. Given the sophistication of the iPhone and iOS development platform, the capabilities of the app could be extended to include video capture, real-time driver feedback, and cloud-based data aggregation and analyses. Finally, machine learning-based methods will be needed for automated maneuver identification and improved rejection of false positive g-force events not associated with a risky driving behavior.
The gForce iPhone app reliably assessed elevated g-force events compared to the DAS. Collectively, the gForce app and iPhone platform have the potential to serve as feature-rich, inexpensive, scalable, and open-source tool for assessment of KRD events, with potential for research and feedback forms of intervention.
This research was supported by the intramural programs of the National Institutes of Health Center for Information Technology, the National Institute of Biomedical Imaging and Bioengineering, the Eunice Kennedy Shriver National Institute of Child Health and Human Development, and the Center for Injury Research and Policy at the Johns Hopkins School of Public Health.
Conflicts of Interest
- United States Department of Transportation, National Highway Traffic Safety Administration. Traffic Safety Facts 2015. 2015. URL: https://crashstats.nhtsa.dot.gov/Api/Public/ViewPublication/812384 [accessed 2018-03-06] [WebCite Cache]
- Centers for Disease Control and Prevention. Web-based Injury Statistics Query and Reporting System (WISQARS) Online. 2015. URL: https://www.cdc.gov/motorvehiclesafety/teen_drivers/teendrivers_factsheet.html [accessed 2017-10-26] [WebCite Cache]
- Williams AF, Ali B, Shults RA. The contribution of fatal crashes involving teens transporting teens. Traffic Inj Prev 2010 Dec;11(6):567-572. [CrossRef] [Medline]
- Klauer SG, Guo F, Simons-Morton BG, Ouimet MC, Lee SE, Dingus TA. Distracted driving and risk of road crashes among novice and experienced drivers. N Engl J Med 2014 Jan 02;370(1):54-59 [FREE Full text] [CrossRef] [Medline]
- Guo F, Simons-Morton BG, Klauer SE, Ouimet MC, Dingus TA, Lee SE. Variability in crash and near-crash risk among novice teenage drivers: a naturalistic study. J Pediatr 2013 Dec;163(6):1670-1676 [FREE Full text] [CrossRef] [Medline]
- Twisk DA, Stacey C. Trends in young driver risk and countermeasures in European countries. J Safety Res 2007 Jan;38(2):245-257. [CrossRef] [Medline]
- Simons-Morton B, Ehsani JP. Learning to drive safely: reasonable expectations and future directions for the learner period. Safety (Basel) 2016 Dec;2(4) [FREE Full text] [CrossRef] [Medline]
- Simons-Morton BG, Ouimet MC, Wang J, Klauer SG, Lee SE, Dingus TA. Hard braking events among novice teenage drivers by passenger characteristics. 2009 Presented at: Proc Int Driv Symp Hum Factors Driv Assess Train Veh Des; Jun 22, 2009; Big Sky, Montana p. 236-242.
- Simons-Morton BG, Zhang Z, Jackson JC, Albert PS. Do elevated gravitational-force events while driving predict crashes and near crashes? Am J Epidemiol 2012 May 15;175(10):1075-1079 [FREE Full text] [CrossRef] [Medline]
- Simons-Morton BG, Bingham CR, Ouimet MC, Pradhan AK, Chen R, Barretto A, et al. The effect on teenage risky driving of feedback from a safety monitoring system: a randomized controlled trial. J Adolesc Health 2013 Jul;53(1):21-26 [FREE Full text] [CrossRef] [Medline]
- Dingus TA, Guo F, Lee S, Antin JF, Perez M, Buchanan-King M, et al. Driver crash risk factors and prevalence evaluation using naturalistic driving data. Proc Natl Acad Sci U S A 2016 Mar 08;113(10):2636-2641 [FREE Full text] [CrossRef] [Medline]
- Simons-Morton BG, Klauer SG, Ouimet MC, Guo F, Albert PS, Lee SE, et al. Naturalistic teenage driving study: findings and lessons learned. J Safety Res 2015 Sep;54:41-44 [FREE Full text] [CrossRef] [Medline]
- Johnson D, Trivedi M. Driving style recognition using a smartphone as a sensor platform. 2011 Presented at: 14th International IEEE Conference on Intelligent Transportation Systems (ITSC); Oct 5-7, 2011; Washington, DC p. 1609-1615. [CrossRef]
- Hong JH, Margines B, Dey AK. A smartphone-based sensing platform to model aggressive driving behaviors. : ACM; 2014 Presented at: CHI '14 Proceedings of the SIGCHI Conference on Human Factors in Computing Systems; April 26 - May 01, 2014; Toronto, Ontario, Canada p. 4047-4056. [CrossRef]
- Pfriem M, Gauterin F. Employing smartphones as a low-cost multi sensor platform in a field operational test with electric vehicles. 2014 Presented at: 47th Hawaii International Conference on System Sciences; Jan 6-9, 2014; Waikoloa, HI p. 1143-1152. [CrossRef]
- Castignani G, Derrmann T, Frank R, Engel T. Driver behavior profiling using smartphones: a low-cost platform for driver monitoring. IEEE Intelligent Transportation Systems Magazine 2015 Dec 19;7(1):91-102. [CrossRef]
- Piper Jaffray. 2017. A collaborative consumer insights project URL: http://www.piperjaffray.com/3col.aspx?id=4610 [accessed 2018-01-08] [WebCite Cache]
- Ehsani JP, O'Brien F, Simons-Morton B. Comparing g-force measurement between a smartphone application and an in-vehicle accelerometer. 2017 Presented at: Proceedings of the Ninth International Driving Symposium on Human Factors in Driver Assessment, Training and Vehicle Design; June 26-29, 2017; Manchester Village, Vermont p. 221-227. [CrossRef]
|DAS: data acquisition system|
|DMP: digital motion processor|
|GPS: Global Positioning System|
|KRD: kinematic risky driving|
|NDS: naturalistic driving study|
|VTTI: Virginia Tech Transportation Institute|
Edited by G Eysenbach; submitted 31.10.17; peer-reviewed by N Morris, C Fernández; comments to author 30.11.17; revised version received 19.01.18; accepted 23.01.18; published 19.04.18
©Raisa Z Freidlin, Amisha D Dave, Benjamin G Espey, Sean T Stanley, Marcial A Garmendia, Randall Pursley, Johnathon P Ehsani, Bruce G Simons-Morton, Thomas J Pohida. Originally published in JMIR Mhealth and Uhealth (http://mhealth.jmir.org), 19.04.2018.
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 http://mhealth.jmir.org/, as well as this copyright and license information must be included.