CN114647179A - Master clock device, slave clock device and time synchronization method - Google Patents

Master clock device, slave clock device and time synchronization method Download PDF

Info

Publication number
CN114647179A
CN114647179A CN202011501257.7A CN202011501257A CN114647179A CN 114647179 A CN114647179 A CN 114647179A CN 202011501257 A CN202011501257 A CN 202011501257A CN 114647179 A CN114647179 A CN 114647179A
Authority
CN
China
Prior art keywords
time
master clock
clock
slave
clock device
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
CN202011501257.7A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202011501257.7A priority Critical patent/CN114647179A/en
Priority to PCT/CN2021/124454 priority patent/WO2022127337A1/en
Publication of CN114647179A publication Critical patent/CN114647179A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G3/00Producing timing pulses
    • GPHYSICS
    • G04HOROLOGY
    • G04GELECTRONIC TIME-PIECES
    • G04G7/00Synchronisation
    • GPHYSICS
    • G04HOROLOGY
    • G04RRADIO-CONTROLLED TIME-PIECES
    • G04R20/00Setting the time according to the time information carried or implied by the radio signal
    • G04R20/02Setting the time according to the time information carried or implied by the radio signal the radio signal being sent by a satellite, e.g. GPS
    • G04R20/04Tuning or receiving; Circuits therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B7/00Radio transmission systems, i.e. using radiation field
    • H04B7/14Relay systems
    • H04B7/15Active relay systems
    • H04B7/185Space-based or airborne stations; Stations for satellite systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B7/00Radio transmission systems, i.e. using radiation field
    • H04B7/14Relay systems
    • H04B7/15Active relay systems
    • H04B7/185Space-based or airborne stations; Stations for satellite systems
    • H04B7/1851Systems using a satellite or space-based relay
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • 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

Abstract

The application belongs to the field of artificial intelligence, and particularly relates to a master clock device, a slave clock device and a time synchronization method. The master clock device provided by the application is used for providing clock time for the slave clock device, and comprises: a first clock unit for providing a first master clock time based on the real time clock signal; and a second clock unit for providing the second master clock time based on the time included in the first positioning data in the satellite signal or based on the real-time clock signal. The application also provides a method for accurately synchronizing the time of the master clock device and the satellite and a method for synchronizing the time of the master clock device and various slave clock devices. The scheme provided by the application can eliminate the negative influence of time hopping on the time-sensitive part of the application system, ensures that the application system has time following the real world, and is particularly suitable for automatic driving of intelligent automobiles, automatic operation of robot systems and the like.

Description

Master clock device, slave clock device and time synchronization method
Technical Field
The application belongs to the field of artificial intelligence, and particularly relates to a master clock device, a slave clock device and a time synchronization method.
Background
With the development of artificial intelligence technology, more and more artificial intelligence devices can be realized, such as intelligent cars, intelligent unmanned planes, robots, intelligent ships, and the like. Intelligent control is a key in artificial intelligence technology, and the accuracy of time synchronization is crucial to intelligent control.
For example, sensor time, sensor data fusion, positioning accuracy compensation, path planning decisions, etc. in intelligent control strongly depend on system time. Therefore, these parts of the intelligent control have higher requirements on the time accuracy.
Currently, the time following the real world is obtained by receiving a Global Navigation Satellite System (GNSS) signal as the System time of the artificial intelligence device. In a scenario with satellite signals, the system time of the artificial intelligence device is synchronized according to the time in the satellite signal, usually at a frequency of 1 time/second. However, when the artificial intelligence device is in some occluded scenes such as indoors, underground or tunnels, the satellite signal cannot be received or is not well received, so that the system time cannot be synchronized according to the time in the satellite signal. At this time, the internal clock is used to time the system time for the artificial intelligence device until the system time is synchronized after the satellite signal can be received again.
However, such clock switching often causes a system time jump problem. Such time hopping may cause a serious influence on the stability of the artificial intelligence device, for example, problems such as frame loss of each sensor, failure in matching of fused data, inaccurate positioning accuracy, etc., may occur, and even cause abnormal operation or failure of the artificial intelligence device.
Disclosure of Invention
In view of the above problems, the present application provides a master clock apparatus, a slave clock apparatus and a time synchronization method, which can eliminate the negative effect of time jump on the time-sensitive part of the application system, while ensuring that the application system has real-world time following.
In a first aspect, the present application provides a master clock apparatus, comprising: a first clock unit for providing a first master clock time based on the real-time clock signal; and a second clock unit for providing a second master clock time based on a time included in the first positioning data in the received satellite signal when the satellite signal is received by the master clock device, and providing the second master clock time based on the real-time clock signal when the satellite signal is not received by the master clock device.
Time in the satellite signal includes, but is not limited to, Universal Coordinated Time (UTC).
By providing two clock units, i.e. by providing dual clocks, the master clock device can provide different clock times to parts of the system, which are not sensitive to time. For example, a monotonically increasing first master clock time is provided to time-sensitive data plane nodes, and a second master clock time following real-world coordinated world time is provided to management plane nodes that are less time-sensitive, i.e., allow clock transitions. The data plane node is, for example, a node related to calculation of an automatic driving algorithm, calculation of a motion path planning, and the like, such as a Microprogrammed Control Unit (MCU), a laser radar, and the like. The management plane node is, for example, another node that does not involve automatic driving algorithm calculation, movement path planning calculation, and the like, such as dimension measurement, log, and the like. The independent double-clock configuration provides extremely high-stability time without time jump for the time sensitive parts in the application device and the system, and provides time following the real world for other parts in the application device and the system, thereby providing a simple and flexible solution for the originally contradictory requirements of the two parts. Furthermore, by configuring the second clock unit as described above, it is possible to provide the second master clock time based on the real-time clock signal when the satellite signal is not received, thereby making the second master clock time available in any case and making the second master clock time provide a coordinated universal time following real time when possible.
With reference to the first aspect, in a possible implementation manner, the master clock apparatus further includes: a time processing unit connected to the second clock unit, for: determining a first time difference, wherein the first time difference is a time difference between a first time and a second time, the first time is a time when the master clock device receives a first second pulse signal, the second time is a time when the master clock device receives the first positioning data, and the first second pulse signal and the first positioning data are included in the received satellite signal and correspond to each other; and determining a first time based on the time included in the first positioning data and the first time difference. The second clock unit of the master clock device is further to provide the second master clock time based on the first time.
The positioning data is generally transmitted through a Controller Area Network (CAN) or a serial port such as a Universal Asynchronous Receiver Transmitter (UART), and there is generally a delay when the main clock device receives the positioning data. The pulse per second signal is generally transmitted through a General-Purpose Input/Output (GPIO) interface, and when the pulse per second signal is received by the master clock device, the time delay is in the order of nanoseconds and can be almost ignored. Therefore, for a positioning data generating apparatus (e.g., a satellite) to transmit the pulse-per-second signal and the positioning data at the same time, a receiving apparatus has a time difference in receiving the two. By providing a time processing unit for determining a first time difference between the receiving of the first second pulse signal by the master clock device and the receiving of the first positioning data corresponding to the first second pulse signal, the delay in the transmission of the first positioning data to the master clock device can be obtained. And determining a first time based on the time in the positioning data and the first time difference, the second clock unit then providing a second master clock time further based on the first time. In this way, the negative effects of the delay in the transmission of the positioning data are reduced, and a particularly precise synchronization of the second master clock time with the time contained in the positioning data in the satellite signal is achieved. Due to the ultra-low delay transmission of the pulse per second signal, such synchronization accuracy can be at least as high as microseconds in practice and no accumulated error.
One possible implementation manner of determining the first time difference is to provide a sensor control center (Senor Hub) in the time processing unit, and configure the sensor control center to start counting in nanoseconds when receiving the pulse per second signal and end the counting when receiving the positioning data corresponding to the pulse per second signal, and the nanosecond-level time count thus obtained is the first time difference. Another possible implementation is to provide a counter in the time processing unit instead of the sensor control center to obtain the first time difference with nanosecond accuracy.
Another possible implementation of determining the first time difference is to configure the time processing unit to record a first master clock time at the moment when a first second pulse signal in the received satellite signal is received, and to record the first master clock time at the moment when a first positioning data corresponding to said first second pulse signal is received, and then to calculate a difference of the first master clock times at two different moments as the first time difference.
With reference to the first aspect, in a possible implementation manner, the time processing unit is further configured to calculate a second time difference as a transmission delay of the second positioning data received by the master clock device. Wherein the second time difference is a time difference between a time included in the second positioning data and a second time, the second time being the second master clock time provided by the second clock unit at a third time, the third time being a time at which the second positioning data is received by the master clock device.
A second time difference between the time in the received second positioning data and the time of the second master clock at the time of receiving the second positioning data may be calculated after the time of the second master clock is precisely synchronized, and the second time difference may be used as the transmission delay of the positioning data. The transmission delay can be used for verifying the time conversion of the second positioning data of the navigation system and monitoring the time conversion abnormity of the second positioning data. Here, the second positioning data may be any positioning data other than the first positioning data received by the master clock device.
With reference to the first aspect, in a possible implementation manner, the master clock apparatus further includes a time processing unit, connected to the first clock unit, and configured to: recording a third time, the third time being a first master clock time provided by the first clock unit at a fourth time, the fourth time being a time at which a third second pulse signal is received by the master clock device; calculating a third time difference, which is a time difference between a time included in third positioning data received by the master clock device and the third time, the third positioning data and the third second pulse signal corresponding to each other; and converting a fourth time comprised by fourth positioning data to a fifth time, the fourth positioning data being positioning data received by the master clock device after the third positioning data, the fifth time being determined based on the fourth time and the third time difference.
The positioning data is typically transmitted to the master clock device via the CAN or serial port, which may cause problems with transmission time fluctuations and transmission delays. Recording, by a time processing unit, a first master clock time of a master clock device at the time of receiving the third second pulse signal, and calculating a third time difference between the time in the third positioning data and the recorded clock time as a reference time difference. When the time processing unit further receives the second positioning data, the second time in the second positioning data is converted into a third time by using a third time difference, so that the second time in the second positioning data is synchronized with the first time of the master clock device. In this way, the time-converted positioning data can be directly applied to the time-sensitive part of the system, and various problems caused by time inconsistency or jumping, especially problems in data fusion and path planning, can not be caused. In addition, the calculation of the third time difference is independent of the time of the receiving moment of the positioning data, and the problems of transmission time fluctuation and transmission time delay caused by the transmission of the positioning data through a CAN or a serial port are solved. The third time difference may last for a precise transition in time for the second positioning data.
With reference to the first aspect, in a possible implementation manner, the master clock apparatus further includes: and the interface unit is connected with the first clock unit and the second clock unit and used for providing a first master clock time and a second master clock time for the slave clock device.
The interface unit is arranged to provide a first master clock time and a second master clock time to the slave clock device for synchronizing the slave clock time of the slave clock device with the master clock time of the first master clock device.
With reference to the first aspect, in a possible implementation manner, the interface unit is further configured to send the first master clock time to the slave clock apparatus through a generalized precision clock protocol.
The master clock device transmits the first master clock Time to the slave clock device through the interface unit based on a Generalized Precision Time Protocol (gPTP), also known AS IEEE 802.1AS, for the slave clock device to synchronize the first slave clock Time to the Time of the first master clock. This ensures a particularly precise synchronization between the first master clock time and the first slave clock time. The synchronization deviation may be less than 1 microsecond.
With reference to the first aspect, in a possible implementation manner, the interface unit is further configured to periodically send a first time synchronization request message to the slave clock apparatus through the generalized precision clock protocol. Wherein the first time synchronization request message includes a sixth time and a seventh time, the sixth time being the first master clock time provided by the first clock unit at a fifth time, the seventh time being the second master clock time provided by the second clock unit at the fifth time, the fifth time being a time at which the interface unit transmits the first time synchronization request message.
The master clock device sends the first time synchronization request message to the slave clock device through the interface unit based on the generalized precision clock protocol for the slave clock device to time synchronize the second slave clock to the time of the second master clock. Since a particularly precise synchronization between the first master clock time and the first slave clock time can be achieved by means of a generalized precision clock protocol, the master clock device by simultaneously transmitting the first master clock time and the second master clock time to the slave clock device, the slave clock device can achieve a highly precise synchronization between the second master clock time and the second slave clock time depending on the first master clock time.
With reference to the first aspect, in a possible implementation manner, the interface unit is further configured to periodically send a second time synchronization request message to the slave clock apparatus. Wherein the second time synchronization request message comprises an eighth time and a message average delay, the eighth time is a second master clock time provided by the second clock unit at a sixth time, the sixth time is a time when the interface unit transmits the second time synchronization request message, and the message average delay indicates a time required for message transmission between the master clock device and the slave clock device.
Wherein, in some embodiments, the message average delay is a preset value. In some embodiments, the message average latency is calculated based on messages, for example, from outside the master clock device.
For slave clock devices that do not support the generalized precision clock protocol, a particularly precise synchronization between the first master clock time and the first slave clock time cannot be achieved in accordance with the protocol, so that a highly precise synchronization between the second master clock time and the second slave clock time cannot be achieved in accordance with the first master clock time. In this case, a higher accuracy of synchronization between the second master clock time and the second slave clock time is achieved by means of an average time delay of messages between the master clock means and the slave clock means.
With reference to the first aspect, in a possible implementation manner, the interface unit is further configured to receive a second time synchronization response message. Wherein the second time synchronization response message includes a ninth time and a tenth time, the ninth time being a second slave clock time of the slave clock apparatus at a seventh time, the tenth time being a second slave clock time of the slave clock apparatus at an eighth time, the seventh time being a time at which the slave clock apparatus receives the second time synchronization request message, the eighth time being a time at which the slave clock apparatus transmits the second time synchronization response message.
With reference to the first aspect, in a possible implementation manner, the master clock device further includes a time processing unit, connected to the interface unit, and configured to: recording an eleventh time, which is a second master clock time provided by the second clock unit at a ninth time, which is a time when the second time synchronization response message is received by the interface unit; and calculating the message average time delay based on the eighth time, the ninth time, the tenth time and the eleventh time.
By using the second time synchronization response message from the slave clock device, the master clock device can calculate a more accurate average time delay of the message, thereby enabling a higher accuracy of synchronization between the second master clock time and the second slave clock time.
In the first aspect and possible implementations thereof, the period may be preset or controllably adjustable. For example, the period may be preset to 1 second/time.
In a second aspect, the present application provides a slave clock device comprising: an interface unit for receiving a first master clock time and a second master clock time from a master clock device; a first clock unit for providing a first slave clock time, the first slave clock time being synchronized with the first master clock time; and a second clock unit for providing a second slave clock time, the second slave clock time being synchronized with the second master clock time; wherein the first master clock time is based on a real-time clock signal, the second master clock time is based on time included in positioning data in the satellite signal when the master clock device receives the satellite signal, and the second master clock time is based on the real-time clock signal time when the master clock device does not receive the satellite signal.
By providing two clock units and an interface unit receiving the first and second master clock times of the master clock device, the slave clock device can provide a first slave clock time synchronized with the first master clock time and a second slave clock time synchronized with the second master clock time. Thus, for example, a highly stable first slave clock time without time transitions can be provided for the time-sensitive part of the slave clock device, and a second slave clock time which can follow the real world can be provided for the less time-sensitive part of the slave clock device.
With reference to the second aspect, in one possible implementation, the interface unit is further configured to receive the first master clock time from the master clock device through a generalized precision clock protocol.
The slave clock device receives the first master clock time from the master clock device through the interface unit based on the generalized precise clock protocol, and is used for synchronizing the first slave clock time to the time of the first master clock. The synchronization deviation of such time synchronization is less than 1 microsecond. This enables each slave clock device that is first master clock time synchronized with the master clock device to have substantially the same first slave clock time. Here, "substantially the same" may be understood as each slave clock device having a deviation between the respective first slave clock times of less than 1 microsecond or even less, which may be negligible.
With reference to the second aspect, in a possible implementation manner, the interface unit is further configured to receive a first time synchronization request message from the master clock device. Wherein the first time synchronization request message includes a first time and a second time, the first time and the second time being the first master clock time and the second master clock time, respectively, provided by the master clock apparatus at a first time, the first time being a time at which the master clock apparatus transmits the first time synchronization request message.
With reference to the second aspect, in a possible implementation manner, the slave clock device further includes a time processing unit, connected to the interface unit, and configured to: calculating a first time difference, the first time difference being a time difference between the first time and the second time; and calculating a fourth time based on the first time difference and a third time, wherein the third time is a first slave clock time provided by the first clock unit at a second time, the second time being a time at which the interface unit receives the first time synchronization request message, wherein the second clock unit is further configured to provide the second slave clock time based on the fourth time.
The slave clock device receives the first time synchronization request message generated by the master clock device through the interface unit based on the generalized precise clock protocol, so as to be used for time synchronization of the second slave clock to the time of the second master clock. The first slave clock time in the slave clock arrangement is very accurate, since a particularly accurate synchronization between the first master clock time and the first slave clock time can be achieved by means of a generalized accurate clock protocol. The slave clock device may provide the second slave clock time in accordance with its own first slave clock time, which is synchronized with the second master clock time with high accuracy, by calculating the second slave clock time of the slave clock device based on the first master clock time and the second master clock time received from the master clock device and transmitted simultaneously.
With reference to the second aspect, in a possible implementation manner, the interface unit is further configured to receive a second time synchronization request message from the master clock device. Wherein the second time synchronization request message comprises a fifth time and a message average delay, the fifth time is the second master clock time provided by the master clock device at a third time, the third time is the time at which the master clock device transmits the second time synchronization request message, and the message average delay indicates the time required for message transmission between the master clock device and the slave clock device.
With reference to the second aspect, in a possible implementation manner, the slave clock apparatus further includes a time processing unit, connected to the interface unit, configured to calculate a sixth time based on the fifth time and the message average delay, and the second clock unit is further configured to provide the second slave clock time based on the sixth time.
In some implementations, the message average delay is a preset value. In some implementations, the message average latency is calculated based on messages, for example, from outside the slave clock device.
For slave clock devices that do not support the generalized precision clock protocol, a particularly precise synchronization between the first master clock time and the first slave clock time cannot be achieved in accordance with the protocol, so that a highly precise synchronization between the second master clock time and the second slave clock time cannot be achieved in accordance with the first master clock time. In this case, a higher accuracy of synchronization between the second master clock time and the second slave clock time is achieved by means of an average time delay of messages between the master clock means and the slave clock means.
With reference to the second aspect, in a possible implementation manner, the interface unit is further configured to send a second time synchronization response message to the master clock apparatus. Wherein the second time synchronization response message includes a seventh time and an eighth time, the seventh time is the second slave clock time provided by the second time unit at a fourth time, the eighth time is the second slave clock time provided by the second time unit at a fifth time, the fourth time is a time when the interface unit receives the second time synchronization request message, and the fifth time is a time when the interface unit transmits the second time synchronization response message.
By sending the second time synchronization response message to obtain a more accurate message average delay from the master clock device, the slave clock device can achieve a more accurate synchronization between the second master clock time and the second slave clock time using the more accurate message average delay.
In a third aspect, the present application provides a time system comprising a master clock device according to any of the above embodiments, a real-time clock signal source for providing a real-time clock signal to the master clock device, and a satellite signal receiving device for providing a received satellite signal to the master clock device when the satellite signal is received.
Wherein the Real Time Clock (RTC) Time source includes but is not limited to a quartz crystal resonator.
The satellite signal receiving device includes, but is not limited to, a combined positioning sensor, a satellite signal receiving device, and a Real Time Kinematic (RTK) positioning sensor.
With reference to the third aspect, in one possible implementation, the time system further includes a slave clock device according to any of the above-described implementations.
Since the time system includes the master clock device and/or the slave clock device, advantages or benefits of the time system can be referred to advantages or benefits of the master clock device and/or the slave clock device, respectively, and are not described herein again.
In a fourth aspect, the present application provides a time synchronization method, including the steps of: the master clock device provides a first master clock time based on the real-time clock signal; and the master clock means provides a second master clock time based on a time included in the first positioning data in the received satellite signal when the satellite signal is received, and provides the second master clock time based on the real-time clock signal when the satellite signal is not received.
With reference to the fourth aspect, in one possible implementation, the providing the second master clock time based on the time included in the first positioning data in the received satellite signal includes: the master clock device determining a first time difference, wherein the first time difference is a time difference between a first time and a second time, the first time is a time when the master clock device receives a first second pulse signal, the second time is a time when the master clock device receives the first positioning data, and the first second pulse signal and the first positioning data are included in the satellite signal and correspond to each other; the master clock device determines a first time based on the time included in the first positioning data and the first time difference; and the master clock device provides the second master clock time based on the first time.
With reference to the fourth aspect, in one possible implementation, the time synchronization method further includes the following steps: the master clock device calculates a second time difference as a transmission delay of the second positioning data received by the master clock device. Wherein the second time difference is a time difference between a time included in the second positioning data and a second time, the second time being the second master clock time provided by the master clock apparatus at a third time, the third time being a time at which the second positioning data is received by the master clock apparatus.
With reference to the fourth aspect, in one possible implementation manner, in the time synchronization method, the time synchronization method further includes the steps of: the master clock device records a third time, wherein the third time is a first master clock time provided by the master clock device at a fourth time, and the fourth time is a time when a third second pulse signal is received by the master clock device; the master clock device calculates a third time difference, which is a time difference between a time included in third positioning data received by the master clock device and the third time, the third positioning data and the third second pulse signal corresponding to each other; and the master clock device converts a fourth time included in fourth positioning data into a fifth time, the fourth positioning data being the positioning data received by the master clock device after the third positioning data, the fifth time being determined based on the fourth time and the third time difference.
With reference to the fourth aspect, in one possible implementation, the time synchronization method further includes the following steps: the master clock device provides a first master clock time and a second master clock time to a slave clock device.
With reference to the fourth aspect, in one possible implementation manner, in the time synchronization method, the providing, by the master clock device, the first master clock time and the second master clock time to the slave clock device includes: the master clock device sends the first master clock time to the slave clock device via a generalized precision clock protocol.
With reference to the fourth aspect, in one possible implementation manner, in the time synchronization method, the providing, by the master clock device, the first master clock time and the second master clock time to the slave clock device includes: the master clock device periodically sends a first time synchronization request message to the slave clock device over the generalized precision clock protocol. Wherein the first time synchronization request message includes a sixth time and a seventh time, the sixth time being the first master clock time provided by the master clock apparatus at a fifth time, the seventh time being the second master clock time provided by the master clock apparatus at the fifth time, the fifth time being a time at which the interface unit transmits the first time synchronization request message.
With reference to the fourth aspect, in one possible implementation manner, in the time synchronization method, the providing, by the master clock device, the first master clock time and the second master clock time to the slave clock device includes: the master clock device periodically sends a second time synchronization request message to the slave clock device. Wherein the second time synchronization request message comprises an eighth time and a message average delay, the eighth time being a second master clock time provided by the master clock device at a sixth time, the sixth time being a time at which the master clock device transmits the second time synchronization request message, the message average delay indicating a time required for message transmission between the master clock device and the slave clock device.
With reference to the fourth aspect, in one possible implementation manner, in the time synchronization method, the providing, by the master clock device, the first master clock time and the second master clock time to the slave clock device includes: the master clock device receives a second time synchronization response message. Wherein the second time synchronization response message includes a ninth time and a tenth time, the ninth time is a second slave clock time provided by the slave clock device at a seventh time, the tenth time is a second slave clock time provided by the slave clock device at an eighth time, the seventh time is a time when the slave clock device receives the second time synchronization request message, and the eighth time is a time when the slave clock device transmits the second time synchronization response message.
With reference to the fourth aspect, in one possible implementation manner, in the time synchronization method, the providing, by the master clock device, the first master clock time and the second master clock time to the slave clock device includes: the master clock device records an eleventh time, which is a second master clock time provided by the master clock device at a ninth time, which is a time when the second time synchronization response message is received by the master clock device; and the master clock device calculates the message average time delay based on the eighth time, the ninth time, the tenth time and the eleventh time.
The time synchronization method of the fourth aspect may be performed by the master clock device of the first aspect. The advantages or benefits of the time synchronization method relating to the fifth aspect may be referred to the advantages or benefits of the master clock means described above, respectively, and will not be described herein again.
In a fifth aspect, the present application provides another time synchronization method, including the steps of: the slave clock device receives a first master clock time and a second master clock time from the master clock device; the slave clock device providing a first slave clock time, the first slave clock time being synchronized with the first master clock time; and the slave clock means providing a second slave clock time, the second slave clock time being synchronized with the second master clock time; wherein the first master clock time is based on a real-time clock signal, the second master clock time is based on a time included in positioning data in a satellite signal when the master clock device receives the satellite signal, and is based on the real-time clock signal time when the master clock device does not receive the satellite signal.
With reference to the fifth aspect, in one possible implementation manner, in the time synchronization method, the receiving, by the slave clock device, the first master clock time and the second master clock time from the master clock device includes: the slave clock device receives the first master clock time from the master clock device via a generalized precision clock protocol.
With reference to the fifth aspect, in a possible implementation manner, in the time synchronization method, the receiving, by the slave clock device, the first master clock time and the second master clock time from the master clock device further includes: the slave clock device receives a first time synchronization request message from the master clock device. Wherein the first time synchronization request message includes a first time and a second time, the first time and the second time being the first master clock time and the second master clock time, respectively, provided by the master clock apparatus at a first time, the first time being a time at which the master clock apparatus transmits the first time synchronization request message.
With reference to the fifth aspect, in one possible implementation manner, in the time synchronization method, the slave clock device providing a second slave clock time includes: the slave clock device calculating a first time difference, the first time difference being a time difference between the first time and the second time; the slave clock device calculating a fourth time based on the first time difference and a third time, wherein the third time is a first slave clock time provided by the slave clock device at a second time instant, and the second time instant is a time instant at which the slave clock device receives the first time synchronization request message; and the slave clock device provides the second slave clock time based on the fourth time.
With reference to the fifth aspect, in one possible implementation manner, in the time synchronization method, the receiving, by the slave clock device, the first master clock time and the second master clock time from the master clock device includes: the slave clock device receives a second time synchronization request message from the master clock device. Wherein the second time synchronization request message comprises a fifth time and a message average delay, the fifth time is the second master clock time provided by the master clock device at a third time, the third time is the time at which the master clock device transmits the second time synchronization request message, and the message average delay indicates the time required for message transmission between the master clock device and the slave clock device.
With reference to the fifth aspect, in one possible implementation manner, in the time synchronization method, the synchronizing, by the slave clock device, the clock time of the slave clock device with the clock time provided by the master clock device further includes: the slave clock device calculates a sixth time based on the fifth time and the message average time delay; and the slave clock device provides the second slave clock time based on the sixth time.
With reference to the fifth aspect, in a possible implementation manner, in the time synchronization method, the method further includes: the slave clock device sends a second time synchronization response message to the master clock device. Wherein the second time synchronization response message includes a seventh time and an eighth time, the seventh time is the second slave clock time provided by the slave clock device at a fourth time, the eighth time is the second slave clock time provided by the slave clock device at a fifth time, the fourth time is a time when the slave clock device receives the second time synchronization request message, and the fifth time is a time when the slave clock device transmits the second time synchronization response message.
The time synchronisation method of the fifth aspect may be performed by a master clock device and a slave clock device of the second aspect. The advantages or benefits of the time synchronization method relating to the fifth aspect may be referred to the advantages or benefits of the respective slave clock means of the master clock means correspondingly, and will not be described in detail herein.
In a sixth aspect, the present application provides a computing device comprising: a bus; a communication interface connected to the bus; at least one first processor connected with the bus; and at least one memory coupled to the bus and storing program instructions that, when executed by the at least one first processor, cause the at least one first processor to perform any of the time synchronization methods of the fourth aspect described above.
In a seventh aspect, the present application provides another computing device comprising: a bus; a communication interface connected to the bus; at least one second processor connected with the bus; and at least one memory coupled to the bus and storing program instructions that, when executed by the at least one second processor, cause the at least one second processor to perform any of the time synchronization methods of the fifth aspect described above.
In an eighth aspect, the present application provides a computer readable storage medium having stored thereon program instructions, wherein the program instructions, when executed by a first computer, cause the first computer to perform any one of the time synchronization methods of the fourth aspect described above.
In a ninth aspect, the present application provides another computer readable storage medium having program instructions stored thereon, wherein the program instructions, when executed by a second computer, cause the second computer to perform any one of the time synchronization methods of the fifth aspect described above.
Since the sixth to ninth aspects may perform the time synchronization method of the fourth or fifth aspect, which will similarly have the advantages or benefits of the first or second aspect, the advantages or benefits of the sixth to ninth aspects will not be described in detail herein.
These and other aspects of the invention will be apparent from and elucidated with reference to the embodiment(s) described hereinafter.
Drawings
The various features and the connections between the various features of the present invention are further described below with reference to the attached figures. The figures are exemplary, some features are not shown to scale, and some of the figures may omit features that are conventional in the art to which the application relates and are not essential to the application, or show additional features that are not essential to the application, and the combination of features shown in the figures is not intended to limit the application. In addition, the same reference numerals are used throughout the specification to designate the same components. The specific drawings are illustrated as follows:
FIG. 1 schematically illustrates a time synchronization scheme in the prior art;
FIG. 2 schematically illustrates another time synchronization scheme in the prior art;
FIG. 3 schematically illustrates an embodiment of a time system of the present application;
FIG. 4 schematically illustrates a portion of the time system of FIG. 3 relating to a first clock time;
FIG. 5 schematically illustrates a portion of the time system of FIG. 3 relating to a second clock time;
FIG. 6 schematically illustrates one implementation scenario of a time system embodiment of the present application;
FIG. 7 schematically illustrates another implementation scenario of a time system embodiment of the present application;
FIG. 8 schematically illustrates one embodiment of a master clock apparatus of the present application;
FIG. 9 schematically illustrates one embodiment of a slave clock apparatus of the present application;
FIG. 10 schematically illustrates another embodiment of a time system of the present application;
FIG. 11 schematically illustrates one embodiment of a time synchronization method of the present application;
FIG. 12 schematically illustrates one embodiment of synchronizing the first clock time in step S102 illustrated in FIG. 11;
FIG. 13 schematically illustrates one embodiment of synchronizing second clock times in step S102 illustrated in FIG. 11;
FIG. 14 schematically illustrates an alternative embodiment to the embodiment of FIG. 13;
FIG. 15 schematically illustrates one embodiment of step S104 illustrated in FIG. 11;
FIG. 16 schematically illustrates one embodiment of step S106 illustrated in FIG. 11; and
FIG. 17 schematically illustrates one embodiment of a computing device of the present application.
Detailed Description
< definition >
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. In the case of inconsistency, the meaning described in the present specification or the meaning derived from the content described in the present specification shall control. In addition, the terminology used herein is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the present application.
To accurately describe the technical contents in the present application and to accurately understand the present invention, the words and terms used in the present specification are explained or defined as follows before describing the embodiments.
The terms "first, second, third, etc. in the description and in the claims, or the like, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order, but may be used to advantage if so permitted and to effect in other than the order illustrated or otherwise described herein.
The term "comprising" as used in the specification and claims should not be construed as being limited to the contents listed thereafter; it does not exclude other elements or steps. It should therefore be interpreted as specifying the presence of the stated features, integers, steps or components as referred to, but does not preclude the presence or addition of one or more other features, integers, steps or components, and groups thereof. Thus, the expression "an apparatus comprising the devices a and B" should not be limited to an apparatus consisting of only the components a and B.
The words "one embodiment" or "an embodiment" as used in this specification means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. Thus, appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment, but may. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments, as would be apparent to one of ordinary skill in the art from this disclosure.
The words "optional", "optionally", "optional" and "optionally" as used in the specification mean that the feature it modifies may be omitted in some embodiments, but is present in some alternative embodiments.
The term "satellite signal" as used in the specification and claims may be a signal transmitted by a satellite in a global satellite navigation system to indicate Coordinated Universal Time (UTC). For example, the satellite signal includes positioning data having a time value and a Pulse Per Second (PPS) signal. In practice, the satellite signal is transmitted periodically, for example 1 time per second. The Global Satellite Navigation System referred to herein may be a BeiDou Navigation Satellite System (BDS), a Global Positioning System (GPS), a GLONASS Satellite Navigation System (GLONASS), a Galileo Satellite Navigation System (Galileo), or the like.
The term "positioning data" as used in the specification and claims includes, but is not limited to, information from a global satellite navigation system or a combined positioning navigation system for indicating a position. The positioning data may be a signal comprising a satellite signal time or a system time of the navigation system, e.g. originating from an on-board crystal oscillator of the navigation system. The positioning data may be recommended positioning information, typically output by a positioning data generating device (e.g., a satellite in a global satellite navigation system) at a frequency of 1HZ, including a system time value of a whole second corresponding to the PPS signal. The recommended positioning information may have a GPRMC format. The words "first positioning data" and "third positioning data" used in the specification and the claims may be recommended positioning information. The positioning data may also be fused positioning data, typically output by a positioning data generating device (e.g., a combination positioning sensor) at a frequency of 100 HZ. The fusion positioning data may include device system time value, longitude and latitude information, altitude information, speed component information, azimuth information, pitch angle information, roll angle information, and the like. The words "second positioning data" and "fourth positioning data" as used in the specification and claims may include fused positioning data and recommended positioning information.
The wording "pulse-per-second signal and positioning data correspond to each other" used in the description and the claims is a pair of pulse-per-second signal and positioning data transmitted simultaneously. Because receiving arrangement receives the pulse per second signal and the location data that the data volume difference is huge through different modes (for example different serial ports etc.), receiving arrangement received the pulse per second signal earlier, received the location data after a period of time. In this case, the positioning data corresponding to the pulse-per-second signal referred to in the present application may be positioning data received within a period of time after the pulse-per-second signal is received. This time period may be 500 milliseconds, typically not more than 1 second. In practice, it may happen that the receiving device receives the pulse-per-second signal but does not receive the corresponding positioning data. Thus, it can be provided that the positioning data received over the period of time does not correspond to the previously received pulse-per-second signal.
The term "system time" used in the specification, also referred to as clock time in the present application, is time information used for intelligent control of an artificial intelligence device or apparatus. The clock times referred to in this application are, for example, a first master and slave clock time and a second master and slave clock time.
< technical background >
Currently, one time synchronization scheme implemented in an artificial intelligence device, such as an intelligent car, is: the method comprises the steps that a GNSS module in a vehicle receives GNSS signals to obtain coordinated universal time, and the vehicle-mounted system time is synchronized based on the coordinated universal time; and when the GNSS signal cannot be acquired, maintaining the vehicle-mounted system time according to the local crystal oscillator until the system time is directly synchronized after the GNSS signal can be received again. Fig. 1 schematically illustrates such a time synchronization scheme. However, the timing accuracy of the internal clock is limited, and therefore, when the satellite signal is not received for a long time, there is a large time difference between the system internal clock timing and the coordinated universal time in the satellite signal. When the satellite signal is received again, the system time jumps due to the direct synchronization of the system time with the time in the satellite signal, which affects the stability of the intelligent control.
For example, the accuracy of an internal clock in a smart car is 50 parts per million (ppm). When the intelligent automobile stays in the underground parking lot, the GNSS receiving module in the intelligent automobile cannot acquire satellite signals, and only the internal clock can be used for timing as system time.
If the intelligent automobile stays in the underground parking lot for 10 minutes, that is, the time length of losing the satellite signal is 10 minutes, the time difference generated by the internal clock is 60 × 10 × 50/1000 — 30 milliseconds (millisecond, ms);
if the intelligent automobile stays in the underground parking lot for 60 minutes, namely the time length of losing the satellite signals is 60 minutes, the time difference generated by the internal clock is 60 × 50/1000 — 180 milliseconds;
if the intelligent automobile stays in the underground parking lot for 120 minutes, that is, the time duration of losing the satellite signal is 120 minutes, the time difference generated by the internal clock is 120 × 60 × 50/1000 — 360 milliseconds.
From the above data, it can be seen that the longer the time that the artificial intelligence device cannot acquire the satellite signal, the larger the time difference generated by the internal clock timing, and the larger the jump value that directly synchronizes the system time with the coordinated universal time in the satellite signal when the satellite signal is recovered.
Currently, the accuracy of intelligent control system time in an intelligent automobile has a significant impact on the network elements of the intelligent control. For example, if the time difference between the system time and the satellite signal time exceeds the sensor frame rate, the intelligent control system directly considers that the sensor loses frames, and mistakenly touches an alarm or has an abnormal function. Generally, the frame rate of a Camera (Camera) sensor is 33ms per frame, and the frame rate of a Laser Radar (Lidar) sensor is 50ms per frame. In a fusion system of an intelligent automobile, for example, a camera is fused with a laser radar frame within a certain time; if the time difference between the system time and the satellite signal time exceeds a certain time, the intelligent control system cannot select data, so that the fusion function is abnormal. The intelligent control system carries out positioning by calculating/transmitting time, speed, acceleration and angular speed, and once the system time jumps, the system positioning is abnormal. The intelligent control system generally performs one-time planning control in about 10ms, and if the system time jumps, the next time of issuing the planning control is abnormal.
Thus, another time synchronization scheme currently implemented in artificial intelligence devices is: when the satellite signal can be received again, the system time is synchronized progressively, rather than directly one step to one place. The jump value of each time synchronization is reduced through progressive synchronization, so that the requirement of the intelligent control network element on the system time precision is met. Fig. 2 schematically illustrates such a time synchronization scheme.
For example, referring to the example of the smart car described above, when the smart car loses a satellite signal for 60 minutes because of staying in an underground parking lot, the time difference generated by the internal clock timing thereof is 180 milliseconds. The error is far larger than the frame rates of the camera and the laser radar and is far larger than the planning control frequency of the intelligent control system, so that when time jump occurs, the system considers that the two sensors lose frames and abnormal planning control can occur.
For this purpose, the progressive synchronization may be configured such that the step size of each synchronization is 10ms and the synchronization frequency is 100 ms/time. The configuration is such that the system time is completely synchronized with the satellite signal time in a time period of 180/10 × 100 — 1800ms, i.e., 1.8 seconds. Such synchronization duration even exceeds the synchronization period duration of a satellite signal, which is typically 1 second.
It is understood that, in order to ensure that the synchronization step size meets the requirement of time precision in intelligent control, the synchronization step size should be controlled within a certain range. In this case, if the time difference between the system time and the satellite signal time is long, the synchronization frequency is set high in order to reduce the synchronization time, which brings a new challenge to the intelligent system.
In view of the above, one embodiment of the present application provides a master clock apparatus including a first clock unit and a second clock unit. The first clock unit is configured to provide a monotonically increasing first master clock time based on the received real-time clock signal. The second clock unit is adapted to provide a second master clock time following the real world based on the time comprised in the positioning data in the satellite signal or the real time clock signal. The main clock device can provide stable and non-jumping first main clock time for time sensitive parts of artificial intelligent systems and equipment, and provide second main clock time following the real world for less time sensitive parts, thereby flexibly meeting the requirements of different time sensitive parts.
< technical idea >
The "dual clock" concept of the present application is further described below in conjunction with fig. 3-5.
Fig. 3 schematically shows a schematic view of a time system according to an embodiment of the application. The time system 1000 shown in fig. 3 may include a master clock device 200, a plurality of slave clock devices 300, 300', 300 ", a real time clock signal source 400 and a satellite signal receiving device 500. The master clock device 200 is communicatively connected to the real-time clock signal source 400 and the satellite signal receiving device 500, respectively. The real time clock signal source 400 is used to provide the real time clock signal Trtc to the master clock device 200. The satellite signal receiving apparatus 500 is configured to provide the time Tgnss included in the positioning data in the satellite signal to the master clock apparatus 200 when the satellite signal is received. The master clock means 200 provides a first master clock time MT1 based on the real time clock signal Trtc and a second master clock time MT2 based on one of the time Tgnss comprised in the positioning data in the satellite signal and the real time clock signal Trtc, the first master clock time MT1 and the second master clock time MT2 being available to the slave clock means. The slave clock devices 300, 300' are communicatively connected to the master clock device 200, and acquire the first master clock time MT1 and/or the second master clock time MT2 from the master clock device 200. The slave clock device 300 may accordingly provide a first slave clock time ST1 and a second slave clock time ST 2. The slave clock device 300 ″ is communicatively connected to the slave clock device 300, and the first slave clock time ST1 and the second slave clock time ST2 are acquired from the slave clock device 300. Due to the specific communication protocol, a particularly precise synchronization between the first master clock time and the first slave clock time and a highly precise synchronization between the second master clock time and the second slave clock time can be achieved. Therefore, the time difference between the master and slave clock times is negligible. The master and slave clock means in the system thus have a first clock time and a second clock time which are independent of each other.
Fig. 4 shows a schematic diagram of a part of the time system of fig. 3 relating to a first clock time. The master node 200a, which is the master clock device 200, receives the real-time clock signal Trtc from the real-time clock signal source 400 and generates the first master clock time MT1 based on the real-time clock signal Trtc. Since the first master clock time MT1 is based on the real-time clock signal Trtc, the first master clock time MT1 is monotonically increasing without time jumps, being very stable and accurate. The master node 200a thus provides a stable, hop-free first master clock time MT1 to the slave node 300a, the service node 300b as a slave clock device 300. The slave node 300a further provides a stable non-hopping first slave clock time ST1 to another service node 300c acting as a slave clock device 300. In this way, the master node 200a, the slave node 300a, the service node 300b and the service node 300c in the time system all have the same stable non-hopping first clock time MT1, ST 1. The system of the application can avoid many defects caused by time jump in the prior art by realizing the first clock time MT1 and ST 1. For example, when the slave node 300a is an autopilot system, the service node 300b is a lidar, and the service node 300c is a camera, since these nodes all have the same stable and non-hopping first clock time MT1, ST1, when the autopilot system merges data of the lidar and the camera, the abnormal merging function due to the time hopping is not generated.
Fig. 5 shows a schematic diagram of a part of the time system of fig. 3 relating to a second clock time. The master node 200a as the master clock means 200 receives the time Tgnss included in the positioning data in the satellite signal from the satellite signal receiving means 500, and generates the first master clock time MT1 based on the time. Since the second clock time T2 is based on the time Tgnss included in the positioning data in the satellite signal, the second clock time may follow the real world, but the second master clock time MT2 may have a time jump due to an interruption of the satellite signal as described above. The master node 200a thus provides the slave node 300d, the service node 300e, as the slave clock means 300 with a second master clock time MT2 following the real world. The slave node 300d further provides a second slave clock time ST2 following the real world to another service node 300f as a slave clock device 300. In this way, the master node 200a, the slave node 300d, the service node 300e, and the service node 300f in the time system each have the second clock time MT2, ST2 following the real time. For some parts of artificial intelligence systems and devices, real world time needs to be followed, and a certain degree of time jump can be received. For example, when the slave node 300d is an in-vehicle terminal hmi, the service node 300e is a collision sensor, and the service node 300f is a tachograph, since these nodes each have the second clock time MT2, ST2 following the real world, in the case of retrieving collision data of the collision sensor and the tachograph using the in-vehicle terminal hmi, it is possible to know when a vehicle collision event occurs in the real world.
< implementation scenario >
The "dual clock" system of the present application can be applied to a variety of artificial intelligence systems, devices, and scenarios, two exemplary implementation scenarios being given below.
Fig. 6 schematically shows a possible implementation scenario of the time system of the present application, a smart car. The master clock device 201 of the smart car a receives the time Tgnss included in the positioning data in the satellite signal Xgnss from the satellite receiving device 501 and the real-time clock signal Trtc from the real-time clock signal source 401 and provides the first master clock time MT1 and the second master clock time MT2 through the CAN bus. The respective slave clock devices 301, 302, 303 of the smart car a receive and use the first master clock time MT1 and/or the second master clock time MT 2. In this scenario, satellite receiver 501 and real-time clock signal source 401 are located in smart car a. In this scenario, the master clock device 201 may be provided in, for example, an Electronic Control Unit (ECU), a Vehicle Control Unit (VCU), a telematics Unit (TCU, also called T-Box), an automobile Diagnostic System (On-Board Diagnostic, OBD), an Advanced Driving Assistance System (ADAS), or the like. The slave clock means 301, 302, 303 may be provided in various devices, e.g. processors, sensors, sensor abstractions, actuators, as part of these devices. These devices include, but are not limited to, a System on a Chip (SOC), a Micro-controller Unit (MCU), a camera and its data processing node, a laser radar and its data processing node, a millimeter wave radar and its data processing node, an ultrasonic radar and its data processing node, a chassis and its data processing node, and an in-vehicle infotainment System (AVN).
During the travel of the smart car a, the master clock device 201 continuously supplies the second master clock time MT2 based on the time Tgnss included in the positioning data in the satellite signal or the real-time clock signal Trtc to the slave clock device 301, for example, the slave clock device 302, for example, a laser radar, and the slave clock device 303, for example, a millimeter wave radar, which are provided in the in-vehicle infotainment system, and continuously supplies the first master clock time MT1 based on the real-time clock signal Trtc to the slave clock device 302, for example, a laser radar, and the slave clock device 303, for example, a millimeter wave radar. The in-vehicle infotainment system uses a second slave clock time ST2 for displaying time at the human interface, the second slave clock time ST2 being synchronized with a second master time T2. Lidar and millimeter wave radar use a first slave clock time ST1, which is ST1 synchronized with a first master time T1, to provide sensory data to the control system of the smart car a, for example for navigation and path planning. The laser radar and the millimeter wave radar use the second slave clock time ST2 for logging, which is ST2 synchronized with the second master time T2. When the smart car a travels into the long tunnel, the master clock device 201 does not receive the satellite signal Xgnss, and therefore provides a second master clock time MT2 based on the real-time clock signal Trtc. At this time, the second master clock time MT2 makes a transition, typically in milliseconds, due to the interruption of the satellite signal. The second slave clock time ST2 therefore also makes a millisecond transition. However, such a millisecond-level clock transition generally has no effect on the time displayed by the man-machine interface in the in-vehicle infotainment system, and is acceptable for the logging of laser radar and millimeter-wave radar. Meanwhile, since the laser radar and the millimeter wave radar provide sensing data using the hop-free first slave clock time ST1, navigation and path planning are not affected by satellite signal interruption.
Fig. 7 schematically shows another possible implementation scenario of the time system of the present application, robotic system B. The master clock device 202 provided in the robot B1 receives the time Tgnss included in the positioning data in the satellite signal Xgnss from the satellite receiving device 502 and the real-time clock signal Trtc from the real-time clock signal source 402 and supplies the first master clock time MT1 and the second master clock time MT2 through signal lines. The respective slave clock devices 304, 305, 306 provided in the respective robots B2, B3, B4 receive the first master clock time MT2 and the second master clock time MT 2. The satellite receiving device 502 and the real-time clock signal source 402 are provided in a device outside the robot B1 in this scenario, for example, a human-machine interaction device, a robot system overall controller, and the like. Further, in this scenario, the master clock device 202 may be provided in the robot control unit of the B1 robot, for example. The slave clock means 304, 305, 306 may for example be provided in various devices, such as processors, sensors, sensor abstractions, actuators, etc., as part of these devices. These devices include, but are not limited to, a System on a Chip (SOC), a Micro-controller Unit (MCU), a tactile sensor and its data processing node, a visual sensor and its data processing node, a proximity sensor and its data processing node, an auditory sensor and its data processing node, a force sensor and its data processing node.
When robots B1, B2, B3, B4 cooperate, master clock device 202 of robot B1 continuously provides, to slave clock devices 304, 305, 306, e.g. cameras, of robots B2, B3, B4, second master clock time MT2 based on time Tgnss included in the positioning data in the satellite signal and first master clock time MT1 based on real-time clock signal Trtc. The cameras 304, 305, 306 use the first slave clock time ST1 synchronized with the first master clock time MT1 to provide sensory data to the control systems of the robots B1, B2, B3, for example for collaborative path planning. When the robots B1 and B2 collide, the cameras 304 and 305 record the actual occurrence time of the collision event using the second slave clock time ST2 synchronized with the second master clock time MT 2.
An embodiment of a master clock device and an embodiment of a slave clock device of the present application will be described in detail below with reference to fig. 3, 8, and 9. In fig. 8 and 9, optional elements of the device are indicated by dashed boxes, i.e. these optional elements may be omitted in other embodiments.
< Master clock device embodiment >
Fig. 8 shows the master clock device 200 of fig. 3 in detail. As shown in fig. 8, the master clock apparatus 200 includes a first clock unit 210, a second clock unit 220, a time processing unit 230 connected to the first clock unit 210 and the second clock unit 220, and an interface unit 240 connected to the first clock unit 210, the second clock unit 220, and the time processing unit 230.
The first clock unit 210 is configured to provide a first master clock time MT1 based on the received real-time clock signal Trtc. The first clock unit 210 may provide the first master clock time MT1 time directly to other devices outside the master clock device 200, for example, the slave clock device 300, and may also provide the first master clock time MT1 to the time processing unit 230 and the interface unit 240. The real-time clock signal Trtc is, for example, a stable and precise single-frequency oscillation from a quartz crystal resonator (crystal oscillator for short). The absolute accuracy of common crystal frequencies can be up to fifty parts per million, and some crystal frequencies can be even higher, e.g., twenty parts per million. Therefore, the first master clock signal T1 based on the real-time clock signal Trtc may also have similar accuracy and stability.
The second clock unit 220 is configured to provide a second master clock time MT2 based on a time Tgnss included in the first positioning data W1 in the satellite signal Xgnss or the real-time clock signal Trtc. When receiving the satellite signal Xgnss, the second clock unit 220 provides the second master clock time MT2 based on the time Tgnss included in the first positioning data W1 in the satellite signal. When the satellite signal Xgnss is not received, the second clock unit 220 provides a second master clock time MT2 based on the real-time clock signal Trtc. Since the reference signal used by the second clock unit 220 to provide the second master clock time MT2 may vary, such variation of the reference signal may in turn result in a time transition. Thus, the second master clock time MT2 is allowed to have clock transitions, unlike the first master clock time MT 1. In some master clock apparatus embodiments, second clock unit 220 provides second master clock time MT2 directly based on time Tgnss included in the positioning data in the satellite signal. However, as described in detail below, in some other embodiments of the master clock apparatus, the second clock unit 220 may also provide the second master clock time MT2 based on the first time MT1 of the master clock apparatus determined by the time processing unit 230 according to the satellite signal Xgnss. In this case, it can be considered that the second clock unit 220 provides the second master clock time MT2 indirectly based on the time Tgnss included in the first positioning data W1 in the satellite signal.
The time processing unit 230 is configured to determine a first time difference Δ T1. The first time difference Δ T1 is the time difference between the first time and the second time. The first time is when the master clock device 200 receives the first second pulse signal PPS 1. The second timing is the timing at which the master clock device 200 receives the first positioning data W1. The first second pulse signal PPS1 and the first positioning data W1 are included in the satellite signal Xgnss and correspond to each other. The time processing unit 230 is further configured to determine a first time mt1 of the master clock means based on the time Tgnss comprised by the first positioning data W1 and said first time difference Δ T1. Mathematically, the process of determining the first time mt1 is: mt1 ═ Δ T1+ Tgnss. The time processing unit 230 transmits the determined first time MT1 to the second clock unit 220 so that the second clock unit 220 can further provide a second master clock time MT2 according to the first time MT 1. In other words, the second master clock time MT2 is in this way exactly synchronized with the time Tgnss of the satellite signal. Mathematically expressing that the second clock unit 220 further provides the second master clock time MT2 as follows: MT 2-MT 1. The accuracy of such synchronization can reach 5 nanoseconds. This may be omitted in some other master clock device embodiments.
In one implementation of the master clock device 200, a sensor control center (not shown) is disposed in the time processing unit 200, and the sensor control center is configured to start counting in nanoseconds when receiving the first second pulse signal PPS1 and end counting when receiving the first positioning data W1 corresponding to the second pulse signal PPS1, and the obtained nanosecond time count is the first time difference Δ T1. In another implementation of the master clock device 200, a counter (not shown) is provided in the time processing unit 200 instead of the sensor control center to obtain the first time difference Δ T1 with nanosecond accuracy. This may be omitted in some other master clock device embodiments.
In a further implementation of the master clock arrangement 200, the time processing unit 200 is configured to record a first master clock time MT1 at the moment when receiving a first second pulse signal PPS1 in the received satellite signal Xgnss, and to record a first master clock time MT1 'at the moment when receiving a first positioning data W1 corresponding to said first second pulse signal PPS1, and then to calculate the difference of the first master clock times MT1, MT 1' at two different moments as a first time difference Δ T1. This may be omitted in some other master clock device embodiments.
The time processing unit 230 is further configured to calculate the second time difference Δ T2 as a transmission delay of the second positioning data W2 received by the master clock device 200. The second time difference Δ T2 is the time T at which the master clock device 200 receives the second positioning data W2W2And a second master clock time MT2 provided by a second clock unit 220 at a third time3(i.e., the second time of the master clock device). The third time being a master clock device200 at the time of receiving the positioning data W2. This manner of determining the transmission delay can likewise be used to determine the transmission delay of positioning data of the navigation system (e.g., the positioning data W41, W42,. and W4x mentioned below) for verification of the time transition of these positioning data. This may be omitted in some other master clock device embodiments.
The time processing unit 230 is further configured to record the first master clock time MT1 provided by the first clock unit 210 at the fourth moment in time, upon receiving the pulse signal PPS3 at the third second4(i.e., the third time of the master clock device). The fourth timing is a timing at which the master clock device 200 receives the third pulse-per-second signal PPS 3. The time processing unit 230 is further configured to calculate a third time difference Δ T3. The third time difference Δ T3 is the time T in the third positioning data W3W3With the recorded first master clock time MT14The time difference between them. The time processing unit 230 is further configured to further receive a time T in the fourth positioning data W4W4(i.e., the fourth time of the master clock device) to a fifth time mt5, and the fifth time mt5 is based on the time T in the fourth positioning data W4W4And a third time difference at 3. The time T in the fourth positioning data W4 is expressed mathematicallyW4This is based on the first master clock time MT14Is converted into: w4 (T)W4)→W4(mt5),mt5=TW4+ΔT3=TW4+(MT14-TW3). The time-translated positioning data W4(mt5) may be transmitted via the interface unit 240. This may be omitted in some other master clock device embodiments.
Here, the time T in the third positioning data W3W3It may be the time based on the time Tgnss included in the positioning data in the satellite signal, or the time based on the device itself that provides the third positioning data W3, for example, the time of the plate crystal oscillator of the sensor. Therefore, the time T in the third positioning data W3W3This is based on the first master clock time MT14Is understood to not depend on the time Tgnss comprised by the positioning data in the satellite signal. Further, it should be appreciated that the third time difference Δ T3 may be used for a fourth greater number of fixesAccording to the time T of W41, W42, W4xW41、TW42、...、TW4nBased on a first master clock time MT14The conversion of (1). Such time conversion is for synchronizing the time in the positioning data related to the data plane nodes, e.g. related to the autopilot algorithm calculation, the movement path planning calculation, etc., with the first master clock time MT1, so that the time-related data in the data plane nodes use the first master clock time MT1 which is very stable and accurate.
The interface unit 240 is configured to communicate 300 with the slave clock apparatus to provide the first master clock time MT1 and the second master clock time MT2 to the slave clock apparatus 300 according to a known or proprietary protocol for the first slave clock time ST1 and/or the second slave clock time ST2 of the slave clock apparatus 300 to be correspondingly synchronized with the respective clock time of the master clock apparatus 200. This may be omitted in some other master clock device embodiments.
The interface unit 240 is further configured to send the first master clock time MT1 to said slave clock means 300 by means of a generalized precision clock protocol for a particularly precise synchronization between the first master clock time MT1 and the first slave clock time ST1 of the slave clock means 300. With a generalized precision clock protocol, the synchronization deviation, i.e. the deviation between the first slave clock time ST1 of the slave clock apparatus 300 and the first master clock time MT1 of the master clock apparatus 200, can be made less than 1 microsecond. This may be omitted in some other master clock device embodiments.
The interface unit 240 is further configured to periodically send a first time synchronization request message Xsyn1 to the slave clock device 300 over the generalized precision clock protocol for supporting synchronization of the slave clock device 300 of the generalized precision clock protocol (i.e., the first slave clock device 300' of the present application) with the master clock device 200 at the second clock time MT2, ST 2. The first time synchronization request message Xsyn1 includes a first master clock time MT1 provided by the first clock unit 210 at a fifth time5(i.e., the sixth time of the master clock device, hereinafter the first time of the slave clock device) and a second master clock time MT2 provided by the second clock unit 220 at this moment5(i.e., seventh of the master clock device)Time, i.e. hereinafter the second time of the slave clock device), the fifth time instant is the time instant at which the interface unit 230 sends the first time synchronization request message Xsyn 1. Wherein the period can be preset or can be controlled and adjusted. For example, the period may be preset to 1 second/time. This may be omitted in some other master clock device embodiments.
The interface unit 240 is further configured to periodically send a second time synchronization request message Xsyn2 to the slave clock apparatus 300 for synchronization of the slave clock apparatus 300 not supporting the generalized precision clock protocol (i.e., the second slave clock apparatus 300 "of the present application) with the master clock apparatus 200 in terms of the second clock time MT2, ST 2. The second time synchronization request message Xsyn2 includes a second master clock time MT2 provided by the second clock unit 220 at a sixth time6(i.e. eighth time of master clock means) and message average delay Pdelay. The sixth time is the time at which the interface unit 230 sends the second time synchronization request message Xsyn 2. Average time delay P of messagedelayIndicating the time required for message transmission between master clock device 200 and slave clock device 300. Wherein the period can be preset or can be controlled and adjusted. For example, the period may be preset to 1 second/time. This may be omitted in some other master clock device embodiments.
The interface unit 240 is further configured to receive a second time synchronization response message Xresp2 from the slave clock device 300. The second time synchronization response message Xresp2 corresponds to the second time synchronization request message Xsyn2, i.e. the second time synchronization response message Xresp2 is generated from the clock device 300 in response to the second time synchronization request message Xsyn 2. The second time synchronization response message Xresp2 includes a second slave clock time ST2 of a seventh time instant7(i.e., the ninth time of the master clock device, hereinafter, the seventh time of the slave clock device) and the second slave clock time ST2 of the eighth time8(i.e., the tenth time of the master clock device, hereinafter the eighth time of the slave clock device). The seventh time is the time when the slave clock device 300 receives the second time synchronization request message Xsyn2, and the eighth time is the time when the slave clock device 300 transmits the second time synchronization response message Xresp 2. This is achieved byAnd may be omitted in other embodiments of the master clock device.
The time processing unit 230 is further configured to record a second master clock time MT2 provided by the second clock unit 220 at a ninth instant in time9(i.e., the eleventh time of the master clock device). The ninth time is the time when the interface unit 230 receives the second time synchronization response message Xresp 2. The time processing unit is further configured to determine the second master clock time MT2 based on a sixth time instant6Second slave clock time ST2 of seventh time7And a second slave clock time ST2 at the eighth time8And a second master clock time MT2 of a ninth time9Calculating the average time delay P of the messagedelay. The tenth time is a time when the interface unit receives the second time synchronization response message. This calculation, which mathematically represents the average delay of a message, is: pdelay=[(MT29-MT26)-(ST28-ST27)]/2. This may be omitted in some other master clock device embodiments.
The time processing unit 230 is further configured to receive the first time synchronization response message Xresp1 via the interface unit 240 and to record a first master clock time MT1 at this timeresp1And a second master clock time MT2resp1For monitoring the synchronization between the first clock times MT1, ST 1.
< Slave clock device embodiment >
Fig. 9 schematically shows a schematic diagram of the slave clock arrangement 300 in fig. 3, comprising a first clock unit 310 providing a first slave clock time ST1, a second clock unit 320 providing a second slave clock time ST2, a time processing unit 330 and an interface unit 340. The interface unit 340 is for communicating with the master clock device 200, and receives the first master clock time MT1 and the second master clock time MT2 from the master clock device 200. The time processing unit 330 is configured to synchronize the first slave clock time ST1 of the first clock unit 310 and the second slave clock time ST2 of the second clock unit 320 of the slave clock apparatus 300 with the corresponding master clock time of the master clock apparatus 200 via communication of the interface unit 340. Since the slave clock device 300 encompasses the time processing unit 230 as well as other optional features, a first slave clock device 300' that supports the generalized precise clock protocol and a second slave clock device 300 "that does not support the generalized precise clock protocol may be further understood with reference to fig. 9 and the related description below.
In some embodiments, the interface unit 340 is further configured to receive said first master clock time MT1 from the master clock device 200 via a generalized precision clock protocol. And the first clock unit 310 is further configured to provide the first slave clock time ST1 according to the first master clock time MT1 received by the interface unit 340 according to the interface unit. Thereby achieving an accurate synchronization of the first slave clock time ST1 of the first clock unit 310 of the slave clock device 300 with the first master clock time MT1 of the master clock device 200. The first clock times MT1, ST1 referred to herein are based on the real-time clock signal Trtc. This may be omitted in other slave clock device embodiments, particularly those that do not support the generalized precision clock protocol.
In some embodiments, interface unit 340 is further configured to receive a first time synchronization request message Xsyn1 from master clock apparatus 200. The first time synchronization request message Xsyn1 includes a first master clock time MT1 provided by the first clock unit 210 when the interface unit 230 sends the first time synchronization request message Xsyn15(i.e., the first time of the slave clock device, i.e., the sixth time of the master clock device above) and the second master clock time MT2 provided by the second clock unit 2205(i.e., the second time of the slave clock device, i.e., the seventh time of the master clock device above). Second master clock time MT25Based on one of the time Tgnss comprised by the positioning data in the satellite signal Xgnss and said real time clock signal Trtc. This may be omitted in other slave clock device embodiments, particularly those that do not support the generalized precision clock protocol.
In some embodiments, a time processing unit 330 is provided in connection with the interface unit 340. The time handling unit is configured to record a first slave clock time ST12 (i.e. of the slave clock device) provided by the first clock unit 310 when the first time synchronization request message Xsyn1 is received by the interface unit 340A third time). The time processing unit is further configured to calculate a first master clock time MT1 comprised by the first time synchronization request message Xsyn15And a second master clock time MT25A fourth time difference at 4 (i.e., the first time difference of the slave clock device) therebetween. The time processing unit 330 then calculates a fourth time ST4 of the slave clock device such that the fourth time ST4 is the first slave clock time ST12And a fourth time difference Δ T4. Mathematically expressing the process by which the time processing unit 340 calculates the fourth time st4 is: ST4 ═ ST12+ΔT4=ST12+|MT15-MT25|。
The second clock unit 320 is thus also configured to further provide a second slave clock time ST2 based on the fourth time ST 4. This process is mathematically represented as ST 2-ST 4. This may be omitted in other slave clock device embodiments, particularly those that do not support the generalized precision clock protocol.
The interface unit 340 is further configured to send a first time synchronization response message Xresp1 to the master clock apparatus 200 for verifying synchronization of the second slave clock time ST2 of the slave clock apparatus 300 with the second master clock time MT 2. The first time synchronization response message Xresp1 comprises a second slave clock time ST2 of said slave clock device 300 upon reception of the first time synchronization request message Xsyn1syn12And a second slave clock time ST2 of the slave clock apparatus 300 when transmitting the second time synchronization response message Xresp1resp1. This may be omitted in some other slave clock device embodiments.
The interface unit 340 is further configured to receive a second time synchronization request message Xsyn2 from the master clock device 200. The second time synchronization request message Xsyn2 includes a second master clock time MT2 provided by the second clock unit 220 when the interface unit 230 sends the second time synchronization request message Xsyn26(i.e., the fifth time of the slave clock device, i.e., the eighth time of the master clock device above) and the message average time delay Pdelay. Wherein the second master clock time MT26Based on the time Tgnss comprised by the positioning data in the satellite signal Xgnss or said real time clock signal Trtc. Average time delay P of messagedelayIndicating the average time required for message transmission between master clock device 200 and slave clock device 300. This may be omitted in some other slave clock device embodiments, especially those that support a generalized precision clock protocol.
The time processing unit 330 is further configured to base the second master clock time MT2 on6And the average time delay P of the messagedelayThe sixth time st6 of the slave clock device is calculated such that the sixth time st6 is the second master clock time MT26And the average time delay P of the messagedelayThe sum of (1). Mathematically expressing the process by which the time processing unit 330 calculates the sixth time st6 is: st 6-MT 26+Pdelay
Then, the second clock unit 320 is further configured to provide a second slave clock time ST2 based on a sixth time ST 6. Mathematically representing the process by which the second clock unit 320 provides the second slave clock time ST2 is: ST6 is ST 2. This may be omitted in some other slave clock device embodiments, especially those that support a generalized precision clock protocol.
The interface unit 340 is further configured to send a second time synchronization response message Xresp2 to the master clock device 200. The second time synchronization response message Xresp2 corresponds to the second time synchronization request message Xsyn2, i.e. the second time synchronization response message Xresp2 is generated from the clock device 300 in response to the second time synchronization request message Xsyn 2. The second time synchronization response message Xresp2 comprises a second slave clock time ST2 of the slave clock device 300 upon reception of the second time synchronization request message Xsyn27(i.e., the seventh time of the slave clock device, i.e., the ninth time of the master clock device above) and the second slave clock time ST2 at this moment8(i.e., the eighth time of the slave clock device, i.e., the tenth time of the master clock device above). This may be omitted in some other slave clock device embodiments, especially those that support a generalized precision clock protocol.
Fig. 10 schematically shows a schematic view of a time system according to an embodiment of the application. The time system 1100 shown in fig. 10 does not have a slave clock device 300. Other structures of the time system 1100 are the same as those of the time system 1000 shown in fig. 3, and are not described again with reference to the description of the time system 1000 shown in fig. 3. Since the system embodiment does not have the slave clock device 300, it is more likely that the system embodiment is configured in an integrated form in practice, for example, formed in a time providing device or apparatus.
In some embodiments, time system 1100 may also include a slave clock device 300.
An embodiment of the time synchronization method of the present application will be described in detail below with reference to fig. 11 based on the time system of fig. 3, the master clock device 200 of fig. 8, and the slave clock device 300 of fig. 9. As described below, some of the steps are performed by the master clock device or optional units of the master clock device of the present application only, some of the steps are performed by the slave clock device or optional units of the master clock device of the present application only, and other steps involve both or optional units. Therefore, the following steps are not necessary in other embodiments of the time synchronization method of the present application and may therefore be omitted.
< time synchronization method embodiment >
The time synchronization method according to an embodiment of the present application includes the following steps S101 to S107.
In step S101, the master clock device 200 initializes the first clock unit 210 and the second clock unit 220. Specifically, initializing the first clock unit 210 and the second clock unit 220 is to make the first clock unit 210 and the second clock unit 220 provide the first master clock time MT1 and the second master clock time MT2 based on the real-time clock signal Trtc.
In step S102, the master clock device 200 and the slave clock device 300 periodically perform synchronization of the first clock times MT1, ST1 and the second clock times MT2, ST 2. Here, a specific manner in which the master clock device 200 and the slave clock device 300 periodically perform synchronization of the first clock times MT1, ST1 and the second clock times MT2, ST2 will be described in detail below. The period may be preset, or may be adjusted according to the situation in the repeated synchronization process. An example of a cycle is 1 second/time.
In step S103, the master clock device 200 determines whether the third pulse-per-second signal PPS3 and the third positioning data W3 are received. If the received signal is received, go to step S104, and if the received signal is not received, go to step S107.
In step S104, the master clock device 200 uses the received pulse-per-second signal PPS3 to convert the time T in the fourth positioning data W4 based on the first master clock time MT1W4
In step S105, the master clock device 200 determines whether the satellite signal receiving device 500 successfully searches for satellites. If the determination is successful, the step S106 is performed, and if the determination is unsuccessful, the step S107 is performed.
In step S106, the master clock device 200 receives the satellite signal Xgnss transmitted from the satellite signal receiving device 500 and acquires the time Tgnss included in the positioning data therein, and performs synchronization of the second master clock time MT2 with the time Tgnss of the satellite signal.
In step S107, the master clock device 200 determines whether it is powered off. If the power is off, go to step S108, otherwise go back to step S102.
In step S108, the master clock device 200 stores the current second master clock time MT2, and then ends.
The periodic synchronization between the first clock times MT1, ST1 of the master clock device 200 and the slave clock device 300 involved in step S102 is explained with reference to fig. 12. The interface unit 240 of the master clock apparatus 200 transmits SYNC (Synchronization) and Follow UP messages to the first slave clock apparatus 300 'to achieve frequency Synchronization of the respective first clock times MT1, ST1 in the master clock apparatus 200 and the first slave clock apparatus 300'. Then, the interface unit 340 of the slave clock apparatus 300 sends a pDelay _ Req (peer-delay request) message to the interface unit 240 of the master clock apparatus 200, and then the interface unit 240 sends a pDelay _ Resp (peer-delay response) message and a pDelay _ Resp _ Follow _ Up (peer-delay response Follow) message to the interface unit 340 in sequence to measure the delay time. The delay time generated during the synchronization time with the gPTP protocol can actually be in the order of microseconds or even less. This precise synchronization allows the first clock times MT1, ST1 to maintain a high degree of accuracy after time synchronization between the different devices. That is, synchronizing the first clock times MT1, ST1 using the ptp protocol enables the difference between the respective first clock times MT1, ST1 of the master clock apparatus 200 and the first slave clock apparatus 300' in the time system to be minimal or even negligible. This step can be omitted in some other embodiments of the time synchronization method of the present application, especially in embodiments where the slave clock device does not support the generalized precision clock protocol.
The periodic synchronization between the second clock times MT2, ST2 of the master clock device 200 and the first slave clock device 300' involved in step S102 is explained with reference to fig. 13. The first slave clock apparatus 300' may provide the second slave clock time ST2 according to a fourth time difference between the first master clock time MT1 and the second master clock time MT2 of the master clock apparatus 200 due to supporting the generalized precise clock protocol. In particular, interface unit 240 of master clock device 200 sends a first time synchronization request message Xsyn1 to a first slave clock device 300'. The first time synchronization request message Xsyn1 includes a first master clock time MT1 provided by the first clock unit 210 when the interface unit 230 sends the first time synchronization request message Xsyn15(i.e., the sixth time of the master clock means, i.e., the first time of the slave clock means) and a second master clock time MT2 provided by the second clock unit 220 at this moment5(i.e., the seventh time of the master clock device, i.e., the second time of the slave clock device) the interface unit 340 of the first slave clock device 300' receives the first time synchronization request message Xsyn 1. The time processing unit 330 records the first slave clock time ST1 provided by the first clock unit 310 when the interface unit 340 receives the first time synchronization request message Xsyn12. A fourth time difference Δ T4 (i.e., a first time difference of the slave clock device) between the first master clock time MT15 and the second master clock time MT25 included in the first time synchronization request message Xsyn1 is calculated. The time processing unit 330 then calculates a fourth time ST4 of the slave clock device such that the fourth time ST4 is the first slave clock time ST12 provided by the first clock unit 310 when the interface unit 340 received the first time synchronization request message Xsyn1 (i.e., the third time of the slave clock device)) And a fourth time difference Δ T4. Mathematically representing the process by which time processing unit 340 calculates the fourth time as: st 4-MT 12+ΔT4=MT12+|MT15-MT25L. Then, the second clock unit 320 further provides a second slave clock time ST2 based on the fourth time ST 4. This process is mathematically represented as ST 2-ST 4. Hereby, a synchronization between the second slave clock time ST2 of the second clock unit 320 of the first slave clock device 300' and the second master clock time MT2 of the master clock device 200 is achieved. This step may be omitted in some other embodiments of the time synchronization method of the present application, especially in embodiments where the slave clock device does not support the generalized precision clock protocol.
Fig. 13 also shows that the first slave clock device 300 'sends a first time synchronization response message Xresp1 to the master clock device 200 for verifying the synchronization of the first slave clock device 300'. The first time synchronization response message Xresp1 comprises a second slave clock time ST2 of said first slave clock device 300' upon reception of the first time synchronization request message Xsyn1syn12And a second slave clock time ST2 of the first slave clock device 300' when transmitting the first time synchronization response message Xresp1resp1. The time processing unit 230 of the master clock device 200 receives the first time synchronization response message Xresp1 via the interface unit 240 and records the first master clock time MT1 at this timeresp21And a second master clock time MT2resp21For monitoring the synchronization between the first clock times MT1, ST 1. This step part is redundant for the synchronization of the first slave clock device 300' with the first clock time MT1, ST1 of the master clock device 200 and can therefore be omitted in some other embodiments of the time synchronization method of the present application.
The periodic synchronization between the second clock times MT2, ST2 of the master clock device 200 and the second slave clock device 300 ″ referred to in step S102 is explained with reference to fig. 14. Since the slave clock device 300 "does not support the generalized precision clock protocol, the second clock times MT2, ST2 may be synchronized based on the average time delay of messages between the master clock device 200 and the second slave clock device 300". In particular, a master clockThe interface unit 240 of the device 200 sends a second time synchronization request message Xsyn2 to the second slave clock device 300 ". The second time synchronization request message Xsyn2 includes a second master clock time MT2 provided by the second clock unit 220 when the interface unit 230 sends the second time synchronization request message Xsyn26(i.e. eighth time of master clock means) and message average delay Pdelay. The message average delay Pdelay indicates the time required for message transmission between the master clock device 200 and the slave clock device 300. When the master clock device 200 first sends a second time synchronization request message Xsyn2 to the second clock slave clock device 300 "; including the average time delay P of the messagedelayMay be a preset value, for example, 0, or may be an empirical value stored in advance by master clock device 200. The interface unit 340 of the second slave clock device 300 "receives the second time synchronization request message Xsyn 2. The time processing unit 330 records the second slave clock time ST2 provided by the second clock unit 320 when the interface unit 340 receives the second time synchronization request message Xsyn27(i.e., the ninth time of the master clock device, i.e., the seventh time of the slave clock device). The interface unit 340 then sends a corresponding second time synchronization response message Xresp2 to the master clock device 200. The second time synchronization response message Xresp2 comprises a second slave clock time ST27And a second slave clock time ST2 provided by the second clock device 320 when the interface unit 340 sends a corresponding second time synchronization response message Xresp2 to the master clock device 2008(i.e., the tenth time of the master clock device, i.e., the eighth time of the slave clock device). The interface unit 240 of the master clock device 200 receives the second time synchronization response message Xresp 2. The time processing unit 230 of the master clock device 200 records the second master clock time MT2 provided by the second clock unit 220 when the interface unit 240 receives the second time synchronization response message Xresp29(i.e., the eleventh time of the master clock device). The time processing unit 230 then bases on the second master clock time MT26Second slave clock time ST27Second slave clock time ST28And a second master clock time MT29Calculating the average time delay P of the messagedelay. The tenth time is the same as the time when the interface unit receives the second timeStep the time of the response message. This calculation, which mathematically represents the average delay of a message, is: pdelay ═ [ (MT 2)9-MT26)-(ST28-ST27)]/2. When the master clock device 200 sends the second time synchronization request message Xresp2 again, the average time delay P of the message included thereindelayIt may be the calculated average delay of the message rather than the value of, for example, 0 that was originally sent. The time processing unit 330 of the second slave clock device 300 ″ is based on the second master clock time MT26And the average time delay P of the messagedelayThe sixth time st6 of the slave clock device is calculated such that the sixth time st6 is the second master clock time MT26And the average time delay P of the messagedelayThe sum of (1). Mathematically expressing the process by which the time processing unit 330 calculates the sixth time st6 is: st6 MT26+Pdelay. Then, the second clock unit 320 provides a second slave clock time ST2 based on a sixth time ST 6. Mathematically representing the process by which the second clock unit 320 provides the second slave clock time ST2 is: ST6 is ST 2. This step may be omitted in some other embodiments of the time synchronization method of the present application, particularly in embodiments in which the slave clock device supports a generalized precision clock protocol.
Specifically, in step S103, the master clock device 200 may determine, by the time processing unit 230, whether the third pulse-per-second signal PPS3 and the third positioning data W2 corresponding to the third pulse-per-second signal PPS3 are received. When receiving the third pulse-per-second signal PPS3 and the third positioning data W3, the time processing unit 230 executes step S104. When the third pulse-per-second signal PPS3 and the third positioning data W3 are not received, the time processing unit 230 executes step S107. This step may be omitted in other embodiments of the time synchronization method of the present application.
Describing in detail the step S104 in reference to fig. 15, when the master clock device 200 receives the third pulse-per-second signal PPS3 of the satellite signal receiving device 500 (i.e., the fourth time), the time processing unit 230 records the first master clock time MT1 provided by the first clock unit 210 at this moment4. Then receives the third second pulse from the satellite signal receiving device 500In the case of the third positioning data W3 corresponding to the signal PPS3, the time processing unit 230 calculates the time T in the third positioning data W3W3With the recorded first master clock time MT14A third time difference at 3 therebetween. Subsequently, when the fourth positioning data W4 is further received from the satellite signal receiving device 500, the time processing unit 230 sets a fourth time T in the fourth positioning data W4W4A fifth time mt5 converted to a master clock means, and the fifth time mt5 is based on the fourth time TW4And said third time difference at 3. The time T in the fourth positioning data W4 is expressed mathematicallyW4This is based on the first master clock time MT14Is converted into: w4 (T)W4)→W4(mt5),mt5=TW4+ΔT3=TW4+(MT14-TW3). Thereafter, when further receiving another positioning data W4n from the satellite signal receiving apparatus 500, the time processing unit 230 repeats the above-mentioned conversion process, and the time T in the positioning data W4nW4nConversion to TW4n+ Δ T3. By analogy, the third time difference Δ T3 may be used continuously to locate the time T in the dataW4nTo time MT5 based on the first master clock time MT 1. The time-converted positioning data W4n (mt5) can be transmitted via the interface unit 240. This step may be omitted in other embodiments of the time synchronization method of the present application.
Specifically, in step S105, the master clock device 200 may determine whether the satellite signal receiving device 500 is successful through the time processing unit 230. When the satellite signal receiving apparatus 500 successfully searches for a satellite, the time processing unit 230 executes step S106. When the satellite signal receiving apparatus 500 does not successfully search for satellites, the time processing unit 230 performs step S107. This step may be omitted in other embodiments of the time synchronization method of the present application.
Step S106 is described in detail with reference to fig. 16. The satellite signal receiving apparatus 500 transmits the satellite signal Xgnss to the master clock apparatus 200. The satellite signal Xgnss has a first second pulse signal PPS1 and corresponding first positioning data W1. The first positioning data W1 has a satellite signal time Tgnss 1. In other words, the first positioningTime T in data W1W1Is Tgnss 1. The time processing unit 230 of the master clock device 200 starts counting upon reception of the first second pulse signal PPS1 and ends counting upon reception of the first positioning data W1, thereby obtaining a first time difference Δ T1 between the two receptions. The time processing unit 230 then determines the first time mt1 based on the time Tgnss1 of W1 in the first positioning data and said first time difference Δ T1. Mathematically, the process of determining the first time mt1 is: mt1 ═ Δ T1+ Tgnss 1. The time processing unit 230 transmits the determined first time MT1 to the second clock unit 220 so that the second clock unit 220 can provide the second master clock time MT2 according to the first time MT 1. In other words, the second clock time T2 is precisely synchronized with the time Tgnss1 included in the first positioning data W1 in the satellite signal in this manner. Mathematically expressing that the second clock unit 220 further provides the second master clock time MT2 as follows: MT 2-MT 1. The accuracy of such synchronization can reach 5 nanoseconds. This step may be omitted in other embodiments of the time synchronization method of the present application.
In some other embodiments of the time synchronization method of the present application, step S107 may be omitted.
In some other embodiments of the time synchronization method of the present application, step S108 may be omitted.
It should be understood that in the above description, reference numerals referring to steps such as S101, S102 … …, etc. do not necessarily indicate that the steps are performed in this order, and the order of the preceding and following steps may be interchanged or performed simultaneously where permitted. For example, step S104 involves the master clock device using a first master clock time to convert the time in the positioning data, and step S106 involves the synchronization of a second clock time in the master clock device with the satellite signal time, independent of each other, so that both can be performed simultaneously or the order of the two can be interchanged. For another example, steps S105 and S106 may be performed after step S101 to precisely synchronize the second clock time in the master clock device with the satellite signal time, and then step S102 may be performed to enable the master clock device to provide the precise second clock time to the slave clock device.
Further, the step of calculating the transmission delay of the second positioning data W2 based on the second master clock time MT2 is not included in the time synchronization method embodiment shown in fig. 9. The step of calculating the transmission delay of the positioning data may be performed after step S106. In this step, the time processing unit 230 of the master clock device 200 calculates the time T in the received positioning data W2W2And a second master clock time MT2 provided by a second clock unit 220 at a third time3A second time difference Δ T2 therebetween as a transmission delay of the positioning data W2. The manner in which the transmission delay is determined in this way can likewise be used for the transmission delay of positioning data of the navigation system (for example the positioning data W41, W42,. and W4x mentioned above) for the verification and monitoring of the time transitions of these positioning data.
< computing device implementation >
Referring to FIG. 17, one embodiment of a computing device of the present application is schematically illustrated. In this embodiment, computing device 1500 includes: processor 1510, memory 1520, communications interface 1530, and bus 1540.
It is to be appreciated that the communication interface 1530 in the computing device 1500 illustrated in FIG. 17 can be utilized to communicate with other devices.
The processor 1510 may be connected to the memory 1520. The memory 1520 may be used to store the program codes and data. Accordingly, the memory 1520 may be a storage unit inside the processor 1510, an external storage unit independent of the processor 1510, or a component including a storage unit inside the processor 1510 and an external storage unit independent of the processor 1510.
Optionally, computing device 1500 may also include a bus 1540. The memory 1520 and the communication interface 1530 may be connected to the processor 1510 via a bus 1540. Bus 1540 can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 1540 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one line is shown in FIG. 17, but it is not intended that there be only one bus or one type of bus.
It should be understood that, in the embodiment of the present application, the processor 1510 may adopt a Central Processing Unit (CPU). The processor may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. Or the processor 1510 adopts one or more integrated circuits for executing related programs to implement the technical solutions provided in the embodiments of the present application.
The memory 1520, which may include both read-only memory and random access memory, provides instructions and data to the processor 1510. A portion of the processor 1510 may also include non-volatile random access memory. For example, the processor 1510 may also store information of the device type.
When the computing device 1500 is running, the processor 1510 executes computer-executable instructions in the memory 1520 to perform the operational steps of any of the time synchronization methods described above as being performed by a master clock device or by a slave clock device. The time synchronization method performed by the master clock device may be understood as any one of the methods of the fourth aspect performed by the master clock device. Similarly, the time synchronization method performed by the slave clock device may be understood as any one of the methods of the fifth aspect performed by the slave clock device.
It should be understood that the computing device 1500 according to the embodiments of the present application may correspond to a corresponding main body for executing the method according to the embodiments of the present application, and the above and other operations and/or functions of each module in the computing device 1500 are respectively for implementing corresponding processes of each method of the embodiments, and are not described herein again for brevity.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus, system, and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative. The division of the unit is only one logic function division, and other division modes can be provided in actual implementation. Multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the connections shown or discussed as being direct or communicative may be indirect or communicative with respect to each other through some interfaces, devices or units, and may be electrical, mechanical or other.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, that is, may be located in one place, for example, the time processing unit and the interface unit may be integrated on one chip, or may also be distributed on a plurality of network units, and some or all of the units may be selected according to actual needs to implement the purpose of the embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated into one control unit, each unit may exist alone physically, or two or more units may be integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
< computer-readable storage Medium embodiment >
Embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor performs the time synchronization method performed by a master clock apparatus or a slave clock apparatus according to the present application. The time synchronization method performed by the master clock device may be understood as any one of the methods of the fourth aspect performed by the master clock device. Similarly, the time synchronization method performed by the slave clock device may be understood as any one of the methods of the fifth aspect performed by the slave clock device. Alternatively, a computer readable storage medium stores a program comprising any of the methods of the fourth aspect, which is executed by a first processor, and any of the methods of the fifth aspect, which is executed by a second processor.
The computer storage media of embodiments of the present application may take any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. Computer-readable media may include computer storage media (or non-transitory media) and signal media (or transitory media). A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, a cloud (cloud), or any medium that can be used to store the desired information and that can be accessed by the computer. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
Note that the foregoing is only the preferred embodiment of the present application and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention.

Claims (40)

1. A master clock apparatus, comprising:
a first clock unit for providing a first master clock time based on the real-time clock signal; and
a second clock unit for providing a second master clock time based on a time included in the first positioning data in the received satellite signal when the satellite signal is received by the master clock device, and providing the second master clock time based on the real-time clock signal when the satellite signal is not received by the master clock device.
2. The master clock apparatus of claim 1, further comprising:
a time processing unit connected to the second clock unit, for:
determining a first time difference, wherein the first time difference is a time difference between a first time and a second time, the first time is a time when the master clock device receives a first second pulse signal, the second time is a time when the master clock device receives the first positioning data, and the first second pulse signal and the first positioning data are included in the received satellite signal and correspond to each other; and the number of the first and second groups,
determining a first time based on a time included in the first positioning data and the first time difference,
wherein the second clock unit is further to provide the second master clock time based on the first time.
3. Master clock device according to claim 2,
the time processing unit is further configured to calculate a second time difference as a transmission delay of second positioning data received by the master clock device,
wherein the second time difference is a time difference between a time comprised by the second positioning data and a second time, the second time being the second master clock time provided by the second clock unit at a third moment in time, the third moment in time being a moment in time at which the master clock device receives the second positioning data.
4. The master clock apparatus of claim 1, further comprising:
a time processing unit connected to the first clock unit, for:
recording a third time, the third time being a first master clock time provided by the first clock unit at a fourth time, the fourth time being a time at which a third second pulse signal is received by the master clock device;
calculating a third time difference, which is a time difference between a time included in third positioning data received by the master clock device and the third time, the third positioning data and the third second pulse signal corresponding to each other; and the number of the first and second groups,
converting a fourth time comprised by fourth positioning data to a fifth time, the fourth positioning data being positioning data received by the master clock device after the third positioning data, the fifth time being determined based on the fourth time and the third time difference.
5. The master clock apparatus of claim 1, further comprising:
and the interface unit is connected with the first clock unit and the second clock unit and used for providing a first master clock time and a second master clock time for the slave clock device.
6. The master clock apparatus of claim 5, wherein the interface unit is further configured to transmit the first master clock time to the slave clock apparatus via a generalized precision clock protocol.
7. Master clock device according to claim 6,
the interface unit is further configured to periodically send a first time synchronization request message to the slave clock device over the generalized precision clock protocol,
wherein the first time synchronization request message includes a sixth time and a seventh time, the sixth time being the first master clock time provided by the first clock unit at a fifth time, the seventh time being the second master clock time provided by the second clock unit at the fifth time, the fifth time being a time at which the interface unit transmits the first time synchronization request message.
8. Master clock device according to claim 5,
the interface unit is further configured to periodically send a second time synchronization request message to the slave clock device,
wherein the second time synchronization request message comprises an eighth time and a message average delay, the eighth time is a second master clock time provided by the second clock unit at a sixth time, the sixth time is a time at which the interface unit transmits the second time synchronization request message, and the message average delay indicates a time required for message transmission between the master clock device and the slave clock device.
9. Master clock device according to claim 8,
the interface unit is further configured to receive a second time synchronization response message,
wherein the second time synchronization response message includes a ninth time and a tenth time, the ninth time is a second slave clock time of the slave clock apparatus at a seventh time, the tenth time is a second slave clock time of the slave clock apparatus at an eighth time, the seventh time is a time when the slave clock apparatus receives the second time synchronization request message, and the eighth time is a time when the slave clock apparatus transmits the second time synchronization response message.
10. The master clock apparatus of claim 9, further comprising:
a time processing unit connected to the interface unit and configured to:
recording an eleventh time, which is a second master clock time provided by the second clock unit at a ninth time, which is a time when the second time synchronization response message is received by the interface unit; and the number of the first and second groups,
calculating the message average delay based on the eighth time, the ninth time, the tenth time, and the eleventh time.
11. A slave clock apparatus, comprising:
an interface unit for receiving a first master clock time and a second master clock time from a master clock device;
a first clock unit for providing a first slave clock time, the first slave clock time being synchronized with the first master clock time; and
a second clock unit for providing a second slave clock time, the second slave clock time being synchronized with the second master clock time;
wherein the first master clock time is based on a real-time clock signal,
the second master clock time is based on a time included in positioning data in the satellite signal when the master clock device receives the satellite signal, and the second master clock time is based on the real-time clock signal when the master clock device does not receive the satellite signal.
12. The slave clock apparatus of claim 11,
the interface unit is further to receive the first master clock time from the master clock device over a generalized precision clock protocol.
13. The slave clock apparatus of claim 12,
the interface unit is further configured to receive a first time synchronization request message from the master clock device,
wherein the first time synchronization request message comprises a first time and a second time, the first time and the second time being the first master clock time and the second master clock time, respectively, provided by the master clock device at a first time instant, the first time instant being a time instant at which the master clock device sends the first time synchronization request message.
14. The slave clock apparatus of claim 13, further comprising:
a time processing unit connected with the interface unit and used for:
calculating a first time difference, the first time difference being a time difference between the first time and the second time; and
calculating a fourth time based on the first time difference and a third time, wherein the third time is a first slave clock time provided by the first clock unit at a second time instant, the second time instant being a time instant at which the first time synchronization request message is received by the interface unit,
wherein the second clock unit is further to provide the second slave clock time based on the fourth time.
15. The slave clock apparatus of claim 11,
the interface unit is further configured to receive a second time synchronization request message from the master clock device,
wherein the second time synchronization request message comprises a fifth time and a message average delay, the fifth time is the second master clock time provided by the master clock device at a third time, the third time is the time at which the master clock device transmits the second time synchronization request message, and the message average delay indicates the time required for message transmission between the master clock device and the slave clock device.
16. The slave clock apparatus of claim 15, further comprising:
a time processing unit connected with the interface unit and used for calculating a sixth time based on the fifth time and the average message delay,
the second clock unit is further to provide the second slave clock time based on the sixth time.
17. The slave clock apparatus of claim 16,
the interface unit is further configured to send a second time synchronization response message to the master clock device,
wherein the second time synchronization response message includes a seventh time and an eighth time, the seventh time is the second slave clock time provided by the second time unit at a fourth time, the eighth time is the second slave clock time provided by the second time unit at a fifth time, the fourth time is a time when the interface unit receives the second time synchronization request message, and the fifth time is a time when the interface unit transmits the second time synchronization response message.
18. A time system, comprising:
the master clock device of any one of claims 1-10;
a real-time clock signal source for providing a real-time clock signal to the master clock device; and
satellite signal receiving means for providing the received satellite signal to the master clock means when the satellite signal is received.
19. The time system of claim 18, further comprising: a slave clock device according to any one of claims 11-17.
20. A method of clock synchronization, comprising:
the master clock device provides a first master clock time based on the real-time clock signal; and
the master clock means provides a second master clock time based on a time included in first positioning data in the received satellite signal when the satellite signal is received, and provides the second master clock time based on the real-time clock signal when the satellite signal is not received.
21. The method of claim 20, wherein providing a second master clock time based on the time included in the first positioning data in the received satellite signal comprises:
the master clock device determining a first time difference, wherein the first time difference is a time difference between a first time and a second time, the first time is a time when the master clock device receives a first second pulse signal, the second time is a time when the master clock device receives the first positioning data, and the first second pulse signal and the first positioning data are included in the satellite signal and correspond to each other;
the master clock device determines a first time based on the time included in the first positioning data and the first time difference; and
the master clock device provides the second master clock time based on the first time.
22. The method of claim 21, further comprising:
the master clock device calculates a second time difference as the transmission delay of second positioning data received by the master clock device;
wherein the second time difference is a time difference between a time included in the second positioning data and a second time, the second time being the second master clock time provided by the master clock apparatus at a third time, the third time being a time at which the second positioning data is received by the master clock apparatus.
23. The method of claim 20, further comprising:
the master clock device records a third time, wherein the third time is a first master clock time provided by the master clock device at a fourth time, and the fourth time is a time when a third second pulse signal is received by the master clock device;
the master clock device calculates a third time difference, which is a time difference between a time included in third positioning data received by the master clock device and the third time, the third positioning data and the third second pulse signal corresponding to each other; and the number of the first and second groups,
the master clock device converts a fourth time included in fourth positioning data into a fifth time, the fourth positioning data being positioning data received by the master clock device after the third positioning data, the fifth time being determined based on the fourth time and the third time difference.
24. The method of claim 20, further comprising:
the master clock device provides a first master clock time and a second master clock time to a slave clock device.
25. The method of claim 24, wherein the master clock device providing a first master clock time and a second master clock time to a slave clock device comprises:
the master clock device sends the first master clock time to the slave clock device via a generalized precision clock protocol.
26. The method of claim 25, wherein the master clock device providing the first master clock time and the second master clock time to the slave clock device further comprises:
the master clock device periodically sends a first time synchronization request message to the slave clock device over the generalized precision clock protocol,
wherein the first time synchronization request message includes a sixth time and a seventh time, the sixth time being the first master clock time provided by the master clock apparatus at a fifth time, the seventh time being the second master clock time provided by the master clock apparatus at the fifth time, the fifth time being a time at which the interface unit transmits the first time synchronization request message.
27. The method of claim 24, wherein the master clock device providing a first master clock time and a second master clock time to a slave clock device comprises:
the master clock device periodically sends a second time synchronization request message to the slave clock device;
wherein the second time synchronization request message comprises an eighth time and a message average delay, the eighth time is a second master clock time provided by the master clock device at a sixth time, the sixth time is a time at which the master clock device transmits the second time synchronization request message, and the message average delay indicates a time required for message transmission between the master clock device and the slave clock device.
28. The method of claim 27, wherein the master clock device providing a first master clock time and a second master clock time to a slave clock device further comprises:
the master clock device receiving a second time synchronization response message;
wherein the second time synchronization response message includes a ninth time and a tenth time, the ninth time being a second slave clock time provided by the slave clock device at a seventh time, the tenth time being a second slave clock time provided by the slave clock device at an eighth time, the seventh time being a time at which the slave clock device receives the second time synchronization request message, the eighth time being a time at which the slave clock device transmits the second time synchronization response message.
29. The method of claim 28, wherein the master clock device providing a first master clock time and a second master clock time to a slave clock device further comprises:
the master clock device records an eleventh time, which is a second master clock time provided by the master clock device at a ninth time, which is a time when the second time synchronization response message is received by the master clock device; and the number of the first and second groups,
the master clock device calculates the message average delay based on the eighth time, the ninth time, the tenth time, and the eleventh time.
30. A method of clock synchronization, comprising:
the slave clock device receives a first master clock time and a second master clock time from the master clock device;
the slave clock device providing a first slave clock time, the first slave clock time being synchronized with the first master clock time; and
the slave clock device providing a second slave clock time, the second slave clock time synchronized with the second master clock time;
wherein the first master clock time is based on a real-time clock signal,
the second master clock time is based on a time included in positioning data in the satellite signal when the master clock device receives the satellite signal, and is based on the real-time clock signal when the master clock device does not receive the satellite signal.
31. The method of claim 30, wherein receiving the first master clock time and the second master clock time from the master clock device by the slave clock device comprises:
the slave clock device receives the first master clock time from the master clock device via a generalized precision clock protocol.
32. The method of claim 31, wherein receiving the first master clock time and the second master clock time from the master clock device by the slave clock device further comprises:
the slave clock device receives a first time synchronization request message from the master clock device,
wherein the first time synchronization request message includes a first time and a second time, the first time and the second time being the first master clock time and the second master clock time, respectively, provided by the master clock apparatus at a first time, the first time being a time at which the master clock apparatus transmits the first time synchronization request message.
33. The method of claim 32, wherein the slave clock device providing a second slave clock time comprises:
the slave clock device calculating a first time difference, the first time difference being a time difference between the first time and the second time;
the slave clock device calculating a fourth time based on the first time difference and a third time, wherein the third time is a first slave clock time provided by the slave clock device at a second time instant, and the second time instant is a time instant at which the slave clock device receives the first time synchronization request message; and
the slave clock device provides the second slave clock time based on the fourth time.
34. The method of claim 30, wherein receiving the first master clock time and the second master clock time from the master clock device by the slave clock device comprises:
the slave clock device receiving a second time synchronization request message from the master clock device;
wherein the second time synchronization request message comprises a fifth time and a message average delay, the fifth time is the second master clock time provided by the master clock device at a third time, the third time is the time at which the master clock device transmits the second time synchronization request message, and the message average delay indicates the time required for message transmission between the master clock device and the slave clock device.
35. The method of claim 34, wherein the slave clock device providing a second slave clock time comprises:
the slave clock device calculates a sixth time based on the fifth time and the message average time delay; and
the slave clock device provides the second slave clock time based on the sixth time.
36. The method of claim 35, further comprising:
the slave clock device sends a second time synchronization response message to the master clock device;
wherein the second time synchronization response message includes a seventh time and an eighth time, the seventh time is the second slave clock time provided by the slave clock device at a fourth time, the eighth time is the second slave clock time provided by the slave clock device at a fifth time, the fourth time is a time when the slave clock device receives the second time synchronization request message, and the fifth time is a time when the slave clock device transmits the second time synchronization response message.
37. A computing device, comprising:
a bus;
a communication interface connected to the bus;
at least one first processor connected with the bus; and
at least one memory coupled to the bus and storing program instructions that, when executed by the at least one first processor, cause the at least one first processor to perform the method master clock apparatus of any of claims 20-29.
38. A computing device, comprising:
a bus;
a communication interface connected to the bus;
at least one second processor connected with the bus; and
at least one memory coupled with the bus and storing program instructions that, when executed by the at least one second processor, cause the at least one second processor to perform the method slave clock apparatus of any of claims 30-36.
39. A computer readable storage medium having stored thereon program instructions that, when executed by a first computer, cause the first computer to perform the method master clock apparatus of any of claims 20 to 29.
40. A computer readable storage medium having stored thereon program instructions that, when executed by a second computer, cause the second computer to perform the method of any of claims 30 to 36.
CN202011501257.7A 2020-12-18 2020-12-18 Master clock device, slave clock device and time synchronization method Pending CN114647179A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011501257.7A CN114647179A (en) 2020-12-18 2020-12-18 Master clock device, slave clock device and time synchronization method
PCT/CN2021/124454 WO2022127337A1 (en) 2020-12-18 2021-10-18 Master clock device, slave clock device and time synchronization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011501257.7A CN114647179A (en) 2020-12-18 2020-12-18 Master clock device, slave clock device and time synchronization method

Publications (1)

Publication Number Publication Date
CN114647179A true CN114647179A (en) 2022-06-21

Family

ID=81990594

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011501257.7A Pending CN114647179A (en) 2020-12-18 2020-12-18 Master clock device, slave clock device and time synchronization method

Country Status (2)

Country Link
CN (1) CN114647179A (en)
WO (1) WO2022127337A1 (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090006448A (en) * 2007-07-11 2009-01-15 한국전자통신연구원 Vehicle clock synchronization using a navigation device
CN103546268A (en) * 2013-10-15 2014-01-29 瑞斯康达科技发展股份有限公司 Method and device for compensating system time
CN103716107A (en) * 2012-10-01 2014-04-09 英特尔移动通信有限责任公司 Clock distribution system and method
CN103913753A (en) * 2014-04-14 2014-07-09 杨坤 High-precision timing system and method with navigation satellite adopted
US20150134764A1 (en) * 2011-11-30 2015-05-14 Josef Noebauer Method for synchronizing clocks in nodes of a vehicle network and node designed to perform the method
CN108107711A (en) * 2017-12-19 2018-06-01 江汉大学 A kind of clock source device
CN108628156A (en) * 2018-03-15 2018-10-09 中国人民解放军63895部队 A kind of high precision computation machine serial ports time service method
CN110620632A (en) * 2019-09-12 2019-12-27 华为技术有限公司 Time synchronization method and device
CN111381487A (en) * 2018-12-29 2020-07-07 阿里巴巴集团控股有限公司 Multi-sensor synchronous time service system, method and device and electronic equipment
CN114641951A (en) * 2019-11-20 2022-06-17 华为技术有限公司 Method and device for providing time source for automatic driving

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8792380B2 (en) * 2012-08-24 2014-07-29 Accedian Networks Inc. System for establishing and maintaining a clock reference indicating one-way latency in a data network
CN106712888A (en) * 2016-12-30 2017-05-24 江汉大学 High-stability time base signal output system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090006448A (en) * 2007-07-11 2009-01-15 한국전자통신연구원 Vehicle clock synchronization using a navigation device
US20150134764A1 (en) * 2011-11-30 2015-05-14 Josef Noebauer Method for synchronizing clocks in nodes of a vehicle network and node designed to perform the method
CN103716107A (en) * 2012-10-01 2014-04-09 英特尔移动通信有限责任公司 Clock distribution system and method
CN103546268A (en) * 2013-10-15 2014-01-29 瑞斯康达科技发展股份有限公司 Method and device for compensating system time
CN103913753A (en) * 2014-04-14 2014-07-09 杨坤 High-precision timing system and method with navigation satellite adopted
CN108107711A (en) * 2017-12-19 2018-06-01 江汉大学 A kind of clock source device
CN108628156A (en) * 2018-03-15 2018-10-09 中国人民解放军63895部队 A kind of high precision computation machine serial ports time service method
CN111381487A (en) * 2018-12-29 2020-07-07 阿里巴巴集团控股有限公司 Multi-sensor synchronous time service system, method and device and electronic equipment
CN110620632A (en) * 2019-09-12 2019-12-27 华为技术有限公司 Time synchronization method and device
CN114641951A (en) * 2019-11-20 2022-06-17 华为技术有限公司 Method and device for providing time source for automatic driving

Also Published As

Publication number Publication date
WO2022127337A1 (en) 2022-06-23

Similar Documents

Publication Publication Date Title
US10788841B2 (en) Hardware centralized time synchronization hub for an autonomous driving vehicle
CN111381487B (en) Multi-sensor synchronous time service system, method and device and electronic equipment
US10816995B2 (en) GPS based high precision timestamp generation circuit for an autonomous driving vehicle
EP3613648B1 (en) A time source recovery system for an autonomous driving vehicle
CN110620632B (en) Time synchronization method and device
EP3614222B1 (en) A time source ranking system for an autonomous driving vehicle
US11029165B2 (en) Sensor integration and synchronization unit for an autonomous driving vehicle
EP3891474B1 (en) Synchronizing sensors of autonomous driving vehicles
CN103797735A (en) Method and device for synchronizing network subscribers in an on-board network of a vehicle
KR20210106460A (en) Validation of Timing of Sensors Used in Autonomous Vehicles
CN111600670B (en) Inductive data calculation control method and time service device
CN114614934A (en) Time synchronization triggering device and method
CN113992469A (en) Data fusion method and device, electronic equipment and computer readable medium
CN114647179A (en) Master clock device, slave clock device and time synchronization method
CN116830689A (en) Time synchronization method, device and storage medium
CN113890665A (en) Time synchronization method, system, storage medium and processor
CN113342899B (en) Method, device and system for synchronously acquiring data
EP3995781A1 (en) Mobile apparatus, method and computer program product for determining a travelling route of a user
CN115685270A (en) Method and device for providing time service, electronic equipment and FPGA chip
CN115357475A (en) Data processing method, device, equipment, simulation platform and storage medium
CN116743300A (en) Multi-sensor clock synchronization method and system
KR20170050977A (en) Apparatus and method for generating gps signal

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20220621

WD01 Invention patent application deemed withdrawn after publication