GPTP time synchronization error determination method and related apparatus

By performing reference correction and synchronization in the navigation system, the process of determining the time synchronization error of GPTP is simplified, solving the problems of cumbersome operation and high cost in the prior art. It achieves fast and accurate determination of time synchronization accuracy and is suitable for accuracy testing and communication protocol improvement of vehicle navigation systems.

CN116106940BActive Publication Date: 2026-07-21GUANGZHOU ASENSING TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU ASENSING TECH CO LTD
Filing Date
2023-03-29
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In existing technologies, the GPTP time synchronization process is cumbersome and costly, making it difficult to quickly and accurately determine the time synchronization accuracy.

Method used

By connecting two navigation systems to the same GNSS antenna for reference calibration, the calibration system time of one navigation system is used as the GPTP time synchronization time source to synchronize with the other navigation system, and the GPTP time synchronization error is calculated based on the synchronized calibration system time and the preset reference time error.

Benefits of technology

It simplifies the process of determining GPTP time synchronization error, enables rapid and accurate determination of GPTP time synchronization accuracy, reduces equipment and manpower costs, and is suitable for accuracy testing and communication protocol improvement of vehicle navigation systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116106940B_ABST
    Figure CN116106940B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of vehicle navigation, and provides a GPTP time synchronization error determination method and related devices, and the method applied to a first navigation system comprises the following steps: receiving a synchronization command sent by a second navigation system, and synchronizing a corrected system time with a GPTP time synchronization time source based on the synchronization command, wherein the corrected system time is a time after the system time of the first navigation system is corrected by a GNSS antenna, and the GPTP time synchronization time source is a time after the system time of the second navigation system is corrected by a GNSS antenna; obtaining a decimal part of the corrected system time after synchronization; and calculating a GPTP time synchronization error according to the decimal part and a preset reference time error. The application can conveniently and quickly determine the precision of GPTP time synchronization according to the determined GPTP time synchronization error.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle navigation technology, and more specifically, to a method and related apparatus for determining GPTP time synchronization error. Background Technology

[0002] With the rapid development of automotive Ethernet and autonomous driving technology, General Precise Time Protocol (GPTP) time synchronization technology has become the mainstream time synchronization method for multi-sensor autonomous driving. However, the GPTP time synchronization process involves multiple request and response steps and unavoidable time delays in hardware. Therefore, it is necessary to accurately determine this delay, i.e., the accuracy of GPTP time synchronization.

[0003] How to simplify the process of determining the accuracy of GPTP time synchronization is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0004] The purpose of this invention is to provide a method and related apparatus for determining GPTP time synchronization error, which can simplify the process of determining GPTP time synchronization error and thus conveniently and quickly determine the accuracy of GPTP time synchronization based on the determined GPTP time synchronization error.

[0005] The embodiments of the present invention can be implemented as follows:

[0006] In a first aspect, the present invention provides a method for determining GPTP time synchronization error, applied to a first navigation system, wherein the first navigation system and a second navigation system are connected to the same Global Navigation Satellite System (GNSS) antenna, the method comprising:

[0007] The system receives a synchronization command sent by the second navigation system and synchronizes the corrected system time with the GPTP time synchronization source based on the synchronization command. The corrected system time is the time after the first navigation system performs reference correction on its system time through the GNSS antenna. The GPTP time synchronization source is the time after the second navigation system performs reference correction on its system time through the GNSS antenna.

[0008] Obtain the fractional part of the synchronized and corrected system time;

[0009] The GPTP time synchronization error is calculated based on the fractional part and the preset reference time error.

[0010] In an optional implementation, the step of obtaining the fractional part of the synchronized corrected system time includes:

[0011] An external interrupt is triggered, and the fractional part is obtained when the service function of the external interrupt is executed.

[0012] In an optional implementation, the first navigation system includes a GPS module, the GPS module includes a PPS interface, and the external interrupt is triggered through the PPS interface.

[0013] In an optional implementation, the step of calculating the GPTP time synchronization error based on the fractional part and a preset reference time error includes:

[0014] Calculate the difference between the fractional part and the reference time error;

[0015] The difference is taken as the GPTP time synchronization error.

[0016] In an optional implementation, the method further includes:

[0017] Obtain PPS error;

[0018] The PPS error is used as the reference time error.

[0019] In an optional implementation, the step of synchronizing the corrected system time with the GPTP time synchronization source based on the synchronization command sent by the second navigation system includes:

[0020] Based on the synchronization command sent by the second navigation system, the time difference between the correction system time and the GPTP time synchronization time source is calculated;

[0021] Based on the time difference, the time of the correction system is synchronized with the GPTP time synchronization source.

[0022] In an optional implementation, the step of calculating the time difference between the correction system time and the GPTP time synchronization source based on the synchronization command sent by the second navigation system includes:

[0023] Receive the synchronization command sent by the second navigation system at the first transmission time, and record the first reception time of the synchronization command;

[0024] Receive subsequent commands sent by the second navigation system at a second transmission time, wherein the subsequent commands include the first transmission time;

[0025] The system receives a delay response command sent by the second navigation system, the delay response command responding to a delay request command sent by the first navigation system at a second sending time, and the delay response command including the second receiving time of the second navigation system receiving the delay request command;

[0026] The time difference is calculated based on the first transmission time, the second transmission time, the first reception time, and the second reception time.

[0027] In an optional implementation, the first navigation system includes a GPS module, and the method further includes:

[0028] GPS time is obtained through the GNSS antenna;

[0029] The system time of the first navigation system is corrected using the GPS time to obtain the corrected system time of the first navigation system.

[0030] In an optional implementation, the method further includes:

[0031] The time synchronization accuracy of the first navigation system is evaluated based on the GPTP time synchronization error, and the evaluation result is obtained.

[0032] In an optional implementation, the method further includes:

[0033] The time accuracy of the first navigation system is optimized based on the evaluation results.

[0034] Secondly, the present invention provides a GPTP time synchronization error determination method, applied to a second navigation system, wherein the second navigation system and the first navigation system are connected to the same Global Navigation Satellite System (GNSS) antenna, the method comprising:

[0035] GPS time is obtained through the GNSS antenna;

[0036] The GPS time is used to perform reference correction on the system time of the second navigation system;

[0037] The system time of the second navigation system after benchmark correction is used as the time source for GPTP time synchronization.

[0038] A synchronization command is sent to the first navigation system to instruct the first navigation system to synchronize the corrected system time with the GPTP time synchronization source based on the synchronization command, obtain the fractional part of the synchronized corrected system time, and calculate the GPTP time synchronization error based on the fractional part and a preset reference time error. The corrected system time is the time after the first navigation system performs reference correction on the system time of the first navigation system through the GNSS antenna.

[0039] Thirdly, the present invention provides a GPTP time synchronization error determination device, applied to a first navigation system, wherein the first navigation system and a second navigation system are connected to the same Global Navigation Satellite System (GNSS) antenna, the device comprising:

[0040] The receiving module is used to receive the synchronization command sent by the second navigation system, and synchronize the corrected system time with the GPTP time synchronization source based on the synchronization command. The corrected system time is the time after the first navigation system performs reference correction on the system time of the first navigation system through the GNSS antenna. The GPTP time synchronization source is the time after the second navigation system performs reference correction on the system time of the second navigation system through the GNSS antenna.

[0041] The first acquisition module is used to acquire the fractional part of the synchronized and corrected system time.

[0042] The calculation module is used to calculate the GPTP time synchronization error based on the fractional part and the preset reference time error.

[0043] Fourthly, the present invention provides a GPTP time synchronization error determination device, applied to a second navigation system, wherein the second navigation system and the first navigation system are connected to the same Global Navigation Satellite System (GNSS) antenna, and the device comprises:

[0044] The second acquisition module is used to acquire GPS time through the GNSS antenna;

[0045] The calibration module is used to perform reference calibration on the system time of the second navigation system using the GPS time;

[0046] The correction module is also used to use the system time of the second navigation system after reference correction as the GPTP time synchronization time source;

[0047] The sending module is used to send a synchronization command to the first navigation system, instructing the first navigation system to synchronize the corrected system time with the GPTP time synchronization source based on the synchronization command, obtain the fractional part of the synchronized corrected system time, and calculate the GPTP time synchronization error based on the fractional part and a preset reference time error. The corrected system time is the time after the first navigation system performs reference correction on the system time of the first navigation system through the GNSS antenna.

[0048] Fifthly, the present invention provides a navigation system that connects to a Global Navigation Satellite System (GNSS) antenna, including a processor and a memory. The memory is used to store a program, and the processor is used to implement, when executing the program, the GPTP time synchronization error determination method described in any of the foregoing embodiments, or to implement the GPTP time synchronization error determination method described in the foregoing embodiments.

[0049] In a sixth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the GPTP time synchronization error determination method described in any of the foregoing embodiments, or implements the GPTP time synchronization error determination method described in the foregoing embodiments.

[0050] In a seventh aspect, the present invention provides a time synchronization error determination system, the time synchronization error determination system comprising a first navigation system and a second navigation system, the first navigation system and the second navigation system being connected to the same Global Navigation Satellite System (GNSS) antenna, the first navigation system being used to implement the GPTP time synchronization error determination method described in any of the foregoing embodiments, and the second navigation system being used to implement the GPTP time synchronization error determination method described in the foregoing embodiments.

[0051] Compared with existing technologies, the embodiments of the present invention utilize two navigation systems connected to the same Global Navigation Satellite System (GNSS) antenna. First, the two navigation systems are reference-calibrated using the GNSS antenna. Then, the reference-calibrated system time of one navigation system is used as the GPTP time synchronization source, and the calibrated system time of the other navigation system is synchronized with it. Finally, the GPTP time synchronization error is calculated based on the synchronized calibrated system time and a preset reference time error. This simplifies the process of determining the GPTP time synchronization error and enables convenient and quick determination of the GPTP time synchronization accuracy based on the determined GPTP time synchronization error. Attached Figure Description

[0052] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0053] Figure 1 An example diagram of a time synchronization error determination system provided in an embodiment of the present invention.

[0054] Figure 2 This is a block diagram of a navigation system provided in an embodiment of the present invention.

[0055] Figure 3 A flowchart illustrating the GPTP time synchronization error determination method for a first navigation system provided in an embodiment of the present invention.

[0056] Figure 4 This is a flowchart illustrating a method for determining GPTP time synchronization error in a second navigation system, as provided in an embodiment of the present invention.

[0057] Figure 5 An example diagram of the timeline during time synchronization provided in an embodiment of the present invention.

[0058] Figure 6 This is a block diagram of a first GPTP time synchronization error determination device applied to a first navigation system, provided in an embodiment of the present invention.

[0059] Figure 7 This is a block diagram of a second GPTP time synchronization error determination device applied to a second navigation system, provided in an embodiment of the present invention.

[0060] Icons: 10-First navigation system; 20-Second navigation system; 30-Navigation system; 31-Processor; 32-Memory; 33-Bus; 34-GPS module; 100-First GPTP time synchronization error determination device; 110-Receiving module; 120-First acquisition module; 130-Calculation module; 140-Evaluation module; 200-Second GPTP time synchronization error determination device; 210-Second acquisition module; 220-Correction module; 230-Transmitting module. Detailed Implementation

[0061] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0062] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0063] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0064] In the description of this invention, it should be noted that if terms such as "upper," "lower," "inner," or "outer" are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product of this invention is usually placed, they are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.

[0065] Furthermore, the terms "first" and "second" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0066] It should be noted that, where there is no conflict, the features in the embodiments of the present invention can be combined with each other.

[0067] To determine the time delay during GPTP synchronization, one approach is to receive the full-second output pulses from both synchronizing parties, connect the two pulses to an oscilloscope, and measure the time difference between the rising and falling edges. This time difference can then be used to characterize the accuracy of time synchronization. However, this testing method requires additional measuring tools, and each synchronization accuracy measurement necessitates manual operation by the operator. The operation steps and procedures are cumbersome and time-consuming, resulting in high equipment and labor costs. Furthermore, each operation can only measure the accuracy at a single moment. For long-term, high-density testing, a significant investment of manpower and equipment resources is required. In addition to the cumbersome operation steps and procedures, statistical analysis is also necessary after the test, further complicating the testing cycle and hindering the scalability and efficiency of accuracy testing.

[0068] In view of this, this embodiment provides a method and related apparatus for determining GPTP time synchronization error. By simplifying the process of determining GPTP time synchronization error, it is possible to conveniently and quickly determine the accuracy of GPTP time synchronization based on the determined GPTP time synchronization error. It can accurately and automatically measure the GPTP time synchronization accuracy without relying on equipment such as oscilloscopes, and can obtain continuous and direct error values, which is convenient for subsequent stress testing and accuracy statistics. It provides a strong impetus for high-speed and efficient verification of the effectiveness of accuracy algorithms and communication protocol improvements. It will be described in detail below.

[0069] Please refer to Figure 1 , Figure 1 An example diagram of a time synchronization error determination system provided in an embodiment of the present invention. Figure 1In this system, the time synchronization error determination system includes a first navigation system 10 and a second navigation system 20 that require time synchronization and operate in the same environment. Both are connected to the same GNSS antenna. The GPTP time of the second navigation system 20 is used as the standard, and it is also referred to as the master system. The first navigation system 10 uses the GPTP time standard of the second navigation system 20 to keep its own time synchronized with the GPTP time of the second navigation system 20, and it is also referred to as the slave system. The master and slave systems respectively acquire GPS time through the GNSS antenna and synchronize their respective system time with the GPS time to complete the reference correction of their respective system time. Then, using the system time corrected by the master as the GPTP time synchronization time source, the slave and master systems perform GPTP time synchronization. The slave system triggers an external interrupt to finally obtain the GPTP time synchronization error, which is used to evaluate the GPTP time synchronization accuracy.

[0070] Both the first navigation system 10 and the second navigation system 20 can be in-vehicle navigation systems installed on vehicles. In-vehicle navigation systems include navigation software and devices that run the navigation software, such as in-vehicle terminals.

[0071] based on Figure 1 This embodiment also provides a block diagram of a navigation system 30, please refer to... Figure 2 , Figure 2 This is a block diagram of a navigation system 30 provided in an embodiment of the present invention. The navigation system 30 can be... Figure 1 The first navigation system 10, or Figure 1 The second navigation system 20 in the system includes a processor 31, a memory 32, a bus 33, and a GPS module 34. The processor 31, the memory 32, and the GPS module 34 are connected via the bus 33.

[0072] Processor 31 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed through integrated logic circuits in the hardware of processor 31 or through software instructions. Processor 31 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), an On-Premises Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0073] The memory 32 is used to store programs, such as the first GPTP time synchronization error determination device applied to the first navigation system 10 in the embodiments of the present invention, or the second GPTP time synchronization error determination device applied to the second navigation system 20. Both the first GPTP time synchronization error determination device and the second GPTP time synchronization error determination device include at least one software function module that can be stored in the memory 32 in the form of software or firmware. After receiving the execution instruction, the processor 31 executes the program to implement the GPTP time synchronization error determination method applied to the first navigation system 10 in the embodiments of the present invention, or the second GPTP time synchronization error determination method applied to the second navigation system 20.

[0074] The memory 32 may include high-speed random access memory (RAM) or non-volatile memory. Optionally, the memory 32 may be a storage device built into the processor 31 or a storage device independent of the processor 31.

[0075] Bus 33 can be an ISA bus, PCI bus, or EISA bus, etc. Figure 2 It is indicated by a single double-headed arrow, but does not mean that there is only one bus or one type of bus.

[0076] GPS module 34 is an integrated circuit comprising an electromagnetic frequency (RF) chip, a baseband chip, and a core CPU, along with related peripheral circuits. GPS module 34 includes a Pulse Per Second (PPS) interface, a dedicated time synchronization interface that outputs a 1Hz pulse train within a certain time period, accurate to the millisecond level. It can be used to calibrate timers, counters, and other timing applications. High-precision GPS time can be obtained via a GNSS antenna using the PPS interface. The PPS interface effectively achieves more accurate time synchronization with the GPS system, enabling better precise positioning and time control functions in applications.

[0077] based on Figure 1 and Figure 2 This embodiment provides a method for determining GPTP time synchronization error, applied to... Figure 1 The first navigation system in China and Figure 2 For Chinese navigation systems, please refer to... Figure 3 , Figure 3 This is a flowchart illustrating a method for determining GPTP time synchronization error in a first navigation system, as provided in an embodiment of the present invention. The method includes the following steps:

[0078] Step S101: Receive the synchronization command sent by the second navigation system, and synchronize the corrected system time with the GPTP time synchronization source based on the synchronization command. The corrected system time is the time after the first navigation system performs reference correction on the system time of the first navigation system through the GNSS antenna. The GPTP time synchronization source is the time after the second navigation system performs reference correction on the system time of the second navigation system through the GNSS antenna.

[0079] In this embodiment, the corrected system time is obtained by the first navigation system 10 through a GNSS antenna to perform reference correction on the system time of the first navigation system. The GPTP time synchronization source is obtained by the second navigation system 20 through a GNSS antenna to perform reference correction on the system time of the second navigation system. That is, the reference correction methods of the first navigation system 10 and the second navigation system 20 are the same. For example, both can be reference corrected by synchronizing with GPS time, that is, the system time after reference correction of both is the time synchronized with GPS time.

[0080] Step S102: Obtain the fractional part of the synchronized correction system time.

[0081] In this embodiment, the decimal part reflects the precision of the time; the more digits the decimal part includes, the higher the precision.

[0082] Step S103: Calculate the GPTP time synchronization error based on the decimal part and the preset reference time error.

[0083] In this embodiment, the preset reference time error is related to the hardware parameters of the first navigation system 10, which can be predetermined at the time of manufacturing.

[0084] The method provided in this embodiment first performs reference calibration on the first navigation system 10 and the second navigation system 20, and then performs GPTP synchronization on the two based on the time after reference calibration. Based on the time of the calibrated system after synchronization and the preset reference time error, the GPTP time synchronization error is calculated, which simplifies the process of determining the GPTP time synchronization error. In this way, the accuracy of GPTP time synchronization can be determined conveniently and quickly based on the determined GPTP time synchronization error.

[0085] In an optional implementation, one way to obtain the fractional part of the synchronized corrected system time is to trigger an external interrupt and obtain the fractional part when the service function of the external interrupt is executed.

[0086] As a way to trigger an external interrupt, it can be triggered through the PPS interface of the GPS module in the first navigation system 10.

[0087] In an optional implementation, one method for calculating GPTP time synchronization error is as follows:

[0088] First, calculate the difference between the decimal part and the reference time error;

[0089] In an optional implementation, the reference time error can be the PPS error, which can be obtained in advance by consulting the system antenna board datasheet or by obtaining it based on the PPS interface parameters.

[0090] Secondly, the difference is used as the GPTP time synchronization error.

[0091] In an optional implementation, to synchronize the calibration system time of the first navigation system 10 with the GPTP time synchronization source, one synchronization method is as follows:

[0092] First, based on the synchronization command sent by the second navigation system, the time difference between the correction system time and the GPTP time synchronization source is calculated;

[0093] In this embodiment, one method for calculating time difference is:

[0094] First, receive the synchronization command sent by the second navigation system at the first transmission time, and record the first reception time of the synchronization command;

[0095] Second, receive subsequent commands sent by the second navigation system at the second transmission time, the subsequent commands including the first transmission time;

[0096] Third, receive a delay response command sent by the second navigation system. The delay response command responds to the delay request command sent by the first navigation system at the second sending time, and the delay response command includes the second receiving time of the second navigation system receiving the delay request command.

[0097] Fourth, calculate the time difference based on the first transmission time, the second transmission time, the first reception time, and the second reception time.

[0098] In this embodiment, the synchronization command is also called the Sync command, the follow-up command is also called the Follow_Up command, the delay request command is also called the Delay_Req command, and the delay response command is also called the Delay_Resp command. The formula for calculating the time difference can be: clock_offset = (t3 – t4 + t2 – t1) / 2, where clock_offset is the time difference, which represents the deviation between the correction system time and the GPTP time synchronization time source, t1 is the first transmission time, t2 is the first reception time, t3 is the second transmission time, and t4 is the second reception time.

[0099] Secondly, based on the time difference, the correction system time is synchronized with the GPTP time synchronization source.

[0100] In this embodiment, to ensure that the times of the first navigation system 10 and the second navigation system 20 are based on the same reference before GPTP time synchronization, and to avoid introducing unnecessary errors that could affect the accurate determination of precision, this embodiment also provides a method for reference correction of the system time of the first navigation system:

[0101] First, GPS time is obtained via a GNSS antenna;

[0102] Secondly, the system time of the first navigation system is corrected using GPS time to obtain the corrected system time of the first navigation system.

[0103] In this embodiment, after obtaining the GPTP time synchronization error, the time synchronization accuracy of the first navigation system can be evaluated to determine whether it meets the preset accuracy requirements. One implementation method is as follows:

[0104] The time synchronization accuracy of the first navigation system was evaluated based on the GPTP time synchronization error, and the evaluation results were obtained.

[0105] In this embodiment, the evaluation result may be whether the GPTP time synchronization error reaches a preset accuracy or whether it is within a preset accuracy range.

[0106] In this embodiment, after obtaining the evaluation results, as an application scenario, the time accuracy of the first navigation system can be optimized based on the evaluation results to ensure that the time accuracy of the first navigation system meets the requirements of the application scenario. One implementation method is as follows:

[0107] The time accuracy of the first navigation system was optimized based on the evaluation results.

[0108] It is understandable that the evaluation criteria may differ in different application scenarios, that is, the preset accuracy may be different, or the preset accuracy range may be different.

[0109] To complement the first navigation system 10, this embodiment also provides a GPTP time synchronization error determination method applied to the second navigation system 20. Please refer to [reference needed]. Figure 4 , Figure 4 This is a flowchart illustrating a method for determining GPTP time synchronization error in a second navigation system, as provided in an embodiment of the present invention. The method includes the following steps:

[0110] Step S201: Obtain GPS time via GNSS antenna.

[0111] Step S202: Use GPS time to perform reference correction on the system time of the second navigation system.

[0112] Step S203: Use the system time of the second navigation system after reference correction as the time source for GPTP time synchronization.

[0113] Step S204: Send a synchronization command to the first navigation system to instruct the first navigation system to synchronize the corrected system time with the GPTP time synchronization source based on the synchronization command, obtain the fractional part of the synchronized corrected system time, and calculate the GPTP time synchronization error based on the fractional part and the preset reference time error. The corrected system time is the time after the first navigation system performs reference correction on the system time of the first navigation system through the GNSS antenna.

[0114] It should be noted that the reference correction of the system time of the second navigation system 20 using GPS time is the same as the reference correction of the system time of the first navigation system 10 mentioned above, so as to ensure that the two are based on the same reference and the same correction method, and to minimize the possible errors that may be introduced and affect the accuracy of the final result.

[0115] In this embodiment, for a complete description of the time synchronization between the first navigation system 10 and the second navigation system 20 in the entire time synchronization error determination system, please refer to... Figure 5 , Figure 5 This is an example diagram of the timeline during time synchronization provided in an embodiment of the present invention. Figure 5 In this system, the host is the second navigation system 20, and the slave is the first navigation system 10. The host and the slave synchronize their system time and GPS time through the PPS interface of their respective GPS modules to perform reference correction on their respective system time. After reference correction, the slave synchronizes its own corrected system time (i.e., the corrected system time in this embodiment) with the host's own corrected system time (i.e., the GPTP time synchronization time source in this embodiment). Then, the slave triggers a PPS interrupt and calculates the GPTP time synchronization error based on the decimal part of the obtained GPTP time-synchronized system time and the PPS error, which is the GPTP synchronization accuracy.

[0116] To perform the corresponding steps in the above embodiments and various possible implementations, the implementation method of the first GPTP time synchronization error determination device is given below. Please refer to... Figure 6 , Figure 6 This is a block diagram of a first GPTP time synchronization error determination device 100 provided in an embodiment of the present invention. The first GPTP time synchronization error determination device 100 is applied to... Figure 1 The first navigation system in China or Figure 2The navigation system in this embodiment. It should be noted that the first GPTP time synchronization error determination device 100 provided in this embodiment has the same basic principle and technical effect as the above embodiment. For the sake of brevity, some parts of this embodiment are not mentioned.

[0117] The first GPTP time synchronization error determination device 100 includes a receiving module 110, a first acquisition module 120, a calculation module 130, and an evaluation module 140.

[0118] The receiving module 110 is used to receive the synchronization command sent by the second navigation system, and synchronize the corrected system time with the GPTP time synchronization source based on the synchronization command. The corrected system time is the time after the first navigation system performs reference correction on the system time of the first navigation system through the GNSS antenna. The GPTP time synchronization source is the time after the second navigation system performs reference correction on the system time of the second navigation system through the GNSS antenna.

[0119] The first acquisition module 120 is used to acquire the fractional part of the synchronized correction system time;

[0120] In an optional implementation, the first acquisition module 120 is specifically used to: trigger an external interrupt and acquire the fractional part when executing the service function of the external interrupt.

[0121] In an optional implementation, the first navigation system includes a GPS module, the GPS module includes a PPS interface, and the external interrupt specifically triggered by the first acquisition module 120 is triggered through the PPS interface.

[0122] In an optional implementation, the first acquisition module 120 is further configured to: acquire the PPS error; and use the PPS error as a reference time error.

[0123] The calculation module 130 is used to calculate the GPTP time synchronization error based on the decimal part and the preset reference time error.

[0124] In an optional implementation, the calculation module 130 is specifically used to: calculate the difference between the fractional part and the reference time error; and use the difference as the GPTP time synchronization error.

[0125] In an optional implementation, the calculation module 130 is specifically used to: calculate the time difference between the correction system time and the GPTP time synchronization source based on the synchronization command sent by the second navigation system; and synchronize the correction system time with the GPTP time synchronization source according to the time difference.

[0126] In an optional implementation, the calculation module 130 is specifically used to calculate the time difference between the correction system time and the GPTP time synchronization source based on the synchronization command sent by the second navigation system. Specifically, it is used to: receive the synchronization command sent by the second navigation system at a first transmission time and record the first reception time of receiving the synchronization command; receive subsequent commands sent by the second navigation system at a second transmission time, the subsequent commands including the first transmission time; receive a delay response command sent by the second navigation system, the delay response command responding to the delay request command sent by the first navigation system at the second transmission time, and the delay response command including the second reception time of the second navigation system receiving the delay request command; and calculate the time difference based on the first transmission time, the second transmission time, the first reception time, and the second reception time.

[0127] In an optional implementation, the first navigation system includes a GPS module, and the first acquisition module 120 is further configured to: acquire GPS time through a GNSS antenna; and perform reference correction on the system time of the first navigation system using the GPS time to obtain the corrected system time of the first navigation system.

[0128] In an optional implementation, the evaluation module 140 is used to: evaluate the time synchronization accuracy of the first navigation system based on the GPTP time synchronization error, and obtain an evaluation result.

[0129] In an optional implementation, the evaluation module 140 is further configured to: optimize the time accuracy of the first navigation system based on the evaluation results.

[0130] To perform the corresponding steps in the above embodiments and various possible implementations, the implementation method of the second GPTP time synchronization error determination device is given below. Please refer to... Figure 7 , Figure 7 This is a block diagram of a second GPTP time synchronization error determination device 200 provided in an embodiment of the present invention. The second GPTP time synchronization error determination device 200 is applied to... Figure 1 The second navigation system or Figure 2 The navigation system in the example. It should be noted that the second GPTP time synchronization error determination device 200 provided in this embodiment has the same basic principle and technical effect as the above embodiment, and for the sake of brevity, some parts of this embodiment are not mentioned.

[0131] The second GPTP time synchronization error determination device 200 includes a second acquisition module 210, a correction module 220, and a transmission module 230.

[0132] The second acquisition module 210 is used to acquire GPS time via a GNSS antenna;

[0133] The calibration module 220 is used to perform reference calibration on the system time of the second navigation system using GPS time;

[0134] The calibration module 220 is also used to use the system time of the second navigation system after reference calibration as the time source for GPTP time synchronization;

[0135] The sending module 230 is used to send a synchronization command to the first navigation system, instructing the first navigation system to synchronize the corrected system time with the GPTP time synchronization source based on the synchronization command, obtain the fractional part of the synchronized corrected system time, and calculate the GPTP time synchronization error based on the fractional part and the preset reference time error. The corrected system time is the time after the first navigation system performs reference correction on the system time of the first navigation system through the GNSS antenna.

[0136] This invention provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the determination of GPTP time synchronization error applied to the first navigation system in the aforementioned embodiments, or implements the determination of GPTP time synchronization error applied to the second navigation system in the aforementioned embodiments.

[0137] In summary, this invention provides a method and related apparatus for determining GPTP time synchronization error. The method, applied to a first navigation system, includes: receiving a synchronization command from a second navigation system; synchronizing the corrected system time with a GPTP time synchronization source based on the synchronization command; the corrected system time is the time after the first navigation system performs reference correction on its system time using a GNSS antenna; the GPTP time synchronization source is the time after the second navigation system performs reference correction on its system time using a GNSS antenna; obtaining the fractional part of the synchronized corrected system time; and calculating the GPTP time synchronization error based on the fractional part and a preset reference time error. Compared with existing technologies, the GPTP time synchronization error determination method and related apparatus provided in this embodiment are applicable to conventional vehicle navigation systems. Since it eliminates the need for auxiliary testing using equipment such as oscilloscopes, it provides fast, accurate, continuous, and visualized GPTP time synchronization accuracy values ​​solely through software. This provides a strong impetus for high-speed and efficient verification of the effectiveness of accuracy algorithms and communication protocol improvements. Simultaneously, it avoids manual operation by personnel, reducing the cumbersome operation steps and processes that lead to long testing cycles, thereby reducing equipment and labor costs.

[0138] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for determining GPTP time synchronization error, characterized in that, Applied to a first navigation system, wherein the first navigation system and a second navigation system are connected to the same Global Navigation Satellite System (GNSS) antenna, the first navigation system includes a GPS module, the GPS module includes a PPS interface, and the method includes: The system receives a synchronization command sent by the second navigation system and synchronizes the corrected system time with the GPTP time synchronization source based on the synchronization command. The corrected system time is the time after the first navigation system performs reference correction on its system time through the GNSS antenna. The GPTP time synchronization source is the time after the second navigation system performs reference correction on its system time through the GNSS antenna. Obtain the fractional part of the synchronized and corrected system time; Calculate the GPTP time synchronization error based on the fractional part and the preset reference time error; The step of obtaining the fractional part of the synchronized corrected system time includes: An external interrupt is triggered through the PPS interface, and the fractional part is obtained when the service function of the external interrupt is executed. The method further includes: Obtain PPS error; The PPS error is used as the reference time error.

2. The GPTP time synchronization error determination method as described in claim 1, characterized in that, The step of calculating the GPTP time synchronization error based on the fractional part and the preset reference time error includes: Calculate the difference between the fractional part and the reference time error; The difference is taken as the GPTP time synchronization error.

3. The GPTP time synchronization error determination method as described in claim 1, characterized in that, The step of synchronizing the system time with the GPTP time synchronization source based on the synchronization command sent by the second navigation system includes: Based on the synchronization command sent by the second navigation system, the time difference between the correction system time and the GPTP time synchronization time source is calculated; Based on the time difference, the time of the correction system is synchronized with the GPTP time synchronization source.

4. The GPTP time synchronization error determination method as described in claim 3, characterized in that, The step of calculating the time difference between the correction system time and the GPTP time synchronization source based on the synchronization command sent by the second navigation system includes: Receive the synchronization command sent by the second navigation system at the first transmission time, and record the first reception time of the synchronization command; Receive subsequent commands sent by the second navigation system at a second transmission time, wherein the subsequent commands include the first transmission time; The system receives a delay response command sent by the second navigation system, the delay response command responding to a delay request command sent by the first navigation system at a second sending time, and the delay response command including the second receiving time of the second navigation system receiving the delay request command; The time difference is calculated based on the first transmission time, the second transmission time, the first reception time, and the second reception time.

5. The GPTP time synchronization error determination method as described in claim 1, characterized in that, The first navigation system includes a GPS module, and the method further includes: GPS time is obtained through the GNSS antenna; The system time of the first navigation system is corrected using the GPS time to obtain the corrected system time of the first navigation system.

6. The GPTP time synchronization error determination method as described in claim 1, characterized in that, The method further includes: The time synchronization accuracy of the first navigation system is evaluated based on the GPTP time synchronization error, and the evaluation result is obtained.

7. The GPTP time synchronization error determination method as described in claim 6, characterized in that, The method further includes: The time accuracy of the first navigation system is optimized based on the evaluation results.

8. A method for determining GPTP time synchronization error, characterized in that, Applied to a second navigation system, the second navigation system and the first navigation system are connected to the same Global Navigation Satellite System (GNSS) antenna. The first navigation system includes a GPS module, the GPS module includes a PPS interface, and the method includes: GPS time is obtained through the GNSS antenna; The GPS time is used to perform reference correction on the system time of the second navigation system; The system time of the second navigation system after benchmark correction is used as the time source for GPTP time synchronization. A synchronization command is sent to the first navigation system to instruct the first navigation system to synchronize the corrected system time with the GPTP time synchronization source based on the synchronization command, obtain the fractional part of the synchronized corrected system time, and calculate the GPTP time synchronization error based on the fractional part and a preset reference time error. The corrected system time is the time after the first navigation system performs reference correction on the system time of the first navigation system through the GNSS antenna. The method for obtaining the fractional part of the synchronized corrected system time is as follows: trigger an external interrupt through the PPS interface, and obtain the fractional part when executing the service function of the external interrupt; the method for obtaining the reference time error is as follows: obtain the PPS error; and use the PPS error as the reference time error.

9. A GPTP time synchronization error determination device, characterized in that, Applied to a first navigation system, the first navigation system and the second navigation system are connected to the same Global Navigation Satellite System (GNSS) antenna. The first navigation system includes a GPS module, the GPS module includes a PPS interface, and the device includes: The receiving module is used to receive the synchronization command sent by the second navigation system, and synchronize the corrected system time with the GPTP time synchronization source based on the synchronization command. The corrected system time is the time after the first navigation system performs reference correction on the system time of the first navigation system through the GNSS antenna. The GPTP time synchronization source is the time after the second navigation system performs reference correction on the system time of the second navigation system through the GNSS antenna. The first acquisition module is used to acquire the fractional part of the synchronized and corrected system time. The calculation module is used to calculate the GPTP time synchronization error based on the fractional part and the preset reference time error. The first acquisition module is specifically used to: trigger an external interrupt through the PPS interface, and acquire the fractional part when executing the service function of the external interrupt; The receiving module is further configured to: acquire the PPS error; and use the PPS error as the reference time error.

10. A GPTP time synchronization error determination device, characterized in that, The device is applied to a second navigation system, which, like the first navigation system, is connected to the same Global Navigation Satellite System (GNSS) antenna. The first navigation system includes a GPS module, which includes a PPS interface. The device includes: The second acquisition module is used to acquire GPS time through the GNSS antenna; The calibration module is used to perform reference calibration on the system time of the second navigation system using the GPS time; The correction module is also used to use the system time of the second navigation system after reference correction as the GPTP time synchronization time source; The sending module is used to send a synchronization command to the first navigation system, instructing the first navigation system to synchronize its corrected system time with the GPTP time synchronization source based on the synchronization command, obtain the fractional part of the synchronized corrected system time, and calculate the GPTP time synchronization error based on the fractional part and a preset reference time error. The corrected system time is the time after the first navigation system performs reference correction on its system time through the GNSS antenna. The fractional part of the synchronized corrected system time is obtained by triggering an external interrupt through the PPS interface and obtaining the fractional part when executing the service function of the external interrupt. The reference time error is obtained by obtaining the PPS error and using the PPS error as the reference time error.

11. A navigation system, characterized in that, The navigation system accesses a Global Navigation Satellite System (GNSS) antenna and includes a processor and a memory. The memory is used to store a program, and the processor is used to implement the GPTP time synchronization error determination method according to any one of claims 1-7, or to implement the GPTP time synchronization error determination method according to claim 8, when executing the program.

12. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a processor, implements the GPTP time synchronization error determination method according to any one of claims 1-7, or implements the GPTP time synchronization error determination method according to claim 8.

13. A time synchronization error determination system, characterized in that, The time synchronization error determination system includes a first navigation system and a second navigation system. The first navigation system and the second navigation system are connected to the same Global Navigation Satellite System (GNSS) antenna. The first navigation system is used to implement the GPTP time synchronization error determination method according to any one of claims 1-7, and the second navigation system is used to implement the GPTP time synchronization error determination method according to claim 8.