Time synchronization apparatus and method in a device

By using time-stamped source selection and domain time synchronization processors in the vehicle network, the time synchronization problem between different control domains is solved, enabling simultaneous data collection from sensors and precise coordination of vehicle control, and ensuring the real-time nature of cross-domain messages.

CN117295039BActive Publication Date: 2025-12-05HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210688282.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-17
Publication Date
2025-12-05
Estimated Expiration
2042-06-17

AI Technical Summary

Technical Problem

In vehicular networks, different control domains have different physical interfaces, time stamp formats, and time synchronization mechanisms, which makes it impossible for sensors to collect data simultaneously, vehicle control to start and stop simultaneously, and cross-domain message transmission cannot guarantee real-time performance.

Method used

The system employs a time-stamp source selection and domain time synchronization processor. It achieves cross-control domain time synchronization through a cross-domain time-stamp error calculator and a time-stamp timer. It uses an intra-domain time synchronizer and a time-stamp timer to synchronize time in different control domains. The cross-domain time-stamp error calculator is used to calculate the cross-domain time-stamp correction word and correct the value of the business time stamp to achieve accurate time synchronization.

Benefits of technology

It enables simultaneous data collection from sensors in different control domains within the vehicle, improving the coordination and accuracy of vehicle control and ensuring the real-time nature of cross-control domain messages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117295039B_ABST
    Figure CN117295039B_ABST
Patent Text Reader

Abstract

The application discloses a time synchronization device and method in a device, the device comprising a plurality of control domains, the device comprising: a time scale selection source, configured to send a first time scale of a first control domain in the plurality of control domains to a second control domain in the plurality of control domains, the first time scale being a time after a first device in the first control domain performs intra-domain time synchronization; N domain time synchronization processors, comprising an intra-domain time synchronizer, configured to synchronize the time of the first device in the second control domain to the first time scale; a time scale timer comprising a service time scale Timer, configured to correct the value of the service time scale Timer of the second control domain according to a cross-domain time scale correction word to obtain the first time scale; and a cross-domain time scale error calculator, configured to determine the cross-domain time scale correction word according to a second time scale and the first time scale for the second control domain, the second time scale being the value of the service time scale Timer of the second control domain, and N being an integer greater than or equal to 2. The application realizes time synchronization across control domains.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, and in particular to a time synchronization device and method in a device. BACKGROUND

[0002] In a vehicle network, there are multiple application scenarios that need to implement time synchronization function within a subnet. For example, for an automatic driving scenario, a mobile data center (MDC) system needs to receive data of each sensor in real time, then make a decision and implement vehicle driving control. There is a high time synchronization requirement for each sensor and the node where the algorithm runs. For a management and maintenance scenario, including log recording, diagnosis, fault responsibility determination, etc., accurate global time needs to be recorded. For a time-triggered controller area network (TTCAN) / time sensitive network (TSN) scenario, based on controller area network (CAN) / ethereum (ETH) message sending, deterministic delay of the message is implemented to solve the real-time problem of the message while improving the bus load.

[0003] However, each application scenario in the vehicle network belongs to different control domains. Different control domains have different physical interfaces, time scale formats, time synchronization mechanisms, etc., and thus are usually independent and unrelated to each other. Sensors of different control domains cannot collect data at the same time, resulting in that vehicle control cannot be started and stopped at the same time. In addition, the types of sensors of intelligent vehicles are increasing, and in the future, there may be cross-domain message delivery, such as TSN to TTCAN. Since the time windows of TSN and TTCAN are not consistent, the real-time performance of such message delivery cannot be guaranteed. SUMMARY

[0004] The present application provides a time synchronization device and method in a device, which can solve the problem that the time of devices in cross-control domains cannot be synchronized.

[0005] In a first aspect, the present application provides a time synchronization device in a device, which comprises:

[0006] The time scale selection source is configured to send a first time scale of a first control domain to a second control domain in the plurality of control domains, the first control domain and the second control domain being respectively one of the plurality of control domains, and the first time scale being a time after time synchronization within the first control domain by a first device in the first control domain.

[0007] N domain time synchronization processors; wherein each domain time synchronization processor comprises an intra-domain time synchronizer, a time scale timer and a cross-domain time scale error calculator, the time scale timer comprises a service time scale Timer, each domain time synchronization processor is in a different control domain, and N is an integer greater than or equal to 2.

[0008] The cross-domain time scale error calculator is configured to determine, for the second control domain, a cross-domain time scale correction word according to the second time scale and the first time scale.

[0009] The service time scale Timer is configured to correct the value of the service time scale Timer for the second control domain according to the cross-domain time scale correction word, and obtain the first time scale.

[0010] The intra-domain time synchronizer is configured to synchronize the time of the first device in the second control domain to the first time scale.

[0011] The application first performs intra-domain time synchronization on the first device in the first control domain to obtain the first time scale. Then, for the second control domain, a cross-domain time scale correction word is determined according to the second time scale and the first time scale. Then, for the second control domain, the value of the service time scale Timer is corrected according to the cross-domain time scale correction word, and the first time scale is obtained. Finally, the time of the first device in the second control domain is synchronized to the first time scale, realizing cross-control-domain time synchronization and effectively improving the in-vehicle control domain cooperation capability and precision. The sensors in different control domains in the vehicle network can collect data at the same time. The start and stop of different control domain ECU tasks can be more accurately controlled. At the same time, the real-time delivery of messages across control domains can be guaranteed.

[0012] In a possible implementation, the device comprises an autonomous driving vehicle device.

[0013] In a possible implementation, the intra-domain time synchronizer comprises a domain interface and a domain time synchronization protocol processor. The domain interface is a physical interface of the first device in the control domain. The domain time synchronization protocol processor is configured to synchronize the time of a third device in the first control domain according to the time of a second device for the first control domain, and output a domain time scale correction word. The second device is a device determined from the first device in the first control domain according to service requirements. The second device represents a time synchronization reference. The third device is a device other than the second device in the first control domain. Alternatively, the domain time synchronization protocol processor is configured to synchronize the time of the first device in the first control domain according to the value of the service time scale Timer of the domain interface.

[0014] In this possible implementation, for the first control domain, the first device is subjected to intra-domain time synchronization, and the obtained first time scale serves as a reference for cross-control-domain time synchronization of the first device in the second control domain. In this way, cross-control-domain time synchronization is realized.

[0015] In a possible implementation, the time scale timer further includes a virtual time scale Timer.

[0016] The virtual time scale Timer is configured to correct a value of the virtual time scale Timer according to a value of the service time scale Timer and a time scale error value, to obtain a first time scale, and the time scale error value is determined according to a historical cross-domain time scale correction word.

[0017] In this possible implementation, the value of the service time scale Timer is no longer corrected by introducing the virtual time scale Timer, and both functional safety and time synchronization are taken into account.

[0018] In a possible implementation, the service time scale Timer is further configured to correct the value of the service time scale Timer according to a self-oscillation or an intra-domain time scale correction word for a first control domain.

[0019] In a possible implementation, the cross-domain time scale error calculator includes a service time scale sampling module, a time scale normalization module, a difference value filtering module, and a time scale inverse transformation module.

[0020] The service time scale sampling module is configured to sample the value of the service time scale Timer for a second control domain, to obtain a second time scale.

[0021] The time scale normalization module is configured to perform normalization transformation on the first time scale and the second time scale, to obtain a first normalization result and a second normalization result.

[0022] The difference value filtering module is configured to determine a frequency deviation and a phase deviation between the service time scale Timers of the first control domain and the second control domain according to the first normalization result and the second normalization result.

[0023] The time scale inverse transformation module is configured to perform inverse transformation on the frequency deviation and the phase deviation for the second control domain, to obtain a cross-domain time scale correction word, and to shield the difference between time scales of different control domains.

[0024] In a second aspect, the present application provides a time synchronization method in a device, and the method includes:

[0025] sending a first time scale of a first control domain to a second control domain in a plurality of control domains through a time scale selection source, the first control domain and the second control domain being any one of the plurality of control domains, and the first time scale being a time after a device in the first control domain performs intra-domain time synchronization; wherein the time scale selection source is connected with N domain time synchronization processors, each domain time synchronization processor includes an intra-domain time synchronizer, a time scale timer, and a cross-domain time scale error calculator, the time scale timer includes a service time scale Timer, each domain time synchronization processor is in a different control domain, and N is an integer greater than or equal to 2.

[0026] For the second control domain, a cross-domain time scale correction word is determined by the cross-domain time scale error calculator according to the second time scale and the first time scale, the second time scale being a value of a service time scale Timer for the second control domain.

[0027] For the second control domain, a value of the service time scale Timer is corrected according to the cross-domain time scale correction word, and the first time scale is obtained.

[0028] The time of the first device in the second control domain is synchronized to the first time scale by an intra-domain time synchronizer.

[0029] In a possible implementation, the device includes an automatic driving vehicle device.

[0030] In a possible implementation, the intra-domain time synchronizer includes a domain interface and a domain time synchronization protocol processor, and the domain interface is a physical interface of the first device in the control domain.

[0031] The method further includes:

[0032] For the first control domain, the time of a third device in the first control domain is synchronized by the domain time synchronization protocol processor according to the time of a second device, a domain intra-time scale correction word is output, the second device being a device determined from the devices in the first control domain according to service requirements, the second device representing a time synchronization reference, and the third device being a device other than the second device in the first control domain; or

[0033] For the first control domain, the time of the first device in the first control domain is synchronized by the domain time synchronization protocol processor according to a value of the service time scale Timer of the domain interface.

[0034] In a possible implementation, the time scale timer further includes a virtual time scale Timer.

[0035] The method further includes:

[0036] For the second control domain, a value of the virtual time scale Timer is corrected according to a value of the service time scale Timer and a time scale error value, and the first time scale is obtained, the time scale error value being determined according to historical cross-domain time scale correction words.

[0037] In a possible implementation, the method further includes:

[0038] For the first control domain, a value of the service time scale Timer is corrected by self-oscillation of the service time scale Timer or according to the domain intra-time scale correction word.

[0039] In a possible implementation, the cross-domain time scale error calculator includes a service time scale sampling module, a time scale normalization module, a difference value filtering module, and a time scale inverse transformation module.

[0040] The second time scale is obtained by sampling the value of the service time scale Timer through a cross-domain time scale error calculator for the second control domain, comprising:

[0041] The second time scale is obtained by sampling the value of the service time scale Timer through a service time scale sampling module for the second control domain;

[0042] The cross-domain time scale correction word is determined according to the second time scale and the first time scale, comprising:

[0043] The first time scale and the second time scale are normalized through a time scale normalization module to obtain a first normalized result and a second normalized result;

[0044] The frequency deviation and the phase deviation between the service time scales Timer of the first control domain and the second control domain are determined through a difference filtering module according to the first normalized result and the second normalized result;

[0045] The frequency deviation and the phase deviation are inverse transformed through a time scale inverse transformation module for the second control domain to obtain the cross-domain time scale correction word.

[0046] The beneficial effects of the second aspect and various possible implementations thereof are referred to the beneficial effects of the first aspect and various possible implementations thereof.

[0047] The third aspect, the present application proposes a time synchronization device in a device, comprising at least one processor, the processor is used for executing the program stored in the memory, when the program is executed, make the device execute:

[0048] As the method in the second aspect and various possible implementations.

[0049] In one possible implementation, the device further comprises the above-mentioned memory. Optionally, the processor and the memory can be integrated together.

[0050] In another possible implementation, the above-mentioned memory is arranged outside the device.

[0051] The fourth aspect, the present application proposes a computer program product containing instructions, when the computer program product runs on the computer, make the method as the second aspect and various possible implementations thereof is executed by the computer.

[0052] The fifth aspect, the present application proposes a computer readable storage medium, the computer readable storage medium has stored computer program, the computer program is executed by the processor, as the method in the second aspect and various possible implementations thereof is executed. BRIEF DESCRIPTION OF DRAWINGS

[0053] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0054] Figure 1 A schematic diagram of the structure of a time synchronization device in a device provided in this application embodiment;

[0055] Figure 2 A schematic diagram of the frame of a time synchronization device in a device provided in an embodiment of this application;

[0056] Figure 3 A schematic diagram of the frame of a time synchronization device in a device provided in an embodiment of this application;

[0057] Figure 4 A flowchart illustrating a time synchronization method in a device provided in an embodiment of this application;

[0058] Figure 5 This is a schematic diagram of the structure of a time synchronization device 500 in an embodiment of this application. Detailed Implementation

[0059] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the specific implementation methods of the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0060] It should be noted that the term "and / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The terms "first" and "second," etc., in the specification and claims of this application are used to distinguish different objects, not to describe a specific order of objects. For example, "first control domain" and "second control domain," etc., are used to distinguish different control domains, not to describe a specific order of target objects. In the embodiments of this application, words such as "exemplary," "for example," or "e.g.," are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "e.g.," in the embodiments of this application should not be construed as superior to other embodiments or designs. Specifically, the use of words such as "exemplary" or "e.g.," is intended to present related concepts in a specific manner. In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0061] In a possible implementation, various application scenarios in the in-vehicle network belong to different control domains. Different control domains have different physical interfaces, time scale formats, time synchronization mechanisms, etc., and thus are usually independent and irrelevant to each other. Sensors of different control domains cannot collect data at the same time, resulting in that vehicle control cannot be started and stopped at the same time. In addition, the types of sensors of intelligent vehicles are increasing, and in the future, messages may be delivered across domains, for example, TSN to TTCAN. Because the start times of TSN and TTCAN time windows are inconsistent, such messages cannot guarantee real-time performance.

[0062] To solve the above problems, an embodiment of the present application provides a time synchronization device in an equipment, a structure diagram of which is shown in Figure 1 The structure diagram includes a time scale selection source 101 and a domain time synchronization processor 102. The time synchronization device in the equipment provided by the embodiment of the present application is described in detail as follows. Figure 1

[0063] In a possible implementation, each of the N domain time synchronization processors 102 is in a different control domain, including an intra-domain time synchronizer 103, a time scale timer 104, and a cross-domain time scale error calculator 105, as shown in Figure 1 N is an integer greater than or equal to 2.

[0064] The intra-domain time synchronizer 103 is configured to synchronize the time of the first equipment in the first control domain, i.e., the main domain. For example, Figure 1 ​As shown, the intra-domain time synchronizer 103 can include a domain interface 106 and a domain time synchronization protocol processor 107. The domain interface 106 is a physical interface for controlling the first device in the first control domain. The domain time synchronization protocol processor 107 can be configured to synchronize the time of the first device in the first control domain. For example, the domain time synchronization protocol processor 107 can be configured to synchronize the time of the third device in the first control domain according to the time of the second device, and output an intra-domain time stamp correction word according to the synchronized time and the value of the service time stamp Timer 108 in the time stamping timer 104, so that the service time stamp Timer 108 corrects its value by the intra-domain time stamp correction word to obtain the first time stamp for the first control domain. It can be understood that the service time stamp Timer 108 can also correct its value by self-oscillation for the first control domain. The second device is a device determined from the first device in the first control domain according to service requirements. The second device represents the reference of time synchronization. The third device is a device other than the second device in the first control domain; or the domain time synchronization protocol processor 107 can be configured to synchronize the time of the first device in the first control domain according to the value of the service time stamp Timer 108 of the domain interface 106. The time of the first device in the first control domain after intra-domain time synchronization is the first time stamp, which serves as the reference of cross-control domain time synchronization.

[0065] The time stamping timer 104 is configured to obtain the first time stamp for the second control domain. As shown, the time stamping timer 104 includes the service time stamp Timer 108, and can also include a virtual time stamp Timer 109. Figure 1

[0066] The cross-domain time stamp error calculator 105 is configured to obtain a first normalized result according to the first time stamp for the first control domain, obtain a second normalized result according to the second time stamp (i.e., the value of the service time stamp Timer 108 in the second control domain) for the second control domain, and determine a cross-domain time stamp correction word according to the second normalized result and the first normalized result. Specifically, as shown, Figure 1 ​As shown, the cross-domain time scale error calculator 105 can include a service time scale sampling module 110, a time scale normalization module 111, a difference filtering module 112, and a time scale inverse transformation module 113. The service time scale sampling module 110 is configured to sample the first time scale to obtain a first sampling result for the first control domain, and sample the second time scale to obtain a second sampling result for the second control domain. The time scale normalization module 111 is configured to perform normalization transformation on the first sampling result and the second sampling result to obtain a first normalized result and a second normalized result. The time scale normalization module 111 sends the first normalized result to the time scale selection source 101. The time scale selection source 101 is configured to send the first normalized result of the first control domain to the second control domain in the plurality of control domains, and the first control domain and the second control domain are respectively one of the plurality of control domains. The difference filtering module 112 is configured to determine the frequency deviation and the phase deviation between the service time scale Timer 108 of the first control domain and the service time scale Timer 108 of the second control domain according to the first normalized result and the second normalized result obtained from the time scale selection source 101 for the second control domain. The time scale inverse transformation module 113 is configured to perform inverse transformation on the frequency deviation and the phase deviation for the second control domain to obtain a cross-domain time scale correction word.

[0067] The service time scale Timer 108 is configured to correct its own value according to the cross-domain time scale correction word to obtain the first time scale for the second control domain, so that the service time scale Timer 108 in the second control domain is synchronized to the first time scale in the first control domain, and the time synchronization across the control domains is completed. Alternatively, the virtual time scale Timer 109 is configured to correct its own value according to the value of the service time scale Timer 108 and a time scale error value to obtain the first time scale for the second control domain, so that the virtual time scale Timer 109 in the second control domain is synchronized to the first time scale in the first control domain, and the time synchronization across the control domains is completed, wherein the time scale error value is determined according to the historical cross-domain time scale correction word.

[0068] The intra-domain time synchronizer 103 is further configured to obtain the first time scale from the service time scale Timer 108 for the second control domain, and synchronize the time of the first device in the second control domain to the first time scale.

[0069] In one example, the foregoing time synchronization device can be located in an automatic driving vehicle device.

[0070] In a possible implementation, taking N=2 as an example, i.e., there are two domain time synchronization processors 102. The two domain time synchronization processors 102 are respectively in two different control domains, and the domain time synchronization processors in the control domain 1 and the control domain 2 are respectively referred to as the first domain time synchronization processor 1021 and the second domain time synchronization processor 1022. The foregoing time synchronization device in the device proposed by the embodiment of the present application has a framework diagram as shown in Figure 2as shown below. Figure 2 The frame diagram of the time synchronization device in the device as shown below is described in detail.

[0071] In the embodiment of the present application, referring to Figure 2 , the control domain 1 is called the first control domain, i.e. the master domain, and the control domain 2 tracking the control domain 1 is called the second control domain, i.e. the slave domain. The devices in the control domain 1 and the control domain 2 are both called the first device. The intra-domain time synchronizer 103, the time scale timer 104 and the cross-domain time scale error calculator 105 included in the first domain time synchronization processor 1021 and the second domain time synchronization processor 1022 are respectively called the first intra-domain time synchronizer 1031 and the second intra-domain time synchronizer 1032, the first time scale timer 1041 and the second time scale timer 1042, and the first cross-domain time scale error calculator 1051 and the second cross-domain time scale error calculator 1052. The domain interface 106 included in the first intra-domain time synchronizer 1031 and the second intra-domain time synchronizer 1032 is respectively called the first domain interface 1061 and the second domain interface 1062, and the domain time synchronization protocol processor 107 is respectively called the first domain time synchronization protocol processor 1071 and the second domain time synchronization protocol processor 1072. The service time scale Timer 108 included in the first time scale timer 1041 is called the first service time scale Timer 1081. The virtual time scale Timer 109 included in the second time scale timer 1042 is called the second virtual time scale Timer 1092, and the service time scale Timer 108 is called the second service time scale Timer 1082. The service time scale sampling module 110 included in the first cross-domain time scale error calculator 1051 is called the first service time scale sampling module 1101, and the time scale normalization module 111 is called the first time scale normalization module 1111. The service time scale sampling module 110 included in the second cross-domain time scale error calculator 1052 is called the second service time scale sampling module 1102, the time scale normalization module 111 is called the second time scale normalization module 1112, the difference value filtering module 112 is called the second difference value filtering module 1122, and the time scale inverse transformation module 113 is called the second time scale inverse transformation module 1132.

[0072] In a possible implementation, the first device in the control domain 1 is intra-domain time synchronized, and there are two synchronization modes. The two modes are described below.

[0073] The first mode is that a second device is determined from the first devices in the control domain 1 according to the service requirement, the time of the second device is taken as the reference of time synchronization, the time of a third device other than the second device in the control domain 1 is synchronized, and the intra-domain time scale correction word is output according to the synchronized time and the value of the first service time scale Timer 1081, so that the first service time scale Timer 1081 is used for correcting its own value by the intra-domain time scale correction word for the first control domain, and the first time scale is obtained. It can be understood that the first service time scale Timer 1081 can also correct its own value by self-oscillation.

[0074] The second mode is that the time of all the first devices in the control domain 1 is synchronized according to the value of the first service time scale Timer 1081 of the first domain interface 1061. The time of the first device in the control domain 1 after the intra-domain time synchronization is called the first time scale.

[0075] In a possible implementation, taking the first mode as an example, after the first domain time synchronization protocol processor 1071 in the control domain 1 outputs the intra-domain time scale correction word, the first service time scale Timer 1081 corrects its own value according to the intra-domain time scale correction word, and the first time scale is obtained. It can be understood that the first service time scale Timer 1081 can also correct its own value by self-oscillation. The first service time scale sampling module 1101 samples the first time scale to obtain a sampling result. The first time scale normalization module 1111 performs normalization processing on the sampling result to obtain a first normalized result, and sends the first normalized result to the time scale selection source 101. In addition, for the control domain 2, the second service time scale sampling module 1102 samples the value of the second service time scale Timer 1082 to obtain a second time scale. The second time scale normalization module 1112 performs normalization processing on the second time scale to obtain a second normalized result.

[0076] In a possible implementation, the time scale selection source 101 sends the first normalized result to the second difference filtering module 1122.

[0077] In a possible implementation, the second difference filtering module 1122 performs difference filtering according to the second normalized result and the first normalized result obtained from the time scale selection source 101 to obtain the frequency deviation and the phase deviation of the first service time scale Timer 1081 and the second service time scale Timer 1082. The second time scale inverse transformation module 1132 inversely transforms the frequency deviation and the phase deviation to obtain the cross-domain time scale correction word.

[0078] In a possible implementation, for the control domain 2, the second service time scale Timer 1082 corrects its value according to the cross-domain time scale correction word, obtains the first time scale, and sends it to the second domain interface 1062. The second domain time synchronization protocol processor 1072 synchronizes the time of the first device in the control domain 2 according to the first time scale, so that the time of the first device in the control domain 2 is synchronized to the time of the first device in the control domain 1, and the cross-control-domain time synchronization is completed; or the second virtual time scale Timer 1092 corrects its value according to the value of the second service time scale Timer 1082 and the time scale error value, and obtains the first time scale, so that the second virtual time scale Timer 1092 in the control domain 2 is synchronized to the first time scale in the control domain 1, and the cross-control-domain time synchronization is completed. The time scale error value is determined according to the historical cross-domain time scale correction word.

[0079] Figure 3 Another schematic diagram of a time synchronization device in an apparatus provided by an embodiment of the present application is shown. Details are described below.

[0080] Referring to Figure 3 , the Global Navigation Satellite System (GNSS) domain, the TSN domain, and the TTCAN domain are three different control domains. Among them, the GNSS domain is the master domain, and the TSN domain is the slave domain that tracks it. The TTCAN domain is the slave domain of the TSN domain, that is, the TSN domain is the master domain that tracks the TTCAN domain. The devices in the GNSS domain, the TSN domain, and the TTCAN domain are respectively referred to as GNSS nodes, TSN nodes, and TTCAN nodes.

[0081] Among them, the domain time synchronization processors 102 in the GNSS domain, the TSN domain, and the TTCAN domain are respectively referred to as GNSS domain time synchronization processors 301, TSN domain time synchronization processors 305, and TTCAN domain time synchronization processors 309. The intra-domain time synchronizers 103, the time scale timers 104, and the cross-domain time scale error calculators 105 included in the GNSS domain time synchronization processors 301, the TSN domain time synchronization processors 305, and the TTCAN domain time synchronization processors 309 are respectively referred to as GNSS intra-domain time synchronizers 302, TSN intra-domain time synchronizers 306, and TTCAN intra-domain time synchronizers 310, GNSS time scale timers 303, TSN time scale timers 307, and TTCAN time scale timers 311, GNSS cross-domain time scale error calculators 304, TSN cross-domain time scale error calculators 308, and TTCAN cross-domain time scale error calculators 312.

[0082] The domain interface 106 and the domain time synchronization protocol processor 107 comprised in the GNSS intra-domain time synchronizer 302, the TSN intra-domain time synchronizer 306 and the TTCAN intra-domain time synchronizer 310 are respectively referred to as GNSS domain interface 3021, TSN domain interface 3061 and TTCAN domain interface 3101, GNSS domain time synchronization protocol processor 3022, TSN domain time synchronization protocol processor 3062 and TTCAN domain time synchronization protocol processor 3102.

[0083] The GNSS time tag timer 303 comprises a GNSS service time tag Timer 3031. The TSN time tag timer 307 comprises a TSN virtual time tag Timer 3072 and a TSN service time tag Timer 3071. The TTCAN time tag timer 311 comprises a TTCAN service time tag Timer 3111.

[0084] The GNSS cross-domain time tag error calculator 304 comprises a GNSS service time tag sampling module 3041 and a GNSS time tag normalization module 3042. The TSN cross-domain time tag error calculator 308 comprises a TSN service time tag sampling module 3081, a TSN time tag normalization module 3082, a TSN difference filtering module 3083 and a TSN time tag inverse transformation module 3084. The TTCAN cross-domain time tag error calculator 312 comprises a TTCAN service time tag sampling module 3121, a TTCAN time tag normalization module 3122, a TTCAN difference filtering module 3123 and a TTCAN time tag inverse transformation module 3124.

[0085] The following will introduce in detail the frame diagram of the time synchronization device in an apparatus as shown in Figure 3

[0086] For the GNSS domain, the time of the GNSS Node tracking the 1PPS signal of the external TBOX / INS device is referred to as the first time tag. The GNSS domain time synchronization protocol processor 3022 outputs an intra-domain time tag correction word according to the first time tag and the value of the GNSS service time tag Timer 3031. The GNSS service time tag Timer 3031 corrects its own value according to the intra-domain time tag correction word to obtain the first time tag. The GNSS service time tag sampling module 3041 samples the value of the corrected GNSS service time tag Timer 3031, i.e. the first time tag, to obtain a GNSS sampling result. The GNSS time tag normalization module 3042 performs a normalization transformation on the GNSS sampling result to obtain a GNSS normalization result, and sends the GNSS normalization result to the time tag selection source 101.

[0087] ​For the TSN domain, it is necessary to note that, for functional safety considerations, the TSN service time mark Timer 3071 of the TSN domain does not track the first time mark of the GNSS domain due to the easy loss of GPS signals, but the TSN virtual time mark Timer 3072 tracks the first time mark of the GNSS domain. The TSN service time mark sampling module 3081 samples the value of the TSN service time mark Timer 3071 to obtain a TSN sampling result. The TSN time mark normalization module 3082 performs a normalization transformation on the TSN sampling result to obtain a TSN normalized result, and sends it to the TSN difference filtering module 3083. The TSN difference filtering module 3083 performs difference filtering according to the TSN normalized result and the GNSS normalized result obtained from the time mark selection source 101, to determine the frequency deviation and phase deviation between the GNSS service time mark Timer 3031 and the TSN service time mark Timer 3071 of the GNSS domain and the TSN domain. The TSN time mark inverse transformation module 3084 performs inverse transformation on the frequency deviation and the phase deviation to obtain a cross-domain time mark correction word. The historical cross-domain time mark correction words are accumulated to obtain a time mark error value. The TSN virtual time mark Timer 3072 corrects its value according to the time mark error value and the value of the TSN service time mark Timer 3071. The corrected value of the TSN virtual time mark Timer 3072 is the first time mark, so that the TSN virtual time mark Timer 3072 is synchronized to the first time mark of the GNSS domain, and cross-control-domain time synchronization is achieved.

[0088] For the TTCAN domain, since it is a slave domain of the TSN domain, its TTCAN Node is a slave node. The TTCAN service time mark sampling module 3121 samples the value of the TTCAN service time mark Timer 3111 to obtain a TTCAN sampling result. The TTCAN time mark normalization module 3122 performs a normalization transformation on the TTCAN sampling result to obtain a TTCAN normalized result. The TTCAN difference filtering module 3123 determines the frequency deviation and phase deviation between the TTCAN service time mark Timer 3111 and the TSN service time mark Timer 3071 according to the TTCAN normalized result and the first TSN normalized result obtained from the time mark selection source 101. The TTCAN time mark inverse transformation module 3124 performs time mark inverse transformation on the frequency deviation and the phase deviation to obtain a cross-domain time mark correction word. The TTCAN service time mark Timer 3111 corrects its value according to the cross-domain time mark correction word to obtain a third time mark. The TTCAN domain time synchronization protocol processor 3102 synchronizes the time of the TTCAN Node according to the third time mark, so that the time of the TTCAN Node in the TTCAN domain is synchronized to the time of the TSN Node in the TSN domain, and cross-control-domain time synchronization is achieved.

[0089] It can be understood that when the TSN domain is the master domain of the TTCAN domain, the time synchronization within the domain is needed first. A possible implementation is that according to the service requirement, one of the TSN Nodes is selected as the master node (Master), that is, the time of the master node is the reference of the time synchronization. The rest of the TSN Nodes are slave nodes. The time of the rest of the slave nodes is synchronized according to the time of the master node. The TSN domain time synchronization protocol processor 3062 outputs the intra-domain time mark correction word according to the synchronized time and the value of the TSN service time mark Timer 3071. The TSN service time mark Timer 3071 corrects the value of itself according to the intra-domain time mark correction word to obtain a third time mark. The TSN service time mark sampling module 3081 samples the value of the corrected TSN service time mark Timer 3071 to obtain a first TSN sampling result. The TSN time mark normalization module 3082 performs normalization transformation on the first TSN sampling result to obtain a first TSN normalized result, and sends the first TSN normalized result to the time mark selection source 101. The time mark selection source 101 sends the first TSN normalized result to the TTCAN difference value filtering module 3123 of the TTCAN domain which tracks it.

[0090] Based on the same concept as the above-mentioned device embodiment, the embodiment of the present application provides a time synchronization method in a device. Figure 4 A flowchart of a time synchronization method in a device provided by the embodiment of the present application is shown. Each step of the method is implemented by each device and / or module shown in the flowchart. Figure 1 And / or Figure 2 The flowchart includes S401-S404, and specifically includes:

[0091] S401, the time mark selection source 101 sends the first time mark of the first control domain to the second control domain in the plurality of control domains.

[0092] In the embodiment of the present application, the time mark selection source 101 sends the first time mark of the first control domain to the second control domain in the plurality of control domains, so that the second difference value filtering module 1122 of the second control domain performs difference value filtering according to the first time mark and the second time mark. The first control domain and the second control domain are respectively one of the plurality of control domains, and the first time mark is the time after the first device in the first control domain performs time synchronization within the domain. The time mark selection source 101 is connected with N domain time synchronization processors 102, each domain time synchronization processor 102 includes an intra-domain time synchronizer 103, a time mark timer 104, and a cross-domain time mark error calculator 105, the time mark timer 104 includes a service time mark Timer 108, each domain time synchronization processor 102 is respectively in a different control domain, and N is an integer greater than or equal to 2.

[0093] In one example, the first time scale can be obtained in the following two ways:

[0094] The first way: for the first control domain, the time of the third device in the first control domain is synchronized by the first domain time synchronization protocol processor 1071 according to the time of the second device, a domain time scale correction word is output, the second device is a device determined from the devices in the first control domain according to service requirements, the second device represents the reference of time synchronization, and the third device is a device other than the second device in the first control domain.

[0095] The second way: for the first control domain, the time of the first device in the first control domain is synchronized by the first domain time synchronization protocol processor 1071 according to the value of the first service time scale Timer 1081 of the first domain interface 1061.

[0096] S402, for the second control domain, the value of the service time scale Timer 108 is sampled by the cross-domain time scale error calculator 105 to obtain a second time scale; and a cross-domain time scale correction word is determined according to the second time scale and the first time scale.

[0097] In the embodiment of the application, for the second control domain, the value of the second service time scale Timer 1082 is sampled by the second service time scale sampling module 1102 in the second cross-domain time scale error calculator 1052 to obtain a second time scale. According to the second time scale and the first time scale obtained from the time scale selection source 101, a cross-domain time scale correction word is determined by the second cross-domain time scale error calculator 1052. Specifically, the first time scale is sampled by the first service time scale sampling module 1101 to obtain a sampling result. The aforementioned sampling result is normalized by the first time scale normalization module 1111 to obtain a first normalized result. In addition, the second time scale is normalized by the second time scale normalization module 1112 to obtain a second normalized result. According to the first normalized result and the second normalized result, the frequency deviation and the phase deviation between the first service time scale Timer 1081 and the second service time scale Timer 1082 of the first control domain and the second control domain are determined by the second difference filtering module 1122. For the second control domain, the frequency deviation and the phase deviation are inverse transformed by the second time scale inverse transformation module 1132 to obtain a cross-domain time scale correction word.

[0098] S403, for the second control domain, the value of the service time scale Timer 108 is corrected according to the cross-domain time scale correction word to obtain a first time scale.

[0099] In the embodiment of the present application, for the second control domain, the value of the second service time scale Timer 1082 is corrected according to the cross-domain time scale correction word to obtain the first time scale. The second service time scale Timer 1082 sends the first time scale to the second domain interface 1062.

[0100] It can be understood that, for the second control domain, the value of the second virtual time scale Timer 1092 is corrected according to the value of the second service time scale Timer 1082 and the time scale error value determined according to the historical cross-domain time scale correction word to obtain the first time scale. The second virtual time scale Timer 1092 sends the first time scale to the second domain interface 1062.

[0101] It can also be understood that, for the first control domain, the value of the first service time scale Timer 1081 is corrected by self-oscillation or according to the intra-domain time scale correction word.

[0102] S404, synchronizing the time of the first device in the second control domain to the first time scale by the intra-domain time synchronizer 103.

[0103] In the embodiment of the present application, the time of the first device in the second control domain is synchronized to the first time scale by the second intra-domain time synchronizer 1032. Specifically, the second domain time synchronization protocol processor 1072 in the second intra-domain time synchronizer 1032 synchronizes the time of the first device in the second control domain to the first time scale according to the first time scale of the second domain interface 1062.

[0104] Referring to Figure 5 The embodiment of the present application also provides a time synchronization device 500 in a device. The time synchronization device 500 in the device can be a chip system. In the embodiment of the present application, the chip system can be composed of a chip, or can include a chip and other discrete devices.

[0105] The time synchronization device 500 in the device includes at least one processor 510 for implementing each step in the method provided by the embodiment of the present application. The time synchronization device 500 in the device can also include a communication interface 520. In the embodiment of the present application, the communication interface can be a transceiver, a circuit, a bus, a module or other types of communication interfaces, for communicating with other devices through a transmission medium.

[0106] When the time synchronization apparatus 500 in the device is configured to perform the steps of the above-mentioned method embodiments, the communication interface 520 is configured to send the first time scale of the first control domain to the second control domain of the plurality of control domains through the time scale selection source; the processor 510 is configured to, for the second control domain, sample the value of the service time scale Timer through the cross-domain time scale error calculator to obtain a second time scale; determine a cross-domain time scale correction word according to the second time scale and the first time scale; for the second control domain, correct the value of the service time scale Timer according to the cross-domain time scale correction word to obtain the first time scale; and synchronize the time of the first device in the second control domain to the first time scale through the intra-domain time synchronizer.

[0107] The communication interface 520 is also configured to perform other receiving or sending steps or operations in the above-mentioned method embodiments. The processor 510 can also be configured to perform other corresponding steps or operations in the above-mentioned method embodiments except for the receiving and sending, which will not be described here one by one.

[0108] The time synchronization apparatus 500 in the device can also include at least one memory 530 configured to store program instructions and / or data. The memory 530 is coupled with the processor 510. The coupling in the embodiments of the present application is an indirect coupling or communication connection between the apparatuses, units or modules, which can be electrical, mechanical or other forms, and is used for information interaction between the apparatuses, units or modules. The processor 510 can operate in cooperation with the memory 530. The processor 510 can execute the program instructions stored in the memory 530. In a possible implementation, at least one of the at least one memory can be integrated with the processor. In another possible implementation, the memory 530 is located outside the time synchronization apparatus 500 in the device.

[0109] The specific connection medium between the above-mentioned communication interface 520, processor 510 and memory 530 is not limited in the embodiments of the present application. In the embodiments of the present application, the memory 530, processor 510 and communication interface 520 are connected through a bus 540, and the bus is represented by a thick line in the drawings. Figure 5 The connection mode between other components is only schematically illustrated and is not limited to this. The bus can be divided into an address bus, a data bus, a control bus, etc. For convenience of representation, only one thick line is used to represent the bus in the drawings, but it does not mean that there is only one bus or only one type of bus. Figure 5 Figure 5

[0110] ​​In the embodiments of the present application, the processor 510 can be one or more central processing units (CPUs). In the case where the processor 510 is a CPU, the CPU can be a single-core CPU or a multi-core CPU. The processor 510 can be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as execution by a hardware processor, or executed by a combination of hardware and software modules in the processor.

[0111] In the embodiments of the present application, the memory 530 can include, but is not limited to, a non-volatile memory such as a hard disk drive (HDD) or a solid-state drive (SSD), a random access memory (RAM), an erasable programmable ROM (EPROM), a read-only memory (ROM), a compact disc read-only memory (CD-ROM), and the like. The memory is any other medium capable of carrying or storing desired program codes in the form of instructions or data structures and capable of being accessed by a computer, but is not limited thereto. The memory in the embodiments of the present application can also be a circuit or any other device capable of implementing a storage function, for storing program instructions and / or data.

[0112] The embodiments of the present application provide a computer readable storage medium, and the computer readable storage medium stores a computer program. When the computer program is executed by a processor, each step of a time synchronization method in a device as shown in Figure 4 is executed.

[0113] Based on the same concept as the above method embodiments, the embodiments of the present application also provide a computer program product including instructions, which, when the computer program product is run on a computer, cause the computer to execute each step of a time synchronization method in a device as shown in Figure 4 .

[0114] It should be noted that the above examples are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that the technical solutions recorded in the foregoing examples can still be modified, or some technical features therein can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A time synchronization device in a machine, the machine comprising multiple control domains, characterized in that, The device includes: The time stamp source is used to send the first time stamp of the first control domain to the second control domain among multiple control domains. The first control domain and the second control domain are each one of the multiple control domains. The first time stamp is the time after the first device in the first control domain performs intra-domain time synchronization. There are N domain time synchronization processors; each domain time synchronization processor includes an intra-domain time synchronizer, a time stamp timer, and a cross-domain time stamp error calculator. The time stamp timer includes a service time stamp. Each domain time synchronization processor is located in a different control domain, and N is an integer greater than or equal to 2. The cross-domain timescale error calculator is used to determine the cross-domain timescale correction word for the second control domain based on the second timescale and the first timescale, wherein the second timescale is the value of the service timescale Timer for the second control domain; The business time stamp (Timer) is used to correct its own value for the second control domain according to the cross-domain time stamp correction word to obtain the first time stamp. The intra-domain time synchronizer is used to synchronize the time of the first device in the second control domain to the first time scale.

2. The apparatus according to claim 1, characterized in that, The device includes: an autonomous driving vehicle-mounted device.

3. The apparatus according to claim 1 or 2, characterized in that, The domain time synchronizer includes a domain interface and a domain time synchronization protocol processor. The domain interface is the physical interface of a first device in the control domain. The domain time synchronization protocol processor is used to synchronize the time of a third device in the first control domain with the time of a second device, and outputs an intra-domain time stamp correction word. The second device is a device determined from the first device in the first control domain according to business requirements, and the second device represents the time synchronization reference. The third device is a device other than the second device in the first control domain; or The domain time synchronization protocol processor is used to synchronize the time of the first device in the first control domain according to the value of the service time stamp Timer of the domain interface.

4. The apparatus according to any one of claims 1-3, characterized in that, The time stamp timer also includes: a virtual time stamp Timer; The virtual time stamp is used to correct its own value for the second control domain based on the value of the service time stamp and the time stamp error value to obtain the first time stamp. The time stamp error value is determined based on historical cross-domain time stamp correction words.

5. The apparatus according to claim 4, characterized in that, The service time stamp is also used to correct its own value for the first control domain by means of self-oscillation or in-domain time stamp correction word.

6. The apparatus according to any one of claims 1-5, characterized in that, The cross-domain timescale error calculator includes a business timescale sampling module, a timescale normalization module, a difference filtering module, and a timescale inverse transformation module; The service time stamp sampling module is used to sample the value of the service time stamp Timer for the second control domain to obtain the second time stamp; The time scale normalization module is used to perform normalization transformation on the first time scale and the second time scale to obtain a first normalization result and a second normalization result; The difference filtering module is used to determine the frequency deviation and phase deviation between the service timer of the first control domain and the second control domain based on the first normalization result and the second normalization result. The inverse timescale transformation module is used to perform an inverse transformation on the frequency deviation and the phase deviation for the second control domain to obtain the cross-domain timescale correction word.

7. A time synchronization method in a device, the device comprising multiple control domains, characterized in that, include: The first time stamp of the first control domain is sent to the second control domain among multiple control domains through a time stamp selection source. The first control domain and the second control domain are each one of the multiple control domains. The first time stamp is the time after the first device in the first control domain performs intra-domain time synchronization. The time stamp selection source is connected to N domain time synchronization processors. Each domain time synchronization processor includes an intra-domain time synchronizer, a time stamp timer, and a cross-domain time stamp error calculator. The time stamp timer includes a service time stamp. Each domain time synchronization processor is located in a different control domain, and N is an integer greater than or equal to 2. For the second control domain, the cross-domain time stamp correction word is determined by the cross-domain time stamp error calculator based on the second time stamp and the first time stamp, where the second time stamp is the value of the service time stamp Timer for the second control domain; For the second control domain, the value of the service time stamp Timer is corrected according to the cross-domain time stamp correction word to obtain the first time stamp; The time of the first device in the second control domain is synchronized to the first time scale using the domain time synchronizer.

8. The method according to claim 7, characterized in that, The device includes: an autonomous driving vehicle-mounted device.

9. The method according to claim 7 or 8, characterized in that, The domain time synchronizer includes a domain interface and a domain time synchronization protocol processor, wherein the domain interface is the physical interface of the first device in the control domain; The method further includes: For the first control domain, based on the time of the second device, the time of the third device in the first control domain is synchronized through the domain time synchronization protocol processor, and a domain-specific time stamp correction word is output. The second device is a device determined from the devices in the first control domain according to business requirements, and the second device represents the time synchronization reference. The third device is any device other than the second device in the first control domain; or For the first control domain, the time of the first device in the first control domain is synchronized through the domain time synchronization protocol processor according to the value of the service time stamp Timer of the domain interface.

10. The method according to any one of claims 7-9, characterized in that, The time stamp timer also includes: a virtual time stamp Timer; The method further includes: For the second control domain, the value of the virtual time stamp Timer is corrected according to the value of the service time stamp Timer and the time stamp error value to obtain the first time stamp. The time stamp error value is determined based on the historical cross-domain time stamp correction word.

11. The method according to claim 10, characterized in that, The method further includes: For the first control domain, the value of the service time stamp Timer is corrected either by self-oscillation of the service time stamp Timer or by adjusting the time stamp correction word within the domain.

12. The method according to any one of claims 7-11, characterized in that, The cross-domain timescale error calculator includes a business timescale sampling module, a timescale normalization module, a difference filtering module, and a timescale inverse transformation module; For the second control domain, the value of the service time stamp Timer is sampled using the cross-domain time stamp error calculator to obtain the second time stamp, including: For the second control domain, the value of the service time stamp Timer is sampled by the service time stamp sampling module to obtain the second time stamp; The step of determining the cross-domain time stamp correction word based on the second time stamp and the first time stamp includes: The time scale normalization module performs normalization transformation on the first time scale and the second time scale to obtain the first normalization result and the second normalization result; Based on the first normalization result and the second normalization result, the frequency deviation and phase deviation between the service time stamps of the first control domain and the second control domain are determined by the difference filtering module. For the second control domain, the frequency deviation and the phase deviation are inversely transformed by the time scale inverse transformation module to obtain the cross-domain time scale correction word.

13. A time synchronization device in an apparatus, characterized in that, It includes at least one processor for executing instructions stored in memory to cause the method as described in any one of claims 7-12 to be performed.

14. A computer program product containing instructions, characterized in that, When the computer program product is run on a computer, the method described in any one of claims 7-12 is executed by the computer.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, performs the method as described in any one of claims 7-12.

Citation Information

Patent Citations

  • Service processing and initiating method, processing node, initiating node, system and medium

    CN112822770A

  • Vehicle-mounted laser radar system, data processing method and device and storage medium

    CN113835079A