Method, device and electronic device for synchronizing clock and frequency of autonomous driving vehicle

By deploying the gPTP protocol stack and external clock source reference in the autonomous driving vehicle, the clock and frequency synchronization of the autonomous driving vehicle is achieved, solving the problem of poor synchronization in the existing technology and improving driving safety.

CN114978397BActive Publication Date: 2025-02-25NEUSOFT REACH AUTOMOTIVE TECH SHANGHAI CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210529019.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-16
Publication Date
2025-02-25
Estimated Expiration
2042-05-16

AI Technical Summary

Technical Problem

The prior art cannot achieve clock and frequency synchronization of the entire autonomous vehicle, resulting in time delay and control imbalance, affecting driving safety.

Method used

By deploying the gPTP protocol stack in the entire autonomous driving vehicle, clock and frequency synchronization is performed using external clock source references (such as GNSS clocks, network clocks, etc.), ensuring intelligent networking units, central control units, intelligent driving units, intelligent cockpit units and sub- Synchronization between functional systems.

Benefits of technology

The clock and frequency synchronization of the entire autonomous driving vehicle is realized, the synchronization accuracy is improved, the problem of poor clock and frequency synchronization in the existing technology is alleviated, and driving safety is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114978397B_ABST
    Figure CN114978397B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device and electronic device for synchronizing the clock and frequency of an autonomous driving vehicle, including: determining an external clock source reference under different scene conditions; using the gPTP protocol stack to perform clock and frequency synchronization between an intelligent network connection unit, a central control unit, an intelligent driving unit, an intelligent cockpit unit and sub-functional systems based on the external clock source reference. The synchronization method of the present invention can achieve clock and frequency synchronization of an autonomous driving vehicle with high synchronization accuracy, alleviating the technical problem that the prior art cannot achieve clock and frequency synchronization of an autonomous driving vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of autonomous driving, and in particular to a method, device and electronic equipment for synchronizing the clock and frequency of an autonomous driving vehicle. Background Art

[0002] In recent years, autonomous driving technology has become the most active topic in the world. When autonomous vehicles need to complete a series of complex functions such as autonomous cruising on highways and smart parking in garages, the real-time requirements between different domain controllers must be very high. If the clock and frequency synchronization between different domain controllers is not done well, it will cause large time delays and control disorders, posing a threat to driving safety and even endangering the lives of drivers and passengers.

[0003] For example, when an autonomous driving vehicle is driving in autonomous driving mode, the vehicle position may deviate from the lane line at a certain moment. If the clocks of the intelligent driving unit and the intelligent network connection unit are not synchronized, the vehicle position information with a timestamp sent by the intelligent network connection unit is the three-dimensional coordinates at 10:00:00, and the clock of the intelligent network connection unit is 10:00:00 at this time. After receiving the above information, the intelligent driving unit determines that the vehicle will deviate from the lane at 10:00:00, but its own current clock is 9:59:00 (because the vehicle position has not deviated from the lane at 9:59:00, automatic lane correction at this time will cause the vehicle to deviate from the lane). Then, the lane deviation correction will not be performed immediately through body control, and the lane deviation correction will be performed only when its clock reaches 10:00:00. At this time, the above control operation will be delayed by 1 minute, that is, the automatic correction of the lane position after a delay of 1 minute may not be able to avoid the occurrence of an accident. Therefore, there will be a driving safety problem caused by the asynchronous clocks of the intelligent driving unit and the intelligent network connection unit.

[0004] At present, clock synchronization related to autonomous driving is implemented in a single domain controller (for example, in an intelligent driving unit), and it is impossible to achieve clock and frequency synchronization of the entire autonomous driving vehicle. Therefore, how to achieve clock and frequency synchronization of the entire autonomous driving vehicle has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a method, device and electronic device for synchronizing the clock and frequency of an autonomous driving vehicle, so as to alleviate the technical problem that the prior art cannot achieve clock and frequency synchronization of an autonomous driving vehicle.

[0006] In a first aspect, an embodiment of the present invention provides a method for synchronizing the clock and frequency of an autonomous driving vehicle, wherein the autonomous driving vehicle includes: an intelligent network connection unit, a central control unit, an intelligent driving unit, an intelligent cockpit unit, and a sub-functional system, and the intelligent network connection unit, the central control unit, the intelligent driving unit, and the intelligent cockpit unit all comply with the ARM Cortex architecture, wherein the M core of the intelligent network connection unit deploys a gPTP Grandmaster master node, the M core of the central control unit deploys a gPTP Grandmaster slave node and a gPTP Bridge master node, the M core and the R core of the intelligent driving unit both deploy a gPTP Bridge slave node and a gPTP End Point master node, the A core of the intelligent driving unit deploys a gPTP End Point slave node, the M core of the intelligent cockpit unit deploys a gPTP Bridge slave node and a gPTP End Point master node, and the sub-functional system deploys a gPTP End Point slave node, and the method includes:

[0007] Determine the external clock source benchmark under different scenarios and working conditions;

[0008] Based on the external clock source reference, the gPTP protocol stack is used to perform clock and frequency synchronization between the intelligent network connection unit, the central control unit, the intelligent driving unit, the intelligent cockpit unit and the sub-functional system.

[0009] Furthermore, in different scenarios and working conditions, the external clock source reference is determined, including:

[0010] When the number of GNSS satellites observed by the GNSS antenna of the autonomous driving vehicle is not less than 4, the GNSS clock obtained when the GNSS receiver performs positioning calculation is used as the external clock source reference;

[0011] When the number of GNSS satellites observed by the GNSS antenna of the autonomous driving vehicle is less than 4, the atomic clock of any observed GNSS satellite is used as the external clock source reference;

[0012] When the GNSS antenna of the autonomous driving vehicle cannot observe any GNSS satellite, a network clock is obtained through the modem of the intelligent network connection unit, and the network clock is used as the external clock source reference;

[0013] When the GNSS antenna of the autonomous driving vehicle cannot observe any GNSS satellite and there is no network coverage in the area where the autonomous driving vehicle is located, the external clock source reference is determined based on the clock when the signal of the GNSS satellite and the network signal are simultaneously lost.

[0014] Further, determining the external clock source reference based on the clock when the signal of the GNSS satellite and the network signal are lost simultaneously includes:

[0015] The clock when both the signal of the GNSS satellite and the network signal are lost is used as the starting clock;

[0016] Calculate the current clock according to the starting clock and the oscillation frequency and oscillation period of the crystal oscillator in the intelligent network connection unit;

[0017] The current clock is used as the external clock source reference.

[0018] Furthermore, the clock and frequency synchronization between the intelligent network connection unit, the central control unit, the intelligent driving unit, the intelligent cockpit unit and the sub-functional system is performed using the gPTP protocol stack based on the external clock source reference, including:

[0019] The clock and frequency synchronization between the M core of the intelligent network connection unit and the M core of the central control unit is completed by sending and receiving clock synchronization messages between the gPTP Grandmaster master node and the gPTP Grandmaster slave node, wherein the gPTP Grandmaster master node is used to obtain the external clock source reference;

[0020] The clock and frequency synchronization between the M core of the central control unit and the M core of the intelligent driving unit, and the clock and frequency synchronization between the M core of the central control unit and the M core of the intelligent cockpit unit are completed by sending and receiving clock synchronization messages between the gPTP Bridge master node and the gPTP Bridge slave node;

[0021] The clock and frequency synchronization between the R core of the intelligent driving unit, the M core of the intelligent driving unit and the A core of the intelligent driving unit, and the clock and frequency synchronization between the M core of the intelligent cockpit unit and the sub-function system are completed by sending and receiving clock synchronization messages between the gPTP End Point master node and the gPTP End Point slave node.

[0022] Furthermore, the method further comprises:

[0023] The clock synchronization accuracy is calculated by formula A ts=α+β+γ to calculate the clock synchronization accuracy, wherein α represents the external conformity accuracy. When the external clock source reference is the GNSS clock or the atomic clock of the GNSS satellite, the external conformity accuracy is 10-20ns. When the external clock source reference is the network clock, the external conformity accuracy is 1.5μs. β represents the internal conformity accuracy. The internal conformity accuracy β=B*n, B represents the time synchronization accuracy of the gPTP protocol stack, n represents the number of transmissions of the gPTP protocol stack, γ represents the margin, γ=(α+β)*b, and b represents the preset percentage value.

[0024] Furthermore, the method further comprises:

[0025] Obtain the message message with timestamp sent by the target domain controller;

[0026] Determining whether the delay of the message message has timed out based on the timestamp;

[0027] If it times out, the message is discarded;

[0028] If it has not timed out, the message packet is used.

[0029] Further, judging whether the delay of the message message has timed out based on the timestamp includes:

[0030] Calculate the time difference based on the timestamp and the current clock time of the own domain controller;

[0031] If the time difference is greater than a preset threshold, determining that the message message delay has timed out;

[0032] If the time difference is not greater than the preset threshold, it is determined that the delay of the message message has not timed out.

[0033] In a second aspect, an embodiment of the present invention further provides a clock and frequency synchronization device for an autonomous driving vehicle, wherein the autonomous driving vehicle comprises: an intelligent network connection unit, a central control unit, an intelligent driving unit, an intelligent cockpit unit and a sub-functional system, and the intelligent network connection unit, the central control unit, the intelligent driving unit and the intelligent cockpit unit all comply with the ARM Cortex architecture, wherein the M core of the intelligent network connection unit deploys a gPTP Grandmaster master node, the M core of the central control unit deploys a gPTP Grandmaster slave node and a gPTP Bridge master node, the M core and R core of the intelligent driving unit both deploy a gPTP Bridge slave node and a gPTP End Point master node, the A core of the intelligent driving unit deploys a gPTP End Point slave node, the M core of the intelligent cockpit unit deploys a gPTP Bridge slave node and a gPTP End Point master node, the sub-functional system deploys a gPTP End Point slave node, and the device comprises:

[0034] A determination unit, used to determine an external clock source reference under different scenario conditions;

[0035] An execution unit is used to perform clock and frequency synchronization between the intelligent network connection unit, the central control unit, the intelligent driving unit, the intelligent cockpit unit and the sub-functional system using a gPTP protocol stack based on the external clock source reference.

[0036] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.

[0037] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to execute any method described in the first aspect above.

[0038] In an embodiment of the present invention, a method for synchronizing the clock and frequency of an autonomous driving vehicle is provided. The autonomous driving vehicle includes: an intelligent network connection unit, a central control unit, an intelligent driving unit, an intelligent cockpit unit and a sub-functional system, and the intelligent network connection unit, the central control unit, the intelligent driving unit and the intelligent cockpit unit all follow the ARM Cortex architecture, wherein the M core of the intelligent network connection unit deploys a gPTP Grandmaster master node, the M core of the central control unit deploys a gPTPGrandmaster slave node and a gPTP Bridge master node, the M core and the R core of the intelligent driving unit both deploy a gPTP Bridge slave node and a gPTP End Point master node, the A core of the intelligent driving unit deploys a gPTP End Point slave node, the M core of the intelligent cockpit unit deploys a gPTP Bridge slave node and a gPTP End Point master node, and the sub-functional system deploys a gPTP EndPoint slave node. The method includes: determining an external clock source reference under different scenario conditions; and performing clock and frequency synchronization among the intelligent network connection unit, the central control unit, the intelligent driving unit, the intelligent cockpit unit and the sub-functional system using a gPTP protocol stack based on the external clock source reference. From the above description, it can be seen that the clock and frequency synchronization method of the autonomous driving vehicle of the present invention can achieve the clock and frequency synchronization of the autonomous driving vehicle with high synchronization accuracy, which alleviates the technical problem that the prior art cannot achieve the clock and frequency synchronization of the autonomous driving vehicle. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 A flowchart of a method for synchronizing the clock and frequency of an autonomous driving vehicle provided by an embodiment of the present invention;

[0041] Figure 2 An architectural diagram of clock and frequency synchronization of an autonomous driving vehicle provided by an embodiment of the present invention;

[0042] Figure 3 A flow chart of a method for determining an external clock source reference provided by an embodiment of the present invention;

[0043] Figure 4 A schematic diagram of a clock and frequency synchronization device for an autonomous driving vehicle provided by an embodiment of the present invention;

[0044] Figure 5 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] Currently, clock synchronization related to autonomous driving is implemented in a single domain controller (for example, in an intelligent driving unit), which makes it impossible to achieve clock and frequency synchronization for the entire autonomous driving vehicle.

[0047] Based on this, the clock and frequency synchronization method of the autonomous driving vehicle of the present invention can achieve clock and frequency synchronization of the autonomous driving vehicle with high synchronization accuracy.

[0048] To facilitate understanding of this embodiment, a method for synchronizing the clock and frequency of an autonomous driving vehicle disclosed in an embodiment of the present invention is first introduced in detail.

[0049] Embodiment 1:

[0050] According to an embodiment of the present invention, an embodiment of a method for synchronizing the clock and frequency of an autonomous driving vehicle is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.

[0051] Figure 1 is a flow chart of a method for synchronizing the clock and frequency of an autonomous driving vehicle according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0052] Step S102, determining an external clock source reference under different scenario conditions;

[0053] In the embodiment of the present invention, reference Figure 2The autonomous driving vehicle includes: an intelligent network connection unit, a central control unit, an intelligent driving unit, an intelligent cockpit unit and a sub-functional system, and the intelligent network connection unit, the central control unit, the intelligent driving unit and the intelligent cockpit unit all follow the ARM Cortex architecture. Among them, the M core of the intelligent network connection unit deploys the gPTPGrandmaster master node, the M core of the central control unit deploys the gPTP Grandmaster slave node and the gPTP Bridge master node, the M core and R core of the intelligent driving unit both deploy the gPTP Bridge slave node and the gPTP End Point master node, the A core of the intelligent driving unit deploys the gPTP End Point slave node, the M core of the intelligent cockpit unit deploys the gPTP Bridge slave node and the gPTP End Point master node, and the sub-functional system deploys the gPTP End Point slave node.

[0054] Specifically, the clock and frequency synchronization method of the autonomous driving vehicle of the present invention uses the relatively mature generalized precise time protocol (gPTP) to achieve time synchronization and frequency synchronization between different domain controllers of the autonomous driving vehicle. The gPTP protocol stack includes three types: gPTP Grandmaster, gPTPBridge and gPTP End Point. Among them, the protocol stack that directly obtains the external clock source reference is called gPTPGrandmaster; the protocol stack that plays the gateway routing function in clock and frequency synchronization is called gPTP Bridge, which not only receives the upstream clock synchronization message, but also synchronizes the clock synchronization message to other downstream units; the protocol stack that only receives the upstream clock synchronization message without the need to communicate with the downstream is called gPTP End Point. Each protocol stack is divided into a master node and a slave node. The master node and slave node of the same protocol stack are deployed in different domain control units (see specifically as shown in the figure). Figure 2 As shown), the Ethernet clock and frequency synchronization between the upstream and downstream domain control units is realized. For the specific method of clock and frequency synchronization, please refer to the gPTP technical principle (IEEE Std 802.1AS).

[0055] The above-mentioned intelligent network connection unit, central control unit, intelligent driving unit and intelligent cockpit unit all follow the ARMCortex architecture and are all domain control units (or domain controllers). Among them, the A core (Cortex-A) is a performance core, which is aimed at performance-intensive systems and mainly solves high computing power requirements; the R core (Cortex-R) is aimed at real-time systems and has high requirements for real-time and reliability; the M core (Cortex-M) is a microcontroller (MCU), which is mainly aimed at embedded applications and has high requirements for real-time and reliability. Each of the above units includes at least one semiconductor chip, and each unit includes an A core, an R core and an M core. Considering that the M cores of the intelligent network unit, the central control unit, the intelligent driving unit and the intelligent cockpit unit have high requirements for real-time performance and reliability, the M cores of the above units need to synchronize the clock and frequency, that is, it is necessary to deploy nodes of the gPTP-related protocol stack in the M cores of the above units. In addition, considering that the A core of the intelligent driving unit needs to assume perception functions, it also needs to have high clock and frequency synchronization accuracy, otherwise the perception delay can also cause the automatic driving to respond in time and cause safety accidents. That is, the A core of the intelligent driving unit also needs to deploy nodes of the gPTP-related protocol stack. Similarly, the R core of the intelligent driving unit also needs to deploy nodes of the gPTP-related protocol stack.

[0056] The above-mentioned sub-functional systems at least include: a driver distraction monitoring system and a steering wheel hands-off detection system.

[0057] It should be noted that the method of the present invention can determine a relatively accurate external clock source reference under different scene conditions. The process will be described in detail below and will not be repeated here.

[0058] The reason why we need to determine the external clock source reference and synchronize the clock and frequency with the external clock source reference is to facilitate the later realization of vehicle-road collaboration. Because only when each autonomous driving vehicle synchronizes the clock and frequency with a unified external clock source reference, can all autonomous driving vehicles achieve clock and frequency synchronization, and when the vehicles communicate with each other and with other things (for example, road facilities, such as traffic lights, etc.), they use the same time reference, and can achieve effective, high-precision, and real-time data communication.

[0059] Step S104, based on the external clock source reference, the gPTP protocol stack is used to perform clock and frequency synchronization between the intelligent network unit, the central control unit, the intelligent driving unit, the intelligent cockpit unit and the sub-functional system.

[0060] The process will be described in detail below and will not be repeated here.

[0061] In an embodiment of the present invention, a method for synchronizing the clock and frequency of an autonomous driving vehicle is provided. The autonomous driving vehicle includes: an intelligent network connection unit, a central control unit, an intelligent driving unit, an intelligent cockpit unit and a sub-functional system, and the intelligent network connection unit, the central control unit, the intelligent driving unit and the intelligent cockpit unit all follow the ARM Cortex architecture, wherein the M core of the intelligent network connection unit deploys a gPTP Grandmaster master node, the M core of the central control unit deploys a gPTPGrandmaster slave node and a gPTP Bridge master node, the M core and the R core of the intelligent driving unit both deploy a gPTP Bridge slave node and a gPTP End Point master node, the A core of the intelligent driving unit deploys a gPTP End Point slave node, the M core of the intelligent cockpit unit deploys a gPTP Bridge slave node and a gPTP End Point master node, and the sub-functional system deploys a gPTP EndPoint slave node. The method includes: determining an external clock source reference under different scenario conditions; and performing clock and frequency synchronization among the intelligent network connection unit, the central control unit, the intelligent driving unit, the intelligent cockpit unit and the sub-functional system using a gPTP protocol stack based on the external clock source reference. From the above description, it can be seen that the clock and frequency synchronization method of the autonomous driving vehicle of the present invention can achieve the clock and frequency synchronization of the autonomous driving vehicle with high synchronization accuracy, which alleviates the technical problem that the prior art cannot achieve the clock and frequency synchronization of the autonomous driving vehicle.

[0062] The above content briefly introduces the clock and frequency synchronization method of the autonomous driving vehicle of the present invention. The specific contents involved are described in detail below.

[0063] In an alternative embodiment of the present invention, reference Figure 3 , under different scenarios and working conditions, determine the external clock source benchmark, specifically including the following steps:

[0064] Step S301, when the number of GNSS satellites observed by the GNSS antenna of the autonomous driving vehicle is not less than 4, the GNSS clock obtained during the positioning solution of the GNSS receiver is used as an external clock source reference;

[0065] Specifically, when the autonomous driving vehicle is in a completely open scene, the number of GNSS satellites (including GPS satellites, Beidou satellites or other navigation satellites) observed by the GNSS antenna deployed on the shark fin is no less than 4. Then the GNSS receiver can be used to locate and solve the satellite signals received by the GNSS antenna to obtain the three-dimensional coordinates and GNSS clock of the vehicle, and then the GNSS clock obtained by positioning and solving can be used as the external clock source reference.

[0066] The above GNSS clock includes the GNSS week and the second of the week.

[0067] Step S302, when the number of GNSS satellites observed by the GNSS antenna of the autonomous driving vehicle is less than 4, the atomic clock of any observed GNSS satellite is used as an external clock source reference;

[0068] Specifically, when the autonomous driving vehicle is in a partially obstructed scenario, the number of GNSS satellites (including GPS satellites, Beidou satellites or other navigation satellites) observed by the GNSS antenna deployed on the shark fin is less than 4. At this time, the atomic clock of any observed GNSS satellite can be used as an external clock source reference.

[0069] Step S303: when the GNSS antenna of the autonomous driving vehicle cannot observe any GNSS satellite, a network clock is obtained through the modem of the intelligent network connection unit, and the network clock is used as an external clock source reference;

[0070] Specifically, when the autonomous driving vehicle is in a completely blocked scenario, the GNSS antenna cannot observe any GNSS satellite, that is, the GNSS antenna cannot receive any satellite signals. At this time, the network clock (4G / 5G network clock) can be obtained through the modem of the intelligent network connection unit (T-Box) and the network clock can be used as the external clock source reference.

[0071] Step S304: When the GNSS antenna of the autonomous driving vehicle cannot observe any GNSS satellite and there is no network coverage in the area where the autonomous driving vehicle is located, an external clock source reference is determined based on the clock when both the GNSS satellite signal and the network signal are lost.

[0072] Specifically, when the autonomous driving vehicle is in a scenario where it is completely blocked and has no network coverage, the clock when both the GNSS satellite signal and the network signal are lost simultaneously (the clock just before both the GNSS satellite signal and the network signal are lost simultaneously) is used as the external clock source benchmark.

[0073] Specifically, the clock when the GNSS satellite signal and the network signal are lost at the same time is used as the starting clock; the current clock is calculated according to the starting clock and the oscillation frequency and oscillation period of the crystal oscillator in the intelligent network connection unit; and the current clock is used as the external clock source reference.

[0074] Among them, the current clock tn=t0+ω*n, wherein tn represents the current clock, t0 represents the starting clock, ω represents the oscillation frequency of the crystal oscillator in the intelligent network unit, and n represents the oscillation period. The above starting clock and oscillation frequency are accurate, so the calculated current clock, i.e., the external clock source reference, is also accurate.

[0075] It should be noted that the determination of the external clock source reference in the above steps S301 to S303 is implemented through the external clock source arbitration module, and step S303 can only be implemented through the entire intelligent network unit.

[0076] In an optional embodiment of the present invention, the gPTP protocol stack is used to perform clock and frequency synchronization between the intelligent network connection unit, the central control unit, the intelligent driving unit, the intelligent cockpit unit and the sub-functional system based on an external clock source reference, specifically including:

[0077] (1) The clock and frequency synchronization between the M core of the intelligent network unit and the M core of the central control unit is completed by sending and receiving clock synchronization messages between the gPTP Grandmaster master node and the gPTP Grandmaster slave node, where the gPTPGrandmaster master node is used to obtain the external clock source reference;

[0078] Clock synchronization message transmission and reception (ie Figure 2 The clock synchronization signal in the gPTP Grandmaster includes: the gPTP Grandmaster master node sends a clock synchronization request message to the gPTP Grandmaster slave node, and the gPTP Grandmaster slave node returns a clock synchronization response message to the gPTPGrandmaster master node.

[0079] The following is a brief description of the clock and frequency synchronization process:

[0080] The time when the gPTP Grandmaster master node sends the clock synchronization request message is T1, the time when the gPTP Grandmaster slave node receives the clock synchronization request message is T2, the time when the gPTP Grandmaster slave node returns the clock synchronization response message is T3, and the time when the gPTP Grandmaster master node receives the clock synchronization response message is T4. Then the time synchronization accuracy of the gPTP protocol stack (i.e., the transmission time of one message): B = [(T2-T1) + (T4-T3)] / 2, the frequency ratio of the gPTP protocol stack: R = (T2-T1) / (T4-T3).

[0081] In addition to the above definition, the present invention also proposes another definition, specifically: the time interval from the gPTP Grandmaster master node sending a clock synchronization request message to the gPTP Grandmaster slave node receiving the clock synchronization request message is recorded as t1, the time interval from the gPTP Grandmaster slave node returning a clock synchronization response message to the gPTP Grandmaster master node receiving the clock synchronization response message is recorded as t2, the time interval between each two adjacent sending of the clock synchronization request message by the gPTP Grandmaster master node is recorded as t3, and the time interval between each two adjacent receiving of the clock synchronization request message by the gPTP Grandmaster slave node is recorded as t4, then the time synchronization accuracy of the gPTP protocol stack (i.e., the transmission time of one message): B = (t1+t2) / 2, the frequency ratio of the gPTP protocol stack: R = t3 / t4.

[0082] The so-called clock synchronization is to control B to be as small as possible, preferably 0. The above clock synchronization strategy is to adjust the slave node's own time base to make B as close to 0 as possible. Specifically, adjust T2 close to T1 and adjust T3 close to T4. The so-called frequency synchronization is to control R = 1. When R is greater than 1 or less than 1, the slave node must adjust its own time base to make R as close to 1 as possible. Of course, even if clock synchronization is performed, there will still be a certain time error. The time synchronization accuracy of the gPTP protocol stack is generally 30-50ns. In addition, the frequency synchronization of gPTP requires the slave node to calibrate based on the frequency of the master node. When the clock synchronization message is sent and received, the clock synchronization and frequency synchronization are completed at the same time.

[0083] It should be noted that the above clock synchronization message carries the information of the external clock source reference, that is, when clock synchronization is performed, synchronization is performed based on the external clock source reference, even if the clocks of the control units of each domain are based on the external clock source.

[0084] After completing the clock and frequency synchronization between the gPTP Grandmaster master node and the gPTP Grandmaster slave node, the gPTP Grandmaster slave node and the gPTPBridge master node in the same structure (M core of the central control unit) both achieve clock and frequency synchronization at the same time.

[0085] (2) The clock and frequency synchronization between the M cores of the central control unit and the M cores of the intelligent driving unit, and the clock and frequency synchronization between the M cores of the central control unit and the M cores of the intelligent cockpit unit are completed through the clock synchronization message transmission and reception between the gPTP Bridge master node and the gPTP Bridge slave node;

[0086] The clock synchronization message also carries the information of the external clock source reference. For the specific process, please refer to the description in (1) above and will not be repeated here.

[0087] (3) The clock and frequency synchronization between the R core of the intelligent driving unit, the M core of the intelligent driving unit and the A core of the intelligent driving unit, and the clock and frequency synchronization between the M core of the intelligent cockpit unit and the sub-functional system are completed through the clock synchronization message reception and transmission between the gPTP End Point master node and the gPTP End Point slave node.

[0088] The specific process is described in (1) above and will not be repeated here.

[0089] In an optional embodiment of the present invention, the method further comprises: calculating the clock synchronization accuracy by formula A ts =α+β+γ to calculate the clock synchronization accuracy, where α represents the external accuracy. When the external clock source reference is the GNSS clock or the atomic clock of the GNSS satellite, the external accuracy is 10-20ns. When the external clock source reference is the network clock, the external accuracy is 1.5μs. β represents the internal accuracy. The internal accuracy β=B*n, B represents the time synchronization accuracy of the gPTP protocol stack, n represents the number of transmissions of the gPTP protocol stack, γ represents the margin, γ=(α+β)*b, and b represents the preset percentage value.

[0090] Specifically, the deviation between the GNSS clock or the atomic clock of the GNSS satellite and the Coordinated Universal Time (UTC) is generally 10 to 20ns. Therefore, when the external clock source reference is the GNSS clock or the atomic clock of the GNSS satellite, the external conformity accuracy is 10-20ns. The 4G network timing accuracy is about 1.5μs, and the 5G timing accuracy is higher than 4G. Then the maximum deviation of the external clock reference is 1.5μs. Therefore, when the external clock source reference is the network clock, the external conformity accuracy is 1.5μs; the time synchronization accuracy B of the gPTP protocol stack is 30-50ns, even in gPTP Grandmaster, gPTP Bridge, and gPTP End Multiple cumulative calculations between points do not exceed 90 to 150 ns, and the internal accuracy β = B*n, in the embodiment of the present invention, n = 3; considering the influence of link propagation loss, etc., it is generally believed that the margin of propagation loss should be enlarged by a preset percentage value on the basis of a fixed deviation (α+β). In the embodiment of the present invention, the above preset percentage value can be 30%, that is, γ = (α+β)*30%, so the overall clock synchronization accuracy A ts =α+β+γ=1.3(α+β)<10μs, that is, the method of the present invention can achieve the synchronization accuracy of the whole vehicle clock at the microsecond (μs) level.

[0091] In an optional embodiment of the present invention, the method further comprises:

[0092] 1) Obtain the message message with timestamp sent by the target domain controller;

[0093] 2) Determine whether the message delay has timed out based on the timestamp;

[0094] Specifically, the time difference is calculated based on the timestamp and the current clock time of its own domain controller; if the time difference is greater than a preset threshold, it is determined that the delay of the message message has timed out; if the time difference is not greater than the preset threshold, it is determined that the delay of the message message has not timed out.

[0095] 3) If it times out, the message is discarded;

[0096] 4) If it has not timed out, use the message message.

[0097] The method of the present invention is based on the existing gPTP protocol stack technology, and designs a high-precision clock synchronization and frequency synchronization solution that can be widely used in autonomous driving vehicles; it solves the problem of how to determine the external clock source benchmark under different working conditions, especially the clock synchronization method under the scenario where neither the satellite nor the network is available; it realizes the vehicle internal clock synchronization architecture across domain controllers, and all domain controllers, especially the units and modules with real-time requirements can achieve strict clock synchronization; in addition, a clock accuracy performance analysis method for autonomous driving vehicles (clock synchronization accuracy calculation formula) is proposed by comprehensively considering the external conformity accuracy, internal conformity accuracy, link propagation loss and margin, and the clock synchronization can achieve micron-level synchronization accuracy.

[0098] Embodiment 2:

[0099] An embodiment of the present invention also provides a device for synchronizing the clock and frequency of an autonomous driving vehicle. The device for synchronizing the clock and frequency of an autonomous driving vehicle is mainly used to execute the method for synchronizing the clock and frequency of an autonomous driving vehicle provided in the first embodiment of the present invention. The following is a specific introduction to the device for synchronizing the clock and frequency of an autonomous driving vehicle provided in the embodiment of the present invention.

[0100] Figure 4is a schematic diagram of a clock and frequency synchronization device for an autonomous driving vehicle according to an embodiment of the present invention, wherein the autonomous driving vehicle includes: an intelligent network connection unit, a central control unit, an intelligent driving unit, an intelligent cockpit unit and a sub-functional system, and the intelligent network connection unit, the central control unit, the intelligent driving unit and the intelligent cockpit unit all follow the ARM Cortex architecture, wherein the M core of the intelligent network connection unit deploys a gPTP Grandmaster master node, the M core of the central control unit deploys a gPTP Grandmaster slave node and a gPTP Bridge master node, the M core and the R core of the intelligent driving unit both deploy a gPTPBridge slave node and a gPTP End Point master node, the A core of the intelligent driving unit deploys a gPTP End Point slave node, the M core of the intelligent cockpit unit deploys a gPTP Bridge slave node and a gPTP End Point master node, and the sub-functional system deploys a gPTP End Point slave node, reference Figure 4 The device comprises: a determination unit 10 and an execution unit 20, wherein:

[0101] A determination unit, used to determine an external clock source reference under different scenario conditions;

[0102] The execution unit is used to perform clock and frequency synchronization between the intelligent network unit, central control unit, intelligent driving unit, intelligent cockpit unit and sub-functional systems based on an external clock source reference using the gPTP protocol stack.

[0103] In an embodiment of the present invention, a clock and frequency synchronization device for an autonomous driving vehicle is provided. The autonomous driving vehicle includes: an intelligent network connection unit, a central control unit, an intelligent driving unit, an intelligent cockpit unit and a sub-functional system, and the intelligent network connection unit, the central control unit, the intelligent driving unit and the intelligent cockpit unit all follow the ARM Cortex architecture, wherein the M core of the intelligent network connection unit deploys a gPTP Grandmaster master node, the M core of the central control unit deploys a gPTPGrandmaster slave node and a gPTP Bridge master node, the M core and the R core of the intelligent driving unit both deploy a gPTP Bridge slave node and a gPTP End Point master node, the A core of the intelligent driving unit deploys a gPTP End Point slave node, the M core of the intelligent cockpit unit deploys a gPTP Bridge slave node and a gPTP End Point master node, and the sub-functional system deploys a gPTP EndPoint slave node. The method includes: determining an external clock source reference under different scenario conditions; and performing clock and frequency synchronization among the intelligent network connection unit, the central control unit, the intelligent driving unit, the intelligent cockpit unit and the sub-functional system using a gPTP protocol stack based on the external clock source reference. From the above description, it can be seen that the clock and frequency synchronization device of the autonomous driving vehicle of the present invention can achieve clock and frequency synchronization of the autonomous driving vehicle with high synchronization accuracy, thereby alleviating the technical problem that the prior art cannot achieve clock and frequency synchronization of the autonomous driving vehicle.

[0104] Optionally, the determination unit is also used to: when the number of GNSS satellites observed by the GNSS antenna of the autonomous driving vehicle is not less than 4, use the GNSS clock obtained during the positioning solution of the GNSS receiver as an external clock source reference; when the number of GNSS satellites observed by the GNSS antenna of the autonomous driving vehicle is less than 4, use the atomic clock of any observed GNSS satellite as an external clock source reference; when the GNSS antenna of the autonomous driving vehicle cannot observe any GNSS satellite, obtain the network clock through the modem of the intelligent network connection unit, and use the network clock as the external clock source reference; when the GNSS antenna of the autonomous driving vehicle cannot observe any GNSS satellite and there is no network coverage in the area where the autonomous driving vehicle is located, determine the external clock source reference based on the clock when the GNSS satellite signal and the network signal are lost at the same time.

[0105] Optionally, the determination unit is also used to: use the clock when the GNSS satellite signal and the network signal are lost simultaneously as the starting clock; calculate the current clock based on the starting clock and the oscillation frequency and oscillation period of the crystal oscillator in the intelligent network connection unit; and use the current clock as the external clock source reference.

[0106] Optionally, the execution unit is also used to: complete the clock and frequency synchronization between the M core of the intelligent network unit and the M core of the central control unit through the clock synchronization message sending and receiving between the gPTP Grandmaster master node and the gPTP Grandmaster slave node, wherein the gPTP Grandmaster master node is used to obtain an external clock source reference; complete the clock and frequency synchronization between the M core of the central control unit and the M core of the intelligent driving unit, and the clock and frequency synchronization between the M core of the central control unit and the M core of the intelligent cockpit unit through the clock synchronization message sending and receiving between the gPTP Bridge master node and the gPTP Bridge slave node; complete the clock and frequency synchronization between the R core of the intelligent driving unit, the clock and frequency synchronization between the M core of the intelligent driving unit and the A core of the intelligent driving unit, and the clock and frequency synchronization between the M core of the intelligent cockpit unit and the sub-functional system through the clock synchronization message sending and receiving between the gPTP End Point master node and the gPTP End Point slave node.

[0107] Optionally, the device is further used to: calculate formula A through clock synchronization accuracy ts =α+β+γ to calculate the clock synchronization accuracy, where α represents the external accuracy. When the external clock source reference is the GNSS clock or the atomic clock of the GNSS satellite, the external accuracy is 10-20ns. When the external clock source reference is the network clock, the external accuracy is 1.5μs. β represents the internal accuracy. The internal accuracy β=B*n, B represents the time synchronization accuracy of the gPTP protocol stack, n represents the number of transmissions of the gPTP protocol stack, γ represents the margin, γ=(α+β)*b, and b represents the preset percentage value.

[0108] Optionally, the device is also used to: obtain a message message carrying a timestamp sent by the target domain controller; determine whether a delay of the message message has timed out based on the timestamp; if so, discard the message message; if not, use the message message.

[0109] Optionally, the device is also used to: calculate the time difference based on the timestamp and the current clock time of its own domain controller; if the time difference is greater than a preset threshold, determine that the delay of the message message has timed out; if the time difference is not greater than the preset threshold, determine that the delay of the message message has not timed out.

[0110] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0111] like Figure 5As shown, an electronic device 600 provided in an embodiment of the present application includes: a processor 601, a memory 602 and a bus, wherein the memory 602 stores machine-readable instructions executable by the processor 601. When the electronic device is running, the processor 601 communicates with the memory 602 through the bus, and the processor 601 executes the machine-readable instructions to perform the steps of the method for synchronously determining the clock and frequency of the autonomous driving vehicle as described above.

[0112] Specifically, the above-mentioned memory 602 and processor 601 can be general-purpose memories and processors, which are not specifically limited here. When the processor 601 runs the computer program stored in the memory 602, it can execute the above-mentioned method for synchronizing and determining the clock and frequency of the autonomous driving vehicle.

[0113] The processor 601 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 601. The above processor 601 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 602, and the processor 601 reads the information in the memory 602 and completes the steps of the above method in combination with its hardware.

[0114] Corresponding to the above-mentioned method for synchronously determining the clock and frequency of the autonomous driving vehicle, an embodiment of the present application also provides a computer-readable storage medium, which stores machine-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to execute the steps of the above-mentioned method for synchronously determining the clock and frequency of the autonomous driving vehicle.

[0115] The clock and frequency synchronization determination device of the autonomous driving vehicle provided in the embodiment of the present application can be specific hardware on the device or software or firmware installed on the device. The device provided in the embodiment of the present application has the same implementation principle and technical effects as the aforementioned method embodiment. For the sake of brief description, the parts not mentioned in the device embodiment can refer to the corresponding contents in the aforementioned method embodiment. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiment, and will not be repeated here.

[0116] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0117] For another example, the flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the device, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0118] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0119] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0120] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or partly contribute to the prior art or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions for an electronic device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the vehicle marking method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0121] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0122] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solution of the present application, rather than to limit it. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the aforementioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solution recorded in the aforementioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solution deviate from the scope of the technical solution of the embodiment of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for synchronizing the clock and frequency of an autonomous driving vehicle, characterized in that: The autonomous driving vehicle includes: an intelligent network connection unit, a central control unit, an intelligent driving unit, an intelligent cockpit unit and a sub-functional system, and the intelligent network connection unit, the central control unit, the intelligent driving unit and the intelligent cockpit unit all comply with the ARM Cortex architecture, wherein the M core of the intelligent network connection unit deploys a gPTP Grandmaster master node, the M core of the central control unit deploys a gPTP Grandmaster slave node and a gPTP Bridge master node, the M core and the R core of the intelligent driving unit both deploy a gPTP Bridge slave node and a gPTP End Point master node, the A core of the intelligent driving unit deploys a gPTP EndPoint slave node, the M core of the intelligent cockpit unit deploys a gPTP Bridge slave node and a gPTP End Point master node, and the sub-functional system deploys a gPTP End Point slave node, and the method includes: Determine the external clock source benchmark under different scenarios and working conditions; Based on the external clock source reference, the gPTP protocol stack is used to perform clock and frequency synchronization between the intelligent network connection unit, the central control unit, the intelligent driving unit, the intelligent cockpit unit and the sub-functional system; Among them, under different scenarios and working conditions, determine the external clock source benchmark, including: When the number of GNSS satellites observed by the GNSS antenna of the autonomous driving vehicle is not less than 4, the GNSS clock obtained when the GNSS receiver performs positioning calculation is used as the external clock source reference; When the number of GNSS satellites observed by the GNSS antenna of the autonomous driving vehicle is less than 4, the atomic clock of any observed GNSS satellite is used as the external clock source reference; When the GNSS antenna of the autonomous driving vehicle cannot observe any GNSS satellite, a network clock is obtained through the modem of the intelligent network connection unit, and the network clock is used as the external clock source reference; When the GNSS antenna of the autonomous driving vehicle cannot observe any GNSS satellite and there is no network coverage in the area where the autonomous driving vehicle is located, the external clock source reference is determined based on the clock when the signal of the GNSS satellite and the network signal are lost at the same time; Wherein, determining the external clock source reference based on the clock when the signal of the GNSS satellite and the network signal are lost at the same time includes: The clock when both the signal of the GNSS satellite and the network signal are lost is used as the starting clock; Calculate the current clock according to the starting clock and the oscillation frequency and oscillation period of the crystal oscillator in the intelligent network connection unit; Using the current clock as the external clock source reference; The method further comprises: The clock synchronization accuracy is calculated by formula A ts =α+β+γ calculate the clock synchronization accuracy, where α represents the external coincidence accuracy. When the external clock source reference is the GNSS clock or the atomic clock of the GNSS satellite, the external coincidence accuracy is 10-20ns. When the external clock source reference is the network clock, the external coincidence accuracy is 1.5μs. β represents the internal coincidence accuracy. , B represents the time synchronization accuracy of the gPTP protocol stack, n represents the number of transmissions of the gPTP protocol stack, and γ represents the margin. , b represents the preset percentage value.

2. The method according to claim 1, characterized in that The gPTP protocol stack is used to perform clock and frequency synchronization between the intelligent network connection unit, the central control unit, the intelligent driving unit, the intelligent cockpit unit and the sub-functional system based on the external clock source reference, including: The clock and frequency synchronization between the M core of the intelligent network connection unit and the M core of the central control unit is completed by sending and receiving clock synchronization messages between the gPTP Grandmaster master node and the gPTP Grandmaster slave node, wherein the gPTP Grandmaster master node is used to obtain the external clock source reference; The clock and frequency synchronization between the M core of the central control unit and the R core of the intelligent driving unit, the clock and frequency synchronization between the M core of the central control unit and the M core of the intelligent driving unit, and the clock and frequency synchronization between the M core of the central control unit and the M core of the intelligent cockpit unit are completed by sending and receiving clock synchronization messages between the gPTP Bridge master node and the gPTP Bridge slave node; The clock and frequency synchronization between the R core of the intelligent driving unit, the M core of the intelligent driving unit and the A core of the intelligent driving unit, and the clock and frequency synchronization between the M core of the intelligent cockpit unit and the sub-function system are completed by sending and receiving clock synchronization messages between the gPTP End Point master node and the gPTP End Point slave node.

3. The method according to claim 1, characterized in that The method further comprises: Obtain the message message with timestamp sent by the target domain controller; Determining whether the delay of the message message has timed out based on the timestamp; If it times out, the message is discarded; If it has not timed out, the message packet is used.

4. The method according to claim 3, characterized in that Determining whether the delay of the message message has timed out based on the timestamp includes: Calculate the time difference based on the timestamp and the current clock time of the own domain controller; If the time difference is greater than a preset threshold, determining that the message message delay has timed out; If the time difference is not greater than the preset threshold, it is determined that the delay of the message message has not timed out.

5. A clock and frequency synchronization device for an autonomous driving vehicle, characterized in that: The autonomous driving vehicle includes: an intelligent network connection unit, a central control unit, an intelligent driving unit, an intelligent cockpit unit and a sub-functional system, and the intelligent network connection unit, the central control unit, the intelligent driving unit and the intelligent cockpit unit all follow the ARM Cortex architecture, wherein the M core of the intelligent network connection unit deploys a gPTP Grandmaster master node, the M core of the central control unit deploys a gPTP Grandmaster slave node and a gPTP Bridge master node, the M core and the R core of the intelligent driving unit both deploy a gPTP Bridge slave node and a gPTP End Point master node, the A core of the intelligent driving unit deploys a gPTP EndPoint slave node, the M core of the intelligent cockpit unit deploys a gPTP Bridge slave node and a gPTP End Point master node, the sub-functional system deploys a gPTP End Point slave node, and the device includes: A determination unit, used to determine an external clock source reference under different scenario conditions; An execution unit, configured to execute clock and frequency synchronization among the intelligent network connection unit, the central control unit, the intelligent driving unit, the intelligent cockpit unit and the sub-functional system using a gPTP protocol stack based on the external clock source reference; Wherein, the determination unit is further used for: when the number of GNSS satellites observed by the GNSS antenna of the autonomous driving vehicle is not less than 4, using the GNSS clock obtained during the positioning solution of the GNSS receiver as the external clock source reference; when the number of GNSS satellites observed by the GNSS antenna of the autonomous driving vehicle is less than 4, using the atomic clock of any observed GNSS satellite as the external clock source reference; when the GNSS antenna of the autonomous driving vehicle cannot observe any GNSS satellite, obtaining the network clock through the modem of the intelligent network connection unit, and using the network clock as the external clock source reference; when the GNSS antenna of the autonomous driving vehicle cannot observe any GNSS satellite, and there is no network coverage in the area where the autonomous driving vehicle is located, determining the external clock source reference based on the clock when the signal of the GNSS satellite and the network signal are simultaneously lost; The determination unit is further used to: use the clock when the signal of the GNSS satellite and the network signal are lost at the same time as the starting clock; calculate the current clock according to the starting clock and the oscillation frequency and oscillation period of the crystal oscillator in the intelligent network connection unit; and use the current clock as the external clock source reference; The device is also used to: calculate the formula A through the clock synchronization accuracy ts =α+β+γ calculate the clock synchronization accuracy, where α represents the external coincidence accuracy. When the external clock source reference is the GNSS clock or the atomic clock of the GNSS satellite, the external coincidence accuracy is 10-20ns. When the external clock source reference is the network clock, the external coincidence accuracy is 1.5μs. β represents the internal coincidence accuracy. , B represents the time synchronization accuracy of the gPTP protocol stack, n represents the number of transmissions of the gPTP protocol stack, and γ represents the margin. , b represents the preset percentage value.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to execute the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Time synchronization method and device, terminal equipment and computer readable storage medium

    CN112929122A