Abstract:
Present disclosure refers to a method for detecting driving events of a vehicle. The method comprises the steps of: obtaining at least one motion data signal from sensors of a mobile device located in the vehicle; sending the at least one motion data signal from the sensors to a processing module; computing, in the processing module, an energy measurement of the at least one motion data signal; selecting time segments where the energy measurement of the at least one motion data signal exceeds a first threshold; analyzing the at least one motion data signal in said time segments; and assigning a driving event to each time segment.

Description:
CROSS REFERENCE TO RELATED APPLICATIONS 
       [0001]    This U.S. non-provisional patent application claims the benefit of priority under 35 U.S.C. §119 of European Patent Application No. 14382282.3, filed Jul. 17, 2014, the entire contents of which are hereby incorporated herein by reference for all purposes. 
       TECHNICAL FIELD 
       [0002]    Present disclosure generally relates to monitoring systems and more specifically relates to driving monitoring systems based on the sensors embedded in common smartphones. 
       BACKGROUND 
       [0003]    Nowadays, most people have smartphones which, at least, are equipped with embedded low-cost sensors, such as accelerometers, gyroscopes, GPS, magnetometers, etc., that allow the development of new applications which, through processing of sensor data, identify the activities the user is involved on. 
         [0004]    Among them, those directed to the identification of driver styles or driving behavior are attracting attention and investment for developing new services based on assessing the condition of the driver. Thus, several applications are being proposed in different fields, as vehicle fleet monitoring or insurance companies, or for specific applications such as drunk-driving detection or inefficient and unsafe driving behavior. 
         [0005]    Prior art offer different solutions for driving monitoring based on the use of high-precision accelerometers, mainly relying on precise measurements of longitudinal and lateral accelerations. Latest generations of smartphones already embed a MEMS IMU (Micro-electromechanical Systems and Inertial Measurement Unit) composed of an accelerometer and a gyroscope. At the beginning they were basic sensors for basic HMI (Human-Computer Interaction) tasks, mainly for switching screen orientation according to the estimated device position, but they are becoming more and more precise, so the quality and precision of current smartphones as sensing devices are leading to new innovative applications as those based on cost-effective driving monitoring systems. 
         [0006]    As it is said before, there are already some works directed to estimate the driving style or driver&#39;s behavior, which use smartphones as sensor platforms. Some of them combining the use of motion sensors with geo-location information provided by GPS, involving a high battery power consumption. In most of the cases the smartphone must also be placed in a fixed holder, or it is assumed that the device is fixed-aligned according to the vehicle reference coordinate system. There are also some approaches where the smartphone is not assumed to be in any particular position, but a calibration procedure is required to determine, based on motion sensor information, what vehicle direction is longitudinal. 
         [0007]    Solutions from prior art often go to pattern matching algorithms, such as Dynamic Time Warping (DTW), to compare the drivers&#39; driving style to predefined patterns: aggressive turns, aggressive U-turns, aggressive braking, aggressive lane change, etc. . . . . 
         [0008]    Therefore, existing proposals involve different disadvantages as high consumption of smartphone battery power which may lead to a rejection of the user for using this type of applications. Using GPS information demands an important power consumption, so the battery charge is critically run down and this represents a main issue for the users of smartphones. 
         [0009]    The requirement of placing the smartphone in a fixed position during a trip is also an important limitation for the usability and acceptability of the system. As this is a hard requirement to be met by the users, the accuracy of this kind of solutions is highly compromised. 
         [0010]    Furthermore, existing proposals which are unaware about the smartphone position, do not address specific procedures for making the driving-event detection process robust against uncontrolled movements or displacements usually present when a smartphone is located on a free position (dashboard, driver&#39;s pocket, copilot&#39;s seat . . . ) in a moving vehicle. 
         [0011]    Therefore, prior art is then missing a solution to this problem, where users of a smartphone may take advantage of their smartphones for obtaining valuable information of driving events without paying in return a big loss of battery or other limitations in terms of mobility. A flexible method to detect driving events based on the smartphone of the user travelling in a vehicle would be then a valuable contribution. 
       SUMMARY OF THE DISCLOSURE 
       [0012]    Present described embodiments solve the aforementioned problems by presenting a method for detecting driving events of a vehicle. The method comprises the steps of: 
         [0013]    a) obtaining at least one motion data signal from sensors of a mobile device located in the vehicle; 
         [0014]    b) sending the at least one motion data signal from the sensors to a processing module; c) computing, in the processing module, an energy measurement of the at least one motion data signal, 
         [0015]    d) selecting time segments where the energy measurement of the at least one motion data signal exceeds a first threshold; 
         [0016]    e) analyzing the at least one motion data signal in said time segments; 
         [0017]    f) assigning a driving event to each time segment, based on step e). 
         [0018]    Additionally, presently described embodiments may comprise the steps of:
       comparing, in each time segment corresponding to a driving event, a maximum energy value of the at least one motion data signal with a second threshold;   in the case of said the second threshold is exceeded in a certain time segment, determining an aggressive driving event for said time segment.       
 
         [0021]    One embodiment may comprise combining two or more close driving events into a single driving event. 
         [0022]    One embodiment may comprise, when assigning a driving event to a time segment, analyzing surrounding driving events. 
         [0023]    Optionally, presently described embodiments may comprise in one particular embodiment the step of filtering, through at least one low-pass filter, the at least one motion data signal to remove high-pass frequencies, which are not related to driving events. Thus, any manipulation of the mobile device may be ignored for next steps. 
         [0024]    Additionally, one embodiment may comprise resampling and interpolating the at least one motion data signal at a certain sampling frequency. 
         [0025]    The effect of the gravity may be estimated in the at least one motion data signal and compensated said effect before sending the at least one motion data signal to the processing module, according to one embodiment. 
         [0026]    Obtaining the at least one motion data signal, may comprise, according to one embodiment, measuring an acceleration value of the mobile device, using an accelerometer sensor embedded in the mobile device. 
         [0027]    Obtaining the at least one motion data signal, may comprise, according to one embodiment, measuring an angular velocity of the mobile device, using a gyroscope sensor embedded in the mobile device. 
         [0028]    The driving events may be selected from the following types: manipulation events, turn events, acceleration events, stop events and zig-zag events. 
         [0029]    A driving event, according to one embodiment, may comprise the following information: type of event; start time of the event; end time of the event; and maximum value of the motion data signal within the time segment assigned. 
         [0030]    Analyzing the at least one motion data signal, may further comprise in one embodiment, using an orientation vector associated to the vehicle, being said orientation vector based on a combination of previous acceleration and stop events. 
         [0031]    A second aspect refers to a system for detecting driving events of a vehicle. The system comprises:
       a mobile device located in the vehicle with sensors configured for obtaining at least one motion data signal; the mobile device is configured for sending the at least one motion data signal obtained by the sensors to a processing module;   a processing module configured for computing an energy measurement of the at least one motion data signal; selecting time segments where the energy measurement of the at least one motion data signal exceeds a first threshold; analyzing the at least one motion data signal in said time segments; and assigning a driving event to each time segment, based on the motion data signal analyzed.       
 
         [0034]    The mobile device, according to one embodiment, is a smartphone. 
         [0035]    A final aspect refers to a computer program product comprising computer program code adapted to perform the method when said program code is executed on a computer, a digital signal processor, a field-programmable gate array, an application-specific integrated circuit, a micro-processor, a micro-controller, or any other form of programmable hardware. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0036]    To complete the description that is being made and with the object of assisting in a better understanding of the characteristics of the described embodiments, in accordance with a preferred example of practical embodiment thereof, accompanying said description as an integral part thereof, is a drawing wherein, by way of illustration and not restrictively, the following has been represented: 
           [0037]    FIG.  1 .—shows the pre-processing component, according to one embodiment. 
           [0038]    FIG.  2 .—shows the event detection algorithm, according to one embodiment, setting a threshold T for the energy of the signals. 
           [0039]    FIG.  3 .—shows one particular embodiment, where the detection of basic event follows a hierarchical scheme. 
           [0040]    FIG.  4 .—shows the whole processing of the aggressive event detection, according to one embodiment. 
       
    
    
     DETAILED DESCRIPTION 
       [0041]    The present disclosure describes a process for obtaining significant driving events from a complete vehicle journey. Motion data from sensors embedded in a mobile device, as a smartphone, located in the vehicle (driver&#39;s pocket, glove compartment or any other location) are processed following a distributed processing scheme, where, according to one particular embodiment, the smartphone ( 50 ) (or Front-end) collects data from an accelerometer ( 51 ) and a gyroscope ( 52 ) shown in  FIG. 4 . Then, these data are pre-processed and stored for its further transmission to a Processing module (or Back-end component). The processing module, once the motion data are received, generates a first set of significant driving events and, optionally, a second set of aggressive driving events. 
         [0042]    The pre-processing stage ( 11 ) running in the smartphone and shown in  FIG. 1 , includes according to one embodiment, a component ( 12 ) to interpolate sensor measurements provided by the smartphone (accelerometer and gyroscope in this embodiment). This interpolation process provides a fixed sampling rate for all the sensor data independently of its technological characteristics. A second component of this pre-processing stage applies low-pass filtering ( 13 ) to both accelerometer and gyroscope data; this filters-out high-frequency components not related to regular driving dynamics. Filtered accelerometer data is affected by earth gravity. Therefore, the effect of gravity on the accelerometer are estimated and removed by a third component ( 14 ), to keep only data related to vehicle acceleration. Besides the use of low-pass filtered information, raw (non-filtered) sensor data are used in an event detection algorithm to discriminate between regular driving events and manipulations or undesired movements of the smartphone. 
         [0043]    A processing service is implemented in a processing module (or back-end module). According to different embodiments this processing module may even be included in the smartphone, but a preferred embodiment considers that the processing module is an independent module connected with the smartphone through a wireless telecommunication network. The event detection algorithm, implemented in this processing module, uses as input the raw and preprocessed data gathered from the previous pre-processing stage. Applying a short-time energy-based algorithm, it is computed instantaneous energy of all components of accelerometer and gyroscope signals; applied to both, raw and processed signals. 
         [0044]    The Event Detection Algorithm runs in two different steps: firstly significants events ( 41 ) and then aggressive events ( 42 ). 
         [0045]    For the significants events, time segments with relevant amount of acceleration or gyro energies are detected. Due to the interrelationship between these different significant events, a hierarchical event identification procedure is used in a preferred embodiment:
       Manipulation events ( 31 ) are first identified from raw gyroscope energy data, as time segments with smartphone uncontrolled movements by its user or displacements. In this way manipulation intervals are excluded to be analyzed when searching for following significant events.   Turn events ( 32 ) identification, based on filtered gyroscope energy, represents the second level of processing. Time segments or intervals with important gyro energy will be important to help in the detection of events as cornering or aggressive turning maneuvers.   Acceleration (braking/accelerating) ( 33 ) events identification, from vehicle acceleration component information.   Zig-zag events ( 35 ) are identified as two or more change lanes from the significant measurements of the accelerometer (lateral acceleration) not accompanied by any angular velocity. As it is produced by a string of sharp turns, the gyroscope does not have time to measure any angular velocity.   Finally, the last level of hierarchical structure is composed by the detection of segments where the vehicle is stopped. Stop events ( 34 ) are detected by looking for segments with low levels of acceleration energy considering also the gyroscopes energy.       
 
         [0051]    The output of this stage is a set of significant driving events. From this complete sequence of significant events, the Aggressive Events Detection component ( 42 ) may be applied to identify those related to aggressive driving maneuvers. The Aggressive Event Detection is based on a first filter of significant events based on the maximum value of acceleration energy within all segment. Then, those significant events above an event-specific threshold are analyzed attending to their context (surrounding events) to detect the final sequence of aggressive driving events. Through recursive analysis the time sequence of events is analyzed allowing, for example, to combine close aggressive acceleration and turn events into a single aggressive cornering or turn maneuver event, or, as in the preceding example, to identify an aggressive braking when a high acceleration event precedes a stop event. 
       Example Embodiments 
       [0052]    Raw accelerometer ( 51 ) and gyroscope ( 52 ) data provided by a smartphone ( 50 ) located in a vehicle are inputs to the pre-processing module ( 53 ). Output information from this pre-processing module is used as input for a two-stage Event Detection Algorithm as shown in  FIG. 4  (significant ( 41 ) and aggressive ( 42 )) which provides the final information of aggressive driving events. 
         [0053]    Different embodiments may choose different ways to implement the whole or some parts of the pre-processing module ( 53 ) in the smartphone, or the two-stage (significant and aggressive) Event Detection Algorithm in a back-end processing component or even having the whole system running in the smartphone. 
         [0054]      FIG. 1  represents one way of implementing this system. In the pre-processing component, ( 11 ), the three axis accelerations (ax, ay, az) and three gyro angular velocities (vx, vy, vz) provided by the smartphone are firstly resampled and interpolated ( 12 ) to have a stable and consistent sampling frequency for all data. The acceleration and angular velocity data is then filtered through low-pass filters ( 13 ). This can be done, for example, using a third order Butterworth filter with input x(n), output y(n) and coefficients a(1), a(2), a(3) and b(1), b(2), b(3), b(4). Filter coefficients are designed to define a low stop band enough to remove information not related to driving events: 
         [0000]        y ( n )= b (1) x ( n )+ b (2) x ( n− 1)+ b (3) x ( n− 2)+ b (4) x ( n− 3)− a (1) y ( n− 1)− a (2) y ( n− 2)− a (3) y ( n− 3)
 
         [0055]    The use of low-pass filters to remove undesired high-pass noise can also mask strong spiky signals in acceleration and angular velocity caused by relevant driving maneuvers. To avoid this undesirable effect, other techniques for removing noise without compromising spiky information could be used. For example, embodiments may also include wavelet transform to spike detection, a technique that has provided excellent results in several biomedical applications on signals with dynamics similar to those of accelerometers and gyroscopes. 
         [0056]    Filtered accelerometer data is further processed to derive vehicle acceleration component (related to driving events) ( 14 ). Any of the existing procedures can be used for estimating gravity vector g (obtained, for example, by averaging the acceleration signal over a big-size window: 100 seconds) and projecting acceleration data over horizontal plane a hor : 
         [0000]    
       
         
           
             g 
             = 
             
               
                 ( 
                 
                   axfil 
                   , 
                   ayfil 
                   , 
                   azfil 
                 
                 ) 
               
               
                  
                 
                   ( 
                   
                     axfil 
                     , 
                     ayfil 
                     , 
                     azfil 
                   
                   ) 
                 
                  
               
             
           
         
       
       
         
           
             
               a 
               hor 
             
             = 
             
               
                 afil 
                 - 
                 
                   a 
                   ver 
                 
               
               = 
               
                 afil 
                 - 
                 
                   ( 
                   
                     afil 
                     · 
                     g 
                   
                   ) 
                 
               
             
           
         
       
     
         [0057]    In one embodiment, the window used to estimate the gravity vector is defined accordingly with the segments where manipulation events are detected. That is, a new window for gravity estimation starts after a smartphone manipulation event is detected. 
         [0058]    After vehicle acceleration component estimation, the pre-processing component obtains the following information set for each interpolated sampling period:
       accR ( 16 ): Module of the total acceleration with gravity compensation procedure (removing gravity from vehicle acceleration measured by the smartphone ( 15 )) but without low-pass filtering:       
 
         [0000]      acc R =√{square root over ( ax   2   +ay   2   +az   2 )}
       accH ( 17 ): Module of total filtered acceleration in the vehicle plane:       
 
         [0000]      acc H =√{square root over ( ax hor 2   +ay hor 2   +az hor 2 )}
       velR ( 18 ): Module of the total raw (before low-pass filtering) gyro angular velocity:       
 
         [0000]      vel R =√{square root over ( vx   2   +vy   2   +vz   2 )}
       velF ( 19 ): Module of the total low-pass filtered gyro angular velocity:       
 
         [0000]      vel F =√{square root over ( vx fil 2   +vy fil 2   +vz fil 2 )}
 
         [0063]    After pre-processing, a two-stage Event Detection Algorithm is applied to detect and identify aggressive driving events. The Event Detection Algorithm of this particular embodiment consists of an initial Significant Events Detection ( 41 ) component followed by an Aggressive Events Detection component ( 42 ). 
         [0064]    The Significant Event Detection component ( 41 ) detects time segments or intervals corresponding to a set of significant events. The significant events may comprise the following: Manipulation events ( 43 ): smartphone uncontrolled movement or the user is manipulating the smartphone, so no driving events can be detected; Turn events ( 44 ): the vehicle is turning; Zig-zag events ( 54 ): the vehicle changes lanes twice in a short period of time; Acceleration (braking/acceleration) events ( 45 ): the vehicle is accelerating or decelerating without turning; Stop events ( 46 ): the vehicle is stopped. 
         [0065]    In one particular embodiment, the detection of any of these significant events is done using similar energy-based event detection algorithms, where energy can be computed from global accelerations or global angular velocities. For example, the detection of manipulation ( 43 ) events may be done using as input the module ( 22 ) of raw gyro velocities, velR ( 18 ). The event detection algorithm, showed in  FIG. 2 , is implemented defining a threshold T ( 23 ), to find those time instants ( 24 ) where the energy (in this case, calculated from velR) is above the given threshold. A manipulation event can thus be detected when a sequence of consecutive time instants with velR above T achieves:
       Specific manipulation minimum duration ( 25 )   Enough distance ( 26 ) from previous and next detected manipulation events.       
 
         [0068]    Thus, manipulation event detection (being i a sampling period): 
         [0000]      if vel R ( i )&gt; T  for  i= 1: N  and  N &gt;MinimumManipulationDuration 
         [0069]    In an alternative embodiment, other information from the actual usage of the smartphone could be collected and used to confirm the manipulation event. 
         [0070]    In an alternative embodiment, all the available information, including durations, distance between events, acceleration and angular velocity data, is combined to detect manipulation events applying fuzzy logic rules or through different machine learning techniques. 
         [0071]    Once an event is detected, it is represented by the following information:
       type of event (manipulation, turn, acceleration or stop)   start time   end time   maximum value of total acceleration (accH) within segment       
 
         [0076]    Due to the relationships between manipulation, stop and driving events, the detection of significant events is done in one particular embodiment following a hierarchical scheme, where events are detected according to their interdependences. More specifically, as shown in  FIG. 3 :
       Manipulation events ( 31 ) are first detected using previously described energy-based event detector from raw angular velocity, velR ( 18 ). They excludes any further search for other events in the detected smartphone manipulation interval.   Gyro or turn events are then detected ( 32 ), as they are relevant to the detection of accelerations/brakes and stop events. The detection of turn events may be done, for example, using a similar energy-based event detector, but using the low-pass filtered gyro velocity, velF ( 19 ) instead of velR, and excluding previously detected time intervals with manipulation events, if any. As it has been pointed out before, turn-events are characterized by their start and end times, together with a maximum value that corresponds to the maximum value of the total acceleration during the turn interval. This maximum value is used by the Aggressive Event Detection component to detect cornering or aggressive turning maneuvers. It is also relevant pointing out that due to common gyro drift problems some existing bias compensation procedures may be applied to dynamically compensate the module of gyro velocity before starting the event detection process.   After manipulation and turn events detections, acceleration events (including indistinctively both due to accelerating and braking) are detected ( 33 ). Again, in a particular embodiment, acceleration events may be obtained, for example, using an energy-based event detector working on the low-pass filtered vehicle acceleration, accH ( 17 ). Following the hierarchical process of event detection, time intervals corresponding to previously detected manipulation and turn events are excluded from the search of acceleration events. For example, some embodiments may apply techniques for adaptive estimation of background and activity thresholds from instantaneous measures of acceleration energy to detect zones with relevant acceleration values.   Zig zag events: change lanes in a short period of time means that a vehicle is maybe avoiding an obstacle. A zig zag event (at least two changes) or a simple change may be identified by registering lateral accelerations without significant angular velocities. This is the main difference against a turn because, when a vehicle changes lanes sharply, the gyroscope barely observes any angular velocity.   At the last level of the hierarchical procedure, those segments where the vehicle is stopped ( 34 ) are detected excluding time intervals where manipulations, turns or accelerations have been previously found. In this case, these events may be identified using a variance-based detection process looking for intervals with low levels (below a threshold) of accR ( 16 ), module of the total acceleration without low-pass filtering and velR ( 18 ), module of the squared raw gyro velocities before low-pass filtering. Gyroscopes energy is used to avoid false detections of stop events when the vehicle is peacefully moving along a road as, in these situations, gyro energy can detect vehicle turns incompatible with the vehicle being stopped.       
 
         [0082]    After a sequence of significant events has been detected for a particular vehicle journey, the Aggressive Events Detection component ( 42 ) is applied to identify those related to aggressive driving maneuvers. 
         [0083]    The Aggressive Event Detection Algorithm of the Aggressive Events Detection Component is based on a first filter or thresholding ( 47 ) where the maximum energy value reached by each basic event is compared to event-specific thresholds to save only aggressive acceleration and turn events characterized by their high energy. Different thresholds may be used based on different acceleration sources acting during different types of driving maneuvers. For manipulation and stop identification components, all events of these types are retained. In other embodiments, instead of using only energy information, relevant events could be detected using well-known discriminative techniques such as LDA (Linear Discrimination Analysis) or SVM (Support Vector Machines) working on a feature vector including: event duration, maximum acceleration value and position inside the event, maximum angular velocity as well as distances to previous events. 
         [0084]    Final collection of those selected relevant events is then recursively analyzed or post-processed ( 48 ) attending to their context (surrounding events) to detect the final sequence of aggressive driving events. Through this recursive post-processing the time sequence of aggressive events is analyzed allowing, for example, to combine close aggressive acceleration and gyro events into a single aggressive cornering or turn maneuver event. Context is also used to discriminate between aggressive braking and accelerating: a significant acceleration event before a stop event will be tagged as a hard brake event while after a stop event will be identified as an aggressive acceleration. 
         [0085]    Different embodiments include different techniques, as, for example, rule-based or statistical; to identify aggressive events from the information provided by the sequence of previously detected significant events. 
         [0086]    Some embodiments distinguish between acceleration and braking events by applying mechanisms such as, for example, using machine learning techniques to detect specific patterns of the braking and high-acceleration events based on its duration and the shape of the acceleration energy signal or its frequency-domain representation. 
         [0087]    Some embodiments consider the appearance of aggressive accelerations in relation to stop events. In that way, an aggressive acceleration just after a stop event is detected as a braking event. Some embodiments also use this information to obtain the actual orientation vector, defined from the three axis accelerometer data, which represents the braking maneuvers direction. This braking orientation vector could be used to differentiate between hard accelerations or braking in other aggressive acceleration events. Even an algorithm may be applied to distinguish between acceleration and braking events by analyzing the orientation vectors from all the detected relevant events. 
         [0088]    A summary of the whole processing of the aggressive event detection system, including pre-processing, Basic Event Detection and Aggressive Event Detection is shown in  FIG. 4 . In one embodiment, aggressive events detected are shown on a map ( 49 ) along the itinerary covered by the vehicle.