CN115276866B - Clock synchronization method and device of intelligent driving system - Google Patents
Clock synchronization method and device of intelligent driving system Download PDFInfo
- Publication number
- CN115276866B CN115276866B CN202210622426.5A CN202210622426A CN115276866B CN 115276866 B CN115276866 B CN 115276866B CN 202210622426 A CN202210622426 A CN 202210622426A CN 115276866 B CN115276866 B CN 115276866B
- Authority
- CN
- China
- Prior art keywords
- time
- slave node
- clock
- ptp
- instance
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 230000005540 biological transmission Effects 0.000 claims abstract description 50
- 238000005259 measurement Methods 0.000 claims description 19
- 230000015654 memory Effects 0.000 claims description 18
- 230000007246 mechanism Effects 0.000 claims description 17
- 230000000977 initiatory effect Effects 0.000 claims description 6
- 230000001360 synchronised effect Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000004590 computer program Methods 0.000 description 4
- 230000005291 magnetic effect Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000013078 crystal Substances 0.000 description 1
- 239000003999 initiator Substances 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 230000003936 working memory Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L2012/40208—Bus networks characterized by the use of a particular bus standard
- H04L2012/40215—Controller Area Network CAN
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
The invention aims to provide a clock synchronization method and device of an intelligent driving system, which CAN enable each ECU to provide an absolute Time value with relative accuracy and sufficient precision by a consistent Global clock Global Time in a CAN clock synchronization mode, an Ethernet clock synchronization mode and a multi-phase clock synchronization mode, and synchronize the absolute Time value to each ECU. The invention unifies the clocks of all the sensors to the global clock, thereby avoiding the influence of transmission delay/other delay on the real-time performance and effectiveness of the data.
Description
Technical Field
The invention relates to a clock synchronization method and device of an intelligent driving system.
Background
Various sensors can be configured in the intelligent driving system according to different sensing distances and sensing requirements, including millimeter wave radar, laser radar, cameras (cameras), GNSS, IMU and the like, but due to different communication modes of each sensor, the frequency of a basic clock is different, so that the local clocks of the sensors are different when each sensor receives the same frame of message, and the corresponding judgment made by the intelligent driving domain controller at the same moment is inaccurate.
For example, a perception module within the intelligent driving system detects an obstacle, and a control decision module needs to know when the obstacle is detected, and thus respond. If the sensing module and the control module are both in one controller, the delay is not very large; however, if the sensing module and the control module are distributed in different controllers, the time stamp carried by the obstacle information sent by the sensing module is too far away from the actually detected time, and the control modules respond, so that the automobile may have collided with the obstacle.
Disclosure of Invention
The invention aims to provide a clock synchronization method and device of an intelligent driving system.
The invention provides a clock synchronization method of an intelligent driving system, which comprises the following steps:
The transmitting end transmits a second part s (t 0 r) in the time information t0r to the receiving end through the SYNC message;
The receiving end receives the SYNC message and detects the time point t2r actually received by the SYNC message by using a CAN bottom layer mechanism;
the transmitting end transmits an offset t4r between a second part t0r in time information and a time point t1r of actual transmission of the SYNC message through the FUP message;
The receiving end calculates a corresponding global clock based on a second part t0r, an offset t4r and a time point t2r actually received by the SYNC message in the time information of the SYNC message.
Further, in the above method, the receiving end calculates a corresponding global clock based on the second portion t0r, the offset t4r and the time point t2r actually received by the SYNC message in the time information of the SYNC message, including:
The corresponding global clock GlobalTime (t 3 r) is calculated based on the following formula:
GlobalTime (t 3 r) = (t 3r-t2 r) +s (tr 0) +t4r, where t3r represents any time based on the CAN TIMESLAVE local clock entity and s (t 0 r) represents the fraction of seconds in t0 r.
Further, in the above method, the method further includes:
The clock information of the master node is sent to each slave node by means of an Ethernet data cable through a data packet carrying a time stamp;
the slave node calculates the time offset between the master node and the slave node according to the received clock information, and adjusts the local clock of the slave node according to the time offset between the master node and the slave node.
Further, in the above method, the slave node calculates a time offset between the master node and the slave node according to the received clock information, including:
initiating a delay measurement request from a slave node to a master node at a time t 1;
The master node records the receiving time t 2 of the delay measurement request;
The master node sends feedback information to the slave node at the time t 3 based on the received delay measurement request;
Recording the receiving time t 4 of the feedback information by the slave node;
Based on the times t 1、t2、t3 and t 4, a transmission time delay D between the master node and the slave node is calculated.
Further, in the above method, based on the times t 1、t2、t3 and t 4, calculating the transmission time delay D between the master node and the slave node includes:
The transmission time delay D between the master node and the slave node is calculated based on the following formula:
。
Further, in the above method, adjusting the local clock of the slave node according to the time offset between the master node and the slave node includes:
the local clock of the slave node is adjusted according to the transmission time delay D between the master node and the slave node.
Further, in the above method, adjusting the local clock of the slave node according to the transmission time delay D between the master node and the slave node includes:
the PTP instance i-1 sends a Sync synchronization message to the PTP instance i at time t s,i-1; at a time subsequent to t s,i-1, PTP instance i-1 sends an associated Follow_Up message to PTP instance i, the Follow_Up message comprising: preciseOriginTimestamp, correctionField i-1 and rateRatio i;
The corresponding GM master clock time GlobalTime (t i) for any instant t i of PTP instance i is calculated based on the following formula:
GlobalTime(ti)=preciseOriginTimestamp+
correctionFieldi-1+Di+(ti-tr,i)*rateRatioi;
Wherein rateRatio i represents the ratio of GRANDMASTER clock frequency to LocalClock entity frequency of PTP instance i;
preciseOriginTimestamp denotes a time when the synchronization information is initially transmitted GRANDMASTER CLOCK;
correctionField i-1 represents the difference between the synchronization times t s,i-1 and preciseOriginTimestamp when the Sync message is sent, and t s,i-1 represents the time when the PTP instance i-1 sends the synchronization message to the PTP instance i;
t i represents the time to solve; t r,i represents the time when the PTP instance i receives the synchronization message from PTP instance i-1;
D i represents the propagation time delay between the master and slave at time t r,i, PTP instance i-1 being the master and PTP instance i being the slave.
Further, in the above method, after the corresponding GM master clock time GlobalTime (t i) of any time t i of the PTP instance i is calculated based on the following formula, it further includes:
The PTP instance i sends a Sync synchronization message to the PTP instance i+1 at time t s,i; at a time after t s,i-1, PTP instance i sends an associated follow_up message to PTP instance i+1, said follow_up message comprising: preciseOriginTimestamp, correctionField i and rateRatio i+1;
GM master clock time GlobalTime (t i) corresponding to any time t i+1 of PTP instance i+1 is calculated based on the following formula:
GlobalTime(ti+1)=preciseOriginTimestamp+correctionFieldi+Di+1+(ti+1-tr,i+1)*rateRatioi+1;
Wherein rateRatio i+1 represents the ratio of GRANDMASTER clock frequency to LocalClock entity frequency of PTP instance i+1;
preciseOriginTimestamp denotes a time when the synchronization information is initially transmitted GRANDMASTER CLOCK;
correctionField i1 represents the difference between the synchronization times t s,i and preciseOriginTimestamp when the Sync message is sent, and t s,i represents the time when the PTP instance i sends the synchronization message to PTP instance i+1;
t i+1 represents the next time to solve for t i to solve for; t r,i+1 represents the time when the PTP instance i+1 receives the synchronization message from PTP instance i;
D i represents the transmission time delay between the master node and the slave node at time t r,i+1, when PTP instance i is the master node and PTP instance i+1 is the slave node.
Further, in the above method, the method further includes:
In a multi-camera system, a plurality of deserializers share the same clock source to provide a unified time reference for a system on a chip transmitting data to an IPD controller; while the deserializer communicates the clock source to each camera via the control link.
According to another aspect of the present invention, there is also provided a clock synchronization apparatus of an intelligent driving system, including:
The sending end is used for sending a second part s (t 0 r) in the time information t0r to the receiving end through the SYNC message; the transmitting end transmits an offset t4r between a second part t0r in time information and a time point t1r of actual transmission of the SYNC message through the FUP message;
The receiving end is used for receiving the SYNC message and detecting the time point t2r actually received by the SYNC message by using a CAN bottom layer mechanism; the receiving end calculates a corresponding global clock based on a second part t0r, an offset t4r and a time point t2r actually received by the SYNC message in the time information of the SYNC message.
According to another aspect of the present invention, there is also provided a computing-based apparatus, including:
A processor; and
A memory arranged to store computer executable instructions that, when executed, cause the processor to:
The transmitting end transmits a second part s (t 0 r) of the time information t0r to the receiving end through the SYNC message;
The receiving end receives the SYNC message and detects the time point t2r actually received by the SYNC message by using a CAN bottom layer mechanism;
the transmitting end transmits an offset t4r between a second part t0r in time information and a time point t1r of actual transmission of the SYNC message through the FUP message;
The receiving end calculates a corresponding global clock based on a second part t0r, an offset t4r and a time point t2r actually received by the SYNC message in the time information of the SYNC message.
According to another aspect of the present invention, there is also provided a computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
the transmitting end transmits a second part s (t 0 r) t0r in the time information t0r to the receiving end through the SYNC message;
The receiving end receives the SYNC message and detects the time point t2r actually received by the SYNC message by using a CAN bottom layer mechanism;
the transmitting end transmits an offset t4r between a second part t0r in time information and a time point t1r of actual transmission of the SYNC message through the FUP message;
The receiving end calculates a corresponding global clock based on a second part t0r, an offset t4r and a time point t2r actually received by the SYNC message in the time information of the SYNC message.
The invention CAN realize that a consistent Global clock Global Time (GT) provides absolute Time values which are relatively accurate and have enough precision among various ECUs (Electronic Control Unit) by means of CAN clock synchronization, ethernet clock synchronization and multi-camera clock synchronization, and synchronize the absolute Time values to the ECUs. The invention unifies the clocks of all the sensors to the global clock, thereby avoiding the influence of transmission delay/other delay on the real-time performance and effectiveness of the data.
Drawings
FIG. 1 is a system configuration diagram showing a clock synchronization method of an intelligent driving system according to an embodiment of the present invention;
FIG. 2 shows a schematic diagram of CAN clock synchronization in accordance with an embodiment of the invention;
fig. 3 shows a schematic diagram of the transmission time delay in Ethernet clock synchronization according to an embodiment of the present invention;
Fig. 4 shows a schematic diagram of calculating clock synchronization parameters in Ethernet clock synchronization according to an embodiment of the present invention;
fig. 5 shows a schematic diagram of multi-camera clock synchronization in accordance with an embodiment of the invention.
Detailed Description
The invention is described in further detail below with reference to the accompanying drawings.
In one exemplary configuration of the application, the terminal, the device of the service network, and the trusted party each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer readable media, as defined herein, does not include non-transitory computer readable media (transmission media), such as modulated data signals and carrier waves.
As shown in fig. 2, the present invention provides a clock synchronization method of an intelligent driving system, including:
Step S11, a transmitting end (CAN TIME MASTER) transmits a second part S (t 0 r) in time information t0r to a receiving end through a SYNC message;
step S12, a receiving end (CAN TIME SLAVE) receives the SYNC message and detects a time point t2r actually received by the SYNC message by using a CAN bottom layer mechanism;
step S13, the transmitting end transmits an offset t4r between a second part t0r in time information and a time point t1r of actual transmission of the SYNC message through the FUP message;
In step S14, the receiving end calculates the corresponding global clock based on the second portion t0r, the offset t4r and the time point t2r actually received by the SYNC message in the time information in the SYNC message.
Here, the present invention can realize that a consistent Global clock Global Time (GT) is provided between each ECU (Electronic Control Unit, electronic controller unit) to provide an absolute Time value that is relatively accurate and precise enough, and the Time value is synchronized to each ECU. The invention unifies the clocks of all the sensors to the global clock, thereby avoiding the influence of transmission delay/other delay on the real-time performance and effectiveness of the data.
The communication mode of the transmitting end such as millimeter wave radar is CAN/CANFD mode, and the synchronous mode of the receiving end such as IPD to the millimeter wave radar is clock synchronization based on CAN. As shown in fig. 1, the millimeter wave radar on the vehicle may include: front left millimeter wave radar, rear left millimeter wave radar, front right millimeter wave radar, rear right millimeter wave radar, and forward millimeter wave radar.
In fig. 1, TG is a time gateway (TIME GATEWAY); GM is Global clock (Global Master); TM is a master clock (TIME MASTER); TS is the slave clock (TIME SLAVE).
The method specifically adopts a two-step mechanism:
In the first step, in the first broadcast message (i.e., SYNC message), a second portion (t 0 r) of the time information is transmitted. The sender ECU, TIME MASTER, uses a CAN bottom layer mechanism, such as "CAN transmission acknowledgement", to detect the time point t1r when the SYNC message is actually transmitted, and makes a time stamp. The receiving end ECU is TIME SLAVE, receives the SYNC message and uses a CAN bottom layer mechanism, such as 'CAN receiving indication', to detect the time point t2r actually received by the SYNC message and marks a time stamp;
In the second step, TIME MASTER sends an offset t4r between the time information t0r transmitted in the previous SYNC message and the actually detected transmission time t1r in the second broadcast message (i.e., FUP message). FUP messages do not use a timestamp, either at the sender or at the receiver.
The receiving end TIME SLAVE combines the information in the SYNC and FUP messages, and combines with the t2r of the previously received SYNC message, and calculates the global clock through GlobalTime (t 3 r) calculation formula.
As shown in fig. 2, in an embodiment of a clock synchronization method of an intelligent driving system of the present invention, step S15, a receiving end calculates a corresponding global clock based on a second portion t0r in time information in a SYNC message, an offset t4r, and a time point t2r actually received by the SYNC message, including:
The corresponding global clock GlobalTime (t 3 r) is calculated based on the following formula:
GlobalTime (t 3 r) = (t 3r-t2 r) +s (tr 0) +t4r= (t 3r-t2 r) +t1r, where t3r represents any time based on the CAN TIMESLAVE local clock entity and s (t 0 r) represents the fraction of seconds in t0 r.
Here, t0r is a time (i.e., GM time) at which synchronization is desired. the second part (s (t 0 r)) in t0r is put in the SYNC message to be sent out;
t1r is the actual transmit time captured by the transmission acknowledgment mechanism;
t2r is the time of receiving the Sync message captured by the receiving indication mechanism;
t3r is any time based on CAN TIMESLAVE local clock entities.
t4r=t1r-s(t0r)。
The global clock to be synchronized at any time t3r is denoted by GlobalTime (t 3 r), that is, globalTime (t 3 r) =calculated rel.
S (t) in fig. 2 represents a part of seconds in time t; sync (s (t 0 r)) represents a parameter of a function band; FUP (t 4 r) represents a parameter of a function band; s (t 0 r) in the formula represents a part of seconds in time t0 r.
In an embodiment of the clock synchronization method of the intelligent driving system of the present invention, the method further includes:
Step S21, the clock information of the master node is sent to each slave node by means of the Ethernet data cable through the data packet carrying the time stamp;
Step S22, the slave node calculates the time offset between the master node and the slave node according to the received clock information, and adjusts the local clock of the slave node according to the time offset between the master node and the slave node.
Here, the laser radar (Lidar) communication mode is Ethernet (Ethernet), and the synchronization mode of the IPD to the laser radar is based on clock synchronization of the Ethernet;
The embodiment adopts a universal accurate time protocol (gPTP) to realize that all time sensitive nodes accurately work under uniform time in the Ethernet. In this embodiment, by means of an original ethernet data cable, clock information of a master node is sent to each slave node through a data packet carrying a timestamp, and then the slave node calculates a time offset between the master node and the slave node according to the received time information, and adjusts a local clock, thereby realizing time synchronization of the whole network.
As shown in fig. 3, in an embodiment of a clock synchronization method of an intelligent driving system of the present invention, step S22, a slave node calculates a time offset between a master node and a slave node according to received clock information, including:
S221, initiating a delay measurement request Pdelay_Req from a slave node (initiator slave) to a master node (response master) at a time t 1;
S222, the master node records a receiving time t 2 of a delay measurement request Pdelay_req;
S223, the master node sends feedback information Pdelay_Resp to the slave node at the time t 3 based on the received delay measurement request;
S224, recording the receiving time t 4 of the feedback information Pdelay_Resp by the slave node;
S225, calculating the transmission time delay D between the master node and the slave node based on the time points t 1、t2、t3 and t 4.
In an embodiment of the clock synchronization method of the intelligent driving system of the present invention, S225, based on the times t 1、t2、t3 and t 4, calculates a transmission time delay D between a master node and a slave node, including:
The transmission time delay D between the master node and the slave node is calculated based on the following formula:
。
Here, in this embodiment, the transmission time delay between master and slave is calculated, and a slave node slave initiates a pdelay_req delay measurement request to a master, and the calculation formula is as follows:
。
As shown in fig. 4, in an embodiment of a clock synchronization method of an intelligent driving system of the present invention, step S22, according to a time offset between a master node and a slave node, adjusts a local clock of the slave node, includes:
s226, the local clock of the slave node is adjusted according to the transmission time delay D between the master node and the slave node.
As shown in fig. 4, in an embodiment of a clock synchronization method of an intelligent driving system of the present invention, S226, adjusting a local clock of a slave node according to a transmission time delay D between a master node and the slave node includes:
S2261, the PTP instance i-1 sends a Sync synchronization message to the PTP instance i at time t s,i-1; at a time subsequent to t s,i-1, PTP instance i-1 sends an associated Follow_Up message to PTP instance i, the Follow_Up message comprising: preciseOriginTimestamp, correctionField i-1 and rateRatio i;
s2262, the corresponding GM master clock time GlobalTime (t i) at any time t i of PTP instance i is calculated based on the following formula:
GlobalTime(ti)=preciseOriginTimestamp+
correctionFieldi-1+Di+(ti-tr,i)*rateRatioi;
Wherein rateRatio i represents the ratio of GRANDMASTER clock frequency to LocalClock entity frequency of PTP instance i;
preciseOriginTimestamp denotes a time when the synchronization information is initially transmitted GRANDMASTER CLOCK;
correctionField i-1 represents the difference between the synchronization times t s,i-1 and preciseOriginTimestamp when the Sync message is sent, and t s,i-1 represents the time when the PTP instance i-1 sends the synchronization message to the PTP instance i;
t i represents the time to solve; t r,i represents the time when the PTP instance i receives the synchronization message from PTP instance i-1;
D i represents the propagation time delay between the master and slave at time t r,i, PTP instance i-1 is the master (master port) and PTP instance i is the slave (slave port).
Specific:
t s,i-1: the moment when the PTP instance i-1 sends the synchronous message to the PTP instance i;
t r,i: the moment when PTP instance i receives the synchronization message from PTP instance i-1;
t s,i: the PTP instance i sends synchronous message to PTP instance i+1;
t r,i+1: the moment when the PTP instance i+1 receives the synchronous message;
t i is the time to be solved subsequently, and t i+1 is the next time after the time t i to be solved subsequently.
The interval time between t s,i-1 and t s,i expressed in time base of GRANDMASTER CLOCK = average transmission delay (D) +dwell time. I.e., = [ d+ (t s,i-tr,i)]*rateRatioi).
Wherein rateRatio i denotes: rateRatio i is the ratio of GRANDMASTER clock frequency to LocalClock physical frequency of PTP instance i.
Any time t i of PTP instance i, referring to the local clock, the corresponding GM master clock time GlobalTime(ti)= preciseOriginTimestamp+correctionFieldi-1+Di+(ti-tr,i)*rateRatioi.
Wherein preciseOriginTimestamp denotes a time of GRANDMASTER CLOCK when the synchronization information is initially transmitted;
correctionField i-1 denotes the difference between the synchronization times t s,i-1 and preciseOriginTimestamp when the Sync message is sent;
D i represents the transmission time delay between the master node and the slave node at time t r,i.
As shown in fig. 4, in an embodiment of the clock synchronization method of the intelligent driving system of the present invention, after S2262 and the corresponding GM master clock time GlobalTime (t i) of any time t i of the PTP instance i are calculated based on the following formula, the method further includes:
s2263, the PTP instance i sends a Sync synchronization message to the PTP instance i+1 at time t s,i; at a time after t s,i-1, PTP instance i sends an associated follow_up message to PTP instance i+1, said follow_up message comprising: preciseOriginTimestamp, correctionField i and rateRatio i+1;
s2264, GM master clock time GlobalTime (t i) corresponding to any time t i+1 of PTP instance i+1 is calculated based on the following formula:
GlobalTime(ti+1)=preciseOriginTimestamp+correctionFieldi+Di+1+(ti+1-tr,i+1)*rateRatioi+1;
Wherein rateRatio i+1 represents the ratio of GRANDMASTER clock frequency to LocalClock entity frequency of PTP instance i+1;
preciseOriginTimestamp denotes a time when the synchronization information is initially transmitted GRANDMASTER CLOCK;
correctionField i1 represents the difference between the synchronization times t s,i and preciseOriginTimestamp when the Sync message is sent, and t s,i represents the time when the PTP instance i sends the synchronization message to PTP instance i+1;
t i+1 represents the next time to solve for t i to solve for; t r,i+1 represents the time when the PTP instance i+1 receives the synchronization message from PTP instance i;
D i represents the transmission time delay between the master node and the slave node at time t r,i+1, when PTP instance i is the master node and PTP instance i+1 is the slave node.
Here, at any time t i+1 of PTP instance i+1, referring to the local clock, the corresponding GM master clock time GlobalTime(ti+1)=preciseOriginTimestamp+correctionFieldi+Di+1+(ti+1-tr,i+1)*rateRatioi+1.
Wherein correctionField i denotes: correctionField i contains the difference between the synchronization time (i.e., t s,i) and preciseOriginTimestamp when the Sync message is sent.
The SWITCH in fig. 1 corresponds to time t i in STEP2, where solution is desired; the TM of the lidar corresponds to the next time t i+1 to be solved at time t i to be solved in STEP 2; IAM corresponds to the instant t immediately before the instant i of STEP2 which is to be solved i-1.
In an embodiment of the clock synchronization method of the intelligent driving system of the present invention, the method further includes:
step S31, in the multi-camera system, a plurality of deserializers share the same clock source, and a unified time reference is provided for a system on a chip for transmitting data to an IPD controller; while the deserializer communicates the clock source to each camera via the control link.
Here, as shown in fig. 5, video cameras (cameras) each transmit video data to the IPD controller by the LVDS method.
In this embodiment, in the multi-camera system, multiple deserializers (deserializers) share the same clock source to provide a uniform time reference for the system on chip transmitting data to the IPD controller; meanwhile, the deserializer transmits the clock source to each camera through the control link, so that a plurality of cameras have the same clock source, and the cameras and the IPD are ensured to run in a unified clock domain.
The clock synchronization mode of the IPD controller to the cameras is that all deserializers have the same reference clock source, and the crystal is high-stability low-temperature drift, so that the camera modules are guaranteed to have the same clock; the unified hardware synchronization signal is output to each deserializer, so that simultaneous triggering of multiple cameras is ensured, and the method is applicable to the condition that no oscillator exists in the cameras.
The REFCLK clock of the deserializer is provided by an external oscillator.
Oscillator specification:
Frequency error: less than or equal to +/-50 ppm;
frequency stability: less than or equal to +/-50 ppm;
temperature: -40-85 ℃.
The external frame synchronization signal is a pulse signal output by the IPD controller to each deserializer port, the deserializers transmit the pulse signal to the cameras through the control link to trigger the image sensor to collect image information, and the external frame synchronization mode can enable a plurality of cameras to be triggered simultaneously so as to realize the output of clock synchronization images to the IPD controller.
According to another aspect of the present invention, there is also provided a clock synchronization apparatus of an intelligent driving system, including:
The sending end is used for sending a second part s (t 0 r) in the time information t0r to the receiving end through the SYNC message; the transmitting end transmits an offset t4r between a second part t0r in time information and a time point t1r of actual transmission of the SYNC message through the FUP message;
The receiving end is used for receiving the SYNC message and detecting the time point t2r actually received by the SYNC message by using a CAN bottom layer mechanism; the receiving end calculates a corresponding global clock based on a second part t0r, an offset t4r and a time point t2r actually received by the SYNC message in the time information of the SYNC message.
According to another aspect of the present invention, there is also provided a computing-based apparatus, including:
A processor; and
A memory arranged to store computer executable instructions that, when executed, cause the processor to:
The transmitting end transmits a second part s (t 0 r) in the time information t0r to the receiving end through the SYNC message;
The receiving end receives the SYNC message and detects the time point t2r actually received by the SYNC message by using a CAN bottom layer mechanism;
the transmitting end transmits an offset t4r between a second part t0r in time information and a time point t1r of actual transmission of the SYNC message through the FUP message;
The receiving end calculates a corresponding global clock based on a second part t0r, an offset t4r and a time point t2r actually received by the SYNC message in the time information of the SYNC message.
According to another aspect of the present invention, there is also provided a computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
The transmitting end transmits a second part s (t 0 r) in the time information t0r to the receiving end through the SYNC message;
The receiving end receives the SYNC message and detects the time point t2r actually received by the SYNC message by using a CAN bottom layer mechanism;
the transmitting end transmits an offset t4r between a second part t0r in time information and a time point t1r of actual transmission of the SYNC message through the FUP message;
The receiving end calculates a corresponding global clock based on a second part t0r, an offset t4r and a time point t2r actually received by the SYNC message in the time information of the SYNC message.
Details of each device embodiment of the present invention may be specifically referred to corresponding portions of each method embodiment, and will not be described herein.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.
It should be noted that the present invention may be implemented in software and/or a combination of software and hardware, e.g., using Application Specific Integrated Circuits (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present invention may be executed by a processor to perform the steps or functions described above. Likewise, the software programs of the present invention (including associated data structures) may be stored on a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. In addition, some steps or functions of the present invention may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
Furthermore, portions of the present invention may be implemented as a computer program product, such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or techniques in accordance with the present invention by way of operation of the computer. Program instructions for invoking the inventive methods may be stored in fixed or removable recording media and/or transmitted via a data stream in a broadcast or other signal bearing medium and/or stored within a working memory of a computer device operating according to the program instructions. An embodiment according to the invention comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to operate a method and/or a solution according to the embodiments of the invention as described above.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the apparatus claims can also be implemented by means of one unit or means in software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.
Claims (7)
1. A clock synchronization method for an intelligent driving system, comprising:
The transmitting end transmits a second part s (t 0 r) in the time information t0r to the receiving end through the SYNC message;
The receiving end receives the SYNC message and detects the time point t2r actually received by the SYNC message by using a CAN bottom layer mechanism;
the transmitting end transmits an offset t4r between a second part t0r in time information and a time point t1r of actual transmission of the SYNC message through the FUP message;
The receiving terminal calculates a corresponding global clock based on a second part t0r, an offset t4r and a time point t2r actually received by the SYNC message in the time information of the SYNC message;
The clock information of the master node is sent to each slave node by means of an Ethernet data cable through a data packet carrying a time stamp;
The slave node calculates the time offset between the master node and the slave node according to the received clock information, adjusts the local clock of the slave node according to the time offset between the master node and the slave node, and comprises the following steps:
According to the transmission time delay D between the master node and the slave node, the local clock of the slave node is adjusted;
initiating a delay measurement request from a slave node to a master node at a time t 1;
The master node records the receiving time t 2 of the delay measurement request;
The master node sends feedback information to the slave node at the time t 3 based on the received delay measurement request;
Recording the receiving time t 4 of the feedback information by the slave node;
based on the times t 1、t2、t3 and t 4, a transmission time delay D between the master node and the slave node is calculated, comprising:
The transmission time delay D between the master node and the slave node is calculated based on the following formula:
。
2. the method of claim 1, wherein adjusting the local clock of the slave node based on the transmission time delay D between the master node and the slave node comprises:
the PTP instance i-1 sends a Sync synchronization message to the PTP instance i at time t s,i-1; at a time subsequent to t s,i-1, PTP instance i-1 sends an associated Follow_Up message to PTP instance i, the Follow_Up message comprising: preciseOriginTimestamp, correctionField i-1 and rateRatio i;
The corresponding GM master clock time GlobalTime (t i) for any instant t i of PTP instance i is calculated based on the following formula:
GlobalTime(ti)=preciseOriginTimestamp+correctionFieldi-1+Di+(ti-tr,i)*rateRatioi;
Wherein rateRatio i represents the ratio of GRANDMASTER clock frequency to LocalClock entity frequency of PTP instance i;
preciseOriginTimestamp denotes a time when the synchronization information is initially transmitted GRANDMASTER CLOCK;
correctionField i-1 represents the difference between the synchronization times t s,i-1 and preciseOriginTimestamp when the Sync message is sent, and t s,i-1 represents the time when the PTP instance i-1 sends the synchronization message to the PTP instance i;
t i represents the time to solve; t r,i represents the time when the PTP instance i receives the synchronization message from PTP instance i-1;
D i represents the propagation time delay between the master and slave at time t r,i, PTP instance i-1 being the master and PTP instance i being the slave.
3. The method of claim 2, wherein the corresponding GM master clock time GlobalTime (t i) at any time t i of PTP instance i is calculated based on the following formula, further comprising:
The PTP instance i sends a Sync synchronization message to the PTP instance i+1 at time t s,i; at a time after t s,i-1, PTP instance i sends an associated follow_up message to PTP instance i+1, said follow_up message comprising: preciseOriginTimestamp, correctionField i and rateRatio i+1;
GM master clock time GlobalTime (t i) corresponding to any time t i+1 of PTP instance i+1 is calculated based on the following formula:
GlobalTime(ti+1)=preciseOriginTimestamp+correctionFieldi+Di+1+(ti+1-tr,i+1)*rateRatioi+1;
Wherein rateRatio i+1 represents the ratio of GRANDMASTER clock frequency to LocalClock entity frequency of PTP instance i+1;
preciseOriginTimestamp denotes a time when the synchronization information is initially transmitted GRANDMASTER CLOCK;
correctionField i1 represents the difference between the synchronization times t s,i and preciseOriginTimestamp when the Sync message is sent, and t s,i represents the time when the PTP instance i sends the synchronization message to PTP instance i+1;
t i+1 represents the next time to solve for t i to solve for; t r,i+1 represents the time when the PTP instance i+1 receives the synchronization message from PTP instance i;
D i represents the transmission time delay between the master node and the slave node at time t r,i+1, when PTP instance i is the master node and PTP instance i+1 is the slave node.
4. The method as recited in claim 1, further comprising:
In a multi-camera system, a plurality of deserializers share the same clock source to provide a unified time reference for a system on a chip transmitting data to an IPD controller; while the deserializer communicates the clock source to each camera via the control link.
5. A clock synchronization device of an intelligent driving system, comprising:
The sending end is used for sending a second part s (t 0 r) in the time information t0r to the receiving end through the SYNC message; the transmitting end transmits an offset t4r between a second part t0r in time information and a time point t1r of actual transmission of the SYNC message through the FUP message;
The receiving end is used for receiving the SYNC message and detecting the time point t2r actually received by the SYNC message by using a CAN bottom layer mechanism; the receiving terminal calculates a corresponding global clock based on a second part t0r, an offset t4r and a time point t2r actually received by the SYNC message in the time information of the SYNC message;
The clock information of the master node is sent to each slave node by means of an Ethernet data cable through a data packet carrying a time stamp;
The slave node calculates the time offset between the master node and the slave node according to the received clock information, adjusts the local clock of the slave node according to the time offset between the master node and the slave node, and comprises the following steps:
According to the transmission time delay D between the master node and the slave node, the local clock of the slave node is adjusted;
initiating a delay measurement request from a slave node to a master node at a time t 1;
The master node records the receiving time t 2 of the delay measurement request;
The master node sends feedback information to the slave node at the time t 3 based on the received delay measurement request;
Recording the receiving time t 4 of the feedback information by the slave node;
based on the times t 1、t2、t3 and t 4, a transmission time delay D between the master node and the slave node is calculated, comprising:
The transmission time delay D between the master node and the slave node is calculated based on the following formula:
。
6. A computing-based device, comprising:
A processor; and
A memory arranged to store computer executable instructions that, when executed, cause the processor to:
The transmitting end transmits a second part s (t 0 r) in the time information t0r to the receiving end through the SYNC message;
The receiving end receives the SYNC message and detects the time point t2r actually received by the SYNC message by using a CAN bottom layer mechanism;
the transmitting end transmits an offset t4r between a second part t0r in time information and a time point t1r of actual transmission of the SYNC message through the FUP message;
The receiving terminal calculates a corresponding global clock based on a second part t0r, an offset t4r and a time point t2r actually received by the SYNC message in the time information of the SYNC message;
The clock information of the master node is sent to each slave node by means of an Ethernet data cable through a data packet carrying a time stamp;
The slave node calculates the time offset between the master node and the slave node according to the received clock information, adjusts the local clock of the slave node according to the time offset between the master node and the slave node, and comprises the following steps:
According to the transmission time delay D between the master node and the slave node, the local clock of the slave node is adjusted;
initiating a delay measurement request from a slave node to a master node at a time t 1;
The master node records the receiving time t 2 of the delay measurement request;
The master node sends feedback information to the slave node at the time t 3 based on the received delay measurement request;
Recording the receiving time t 4 of the feedback information by the slave node;
based on the times t 1、t2、t3 and t 4, a transmission time delay D between the master node and the slave node is calculated, comprising:
The transmission time delay D between the master node and the slave node is calculated based on the following formula:
。
7. A computer-readable storage medium having stored thereon computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, cause the processor to:
the transmitting end transmits a second part t0r in the time information to the receiving end through the SYNC message;
The receiving end receives the SYNC message and detects the time point t2r actually received by the SYNC message by using a CAN bottom layer mechanism;
the transmitting end transmits an offset t4r between a second part t0r in time information and a time point t1r of actual transmission of the SYNC message through the FUP message;
the receiving terminal calculates a corresponding global clock based on a second part t0r, an offset t4r and a time point t2r actually received by the SYNC message in the time information of the SYNC message; the clock information of the master node is sent to each slave node by means of an Ethernet data cable through a data packet carrying a time stamp;
The slave node calculates the time offset between the master node and the slave node according to the received clock information, adjusts the local clock of the slave node according to the time offset between the master node and the slave node, and comprises the following steps:
According to the transmission time delay D between the master node and the slave node, the local clock of the slave node is adjusted;
initiating a delay measurement request from a slave node to a master node at a time t 1;
The master node records the receiving time t 2 of the delay measurement request;
The master node sends feedback information to the slave node at the time t 3 based on the received delay measurement request;
Recording the receiving time t 4 of the feedback information by the slave node;
based on the times t 1、t2、t3 and t 4, a transmission time delay D between the master node and the slave node is calculated, comprising:
The transmission time delay D between the master node and the slave node is calculated based on the following formula:
。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210622426.5A CN115276866B (en) | 2022-06-02 | 2022-06-02 | Clock synchronization method and device of intelligent driving system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210622426.5A CN115276866B (en) | 2022-06-02 | 2022-06-02 | Clock synchronization method and device of intelligent driving system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115276866A CN115276866A (en) | 2022-11-01 |
CN115276866B true CN115276866B (en) | 2024-05-14 |
Family
ID=83758930
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210622426.5A Active CN115276866B (en) | 2022-06-02 | 2022-06-02 | Clock synchronization method and device of intelligent driving system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115276866B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102457371A (en) * | 2010-10-27 | 2012-05-16 | 华为技术有限公司 | Time synchronization method and related equipment and system |
CN103378993A (en) * | 2012-04-20 | 2013-10-30 | 华东电网有限公司 | Slave clock monitoring method based on PTP |
CN103441832A (en) * | 2013-08-22 | 2013-12-11 | 瑞斯康达科技发展股份有限公司 | Clock synchronization method, system and equipment based on PTP |
CN105577348A (en) * | 2014-10-08 | 2016-05-11 | 中兴通讯股份有限公司 | Frequency offset monitoring method and frequency offset monitoring device based on time synchronization network |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9602271B2 (en) * | 2015-06-01 | 2017-03-21 | Globalfoundries Inc. | Sub-nanosecond distributed clock synchronization using alignment marker in ethernet IEEE 1588 protocol |
-
2022
- 2022-06-02 CN CN202210622426.5A patent/CN115276866B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102457371A (en) * | 2010-10-27 | 2012-05-16 | 华为技术有限公司 | Time synchronization method and related equipment and system |
CN103378993A (en) * | 2012-04-20 | 2013-10-30 | 华东电网有限公司 | Slave clock monitoring method based on PTP |
CN103441832A (en) * | 2013-08-22 | 2013-12-11 | 瑞斯康达科技发展股份有限公司 | Clock synchronization method, system and equipment based on PTP |
CN105577348A (en) * | 2014-10-08 | 2016-05-11 | 中兴通讯股份有限公司 | Frequency offset monitoring method and frequency offset monitoring device based on time synchronization network |
Also Published As
Publication number | Publication date |
---|---|
CN115276866A (en) | 2022-11-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109587405B (en) | Time synchronization method and device | |
US8576883B2 (en) | Measurement and adjustment of real-time values according to residence time in networking equipment without access to real time | |
JP5080202B2 (en) | Time synchronization processing system, time information distribution device, time synchronization processing device, time information distribution program, and time synchronization processing program | |
CN113273105B (en) | Method for time synchronization of a plurality of auxiliary devices of an autonomous vehicle, computer device and storage medium | |
US7577169B1 (en) | Time stamping | |
CN111309094A (en) | Synchronous board card and method for data acquisition of sensor equipment | |
US11038608B2 (en) | Frequency synchronization method and slave clock | |
RU2556082C1 (en) | Synchronisation device and synchronisation method | |
WO2016168063A1 (en) | Methods, systems, and computer readable media for synchronizing timing among network interface cards (nics) in a network equipment test device | |
US11979481B2 (en) | Time synchronisation | |
US20220248353A1 (en) | Synchronization method and device | |
CN112485806B (en) | Laser radar and camera time synchronization system and method | |
CN113992469B (en) | Data fusion method and device, electronic equipment and computer readable medium | |
CN114614934B (en) | Time synchronization triggering device and method | |
EP3985890A1 (en) | Physical layer device with precision timing | |
CN115276866B (en) | Clock synchronization method and device of intelligent driving system | |
CN116800366A (en) | Clock synchronization method, device and storage medium | |
CN116830487A (en) | Vehicle-road cooperation time synchronization method, vehicle-road cooperation time synchronization device and system | |
US11675318B2 (en) | Multi-interface GPS time synchronization | |
US20090213008A1 (en) | Multiple RF receiver and locating method using the same | |
JP2019016872A (en) | Synchronization system, communication device, communication method, and program | |
CN110661609B (en) | Clock synchronization method and first equipment | |
US20240171295A1 (en) | Communication apparatus, control method for communication apparatus, and storage medium | |
Do et al. | Time synchronization method between CAN-FD nodes | |
CN117728912A (en) | Method, device, equipment and storage medium for time synchronization |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |