CN106226556B - Acceleration sensor calibration method and device - Google Patents

Acceleration sensor calibration method and device Download PDF

Info

Publication number
CN106226556B
CN106226556B CN201610529266.4A CN201610529266A CN106226556B CN 106226556 B CN106226556 B CN 106226556B CN 201610529266 A CN201610529266 A CN 201610529266A CN 106226556 B CN106226556 B CN 106226556B
Authority
CN
China
Prior art keywords
data
vehicle
terminal
acceleration sensor
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610529266.4A
Other languages
Chinese (zh)
Other versions
CN106226556A (en
Inventor
刘均
李磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN201610529266.4A priority Critical patent/CN106226556B/en
Priority to PCT/CN2016/105543 priority patent/WO2018006521A1/en
Publication of CN106226556A publication Critical patent/CN106226556A/en
Application granted granted Critical
Publication of CN106226556B publication Critical patent/CN106226556B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01PMEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
    • G01P21/00Testing or calibrating of apparatus or devices covered by the preceding groups

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Navigation (AREA)

Abstract

The invention discloses an acceleration sensor calibration method, which comprises the following steps: receiving terminal data which are sent by a terminal and acquired by a terminal local acceleration sensor, acquiring a first timestamp corresponding to the terminal data, and acquiring vehicle data and acquiring a second timestamp corresponding to the vehicle data by the vehicle local acceleration sensor; matching the terminal data and the vehicle data according to the first timestamp and the second timestamp, and acquiring a target rotation matrix according to the matched data; and calibrating the data acquired by the acceleration sensor of the vehicle according to the target rotation matrix. The invention also discloses an acceleration sensor calibration device. The invention improves the accuracy and convenience of the calibration of the acceleration sensor.

Description

Acceleration sensor calibration method and device
Technical Field
The invention relates to the technical field of vehicle data acquisition, in particular to an acceleration sensor calibration method and device.
Background
At present, an On Board Diagnostics (OBD) of a vehicle includes an acceleration sensor, the acceleration sensor of the vehicle is a three-dimensional acceleration detection chip designed according to an inertial pressure model, and the acceleration sensor is generally used to determine the mounting direction of the chip of the acceleration sensor, that is, the plane direction x-y of the chip. In a vehicle, the coordinate system x-y-z of the acceleration sensor is generally ensured to be coincident with the coordinate system x ' -y ' -z ' of the vehicle, and then data collected by the acceleration sensor is corrected.
The data coordinates output by the acceleration sensor need to be converted to the vehicle coordinate system through a series of spatial transformations, and the following methods are generally adopted: (1) adopting a direct coordinate system space conversion method: the method is characterized in that data of an acceleration sensor is converted to a vehicle coordinate system, and a sharp turn is detected according to the converted backward central acceleration (also called lateral acceleration, namely the vertical direction of the advancing direction of the vehicle). (2) When the vehicle leaves a factory, the acceleration sensor chip is kept coincident with a vehicle coordinate system; however, the method is only suitable for the front-loading market, and since the OBD installation postures of the rear-loading market are different, the directions of the coordinate systems of the acceleration sensors cannot be directly given, so that the method cannot be used for rear-loading market application, namely the method cannot be used for calibrating the acceleration sensors installed at any postures.
Disclosure of Invention
The invention mainly aims to provide an acceleration sensor calibration method and an acceleration sensor calibration device, and aims to improve the accuracy and convenience of acceleration sensor calibration.
In order to achieve the above object, the present invention provides an acceleration sensor calibration method, including:
receiving terminal data which are sent by a terminal and acquired by a terminal local acceleration sensor, acquiring a first timestamp corresponding to the terminal data, and acquiring vehicle data and acquiring a second timestamp corresponding to the vehicle data by the vehicle local acceleration sensor;
matching the terminal data and the vehicle data according to the first timestamp and the second timestamp, and acquiring a target rotation matrix according to the matched data;
and calibrating the data acquired by the acceleration sensor of the vehicle according to the target rotation matrix.
Preferably, the matching the terminal data and the vehicle data according to the first timestamp and the second timestamp, and the obtaining a target rotation matrix according to the matched data includes:
matching the terminal data and the vehicle data according to the first timestamp and the second timestamp, and respectively calculating corresponding rotation matrixes according to the matched data;
and acquiring a specified rotation matrix which satisfies that the difference between the square sum of each column of vector and 1 is within a preset threshold value and the error between the value obtained by multiplying the vehicle data and the corresponding terminal data is minimum from the rotation matrix, and setting the specified rotation matrix as a target rotation matrix.
Preferably, the acquiring vehicle data by an acceleration sensor local to the vehicle comprises:
acquiring a calibration matrix, and acquiring original data through a local acceleration sensor of the vehicle;
and calibrating the original data of the acceleration sensor according to the calibration matrix to obtain vehicle data.
Preferably, before receiving the terminal data obtained by the terminal local acceleration sensor and sent by the terminal, and obtaining the first timestamp corresponding to the terminal data, the method includes:
establishing a connection relation with a terminal, receiving a data packet of data acquired by an acceleration sensor and sent by the terminal, sending time of the terminal for sending the data packet, and recording vehicle receiving time;
and sending the data packet, the vehicle receiving time and the current vehicle sending time to a terminal for the terminal to record the terminal receiving time, and calibrating the time according to the terminal sending time, the vehicle receiving time, the vehicle sending time and the terminal receiving time to synchronize with the vehicle time.
Preferably, before receiving the terminal data obtained by the terminal local acceleration sensor and sent by the terminal, and obtaining the first timestamp corresponding to the terminal data, the method includes:
and receiving the adjusted placement position of the terminal on the vehicle so as to enable the terminal coordinate system to be coincident with the vehicle coordinate system.
In addition, to achieve the above object, the present invention also provides an acceleration sensor calibration apparatus, including:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for receiving a terminal with a coordinate system coincident with a vehicle coordinate system, sending terminal data acquired by a terminal local acceleration sensor and acquiring a first timestamp corresponding to the terminal data, and acquiring vehicle data and acquiring a second timestamp corresponding to the vehicle data through the vehicle local acceleration sensor;
the second acquisition module is used for matching the terminal data and the vehicle data according to the first timestamp and the second timestamp and acquiring a target rotation matrix according to the matched data;
and the calibration module is used for calibrating the data acquired by the acceleration sensor of the vehicle according to the target rotation matrix.
Preferably, the second obtaining module is further configured to match the terminal data and the vehicle data according to the first timestamp and the second timestamp, and calculate corresponding rotation matrices according to the matched data respectively;
and acquiring a specified rotation matrix which satisfies that the difference between the square sum of each column of vector and 1 is within a preset threshold value and the error between the value obtained by multiplying the vehicle data and the corresponding terminal data is minimum from the rotation matrix, and setting the specified rotation matrix as a target rotation matrix.
Preferably, the first obtaining module is further configured to obtain a calibration matrix and obtain raw data through a local acceleration sensor of the vehicle; and calibrating the original data of the acceleration sensor according to the calibration matrix to obtain vehicle data.
Preferably, the acceleration sensor calibration apparatus further includes:
the receiving module is used for establishing a connection relation with a terminal, receiving a data packet of data acquired by the acceleration sensor and sent by the terminal, sending the terminal sending time of the data packet, and recording the vehicle receiving time;
and the calibration module is used for sending the data packet, the vehicle receiving time and the current vehicle sending time to a terminal, so that the terminal records the terminal receiving time, and calibrates the time and the receiving time according to the terminal sending time, the vehicle receiving time, the vehicle sending time and the terminal receiving time, and synchronizes with the vehicle time.
Preferably, the acceleration sensor calibration apparatus further includes:
and the processing module is used for receiving the adjusted placement position of the terminal on the vehicle so as to enable the terminal coordinate system to be overlapped with the vehicle coordinate system.
According to the acceleration sensor calibration method and device provided by the embodiment of the invention, the terminal data acquired by the local acceleration sensor of the terminal and the first timestamp corresponding to the acquired terminal data are used, the vehicle data acquired by the local acceleration sensor of the vehicle and the second timestamp corresponding to the acquired vehicle data are used, the terminal data and the vehicle data are matched according to the first timestamp and the second timestamp to acquire the target rotation matrix, and then the data acquired by the acceleration sensor of the vehicle is calibrated according to the target rotation matrix, so that the accuracy and convenience of the acceleration sensor calibration are improved.
Drawings
FIG. 1 is a schematic flow chart illustrating a calibration method of an acceleration sensor according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of the relationship between the deceleration sensor coordinate system, the OBD coordinate system, and the vehicle coordinate system of the present invention;
FIG. 3 is a schematic diagram of two rectangular spatial coordinate systems performing origin translation and coordinate axis rotation to coincide in accordance with the present invention;
FIG. 4 is a schematic diagram of two spatial rectangular coordinate systems converted to a planar two-dimensional rectangular coordinate system according to the present invention;
FIG. 5 is a schematic diagram of the terminal time and the time of the fish vehicle synchronizing according to the present invention;
fig. 6 is a functional block diagram of an acceleration sensor calibration apparatus according to a first embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, a first embodiment of the acceleration sensor calibration method of the present invention is shown. The acceleration sensor calibration method of the embodiment includes:
step S10, receiving terminal data which are sent by a terminal and acquired by the terminal local acceleration sensor, acquiring a first timestamp corresponding to the terminal data, and acquiring vehicle data and acquiring a second timestamp corresponding to the vehicle data by the vehicle local acceleration sensor;
in this embodiment, the acceleration sensor calibration method is applied to a vehicle to calibrate an acceleration sensor included in an OBD, where the OBD includes a bluetooth, a wifi, an acceleration sensor, and the like.
The acceleration sensor of the vehicle is a chip for detecting the three-dimensional acceleration designed according to an inertial pressure model, and has the characteristics that:
1. the instantaneous error is large (noise is large), the accumulated error is small, namely the measured value of the acceleration sensor is stable in a long time, which is just the opposite of the gyroscope.
2. The three axes of the acceleration sensor are in the directions that the plane where the chip is located is an x-y plane, and the z-axis plane is perpendicular to the x-y plane, namely the data acquired by the acceleration sensor is measured according to the coordinate system. The data collected by the acceleration sensor are different according to different chip mounting directions, or are greatly related according to the placement position of the acceleration sensor in the OBD.
3. When the vehicle is on a slope, the data output by the acceleration sensor has the gravity component to influence the actual acceleration judgment.
As shown in fig. 2, the coordinate system of the acceleration sensor is (x1-y1-z1), the coordinate system of the acceleration sensor installation (i.e. OBD coordinate system) is (x2-y2-z2), and the coordinate system of the vehicle is (x3-y3-z3), and it can be known from the relationship among the three in fig. 2 that the data coordinate output by the acceleration sensor needs to be converted into the coordinate system of the vehicle through a series of spatial conversion.
The embodiment proposes to calibrate the acceleration sensor of the vehicle using the acceleration sensor of the terminal, including the cell phone, the iPad, etc., to eliminate the acceleration sensor noise of the vehicle. Since the OBDs in the aftermarket are installed in different postures and the direction of the coordinate system of the acceleration sensor cannot be directly determined, the coordinate calibration of the acceleration sensor installed in any posture is required to calibrate the data acquired by the acceleration sensor.
And (3) carrying out coordinate system calibration, relating to two reference systems: the vehicle coordinate system and the acceleration sensor coordinate system (the relationship between the OBD coordinate system and the acceleration sensor coordinate system is a simple matrix relationship), and thus a conversion from the OBD coordinate system to the vehicle coordinate system is required.
In this embodiment, the acceleration sensor may be configured to acquire data at preset time intervals (for example, at every 10 milliseconds) to obtain x, y, and z axis data, and directions of coordinate systems of the x, y, and z axis data are unknown, at this time, a third party terminal may be used to obtain a conversion relationship between a vehicle coordinate system and an acceleration sensor coordinate system according to a relative relationship between the vehicle coordinate system and the acceleration sensor coordinate system. Specifically, a rotation matrix between the vehicle and the acceleration sensor of the terminal is calculated by using the acceleration sensor of the terminal and the related data of the acceleration sensor of the vehicle, and the rotation matrix is a calibration rotation matrix.
Firstly, before executing the step S10, the terminal and the vehicle establish a connection relationship through bluetooth or wifi, and the vehicle receives an adjusted placement position of the terminal on the vehicle, so that the terminal coordinate system and the vehicle coordinate system coincide. Specifically, the terminal is horizontally placed on the vehicle, and the x-axis direction of the terminal coordinate system coincides with the x-axis direction of the vehicle coordinate system, so that the terminal coordinate system coincides with the vehicle coordinate system. And secondly, the terminal sends the terminal data acquired by the local acceleration sensor and the first timestamp corresponding to the acquired terminal data to the vehicle. Meanwhile, an acceleration sensor local to the vehicle acquires vehicle data, and records a second timestamp corresponding to the acquired vehicle data. In the process of data acquisition of the acceleration sensor of the terminal and the acceleration sensor of the vehicle, the coordinate system of the terminal is kept approximately coincident with the coordinate system of the vehicle and lasts for a specified time, and the specified time can be set to be 2-10 seconds and can also be flexibly set according to specific conditions.
In order to improve the reliability of the data, it is preferable that the vehicle performs triangular filtering or median filtering on the terminal data and the vehicle data, that is, performs three-axis smoothing filtering on the acceleration sensor data (filtering the three-axis sensor data separately) and stores the filtered data.
Step S20, matching the terminal data and the vehicle data according to the first time stamp and the second time stamp, and acquiring a target rotation matrix according to the matched data;
and the vehicle matches the stored terminal data and the corresponding first time stamp thereof, the vehicle data and the corresponding second time stamp thereof according to the first time stamp and the second time stamp. For example, the terminal data and the vehicle data collected at the same time are matched, or the terminal data and the vehicle data meeting a preset time difference between the vehicle time and the terminal time are matched.
And calculating matrix equations according to the matched data, and if more matrix equations are obtained at the moment, respectively calculating rotation matrixes from three combinations in the matrix equations. When a plurality of rotation matrices are obtained, an optimal rotation matrix can be selected as a target rotation matrix, and the following embodiments will be described in detail.
The process of calculating the rotation matrix by using the least square method will be described in detail below, and before coordinate transformation is performed, the acceleration sensor may have already completed the calibration process of the raw data before leaving the factory, and may directly use the parameters calibrated by the equipment manufacturer to standardize the raw data. Or calibrating the raw data collected by the acceleration sensor in advance according to the specific environment. After the calibration process of the original data is completed, the coordinate (x) in FIG. 2 is not considered any more1y1z1) And coordinates (x)2y2z2) The difference between them is instead that the acceleration sensor chip and the OBD are considered as one entity. At this time, the data acquired by the acceleration sensor acts on the projection component of the composite acceleration of the OBD on each axis of the OBD.
The purpose of the coordinate transformation is to convert the acceleration values of the axes in the OBD coordinate system into acceleration values of the axes in the vehicle coordinate system. This process involves two steps: firstly, solving an included angle between each axis of the two coordinate systems; second, correspondence between acceleration values.
As shown in fig. 3, the two spatial rectangular coordinate systems of the OBD coordinate system and the vehicle coordinate system are respectively O1X1Y1Z1And O2X2Y2Z2The origins of the two coordinate systems do not coincide, nor do the coordinate axes coincide. To realize the secondary coordinate O1X1Y1Z1To the coordinate O2X2Y2Z2The transformation can be carried out in two steps: firstly, the coordinate origin O is translated through the coordinate origin, and three translation parameters are delta X, delta Y and delta Z1And O2And (4) overlapping. Secondly, for two rectangular coordinate systems of three-dimensional space with the same origin, rotating around each coordinate axis, wherein three rotation parameters are thetax、θy、θzCan realize O1X1Y1Z1To O2X2Y2Z2And (4) transforming.
The coordinates of the same fixed point A under two coordinate systems are respectively set as (x)1,y1,z1) And (x)2,y2,z2) The purpose of the coordinate transformation algorithm is to find (x)2,y2,z2) And (x)1,y1,z1) The relationship between them. From the previous translations and rotations, the relationship of the two coordinates of the OBD coordinate system and the vehicle coordinate system can be expressed as follows:
Figure BDA0001042560090000071
wherein λ is a scale factor of two coordinate systems, R is a rotation matrix, [ Δ x, Δ y, Δ z]TIs a translation matrix.
Let a coordinate system O1X1Y1Z1By angle of rotation theta about the Z axiszThen z is easy to know2=z1For the relationships in the Y-axis and Z-axis, they can be translated to planar calculations, as shown in fig. 4. In the original coordinate system XOY, the rotation is performed by θ degrees in the counterclockwise direction around the origin, and the rotation becomes the coordinate system SOT. If a certain point p is set, the coordinate in the original coordinate system is (x, y), and the new coordinate after rotation is (s, t), then:
oa=ysin(θ)
as=xcos(θ)
from the plane vector relationship, it can be known that:
s=os=oa+as=xcos(θ)+ysin(θ)
t=ot=ay-yb=ycos(θ)-xsin(θ)
expressed by determinant as follows:
Figure BDA0001042560090000072
thus, (1) the coordinate system O1X1Y1Z1By angle of rotation theta about the Z axiszThen, (x)2,y2,z2) And (x)1,y1,z1) The relationship between them is:
Figure BDA0001042560090000073
the same can be deduced, (2) the coordinate system O1X1Y1Z1Angle of rotation theta about axisyThen, (x)2,y2,z2) And (x)1,y1,z1) The relationship between them is:
Figure BDA0001042560090000081
(3) coordinate system O1X1Y1Z1By angle of rotation theta about the X-axisxThen, (x)2,y2,z2) And (x)1,y1,z1) The relationship between them is:
Figure BDA0001042560090000082
finally, the mathematical model of the transformation of the two coordinates is:
Figure BDA0001042560090000083
therefore, only three translation parameters delta X, delta Y and delta Z need to be determined, and the three rotation parameters are thetax、θy、θzAnd a scale factor lambda, namely the transformation between the two space coordinates can be realized, and the calculation process can be obtained by the principle of a least square method.
And step S30, calibrating the data collected by the acceleration sensor of the vehicle according to the target rotation matrix.
After the target rotation matrix is obtained, the data collected by the acceleration sensor of the vehicle can be calibrated according to the target rotation matrix, so that the acceleration sensor of the vehicle with different installation postures is calibrated by utilizing the acceleration sensor of the terminal, and the sensor data on the OBD can be converted into each axis data under the vehicle coordinate system through the rotation matrix by solving the rotation matrix between the acceleration sensor coordinate system and the vehicle coordinate system. And the converted data is convenient to analyze the forward and lateral speeds of the vehicle and the vertical speed of the vehicle running plane. The problem that the acceleration sensor of the OBD cannot accurately achieve real-time data of each axis due to different installation postures of the OBD on the vehicle in the traditional after-loading market is solved; and under the condition of a slope, the real-time three-axis acceleration data cannot be accurately utilized due to the influence of gravity.
The vehicle may acquire the vehicle data from the local acceleration sensor, and transmit the second timestamp corresponding to the acquired vehicle data to the terminal. The terminal matches the terminal data and the vehicle data according to the first timestamp and the second timestamp after acquiring the terminal data and the first timestamp corresponding to the terminal data according to the terminal data acquired by the local acceleration sensor, acquires a target rotation matrix according to the matched data, and sends the target rotation matrix to the vehicle. And after the vehicle receives the target rotation matrix, calibrating the data acquired by the acceleration sensor of the vehicle according to the target rotation matrix.
According to the embodiment of the invention, the terminal data acquired by the local acceleration sensor of the terminal and the first timestamp corresponding to the acquired terminal data are used, the vehicle data acquired by the local acceleration sensor of the vehicle and the second timestamp corresponding to the acquired vehicle data are used, the terminal data and the vehicle data are matched according to the first timestamp and the second timestamp to acquire the target rotation matrix, and then the data acquired by the acceleration sensor of the vehicle is calibrated according to the target rotation matrix, so that the accuracy and convenience of the calibration of the acceleration sensor are improved.
Further, based on the first embodiment of the acceleration sensor calibration method, a second embodiment of the acceleration sensor calibration method of the present invention is provided, in which the step S20 includes: matching the terminal data and the vehicle data according to the first timestamp and the second timestamp, and respectively calculating corresponding rotation matrixes according to the matched data;
and acquiring a specified rotation matrix which satisfies that the difference between the square sum of each column of vector and 1 is within a preset threshold value and the error between the value obtained by multiplying the vehicle data and the corresponding terminal data is minimum from the rotation matrix, and setting the specified rotation matrix as a target rotation matrix.
In this embodiment, in the process that the vehicle acquires the target rotation matrix, the vehicle matches the stored terminal data and the corresponding first timestamp thereof, and matches the vehicle data and the terminal data according to the first timestamp and the second timestamp. For example, the terminal data and the vehicle data collected at the same time are matched, or the terminal data and the vehicle data meeting a preset time difference between the vehicle time and the terminal time are matched.
And respectively calculating corresponding rotation matrixes according to the matched data, wherein the time stamp matching is used together with the combined acceleration matching, the difference value between the time stamps corresponding to the two groups of sensor data meets the condition that the fluctuation range is within a certain specified range, and the difference value between the two corresponding groups of acceleration data meets a certain threshold value, screening out alternative matrix equations according to the condition, wherein the selected matrix equations are more, and the rotation matrixes can be respectively calculated from three combinations in the matrix equations. When a plurality of rotation matrices are obtained, an optimal rotation matrix can be selected as a target rotation matrix. Specifically, the difference between the square sum of each column of vectors of the rotation matrix and 1 is selected to be within a preset threshold value, which can be infinitely close to 1, and the actual output error is minimum, so that the target rotation matrix can be finally obtained. The actual output error is an error between a value obtained by multiplying the rotation matrix by the vehicle data and the corresponding terminal data, and the rotation matrix with the minimum error is set as the target rotation matrix.
In order to improve the reliability of the target rotation matrix, it may be further configured that an error of each pairing between the terminal data and the vehicle data satisfies a certain threshold, and the number of the paired data is more than half of the total number of the paired data. In the mathematical model of the transformation of the two coordinates, λ may be 1 and the offset may be 0.
According to the embodiment, after the rotation matrix is obtained through calculation according to the matched terminal data and the vehicle data, the optimal target rotation matrix is selected from the rotation matrix according to the specified conditions, and the reliability of the acceleration sensor calibration is improved.
Further, based on the first embodiment of the calibration method for an acceleration sensor, a third embodiment of the calibration method for an acceleration sensor according to the present invention is provided, in which the step of acquiring vehicle data by the local acceleration sensor of the vehicle includes: acquiring a calibration matrix, and acquiring original data through a local acceleration sensor of the vehicle; and calibrating the original data of the acceleration sensor according to the calibration matrix to obtain vehicle data.
In this embodiment, the raw data of the acceleration sensor of the vehicle needs to be calibrated when the vehicle data is acquired, so that the acceleration sensor chip and the OBD can be regarded as a whole. Specifically, the raw data of the acceleration sensor needs to be calibrated according to a specific environment, and the principle of the raw data calibration is described in detail below.
Setting the normalized acceleration to (A)x2,Ay2,Az2) The acceleration sensor local to the vehicle collects the raw data as (A)x1,Ay1,Az1) The relationship between the normalized acceleration and the raw data can be expressed by the following equation 1. Equation 1:
Figure BDA0001042560090000101
wherein, [ A _ m]3×3Representing an error matrix between the coordinate axis of the acceleration sensor and the coordinate axis of the OBD;
A_SCi(i ═ 1,2,3) represents the sensitivity of each axis of the acceleration sensor;
A_OSi(i ═ 1,2,3) represents the zero-g level offset of the acceleration sensor;
the purpose of "calibrating" the acceleration sensor is to determine the ACC10To ACC33These 12 parameters, as shown in table 1 below:
table 1: accurate acceleration value of each axis of OBD (on-Board diagnostics) at fixed position
Figure BDA0001042560090000111
Can be at six fixed positions (A) of the table 1x2,Ay2,Az2Known) the acceleration of each axis of the acceleration sensor of 5s to 10s is collected at an Output data rate (Output DataRate) of 100Hz, and the above 12 parameters are estimated using the following least square method. Equation 1 above can be rewritten as equation 2:
Figure BDA0001042560090000112
or abbreviated as equation 3: y ═ w.X
Wherein, the matrix X represents 12 parameters to be estimated in the calibration process, namely X represents a calibration matrix;
the matrix w represents the acceleration sensor raw data collected at 6 fixed positions;
the matrix Y represents known values of the acceleration standard of the device at 6 fixed positions.
For example, in the upward position, [ A ]x2,Ay2,Az2]=[0 0 -1]Assume that raw data a of n1 sets of acceleration sensors is collected at this locationx1,Ay1,Az1Then equation 4 is obtained:
Y1=[0 0 -1]n1×3
w1=[AxP1AyP1AzP11]n1×4
wherein the matrix has n1 rows [ 00-1 ], and n1 groups of acceleration sensor raw data are collected by the matrix. Similarly, the other 5 positions in table 1 collect the raw data of the acceleration sensors of n2, n3, n4, n5, and n6 respectively, and then equation 5 is obtained:
Y2=[0 0 -1]n2×3
w2=[AxP2AyP2AzP21]n2×4
equation 6:
Y3=[0 0 -1]n3×3
w3=[AxP3AyP3AzP31]n3×4
equation 7:
Y4=[0 0 -1]n4×3
w4=[AxP4AyP4AzP41]n4×4
equation 8:
Y5=[0 0 -1]n5×3
w5=[AxP5AyP5AzP51]n5×4
equation 9:
Y6=[0 0 -1]n6×3
w6=[AxP6AyP6AzP61]n6×4
combining equations 4 through 9, and let n be n1+n2+n3+n4+n5+n6Then equation 3 above can be rewritten as equation 10: y isn×3=wn×4·X4×3Wherein, in the step (A),
Figure BDA0001042560090000121
from this, the 12 parameters to be estimated in the calibration process can be obtained from the following equation 11, equation 11:
X=[wT·w]-1wT·Y
wherein, wTRepresents a transpose of a matrix; [ w ]T·w]-1Representing the inverse of the matrix.
The above process can be used as raw data calibration of the acceleration sensor, and here is only a reference calibration method. Of course, a conversion matrix of the sensor data coordinate system to the chip coordinate system provided by the acceleration sensor manufacturer may also be used.
In the embodiment, the vehicle data is obtained by calibrating the calibration matrix and the original data acquired by the acceleration sensor, so that the accuracy of the calibration of the acceleration sensor is improved.
Further, based on any one of the embodiments of the acceleration sensor calibration method, a fourth embodiment of the acceleration sensor calibration method according to the present invention is provided, where the step S10 includes: establishing a connection relation with a terminal, receiving a data packet of data acquired by an acceleration sensor and sent by the terminal, sending time of the terminal for sending the data packet, and recording vehicle receiving time;
and sending the data packet, the vehicle receiving time and the current vehicle sending time to a terminal for the terminal to record the terminal receiving time, and calibrating the time according to the terminal sending time, the vehicle receiving time, the vehicle sending time and the terminal receiving time to synchronize with the vehicle time.
In this embodiment, before the terminal and the vehicle acquire data through the acceleration sensor, the time of the terminal and the time of the vehicle need to be synchronized. The terminal and the vehicle are connected through Bluetooth or wifi, once the connection is established, the time difference between the terminal and the vehicle is firstly determined, time correction is carried out, and the average value of the time difference is obtained, so that the time difference between the terminal and the vehicle is determined.
Specifically, as shown in fig. 5, the terminal transmits a packet, which is the occurrence time of the acquisition event at which the acceleration sensor acquires data at a certain time, to the vehicle from time T0 (terminal transmission time). Assuming that when the terminal time is T0, the time of the vehicle is T0+ offset, and the time required for bluetooth or wifi transmission to reception is Delay, for convenience of calculation, the time interval from the terminal transmission to the vehicle reception and the time interval from the vehicle transmission to the terminal reception are both Delay. Therefore, the time when the vehicle receives the data packet is T0+ offset + Delay, then the vehicle packs the received data packet, the time T0+ offset + Delay (vehicle receiving time) of the vehicle receiving number and the time T1-Delay + offset (vehicle sending time) of the vehicle sending the data packet, and then sends the data packet back to the terminal, and records the receiving time T1 (terminal receiving time) of the terminal, so that the following relation holds:
Phone_send_time=T0;
Phone_receive_time=T1;
Golo_send_time=T1-Delay+offset;
Golo_receive_time=T0+offset+Delay;
Offset=(Golo_send_time+Golo_receive_time-Phone_send_time-Phone_receive_time)/2;
Delay=(Golo_receive_time-Golo_send_time+Phone_receive_time-Phone_send_time)/2;
offset represents a time difference between the terminal and the vehicle; delay represents a process time of transmitting and receiving the Bluetooth; phone _ send _ time represents the terminal transmission time; phone _ receive _ time represents a terminal reception time; gold _ send _ time represents vehicle transmission time; golo _ receive _ time represents a vehicle reception time.
Preferably, the offset and Delay of N times of sending and receiving data packets may be counted, the average value of the offset and Delay is calculated, the greater the N, the more accurate the offset and Delay, and the maximum and minimum values of the offset of the N sending and receiving processes are counted. Knowing the mean, maximum, and minimum values of the offsets, the time relationship between the terminal and the vehicle is: the time of the terminal is the time-offset of the vehicle, so that the time difference between the terminal and the vehicle can be accurate to 10ms, and the synchronization requirement is basically met. The reason for maintaining the time synchronization is that the three-axis data of the acceleration sensor of the terminal and the acceleration sensor of the vehicle at the same time are collected to calculate the transformation matrix and the rotation matrix, and the time stamps of the sensor data collected from the acceleration sensor of the terminal and the sensor data collected from the acceleration sensor of the vehicle are matched.
According to the embodiment, the local time of the terminal can be calibrated according to the terminal sending time, the vehicle receiving time, the vehicle sending time and the terminal receiving time, and the local time and the vehicle time are synchronized, so that the terminal data and the vehicle data are matched according to the timestamp to acquire the target rotation matrix, and the accuracy and the convenience of the acceleration sensor calibration are improved.
Correspondingly, as shown in fig. 6, a first embodiment of the calibration apparatus for an acceleration sensor according to the present invention is provided. The acceleration sensor calibration apparatus of this embodiment includes:
the first obtaining module 100 is configured to receive a terminal whose coordinate system coincides with a vehicle coordinate system, send terminal data obtained by a terminal local acceleration sensor and obtain a first timestamp corresponding to the terminal data, and obtain vehicle data and obtain a second timestamp corresponding to the vehicle data through the vehicle local acceleration sensor;
in this embodiment, acceleration sensor calibrating device is applied to the vehicle and calibrates the acceleration sensor that OBD includes, and this OBD contains bluetooth, wifi and acceleration sensor etc..
As shown in fig. 2, the coordinate system of the acceleration sensor is (x1-y1-z1), the coordinate system of the acceleration sensor installation (i.e. OBD coordinate system) is (x2-y2-z2), and the coordinate system of the vehicle is (x3-y3-z3), and it can be known from the relationship among the three in fig. 2 that the data coordinate output by the acceleration sensor needs to be converted into the coordinate system of the vehicle through a series of spatial conversion.
The embodiment proposes to calibrate the acceleration sensor of the vehicle using the acceleration sensor of the terminal, including the cell phone, the iPad, etc., to eliminate the acceleration sensor noise of the vehicle. Since the OBDs in the aftermarket are installed in different postures and the direction of the coordinate system of the acceleration sensor cannot be directly determined, the coordinate calibration of the acceleration sensor installed in any posture is required to calibrate the data acquired by the acceleration sensor.
And (3) carrying out coordinate system calibration, relating to two reference systems: the vehicle coordinate system and the acceleration sensor coordinate system (the relationship between the OBD coordinate system and the acceleration sensor coordinate system is a simple matrix relationship), and thus a conversion from the OBD coordinate system to the vehicle coordinate system is required.
In this embodiment, the acceleration sensor may be configured to acquire data at preset time intervals (for example, at every 10 milliseconds) to obtain x, y, and z axis data, and directions of coordinate systems of the x, y, and z axis data are unknown, at this time, a third party terminal may be used to obtain a conversion relationship between a vehicle coordinate system and an acceleration sensor coordinate system according to a relative relationship between the vehicle coordinate system and the acceleration sensor coordinate system. Specifically, a rotation matrix between the vehicle and the acceleration sensor of the terminal is calculated by using the acceleration sensor of the terminal and the related data of the acceleration sensor of the vehicle, and the rotation matrix is a calibration rotation matrix.
The acceleration sensor calibration apparatus further includes: and the processing module is used for receiving the adjusted placement position of the terminal on the vehicle so as to enable the terminal coordinate system to be overlapped with the vehicle coordinate system. Firstly, a connection relation is established between a terminal and a vehicle through Bluetooth or wifi, the terminal is horizontally placed on the vehicle, and the x-axis direction of a terminal coordinate system is consistent with the x-axis direction of a vehicle coordinate system, so that the terminal coordinate system is coincided with the vehicle coordinate system. And secondly, the terminal sends the terminal data acquired by the local acceleration sensor and the first timestamp corresponding to the acquired terminal data to the vehicle. The first obtaining module 100 receives the terminal data and the corresponding first timestamp, and obtains vehicle data through a local acceleration sensor of the vehicle, and records and obtains a second timestamp corresponding to the vehicle data. In the process of data acquisition of the acceleration sensor of the terminal and the acceleration sensor of the vehicle, the coordinate system of the terminal is kept approximately coincident with the coordinate system of the vehicle and lasts for a specified time, and the specified time can be set to be 2-10 seconds and can also be flexibly set according to specific conditions.
In order to improve the reliability of the data, it is preferable that the vehicle performs triangular filtering or median filtering on the terminal data and the vehicle data, that is, performs three-axis smoothing filtering on the acceleration sensor data (filtering the three-axis sensor data separately) and stores the filtered data.
A second obtaining module 200, configured to match the terminal data and the vehicle data according to the first timestamp and the second timestamp, and obtain a target rotation matrix according to the matched data;
the vehicle matches the stored terminal data and the corresponding first timestamp thereof, the vehicle data and the corresponding second timestamp thereof by the second obtaining module 200 according to the first timestamp and the second timestamp. For example, the terminal data and the vehicle data collected at the same time are matched, or the terminal data and the vehicle data meeting a preset time difference between the vehicle time and the terminal time are matched.
The second obtaining module 200 calculates matrix equations according to the matched data, and if more matrix equations are obtained at this time, the rotation matrices can be calculated from three combinations of the matrix equations. When a plurality of rotation matrices are obtained, an optimal rotation matrix can be selected as a target rotation matrix, and the following embodiments will be described in detail.
The process of calculating the rotation matrix by using the least square method will be described in detail below, and before coordinate transformation is performed, the acceleration sensor may have already completed the calibration process of the raw data before leaving the factory, and may directly use the parameters calibrated by the equipment manufacturer to standardize the raw data. Or calibrating the raw data collected by the acceleration sensor in advance according to the specific environment. After the calibration process of the original data is completed, the coordinate (x) in FIG. 2 is not considered any more1y1z1) And coordinates (x)2y2z2) The difference between them is instead that the acceleration sensor chip and the OBD are considered as one entity. At this time, the data acquired by the acceleration sensor acts on the projection component of the composite acceleration of the OBD on each axis of the OBD.
The purpose of the coordinate transformation is to convert the acceleration values of the axes in the OBD coordinate system into acceleration values of the axes in the vehicle coordinate system. This process involves two steps: firstly, solving an included angle between each axis of the two coordinate systems; second, correspondence between acceleration values.
As shown in fig. 3, the two spatial rectangular coordinate systems of the OBD coordinate system and the vehicle coordinate system are respectively O1X1Y1Z1And O2X2Y2Z2The origins of the two coordinate systems do not coincide, nor do the coordinate axes coincide. To realize the secondary coordinate O1X1Y1Z1To the coordinate O2X2Y2Z2The transformation can be carried out in two steps: firstly, the coordinate origin O is translated through the coordinate origin, and three translation parameters are delta X, delta Y and delta Z1And O2And (4) overlapping. Secondly, for two rectangular coordinate systems of three-dimensional space with the same origin, rotating around each coordinate axis, wherein three rotation parameters are thetax、θy、θzCan realize O1X1Y1Z1To O2X2Y2Z2And (4) transforming.
The coordinates of the same fixed point A under two coordinate systems are respectively set as (x)1,y1,z1) And (x)2,y2,z2) The purpose of the coordinate transformation algorithm is to find (x)2,y2,z2) And (x)1,y1,z1) The relationship between them. From the previous translations and rotations, the relationship of the two coordinates of the OBD coordinate system and the vehicle coordinate system can be expressed as follows:
Figure BDA0001042560090000161
wherein λ is a scale factor of two coordinate systems, R is a rotation matrix, [ Δ x, Δ y, Δ z]TIs a translation matrix.
Let a coordinate system O1X1Y1Z1By angle of rotation theta about the Z axiszThen z is easy to know2=z1For the relationship between the Y axis and the Z axis, they can be setConversion to planar calculations is shown in FIG. 4. In the original coordinate system XOY, the rotation is performed by θ degrees in the counterclockwise direction around the origin, and the rotation becomes the coordinate system SOT. If a certain point p is set, the coordinate in the original coordinate system is (x, y), and the new coordinate after rotation is (s, t), then:
oa=ysin(θ)
as=xcos(θ)
from the plane vector relationship, it can be known that:
s=os=oa+as=xcos(θ)+ysin(θ)
t=ot=ay-yb=ycos(θ)-xsin(θ)
expressed by determinant as follows:
Figure BDA0001042560090000171
thus, (1) the coordinate system O1X1Y1Z1By angle of rotation theta about the Z axiszThen, (x)2,y2,z2) And (x)1,y1,z1) The relationship between them is:
Figure BDA0001042560090000172
the same can be deduced, (2) the coordinate system O1X1Y1Z1Angle of rotation theta about axisyThen, (x)2,y2,z2) And (x)1,y1,z1) The relationship between them is:
Figure BDA0001042560090000173
(3) coordinate system O1X1Y1Z1By angle of rotation theta about the X-axisxThen, (x)2,y2,z2) And (x)1,y1,z1) The relationship between them is:
Figure BDA0001042560090000174
finally, the mathematical model of the transformation of the two coordinates is:
Figure BDA0001042560090000175
therefore, only three translation parameters delta X, delta Y and delta Z need to be determined, and the three rotation parameters are thetax、θy、θzAnd a scale factor lambda, namely the transformation between the two space coordinates can be realized, and the calculation process can be obtained by the principle of a least square method.
And the calibration module 300 is configured to calibrate data acquired by an acceleration sensor of the vehicle according to the target rotation matrix.
After the target rotation matrix is obtained, the calibration module 300 may calibrate data collected by the acceleration sensor of the vehicle according to the target rotation matrix, so that the acceleration sensor of the terminal is utilized to calibrate the acceleration sensors of the vehicles with different installation postures, and the rotation matrix between the coordinate system of the acceleration sensor and the coordinate system of the vehicle is obtained, so that the sensor data on the OBD may be converted into data of each axis under the coordinate system of the vehicle through the rotation matrix. And the converted data is convenient to analyze the forward and lateral speeds of the vehicle and the vertical speed of the vehicle running plane. The problem that the acceleration sensor of the OBD cannot accurately achieve real-time data of each axis due to different installation postures of the OBD on the vehicle in the traditional after-loading market is solved; and under the condition of a slope, the real-time three-axis acceleration data cannot be accurately utilized due to the influence of gravity.
The vehicle may acquire the vehicle data from the local acceleration sensor, and transmit the second timestamp corresponding to the acquired vehicle data to the terminal. The terminal matches the terminal data and the vehicle data according to the first timestamp and the second timestamp after acquiring the terminal data and the first timestamp corresponding to the terminal data according to the terminal data acquired by the local acceleration sensor, acquires a target rotation matrix according to the matched data, and sends the target rotation matrix to the vehicle. And after the vehicle receives the target rotation matrix, calibrating the data acquired by the acceleration sensor of the vehicle according to the target rotation matrix.
According to the embodiment of the invention, the terminal data acquired by the local acceleration sensor of the terminal and the first timestamp corresponding to the acquired terminal data are used, the vehicle data acquired by the local acceleration sensor of the vehicle and the second timestamp corresponding to the acquired vehicle data are used, the terminal data and the vehicle data are matched according to the first timestamp and the second timestamp to acquire the target rotation matrix, and then the data acquired by the acceleration sensor of the vehicle is calibrated according to the target rotation matrix, so that the accuracy and convenience of the calibration of the acceleration sensor are improved.
Further, based on the first embodiment of the calibration apparatus for an acceleration sensor, a second embodiment of the calibration apparatus for an acceleration sensor according to the present invention is provided, in which the second obtaining module 200 is further configured to match the terminal data and the vehicle data according to the first timestamp and the second timestamp, and calculate corresponding rotation matrices according to the matched data;
and acquiring a specified rotation matrix which satisfies that the difference between the square sum of each column of vector and 1 is within a preset threshold value and the error between the value obtained by multiplying the vehicle data and the corresponding terminal data is minimum from the rotation matrix, and setting the specified rotation matrix as a target rotation matrix.
In this embodiment, in the process of acquiring the target rotation matrix by the vehicle, the second acquiring module 200 matches the stored terminal data and the corresponding first timestamp thereof, and matches the vehicle data and the terminal data according to the first timestamp and the second timestamp. For example, the terminal data and the vehicle data collected at the same time are matched, or the terminal data and the vehicle data meeting a preset time difference between the vehicle time and the terminal time are matched.
The second obtaining module 200 respectively calculates corresponding rotation matrices according to the matched data, the timestamp matching is used together with the combined acceleration matching, the difference value between the timestamps corresponding to the two sets of sensor data meets the requirement that the fluctuation range is within a certain specified range, and the difference value between the two corresponding sets of acceleration data meets a certain threshold value, an alternative matrix equation is screened out according to the condition, the selected matrix equations are more, and the rotation matrices can be respectively calculated from three combinations in the matrix equations. When a plurality of rotation matrices are obtained, an optimal rotation matrix can be selected as a target rotation matrix. Specifically, the second obtaining module 200 selects that the difference between the sum of squares of each column of vectors of the rotation matrix and 1 is within a preset threshold, which may be infinitely close to 1, and the actual output error is minimum, and finally the target rotation matrix may be obtained. The actual output error is an error between a value obtained by multiplying the rotation matrix by the vehicle data and the corresponding terminal data, and the rotation matrix with the minimum error is set as the target rotation matrix.
In order to improve the reliability of the target rotation matrix, it may be further configured that an error of each pairing between the terminal data and the vehicle data satisfies a certain threshold, and the number of the paired data is more than half of the total number of the paired data. In the mathematical model of the transformation of the two coordinates, λ may be 1 and the offset may be 0.
According to the embodiment, after the rotation matrix is obtained through calculation according to the matched terminal data and the vehicle data, the optimal target rotation matrix is selected from the rotation matrix according to the specified conditions, and the reliability of the acceleration sensor calibration is improved.
Further, based on the first embodiment of the calibration apparatus for an acceleration sensor, a third embodiment of the calibration apparatus for an acceleration sensor according to the present invention is provided, in which the first obtaining module 100 is further configured to obtain a calibration matrix and obtain raw data through a local acceleration sensor of the vehicle; and calibrating the original data of the acceleration sensor according to the calibration matrix to obtain vehicle data.
In this embodiment, the raw data of the acceleration sensor of the vehicle needs to be calibrated when the vehicle data is acquired, so that the acceleration sensor chip and the OBD can be regarded as a whole. Specifically, the first obtaining module 100 needs to calibrate the raw data of the acceleration sensor according to a specific environment, and the following describes the principle of the raw data calibration in detail.
Setting the normalized acceleration to (A)x2,Ay2,Az2) The acceleration sensor local to the vehicle collects the raw data as (A)x1,Ay1,Az1) The relationship between the normalized acceleration and the raw data can be expressed by the following equation 1.
Equation 1:
Figure BDA0001042560090000201
wherein, [ A _ m]3×3Representing an error matrix between the coordinate axis of the acceleration sensor and the coordinate axis of the OBD;
A_SCi(i ═ 1,2,3) represents the sensitivity of each axis of the acceleration sensor;
A_OSi(i ═ 1,2,3) represents the zero-g level offset of the acceleration sensor;
the purpose of "calibrating" the acceleration sensor is to determine the ACC10To ACC33These 12 parameters, as shown in Table 1 above, can be at six fixed locations (A) in Table 1x2,Ay2,Az2Known) the acceleration of each axis of the acceleration sensor of 5s to 10s is collected at an Output data rate (Output DataRate) of 100Hz, and the above 12 parameters are estimated using the following least square method. Equation 1 above can be rewritten as equation 2:
Figure BDA0001042560090000202
or abbreviated as equation 3: y ═ w.X
Wherein, the matrix X represents 12 parameters to be estimated in the calibration process, namely X represents a calibration matrix;
the matrix w represents the acceleration sensor raw data collected at 6 fixed positions;
the matrix Y represents known values of the acceleration standard of the device at 6 fixed positions.
For example, in an upward position,[Ax2,Ay2,Az2]=[0 0 -1]Assume that raw data a of n1 sets of acceleration sensors is collected at this locationx1,Ay1,Az1Then equation 4 is obtained:
Y1=[0 0 -1]n1×3
w1=[AxP1AyP1AzP11]n1×4
wherein the matrix has n1 rows [ 00-1 ], and n1 groups of acceleration sensor raw data are collected by the matrix. Similarly, the other 5 positions in table 1 collect the raw data of the acceleration sensors of n2, n3, n4, n5, and n6 respectively, and then equation 5 is obtained:
Y2=[0 0 -1]n2×3
w2=[AxP2AyP2AzP21]n2×4
equation 6:
Y3=[0 0 -1]n3×3
w3=[AxP3AyP3AzP31]n3×4
equation 7:
Y4=[0 0 -1]n4×3
w4=[AxP4AyP4AzP41]n4×4
equation 8:
Y5=[0 0 -1]n5×3
w5=[AxP5AyP5AzP51]n5×4
equation 9:
Y6=[0 0 -1]n6×3
w6=[AxP6AyP6AzP61]n6×4
combining equations 4 through 9, and let n be n1+n2+n3+n4+n5+n6Then equation 3 above can be rewritten as equation 10: y isn×3=wn×4·X4×3Wherein, in the step (A),
Figure BDA0001042560090000211
from this, the 12 parameters to be estimated in the calibration process can be obtained from the following equation 11, equation 11:
X=[wT·w]-1wT·Y
wherein, wTRepresents a transpose of a matrix; [ w ]T·w]-1Representing the inverse of the matrix.
The above process can be used as raw data calibration of the acceleration sensor, and here is only a reference calibration method. Of course, a conversion matrix of the sensor data coordinate system to the chip coordinate system provided by the acceleration sensor manufacturer may also be used.
In the embodiment, the vehicle data is obtained by calibrating the calibration matrix and the original data acquired by the acceleration sensor, so that the accuracy of the calibration of the acceleration sensor is improved.
Further, based on any one of the embodiments of the acceleration sensor calibration apparatus, a fourth embodiment of the acceleration sensor calibration apparatus of the present invention is provided, in which the acceleration sensor calibration apparatus further includes:
the receiving module is used for establishing a connection relation with a terminal, receiving a data packet of data acquired by the acceleration sensor and sent by the terminal, sending the terminal sending time of the data packet, and recording the vehicle receiving time;
and the calibration module is used for sending the data packet, the vehicle receiving time and the current vehicle sending time to a terminal, so that the terminal records the terminal receiving time, and calibrates the time and the receiving time according to the terminal sending time, the vehicle receiving time, the vehicle sending time and the terminal receiving time, and synchronizes with the vehicle time.
In this embodiment, before the terminal and the vehicle acquire data through the acceleration sensor, the time of the terminal and the time of the vehicle need to be synchronized. The terminal and the vehicle are connected through Bluetooth or wifi, once the connection is established, the time difference between the terminal and the vehicle is firstly determined, time correction is carried out, and the average value of the time difference is obtained, so that the time difference between the terminal and the vehicle is determined.
Specifically, as shown in fig. 5, the terminal transmits a packet, which is the occurrence time of the acquisition event at which the acceleration sensor acquires data at a certain time, to the vehicle from time T0 (terminal transmission time), and the reception module receives the packet. Assuming that when the terminal time is T0, the time of the vehicle is T0+ offset, and the time required for bluetooth or wifi transmission to reception is Delay, for convenience of calculation, the time interval from the terminal transmission to the vehicle reception and the time interval from the vehicle transmission to the terminal reception are both Delay. Therefore, the time when the vehicle receives the data packet is T0+ offset + Delay, then the vehicle packs the received data packet, the time T0+ offset + Delay (vehicle receiving time) of the vehicle receiving number and the time T1-Delay + offset (vehicle sending time) of the vehicle sending the data packet, and then sends the data packet back to the terminal, and records the receiving time T1 (terminal receiving time) of the terminal, so that the following relation holds:
Phone_send_time=T0;
Phone_receive_time=T1;
Golo_send_time=T1-Delay+offset;
Golo_receive_time=T0+offset+Delay;
Offset=(Golo_send_time+Golo_receive_time-Phone_send_time-Phone_receive_time)/2;
Delay=(Golo_receive_time-Golo_send_time+Phone_receive_time-Phone_send_time)/2;
offset represents a time difference between the terminal and the vehicle; delay represents a process time of transmitting and receiving the Bluetooth; phone _ send _ time represents the terminal transmission time; phone _ receive _ time represents a terminal reception time; gold _ send _ time represents vehicle transmission time; golo _ receive _ time represents a vehicle reception time.
Preferably, the offset and Delay of N times of sending and receiving data packets may be counted, the average value of the offset and Delay is calculated, the greater the N, the more accurate the offset and Delay, and the maximum and minimum values of the offset of the N sending and receiving processes are counted. Knowing the mean, maximum, and minimum values of the offsets, the time relationship between the terminal and the vehicle is: the time of the terminal is the time-offset of the vehicle, and the calibration module calibrates the time of the terminal according to the time relationship, so that the time difference between the terminal and the vehicle can be accurate to 10ms, and the synchronization requirement is basically met. The reason for maintaining the time synchronization is that the three-axis data of the acceleration sensor of the terminal and the acceleration sensor of the vehicle at the same time are collected to calculate the transformation matrix and the rotation matrix, and the time stamps of the sensor data collected from the acceleration sensor of the terminal and the sensor data collected from the acceleration sensor of the vehicle are matched.
According to the embodiment, the local time of the terminal can be calibrated according to the terminal sending time, the vehicle receiving time, the vehicle sending time and the terminal receiving time, and the local time and the vehicle time are synchronized, so that the terminal data and the vehicle data are matched according to the timestamp to acquire the target rotation matrix, and the accuracy and the convenience of the acceleration sensor calibration are improved.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. An acceleration sensor calibration method, characterized in that the acceleration sensor calibration method comprises the steps of:
receiving terminal data which are sent by a terminal and acquired by a terminal local acceleration sensor, acquiring a first timestamp corresponding to the terminal data, acquiring vehicle data by a vehicle local acceleration sensor and acquiring a second timestamp corresponding to the vehicle data;
matching the terminal data and the vehicle data according to the first timestamp and the second timestamp, calculating to obtain a rotation matrix according to the matched data, and acquiring an optimal target rotation matrix from the rotation matrix;
calibrating data collected by an acceleration sensor of the vehicle according to the target rotation matrix;
the matching the terminal data and the vehicle data according to the first timestamp and the second timestamp, calculating to obtain a rotation matrix according to the matched data, and acquiring an optimal target rotation matrix from the rotation matrix comprises:
matching the terminal data and the vehicle data according to the first timestamp and the second timestamp, and respectively calculating corresponding rotation matrixes according to the matched data;
and acquiring a specified rotation matrix which meets the condition that the difference between the square sum of each column of vector and 1 is within a preset threshold value and the error between a numerical value obtained by multiplying the vehicle data and corresponding terminal data is minimum from the rotation matrix, and setting the specified rotation matrix as a target rotation matrix.
2. The acceleration sensor calibration method of claim 1, wherein the obtaining vehicle data by the acceleration sensor local to the vehicle comprises:
acquiring a calibration matrix, and acquiring original data through a local acceleration sensor of the vehicle;
and calibrating the original data of the acceleration sensor according to the calibration matrix to obtain vehicle data.
3. The acceleration sensor calibration method of any one of claims 1-2, wherein before the receiving terminal data sent by the terminal and obtained by the terminal local acceleration sensor and obtaining the first timestamp corresponding to the terminal data, the method comprises:
establishing a connection relation with a terminal, receiving a data packet of data acquired by an acceleration sensor and sent by the terminal, sending time of the terminal for sending the data packet, and recording vehicle receiving time;
and sending the data packet, the vehicle receiving time and the current vehicle sending time to a terminal for the terminal to record the terminal receiving time, and calibrating the time according to the terminal sending time, the vehicle receiving time, the vehicle sending time and the terminal receiving time to synchronize with the vehicle time.
4. The acceleration sensor calibration method of any one of claims 1-2, wherein before the receiving terminal data sent by the terminal and obtained by the terminal local acceleration sensor and obtaining the first timestamp corresponding to the terminal data, the method comprises:
and receiving the adjusted placement position of the terminal on the vehicle so as to enable the terminal coordinate system to be coincident with the vehicle coordinate system.
5. An acceleration sensor calibration device, characterized in that the acceleration sensor calibration device comprises:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for receiving a terminal with a coordinate system coincident with a vehicle coordinate system, sending terminal data acquired by a terminal local acceleration sensor and acquiring a first timestamp corresponding to the terminal data, and acquiring vehicle data and acquiring a second timestamp corresponding to the vehicle data through the vehicle local acceleration sensor;
the second acquisition module is used for matching the terminal data and the vehicle data according to the first timestamp and the second timestamp, calculating to obtain a rotation matrix according to the matched data, and acquiring an optimal target rotation matrix from the rotation matrix;
the calibration module is used for calibrating the data acquired by the acceleration sensor of the vehicle according to the target rotation matrix;
the second acquisition module is further used for matching the terminal data and the vehicle data according to the first timestamp and the second timestamp, and respectively calculating corresponding rotation matrixes according to the matched data;
and acquiring a specified rotation matrix which meets the condition that the difference between the square sum of each column of vector and 1 is within a preset threshold value and the error between a numerical value obtained by multiplying the vehicle data and corresponding terminal data is minimum from the rotation matrix, and setting the specified rotation matrix as a target rotation matrix.
6. The acceleration sensor calibration device of claim 5, wherein the first obtaining module is further configured to obtain a calibration matrix and obtain raw data via an acceleration sensor local to the vehicle; and calibrating the original data of the acceleration sensor according to the calibration matrix to obtain vehicle data.
7. The acceleration sensor calibration device of any one of claims 5-6, characterized in that the acceleration sensor calibration device further comprises:
the receiving module is used for establishing a connection relation with a terminal, receiving a data packet of data acquired by the acceleration sensor and sent by the terminal, sending the terminal sending time of the data packet, and recording the vehicle receiving time;
and the calibration module is used for sending the data packet, the vehicle receiving time and the current vehicle sending time to a terminal, so that the terminal records the terminal receiving time, and calibrates the time according to the terminal sending time, the vehicle receiving time, the vehicle sending time and the terminal receiving time, and synchronizes with the vehicle time.
8. The acceleration sensor calibration device of any one of claims 5-6, characterized in that the acceleration sensor calibration device further comprises:
and the processing module is used for receiving the adjusted placement position of the terminal on the vehicle so as to enable the terminal coordinate system to be overlapped with the vehicle coordinate system.
CN201610529266.4A 2016-07-06 2016-07-06 Acceleration sensor calibration method and device Active CN106226556B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610529266.4A CN106226556B (en) 2016-07-06 2016-07-06 Acceleration sensor calibration method and device
PCT/CN2016/105543 WO2018006521A1 (en) 2016-07-06 2016-11-12 Method and device for calibrating acceleration sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610529266.4A CN106226556B (en) 2016-07-06 2016-07-06 Acceleration sensor calibration method and device

Publications (2)

Publication Number Publication Date
CN106226556A CN106226556A (en) 2016-12-14
CN106226556B true CN106226556B (en) 2020-07-10

Family

ID=57519569

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610529266.4A Active CN106226556B (en) 2016-07-06 2016-07-06 Acceleration sensor calibration method and device

Country Status (2)

Country Link
CN (1) CN106226556B (en)
WO (1) WO2018006521A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106672075B (en) * 2017-01-25 2019-03-15 武汉极目智能技术有限公司 It is a kind of for detecting the rotation direction sensor system and control method of automobile driving lever position
WO2019071505A1 (en) * 2017-10-12 2019-04-18 Beijing Didi Infinity Technology And Development Co., Ltd. Systems and methods for braking control
CN109085381A (en) * 2018-09-14 2018-12-25 上海移为通信技术股份有限公司 Vehicle-mounted acceleration transducer direction calibration method
CN110398377A (en) * 2019-07-31 2019-11-01 广州小鹏汽车科技有限公司 Information acquisition method and device, car-mounted terminal, vehicle and storage medium
CN111746440B (en) * 2020-06-03 2022-07-08 知轮(杭州)科技有限公司 Matching device and method for tractor and trailer
CN112102418B (en) * 2020-09-16 2022-02-11 上海商汤临港智能科技有限公司 Calibration method, calibration device, electronic equipment and storage medium
CN117074722A (en) * 2023-09-08 2023-11-17 无锡车联天下信息技术有限公司 Zero calibration method and zero calibration device of acceleration sensor

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010091462A (en) * 2008-10-09 2010-04-22 Nec Corp Relative acceleration detector, method for detecting relative acceleration, and program
CN104574817A (en) * 2014-12-25 2015-04-29 清华大学苏州汽车研究院(吴江) Machine vision-based fatigue driving pre-warning system suitable for smart phone
CN204415378U (en) * 2015-01-09 2015-06-24 浙江工商大学 A kind of device vehicle demarcated based on vehicle intelligent terminal
CN104793017A (en) * 2015-03-17 2015-07-22 广东欧珀移动通信有限公司 Accelerated speed correction method and terminal
CN105092892A (en) * 2015-08-11 2015-11-25 东软集团股份有限公司 Vehicle acceleration data acquisition method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1737580A (en) * 2004-08-17 2006-02-22 皇家飞利浦电子股份有限公司 Correction method and apparatus
JP5510399B2 (en) * 2011-06-17 2014-06-04 トヨタ自動車株式会社 Vehicle control device
CN103606206B (en) * 2013-09-18 2016-09-28 武汉理工大学 A kind of motoring condition cognitive method using motoring condition sensing device
CN104090127B (en) * 2014-07-14 2016-08-24 上海移为通信技术股份有限公司 A kind of three axle method for self-calibrating of vehicle-mounted acceleration sensor
CN105510632B (en) * 2015-11-24 2018-12-28 上海汽车集团股份有限公司 Obtain the method and apparatus of pickup data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010091462A (en) * 2008-10-09 2010-04-22 Nec Corp Relative acceleration detector, method for detecting relative acceleration, and program
CN104574817A (en) * 2014-12-25 2015-04-29 清华大学苏州汽车研究院(吴江) Machine vision-based fatigue driving pre-warning system suitable for smart phone
CN204415378U (en) * 2015-01-09 2015-06-24 浙江工商大学 A kind of device vehicle demarcated based on vehicle intelligent terminal
CN104793017A (en) * 2015-03-17 2015-07-22 广东欧珀移动通信有限公司 Accelerated speed correction method and terminal
CN105092892A (en) * 2015-08-11 2015-11-25 东软集团股份有限公司 Vehicle acceleration data acquisition method and device

Also Published As

Publication number Publication date
WO2018006521A1 (en) 2018-01-11
CN106226556A (en) 2016-12-14

Similar Documents

Publication Publication Date Title
CN106226556B (en) Acceleration sensor calibration method and device
US11730547B2 (en) Tracking system and tracking method using same
US9631956B2 (en) Methods and systems for calibrating sensors of a computing device
US9369677B2 (en) Image assistance for indoor positioning
US7970576B2 (en) Information processing apparatus and information processing method
CN108627153A (en) A kind of rigid motion tracing system and its working method based on inertial sensor
JP2016045150A (en) Point group position data processing device, point group position data processing system, point group position data processing method, and program
US20170000389A1 (en) Biomechanical information determination
CN110398258B (en) Performance testing device and method of inertial navigation system
JP6433200B2 (en) Arithmetic apparatus, arithmetic method, and program
CN105043354B (en) System utilizing camera imaging to precisely position moving target
CN103502833A (en) Determination of positions
CN111007455A (en) Positioning system and method, database and neural network model training method
KR102178598B1 (en) Traffic information offering system using multi view blackbox camera image
WO2019123988A1 (en) Calibration data generating device, calibration data generating method, calibration system, and control program
KR20170074388A (en) System and method for high precise positioning
CN111521971A (en) Robot positioning method and system
KR102124170B1 (en) Traffic accident analyzing system using multi view blackbox image data
CN113513984B (en) Parking space recognition precision detection method and device, electronic equipment and storage medium
CN208667881U (en) The locating and detecting device of vehicle body and hanger
CN111604899A (en) Data transmission system of high intelligent robot
CN114623834B (en) Combined navigation positioning measurement method and measurement system
JP7226714B2 (en) Misalignment correction system and program
CN110766105A (en) Vehicle key positioning method, device and equipment
CN112346024B (en) Space time registration method of arbitrary motion networking radar

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant