Search

CN-116488760-B - Vehicle-mounted high-precision time synchronization realization method and system

CN116488760BCN 116488760 BCN116488760 BCN 116488760BCN-116488760-B

Abstract

The invention provides a method and a system for realizing vehicle-mounted high-precision time synchronization, wherein the method comprises the steps of regarding a plurality of different sensors in an ADAS (adaptive automatic data acquisition system) system, taking the sensor with the highest time precision as a Master, taking the other sensors as Slave, adding a hard line between the Master and the Slave, enabling the Master to control the hard line level through IO, informing the Slave of starting synchronization time, calculating absolute time of the Master for sending a following frame according to a timestamp of the Master for sending the synchronous frame, and realizing time synchronization between the Slave and the Master based on the absolute time of the Master for sending the following frame. According to the invention, a hard wire is added between the sensors which are not synchronized in time, and the Master informs the Slave of starting the synchronization time through the IO control level, so that the synchronization precision is higher compared with the method for synchronizing the time through the CAN in the prior art.

Inventors

  • ZHANG LONG
  • HU JIAN
  • Zheng Lexin
  • LUO WEI

Assignees

  • 武汉光庭信息技术股份有限公司

Dates

Publication Date
20260512
Application Date
20230328

Claims (8)

  1. 1. The vehicle-mounted high-precision time synchronization implementation method is characterized by comprising the following steps of: For a plurality of different sensors in an ADAS system, the sensor with the highest time precision is a Master, and other sensors are Slave; adding a hard wire between a Master and a Slave; the Master controls the hard line level through IO, informs the Slave of starting the synchronization moment, and calculates the absolute time of the Master for transmitting the following frame according to the timestamp of the Master for transmitting the synchronization frame; Based on the absolute time of the Master sending following frame, realizing time synchronization between the Slave and the Master; The Master controls the hard line level through IO, informs the Slave of starting the synchronization time, calculates the absolute time of the Master to send the following frame according to the timestamp of the Master to send the synchronization frame, and comprises the following steps: the Master sends a synchronous frame in a preset period, sends a time stamp of t0 at t1 and sends the first hard wire IO level; when the Slave receives the first hard line IO level, the Slave receives the synchronous level at the time t2 through interruption and records the t2 timestamp; after receiving the synchronous frame at the time t3, the Slave analyzes the t0 time stamp; After a fixed time interval, the Master transmits a following frame, wherein the following frame comprises the transmission time Deltat 0 of the CAN message synchronization frame during transmission, and a second hard wire IO level is transmitted; when Salve receives the second hard line IO level, receiving the synchronous level at the moment t4 'through interruption and recording the t4' timestamp; After the Slave receives the following frame at the time t4, calculating the absolute time of the Master to send the following frame.
  2. 2. The method of claim 1, wherein one of the first hard-wire IO level and the second hard-wire IO level is high and the other is low.
  3. 3. The method of claim 2, wherein after the Slave receives the following frame at time t4, calculating an absolute time for the Master to send the following frame comprises: master sends the absolute time of the following frame = t0+ # t0+t4' -t2.
  4. 4. The method for implementing time synchronization according to claim 1, wherein the implementing time synchronization between Slave and Master based on absolute time of Master transmission following frame includes: And adjusting the system time of the Slave by taking the absolute time of the Master sending following frame as a reference.
  5. 5. The vehicle-mounted high-precision time synchronization realizing system is characterized by comprising a Master and a Slave, wherein for a plurality of different sensors in an ADAS system, the sensor with the highest time precision is the Master, the other sensors are the Slave, and a hard wire is added between the Master and the Slave; The Master is used for controlling the hard line level through IO and notifying the Slave of starting the synchronization moment; The Slave is used for calculating the absolute time of the Master for sending the following frame according to the timestamp of the Master for sending the synchronous frame, and realizing the time synchronization between the Slave and the Master based on the absolute time of the Master for sending the following frame; The Master sends a synchronous frame in a preset period, sends a time stamp of t0 at t1 and sends a first hard wire IO level; when the Slave receives the first hard line IO level, the Slave receives the synchronous level at the time t2 through interruption and records the t2 timestamp; after receiving the synchronous frame at the time t3, the Slave analyzes the t0 time stamp; After a fixed time interval, the Master transmits a following frame, wherein the following frame comprises the transmission time Deltat 0 of the CAN message synchronization frame during transmission, and a second hard wire IO level is transmitted; when Salve receives the second hard line IO level, receiving the synchronous level at the moment t4 'through interruption and recording the t4' timestamp; After the Slave receives the following frame at the time t4, calculating the absolute time of the Master to send the following frame.
  6. 6. The system according to claim 5, wherein the time synchronization between Slave and Master is realized based on absolute time of Master transmission following frame, comprising: And adjusting the system time of the Slave by taking the absolute time of the Master sending following frame as a reference.
  7. 7. An electronic device comprising a memory and a processor, wherein the processor is configured to implement the steps of the method for implementing the vehicle-mounted high-precision time synchronization according to any one of claims 1 to 4 when executing a computer management program stored in the memory.
  8. 8. A computer-readable storage medium, having stored thereon a computer-management-class program which, when executed by a processor, implements the steps of the on-vehicle high-precision time synchronization implementation method according to any one of claims 1 to 4.

Description

Vehicle-mounted high-precision time synchronization realization method and system Technical Field The invention relates to the field of vehicle-mounted ADAS, in particular to a vehicle-mounted high-precision time synchronization realization method and system. Background Under the current networking and intelligent background, automobiles are more and more intelligent, and under a great number of occasions, the safety of the automobiles can be improved, and dangerous behaviors are avoided in advance by detecting the surrounding environment of the automobiles. In order to achieve the effect, a plurality of sensors including cameras, radars and the like are added on the automobile, so that perception is increased for the automobile, the automobile can observe the change of the surrounding environment of the automobile in real time, and the automobile is reasonably controlled according to the change. For example, the information such as lane lines, surrounding obstacles, long-distance obstacles and the like is detected by a medium-distance camera and a laser radar at high speed, and the vehicle is subjected to lane changing, braking and the like in advance, so that disasters are avoided. A typical security system is an ADAS system, in which sensors such as cameras and radars are used. The radar and the camera (independent processor) respectively send the acquired data to the control module, and the control module fuses and analyzes the data, so that the vehicle is controlled most appropriately finally. However, since the automobile is a moving object, the surrounding environment is changed suddenly, and when the information reported by the radar is inconsistent with the information reported by the camera, the control module can make an erroneous judgment. In order to solve this problem of time dissynchronization, it is relatively common in vehicle systems to perform time synchronization via CAN. The principle is that an ECU (Master) with higher time precision periodically sends 2 frames of messages to a CAN bus through a CAN message, and the synchronized ECU (Slave) performs time synchronization through the content of the 2 frames of messages. In the prior art, the CAN transmission time is ignored, and a plurality of factors exist in the middle of the actual situation CAN message from the time module of the Master to the Slave receiving, including the transmission time of CAN data in the Master, the president time of the CAN bus, the transmission time of the CAN data on hardware and the like, so that unexpected deviation exists in the synchronous time. Disclosure of Invention Aiming at the technical problems in the prior art, the invention provides a vehicle-mounted high-precision time synchronization realization method and a vehicle-mounted high-precision time synchronization realization system. According to a first aspect of the present invention, there is provided a vehicle-mounted high-precision time synchronization implementation method, including: For a plurality of different sensors in an ADAS system, the sensor with the highest time precision is a Master, and other sensors are Slave; adding a hard wire between a Master and a Slave; The Master controls the hard line level through IO, informs the Slave of starting the synchronization time, and calculates the absolute time of the Master for sending the following frame according to the timestamp of the Master for sending the synchronization frame; based on the absolute time of the Master sending following frame, the time synchronization between the Slave and the Master is realized. On the basis of the technical scheme, the invention can also make the following improvements. Optionally, the Master controls the hard line level through IO, notifies the Slave of starting synchronization time, calculates absolute time of the Master sending following frame according to a timestamp of the Master sending synchronization frame, and includes: the Master sends a synchronous frame in a preset period, sends a time stamp of t0 at t1 and sends the first hard wire IO level; when the Slave receives the first hard line IO level, the Slave receives the synchronous level at the time t2 through interruption and records the t2 timestamp; after receiving the synchronous frame at the time t3, the Slave analyzes the t0 time stamp; After a fixed time interval, the Master transmits a following frame, wherein the following frame comprises the transmission time Deltat 0 of the CAN message synchronization frame during transmission, and a second hard wire IO level is transmitted; when Salve receives the second hard line IO level, receiving the synchronous level at the moment t4 'through interruption and recording the t4' timestamp; After the Slave receives the following frame at the time t4, calculating the absolute time of the Master to send the following frame. Optionally, the first hard-wire IO level and the second hard-wire level are one high level and the other low level. Optionally