The subject matter herein generally relates to driving behavior identification, and particularly to an electronic device and a method for scoring driving behavior using vehicle inputs and outputs.
Driving behavior is identified and analyzed to improve driving safety. Various environmental sensors, such as cameras, radars, lidars, GPS sensors, are usually utilized to detect vehicle outputs, and the driving behavior is identified according to the vehicle outputs. However, the driving behavior depends on not only the vehicle outputs but also vehicle inputs from drivers, the vehicle inputs from the drivers and a relation between the vehicle inputs and the vehicle outputs has not been considered in driving behavior identification.
Many aspects of the disclosure can be better understood with reference to the following drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the disclosure. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.
It will be appreciated that for simplicity and clarity of illustration, where appropriate, reference numerals have been repeated among the different figures to indicate corresponding or analogous elements. In addition, numerous specific details are set forth in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein can be practiced without these specific details. In other instances, methods, procedures, and components have not been described in detail so as not to obscure the related relevant feature being described. Also, the description is not to be considered as limiting the scope of the embodiments described herein. The drawings are not necessarily to scale and the proportions of certain parts have been exaggerated to better illustrate details and features of the present disclosure.
The present disclosure, including the accompanying drawings, is illustrated by way of examples and not by way of limitation. Several definitions that apply throughout this disclosure will now be presented. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean “at least one.”
Furthermore, the term “module”, as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as Java, C, or assembly. One or more software instructions in the modules can be embedded in firmware, such as in an EPROM. The modules described herein can be implemented as either software and/or hardware modules and can be stored in any type of non-transitory computer-readable medium or another storage device. Some non-limiting examples of non-transitory computer-readable media include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives. The term “comprising” means “including, but not necessarily limited to”; it in detail indicates open-ended inclusion or membership in a so-described combination, group, series, and the like.
Referring to
In one embodiment, the electronic device 1 can be a personal computer or a server, the electronic device 1 communicates with the CAN bus of the vehicle 2, and transmits or receives data through the CAN bus. In other embodiments, the electronic device 1 can be a unit arranged in the vehicle 2 and coupled with the CAN bus. In other embodiments, the electronic device 1 can be the vehicle 2 itself.
At block 201, obtain historical input data and output data of the vehicle 2.
In one embodiment, input data of the vehicle 2 is generated by in response to driver operations, the driver operations can include turning a steering wheel of the vehicle 2 and pressing a pedal of the vehicle 2. The input data at least includes steering wheel angles, braking pedal positions, and acceleration pedal positions, the braking pedal position and the acceleration pedal position are in percent. The output data at least includes velocities, longitudinal accelerations, lateral accelerations, and yaw rates of the vehicle 2, the yaw rate is in rad/s. The input data and output data can be detected by sensors of the vehicle 2, and collected by the CAN bus of the vehicle 2.
In one embodiment, the historical input data and the historical output data can be collected by the CAN bus within a first predefined time period, and obtained from the CAN bus. The first predefined time period can be a day, a week, or a month.
At block 202, establish an output regression model of the vehicle 2 according to the historical output data.
Referring to
In one embodiment, at block 2022, determine the output regression model to be an ellipsoid boundary based on the three-dimensional coordinate system. The output regression model is expressed by the following equation (1):
In the equation (1), ax is the longitudinal acceleration, ay is the lateral acceleration, w is the yaw rate, a is an intercept on the x-axis, b is an intercept on the y-axis, c is an intercept on the z-axis.
At block 203, determine a boundary of the output regression model by calculating boundary limits of the output regression model.
Referring to
That is, |ax|≤ax,limit, |ay|≤ay,limit, a=ax,limit, b=ay,limit.
At block 2032, calculate a threshold value of the yaw rates according to the threshold value of the lateral accelerations and velocities of the vehicle. In one embodiment, a relation between the yaw rate w, the lateral acceleration ay, and velocity vx of the vehicle 2 can be expressed by the following equation (2) according to kinematics:
According to the equation (2) and
At block 2033, determine the threshold values of the longitudinal accelerations, the lateral accelerations, and the yaw rates to be boundary limits of the ellipsoid boundary. As illustrated in
At block 204, establish an input regression model of the vehicle 2 according to the historical input data.
Referring to
At block 2042, determine the input regression model to be an ellipse boundary based on the coordinate system. The output regression model is expressed by the following equation (3):
In the equation (3), δswa is the steering wheel angle, δpedal is the braking or acceleration pedal position, δpedal ϵ[−δpedal,brake, δpedal,accel], pc is an offset in a pedal axis, p is an intercept on the x-axis, q is an intercept on the y-axis. In one embodiment, the braking pedal position is set as negative, and the acceleration pedal position is set as positive, so that the pedal position ranges from negative to positive in the x-axis of the coordinate system.
At block 205, determine a boundary of the input regression model by calculating boundary limits of the input regression model.
Referring to
In one embodiment, the intercept q on the y-axis is equal to the threshold value of the steering wheel angles, a relation between the steering wheel angles δswa, the yaw rates w, an inverse steering gear ratio i of the vehicle 2, and a wheel span L of the vehicle 2 can be expressed by the following equation (4) according to kinematics.
δswa=iwatan(Lω) (4)
According the equation (4) and
At block 2052, determine the threshold value of the steering wheel angles to be one of boundary limits of the ellipse boundary corresponding to the steering wheel angles. In one embodiment, δswa,limit=q, thus,
At block 2053, establish a first linear regression model of the longitudinal accelerations according to a relation between the longitudinal acceleration ax, the pedal positions δswa, and the velocities vx of the vehicle 2.
In one embodiment, the relation between the longitudinal acceleration, the pedal positions, and the velocities of the vehicle can be expressed by the following equation (5):
a
x
=f
x(δpedal, vx) (5)
In the equation (5), the function fx is monotonic and can be fitted into the first linear regression model. The first linear regression model can be expressed by the following linear fitting equation (6):
In the equation (6), ϕj(X) is a basis function, and X ϵ[δpedal, vx]T.
At block 2054, calculate threshold values of the braking pedal positions and acceleration pedal positions according to the first linear regression model of the longitudinal accelerations. In one embodiment, according to the equation (6), the threshold value of the braking pedal positions δpedal,brake,limit=fx−1(−ax,limit, vx), the threshold value of the acceleration pedal positions δpedal,accel,limit=fx−1(+ax,limit, vx)
In other embodiments, establish a second linear regression model of the pedal positions according to a relation between the longitudinal accelerations and the velocities of the vehicle.
By switching dependent and independent variable, the relation between the longitudinal acceleration ay, the pedal positions δswa, and the velocities vx of the vehicle 2 can also be expressed by the following equation (7):
δpedal=gx(ax, vx) (7)
In the equation (7), the function gx is monotonic and can be fitted into the second linear regression model. The second linear regression model can be expressed by the following linear fitting equation (8):
In the equation (8), ψj(X) is a basis function, X ϵ[ax, vx]T.
In other embodiments, calculate threshold values of the braking pedal positions and acceleration pedal positions according to the second linear regression model of the pedal positions. In one embodiment, according to the equation (8), the threshold value of the braking pedal positions δpedal,brake,limit=gx(−ax,limit, vx), the threshold value of the acceleration pedal positions δpedal,accel,limit=gx(+a x,limit, vx).
At block 2055, calculate a threshold value of the pedal positions according to the threshold values of the braking pedal positions and acceleration pedal positions.
Due to respectively independent braking and acceleration system, there is always asymmetry at pedal position limits, that is, the threshold value of the braking pedal positions is different from the threshold value of acceleration pedal positions. The threshold value p of the pedal positions can be calculated by the following equation (9):
p=½(δpedal,brake,limit+δpedal,accel,limit) (9).
At block 2056, calculate the offset in the pedal axis according to the threshold values of the braking pedal positions and acceleration pedal positions. In one embodiment, the offset Pc in the pedal axis can be calculated by the following equation (10):
p
c=|δpedal,brake,limit−δpedal,accel,limit| (10).
At block 2057, determine the threshold value of the pedal positions to be the other one of the boundary limits of the ellipse boundary corresponding to the pedal positions. In one embodiment, the ellipse boundary can be determined according to the boundary limits and the offset in the pedal axis, that is, the threshold value q of the steering wheel angles, the threshold value p of the pedal positions, and the offset Pc in the pedal axis.
At block 206, obtain real-time input data and output data of the vehicle 2. In one embodiment, obtain the real-time input data and output data of the vehicle 2 within a second time period from the CAN bus. In one embodiment, the first predefined time period can also be a day, a week, or a month.
At block 207, calculate a first ratio of data points outside the boundary of the input regression model to total data points in the real-time input data, and a second ratio of data points outside the boundary of the output regression model to total data points in the real-time output data.
In one embodiment, the block 207 includes: determine the number of the total data points in the real-time input data and output data. Referring to
Referring to
In one embodiment, the block 207 further includes: determine the number of the data points outside the boundary of the input regression model in the real-time input data, and the data points outside the boundary of the output regression model in the real-time output data. The number of the data points outside the boundary of the input regression model are determined according to the boundary limits a, b, and c of the ellipsoid boundary. The number of the data points outside the boundary of the output regression model are determined according to the boundary limits p and q of the ellipse boundary.
In one embodiment, the block 207 further includes: calculate the first ratio of the number of the data points outside the boundary of the input regression model to the number of the total data points in the real-time input data, and the second ratio of the number of the data points outside the boundary of the output regression model to the number of the total data points in the real-time output data. The first or second ratio can be calculated by the following equation (11):
In the equation (9), the ratio is greater than 0 and is equal to or less than 1.
At block 208, score driving behavior of the driver of the vehicle according to the first ratio and the second ratio.
In one embodiment, the block 208 includes: determine a sum value of the product of the first ratio and a first predefined weight and the product of the second ratio and a second predefined weight to be a score of the driving behavior of the driver of the vehicle 2.
For example, the first predefined weight is assumed to be a, the second predefined weight is assumed to be β the score of the driving behavior of the driver of the vehicle 2 is calculated by the following equation (12):
Scoredriving behavior=a·RatioInput+β·RatioOutput (12)
In the equation (12), RatioInput is the first ratio, RatioOutput is the second ratio, the first predefined weight a and the second predefined weight β are positive weights which can provide more flexibility on scoring driving behavior, and can be predefined and adjusted.
In other embodiments, the block 208 includes: determine a sum value or an average value of the first ratio and second ratio to be a score of the driving behavior of the driver of the vehicle.
In one embodiment, the method further includes: define driving style of the driver based on the score. For example, drivers with scores less than a first predefined value are identified as smooth, drivers with scores between the first predefined value and a second predefined value are identified as normal, and drivers with scores above the second predefined value as aggressive.
In one embodiment, the method further includes: define insurance policy of the driver according to the score or the driving style of the driver.
The processor 10 can be a central processing unit (CPU), a microprocessor, or other data processor chip that performs functions in the electronic device 1.
In one embodiment, the storage device 20 can include various types of non-transitory computer-readable storage mediums. For example, the storage device 20 can be an internal storage system, such as a flash memory, a random access memory (RAM) for the temporary storage of information, and/or a read-only memory (ROM) for permanent storage of information. The storage device 20 can also be an external storage system, such as a hard disk, a storage card, or a data storage medium.
The communication interface 30 can be an interface of a communication module, for example, an interface of a wireless communication module. In one embodiment, the communication interface 30 can communicate with the CAN bus of the vehicle 2.
The storage device 20 stores instructions, the processor 10 executes the instructions stored in the storage device 20, and the instructions can be used for implementing the method for scoring driving behavior using vehicle inputs and outputs provided in the embodiments of the present disclosure.
The processor 10 is configured to:
obtain historical input data and output data of the vehicle 2;
establish an output regression model of the vehicle according to the historical output data;
determine a boundary of the output regression model by calculating boundary limits of the output regression model;
establish an input regression model of the vehicle according to the historical input data;
determine a boundary of the input regression model by calculating boundary limits of the input regression model;
obtain real-time input data and output data of the vehicle 2;
calculate a first ratio of data points outside the boundary of the input regression model to total data points in the real-time input data, and a second ratio of data points outside the boundary of the output regression model to total data points in the real-time output data; and
score driving behavior of a driver of the vehicle 2 according to the first ratio and the second ratio.
It is believed that the present embodiments and their advantages will be understood from the foregoing description, and it will be apparent that various changes may be made thereto without departing from the spirit and scope of the disclosure or sacrificing all of its material advantages, the examples hereinbefore described merely being embodiments of the present disclosure.