A time synchronization method and system for rocket control systems based on TSN
By adopting a time synchronization method for rocket control systems based on TSN, the problems of sampling deviation and control command time difference of distributed IMU were solved, achieving high-precision time synchronization and fault recovery, and improving the real-time performance and reliability of rocket control systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SPARK SPACETIME (CHENGDU) TECHNOLOGY CO LTD
- Filing Date
- 2026-03-17
- Publication Date
- 2026-07-03
AI Technical Summary
Microsecond-level sampling deviations in the distributed IMU of the rocket control system lead to attitude calculation errors, time differences in control commands cause attitude jitter, and inaccurate triggering of critical events. Existing technologies make it difficult to achieve high-precision time synchronization and fault renegotiation.
The time synchronization method for rocket control systems based on TSN acquires node clock performance data, executes the optimal master clock algorithm, generates a timestamp record table, calculates link delay and frequency ratio, and sends gPTP synchronization data streams to ensure that distributed devices are synchronized under a unified time base and to restore synchronization in the event of a master clock failure.
It achieves high-precision time synchronization of the rocket control system, ensures consistency of distributed measurement and execution, improves the real-time performance and reliability of the control system, and avoids synchronization interruption in case of failure.
Smart Images

Figure CN121887344B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of aerospace technology, and in particular to a time synchronization method and system for rocket control systems based on TSN. Background Technology
[0002] Rocket control systems have extremely high requirements for high-precision time synchronization. Firstly, due to the rocket's length and flexibility, inertial measurement units (IMUs) need to be installed in multiple locations, including the nose, midsection, and tail, to accurately sense the rocket's motion. These physically separate IMUs must be sampled simultaneously with strict precision. Even a microsecond-level sampling deviation can lead to significant errors in attitude calculations on a high-speed rocket, affecting navigation and control stability. Secondly, the control system issues control commands to various actuators (engine oscillation mechanisms, servos, separation mechanisms, etc.) based on the navigation calculation results. The timing consistency of these control commands directly determines the effectiveness of the control torque. For example, multiple engines need to oscillate in unison to generate the desired control torque. If there is a time difference in the oscillation commands from different engines, unexpected additional torque will be introduced, leading to attitude jitter or even instability. Thirdly, critical events such as interstage separation, fairing jettison, and ignition transition need to be triggered at extremely precise moments. If the measurement data involved in the logical judgment are not synchronized, commands may be issued too early or too late, or even trigger conditions may be misjudged, resulting in catastrophic consequences. Therefore, high-precision time synchronization is an indispensable core capability of modern high-performance rocket control systems.
[0003] However, traditional Ethernet is inherently nondeterministic, with its data communication largely operating on a "best-effort" basis. Even with increased network bandwidth to reduce congestion risks, it struggles to consistently meet the microsecond or even nanosecond-level synchronization accuracy requirements of rocket control systems. Traditional Ethernet is primarily used for test data acquisition where real-time requirements are not high, communication between ground support devices, or for non-critical data paths within rocket systems. On the other hand, bus-based centralized scheduling schemes (such as the 1553B) typically involve a bus controller (BC) periodically operating according to a predefined message schedule, sending instructions or querying data to remote terminals (RTs) within fixed time slots. The "synchronization" of such schemes relies heavily on the centralized scheduling delay of the BC, while the RT's local clock experiences drift, and the bus itself does not provide a high-precision global clock signal. Therefore, the system synchronization accuracy is typically in the tens to hundreds of microseconds or even milliseconds, making high-precision calibration difficult.
[0004] To address these issues, Time-Sensitive Networking (TSN) endows general Ethernet with deterministic real-time capabilities through a series of standards. Among them, the clock synchronization standard IEEE 802.1AS (and its evolution IEEE 802.1AS-rev) is based on the IEEE 1588v2 precise clock synchronization protocol, forming the generalized Precision Time Protocol (gPTP). gPTP timestamps synchronization messages at the network interface hardware level and accurately calculates and compensates for link propagation delay and device dwell time, enabling all network devices to achieve clock synchronization at the nanosecond to sub-microsecond level.
[0005] While TSN's time synchronization capability provides a feasible path for rocket control systems, these systems still face several challenges: the master clock may fail or malfunction during flight; the network nodes are numerous and distributed; link latency and node clock frequency drift require continuous estimation and correction; and the timestamps for sending and receiving synchronization messages need to be accurately captured at the hardware level and efficiently integrated with the software protocol stack. Current technologies lack a time synchronization method centered on the data processing link for distributed device collaboration within rocket control systems, making it difficult to simultaneously ensure synchronization accuracy while also addressing continuous synchronization, fault renegotiation, and consistent use of timestamp data within the control loop.
[0006] Therefore, how to build a high-precision time synchronization mechanism based on TSN in rocket control systems, so that distributed measurement and execution can be carried out under a unified time reference and maintain uninterrupted synchronization in the event of a master clock failure, remains a technical problem that urgently needs to be solved in the field of real-time network for rocket control systems. Summary of the Invention
[0007] This invention provides a time synchronization method and system for rocket control systems based on TSN, aiming to solve at least one of the above-mentioned technical problems.
[0008] To achieve the above objectives, this invention provides a time synchronization method for a rocket control system based on TSN, comprising the following steps:
[0009] Acquire the time source status data and node clock performance parameter data of each TSN node in the rocket control system TSN network, and construct a set of node clock performance vectors;
[0010] The optimal master clock algorithm is compared and calculated for the set of node clock performance vectors to output the master clock node identifier, slave clock node identifier, and master-slave relationship table.
[0011] Using the master-slave relationship table, hardware layer timestamp capture and timestamp insertion processing is performed on gPTP event packets on each master-slave link to generate send timestamps and receive timestamps corresponding to each gPTP event packet and write them into the timestamp record table.
[0012] Based on the timestamp record table, link propagation delay calculation and clock frequency ratio calculation are performed on each master-slave link to generate link delay data and a set of clock correction parameters for correcting the local clock.
[0013] Based on the master clock node identifier, the link delay data, and the clock correction parameter set, a gPTP synchronization data stream with a preset period is generated and sent so that each TSN node outputs a synchronization time series under a unified time base.
[0014] Based on the synchronized time series, timestamped sensor sampling data and timestamped control command data are generated for rocket control.
[0015] Optionally, the time source state data and node clock performance parameter data of each TSN node in the rocket control system TSN network are obtained to construct a set of node clock performance vectors, specifically including:
[0016] Collect time source status data corresponding to each TSN node in the rocket control system TSN network; wherein, the time source status data includes at least satellite timing status data and local oscillator stability data, and generate a time source availability identifier;
[0017] Collect node clock performance parameter data corresponding to each TSN node; wherein, the node clock performance parameter data includes at least priority parameters, clock level parameters, clock accuracy parameters, stability characterization parameters and node identity parameters;
[0018] The node clock performance parameter data is mapped to node clock performance vectors according to a preset field order, and a set of node clock performance vectors is formed.
[0019] The time source availability identifier is associated with the corresponding node clock performance vector to generate a clock candidate dataset for comparison and calculation processing of the optimal master clock algorithm.
[0020] Optionally, the step of performing a comparison calculation of the optimal master clock algorithm on the set of node clock performance vectors to output the master clock node identifier, slave clock node identifier, and master-slave relationship table specifically includes:
[0021] For any two TSN nodes A and B, extract the node clock performance vector of node A and the node clock performance vector of node B from the set of node clock performance vectors respectively, and perform vector consistency determination to generate consistency determination results.
[0022] When the consistency determination result indicates that the node clock performance vector of node A is not completely the same as that of node B, a field-by-field comparison calculation is performed according to the preset field order to generate a better vector identifier.
[0023] After obtaining the better vector identifier, the node clock performance vector of the node corresponding to the worse vector is updated to the better vector, and the master-slave relationship update result is generated.
[0024] The field-by-field comparison calculation is performed iteratively on the set of node clock performance vectors until the global optimal master clock node identifier is output.
[0025] Optionally, using the master-slave relationship table, hardware-layer timestamp capture and timestamp insertion processing is performed on gPTP event packets on each master-slave link to generate send timestamps and receive timestamps corresponding to each gPTP event packet and write them into the timestamp record table. Specifically, this includes:
[0026] Using the master-slave relationship table, frame type parsing processing is performed on the data frames entering the TSN node network interface of each master-slave link to generate frame type parsing results;
[0027] Based on the frame type parsing result, gPTP event messages are identified, and gPTP tag information is generated for the identified gPTP event messages. Based on the gPTP tag information, a sending timestamp and a receiving timestamp are generated at the hardware layer for the sending and receiving moments of the gPTP event messages, respectively.
[0028] The sending timestamp and the receiving timestamp are bound to the corresponding gPTP event message identifier to generate a timestamp binding record and write it into the timestamp record table;
[0029] The timestamp record table is output to the CPU-side gPTP protocol processing stack for subsequent frequency difference and time difference calculations.
[0030] Optionally, the step of generating timestamp binding records and writing them to the timestamp record table specifically includes:
[0031] The receive timestamp and send timestamp output by the receive parsing instance and send parsing instance used to parse the received gPTP event message are written into the timestamp FIFO buffer to generate receive timestamp buffer data and send timestamp buffer data.
[0032] Perform cache state detection processing on the timestamp FIFO cache, and output a timestamp read trigger signal when the cache state meets the preset read conditions;
[0033] Based on the timestamp read trigger signal, the received timestamp cache data and the sent timestamp cache data are extracted from the timestamp FIFO buffer, and reassembled into the timestamp record table according to the message identifier;
[0034] The timestamp record table is provided to the software-side protocol state machine to drive the state transition and parameter update of the synchronization mechanism.
[0035] Optionally, based on the timestamp record table, link propagation delay calculation is performed on each master-slave link, specifically including:
[0036] A set of peer delay measurement messages is generated and exchanged on the master-slave link. The set of peer delay measurement messages includes at least the data frames Pdelay_Req, Pdelay_Resp and Pdelay_Resp_Follow_Up.
[0037] Extract the timestamp group corresponding to the peer delay measurement message set from the timestamp record table; wherein the timestamp group includes at least t1, t2, t3, and t4;
[0038] Based on the timestamp group, link propagation delay calculation is performed to output the link propagation delay and generate the link delay data; wherein, the expression for the output link propagation delay is:
[0039] ;
[0040] In the formula, t1 represents the sending timestamp of Pdelay_Req by the initiating node; t2 represents the receiving timestamp of Pdelay_Req by the peer node; t3 represents the sending timestamp of Pdelay_Resp by the peer node; t4 represents the receiving timestamp of Pdelay_Resp by the initiating node; and D represents the propagation delay of the master-slave link.
[0041] Optionally, based on the timestamp record table, a clock frequency ratio calculation is performed on each master-slave link to generate link delay data and a set of clock correction parameters for correcting the local clock, specifically including:
[0042] Obtain the master control frequency related data output by the master clock node in the Pdelay_Resp_Follow_Up message, and obtain the local timing data of the slave clock node to form a master-slave time interval pair;
[0043] The frequency ratio is calculated based on the master-slave time interval to generate the frequency ratio of the master clock relative to the local clock; the time deviation is calculated based on the frequency ratio and the link propagation delay for the master-slave transmission and reception timestamps of the synchronization message to generate the clock deviation.
[0044] The expression for the frequency ratio and the clock offset is as follows:
[0045] ;
[0046] ;
[0047] In the formula, This represents the time interval between two consecutive references of the master clock node; This represents the local time interval between two consecutive clock nodes; This indicates the timestamp used by the master clock node to send the synchronization event message. The timestamp for receiving the synchronization event message from the clock node is represented; D represents the link propagation delay; Δt represents the time deviation between the slave clock node and the master clock node.
[0048] The frequency ratio and the clock offset are combined to generate the clock correction parameter set.
[0049] Optionally, a gPTP synchronization data stream with a preset period is generated and sent based on the master clock node identifier, the link delay data, and the clock correction parameter set, so that each TSN node outputs a synchronization time series under a unified time base, specifically including:
[0050] A synchronization period parameter is generated based on a preset synchronization period, and a synchronization sequence number that increments periodically is generated based on the synchronization period parameter.
[0051] Based on the synchronization sequence number, the master clock node identifier, and the clock correction parameter set, gPTP synchronization messages and Pdelay_Resp_Follow_Up messages are generated, forming a synchronization data stream;
[0052] The synchronization data stream is sent to each slave clock node, and a synchronization time sequence is output on each slave clock node side based on the link delay data and the clock correction parameter set.
[0053] Optionally, based on the synchronized time series, time-stamped sensor sampling data and time-stamped control command data for rocket control are generated, specifically including:
[0054] The sensor sampling data of the rocket control system is acquired and the synchronous time series is called to generate sampling timestamps to form time-stamped sensor sampling data;
[0055] The system acquires control command data from the rocket control system and calls the synchronous time series to generate command execution timestamps, forming timestamped control command data. The command execution timestamps are then bound to the control command data and output.
[0056] Furthermore, to achieve the above objectives, the present invention also provides a time synchronization system for a rocket control system based on TSN, comprising:
[0057] The module is used to acquire the time source state data and node clock performance parameter data of each TSN node in the rocket control system TSN network, and construct a set of node clock performance vectors.
[0058] The comparison module is used to perform comparison calculations of the optimal master clock algorithm on the set of node clock performance vectors, so as to output the master clock node identifier, the slave clock node identifier, and the master-slave relationship table.
[0059] The execution module is used to perform hardware layer timestamp capture and timestamp insertion processing on gPTP event packets on each master-slave link using the master-slave relationship table, so as to generate the sending timestamp and receiving timestamp corresponding to each gPTP event packet and write them into the timestamp record table.
[0060] The calculation module is used to perform link propagation delay calculation and clock frequency ratio calculation on each master-slave link based on the timestamp record table, so as to generate link delay data and a set of clock correction parameters for correcting the local clock.
[0061] The sending module is used to generate and send gPTP synchronization data streams according to a preset period based on the master clock node identifier, the link delay data and the clock correction parameter set, so that each TSN node outputs a synchronization time series under a unified time base;
[0062] The generation module is used to generate timestamped sensor sampling data and timestamped control command data for rocket control based on the synchronous time series.
[0063] The beneficial effects of this invention are as follows: It proposes a time synchronization method and system for rocket control systems based on TSN (Time Synchronization Network). By accurately capturing and inserting synchronization message timestamps at the hardware level, and implementing optimal master clock algorithms, link propagation delay estimation and compensation, and continuous calculation and updating of frequency ratios and time deviations at the software level, the rocket control system can establish a unified time reference within the TSN network. Furthermore, the master clock sends gPTP synchronization messages at a preset period to maintain continuous synchronization, enabling distributed IMUs and other measurement units to perform synchronized sampling at the same time and ensuring a consistent time reference for the execution sequence of control commands, thereby improving the real-time performance and control accuracy of the rocket control system. Furthermore, in the event of a master clock failure or network exit, a new master clock is elected and the synchronization data stream is restored in a very short time by triggering the BMCA (Business Memory Access Control) renegotiation process, maintaining the overall network synchronization accuracy within a preset range and preventing the timing interaction of the rocket control system from being affected, thus improving the reliability of the flight mission. Attached Figure Description
[0064] Figure 1 This is a flowchart illustrating the time synchronization method for a rocket control system based on TSN according to an embodiment of the present invention.
[0065] Figure 2 This is a schematic diagram illustrating the process of constructing a set of node clock performance vectors in an embodiment of the present invention;
[0066] Figure 3 This is a flowchart illustrating the improved optimal master clock algorithm according to an embodiment of the present invention.
[0067] Figure 4 This is a schematic diagram illustrating the process of generating the sending timestamp and receiving timestamp corresponding to each gPTP event message and writing them into the timestamp record table, as per an embodiment of the present invention.
[0068] Figure 5 This is a schematic diagram illustrating the implementation principle of the rocket control system time synchronization method based on TSN in a real rocket control system scenario according to an embodiment of the present invention.
[0069] Figure 6 This is a schematic diagram of the time synchronization system of a rocket control system based on TSN according to an embodiment of the present invention. Detailed Implementation
[0070] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0071] This invention provides a time synchronization method for rocket control systems based on TSN, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the time synchronization method for a rocket control system based on TSN according to an embodiment of the present invention.
[0072] In this embodiment, a time synchronization method for a rocket control system based on TSN includes the following steps:
[0073] S1: Obtain the time source state data and node clock performance parameter data of each TSN node in the rocket control system TSN network, and construct a set of node clock performance vectors.
[0074] In this embodiment of the invention, step S1 involves acquiring the time source state data and node clock performance parameter data of each TSN node and mapping them to a unified set of node clock performance vectors, thus providing a consistent data input basis for master clock election and subsequent synchronization calculations. The time source state data reflects the available timing capability and stability level of each node, while the node clock performance parameter data reflects the key fields for each node to participate in the optimal master clock algorithm comparison within the gPTP domain, thereby forming a candidate clock dataset that can be used for comparison and computation. Specifically, as shown... Figure 2 As shown, step S1 includes the following steps:
[0075] S101: Collect time source status data corresponding to each TSN node in the rocket control system TSN network; wherein, the time source status data includes at least satellite timing status data and local oscillator stability data, and generate a time source availability identifier.
[0076] Specifically, step S101 is used to collect time source status data of each TSN node before entering the gPTP domain. The time source status data includes at least: satellite timing status data, node local oscillator stability data, and a status bit indicating whether the current time source is available. By processing the above data, a time source availability identifier is generated, which is used to limit the range of nodes that can be used as master clock candidates in the subsequent BMCA comparison calculation.
[0077] S102: Collect node clock performance parameter data corresponding to each TSN node; wherein, the node clock performance parameter data includes at least priority parameters, clock level parameters, clock accuracy parameters, stability characterization parameters and node identity parameters.
[0078] Specifically, step S102 is used to collect node clock performance parameter data for each TSN node used for BMCA comparison. The node clock performance parameter data includes at least: priority 1 parameter, clock level parameter, clock accuracy parameter, stability characterization parameter, priority 2 parameter, and node identity parameter. Subsequently, the above parameters are mapped to node clock performance vectors according to a preset field order, forming a set of node clock performance vectors.
[0079] S103: Map the node clock performance parameter data to node clock performance vectors according to the preset field order, and form a set of node clock performance vectors; associate the time source availability identifier with the corresponding node clock performance vector to generate a clock candidate dataset for comparison and calculation processing of the optimal master clock algorithm.
[0080] Specifically, step S103 is used to bind the time source availability identifier generated in step S101 with the node clock performance vector generated in step S102, so that each node in the candidate set has both an availability description and a comparable vector description. This clock candidate dataset is used to ensure that during the master clock election, both the quality of the node clock performance field is considered, and nodes with unavailable timing capabilities or insufficient stability are avoided from being selected as the master clock.
[0081] In one specific implementation, the rocket control system includes multiple distributed TSN nodes, such as an onboard computer (BC), an inertial measurement unit (IMU) (one set for the arrowhead and one for the tail), a global navigation satellite system receiver, an integrated controller, and an engine oscillation actuator controller. These TSN nodes form a star or tree topology through TSN switching equipment and are located within the same gPTP domain.
[0082] S2: Perform a comparison calculation of the optimal master clock algorithm on the set of node clock performance vectors to output the master clock node identifier, slave clock node identifier and master-slave relationship table.
[0083] Specifically, for any two TSN nodes A and B, the node clock performance vectors of node A and node B are extracted from the node clock performance vector set, respectively, and a vector consistency determination is performed to generate a consistency determination result. When the consistency determination result shows that the node clock performance vectors of node A and node B are not completely identical, a field-by-field comparison calculation is performed according to a preset field order to generate a better vector identifier. After obtaining the better vector identifier, the node clock performance vector of the node corresponding to the worse vector is updated to the better vector, and a master-slave relationship update result is generated. The field-by-field comparison calculation is iteratively performed on the node clock performance vector set until the globally optimal master clock node identifier is output.
[0084] In this embodiment of the invention, the optimal master clock algorithm determines the node with superior clock performance among two nodes by comparing a set of logical entity vectors that measure clock performance. By performing a field-by-field comparison calculation on the set of node clock performance vectors, the master clock node identifier is output; simultaneously, the remaining nodes are marked as slave clock nodes, forming a master-slave relationship table. If the current master clock fails or leaves the network, a renegotiation process can be triggered to re-elect a new master clock, thereby ensuring that the system continuously maintains a high-precision time synchronization state.
[0085] In one optional implementation, the optimal master clock algorithm comparison calculation process includes: first, extracting the node clock performance vectors V_A and V_B for any two nodes A and B; then, performing a field-by-field comparison according to field priority; if a difference first appears at field index k, the better node is determined by the comparison result of V_{A,k} and V_{B,k}; when V_A and V_B are equal in all fields, the two nodes are determined to be equivalent in the sense of the optimal master clock algorithm comparison, and the original master-slave relationship remains unchanged.
[0086] In another possible implementation, to improve the fault response speed during flight, the optimal master clock algorithm renegotiation trigger condition can be given by the arrival detection result of the synchronization data stream: when consecutive missing synchronization event messages meet the preset missing condition, a renegotiation trigger signal is generated and BMCA comparison calculation is started within 1 millisecond, thereby electing a new master clock and restoring synchronization.
[0087] In another alternative implementation, considering that the traditional Optimal Master Clock Algorithm (BMCA) may experience unstable or distorted master selection in special application scenarios such as rocket control systems, for example: (1) Inter-stage separation and topology mutation: The set of nodes and link relationships in the synchronization domain change instantaneously before and after separation, and some nodes are temporarily disconnected / reconnected. Traditional BMCA is difficult to form a stable and consistent master selection result during partitioning and reconnection; (2) Short-term loss of satellite timing / deceptive interference: GNSS timing may experience short-term loss of timing, jumps or deceptive offsets, causing nodes with seemingly higher priority to output unreliable time references in a short period of time. Traditional BMCA lacks dynamic evidence verification of the reliability of timing; (3) Drift mode mutation caused by high dynamic environment: Temperature / vibration shock causes a mutation in the drift mechanism of the local crystal oscillator. The static vector field of traditional BMCA is difficult to characterize the time stability risk within the future window.
[0088] Therefore, this invention proposes an improved optimal master clock algorithm, as exemplified by, for example... Figure 3 As shown, it includes the following execution steps:
[0089] S201: Construct an abnormal scene feature vector and perform event trigger judgment, output an abnormal master selection trigger flag, and when the abnormal master selection trigger flag is true, perform cross-node multi-source evidence interaction and generate an evidence set.
[0090] In this embodiment of the invention, for each candidate node i, multi-dimensional features are collected and summarized, including at least: timing source quality features (such as satellite timing lock identifier, timing quality indicator), local crystal oscillator stability features, link delay statistics features, and topology change features, and an abnormal scenario feature vector is constructed:
[0091] ;
[0092] In the formula: This represents the feature vector of an abnormal scenario for candidate node i in the kth synchronization cycle; This indicates the reliability of the time synchronization source (obtained from the time synchronization status and consistency verification; the larger the value, the higher the reliability). This represents the variance of the link propagation delay (obtained from the link delay sequence statistics described later). Indicates the synchronization message loss rate; Indicators representing the intensity of topological changes (used to characterize changes in adjacency relationships caused by inter-level separation, etc.).
[0093] Following this, the feature vector of the abnormal scene The execution event trigger determination is performed. If the preset abnormal trigger condition is met, the abnormal master trigger flag Ωk=1 is output; otherwise, Ωk=0. When Ωk=0, the traditional BMCA output master clock result is used directly.
[0094] When Ωk=1, each candidate node broadcasts an additional evidence message in addition to the traditional BMCA vector fields. This evidence message includes at least: the local time synchronization source status, a recent time deviation sequence summary, link delay statistics, and a summary of the node's self-test results. The receiving end aligns, denoises, and numbers the evidence messages from different nodes to form an evidence set Ek. This evidence interaction process is used to introduce a verifiable data foundation for time synchronization reliability and link stability at the level of ordinary BMCA.
[0095] S202: Perform multi-source evidence fusion calculation based on the evidence set, output the credibility score of candidate nodes, perform future window stability prediction calculation on candidate nodes, and output the prediction time error variance.
[0096] In this embodiment of the invention, for each candidate node i, a subset of evidence related to it is extracted from Ek, and an evidence quality function and conflict metric are constructed. In one implementation, Dempster-Shafer evidence theory can be used to fuse credible and uncredible propositions to obtain a credibility score for the candidate node. The expression is:
[0097] ;
[0098] ;
[0099] In the formula: This represents the credibility score of candidate node i in the k-th period; Indicates the degree of conflict of evidence; and This represents the basic trust assignment function for the set of propositions from different sources of evidence; the greater the degree of conflict of evidence, the more significant the contradiction in the judgments of different sources regarding the credibility of nodes. The lower the value, the better. This step can proactively reduce the credibility of suspicious nodes by significantly increasing cross-node evidence conflicts in situations such as GNSS spoofing / jumping, thereby avoiding the traditional BMCA from selecting a seemingly preferred but actually untrustworthy master clock based solely on static vector fields.
[0100] In abnormal scenarios, to characterize the stability of the master clock within the future window, the clock state of candidate node i is constructed and predicted. The clock state of the candidate node in the k-th period can be defined as:
[0101] ;
[0102] In the formula: Due to time deviation, The frequency bias is used. Based on the recent time bias sequence extracted from the evidence set, state estimation and prediction are performed, and the prediction time error variance is calculated within the prediction window H. In one implementation, error covariance can be used. Projection yields:
[0103] ;
[0104] ;
[0105] In the formula: This represents the prediction time uncertainty of candidate node i within the prediction window H; denoted by , where h is the state estimation error covariance matrix; and h is the projection vector. This step can reflect risk by significantly increasing prediction uncertainty when temperature / vibration causes abrupt changes in the drift mechanism, thus avoiding the limitation of traditional BMCA which only considers current fields and not future stability.
[0106] S203: Construct the master clock cost function under abnormal scenarios and output the candidate sorting results, execute anti-spoofing consistency decision and output the master clock node.
[0107] In this embodiment of the invention, the credibility score is integrated with prediction stability, link stability, etc., into a cost function:
[0108] ;
[0109] In the formula: The cost of selecting a leader for candidate node i in the abnormal scenario during the k-th period; For the variance of the prediction time error; This refers to the variance of the link propagation delay. Assess credibility. The partitioning penalty term (used to characterize the network partitioning risk caused by inter-level separation, such as taking a larger value when a candidate node is about to leave the network or is not connected to most nodes); α, β, γ, and δ are weighting coefficients. The abnormal scenario leader election cost for each candidate node is calculated. Then sort them to obtain the candidate sorting results for abnormal scenarios.
[0110] To avoid incorrect leader election due to individual nodes reporting false evidence or experiencing malfunctions in abnormal scenarios, a cross-node consistency decision is performed based on the candidate ranking results:
[0111] Each node exchanges its calculated Top-N candidate list and corresponding cost summary, performs robust aggregation on the received list (e.g., cost aggregation based on median / truncated mean and consistency threshold determination), and outputs the final master clock node when the consistency meets the preset threshold; when the consistency does not meet the threshold, a partition master election strategy is triggered: the partition master clock is output for the current connected component, and master clock alignment bridging is performed after subsequent connectivity is restored. By measuring the time deviation between partition master clocks and updating the compensation parameters, the entire network reconverges to a unified reference time.
[0112] S3: Using the master-slave relationship table, perform hardware layer timestamp capture and timestamp insertion processing on the gPTP event messages on each master-slave link to generate the sending timestamp and receiving timestamp corresponding to each gPTP event message and write them into the timestamp record table.
[0113] In this embodiment of the invention, the gPTP synchronization accuracy depends on the high-precision timestamps of the synchronization messages at the moment of transmission and reception. Therefore, this implementation identifies gPTP event messages at the network interface hardware level and generates timestamps at the moment of transmission and reception, respectively. By binding the timestamps with the corresponding message identifiers and writing them into a timestamp record table, the software-side protocol stack can perform subsequent link delay calculations, frequency ratio calculations, and time deviation calculations based on the timestamp record table. Specifically, as shown... Figure 4 As shown, step S3 includes the following steps:
[0114] S301: Using the master-slave relationship table, perform frame type parsing processing on the data frames entering the TSN node network interface of each master-slave link to generate frame type parsing results.
[0115] Specifically, step S301 is used to parse the Ethernet frame header, VLAN / TSN tag and gPTP related fields to determine whether the current data frame belongs to a gPTP event message that requires timestamp processing.
[0116] S302: Identify gPTP event messages based on the frame type parsing result, and generate gPTP tag information for the identified gPTP event messages; based on the gPTP tag information, generate a sending timestamp and a receiving timestamp at the hardware layer for the sending and receiving moments of the gPTP event messages, respectively.
[0117] Specifically, step S302 is used to generate gPTP tag information when a gPTP event message is detected. The gPTP tag information is used to instruct the hardware timestamp unit to perform timestamp capture and insertion processing on the message. It is also used to generate a transmission timestamp and a reception timestamp at the hardware layer for the moment the gPTP event message is transmitted and received, respectively. The transmission timestamp and reception timestamp are used to characterize the moment the message leaves and arrives at the local node, avoiding uncontrollable jitter introduced during software layer reading.
[0118] S303: Bind the sending timestamp and the receiving timestamp to the corresponding gPTP event message identifier, generate a timestamp binding record, and write it into the timestamp record table.
[0119] Specifically, the execution process of generating timestamp binding records and writing them into the timestamp record table is as follows: The receive timestamp and send timestamp output by the receive parsing instance and send parsing instance, respectively, used for parsing received gPTP event messages, are written into the timestamp FIFO buffer to generate receive timestamp cache data and send timestamp cache data; a cache state detection process is performed on the timestamp FIFO buffer, and a timestamp read trigger signal is output when the cache state meets the preset read conditions; based on the timestamp read trigger signal, the receive timestamp cache data and the send timestamp cache data are extracted from the timestamp FIFO buffer and reassembled into the timestamp record table according to the message identifier; the timestamp record table is provided to the software-side protocol state machine to drive the state transition and parameter update of the synchronization mechanism.
[0120] S304: Output the timestamp record table to the CPU-side gPTP protocol processing stack for subsequent frequency difference calculation and time difference calculation.
[0121] Specifically, step S304 is used to bind the sending timestamp, receiving timestamp, and corresponding message identifier, generate a timestamp binding record, and write it into the timestamp record table. The timestamp record table is then output to the CPU-side gPTP protocol processing stack for subsequent parameter calculations.
[0122] In one optional implementation, after the capture module detects the gPTP tag information, it stores the captured timestamp information in the timestamp FIFO buffer. When any timestamp data is written to the FIFO, the software is triggered to read and process it, enabling the protocol stack to perform calculations based on a unified format timestamp record table.
[0123] S4: Based on the timestamp record table, perform link propagation delay calculation and clock frequency ratio calculation on each master-slave link to generate link delay data and a set of clock correction parameters for correcting the local clock.
[0124] In this embodiment of the invention, link propagation delay calculation is performed on each master-slave link based on the timestamp record table, specifically including: generating and exchanging a peer delay measurement message set on the master-slave link, wherein the peer delay measurement message set includes at least data frames Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up; extracting a timestamp group corresponding to the peer delay measurement message set from the timestamp record table; wherein the timestamp group includes at least t1, t2, t3, and t4; performing link propagation delay calculation based on the timestamp group to output the link propagation delay and generate the link delay data; wherein the expression for the output link propagation delay is:
[0125] ;
[0126] In the formula, t1 represents the sending timestamp of Pdelay_Req by the initiating node; t2 represents the receiving timestamp of Pdelay_Req by the peer node; t3 represents the sending timestamp of Pdelay_Resp by the peer node; t4 represents the receiving timestamp of Pdelay_Resp by the initiating node; and D represents the propagation delay of the master-slave link.
[0127] Furthermore, based on the timestamp record table, clock frequency ratio calculation is performed on each master-slave link to generate link delay data and a set of clock correction parameters for correcting the local clock. Specifically, this includes: obtaining master control frequency related data output by the master clock node in the Pdelay_Resp_Follow_Up message, and obtaining local timing data from the slave clock node to form a master-slave time interval pair; performing frequency ratio calculation based on the master-slave time interval pair to generate the frequency ratio of the master clock relative to the local clock; and performing time deviation calculation on the master-slave transmit and receive timestamps of the synchronization message based on the frequency ratio and the link propagation delay to generate a clock deviation.
[0128] The expression for the frequency ratio and the clock offset is as follows:
[0129] ;
[0130] ;
[0131] In the formula, This represents the time interval between two consecutive references of the master clock node; This represents the local time interval between two consecutive clock nodes; This indicates the timestamp used by the master clock node to send the synchronization event message. The received timestamp of the synchronization event message received from the clock node is represented by D; the link propagation delay is represented by Δt; the time deviation of the slave clock node relative to the master clock node is represented by Δt; the clock correction parameter set is generated by combining the frequency ratio and the clock deviation.
[0132] Specifically, within the gPTP domain, the propagation delay of different links differs from the local clock frequency of each node. The link propagation delay D is calculated by using a timestamp set formed from the set of peer delay measurement messages (Pdelay_Req, Pdelay_Resp, Pdelay_Resp_Follow_Up). Simultaneously, based on the master control frequency-related data carried in Pdelay_Resp_Follow_Up and the slave node's local timing data, a master-slave time interval pair is formed, and the frequency ratio r of the master clock relative to the local clock is calculated. Furthermore, the clock deviation Δt is calculated. By assembling (r, Δt) into a clock correction parameter set, data input is provided for the local clock correction of each node.
[0133] In one optional implementation, the link propagation delay is calculated by extracting the timestamp group (t1, t2, t3, t4) from the timestamp record table. In another optional implementation, the frequency ratio r is calculated using the time interval between two adjacent references; after obtaining the link propagation delay D, the clock skew is calculated based on the send and receive timestamps of the synchronization event message. Subsequently, the frequency ratio r is used for frequency adjustment, and the clock skew Δt is used for phase correction, thereby gradually converging to a unified time reference.
[0134] S5: Generate and send a gPTP synchronization data stream with a preset period based on the master clock node identifier, the link delay data and the clock correction parameter set, so that each TSN node outputs a synchronization time series under a unified time base.
[0135] In this embodiment of the invention, a gPTP synchronization data stream with a preset period is generated and sent based on the master clock node identifier, the link delay data, and the clock correction parameter set, so that each TSN node outputs a synchronization time sequence under a unified time base. Specifically, this includes: generating a synchronization period parameter based on a preset synchronization period, and generating a periodically increasing synchronization sequence number based on the synchronization period parameter; generating gPTP synchronization messages and Pdelay_Resp_Follow_Up messages based on the synchronization sequence number, the master clock node identifier, and the clock correction parameter set, and forming a synchronization data stream; sending the synchronization data stream to each slave clock node, and outputting a synchronization time sequence on the slave clock node side based on the link delay data and the clock correction parameter set.
[0136] Specifically, after the master-slave relationship table is determined, the master clock node periodically sends synchronization messages and Follow_Up messages to form a gPTP synchronization data stream; the slave clock nodes calculate and output the synchronization time series based on link delay data and clock correction parameter set. By using the synchronization time series as a unified time reference, sensor nodes generate sampling timestamps at the sampling time and bind them to the sampling data to form timestamped sensor sampling data; control nodes generate command execution timestamps at the time of generating control commands and bind them to the control command data to form timestamped control command data, thereby achieving data time consistency across the entire link of measurement, fusion, control, and execution.
[0137] In one specific implementation, after entering the flight phase, the onboard computer BC sends gPTP synchronization messages to all slave nodes at a 1-millisecond cycle to maintain continuous nanosecond-level synchronization; each IMU synchronously samples acceleration and angular rate under the trigger of a unified TSN clock, and reports the sampled data with a TSN timestamp to BC; after performing attitude calculation and control law calculation, BC issues control commands containing instruction execution timestamps to the engine oscillation actuator controller, enabling multiple actuators to coordinate actions based on a unified time reference.
[0138] S6: Based on the synchronized time series, generate time-stamped sensor sampling data and time-stamped control command data for rocket control.
[0139] In this embodiment of the invention, sensor sampling data of the rocket control system is acquired and the synchronous time series is called to generate sampling timestamps to form time-stamped sensor sampling data; control command data of the rocket control system is acquired and the synchronous time series is called to generate command execution timestamps to form time-stamped control command data, and the command execution timestamps are bound to the control command data for output.
[0140] In a preferred embodiment, the method further includes step S7: triggering BMCA renegotiation and restoring gPTP synchronization data stream in the event of a master clock failure, in order to maintain the time synchronization accuracy of the entire network.
[0141] Specifically, by performing arrival detection processing on the gPTP synchronization data stream, when consecutive missing synchronization data streams are detected that meet the preset missing conditions, a master clock fault alarm is generated, and a BMCA renegotiation flag is triggered. Subsequently, the BMCA comparison calculation is re-executed on the node clock performance vector set, outputting a new master clock node identifier and an updated master-slave relationship table. Based on the new master-slave relationship table, the timestamp record table, link delay data, and clock correction parameter set are re-initialized, and a new gPTP synchronization data stream is generated for transmission to restore the synchronization time series output of each TSN node.
[0142] In one specific implementation, if the master clock BC fails, all TSN nodes trigger BMCA renegotiation within 1 millisecond; the measurement terminal configured with a backup clock source is elected as the new master clock, and the new master clock sends gPTP synchronization messages to the entire network; all slave nodes quickly resynchronize and maintain synchronization accuracy within a preset range to ensure that the timing interaction of the rocket control system is not affected.
[0143] To facilitate understanding of the implementation process of the above steps in the rocket control system, as follows: Figure 5 As shown, the timing process is further explained in conjunction with the staged flight phases.
[0144] (1) Ground testing or pre-launch initialization phase:
[0145] During ground testing or pre-launch initialization, all TSN nodes (including the onboard computer BC, strapdown inertial navigation system, integrated controller, various servo mechanisms, test terminals, and ground terminals) automatically run BMCA after startup. Since the onboard computer BC is connected to a high-precision GPS clock source, BC is elected as the master clock for the entire network, and the remaining nodes are slave nodes. Initial synchronization between the master and slave nodes is achieved via gPTP messages, reaching a time synchronization accuracy within ±50 nanoseconds. This phase corresponds to step S1 establishing the time synchronization reference, step S2 establishing the master clock and outputting the master-slave relationship table, and then proceeding to steps S3 and S4 to complete link delay calculation and clock correction.
[0146] (2) First stage of flight:
[0147] Upon entering the first-level flight phase, the BC sends gPTP synchronization messages to all slave nodes at a 1-millisecond cycle, maintaining continuous nanosecond-level synchronization across the entire network. The strapdown inertial navigation system (SINS) synchronously samples inertial data (such as acceleration and angular rate) under a unified TSN clock trigger and uploads the sampled data along with a TSN timestamp to the BC. The integrated controller I receives the attitude reference information from the BC and completes preliminary data calculation. The measurement terminal uploads the data to the BC, and the TSN network controls the data transmission delay to the nanosecond level through a precise time synchronization mechanism. Subsequently, the BC issues control surface commands to the first-level servo mechanisms, which execute actions according to the commands carrying timestamps, ensuring that the action time deviation is less than 50 nanoseconds. This process corresponds to the periodic transmission of synchronization messages, calculation of time deviation and frequency ratio, unified reference time output, and timestamp-bound control closed-loop application in step S4.
[0148] (3) The second-stage flight phase and the separation process between the first and second stages:
[0149] During the second stage of flight, the strapdown inertial navigation system (SINS) again synchronously samples inertial data under a unified TSN clock and uploads it to the BC with a timestamp. The integrated controller II receives and processes the second-stage attitude commands issued by the BC. Subsequently, the BC issues inter-stage separation commands, and the second-stage servo mechanism and separation actuator execute actions synchronously according to the unified TSN clock, ensuring that the action deviation is less than 50 nanoseconds to avoid the risk of separation jamming due to time deviation. After the first and second stages separate, the rocket body network topology changes, and the system automatically enters the BMCA process to re-elect the master clock for the entire network, with the remaining nodes acting as slave nodes. The master and slave nodes synchronize via gPTP messages to ensure that the system continues to maintain high-precision time synchronization. The above separation causes topology abrupt changes, master re-election, and resynchronization processes corresponding to renegotiation updates and the reconstruction of compensation parameters in steps S3 and S4. In an optional embodiment, when the intensity of the topology change triggers the anomaly flag Ωk=1, an improved BMCA can be enabled to improve the robustness of master election during the partitioning / reconnection phase.
[0150] (4) Third-stage flight:
[0151] Upon entering the Level 3 flight phase, the strapdown inertial navigation system continues to synchronously sample inertial data under a unified TSN clock and uploads it to the BC with timestamps. Subsequently, the BC issues engine ignition commands to the Level 3 servo mechanisms, which execute actions according to the unified TSN timestamps, ensuring that the action time deviation is less than 50 nanoseconds, thereby guaranteeing orbit insertion accuracy and mission timeliness. This phase is still maintained by step S4 for continuous synchronization, and the timing of sampling, calculation, control commands, and actuator actions is driven by a unified reference time.
[0152] (5) Master clock failure scenario:
[0153] If the master clock BC fails, all TSN nodes trigger BMCA renegotiation within 1 millisecond; the measurement terminal (configured with a backup clock source) can be elected as the new master clock, and the new master clock sends gPTP synchronization messages to the entire network; all slave nodes quickly resynchronize and maintain synchronization accuracy within ±50 nanoseconds, ensuring uninterrupted high-precision time synchronization, thereby ensuring that timing interactions during flight missions are not affected. This scenario corresponds to the renegotiation update in step S2 and the synchronization sequence recovery in step S4; in an optional embodiment, when the degree of evidence conflict increases significantly or the consistency decision does not meet the threshold, an anti-spoofing consistency decision / partition master election strategy can be entered to further improve the reliability of master clock selection under fault and abnormal conditions.
[0154] Reference Figure 6 , Figure 6 This is a schematic diagram of the time synchronization system of a rocket control system based on TSN according to an embodiment of the present invention.
[0155] like Figure 6 As shown, the rocket control system time synchronization system based on TSN proposed in this embodiment of the invention includes:
[0156] Module 10 is used to acquire the time source status data and node clock performance parameter data of each TSN node in the rocket control system TSN network, and construct a set of node clock performance vectors.
[0157] Comparison module 20 is used to perform comparison calculation processing of the optimal master clock algorithm on the set of node clock performance vectors, so as to output the master clock node identifier, slave clock node identifier and master-slave relationship table;
[0158] Execution module 30 is used to perform hardware layer timestamp capture and timestamp insertion processing on gPTP event messages on each master-slave link using the master-slave relationship table, so as to generate a sending timestamp and a receiving timestamp corresponding to each gPTP event message and write them into the timestamp record table.
[0159] The calculation module 40 is used to perform link propagation delay calculation and clock frequency ratio calculation on each master-slave link based on the timestamp record table, so as to generate link delay data and a set of clock correction parameters for correcting the local clock.
[0160] The sending module 50 is used to generate and send gPTP synchronization data streams according to a preset period based on the master clock node identifier, the link delay data and the clock correction parameter set, so that each TSN node outputs a synchronization time series under a unified time base.
[0161] The generation module 60 is used to generate time-stamped sensor sampling data and time-stamped control command data for rocket control based on the synchronous time series.
[0162] Other embodiments or specific implementations of the rocket control system time synchronization system based on TSN of the present invention can be referred to the above-described method embodiments, and will not be repeated here.
[0163] It is understood that in the description of this specification, references to terms such as "one embodiment," "another embodiment," "other embodiments," or "first embodiment to Nth embodiment," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0164] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0165] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for time synchronization of a TSN-based rocket control system, characterized in that, Includes the following steps: Acquire the time source status data and node clock performance parameter data of each TSN node in the rocket control system TSN network, and construct a set of node clock performance vectors; Specifically, this includes: collecting time source status data corresponding to each TSN node within the rocket control system TSN network; wherein the time source status data includes at least satellite timing status data and local oscillator stability data, and generating a time source availability identifier; collecting node clock performance parameter data corresponding to each TSN node; wherein the node clock performance parameter data includes at least priority parameters, clock level parameters, clock accuracy parameters, stability characterization parameters, and node identity parameters; mapping the node clock performance parameter data to node clock performance vectors according to a preset field order, and forming a set of node clock performance vectors; associating the time source availability identifier with the corresponding node clock performance vector to generate a clock candidate dataset for comparison and calculation processing by the optimal master clock algorithm; The optimal master clock algorithm is compared and calculated for the set of node clock performance vectors to output the master clock node identifier, slave clock node identifier, and master-slave relationship table. Specifically, this includes: constructing anomaly scenario feature vectors and performing event trigger judgment, outputting anomaly master selection trigger identifier; when the anomaly master selection trigger identifier is true, performing cross-node multi-source evidence interaction and generating an evidence set; performing multi-source evidence fusion calculation based on the evidence set, outputting candidate node credibility scores; performing future window stability prediction calculation on candidate nodes, outputting prediction time error variance; constructing the master clock cost function under anomaly scenarios and outputting candidate ranking results; performing anti-spoofing consistency judgment and outputting the master clock node. Using the master-slave relationship table, hardware-layer timestamp capture and timestamp insertion processing is performed on gPTP event packets on each master-slave link to generate send timestamps and receive timestamps corresponding to each gPTP event packet and write them into the timestamp record table. Specifically, this includes: using the master-slave relationship table, performing frame type parsing processing on data frames entering the TSN node network interface on each master-slave link to generate frame type parsing results; identifying gPTP event packets based on the frame type parsing results and generating gPTP tag information for the identified gPTP event packets; generating send timestamps and receive timestamps at the hardware layer for the send and receive moments of the gPTP event packets based on the gPTP tag information; binding the send timestamps and receive timestamps with the corresponding gPTP event packet identifiers to generate timestamp binding records and writing them into the timestamp record table; and outputting the timestamp record table to the CPU-side gPTP protocol processing stack for subsequent frequency difference calculation and time difference calculation. Specifically, generating timestamp binding records and writing them to the timestamp record table includes: The receive timestamp and send timestamp output by the receive parsing instance and send parsing instance, respectively, used to parse the received gPTP event message, are written into the timestamp FIFO buffer to generate receive timestamp buffer data and send timestamp buffer data. A buffer state detection process is performed on the timestamp FIFO buffer, and a timestamp read trigger signal is output when the buffer state meets the preset read conditions. Based on the timestamp read trigger signal, the receive timestamp buffer data and the send timestamp buffer data are extracted from the timestamp FIFO buffer and reassembled into the timestamp record table according to the message identifier. The timestamp record table is provided to the software-side protocol state machine to drive the state transition and parameter update of the synchronization mechanism. Based on the timestamp record table, link propagation delay calculation and clock frequency ratio calculation are performed on each master-slave link to generate link delay data and a set of clock correction parameters for correcting the local clock. Based on the master clock node identifier, the link delay data, and the clock correction parameter set, a gPTP synchronization data stream with a preset period is generated and sent so that each TSN node outputs a synchronization time series under a unified time base. Based on the synchronized time series, timestamped sensor sampling data and timestamped control command data are generated for rocket control; By performing arrival detection on the gPTP synchronization data stream, a master clock failure alarm data is generated and a BMCA renegotiation flag is triggered when consecutive missing synchronization data streams meet the preset missing conditions; the timestamp record table, link delay data and clock correction parameter set are reinitialized; and a new master clock is elected and the synchronization data stream is restored within 1 millisecond when the master clock fails.
2. The TSN-based rocket control system time synchronization method of claim 1, wherein, Based on the timestamp record table, link propagation delay calculation is performed on each master-slave link, specifically including: A set of peer delay measurement messages is generated and exchanged on the master-slave link. The set of peer delay measurement messages includes at least the data frames Pdelay_Req, Pdelay_Resp and Pdelay_Resp_Follow_Up. Extract the timestamp group corresponding to the peer delay measurement message set from the timestamp record table; wherein the timestamp group includes at least t1, t2, t3, and t4; Based on the timestamp group, link propagation delay calculation is performed to output the link propagation delay and generate the link delay data; wherein, the expression for the output link propagation delay is: ; In the formula, t1 represents the sending timestamp of Pdelay_Req by the initiating node; t2 represents the receiving timestamp of Pdelay_Req by the peer node; t3 represents the sending timestamp of Pdelay_Resp by the peer node; t4 represents the receiving timestamp of Pdelay_Resp by the initiating node; and D represents the propagation delay of the master-slave link.
3. The TSN-based rocket control system time synchronization method of claim 1, wherein, Based on the timestamp record table, the clock frequency ratio of each master-slave link is calculated to generate link delay data and a set of clock correction parameters for correcting the local clock, specifically including: Obtain the master control frequency related data output by the master clock node in the Pdelay_Resp_Follow_Up message, and obtain the local timing data of the slave clock node to form a master-slave time interval pair; The frequency ratio is calculated based on the master-slave time interval to generate the frequency ratio of the master clock relative to the local clock; the time deviation is calculated based on the frequency ratio and the link propagation delay for the master-slave transmission and reception timestamps of the synchronization message to generate the clock deviation. The expression for the frequency ratio and the clock offset is as follows: ; ; In the formula, This represents the time interval between two consecutive references of the master clock node; This represents the local time interval between two consecutive clock nodes; This indicates the timestamp used by the master clock node to send the synchronization event message. The timestamp for receiving the synchronization event message from the clock node is represented; D represents the link propagation delay; Δt represents the time deviation between the slave clock node and the master clock node. The frequency ratio and the clock offset are combined to generate the clock correction parameter set.
4. The time synchronization method for rocket control systems based on TSN as described in claim 1, characterized in that, Based on the master clock node identifier, the link delay data, and the clock correction parameter set, a gPTP synchronization data stream is generated and sent according to a preset period, so that each TSN node outputs a synchronization time series under a unified time base. Specifically, this includes: A synchronization period parameter is generated based on a preset synchronization period, and a synchronization sequence number that increments periodically is generated based on the synchronization period parameter. Based on the synchronization sequence number, the master clock node identifier, and the clock correction parameter set, gPTP synchronization messages and Pdelay_Resp_Follow_Up messages are generated, forming a synchronization data stream; The synchronization data stream is sent to each slave clock node, and a synchronization time sequence is output on each slave clock node side based on the link delay data and the clock correction parameter set.
5. The time synchronization method for rocket control systems based on TSN as described in claim 1, characterized in that, Based on the synchronized time series, timestamped sensor sampling data and timestamped control command data for rocket control are generated, specifically including: The sensor sampling data of the rocket control system is acquired and the synchronous time series is called to generate sampling timestamps to form time-stamped sensor sampling data; The system acquires control command data from the rocket control system and calls the synchronous time series to generate command execution timestamps, forming timestamped control command data. The command execution timestamps are then bound to the control command data and output.
6. A time synchronization system for a rocket control system based on TSN, characterized in that, The time synchronization method for a rocket control system based on TSN as described in any one of claims 1-5 includes: The module is used to acquire the time source state data and node clock performance parameter data of each TSN node in the rocket control system TSN network, and construct a set of node clock performance vectors. The comparison module is used to perform comparison calculations of the optimal master clock algorithm on the set of node clock performance vectors, so as to output the master clock node identifier, the slave clock node identifier, and the master-slave relationship table. The execution module is used to perform hardware layer timestamp capture and timestamp insertion processing on gPTP event packets on each master-slave link using the master-slave relationship table, so as to generate the sending timestamp and receiving timestamp corresponding to each gPTP event packet and write them into the timestamp record table. The calculation module is used to perform link propagation delay calculation and clock frequency ratio calculation on each master-slave link based on the timestamp record table, so as to generate link delay data and a set of clock correction parameters for correcting the local clock. The sending module is used to generate and send gPTP synchronization data streams according to a preset period based on the master clock node identifier, the link delay data and the clock correction parameter set, so that each TSN node outputs a synchronization time series under a unified time base; The generation module is used to generate timestamped sensor sampling data and timestamped control command data for rocket control based on the synchronous time series.