A Distributed Precise Time Acquisition Method Based on TTP Bus
The TTP bus-based distributed time synchronization method with fault-tolerant satellite receivers addresses the cost and precision issues in unmanned aerial vehicles, ensuring precise UTC time and improved sensor fusion and collaboration.
Patent Information
- Application Number
- CN202211617621.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-15
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-12-15
AI Technical Summary
The prior art has problems with high system cost, inconsistency in time accuracy and complexity in distributed unmanned aircraft, which cannot meet the needs of high-precision time synchronization.
A distributed precise time acquisition method based on the TTP bus is adopted, and a satellite receiver node with a fault tolerance mechanism is used as the main clock node to communicate and connect through the TTP bus. The local clock synchronization method is used to correct the local UTC time acquisition of each node. Combined with the distributed precise time acquisition method of the satellite receiver, the local UTC time acquisition of each node is realized.
It reduces system costs, improves the consistency and high-precision time identification of synchronous collection of sensor information of each node in unmanned aerial vehicles, and improves the control accuracy of the aircraft and the ability to realize coordinated tasks.
Smart Images

Figure CN116112111B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distributed embedded computing systems and devices in unmanned aerial vehicles, and specifically relates to a method for obtaining distributed precise time based on the TTP bus. Background Art
[0002] In the future, unmanned aerial vehicles will develop towards a cluster cooperation mode. The spatio-temporal consistency of various types of sensor information in each distributed platform will directly affect the accuracy of multi-sensor information fusion, thereby affecting the control accuracy of the aircraft and the realization of various cooperative tasks between aircraft. Therefore, a method for obtaining distributed precise time based on a unified time reference (such as UTC) is required.
[0003] Currently, based on the PPS of satellite receivers and UTC time technology, a single node can obtain time accuracy at the second level, which does not meet the high-precision time requirements.
[0004] The prior art (CN109617641B) obtains UTC time through PPS and a local crystal oscillator, and realizes the acquisition of ns-level data for a single node. The accuracy of this time acquisition method depends on the accuracy of the crystal oscillator in the node. When this method is used in multiple distributed nodes, in order to ensure accuracy, high-precision crystal oscillators need to be selected in each node, and a PPS (Pulse Per Second) signal needs to be introduced into each node, which will increase the system cost and the complexity of cross-linking.
[0005] In the Principles and Design Methods of Distributed Real-Time Systems (written by Hermann Kopetz, China Machine Press), a method for controlling the timing system in the connected cluster through a time gateway is mentioned. In this method, the time gateway node, as an independent node, needs to separately obtain the exact start time of the "second" of the time server (such as a GPS signal receiver) and the component cluster, and then calculate the difference between the two times using its local time base (micro-beat), and then periodically send the difference or rate correction word to other nodes to achieve time adjustment. This method can quickly achieve the second-level synchronization of each node in the cluster with external time, but there are the following problems: First, since the initial value of this adjustment value is uncertain, it will cause large fluctuations in the time below the second level of each node, resulting in discontinuous time; Second, this method depends on the local time base of the time gateway. If the local clock of the time gateway is abnormal, the entire network time will be abnormal. The TTP bus proposes a distributed high-precision clock synchronization algorithm, which can achieve data transmission and distributed clock synchronization of each node on a single bus. However, this algorithm uses a method of averaging correction values based on multiple master clock nodes and cannot synchronize to a single master clock node. Therefore, in order to ensure accuracy, high-precision crystal oscillators also need to be added to each node, and this distributed synchronization algorithm cannot directly obtain UTC time. Summary of the Invention
[0006] In view of this, an embodiment of the present application provides a distributed precise time acquisition method based on the TTP bus, which solves the problems in the prior art that under distributed conditions, with the increase in the number of nodes, the system cost and the number of cables increase, and the time accuracy cannot be guaranteed, so as to achieve the purpose of improving the consistency of synchronous acquisition of sensor information of each node in an unmanned aerial vehicle and ensuring high-precision time stamps.
[0007] The embodiment of the present application provides the following technical solutions: A distributed precise time acquisition method based on the TTP bus, which is applied to an embedded system of an unmanned aerial vehicle, includes:
[0008] Regarding the satellite receiver node with a fault tolerance mechanism in the embedded system as the master clock node, and regarding the remaining nodes in the embedded system as backup master clock nodes;
[0009] Communicatively connecting the master clock node and the backup master clock nodes through the TTP bus;
[0010] Adopting a distributed clock synchronization method to correct the local clocks of each node; The distributed clock synchronization method includes: The master clock node performs fault-tolerant correction on the local clock according to the second pulse; The backup master clock nodes perform fault-tolerant synchronous correction on the local clock according to the TTP bus synchronization frame of the master clock node;
[0011] Adopting a distributed precise time acquisition method to acquire the local UTC time of each node at the current moment; The distributed precise time acquisition method includes: First, calculating the reference point UTC time corresponding to the second pulse according to the second pulse of the master clock node, and transmitting the reference point UTC time corresponding to the second pulse to the backup master clock nodes through the TTP bus, so that the master clock node and the backup master clock nodes calculate the local UTC time of the current moment of this node according to the reference point UTC time corresponding to the second pulse and the local time.
[0012] According to an embodiment of the present application, the local clock includes MT and mt; MT is a coarse-grained clock, and mt is a fine-grained clock;
[0013] Local time = (CURRENT_MT_CNT) × MT + (CURRENT_mt_CNT) × mt;
[0014] Wherein, CURRENT_MT_CNT is the count of the coarse-grained clock MT on the current TTP bus, CURRENT_mt_CNT is the number of times the fine-grained clock mt appears recorded by the node starting from 0 when each coarse-grained clock MT arrives, and CURRENT_mt_CNT ≤ (MT / mt).
[0015] According to an embodiment of the present application, the process of correcting the local clock of the master clock node includes:
[0016] Step 1: After the second pulse appears, count the adjacent two second pulses using the local fine-grained clock mt to obtain Count_rel, and record Count_rel as Δr;
[0017] Step 2: The embedded computer calculates the number of seconds between two adjacent second pulses, denoted as Second_cnt, and Second_cnt≈(Count_rel×mt) / 10 9 , where Second_cnt≥1;
[0018] Step 3: Calculate the corresponding theoretical number of fine-grained clock mt for Second_cnt to obtain Count_thy, and record Count_thy as Δt. Among them, Count_thy = Second_cnt×mt_CNT_Theory_P_sceond; mt_CNT_Theory_P_sceond is the theoretical number of mt per second;
[0019] Step 4: Calculate the current mt deviation Δb to be adjusted as Δb=(Δr - Δt), calculate the planned mt deviation per second Δcc=(Δb) / Second_cnt; calculate the absolute value of the planned mt deviation per second Δa = |Δcc|, where the initial value of Δcc is zero;
[0020] Step 5: Compare Δa with the preset tolerance threshold. If Δa is lower than the tolerance threshold, it is considered that the second pulse of the master clock node works normally, let Δc = Δcc, and use Δb to correct the local clock MT; if Δa is higher than the tolerance threshold, it is considered that the second pulse of the master clock node works abnormally, and use Δc×Second_cnt to correct the local clock MT; among them, the initial value of Δc is zero.
[0021] According to an embodiment of the present application, it further includes Step 6: When the satellite loss-of-lock reacquisition time ≥ 100s, the following method is used to correct the local time: When Count_rel≥Count_rel_Max, let Count_rel = 0 and start timing again to wait for the next second pulse, and at the same time, use historical experience values for correction, and use Δc×Second_cnt_Max to correct the local clock MT; where Count_rel_Max is the maximum time interval mt count between two second pulses, and Second_cnt_Max is the maximum number of seconds between two second pulses.
[0022] According to an embodiment of the present application, the process by which the backup master clock node performs fault-tolerant synchronization correction on the local clock according to the master clock node TTP bus synchronization frame includes:
[0023] Step 1: Denote the correction value of the local clock MT obtained by using the master clock node synchronization frame as Δ1;
[0024] Step 2: Use the backup master clock node synchronization frame to obtain a set of correction values of the corresponding local clock MT. Discard the maximum and minimum values in this set of correction values, and take the average of the remaining correction values to obtain the final time correction value of the node, denoted as Δ;
[0025] Step 3: Calculate the absolute value of the difference between Δ1 and Δ, i.e., |Δ1 - Δ|, and compare it with a preset tolerance threshold. If |Δ1 - Δ| is lower than the tolerance threshold, it is considered that the master clock node is working normally, and Δ1 is used to correct the local clock MT of the backup master clock node; if |Δ1 - Δ| is higher than the tolerance threshold, it is considered that the satellite receiver node is working abnormally, and time synchronization is performed with reference to the backup master clock node, and Δ is used to correct the local clock MT of the backup master clock node.
[0026] According to an embodiment of the present application, the process of the distributed precise time acquisition method specifically includes:
[0027] Step 1: When the master clock node receives a second pulse, it starts to record the occurrence times cnt of the local fine-grained clock mt0 until the most recent MT0 appears, then stops counting and records the current MT0 count n;
[0028] Among them, the time of the second pulse relative to MT0 is denoted as ΔT,
[0029] Then: ΔT = cnt × mt0; Formula (1);
[0030] Step 2: The master clock node calculates the reference point UTC time corresponding to the second pulse, denoted as ND_UTC_TIME_ON_nMT;
[0031] Then: ND_UTC_TIME_ON_nMT(y, m, d, h, m, s, ms, us, ns) =
[0032] PPS_UTC_ON_nMT(y, m, d, h, m, s) +
[0033] ΔT(ms, us, ns); Formula (2)
[0034] Among them, PPS_UTC_ON_nMT is the UTC time corresponding to the second pulse;
[0035] Step 3: The master clock node broadcasts the reference point UTC time and the value of n to the backup master clock node through the TTP bus;
[0036] Step 4: Each node calculates the relative time of the current local time relative to the reference point, denoted as ND_CRNT_TIME_PAST_nMT;
[0037] Then: ND_CRNT_TIME_PAST_nMT(s, ms, us, ns) =
[0038] ((CURRENT_MT_CNT) - n) × MT + (CURRENT_mt_CNT) × mt; Formula (3);
[0039] Step 5: The master clock node and the backup master clock node respectively calculate the local UTC time at the current moment, denoted as ND_UTC_TIME;
[0040] Then: ND_UTC_TIME(y, m, d, h, m, s, ms, us, ns) =
[0041] ND_UTC_TIME_ON_nMT(y, m, d, h, m, s, ms, us, ns) +
[0042] ND_CRNT_TIME_PAST_nMT(s, ms, us, ns); Formula (4)
[0043] Where y is the year, m is the month, d is the day, h is the hour, m is the minute, s is the second, ms is the millisecond, us is the microsecond, and ns is the nanosecond.
[0044] According to an embodiment of the present application, when the master clock node and the backup master clock node are synchronized in the TTP bus network, only 1 valid second pulse corresponding reference point UTC time and the value of n need to be obtained, respectively marked as ND_UTC_TIME_ON_nMT 0 and n0, and use this ND_UTC_TIME_ON_nMT 0 and n0 to substitute into Formula (3) and Formula (4) to calculate the local UTC time at the current moment.
[0045] Compared with the prior art, the present invention provides a distributed precise time acquisition method based on the TTP bus, which can be used for synchronous acquisition of sensor information of each node in an unmanned aerial vehicle in a new combat mode and high-precision time marking, and helps to improve the control accuracy of the aircraft and the realization of various collaborative tasks between aircraft. Its technical effects at least include:
[0046] 1. Through the distributed clock synchronization method with a fault-tolerant mechanism and using a satellite receiver (GPS / Beidou) as the main clock source proposed by the present invention, clock synchronization between each device in the aircraft and the satellite receiver can be achieved, eliminating the high-precision crystal oscillators in other nodes and reducing the system cost. At the same time, this method can automatically correct the timing error of the satellite loss-of-lock and reacquisition time ≤ 99s without loss, and correct the historical experience value for the second pulse loss-of-lock and reacquisition exceeding 100s.
[0047] 2. Through the distributed precise time acquisition method based on a satellite receiver proposed by the present invention, each node in the aircraft can calculate and obtain the local UTC time, eliminating the need for synchronization pulse cables between nodes and obtaining the same UTC time as the satellite receiver.
[0048] 3. The time accuracy of each node is mainly determined by the PPS accuracy (usually less than 1μs) in the satellite receiver node and the accuracy of the crystal oscillator in the satellite receiver node, simplifying the design of other nodes in the system. The method of the present invention is applicable to the application scenario of high-precision time acquisition in the distributed embedded computing system of cluster cooperative unmanned aircraft. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0050] Figure 1 It is a schematic diagram of the distributed time calibration operation of a distributed precise time acquisition method based on the TTP bus according to an embodiment of the present invention;
[0051] Figure 2 It is a schematic diagram of the generation of the local time of a node of a distributed precise time acquisition method based on the TTP bus according to an embodiment of the present invention;
[0052] Figure 3 It is a schematic diagram of the calculation of the time correction value of a distributed precise time acquisition method based on the TTP bus according to an embodiment of the present invention;
[0053] Figure 4 It is a flowchart of the local clock correction of each node of the TTP bus according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0054] The embodiments of the present application will be described in detail below with reference to the drawings.
[0055] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the drawings and in conjunction with the embodiments, and the technical solutions of the present invention will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0056] As Figures 1 - 4 shown, an embodiment of the present invention provides a distributed precise time acquisition method based on the TTP bus.
[0057] In an aircraft embedded system, various functional modules are connected by the TTP bus to achieve information intercommunication between modules, including a seeker, a fuse, a Beidou navigation module, etc. Each module is equivalent to a node connected to the bus. During normal operation, the satellite receiver node serves as the main time node, and other nodes serve as backup main time nodes.
[0058] In the embodiment of the present invention, each node communicates using a TTP bus-type network; a distributed clock synchronization method with a fault tolerance mechanism and using a satellite receiver (GPS / Beidou) as the main clock source is adopted to correct the local clocks of each node; a distributed precise time acquisition method based on the satellite receiver is adopted to obtain the local UTC time (year, month, day, hour, minute, s, ms, us, ns) of each node at the current moment.
[0059] Among them, the local clock consists of MT and mt, where MT is a coarse-grained clock and mt is a fine-grained clock;
[0060] Local time = (CURRENT_MT_CNT) × MT + CURRENT_mt_CNT × mt;
[0061] Among them, CURRENT_MT_CNT is the count of the coarse-grained clock MT on the current TTP bus, CURRENT_mt_CNT is the number of times the fine-grained clock mt appears starting from 0 when each coarse-grained clock MT arrives, and CURRENT_mt_CNT ≤ (MT / mt).
[0062] In the above-mentioned distributed clock synchronization method with a fault tolerance mechanism and using a satellite receiver (GPS / Beidou) as the main clock source, the crystal oscillator in the satellite receiver node has the highest accuracy. The satellite receiver is the main clock node in the TTP bus network, and other nodes are backup main clock nodes;
[0063] Among them, the satellite receiver, that is, the master clock node corrects the local clock MT through the following method to obtain a high-precision clock:
[0064] Step 1: After the Pulse Per Second (PPS) appears, use the local fine-grained clock mt to count the adjacent two PPSs, and obtain Count_rel, and record Count_rel as Δr;
[0065] Step 2: The embedded computer calculates the number of seconds between two adjacent PPSs, denoted as Second_cnt, and Second_cnt≈(Count_rel×mt) / 10 9 , where Second_cnt≥1;
[0066] Step 3: Calculate the corresponding theoretical number of fine-grained clock mt for Second_cnt, and obtain Count_thy, and record Count_thy as Δt. Among them, Count_thy = Second_cnt×mt_CNT_Theory_P_sceond; mt_CNT_Theory_P_sceond is the theoretical number of mt per second;
[0067] Step 4: Calculate the current mt deviation Δb to be adjusted = (Δr - Δt), calculate the planned mt deviation Δcc per second = (Δb) / Second_cnt; calculate the absolute value of the planned mt deviation per second Δa = |Δcc|, where the initial value of Δcc is zero;
[0068] Step 5: Compare Δa with the preset tolerance threshold. If Δa is lower than the tolerance threshold, it is considered that the PPS of the master clock node works normally, let Δc = Δcc, and use Δb to correct the local clock MT; if Δa is higher than the tolerance threshold, it is considered that the PPS of the master clock node works abnormally, and use Δc×Second_cnt to correct the local clock MT; where the initial value of Δc is zero.
[0069] In this embodiment, a tolerance threshold is set, and the absolute value Δa of the planned mt deviation per second is compared with the tolerance threshold to correct the local clock MT, which can prevent abnormal jitter of the PPS and ensure high-precision correction.
[0070] In one embodiment, it further includes step 6: when the satellite loss-of-lock reacquisition time ≥ 100 s, the following method is used to correct the local time: when Count_rel ≥ Count_rel_Max, set Count_rel = 0 and start timing again to wait for the next second pulse. At the same time, historical experience values are used for correction, and the local clock MT is corrected using Δc × Second_cnt_Max; where Count_rel_Max is the count of the maximum time interval mt between two second pulses (loss-of-lock reacquisition), and Second_cnt_Max is the maximum number of seconds between two second pulses. This method can automatically correct the timing error without loss for the satellite loss-of-lock reacquisition time ≤ 99 s, and at the same time, historical experience values are used for correction for the satellite loss-of-lock reacquisition of the second pulse that is extremely long > 100 s.
[0071] The following method is used to correct the local clock MT for other backup master clock nodes:
[0072] Step 1: The correction value of the local clock MT obtained by using the synchronization frame of the master clock node is denoted as Δ1;
[0073] Step 2: Use the synchronization frame of the backup master clock node to obtain the corresponding set of correction values of the local clock MT. Discard the maximum and minimum values in this set of correction values, and take the average of the remaining correction values to obtain the final time correction value of the node, denoted as Δ;
[0074] Step 3: Calculate the absolute value of the difference between Δ1 and Δ, |Δ1 - Δ|, and compare it with a preset tolerance threshold. If |Δ1 - Δ| is lower than the tolerance threshold, it is considered that the master clock node is working normally, and Δ1 is used to correct the local clock MT of the backup master clock node; if |Δ1 - Δ| is higher than the tolerance threshold, it is considered that the satellite receiver node is working abnormally, and time synchronization is performed with reference to the backup master clock node, and Δ is used to correct the local clock MT of the backup master clock node.
[0075] The above-mentioned distributed precise time acquisition method based on a satellite receiver, based on the PPS and UTC time of the satellite receiver, and the time-triggered bus clock synchronization technology of the TTP bus, uses the following method to achieve the acquisition of the local UTC time of each node:
[0076] Step 1: When the master clock node receives a second pulse, it starts recording the occurrence count cnt of the local fine-grained clock mt0 until the most recent MT0 appears, then stops counting, and records the current MT0 count n;
[0077] Among them, the time of the second pulse relative to MT0 is denoted as ΔT,
[0078] Then: ΔT = cnt × mt0; Formula (1);
[0079] Step 2: The master clock node calculates the reference point UTC time corresponding to the second pulse, denoted as ND_UTC_TIME_ON_nMT;
[0080] Then: ND_UTC_TIME_ON_nMT(y, m, d, h, m, s, ms, us, ns) =
[0081] PPS_UTC_ON_nMT(y, m, d, h, m, s) +
[0082] ΔT(ms, us, ns); Formula (2)
[0083] Wherein, PPS_UTC_ON_nMT is the UTC time corresponding to the second pulse;
[0084] Step 3: The master clock node broadcasts the reference point UTC time and the n value to the backup master clock node through the TTP bus;
[0085] Step 4: Each node calculates the relative time of the current local time relative to the reference point, denoted as ND_CRNT_TIME_PAST_nMT;
[0086] Then: ND_CRNT_TIME_PAST_nMT(s, ms, us, ns) =
[0087] ((CURRENT_MT_CNT) - n) × MT + (CURRENT_mt_CNT) × mt; Formula (3)
[0088] Wherein, cnt × mt ≤ MT;
[0089] Step 5: The master clock node and the backup master clock node respectively calculate the local UTC time at the current moment, denoted as ND_UTC_TIME;
[0090] Then: ND_UTC_TIME(y, m, d, h, m, s, ms, us, ns) =
[0091] ND_UTC_TIME_ON_nMT(y, m, d, h, m, s, ms, us, ns) +
[0092] ND_CRNT_TIME_PAST_nMT(s, ms, us, ns); Formula (4)
[0093] Wherein, y is the year, m is the month, d is the day, h is the hour, m is the minute, s is the second, ms is the millisecond, us is the microsecond, and ns is the nanosecond.
[0094] In one embodiment, to ensure the continuity of the UTC time of each node, under the condition that the master clock node and the backup master clock node are synchronized in the TTP bus network, it is only necessary to obtain the reference point UTC time corresponding to 1 valid second pulse and the value of n once, which are respectively marked as ND_UTC_TIME_ON_nMT 0 and n0, and use the ND_UTC_TIME_ON_nMT 0 and n0 to substitute into Formula (3) and Formula (4) to calculate the local UTC time at the current moment.
[0095] A distributed precise time acquisition method based on the TTP bus according to the present invention. This method is based on a TTP bus network, and realizes the correction of the local clocks of each node in the system through a distributed clock synchronization method with a fault tolerance mechanism using a satellite receiver (GPS / Beidou) as the master clock source. Except for the satellite receiver node, other nodes can obtain a high-precision local clock without adding a high-precision crystal oscillator, and through the distributed precise time acquisition method based on the satellite receiver, each node acquires the local UTC time (ns level) at the current moment.
[0096] As described above, it is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A distributed precise time acquisition method based on the TTP bus, which is applied to the embedded system of an unmanned aerial vehicle, is characterized in that Including: Regarding the satellite receiver node with a fault-tolerant mechanism in the embedded system as the master clock node, and regarding the remaining nodes in the embedded system as backup master clock nodes; Communicatively connecting the master clock node and the backup master clock nodes through a TTP bus; Using a distributed clock synchronization method to correct the local clocks of each node; The distributed clock synchronization method includes: the master clock node performing fault-tolerant correction on the local clock according to the second pulse; the backup master clock nodes performing fault-tolerant synchronization correction on the local clock according to the TTP bus synchronization frames of the master clock node; Using a distributed precise time acquisition method to acquire the local UTC time at the current moment of each node; the distributed precise time acquisition method includes: first calculating the reference point UTC time corresponding to the second pulse according to the second pulse of the master clock node, and transmitting the reference point UTC time corresponding to the second pulse to the backup master clock nodes through the TTP bus, so that the master clock node and the backup master clock nodes calculate the local UTC time at the current moment of this node according to the reference point UTC time corresponding to the second pulse and the local time; The local clock includes MT and mt; MT is a coarse-grained clock, and mt is a fine-grained clock; Local time = (CURRENT_MT_CNT) × MT + (CURRENT_mt_CNT) × mt; Wherein, CURRENT_MT_CNT is the count of the coarse-grained clock MT on the current TTP bus, CURRENT_mt_CNT is the number of times the fine-grained clock mt appears starting from 0 when each coarse-grained clock MT arrives, and CURRENT_mt_CNT ≤ (MT / mt); The process of correcting the local clock of the master clock node includes: Step 1: After the second pulse appears, counting the adjacent two second pulses using the local fine-grained clock mt to obtain Count_rel, and recording Count_rel as Δr; Step 2: The embedded computer calculates the number of seconds between two adjacent second pulses, denoted as Second_cnt, and Second_cnt≈(Count_rel×mt) / 10 9 , where Second_cnt≥1; Step 3: Calculating the number of theoretical fine-grained clock mt corresponding to Second_cnt to obtain Count_thy, and recording Count_thy as Δt, wherein, Count_thy = Second_cnt × mt_CNT_Theory_P_sceond; mt_CNT_Theory_P_sceond is the theoretical number of mt per second; Step 4: Calculating the current mt deviation Δb to be adjusted = (Δr - Δt), calculating the mt deviation Δcc planned to be adjusted per second = (Δb) / Second_cnt; calculating the absolute value Δa of the mt deviation planned to be adjusted per second = |Δcc|, wherein the initial value of Δcc is zero; Step 5: Compare Δa with a preset tolerance threshold. If Δa is lower than the tolerance threshold, it is considered that the second pulse of the master clock node works normally, let Δc = Δcc, and use Δb to correct the local clock MT; if Δa is higher than the tolerance threshold, it is considered that the second pulse of the master clock node works abnormally, and use Δc×Second_cnt to correct the local clock MT; where the initial value of Δc is zero; The process of the backup master clock node performing fault-tolerant synchronization correction on the local clock according to the master clock node TTP bus synchronization frame includes: Step (1): Denote the correction value of the local clock MT obtained by using the master clock node synchronization frame as Δ1; Step (2): Use the master clock node synchronization frame to obtain a set of correction values of the corresponding local clock MT. Discard the maximum and minimum values in this set of correction values, and take the average of the remaining correction values to obtain the final time correction value of the node, denoted as Δ; Step (3): Calculate the absolute value of the difference between Δ1 and Δ, |Δ1 - Δ|, and compare it with the preset tolerance threshold. If |Δ1 - Δ| is lower than the tolerance threshold, it is considered that the master clock node works normally, and use Δ1 to correct the local clock MT of the backup master clock node; if |Δ1 - Δ| is higher than the tolerance threshold, it is considered that the satellite receiver node works abnormally, then refer to the backup master clock node for time synchronization, and use Δ to correct the local clock MT of the backup master clock node.
2. The distributed precise time acquisition method based on the TTP bus according to claim 1, wherein It further includes Step 6: When the satellite unlock and reacquire time ≥ 100s, the following method is used to correct the local time: When Count_rel ≥ Count_rel_Max, let Count_rel = 0 and start timing again to wait for the next second pulse. At the same time, use historical experience values for correction, and use Δc×Second_cnt_Max to correct the local clock MT; where Count_rel_Max is the count of the maximum time interval mt between two second pulses, and Second_cnt_Max is the maximum number of seconds between two second pulses.
3. The distributed precise time acquisition method based on the TTP bus according to claim 1, characterized in that The process of the distributed precise time acquisition method specifically includes: Step 1: When the master clock node receives a second pulse, start recording the occurrence times cnt of the local fine-grained clock mt0 until the most recent MT0 appears, then stop counting and record the current MT0 count n; Among them, the time of the second pulse relative to MT0 is denoted as ΔT, then: ΔT = cnt×mt0; Formula (1); Step 2: The master clock node calculates the reference point UTC time corresponding to the second pulse, denoted as ND_UTC_TIME_ON_nMT; then: ND_UTC_TIME_ON_nMT(y, m, d, h, m, s, ms, us, ns) = PPS_UTC_ON_nMT(y, m, d, h, m, s)+ ΔT(ms, us, ns); Formula (2) where PPS_UTC_ON_nMT is the UTC time corresponding to the second pulse; Step 3: The master clock node broadcasts the reference point UTC time and the n value to the backup master clock node through the TTP bus; Step 4: Each node calculates the relative time of the current local time relative to the reference point, denoted as ND_CRNT_TIME_PAST_nMT; Then: ND_CRNT_TIME_PAST_nMT (s, ms, us, ns) = ((CURRENT_MT_CNT) - n) × MT + (CURRENT_mt_CNT) × mt; Formula (3); Step 5: The master clock node and the backup master clock node respectively calculate the local UTC time at the current moment, denoted as ND_UTC_TIME; Then: ND_UTC_TIME (y, m, d, h, m, s, ms, us, ns) = ND_UTC_TIME_ON_nMT (y, m, d, h, m, s, ms, us, ns) + ND_CRNT_TIME_PAST_nMT (s, ms, us, ns); Formula (4) Where, y is the year, m is the month, d is the day, h is the hour, m is the minute, s is the second, ms is the millisecond, us is the microsecond, and ns is the nanosecond.
4. The distributed precise time acquisition method based on the TTP bus according to claim 3, wherein Under the condition that the master clock node and the backup master clock node are synchronized in the TTP bus network, only one valid second pulse corresponding reference point UTC time and n value need to be obtained, marked as ND_UTC_TIME_ON_nMT 0 and n0 respectively, and use this ND_UTC_TIME_ON_nMT 0 and n0 to substitute into Formula (3) and Formula (4) to calculate the local UTC time at the current moment.
Citation Information
Patent Citations
An Adjustable Precision Time Acquisition Method Based on Second Pulse
CN109617641B
Cited By
Reliable time information for offline over the air updates
US20240313875A1