Abstract:
A sensor tag which in use will be affixed to a vehicle for obtaining vehicle telematics data includes a battery for powering the tag and a processor running executable code to process accelerometer data. An accelerometer measures the acceleration of the tag and thereby of the vehicle, and also controls the operation of the processor. A memory is used for storing a unique tag identifier of the tag and for storing trip data including information about trips and acceleration data. Finally, a communication module is used for short range wireless communication with a mobile communications device located in the vehicle via a short range wireless communications protocol, the communication module transmitting the tag&#39;s unique identifier and a sequence of time stamped acceleration data. The mobile communications device obtains GPS data, combines this with the acceleration date and transmits this to a server for analysis.

Description:
BACKGROUND OF THE INVENTION 
       [0001]    The present application relates to a system and method for obtaining vehicle telematics data. To assess driver risk and to change driving behaviour, insurance companies have started using telematics data. Current deployments use one of the following embedded-hardware-based methods:
       1. A “deep install” black box professionally installed in a vehicle that tracks the vehicle&#39;s position and acceleration, or   2. An on-board diagnostic (OBD-II) device that connects to the vehicle and acquires information from it.       
 
         [0004]    Because of the high capital and/or operational costs of these hardware-based options, some companies have brought to market a pure smartphone solution recently. This solution requires no black box or OBD hardware device. The advantage of a smartphone-based solution is substantially lower cost compared to hardware alternatives, provided the challenges around data accuracy can be solved. Previous work has shown how to achieve accurate map-based telematics using personal mobile devices for mileage and trajectory estimation (U.S. Pat. No. 8,457,880) and estimation of longitudinal/lateral acceleration and associated events (U.S. patent application Ser. No. 13/832,456 and PCT Application Number: PCT/US14/30174). 
         [0005]    A pure smartphone solution, however, does not robustly achieve the following desired properties:
       1. Reliable vehicle identification and monitoring only when the user is in a pre-specified set of vehicles.   2. Crash/impact detection.   3. Exact times of vehicle movement.   4. Accurate estimation of acceleration when the user is moving the phone.   5. Working when the user has uninstalled the application, or has not brought the phone into the vehicle.   6. Better estimations of determining when the cell phone is being utilised while driving for calling or texting or accessing chat applications.   7. A precise determination of whether the smartphone logging data belongs to the driver or to a passenger.       
 
         [0013]    The present invention discloses a method and system architecture to combine the best features of a smartphone-based approach together with a lightweight embedded tag hardware. The smartphone and tag communicate with each other over low-power wireless while in the vehicle and work in concert to: (1) achieve the high degree of accuracy of an expensive pure hardware solution, (2) provide the features listed above that are difficult or impossible to achieve with a pure smartphone solution, (3) realize a substantially lower cost only modestly higher than that of the pure smartphone solution, (4) avoid the high logistics, hardware and deployment cost inherent in a full GSM/GPS Black box or OBD II solution, while maintaining a high level of data accuracy (5) achieve energy-efficient operation, with the tag capable of operating for several years on a small coin-sized battery, (6) improve smartphone battery life by offloading some sensing functions to the tag, and (7) avoid interference with the vehicle wiring or OBD port. 
       SUMMARY OF THE INVENTION 
       [0014]    According to one example embodiment, a sensor tag for obtaining vehicle telematics data includes:
       an accelerometer to measure acceleration of the tag and thereby of the vehicle when the vehicle is moving and to record acceleration data;   a memory for storing acceleration data; and   a communication module for short range wireless communication with a mobile communications device located in the vehicle via a short range wireless communications protocol, the communication module transmitting acceleration data to the mobile communications device.       
 
         [0018]    Communication between the tag and mobile communications device preferably occurs automatically without manual intervention or configuration 
         [0019]    The tag is not connected to the vehicle&#39;s computer or power systems. 
         [0020]    The short range wireless communications protocol may be Bluetooth. 
         [0021]    The mobile communications device may be a mobile telephone. 
         [0022]    In one example, the communication module also transmits time data associated with the acceleration data to the mobile communications device. 
         [0023]    The communication module may further transmit a tag identity and a user identity to the mobile communications device. 
         [0024]    The tag may include a tamper detection mechanism. 
         [0025]    The tag includes a crash/impact detection mechanism. 
         [0026]    The tag may include sensors other than accelerometer, such as gyroscope, barometer, compass, and position sensors. 
         [0027]    The tag signs and may optionally encrypt any data sent to the mobile communications device in a manner that the mobile communications device cannot tamper with the data undetected; with encryption, the data is kept confidential from the mobile communications device. The mobile communications device forwards the data to the server. 
         [0028]    The server signs and may optionally encrypt any data sent to the mobile device in a manner that the mobile device cannot tamper with the data undetected; with encryption, the data is kept confidential from the mobile device. The mobile device forwards the data to the tag. Such data includes parameters, configuration information, and code (for over-the-air firmware upgrade). 
         [0029]    According to another example embodiment, a mobile communications device including:
       a display for displaying information to a user;   a user interface for receiving inputs from a user;   a location module for determining and recording location data regarding the location of the mobile communications device;   a processor with an executable application running thereon to combine the received acceleration data with the location data so that the acceleration and position of the vehicle at a particular point in time is known; and   a communications module for receiving acceleration data from a tag connected to a vehicle and for transmitting the combined acceleration data and the location data to a server via a mobile communications network.       
 
         [0035]    The location module may be a GPS module. 
         [0036]    The communications module is able to communication with the tag via a short range wireless communications protocol such as Bluetooth. 
         [0037]    In one example, the communication module also receives time data associated with the acceleration data from the tag. 
         [0038]    The communication module may further receive a tag identity and a user identity from the tag. 
         [0039]    In addition, the tag may include a tamper detection mechanism. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0040]      FIG. 1  is an example system for implementing a vehicle telematics methodology; 
           [0041]      FIG. 2  is a block diagram illustrating an example tag to be installed on a vehicle in more detail; 
           [0042]      FIG. 3  is a block diagram illustrating an example mobile communications device in more detail; 
           [0043]      FIGS. 4-8  are block diagrams illustrating an example vehicle telematics monitoring method; and 
           [0044]      FIG. 9  shows an example server from  FIG. 1  in more detail. 
       
    
    
     DESCRIPTION OF EMBODIMENTS 
       [0045]    The system and methodology described herein relate to obtaining vehicle telematics data. 
         [0046]    Referring to the accompanying Figures, an untethered, battery-powered sensor tag  10  is affixed to a motor vehicle  12 . It is envisioned that the tag  10  will be placed on the windscreen or some other rigid part of the vehicle  12 . 
         [0047]    Referring to  FIG. 2 , the tag  10  contains a processor in the form of a microcontroller  22  capable of executing programmed instructions (“firmware”), which controls the operation of the various other components of the tag. The components include a low-power wireless communication module  32  to communicate with a mobile communications device  14  in the vehicle. 
         [0048]    It will be appreciated that the mobile communications device  14  could be any suitable mobile communications device such as a mobile telephone, a tablet, an iPod or any other suitable communications device. 
         [0049]    In any event, the components include one or more sensors, specifically a three-axis accelerometer  24 , and optionally one or more among a three-axis gyroscope  26 , a light sensor, a pressure sensor, and a magnetometer. 
         [0050]    The accelerometer  24  measures the acceleration of the tag  10  and thereby of the vehicle  12  when the vehicle is moving and reports the data to the microcontroller  22 . The accelerometer and other sensors provide digital output generally via a serial interface standard. 
         [0051]    In the preferred embodiment all the components in the tag are low-power devices, so that one or two small coin-cell batteries suffice for the tag to run for several thousands of hours of driving time (multiple years of operation). The firmware of the microcontroller  22  on the tag  10  records telematics data mostly only when the vehicle is moving. When the vehicle is not moving, the components of the tag  10  are in powered-down or in an ultra-low-power idle state. An “acceleration state machine” controls the different states of the tag  10 . 
         [0052]    In the illustrated example the short range wireless communications protocol is Bluetooth, but any low-power communication could be used. Bluetooth Low Energy (BLE) meets the desired power requirements and is widely available on commodity smartphone devices. In an example embodiment the microcontroller  22  and Bluetooth communications module  32  including antenna and crystal are combined in a single chip. 
         [0053]    The tag  10  records acceleration and other sensor data. It streams that data to the mobile device  14  over the short-range wireless communication link, which will in turn process that data and transmit at least a portion of the received and processed data via a wireless communications network  16  such as 802.11 (WiFi) or cellular network to a server  18  with an associated database  20 . 
         [0054]    The tag  10  includes a memory  28  in the form of a flash storage, for example using a serial flash memory. The memory  28  stores data about trip start/end times, acceleration and other sensor data including telematic events detected by the firmware such as hard braking, accelerations, and turns, unexpected movements of the tag, collisions or crashes, and debugging logs together with time stamps. The tag  10  also includes random access memory (RAM) used by the firmware and read-only memory (ROM) used to store configuration data and executable instructions. 
         [0055]    The tag  10  includes a battery  30  for providing power to the device. The battery may be in a coin cell form factor, standard AAA or AA, or solar. It is important to note that in the preferred embodiment the tag is not tethered to any wired source of power, such as the vehicle&#39;s electrical power supply or the vehicle&#39;s standard on-board diagnostic (OBD) port. Because it does not have an unbounded source of energy, its operation includes methods to use energy frugally and carefully, as described below. 
         [0056]    The advantages of not requiring a tethered power source are that there is no complicated or cumbersome installation procedure as with an installed black box. Plugging the tag into the vehicle&#39;s OBD port is also not desirable given that these types of devices could potentially interfere with the vehicle&#39;s on-board systems. The capital and operational costs of a telematics system with the untethered tag are considerably lower than black boxes and OBD devices and are more scalable for insurance telematic companies. 
         [0057]    The tag  10  includes hardware and firmware instructions on the microcontroller  22  that measure and report the power level of the battery to the mobile device over the low-power wireless communication link. The hardware may be implemented with an intermediary circuit (not shown) connected between the battery and the microcontroller  22  to measure the voltage of the battery. When the battery&#39;s energy reserves are found to be lower than a threshold, the user is given a warning on the mobile device in order to warn users when the battery is going low. 
         [0058]    In the illustrated example the short range wireless communications protocol is Bluetooth, but any low-power communication could be used. Bluetooth Low Energy (BLE) meets the desired power requirements and is widely available on commodity smartphone devices. In an example embodiment the microcontroller  22  and Bluetooth communications module  32  including antenna and crystal are combined in a single chip. 
         [0059]    Referring to  FIG. 3 , the mobile communications device (smartphone)  14  includes a display  36  by which information is displayed to a user of the device  14 . A user interface  38  receives inputs from the user. The user interface  38  could be a keypad or a touch screen, for example. 
         [0060]    The device  14  includes a processor  40  connected to the other illustrated modules to control the operation of the device  14 . The device also includes a location module  42 . 
         [0061]    The location module  42  is used to determine the location of the mobile communications device  14  and thereby the position of the vehicle in which the mobile communications device  14  is located. 
         [0062]    The location module  42  includes one or more position sensors such as the Global Positioning System (GPS) as well as WiFi-based location or cellular location sensors are used for an application on the mobile device to obtain position and velocity information. Other sensors such as a gyroscope and acceleration sensors on the mobile device may also be used to gather information during a trip. 
         [0063]    The device includes an on-board memory  46  as well as a communications module  44 , which allows the device to communicate both with the tag  10  and using one or more the mobile communication networks  16 . 
         [0064]    To implement the methodologies described, the device  14  will include an executable application that is able to execute on the device. 
         [0065]    Described below are some key aspects of the operation of the system, including:
       Tag installation and initialization   Tag-smartphone synchronization and communication protocols   Collision and crash detection   End-to-end security between tag and server, communicating via an untrusted smartphone   Detection of tag tampering and tag movement relative to vehicle   Orientation Algorithm   The Functions of the Server       
 
         [0073]    Describing firstly the tag  10  installation and initialization, the tag  10  is installed into a motor vehicle  12 . As mentioned above, this could be accomplished in any one of a number of ways including affixing the tag to the windscreen or to any other rigid part of the motor vehicle as illustrated in  FIG. 1 , for example. 
         [0074]    In order to assign the tag  10  to the correct vehicle an initializing phase needs to occur. An example of this is illustrated in  FIG. 4 . 
         [0075]    After fitment the user (who may or may not be the vehicle&#39;s owner or driver) will be able to open the executable application on the mobile communications device  14  and start the initialization phase, which will search for a tag  10  in the vicinity. 
         [0076]    A list of tags  10  in the vicinity will be displayed to the user via the display  36  and the user will then be able to select the correct tag  10  via the user interface  38 . 
         [0077]    The user will then be able to select a vehicle  12  to be linked to the selected tag  10 . 
         [0078]    Where it is known what vehicles the user owns, a list of the vehicles may be provided via the display  36 . 
         [0079]    In any event, the selected vehicle  12  and the identity of the tag  10  secured to the vehicle  12  are submitted to the server  18  together with a user ID, typically via the communications module  44  and the mobile communications network  16 . 
         [0080]    Changes or movement of the tag to other vehicles will require the user to have the tag moved to a new vehicle and linked to the new vehicle, or re-linked to the existing vehicle. This can be performed via the system server 
         [0081]    A noteworthy aspect of the system is that there is no Bluetooth pairing step between the phone and the tag required. Moreover, the administrator can specify via a server-side configuration which set of tags any given smartphone application instance will be able to connect to and transfer data bi-directionally between the server and tag. It is possible for this set to be “all tags”, which means that the app instance can connect to any active tag. However, the set of tags whose data is made visible on the app may be restricted only to those tags that are linked to the user on the server. 
         [0082]    For example suppose Vehicle V 1  belongs to a first user, who also owns smartphone app A 1 , is linked to Tag T 1 . Then, if smartphone app A 2  belonging to a different user travels in Vehicle V 1 , depending on the server-side configuration, tag T 1  and app A 2  may connect with each other and exchange data. But even if that happens, the data belonging to this trip will be made visible on app A 1  belonging to the first user and the data used to assess the driving usage of vehicle V 1 , and not a different vehicle belonging to the second user. 
         [0083]    Different combinations of which tags are allowed to connect to which smartphone instances are possible, and configurable entirely on the server side without requiring any changes to the software running the mobile communication device or the tag. 
         [0084]    When the user begins driving the vehicle  12 , the tag  10  will advertise itself on the short range wireless communications network, such as Bluetooth. Any mobile device running the corresponding mobile application may see the advertisement, and potentially any mobile devices with the application depending on the policy deployed (application) will be able to connect to the tag. 
         [0085]    In order for this to occur, the executable application referred to above needs to be executed by the user on the mobile communications device  14 . 
         [0086]    In terms of the tag-phone synchronization and communication, the firmware on the tag  10  implements the following states to achieve battery-efficient synchronization and communication between the tag and mobile device (smartphone). The main states in this state machine are: VERIFY, ADVERTISE, and CONNECTED. In the VERIFY state, the tag&#39;s components are powered down, except a low-power acceleration chip forming part of accelerometer  24 , which gathers acceleration data at a specified frequency (typically between 5 and 50 Hz depending on hardware and software capabilities), and periodically wakes-up the processor (e.g., once every second or two) using an interrupt. Equivalently, the processor may poll periodically for the acceleration data. The processor then executes the state machine implemented in the firmware to determine if the state should remain in the VERIFY state, or if it should transition to ADVERTISE. 
         [0087]    This determination is made according to whether the vehicle has been moving for a configurable period of time. If it has not been moving for a specified period of time, the state remains VERIFY; otherwise, it transitions to ADVERTISE. A variety of statistical methods operating over the collected acceleration samples may be used to make this determination. For example, if acceleration data is gathered at 10 Hz and the processor is interrupted every 2 seconds, 20 samples of three-axis accelerometer data are processed to make the determination. One approach to rest determination is to compute the maximum absolute value of the difference from the mean of the values in each acceleration component. If the maximum in any of the three components is above a configurable threshold A for a configurable amount of time T 1 , then transition to the ADVERTISE state; otherwise, remain in VERIFY. The parameters A and T 1  are tunable values in the method. 
         [0088]    An important point is that advertisements from the tag, which consume energy, occur only when the vehicle is deemed to be moving, and stop when a mobile device connects. Such motion-triggered advertisements conserve battery resources. In certain situations the tag may be capable of connecting to multiple mobile devices, in which case the advertisements may continue upon connection to one or more other mobile devices. Advertisements may be terminated after several minutes even if the vehicle is still moving and no mobile device has connected and the tag may then return to the VERIFY state for a certain configurable time. 
         [0089]    Referring to  FIG. 6 , the tag  10  is woken up by the accelerometer exceeding a certain measurement threshold for a certain period of time. This is important functionality as it extends the life of the battery  30  by keeping the tag in an ultra-low-power sleep mode when the vehicle is not moving. 
         [0090]    Upon transitioning to the ADVERTISE state, the tag considers a trip to have started and starts logging the acceleration data to its RAM. It may also write this data to persistent storage (e.g., Flash). In an embodiment with Bluetooth Low Energy communication, the tag advertises its presence as a Bluetooth peripheral. Alternatively, the tag may be configured as a Bluetooth central node, and the phone a peripheral, in which case the transition to the ADVERTISE state causes the tag to start looking for advertisements from the phone. (In this configuration the phone would periodically advertise its presence). 
         [0091]    Referring to  FIG. 5 , the block “turn on advertising of BLE” relates to Bluetooth Low energy which can have an advertising state turned on and off, as is well known in the art. In advertising mode the chip will typically use more battery power and hence this should be used conservatively. Therefore, the tag  10  in an example embodiment will only start advertising once motion is detected to preserve the battery life on the tag  10 . 
         [0092]    Similarly, if the Bluetooth module on the mobile communications device  14  is ON then the device  14  this will connect automatically each time the smart phone is in the vicinity of the tag  10  and the vehicle starts driving. If the Bluetooth module is off, then a “pop up” will be displayed to the user on the display  30  prompting the user to enable Bluetooth. 
         [0093]    Once the executable application on the mobile communications device  14  has identified the tag  10  then a communications session is set up between the tag  10  and mobile communications device  14  via communications modules  32  and  44  respectively. 
         [0094]    Thus it should be noted that the tag  10  is in a dormant/sleep state while the vehicle  12  is not driving. Once the vehicle  12  starts driving, the tag  10  awakens and starts recording accelerometer data. That happens regardless of whether the mobile device is in the vehicle or not. The memory therefore needs to be large enough to store enough data to handle several hours of driving in the absence of the user&#39;s mobile device  14 . The number of hours of recordable data will vary depending on the size of the memory  28 . 
         [0095]    Upon hearing a suitable advertisement, the central node connects to the peripheral. In the example embodiment, the phone (central) initiates a connection to the tag (peripheral). Upon a successful connection, the tag transitions to the CONNECTED state. 
         [0096]    In the CONNECTED state, the tag and phone communicate with each other. This communication involves the reliable transmission of any data previously logged in the storage of the tag, including information about previous trips, previously detected events (such as hard braking, acceleration, collisions, tampering, etc.), debugging or diagnostic information, and the like. After the reliable transmission of this information using a protocol where the phone acknowledges reception, the tag starts streaming live acceleration and other sensor data to the phone. 
         [0097]    The mobile communications device  14  will transmit this combined data (sensor data from the tag  10  and GPS and/or additional sensor data such as position, gyroscope, acceleration from the mobile communications device) to the backend server  18 . 
         [0098]    An example data packet may consist of:
       Timestamp   The tag&#39;s X, Y, Z component of acceleration   Additional sensor data from the tag (e.g., gyroscope)   One or more streams of sensor data from the mobile device such as the GPS positions, speed, and heading; network location samples; X, Y, Z components of the accelerometer; 3-axis gyroscope values, magnetometer data       
 
         [0103]    In addition, the data transmitted includes a User ID, Tag ID, and Application ID. 
         [0104]    In the example embodiment both the reliable and streaming of this data are done over the Bluetooth, low energy link layer protocol. They could use Bluetooth&#39;s notification and indication capabilities for this purpose. It should be apparent that any other wireless communication medium and link layer protocol could also be used, including but not limited to Bluetooth (non-low-energy), WiFi, WiFi-Direct, and the like. 
         [0105]    Once the tag  10  and the mobile device  14  have connected and the tag is in CONNECTED state, in order to further preserve power advertisements stop, or are sent less frequently than in ADVERTISE state. Moreover, the streaming of sensor data does not require the short-range Bluetooth radio to be on continuously. The radio is turned on only just before the scheduled transmission. For example, the radio may be turned on every second to burst a small number of packets, then be turned off. 
         [0106]    The tag remains in the CONNECTED state until either the connection terminates because the tag and phone are no longer in communication range, or until the tag&#39;s firmware determines that the vehicle has not been moving for some period of time T 2 . In either case, the tag transitions to the ADVERTISE state for a period of time T 3 . The functions here are the same as in the ADVERTISE state described above. If the vehicle remains at rest for T 4 , the tag transitions to the VERIFY state, where most of the components are powered down. 
         [0107]    Note that the mobile device processes and communicates all information received from the tag to the server. 
         [0108]    If no tag  10  is located within a predetermined amount of time T 5  and the vehicle is moving the mobile communications device  14  may continue to record only GPS and/or its own sensor data. 
         [0109]    In one example embodiment, the user can select whether to transmit the data from the mobile communications device  14  to the backend server  18  by way of cellular data or if the data should be stored and transmitted only when the mobile communications device  14  comes into range of a short-range wireless LAN network such as WiFi. 
         [0110]    If the setting on the mobile communications device is to not allow for use of mobile cellular data, then the said data will only be transmitted when the device is connected to a WiFi network. 
         [0111]    In both the case of the cellular transmission and the WiFi transmission when the data is received on the servers the server side software will process this data and return processed or “clean” data back to the mobile communications device to update its currently stored trip and driver behaviour data for display back to the user. Such clean data involves the ability on the backend servers to determine the difference between walking data and driving data, and the types of transport being utilized such as a train or bus. 
         [0112]    Describing now the collision and crash detection functionality of the system, any significant acceleration event whose magnitude exceeds a specified configurable threshold A 2  is logged in the persistent storage on the tag. Such events are considered potential collisions and are immediately communicated to the mobile communications device using the communication protocol described above (in the CONNECTED state). 
         [0113]    Referring to  FIG. 7 , the microcontroller  22  samples and stores the accelerometer  24  readings including the accelerometer X, Y, and Z values. The microcontroller  22  determines from the accelerometer values if a crash/impact has occurred by checking if any of the X, Y or Z values or a combination of the values, e.g., (X̂2+Ŷ2+Ẑ2), exceeds a predetermined threshold for a predetermined time period. 
         [0114]    One method is to derive the acceleration components in the vertical (gravity) direction and in the direction perpendicular to gravity, and then consider an impact to have occurred if one or both components exceeds specified threshold values. Estimating the direction of gravity may be done in a number of ways, including using a low-pass filter over the entire stream of acceleration data observed thus far over the lifetime of the drive or even longer. 
         [0115]    If a crash/impact event has occurred then data from the accelerometer  24  is immediately stored in the memory  28  and simultaneously transmitted via the communications module  32  to the mobile communications device  14 . The mobile communications device  14  may augment the data from the tag with its own sensor data such as position and velocity and transmit that to the server in real time. 
         [0116]    Additional sensor information from the near past and near future gathered from the sensors on the mobile communication device (position, velocity) can also be transmitted in a crash/impact detection scenario. 
         [0117]    In an example embodiment, the mobile device (smartphone)  14  is an untrusted device. That is, the telematics data produced by the tag traverses the mobile device en route to the server, but neither the tag nor the server may trust the mobile device, which is owned by a potentially untrusted user. 
         [0118]    The invention includes a method by which the authenticity of the data and messages sent by the tag can be verified by the server, and vice versa. 
         [0119]    The traditional approach toward this problem is to use public key cryptography: the server and the tag each have a well-known public key, with a corresponding secret private key known only to the owner of the key. By digitally signing each message with its private key, an entity can verify that a recipient can verify the authenticity of the message. Because of the computational constraints on the tag, the invention uses symmetric keys, rather than more expensive public key operations. 
         [0120]    Every tag has a secret internal ID number (S_ID) built into the tag hardware (chip). The mapping between S_ID and the device ID (MAC address) is known to the server. 
         [0121]    All data sent from the tag to the mobile device, to be passed to the server, and sent from the server to the mobile communications device to be passed to the tag (including any acknowledgments and configuration information), they are digitally signed using a secret key derived from S_ID and the device ID. In an example embodiment, define a secret key K=ƒ (S_ID, deviceID); in one embodiment, the function ƒ is a bit-wise XOR operation. Each message includes an authentication token based on a one-way hash (e.g., SHA-1) of the content appended with K. ACK messages from the server also contain an authentication token based on a hash of K, so they are assured to come from the server (the intermediary mobile device never sees either S_ID or K). 
         [0122]    When an acknowledgment from the server is received, the acknowledged data is purged from the tag&#39;s flash; no data purging occurs until a signed ACK for that data is received. In particular, data acknowledged by the mobile device in the vehicle is not purged from the tag: an authenticated end-to-end acknowledgment from the server is required. As described earlier, these logs include event logs, trip duration logs, diagnostic logs, etc. 
         [0123]    Note that when acceleration and other sensor data is streamed to the mobile device from the tag, it may be discarded by the untrusted mobile application, but it cannot be tampered with or changed without detection by the server. If a rogue application discards the data, the server will not know, but the symptom will be the same as a trip in the trip duration log with no corresponding acceleration data. If a rogue application tries to “eat up” trip log data as well, any subsequent trip showing up at the server will inform the server of missing intermediate trips and missing data, conveying information that something is amiss and broken. That is enough to take corrective measures, including informing the user of possible problems or potentially malicious behavior. 
         [0124]    Like streamed acceleration events, crash or live event alerts are also sent to the phone without an end-to-end acknowledgement from the server, but they are sent signed so they can be verified as authentic. Note that the communication protocol between the tag and mobile device includes link-layer retries, so they are likely to be received at the server as long as the mobile device functions correctly (the data from the mobile device to the server is sent using a reliable protocol like TCP). It should be noted that if confidentiality is desired in addition to authenticity, the secret key K can be used to encrypt the data. 
         [0125]    Clock updates from the server to the tag can occur whenever phone is online. To update the clock, the phone requests a nonce (a one-time message) from tag. The phone sends the nonce to the server. The server constructs a time token containing the current time and an authenticator based on a hash of the nonce and the key K. The tag sets its clock only if the authenticator verifies correctly. 
         [0126]    This clock sync is important so that the accelerometer data stored in the memory  28  can later be tied up with GPS data measured by the executable application running on the mobile communications device  14  and the backend server data. 
         [0127]    In the event that the mobile communications device  14  is unable to connect to the tag  10  and the vehicle is moving the smartphone can be configured to gather and deliver its own sensor data to the server, or to not do so. 
         [0128]    The tag  10  includes a tamper detection mechanism  34 . The anti-tamper mechanism uses one or both of the following two methods. 
         [0129]    The first method uses the accelerometer and using an orientation algorithm where the tag  10  once secured to the vehicle will have knowledge of its correction angle in relation to the vehicle travelling direction. This algorithm computes the rotation matrix that converts from the axes of the tag&#39;s accelerometer to the axes corresponding to the vehicle&#39;s frame of reference. Should the tag  19  experience any sudden changes in this orientation the most likely reason is a movement of the affixed tag, which would be considered tampering. This tampering event will be recorded in the tag flash memory and transmitted securely to the backend server. The detection of such tampering reduces potential fraud. 
         [0130]    The second method uses a light sensor chip included in the tag  10 , which will be covered by the tag housing. When removing the tag from its intended position, the piece of the housing will be broken, and the light sensor will be exposed. This, in turn, will trigger a tamper event, which will be transmitted to the flash memory  28  and then sent via the mobile device  14  to the server  18 . 
         [0131]    In any event, the microcontroller  22  runs an orientation algorithm that aligns the axes of the accelerometer of the tag  10  to the coordinate system of the vehicle  12  regardless of how the tag  10  is placed in the vehicle. This orientation algorithm can be run on the tag  10  or the mobile device  14  or the back-end server. The computed orientation is configured on the tag, enabling the tag to detect events using only its own computation. 
         [0132]    In one example embodiment, the orientation algorithm will run when the vehicle is in motion until the point that the microcontroller  22  is convinced that it is correctly aligned with the vehicle. Once this occurs the microcontroller  22  will not run the algorithm again unless it is physically removed from its placement and replaced on the vehicle. 
         [0133]    The combination of the sensor tag and smartphone sensor data may be used as follows to determine whether the smartphone is on the driver&#39;s or passenger&#39;s side of the vehicle. The method requires knowledge of where in the vehicle the tag is affixed, which is easy to record in a database. The method uses the property that the centripetal acceleration experienced by any object depends on the radius of the turn being made, in the frame of reference of the car. This information may be derived using the method disclosed in U.S. patent application Ser. No. 13/832,456 and PCT Application Number: PCT/US14/30174. 
         [0134]    Specifically, this acceleration is equal to the product of the radius of the turn and the square of the angular velocity. Because angles are swept at the same rate as observed anywhere in the turning vehicle, the acceleration experienced depends on the radius alone. By knowing the position of the tag and comparing the magnitudes of the derived lateral (centripetal) acceleration between the tag and smartphone for the right-bearing and left-bearing turns observed during a drive, respectively, an estimate of the placement of the phone in different time segments during a drive (to account for the possible change in placement of the phone during a drive) can be obtained. 
         [0135]    With respect to distinguishing whether the phone is on the front or back seat, the signal strength of the radio transmissions from the tag is available on the smartphone. Knowing the tag&#39;s position enables such an estimate to be obtained as long as the tag is not equi-distant from the front and back seats. For example, a tag affixed to the front or rear windshield would provide the required degree of demarcation. 
         [0136]    Referring to  FIG. 9 , the server  18  includes a number of modules to implement the present invention and the associated memory  20 . 
         [0137]    In one example embodiment, the modules described below may be implemented by a machine-readable medium embodying instructions which, when executed by a machine, cause the machine to perform any of the methods described above. 
         [0138]    In another example embodiment the modules may be implemented using firmware programmed specifically to execute the method described herein. 
         [0139]    It will be appreciated that embodiments of the present invention are not limited to such architecture, and could equally well find application in a distributed, or peer-to-peer, architecture system. Thus the modules illustrated could be located on one or more servers operated by one or more institutions. 
         [0140]    It will also be appreciated that in any of these cases the modules form a physical apparatus with physical modules specifically for executing the steps of the method described herein. 
         [0141]    In any event, a communication module  52  receives data that has been transmitted by the mobile communications device  14 . 
         [0142]    An analyzing module  54  then analyses the received data to determine driver behaviors. 
         [0143]    Finally, in one example application of the abovementioned method and system, a calculation module  56  uses the analyzed data to calculate a reward for the user such as reduced premiums on an insurance plan for the motor vehicle.