CN115441980A - Time synchronization method, time synchronization device and time synchronization equipment - Google Patents

Time synchronization method, time synchronization device and time synchronization equipment Download PDF

Info

Publication number
CN115441980A
CN115441980A CN202211007692.3A CN202211007692A CN115441980A CN 115441980 A CN115441980 A CN 115441980A CN 202211007692 A CN202211007692 A CN 202211007692A CN 115441980 A CN115441980 A CN 115441980A
Authority
CN
China
Prior art keywords
time
gps
crystal oscillator
clock
condition
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.)
Pending
Application number
CN202211007692.3A
Other languages
Chinese (zh)
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.)
Beijing Xiaoma Yiyi Technology Co ltd
Original Assignee
Beijing Xiaoma Yiyi 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 Beijing Xiaoma Yiyi Technology Co ltd filed Critical Beijing Xiaoma Yiyi Technology Co ltd
Priority to CN202211007692.3A priority Critical patent/CN115441980A/en
Publication of CN115441980A publication Critical patent/CN115441980A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0644External master-clock

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Electric Clocks (AREA)

Abstract

The application provides a time synchronization method, a time synchronization device and time synchronization equipment, wherein the method comprises the following steps: under the condition that the automatic driving vehicle is started, acquiring reference time, wherein the reference time is current time data of a real-time clock; initializing the timing time of the crystal oscillator according to the reference time to obtain the time of the crystal oscillator, wherein the timing precision of the crystal oscillator is greater than that of a real-time clock; sending the crystal oscillation time to target equipment, wherein the target equipment comprises a domain controller and/or sensor equipment of an automatic driving vehicle; and controlling to correct the time of the target device according to at least the GPS time under the condition that the GPS time is available. The method and the device ensure that the time synchronism of different modules in the automatic driving vehicle is better.

Description

Time synchronization method, time synchronization device and time synchronization equipment
Technical Field
The present application relates to the field of autonomous driving vehicles, and in particular, to a time synchronization method, a time synchronization apparatus, a computer-readable storage medium, a processor, a time synchronization device, and an autonomous driving vehicle system.
Background
In the prior art, some devices on an autonomous vehicle, such as a laser radar (bpearl) and an IMU (Inertial Measurement Unit) use a NMEA (National Marine Electronics Association, american National Marine Electronics Association) and a PPS (pulse per second) Time synchronization mode, and some devices use a PTP (Precision Time Protocol) Time synchronization mode, which may cause a problem of Time synchronization due to non-uniformity of Time synchronization and non-uniformity of synchronization Precision, and system Time, processing Time, and data transmission Time of sensors may be different, and data at the same Time may not be fused.
Before the vehicle-mounted System is started, the time synchronization of the sensor device and the domain controller is required to be good, a Global Positioning System (GPS) satellite clock and a local clock of the vehicle-mounted System are required to be strictly aligned, and the requirement on a GPS signal is high. In addition, since the ethernet switch does not enable a PTP boundary clock of 802.1AS protocol or a point-to-point delay measurement mechanism from gPTP (global time protocol), we must use VLAN (Virtual Local Area Network) to separate PTP master-slave pairs, which results in complexity of VLAN configuration on different switches and NICs and overhead of VLAN tagging processing, thus increasing jitter of PTP measurement because it needs to create multiple PTP master services to work on different VLANs, and the burden of PTP master is greater.
Therefore, a method is needed to solve the problem of time asynchrony between modules of an autonomous vehicle in the prior art.
The above information disclosed in this background section is only for enhancement of understanding of the background of the technology described herein and, therefore, certain information may be included in the background that does not form the prior art that is already known in this country to a person of ordinary skill in the art.
Disclosure of Invention
The present application is directed to a time synchronization method, a time synchronization apparatus, a computer-readable storage medium, a processor, a time synchronization device, and an autonomous vehicle system, so as to solve the problem of time asynchronization among modules of an autonomous vehicle in the prior art.
According to an aspect of an embodiment of the present invention, there is provided a time synchronization method, including: acquiring reference Time under the condition that an automatic driving vehicle is started, wherein the reference Time is current Time data of a Real Time Clock (RTC); initializing the timing time of the crystal oscillator according to the reference time to obtain the timing time of the crystal oscillator, wherein the timing precision of the crystal oscillator is greater than that of the real-time clock; sending the crystal oscillator time to a target device, wherein the target device comprises a domain controller and/or a sensor device of the automatic driving vehicle; and controlling to correct the time of the target equipment according to at least the GPS time under the condition that the GPS time is available.
Optionally, initializing a crystal oscillator timing time according to the reference time to obtain a crystal oscillator time, including: assigning the timing starting time of the crystal oscillator to the reference time, and controlling the crystal oscillator to start timing from the reference time; and acquiring real-time timing data of the crystal oscillator after timing is started to obtain the crystal oscillator time.
Optionally, in a case that GPS time is available, controlling to correct the time of the target device according to at least the GPS time includes: under the condition that the GPS time is available, determining the difference value between the GPS time and the crystal oscillator time as correction time; and sending the correction time to the target equipment so that the target equipment corrects the time of the clock of the target equipment according to the correction time.
Optionally, sending the correction time to the target device includes: and sending the correction time to network switching equipment in an Ethernet broadcast mode, so that the network switching equipment sends the correction time to the target equipment in the Ethernet broadcast mode and/or sends the correction time to the target equipment in the Ethernet broadcast mode.
Optionally, in a case that GPS time is available, controlling to correct the time of the target device according to at least the GPS time includes: and under the condition that the GPS time is available, sending the GPS time to the target equipment, so that the target equipment corrects the time of a clock thereof according to the GPS time and the crystal oscillator time under the condition that the GPS time and the crystal oscillator time are not synchronous.
Optionally, in a case that GPS time is available, controlling to correct the time of the target device according to at least the GPS time includes: determining whether the GPS time is synchronous with the crystal oscillator time if the GPS time is available; and under the condition that the GPS time is not synchronous with the crystal oscillator time, sending the GPS time to the target equipment so that the target equipment corrects the time of a clock thereof according to the GPS time and the crystal oscillator time.
Optionally, in a case that GPS time is available, before controlling to correct the time of the target device according to at least the GPS time, the method further includes: under the condition of receiving a GPS signal, analyzing GPRMC message information carried by the GPS signal to obtain positioning state information and/or a pulse per second signal; determining whether the positioning state information is effective positioning and/or determining whether the pulse per second signal is normal, wherein the pulse per second signal is determined to be normal under the condition that the time interval between two adjacent pulse per second signals is 1 second; and determining that the GPS time carried by the GPS signal is available under the condition that the positioning state information is the effective positioning and/or the pulse per second signal is normal, and determining that the GPS time carried by the GPS signal is unavailable under the condition that the positioning state information is the ineffective positioning and/or the pulse per second signal is abnormal.
Optionally, in a case that it is determined that the GPS time carried by a GPS signal is unavailable, the method further includes: and sending first prompt information to the domain controller, wherein the first prompt information is used for prompting that the current automatic driving reliability is poor, so that the domain controller can remind related personnel of taking over manually according to the first prompt information.
Optionally, after initializing the crystal oscillation time according to the reference time to obtain the crystal oscillation time, the method further includes: and under the condition that the automatic driving vehicle is started, correcting the time of the real-time clock at intervals of preset time according to the crystal oscillator time, so that the corrected time of the real-time clock is the crystal oscillator time.
According to another aspect of the embodiments of the present invention, there is also provided a time synchronization apparatus, including an obtaining unit, an initializing unit, a sending unit, and a control unit, wherein the obtaining unit is configured to obtain a reference time when an autonomous driving vehicle is started, where the reference time is current time data of a real-time clock; the initialization unit is used for initializing the timing time of the crystal oscillator according to the reference time to obtain the timing time of the crystal oscillator, and the timing precision of the crystal oscillator is greater than that of the real-time clock; the sending unit is used for sending the crystal oscillator time to target equipment, and the target equipment comprises a domain controller and/or sensor equipment of the automatic driving vehicle; the control unit is used for controlling the time of the target equipment to be corrected according to the GPS time at least under the condition that the GPS time is available.
According to still another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium including a stored program, wherein the program executes any one of the methods.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a program, where the program executes any one of the methods.
According to another aspect of the embodiments of the present invention, there is also provided a time synchronization apparatus, including: one or more processors, memory, and one or more programs stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for performing any of the methods described herein.
There is also provided in accordance with yet another aspect of an embodiment of the present invention an autonomous vehicle system, including a domain controller, a plurality of sensor devices, a time synchronization device for performing any one of the methods, a crystal oscillator, and a self-powered real-time clock, the time synchronization device being communicatively coupled to the domain controller and the plurality of sensor devices, respectively; the crystal oscillator is integrated in the time synchronization equipment; the real-time clock is electrically connected with the time synchronization equipment.
Optionally, the autonomous driving vehicle system further includes a network switching device, the domain controller and at least part of the sensor devices are in communication connection with the time synchronization device through the network switching device, and the network switching device is configured to receive information sent by the time synchronization device, and send the information to the domain controller and the sensor devices in communication connection.
Optionally, the network switching device is further configured to receive a GPS signal, and determine whether GPS time is available according to the GPS signal; and the network switching equipment is also used for generating second prompt information for prompting that the current automatic driving reliability is poor under the condition that the GPS time is unavailable, and sending the second prompt information to the domain controller and/or at least part of the sensor equipment.
Optionally, the network switching device is further configured to correct a local clock according to the GPS time when the GPS time is available, and correct the time of the sensor device in communication connection according to the corrected time of the local clock.
By adopting the technical scheme, in the time synchronization method, under the condition that the automatic driving vehicle is started, the current time data of the real-time clock is firstly acquired as reference time; then, initializing the timing time of the crystal oscillator according to the reference time to obtain the time of the crystal oscillator, wherein the timing precision of the crystal oscillator is greater than the timing precision of the real-time clock; then, sending the crystal oscillation time to target equipment such as a domain controller and/or sensor equipment of the automatic driving vehicle; and finally, under the condition that the GPS time is available, controlling the time of the target equipment to be corrected at least according to the GPS time. Compare the time synchronization mode nonconformity of different modules among the prior art among the autopilot vehicle, cause the problem of time asynchronism, this application is when autopilot system starts, time calibration crystal oscillator time through real-time clock, later send crystal oscillator time to domain controller and/or sensor equipment, in order to carry out time synchronization, guaranteed between domain controller and each sensor equipment, time synchronism between sensor and the sensor is better, thereby the reliability of the fusion information of sensor equipment has been guaranteed, the driving safety of autopilot vehicle has been guaranteed. And under the condition that the GPS time is available, the time of the target equipment is controlled to be corrected at least according to the GPS time, so that the time of the whole automatic driving system is ensured to be consistent with the real time, and the time accuracy of the automatic driving system is ensured to be better.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
FIG. 1 shows a schematic flow diagram of a method of time synchronization according to an embodiment of the present application;
FIG. 2 shows a schematic diagram of a time synchronization apparatus according to an embodiment of the present application;
FIG. 3 shows a schematic block diagram of an autonomous vehicle system according to an embodiment of the application;
fig. 4 shows a schematic structural diagram of a network switching device according to an embodiment of the application.
Wherein the figures include the following reference numerals:
100. a domain controller; 101. a sensor device; 102. a time synchronization device; 103. crystal oscillation; 104. a real-time clock; 105. a network switching device; 106. a GNSS module; 200. T-BOX; 201. an image pickup apparatus; 202. a laser sensor; 203. an IMU; 204. a road condition receiving module; 205. a sensor driver; 206. a self-clock; 207. a port; 208. a local clock.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It will be understood that when an element such as a layer, film, region, or substrate is referred to as being "on" another element, it can be directly on the other element or intervening elements may also be present. Also, in the specification and claims, when an element is described as being "connected" to another element, the element may be "directly connected" to the other element or "connected" to the other element through a third element.
As mentioned in the background, in order to solve the above problems, in the prior art, in which time is not synchronized between modules of an autonomous vehicle, in an exemplary embodiment of the present application, a time synchronization method, a time synchronization apparatus, a computer-readable storage medium, a processor, a time synchronization device, and an autonomous vehicle system are provided.
According to an embodiment of the present application, a method of time synchronization is provided.
Fig. 1 is a flowchart of a time synchronization method according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S101, under the condition that the automatic driving vehicle is started, reference time is obtained, and the reference time is current time data of a real-time clock;
step S102, initializing the timing time of the crystal oscillator according to the reference time to obtain the time of the crystal oscillator, wherein the timing precision of the crystal oscillator is greater than the timing precision of the real-time clock;
step S103, sending the crystal oscillation time to a target device, wherein the target device comprises a domain controller and/or a sensor device of the automatic driving vehicle;
and step S104, under the condition that the GPS time is available, controlling to correct the time of the target equipment at least according to the GPS time.
In the time synchronization method, when the automatic driving vehicle is started, the current time data of the real-time clock is firstly acquired as reference time; then, initializing the timing time of the crystal oscillator according to the reference time to obtain the time of the crystal oscillator, wherein the timing precision of the crystal oscillator is greater than the timing precision of the real-time clock; then, sending the crystal oscillation time to a target device such as a domain controller and/or a sensor device of the automatic driving vehicle; and finally, under the condition that the GPS time is available, controlling the time of the target equipment to be corrected at least according to the GPS time. Compare the time synchronization mode nonconformity of different modules among the prior art among the autopilot vehicle, cause the problem of time asynchronism, this application is when autopilot system starts, time calibration crystal oscillator time through real-time clock, later send crystal oscillator time to domain controller and/or sensor equipment, in order to carry out time synchronization, guaranteed between domain controller and each sensor equipment, time synchronism between sensor and the sensor is better, thereby the reliability of the fusion information of sensor equipment has been guaranteed, the driving safety of autopilot vehicle has been guaranteed. And under the condition that the GPS time is available, the time of the target equipment is controlled to be corrected at least according to the GPS time, so that the time of the whole automatic driving system is ensured to be consistent with the real time, and the time accuracy of the automatic driving system is ensured to be better.
Since the timing accuracy of the crystal oscillator is greater than the timing accuracy of the real-time clock, in order to further ensure the time accuracy of the entire automatic driving system, in a specific embodiment of the present application, the initializing the timing time of the crystal oscillator according to the reference time to obtain the crystal oscillator time includes: assigning the timing starting time of the crystal oscillator to the reference time, and controlling the crystal oscillator to start timing from the reference time; and acquiring real-time timing data of the crystal oscillator after timing starts to obtain the crystal oscillator time. When the automatic driving system is not started, the crystal oscillator is also in an unopened state, but the timing of the real-time clock is not influenced by whether the automatic driving system is started or not, so that the timing time of the real-time clock, namely the reference time, is taken as the timing starting time of the crystal oscillator when the automatic driving vehicle is started, the crystal oscillator starts to time from the timing starting time, the timing precision of the crystal oscillator is higher than that of the real-time clock, and the crystal oscillator is taken as the clock of the whole automatic driving system after the crystal oscillator starts to time, so that the time accuracy of the whole automatic driving vehicle is further ensured.
According to another specific embodiment of the present application, in a case where GPS time is available, controlling to correct the time of the target device at least according to the GPS time includes: under the condition that the GPS time is available, determining the difference value between the GPS time and the crystal oscillator time as correction time; and sending the correction time to the target equipment so that the target equipment corrects the time of the clock of the target equipment according to the correction time. In this embodiment, when the GPS time is available, the difference between the GPS time and the crystal time is used as the correction time and sent to the target device, so that the target device adjusts its clock according to the correction time, thereby ensuring good synchronization of the timestamps between the target devices, and further ensuring time synchronization and time accuracy between the target devices such as the sensor device and the domain controller of the autonomous vehicle.
According to another embodiment of the present application, the sending the correction time to the target device includes: and sending the correction time to a network switching device in an Ethernet broadcast mode, so that the network switching device sends the correction time to the target device in the Ethernet broadcast mode and/or sends the correction time to the target device in the Ethernet broadcast mode. The correction time is sent in an Ethernet broadcast mode, so that the communication traffic can be filtered, the throughput is increased, and the physical propagation range is ensured to be large.
Of course, the transmission method is not limited to the ethernet, and may be a CAN (Controller Area Network) or any other appropriate communication method in the prior art. The above-described transmission method is not limited to the broadcast method, and may be another transmission method such as unicast or multicast.
In another specific embodiment, in a case that the GPS time is available, the controlling of correcting the time of the target device at least according to the GPS time includes: and if the GPS time is available, sending the GPS time to the target device, so that the target device corrects the time of the clock thereof according to the GPS time and the crystal oscillator time when the GPS time is not synchronous with the crystal oscillator time.
Specifically, in a case where GPS time is available, controlling to correct the time of the target device according to at least the GPS time may further include: determining whether the GPS time is synchronous with the crystal oscillator time under the condition that the GPS time is available; and under the condition that the GPS time is not synchronous with the crystal oscillator time, sending the GPS time to the target equipment so that the target equipment corrects the time of the clock of the target equipment according to the GPS time and the crystal oscillator time.
In order to further ensure that the reliability of the GPS time is high, according to another specific embodiment of the present application, in a case where the GPS time is available, before controlling to correct the time of the target device according to at least the GPS time, the method further includes: under the condition of receiving a GPS signal, analyzing GPRMC message information carried by the GPS signal to obtain positioning state information and/or a pulse per second signal; determining whether the positioning state information is effective positioning and/or determining whether the pulse per second signal is normal, wherein the pulse per second signal is determined to be normal when the time interval between two adjacent pulse per second signals is 1 second; and determining that the GPS time carried by the GPS signal is available when the positioning state information is the effective positioning and/or the pulse per second signal is normal, and determining that the GPS time carried by the GPS signal is unavailable when the positioning state information is the ineffective positioning and/or the pulse per second signal is abnormal. Before controlling to correct the time of the target device according to the GPS time, whether a GPS signal is available is determined, and the effect of accurately synchronizing the time of the target device is further achieved.
Specifically, in the case where the above-mentioned positioning state information is a, it indicates that it is a valid positioning; when the positioning state information is V, it indicates that it is an invalid positioning.
In order to further ensure driving safety, in another embodiment of the present application, in a case that it is determined that the GPS time carried by the GPS signal is unavailable, the method further includes: and sending first prompt information to the domain controller, wherein the first prompt information is used for prompting that the current automatic driving reliability is poor, so that the domain controller can remind related personnel of taking over manually according to the first prompt information. Under the condition that the GPS time is determined to be unavailable, the reference time of the whole automatic driving system is only crystal oscillator time, the driving reliability is poor under the condition that the accuracy of partial driving strategies of automatic driving is possibly influenced, and therefore the safety of automatic driving is poor, the domain controller reminds related personnel to take over manually according to the information by sending the first prompt information under the condition that the driving safety is further ensured under the condition that the GPS time is unavailable.
In addition, the domain controller can also determine whether the current driving environment meets the parking requirement under the condition of receiving the first prompt message; and controlling the vehicle to stop in the case that the parking requirement is determined to be met.
The method for sending the first prompt message may be sent to the domain controller in a broadcast sending manner.
In other embodiments, in the event that it is determined that the GPS time carried by the GPS signal is unavailable, the method further comprises: and generating information representing that the GPS time is unavailable, and sending the information to network switching equipment in an Ethernet broadcasting mode so that the network switching equipment sends the information to the target equipment in the Ethernet broadcasting mode to enable the target equipment to still use the crystal oscillator time as the synchronization time of the clock of the target equipment, and/or sending the information to the target equipment in the Ethernet broadcasting mode to enable the target equipment to still use the crystal oscillator time as the synchronization time of the clock of the target equipment.
In addition, when the GPS time is available and it is determined that the GPS time is different from the crystal time, that is, when it is determined that there is a difference between the GPS time and the crystal time, and before the correction time is transmitted to the target device, the method further includes: and sending alarm information to the target equipment so that the target equipment is ready to adjust the time of the clock of the target equipment.
In another specific embodiment of the present application, after initializing a crystal oscillation time according to the reference time to obtain a crystal oscillation time, the method further includes: and under the condition that the automatic driving vehicle is started, correcting the time of the real-time clock at intervals of preset time according to the crystal oscillation time, so that the corrected time of the real-time clock is the crystal oscillation time. The timing precision of the crystal oscillator is greater than that of the real-time clock, the time of the real-time clock is corrected according to the time of the crystal oscillator, the influence of accumulated errors of the real-time clock on the time accuracy of the real-time clock is further relieved, the real-time clock can be guaranteed to time accurately when the automatic driving vehicle is changed from a starting state to a non-starting state, and the reference time obtained when the automatic driving vehicle is started again is further guaranteed to be accurate.
In addition, after initializing the crystal oscillation time according to the reference time to obtain the crystal oscillation time, the method further includes: under the condition that the GPS time is available, correcting the time of the real-time clock at intervals of preset time according to the GPS time so that the corrected time of the real-time clock is the GPS time; and under the conditions that the GPS time is unavailable and the automatic driving vehicle is started, correcting the time of the real-time clock at intervals of preset time according to the crystal oscillator time, so that the corrected time of the real-time clock is the crystal oscillator time.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the present application further provides a time synchronization device, and it should be noted that the time synchronization device in the embodiment of the present application may be used to execute the method for time synchronization provided in the embodiment of the present application. The following describes a time synchronization apparatus provided in an embodiment of the present application.
Fig. 2 is a schematic diagram of a time synchronization apparatus according to an embodiment of the present application. As shown in fig. 2, the device comprises an acquisition unit 10, an initialization unit 20, a transmission unit 30 and a control unit 40, wherein the acquisition unit 10 is used for acquiring a reference time when the automatic driving vehicle is started, and the reference time is the current time data of a real-time clock; the initialization unit 20 is configured to initialize a crystal oscillator timing time according to the reference time to obtain a crystal oscillator time, where the timing precision of the crystal oscillator is greater than the timing precision of the real-time clock; the transmitting unit 30 is configured to transmit the crystal oscillation time to a target device, where the target device includes a domain controller and/or a sensor device of the autonomous vehicle; the control unit 40 is configured to control the time of the target device to be corrected at least according to the GPS time when the GPS time is available.
In the time synchronization device, when the automatic driving vehicle is started, the current time data of the real-time clock is acquired by the acquisition unit as the reference time; initializing the timing time of the crystal oscillator by the initialization unit according to the reference time to obtain the timing time of the crystal oscillator, wherein the timing precision of the crystal oscillator is greater than the timing precision of the real-time clock; transmitting the crystal oscillation time to a target device such as a domain controller and/or a sensor device of the autonomous vehicle through the transmission unit; and under the condition that the GPS time is available, controlling the time of the target equipment to be corrected at least according to the GPS time through the control unit. Compare the time synchronization mode nonconformity of different modules among the prior art among the autopilot vehicle, cause the problem of time asynchronism, this application is when autopilot system starts, time calibration crystal oscillator time through real-time clock, later send crystal oscillator time to domain controller and/or sensor equipment, in order to carry out time synchronization, guaranteed between domain controller and each sensor equipment, time synchronism between sensor and the sensor is better, thereby the reliability of the fusion information of sensor equipment has been guaranteed, the driving safety of autopilot vehicle has been guaranteed. And under the condition that the GPS time is available, the time of the target equipment is controlled to be corrected at least according to the GPS time, so that the time of the whole automatic driving system is ensured to be consistent with the real time, and the time accuracy of the automatic driving system is ensured to be better.
Since the timing precision of the crystal oscillator is greater than the timing precision of the real-time clock, in order to further ensure the time accuracy of the entire automatic driving system, in a specific embodiment of the present application, the initialization unit includes an assignment module and an acquisition module, where the assignment module is configured to assign the timing start time of the crystal oscillator to the reference time and control the crystal oscillator to start timing from the reference time; the acquisition module is used for acquiring real-time timing data of the crystal oscillator after timing starts to obtain the crystal oscillator time. When the automatic driving system is not started, the crystal oscillator is also in an unopened state, but the timing of the real-time clock is not influenced by whether the automatic driving system is started or not, so that the timing time of the real-time clock, namely the reference time is used as the timing starting time of the crystal oscillator when the automatic driving vehicle is started, the crystal oscillator starts to time from the timing starting time, the timing precision of the crystal oscillator is higher than that of the real-time clock, and the crystal oscillator is used as the clock of the whole automatic driving system after the crystal oscillator starts to time, so that the time accuracy of the whole automatic driving vehicle is further ensured.
According to another specific embodiment of the present application, the control unit includes a first determining module and a first sending module, wherein the first determining module is configured to determine a difference between the GPS time and the crystal oscillator time as a correction time when the GPS time is available; the first sending module is configured to send the correction time to the target device, so that the target device corrects the time of its own clock according to the correction time. In this embodiment, when the GPS time is available, the difference between the GPS time and the crystal time is used as the correction time and sent to the target device, so that the target device adjusts its clock according to the correction time, thereby ensuring good synchronization of the timestamps between the target devices, and further ensuring time synchronization and time accuracy between the target devices such as the sensor device and the domain controller of the autonomous vehicle.
According to another embodiment of the application, the first sending module includes a first sending submodule and/or a second sending submodule, where the first sending submodule is configured to send the corrected time to a network switching device in an ethernet broadcast manner, so that the network switching device sends the corrected time to the target device in an ethernet broadcast manner, and the second sending submodule is configured to send the corrected time to the target device in an ethernet broadcast manner. The correction time is sent in an Ethernet broadcast mode, so that the communication traffic can be filtered, the throughput is increased, and the physical propagation range is ensured to be larger.
Of course, the transmission method is not limited to the ethernet, and may be a CAN (Controller Area Network) or any other appropriate communication method in the prior art. The above-described propagation method is not limited to the broadcast method, and may be another propagation method such as unicast or multicast.
In order to further ensure that the time synchronization between the target devices is flexible, in another specific embodiment, the control unit includes a second sending module, where the second sending module is configured to send the GPS time to the target device when the GPS time is available, so that the target device corrects the time of its own clock according to the GPS time and the crystal time when the GPS time is not synchronized with the crystal time.
Specifically, the control unit includes a second determining module and a third sending module, where the second determining module is configured to determine whether GPS time is synchronized with the crystal oscillator time when the GPS time is available; the third sending module is configured to send the GPS time to the target device when the GPS time is not synchronized with the crystal time, so that the target device corrects the time of its own clock according to the GPS time and the crystal time.
In order to further ensure that the reliability of the GPS time is high, according to another specific embodiment of the present application, the apparatus further includes an analyzing unit, a first determining unit, and a second determining unit, where the analyzing unit is configured to, in a case where the GPS time is available, analyze, in a case where the GPS signal is received, the GPS mc message information carried by the GPS signal to obtain location state information and/or a pulse per second information, before controlling to correct the time of the target device at least according to the GPS time; the first determining unit is configured to determine whether the positioning status information is valid positioning and/or determine whether the pulse per second signal is normal, where the pulse per second signal is determined to be normal when a time interval between two adjacent pulse per second signals is 1 second; the second determining unit is configured to determine that the GPS time carried by the GPS signal is available when the positioning state information indicates the valid positioning and/or the pulse per second signal is normal, and determine that the GPS time carried by the GPS signal is unavailable when the positioning state information indicates the invalid positioning. Before controlling to correct the time of the target device according to the GPS time, whether a GPS signal is available is determined, and the effect of accurately synchronizing the time of the target device is further achieved.
Specifically, in the case that the positioning state information is a, it indicates that it is a valid positioning; when the positioning state information is V, it indicates that it is an invalid positioning.
In order to further ensure driving safety, in another embodiment of the present application, the apparatus further includes a first sending unit, where the first sending unit is configured to send a first prompt message to the domain controller when it is determined that the GPS time carried by a GPS signal is unavailable, where the first prompt message is a message that prompts that current automatic driving is poor in reliability, so that the domain controller reminds a relevant person to take over manually according to the first prompt message. Under the condition that the GPS time is determined to be unavailable, the reference time of the whole automatic driving system is only the crystal oscillator time, the driving reliability is poor under the condition, the correctness of partial driving strategies of automatic driving is possibly influenced, and therefore the safety of automatic driving is poor, the first prompt information is sent under the condition, the domain controller reminds related personnel to take over manually according to the information, and the driving safety is further guaranteed under the condition that the GPS time is unavailable.
In addition, the domain controller can also determine whether the current driving environment meets the parking requirement or not under the condition of receiving the first prompt message; and controlling the vehicle to stop in the case that the parking requirement is determined to be met.
The method for sending the first prompt message may be sent to the domain controller in a broadcast sending manner.
In another embodiment, the apparatus further includes a generating unit, where the generating unit is configured to, when it is determined that the GPS time carried by the GPS signal is unavailable, generate information that indicates that the GPS time is unavailable, and send the information to a network switching device in an ethernet broadcast manner, so that the network switching device sends the information to the target device in the ethernet broadcast manner, so that the target device still uses the crystal oscillator time as a synchronization time of its own clock, and/or send the information to the target device in the ethernet broadcast manner, so that the target device still uses the crystal oscillator time as a synchronization time of its own clock.
In addition, the apparatus further includes a second sending unit, where the second sending unit is configured to send an alarm message to the target device when the GPS time is available and the GPS time is determined to be different from the crystal time, that is, when the GPS time is determined to be different from the crystal time, and before the calibration time is sent to the target device, so that the target device is ready to perform a preparation operation for adjusting the time of its own clock.
In another specific embodiment of the application, the apparatus further includes a first correcting unit, where the first correcting unit is configured to correct the time of the real-time clock every predetermined time period according to the crystal oscillation time after initializing the time of the crystal oscillation according to the reference time to obtain the crystal oscillation time, so that the corrected time of the real-time clock is the crystal oscillation time. The timing precision of the crystal oscillator is greater than that of the real-time clock, the time of the real-time clock is corrected according to the time of the crystal oscillator, the influence of accumulated errors of the real-time clock on the time accuracy of the real-time clock is further relieved, the real-time clock can be guaranteed to time accurately when the automatic driving vehicle is changed from a starting state to a non-starting state, and the reference time obtained when the automatic driving vehicle is started again is further guaranteed to be accurate.
In addition, the apparatus further includes a second correcting unit, configured to correct the time of the real-time clock every predetermined time period according to the GPS time when the GPS time is available after initializing the time of the crystal oscillator according to the reference time to obtain the crystal oscillator time, so that the corrected time of the real-time clock is the GPS time; and under the conditions that the GPS time is unavailable and the automatic driving vehicle is started, correcting the time of the real-time clock at intervals of preset time according to the crystal oscillator time, so that the corrected time of the real-time clock is the crystal oscillator time.
The time synchronizer includes a processor and a memory, the acquiring unit, the initializing unit, the transmitting unit, the controlling unit, etc. are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the problem of time asynchronism among all modules of the automatic driving vehicle in the prior art is solved by adjusting kernel parameters.
The memory may include volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), including at least one memory chip.
An embodiment of the present invention provides a computer-readable storage medium on which a program is stored, which, when executed by a processor, implements the time synchronization method described above.
The embodiment of the invention provides a processor, which is used for running a program, wherein the time synchronization method is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein when the processor executes the program, at least the following steps are realized:
step S101, acquiring reference time under the condition that an automatic driving vehicle is started, wherein the reference time is current time data of a real-time clock;
step S102, initializing the timing time of the crystal oscillator according to the reference time to obtain the timing time of the crystal oscillator, wherein the timing precision of the crystal oscillator is greater than the timing precision of the real-time clock;
step S103, transmitting the crystal oscillation time to a target device, wherein the target device comprises a domain controller and/or a sensor device of the automatic driving vehicle;
and step S104, under the condition that the GPS time is available, controlling to correct the time of the target equipment at least according to the GPS time.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program of initializing at least the following method steps when executed on a data processing device:
step S101, under the condition that the automatic driving vehicle is started, reference time is obtained, and the reference time is current time data of a real-time clock;
step S102, initializing the timing time of the crystal oscillator according to the reference time to obtain the timing time of the crystal oscillator, wherein the timing precision of the crystal oscillator is greater than the timing precision of the real-time clock;
step S103, sending the crystal oscillation time to a target device, wherein the target device comprises a domain controller and/or a sensor device of the automatic driving vehicle;
and step S104, under the condition that the GPS time is available, controlling to correct the time of the target equipment at least according to the GPS time.
There is also provided, in accordance with yet another exemplary embodiment of the present application, apparatus for time synchronization, comprising one or more processors, memory, and one or more programs stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for performing any of the above-described methods.
The time synchronization apparatus described above includes one or more processors, memory, and one or more programs including instructions for performing any of the methods described above, which, in the case of an autonomous vehicle start, first acquires real-time clock current time data as a reference time; initializing the timing time of the crystal oscillator according to the reference time to obtain the time of the crystal oscillator, wherein the timing precision of the crystal oscillator is greater than the timing precision of the real-time clock; then, sending the crystal oscillation time to a target device such as a domain controller and/or a sensor device of the automatic driving vehicle; and finally, under the condition that the GPS time is available, controlling the time of the target equipment to be corrected at least according to the GPS time. Compare the time synchronization mode nonconformity of different modules among the prior art among the autopilot vehicle, cause the problem of time asynchronism, this application is when autopilot system starts, time calibration crystal oscillator time through real-time clock, later send crystal oscillator time to domain controller and/or sensor equipment, in order to carry out time synchronization, guaranteed between domain controller and each sensor equipment, time synchronism between sensor and the sensor is better, thereby the reliability of the fusion information of sensor equipment has been guaranteed, the driving safety of autopilot vehicle has been guaranteed. And under the condition that the GPS time is available, the time of the target equipment is controlled to be corrected at least according to the GPS time, so that the time of the whole automatic driving system is ensured to be consistent with the real time, and the time accuracy of the automatic driving system is ensured to be better.
In an actual application process, a microcontroller with a higher crystal oscillator precision may be selected as the time synchronization device, and in a specific embodiment, the time synchronization device is an Aurix TC397 microcontroller.
According to another exemplary embodiment of the present application, there is also provided an autonomous vehicle system, as shown in fig. 3, comprising a domain controller 100, a plurality of sensor devices 101, a time synchronization device 102, a crystal oscillator 103, and a self-powered real-time clock 104, wherein the time synchronization device 102 is configured to perform any one of the above methods, and the time synchronization device 102 is communicatively connected to the domain controller 100 and the plurality of sensor devices 101, respectively; the crystal oscillator 103 is integrated in the time synchronization device 102; the real-time clock 104 is electrically connected to the time synchronization apparatus 102.
The automatic driving vehicle system comprises a domain controller, a plurality of sensor devices, a time synchronization device, a crystal oscillator and a self-powered real-time clock, wherein the time synchronization device is used for executing any one of the methods; initializing the timing time of the crystal oscillator according to the reference time to obtain the time of the crystal oscillator, wherein the timing precision of the crystal oscillator is greater than the timing precision of the real-time clock; then, sending the crystal oscillation time to a target device such as a domain controller and/or a sensor device of the automatic driving vehicle; and finally, under the condition that the GPS time is available, controlling the time of the target equipment to be corrected at least according to the GPS time. Compare the time synchronization mode nonconformity of different modules among the prior art among the autopilot vehicle, cause the problem of time asynchronism, this application is when autopilot system starts, time calibration crystal oscillator time through real-time clock, later send crystal oscillator time to domain controller and/or sensor equipment, in order to carry out time synchronization, guaranteed between domain controller and each sensor equipment, time synchronism between sensor and the sensor is better, thereby the reliability of the fusion information of sensor equipment has been guaranteed, the driving safety of autopilot vehicle has been guaranteed. And under the condition that the GPS time is available, the time of the target equipment is controlled to be corrected at least according to the GPS time, so that the time of the whole automatic driving system is ensured to be consistent with the real time, and the time accuracy of the automatic driving system is ensured to be better.
In a specific embodiment, as shown in fig. 3, the autonomous vehicle system further includes a network switching device 105, the domain controller 100 and at least a portion of the sensor devices 101 are communicatively connected to the time synchronization device 102 through the network switching device 105, and the network switching device 105 is configured to receive information sent by the time synchronization device 102 and send the information to the domain controller 100 and the communicatively connected sensor devices 101. The autopilot system also includes a GNSS module 106 for receiving the GPS signals.
The information sent by the time synchronization device comprises at least one of the correction time and the GPS time and the crystal oscillator time.
As shown in fig. 3, the network switching device 105 includes a plurality of ports 207, where the ports 207 are PTP master ports, and one port 207 corresponds to the connection domain controller 100 or one sensor device 101.
Specifically, the domain controller is an SOC, and as shown in fig. 3, the sensor devices may be a T-BOX200 (Telematics-BOX), an image pickup device 201, a laser sensor 202, an IMU203, and the like. The domain controller 100 includes a road condition receiving module 204, a sensor driver 205, and a self-clock 206. In an actual application process, after the time synchronization device sends the correction time to each target device, the target device to be corrected, such as a road condition receiving module, corrects the time of its own clock according to the correction time; the target device that does not need to make a correction automatically ignores the correction time.
The network switching equipment is also used for receiving GPS signals and determining whether GPS time is available according to the GPS signals; the network switching device is further configured to generate second prompt information for prompting that the current automatic driving reliability is poor when the GPS time is unavailable, and send the second prompt information to the domain controller and/or at least a part of the sensor devices. Under the condition that the GPS time is determined to be unavailable, the reference time of the whole automatic driving system is only crystal oscillator time, the driving reliability is poor under the condition that the accuracy of partial driving strategies of automatic driving is possibly influenced, and therefore the safety of automatic driving is poor, and the second prompt information is sent out through the network exchange equipment under the condition that the driving safety is further guaranteed under the condition that the GPS time is unavailable.
The network switching equipment can send out second prompt information in a broadcasting mode, and the domain controller reminds related personnel to take over manually and/or determines whether the current driving environment meets the parking requirement or not under the condition that the domain controller receives the second prompt information; and controlling the vehicle to stop in the case that the parking requirement is determined to be met.
And the sensor is also used for continuously broadcasting the second prompt information under the condition of receiving the second prompt information, so that the domain controller receives the second prompt information.
In addition, as shown in fig. 4, in the case that the GPS time is available, the network switching device 105 may be further configured to correct a local clock 208 according to the GPS time, and correct the time of the sensor device 101 in communication connection according to the corrected time of the local clock 208.
According to another specific embodiment of the present application, the power-on time synchronization process of the autonomous vehicle is as follows:
the time synchronization device provides power to other components within the autonomous vehicle system;
the time synchronization device loads the reference time as the local time (namely, crystal oscillator time) and starts timing from the local time;
the time synchronization device starts time synchronization related services including an ethernet PTP master service and/or a CAN PTP master service (if needed);
the time synchronization equipment starts to monitor GPS signals;
a clock time synchronization monitoring service comprising: PTP service status, local crystal oscillator time; when determining that the GPS time is inconsistent with the local crystal oscillator time, broadcasting the above state data through a User Datagram Protocol (UDP);
the time synchronization slave device (i.e., the target device such as the sensor device and the domain controller) starts and starts synchronizing to the time synchronization master device (i.e., the above-mentioned time synchronization device of the present application).
The power-off time synchronization process of the automatic driving vehicle comprises the following steps:
the time synchronization device will monitor a specific vehicle CAN frame to initiate a power-down sequence;
if the GNSS clock is valid, updating the real-time clock by using the GNSS clock, and if the GNSS clock is invalid, updating the real-time clock by using the crystal oscillator time;
stopping all time synchronization services;
informing a power management IC (power management IC) to trigger a power-off process of an entire ADCU (Automated Driving Control Unit).
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the above-described units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be an indirect coupling or communication connection through some interfaces, units or modules, and may be electrical or in other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, the technical solution of the present invention, which is substantially or partly contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
From the above description, it can be seen that the above-described embodiments of the present application achieve the following technical effects:
1) In the time synchronization method, under the condition that the automatic driving vehicle is started, the current time data of the real-time clock is firstly acquired as reference time; then, initializing the timing time of the crystal oscillator according to the reference time to obtain the time of the crystal oscillator, wherein the timing precision of the crystal oscillator is greater than the timing precision of the real-time clock; then, sending the crystal oscillation time to a target device such as a domain controller and/or a sensor device of the automatic driving vehicle; and finally, under the condition that the GPS time is available, controlling the time of the target equipment to be corrected at least according to the GPS time. Compare the time synchronization mode nonconformity of different modules among the prior art among the autopilot vehicle, cause the problem of time asynchronism, this application is when autopilot system starts, time calibration crystal oscillator time through real-time clock, later send crystal oscillator time to domain controller and/or sensor equipment, in order to carry out time synchronization, guaranteed between domain controller and each sensor equipment, time synchronism between sensor and the sensor is better, thereby the reliability of the fusion information of sensor equipment has been guaranteed, the driving safety of autopilot vehicle has been guaranteed. And under the condition that the GPS time is available, the time of the target equipment is controlled to be corrected at least according to the GPS time, so that the time of the whole automatic driving system is ensured to be consistent with the real time, and the time accuracy of the automatic driving system is ensured to be better.
2) In the time synchronization device, when the automatic driving vehicle is started, the current time data of the real-time clock is acquired as the reference time through the acquisition unit; initializing the timing time of the crystal oscillator according to the reference time through the initialization unit to obtain the time of the crystal oscillator, wherein the timing precision of the crystal oscillator is greater than the timing precision of the real-time clock; transmitting the crystal oscillation time to a target device such as a domain controller and/or a sensor device of the autonomous vehicle through the transmission unit; and under the condition that the GPS time is available, controlling the time of the target equipment to be corrected at least according to the GPS time through the control unit. Compare the time synchronization mode nonconformity of different modules among the prior art among the autopilot vehicle, cause the problem of time asynchronism, this application is when autopilot system starts, time calibration crystal oscillator time through real-time clock, later send crystal oscillator time to domain controller and/or sensor equipment, in order to carry out time synchronization, guaranteed between domain controller and each sensor equipment, time synchronism between sensor and the sensor is better, thereby the reliability of the fusion information of sensor equipment has been guaranteed, the driving safety of autopilot vehicle has been guaranteed. And under the condition that the GPS time is available, the time of the target equipment is controlled to be corrected at least according to the GPS time, so that the time of the whole automatic driving system is ensured to be consistent with the real time, and the time accuracy of the automatic driving system is ensured to be better.
3) The time synchronization apparatus described above includes one or more processors, memory, and one or more programs including instructions for performing any of the methods described above, which, in the case of an autonomous vehicle start, first obtains real-time clock current time data as a reference time; initializing the timing time of the crystal oscillator according to the reference time to obtain the time of the crystal oscillator, wherein the timing precision of the crystal oscillator is greater than the timing precision of the real-time clock; then, sending the crystal oscillation time to a target device such as a domain controller and/or a sensor device of the automatic driving vehicle; and finally, under the condition that the GPS time is available, controlling the time of the target equipment to be corrected at least according to the GPS time. Compare the time synchronization mode nonconformity of different modules among the prior art among the autopilot vehicle, cause the problem of time asynchronism, this application is when autopilot system starts, time calibration crystal oscillator time through real-time clock, later send crystal oscillator time to domain controller and/or sensor equipment, in order to carry out time synchronization, guaranteed between domain controller and each sensor equipment, time synchronism between sensor and the sensor is better, thereby the reliability of the fusion information of sensor equipment has been guaranteed, the driving safety of autopilot vehicle has been guaranteed. And under the condition that the GPS time is available, the time of the target equipment is controlled to be corrected at least according to the GPS time, so that the time of the whole automatic driving system is ensured to be consistent with the real time, and the time accuracy of the automatic driving system is ensured to be better.
4) The automatic driving vehicle system comprises a domain controller, a plurality of sensor devices, a time synchronization device, a crystal oscillator and a self-powered real-time clock, wherein the time synchronization device is used for executing any one of the methods; initializing the timing time of the crystal oscillator according to the reference time to obtain the time of the crystal oscillator, wherein the timing precision of the crystal oscillator is greater than the timing precision of the real-time clock; then, sending the crystal oscillation time to a target device such as a domain controller and/or a sensor device of the automatic driving vehicle; and finally, under the condition that the GPS time is available, controlling the time of the target equipment to be corrected at least according to the GPS time. Compare among the prior art the time synchronization mode of different modules inconsistent among the autopilot vehicle, cause the problem of time asynchronism, this application is when autopilot system starts, time calibration crystal oscillator time through real-time clock, later send crystal oscillator time for domain controller and/or sensor equipment, in order to carry out time synchronization, guaranteed between domain controller and each sensor equipment, time synchronism between sensor and the sensor is better, thereby the reliability of the integration information of sensor equipment has been guaranteed, the driving safety of autopilot vehicle has been guaranteed. And under the condition that the GPS time is available, the time of the target equipment is controlled to be corrected at least according to the GPS time, so that the time of the whole automatic driving system is ensured to be consistent with the real time, and the time accuracy of the automatic driving system is ensured to be better.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (17)

1. A method of time synchronization, comprising:
under the condition that the automatic driving vehicle is started, acquiring reference time, wherein the reference time is current time data of a real-time clock;
initializing the timing time of the crystal oscillator according to the reference time to obtain the timing time of the crystal oscillator, wherein the timing precision of the crystal oscillator is greater than that of the real-time clock;
sending the crystal oscillation time to a target device, wherein the target device comprises a domain controller and/or a sensor device of the automatic driving vehicle;
and controlling to correct the time of the target equipment according to at least the GPS time under the condition that the GPS time is available.
2. The method of claim 1, wherein initializing a crystal timing time according to the reference time to obtain a crystal time comprises:
assigning the timing starting time of the crystal oscillator to the reference time, and controlling the crystal oscillator to start timing from the reference time;
and acquiring real-time timing data of the crystal oscillator after timing starts to obtain the crystal oscillator time.
3. The method of claim 1, wherein controlling the time of the target device to be corrected based on at least GPS time if the GPS time is available comprises:
under the condition that the GPS time is available, determining the difference value between the GPS time and the crystal oscillator time as correction time;
and sending the correction time to the target equipment so that the target equipment corrects the time of the clock of the target equipment according to the correction time.
4. The method of claim 3, wherein sending the correction time to the target device comprises:
transmitting the corrected time to a network switching device by way of Ethernet broadcast, so that the network switching device transmits the corrected time to the target device by way of Ethernet broadcast,
and/or
And sending the correction time to the target equipment in an Ethernet broadcast mode.
5. The method of claim 1, wherein controlling the time of the target device to be corrected based on at least GPS time if the GPS time is available comprises:
and under the condition that the GPS time is available, sending the GPS time to the target equipment, so that the target equipment corrects the time of a clock thereof according to the GPS time and the crystal oscillator time under the condition that the GPS time and the crystal oscillator time are not synchronous.
6. The method of claim 1, wherein controlling the time of the target device to be corrected based on at least GPS time if the GPS time is available comprises:
determining whether the GPS time is synchronous with the crystal oscillator time if the GPS time is available;
and under the condition that the GPS time is not synchronous with the crystal oscillator time, sending the GPS time to the target equipment so that the target equipment corrects the time of the clock thereof according to the GPS time and the crystal oscillator time.
7. The method according to any one of claims 1 to 6, wherein in case GPS time is available, before controlling the time of the target device to be corrected at least according to the GPS time, the method further comprises:
under the condition of receiving a GPS signal, analyzing GPRMC message information carried by the GPS signal to obtain positioning state information and/or a pulse per second signal;
determining whether the positioning state information is effective positioning and/or determining whether the pulse per second signal is normal, wherein the pulse per second signal is determined to be normal under the condition that the time interval between two adjacent pulse per second signals is 1 second;
and determining that the GPS time carried by the GPS signal is available under the condition that the positioning state information is the effective positioning and/or the pulse per second signal is normal, and determining that the GPS time carried by the GPS signal is unavailable under the condition that the positioning state information is the ineffective positioning and/or the pulse per second signal is abnormal.
8. The method of claim 7, wherein in the event that it is determined that the GPS time carried by a GPS signal is not available, the method further comprises:
and sending first prompt information to the domain controller, wherein the first prompt information is used for prompting the current poor reliability of automatic driving, so that the domain controller can remind related personnel of taking over manually according to the first prompt information.
9. The method according to any one of claims 1 to 6, wherein after initializing a crystal oscillator time according to the reference time to obtain a crystal oscillator time, the method further comprises:
and under the condition that the automatic driving vehicle is started, correcting the time of the real-time clock at intervals of preset time according to the crystal oscillator time, so that the corrected time of the real-time clock is the crystal oscillator time.
10. A time synchronization apparatus, comprising:
the system comprises an acquisition unit, a display unit and a control unit, wherein the acquisition unit is used for acquiring reference time under the condition that the automatic driving vehicle is started, and the reference time is current time data of a real-time clock;
the initialization unit is used for initializing the timing time of the crystal oscillator according to the reference time to obtain the timing time of the crystal oscillator, and the timing precision of the crystal oscillator is greater than that of the real-time clock;
a transmitting unit, configured to transmit the crystal oscillation time to a target device, where the target device includes a domain controller and/or a sensor device of the autonomous vehicle;
and the control unit is used for controlling the time correction of the target equipment at least according to the GPS time under the condition that the GPS time is available.
11. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program performs the method of any one of claims 1 to 9.
12. A processor configured to run a program, wherein the program when executed performs the method of any one of claims 1 to 9.
13. A time synchronization apparatus, comprising: one or more processors, memory, and one or more programs stored in the memory and configured to be executed by the one or more processors, the one or more programs including instructions for performing the method of any of claims 1-9.
14. An autonomous vehicle system, comprising:
a domain controller and a plurality of sensor devices;
a time synchronization device for performing the method of any one of claims 1 to 9, the time synchronization device being in communication with the domain controller and the plurality of sensor devices, respectively;
the crystal oscillator is integrated in the time synchronization device;
a self-powered real-time clock electrically connected to the time synchronization device.
15. The autonomous-capable vehicle system of claim 14, further comprising:
the network switching equipment is used for receiving information sent by the time synchronization equipment and sending the information to the domain controller and the sensor equipment in communication connection.
16. The autonomous-capable vehicle system of claim 15, wherein the network switching device is further configured to receive a GPS signal, determine whether GPS time is available based on the GPS signal; and the network switching equipment is also used for generating second prompt information for prompting that the current automatic driving reliability is poor under the condition that the GPS time is unavailable, and sending the second prompt information to the domain controller and/or at least part of the sensor equipment.
17. The autonomous-capable vehicle system of claim 16, wherein the network switching device is further configured to correct a local clock based on the GPS time if the GPS time is available, and to correct the time of the communicatively-connected sensor device based on the corrected time of the local clock.
CN202211007692.3A 2022-08-22 2022-08-22 Time synchronization method, time synchronization device and time synchronization equipment Pending CN115441980A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211007692.3A CN115441980A (en) 2022-08-22 2022-08-22 Time synchronization method, time synchronization device and time synchronization equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211007692.3A CN115441980A (en) 2022-08-22 2022-08-22 Time synchronization method, time synchronization device and time synchronization equipment

Publications (1)

Publication Number Publication Date
CN115441980A true CN115441980A (en) 2022-12-06

Family

ID=84245336

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211007692.3A Pending CN115441980A (en) 2022-08-22 2022-08-22 Time synchronization method, time synchronization device and time synchronization equipment

Country Status (1)

Country Link
CN (1) CN115441980A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116528194A (en) * 2023-07-05 2023-08-01 智道网联科技(北京)有限公司 Synchronization system and synchronization method for an autopilot system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116528194A (en) * 2023-07-05 2023-08-01 智道网联科技(北京)有限公司 Synchronization system and synchronization method for an autopilot system
CN116528194B (en) * 2023-07-05 2023-10-03 智道网联科技(北京)有限公司 Synchronization system and synchronization method for an autopilot system

Similar Documents

Publication Publication Date Title
CN109905194B (en) Vehicle-mounted terminal system and synchronous data acquisition method and device
CN112672415B (en) Multi-sensor time synchronization method, device, system, electronic device and medium
CN111381487B (en) Multi-sensor synchronous time service system, method and device and electronic equipment
CN107710753B (en) Decentralized synchronous multisensor system
EP4020855A1 (en) Time synchronization method and apparatus
JP3854162B2 (en) Method, apparatus and system for GPS time synchronization using cellular signal bursts
CN113110160B (en) Time synchronization method and device of domain controller, domain controller and storage medium
CN111860604B (en) Data fusion method, system and computer storage medium
CN112119365A (en) Time synchronization method, multi-sensor system and movable platform
CN115441980A (en) Time synchronization method, time synchronization device and time synchronization equipment
US20220397869A1 (en) Method, device, equipment and storage medium for global navigation satellite system time synchronization
CN111193568A (en) Time synchronization method, device, system, storage medium and vehicle
CN113271169A (en) Vehicle time service method and system based on wireless communication terminal
CN113992469B (en) Data fusion method and device, electronic equipment and computer readable medium
CN103873223A (en) Satellite internal equipment timing method and system
WO2022062670A1 (en) Timing method, visual navigational aid device control method, and related apparatus
WO2017045474A1 (en) Message parsing method and apparatus
CN116830689A (en) Time synchronization method, device and storage medium
CN117639991A (en) Time synchronization method and device for vehicle
KR101583136B1 (en) Method and Apparatus for Time Synchronization of Car Black Box or Car Electronic Equipment
CN116566534A (en) Time synchronization method, device, vehicle and readable storage medium
EP4078863A1 (en) Method for verifying the validity of sensor data of an ethernet on-board network
US11675318B2 (en) Multi-interface GPS time synchronization
CN116582214A (en) Time calibration method, device, electronic equipment and storage medium
CN116015523A (en) Time synchronization method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination