Prototyping of a Portable Data Logging Embedded ...

4 downloads 47707 Views 274KB Size Report
(SensorViewer) on an Android phone. Based on our calculations, we estimate that a 32GB SD card is capable of storing text, image, and video data collected ...
2013 International Conference on Connected Vehicles and Expo (ICCVE)

Prototyping of a Portable Data Logging Embedded System for Naturalistic Motorcycle Study Noureddine Elmehraz*, Srinivas Katkoori*§, Achilleas Kourtellis§, and Pei-Sung Lin§ *

Computer Science and Engineering Department University of South Florida Tampa, Florida, USA [email protected] [email protected]

§

Center for Urban Transportation Research (CUTR) University of South Florida Tampa, Florida, USA [email protected] [email protected] ordinates, acceleration, speed, proximity, images, and inclination (along three axes). The collected data was validated to be accurate by comparing against data collected with standard devices. This research was carried out as part of Master’s Thesis [3] work of the first author.

Abstract—The primary objective of this work is to design a highly portable data logging embedded system for naturalistic motorcycle study with capability of collecting many types of data such as images, speed, acceleration, time, location, distance approximation, etc. The proposed embedded system design is based on an Arduino microcontroller and is capable of storing up to 220 hours of text/image data during a one month study period. We have successfully designed and implemented the system. The data acquired has been validated and found to be accurate.

II.

Designing a portable data logging embedded system for naturalistic motorcycle study will enable accurate identification of the most relevant risk factors [4]. Different types of data can be collected such as motorcycle speed, acceleration, distance approximation, location, 3D inclination, and images. Each type can be categorized based on behavior or environmental factor(s). The pre-event data will be collected which will be significantly useful in identifying risk factors. There are other factors such as gas prices, social ranking, and national economic status that can be indirectly inferred by analyzing data that will be collected.

Keywords- Intelligent Transportation System (ITS); Arduino; DAS; SPI; I2C

I.

INTRODUCTION AND RELATED WORK

In 2009, Florida ranked second after California in traffic fatalities, and kept the same rank in 2011 after Texas, according to Motorcyclist Traffic Fatalities’ preliminary study report [1]. It was reported [2] that with the yearly increase in motorcycle registrations, there was also an increase in motorcycle fatalities. Motorcycle fatalities have traditionally been about 10 percent of all traffic fatalities. In addition, motorcyclists are 35 times more likely to be involved in a deadly crash than car drivers. Naturalistic motorcycle studies will greatly help in enhancing motorcycle safety, by providing insight to how conflicts between a vehicle and a motorcycle occur, and what the motorcycle driver does to avoid collision.

The three main requirements for a data logging embedded system suitable for naturalistic motorcycle study are: (a) high portability; (b) large storage capability; and (c) low power consumption. Based on the high-level requirements, we identify that the following data needs to be logged: (1) speed; (2) time and date; (3) X, Y, and Z degrees of inclination; (4) GPS co-ordinates; (5) acceleration; (6) proximity with vehicles in the front, back, and on the sides; and (7) image and video information in the front and back of the motorcycle.

In the literature, researchers have reported naturalistic studies. However, the objectives and depth were different across the studies. Some studies tried to reinvestigate safety processing [4], others targeted specific cases [5], and the rest tried to identify the risk factors. The naturalistic bicycling study by VTTI (Virginia Tech Transportation Institute) is one of the best examples. They chose HPT (Human Powered Transportation) as their subject of study as bicyclists are most of the times subject to aggressive actions by other engine powered commuters. The eco-friendly nature of this type of transportation (bicycle) adds environmental protection perspective besides traffic safety. In addition, data logging device design for this type of transportation required certain degree of optimization to achieve the portability and energy independency needed.

The high-level block diagram of the system and the breadboard prototype are shown in Figures 1 and 2 respectively. The proposed system is composed of seven major sub-systems: (1) DC-to-DC converter (9V to 12V conversion); (2) SD Card; (3) GPS Module; (4) Gyroscope; (5) Camera; (6) Arduino Mega 2560; and (7) Sonar (EZ1). Due to lack of space, we do not present more details. Interested reader is referred to [3]. III.

EXPERIMENTAL VALIDATION

For debugging purposes, the system was assembled on a breadboard (Figure 2). For the deployment during the naturalistic study, PCB implementation will be used. Before

The proposed data acquisition system (DAS) is Arduino based [6] and has been prototyped and used in several test runs. It was able to log desired data, namely, GPS co-

978-1-4799-2491-2/13/$31.00 ©2013 IEEE

DATA ACQUISITION SYSTEM – EMBEDDED SYSTEM PROTOTYPING

471

DOI 10.1109/ICCVE.2013.100

the reading was fast due to Gyroscope buffering capability. The angular rotation (along x-, y-, and z-axes) were recorded and compared against real measurements. The real data (ground truth data) was obtained using a Google smart app (SensorViewer) on an Android phone.

the data was collected for validation, system testing in the lab was conducted to ensure proper functioning.

Based on our calculations, we estimate that a 32GB SD card is capable of storing text, image, and video data collected over 220 hours of naturalistic motorcycle study. Due to lack of space we do not provide these estimation details. Figure 3 summarizes the estimation error statistics of the parameters discussed. We can observe that except for the proximity distance, the average error for the other parameters is very low. In case of acceleration measurements at high speeds, we observe the range of the estimation error to be substantial (~39%). We attribute the main source of the error to be the mechanical vibration. Thus, mechanical stabilization will be attempted in next version.

Figure 1: High level block diagram of the proposed DAS embedded system for Naturalistic Motorcycle Study.

PARAMETER Proximity Distance Speed Acceleration X-axis Y-axis Z-axis Acceleration X-axis Y-axis Z-axis Gyroscope X-axis Y-axis Z-axis

Figure 2: Breadboard implementation. GPS Data We used GPS Google map annotated path info to verify the GPS data. There were three trial runs for data collection. On all runs, the results were found to be accurate.

Average (μ) (%) -6.82 -0.70 0.42 0.02 -0.04 0.68 0.86 0.56

Std. Dev. (ı) (%)

Range (%)

4.59 3.37 Low speed 1.65 0.87 0.84 High speed 6.90 9.23 4.99

38.67 38.86 31.48

0.59 0.20 2.90

8.16 2.90 20.46

-0.058 0.01 -0.35

10.47 24.05 14.90 14.36 13.60

Figure 3: Percentage estimation error statistics. IV.

Image Data The biggest hurdle during data collection process was getting clear images. The images were being streamed directly from the camera to the SD card, with some data corruption. To overcome this problem, first the camera clock was reduced to the lowest speed of 69 KHz. Second, an interrupt handler was introduced when images were taken. Third, before taking each image, settings were reset. After many trials and tuning, clear images were obtained. In next version, we propose to introduce an intermediate data buffer.

CONCLUSION AND FUTURE WORK

With the proposed prototype we have successfully demonstrated a low-cost, portable, DAS suitable for naturalistic motorcycle studies. The form factor and power analysis results were very encouraging. The future work includes PCB implementation for compact form factor. Furthermore, solar cell based energy harvesting will be attempted to adopt DAS to bicycles. REFERENCES

Proximity Distance Approximation Data In order to validate the proximity distance, we have conducted the following experiment. We installed the prototype on the side of a car and rode it approximately 6m from a series of (4) poles separated uniformly. The furthest distance approximation that was made was 6 meters (~20 feet). There is 1.5 cm accuracy on the distance data that has been collected.

[1] [2] [3]

[4]

Acceleration and Speed Data Using GPS we obtained both speed and acceleration simultaneously. An accelerometer was used to measure acceleration along three dimensions. Speed and acceleration data at low and high speeds were also validated.

[5]

Gyroscope Data The device was very responsive during data collection. Despite using the I2C protocol for interfacing,

[6]

472

DOT, NHTSA, “Recent Trends in Fatal Motorcycle Crashes (DOT HS 809271)”. Governor’s Highway Safety Association “Motorcyclist Traffic Fatalities by State”. N. Elmehraz, “Design of a Highly Portable Data Logging Embedded System for Naturalistic Motorcycle Study,” M.S. Thesis, CSE, University of South Florida, Tampa, FL, June 2013. R. Tian, et al., "Studying the Effects of Driver Distraction and Traffic Density on the Probability of Crash and Near-Crash Events in Naturalistic Driving Environment," IEEE Trans. on ITS, pp.1-8, May 2013. T. Wilhelm, et al., "Automatic real-time FACS-coder to anonymize drivers in eye tracker videos," IEEE Intl. Conf. on Computer Vision Workshops (ICCV Workshops), pp.1986-1993, Nov. 2011. M. Margolis, “Arduino Cookbook,” O’Reilly Media, 2nd Edition, 2011.