Powered by Blogger.

Accelerometer Basics

As a research intern at Metropia, my main task is to help develop a program to assess driving through the motions of a smartphone located in the car. Thus, my first week at Metropia has been primarily focused on gaining familiarity with phone accelerometers and reading up on current research in the area of understanding accelerometer data. 

Accelerometers are small devices which detect proper acceleration. Conceptually, accelerometers work somewhat like a spring, detecting forces on the spring by an attached mass.


Figure 1: (a) Side view of the blue seismic mass which moves to push against the green capacitors. (b) The motion against the capacitors causes a change in capacitance which is detected.


Phones have a three dimensional accelerometer, meaning there are three separate accelerometers to measure acceleration in the x, y, and z directions. Whenever your phone’s screen rotates when you rotate your phone, or when you play games by moving your phone, the accelerometers and gyroscopes in your phone are being use to recognize the motion.

Figure 2: Three accelerometers of the phone.  


Already, there have been a number of studies which have looked at using phone accelerometers to identify driving motions. Mobile Phone Based Drunk Driving Detection took a relatively simple approach of tracking the longitudinal and lateral acceleration of a car through placing a smartphone inside of the vehicle, and then judging whether the acceleration patterns indicated whether the driver was drunk.

Figure 3: Image from Mobile Phone Based Drunk Driving Detection which shows different examples indicating drunk driving, such as wide turn radius and inability to remain in one lane. 



Driving Behavior Analysis with Smartphones took the most sophisticated approach. The researchers parsed accelerometer data by identifying driving "events", periods where the simple moving average of the acceleration increased a certain threshold, meaning the car was doing something other than just driving straight. The researchers classified different “events” such as U-turns, left turns, rapid acceleration, etc. and then made 40 different templates for aggressive and non-aggressive examples of each of the events. When an event would be identified in the data, the signal it produced would be compared to the templates by seeing how similar they were when aligned using the Dynamic Time Warping (DTW) Algorithm. The method was very solid, with 97% of aggressive events successfully identified.

In addition to identifying driving events, accelerometers have also been widely studied as a method of identifying human activities. Activity Recognition from User-Annotated Acceleration Data studied accelerometer data to identify activities ranging from washing dishes to king fu movements. The researchers used a variety of machine learning techniques (techniques to identify patterns in data), including decision tables, decision trees, the nearest neighbor algorithm, and the naïve Bayes classifiers, and then compared and contrasted their results. Classification of Motor Activities through Derivative Dynamic Time Warping Applied on Accelerometer Data was another study looking at identifying human activity, but instead used the DTW algorithm like Driving Behavior Analysis with Smartphones to match recorded templates of activities with observed activities.  In addition the study also looked an improved version of the DTW algorithm, the Derivative Dynamic Time Warping (DDTW) algorithm. The classic DTW algorithm fails to properly match two similar signals if there is too much variation in the y-axis between the two signals, so DDTW algorithm fixes this issue, and as a result is much more successful at identifying similarities between signals. 


Figure 4: Images of the matchings made by the DTW and DDTW. DDTW aligns the signals as one would expect, while DTW shows erratic matchings when the signals' y axes vary.  

So far, I am the most interested in using the DDTW algorithm to identify driving events such as aggressive turns or texting. The DTW algorithm has been shown to be able to successfully identify both driving events and human activities, so it will be one of the main algorithms I hope to use in processing accelerometer data. 

1 comments:

  1. Mobile Phone based Drunk Driving Detection system sounds like a good idea. If you are still facing a DUI, thankfully, internet has made finding a DUI lawyer much easier. A little bit of research can help you and connect you with the specialized, knowledgeable legal representation you need. A good DUI lawyer can impact outcome of case to a great extent.

    ReplyDelete