A method for clock synchronization of wireless time-sensitive network inside spacecraft
By building a wireless time-sensitive network inside the spacecraft, using Beacon frame and bidirectional time measurement communication, combined with the TDMA network and IEEE802.1AS protocol, high-precision clock synchronization is achieved, solving the problem that the existing technology cannot meet the high-precision synchronization requirements in the spacecraft.
Patent Information
- Application Number
- CN202310102009.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-10
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2043-02-10
AI Technical Summary
The existing clock synchronization technology cannot achieve high-precision synchronization in the spacecraft, and the IEEE802.1AS protocol lacks practice in wireless networks and cannot meet the synchronization accuracy requirements of network communications within the spacecraft.
By building a wireless time-sensitive network inside the spacecraft, the master clock and slave clock conduct Beacon frame communication to obtain time information, perform drift compensation to achieve coarse synchronization, use bidirectional time measurement communication to calculate link propagation delay, and communicate through TDMA network slot allocation and time measurement packets of the IEEE802.1AS protocol to complete clock synchronization.
It improves the clock synchronization accuracy of the master and slave devices, reduces the measurement error of link delay, ensures the stable transmission of synchronous measurement packets in the network, and supports high-precision real-time communication within the spacecraft.
Smart Images

Figure CN116318506B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of wireless time-sensitive network communication, and in particular relates to a method for synchronizing a wireless time-sensitive network clock inside a spacecraft. Background Art
[0002] With the continuous development of space science and manned space technology, the complexity of space missions is also gradually increasing, which puts forward higher requirements on the reliability, intelligence, modularity and other aspects of spacecraft. At present, high-speed data transmission of spacecraft is usually achieved by three-wire LVDS cables. Since data signals, clock signals and control signals are all transmitted in the form of differential signal pairs, one LVDS line includes six cables. In addition, LVDS belongs to simplex communication, so 12 cables are required to achieve two-way communication between two nodes. These signal cables are intricate inside the spacecraft, which not only brings difficulties to the design, manufacture, equipment and commissioning of the spacecraft, but also occupies precious loads and space, objectively reducing the carrying capacity, and when inspecting and maintaining the equipment, line maintenance, problem troubleshooting and line transformation are also quite difficult.
[0003] Although wireless communication has the advantages of providing mobility and reducing deployment costs, it is only used for non-critical, non-time-sensitive industrial communications. Applying Time Sensitive Networking (TSN) to wireless networks can meet the needs of real-time communication and precise control of sensors. TSN is a high-quality network proposed by the IEEE 802.1 working group that can provide low latency, low jitter and extremely low data loss capabilities for time-sensitive services. It is based on traditional Ethernet and relies on multiple optimization mechanisms such as time synchronization, traffic scheduling, and path redundancy to ensure real-time and efficient transmission of time-sensitive services. TSN can not only provide reliable Quality of Service (QoS) guarantees for time-sensitive services, but also support the transmission of non-time-sensitive services in the network. Therefore, the existing TSN standard can be well utilized in intra-satellite networks.
[0004] As a prerequisite for the implementation of TSN technology, the IEEE 802.1AS clock synchronization protocol works at the data link layer of full-duplex Ethernet and achieves high-precision clock synchronization through timestamp transmission. The IEEE802.1AS protocol has a simple structure, strong scalability, is easy to deploy, and has synchronization accuracy of nanoseconds, providing high-precision clock synchronization services for many fields such as automated factories, automotive control, and audio and video transmission. The accuracy of the timestamp determines the accuracy of synchronization. In the IEEE802.1AS protocol that uses timestamps for information transmission and calculation, high-precision timestamps play a vital role in improving synchronization accuracy. However, at present, the domestic focus on the IEEE 802.1AS protocol is more on the research and implementation of clock synchronization on the wired network side. The application of the IEEE 802.1AS protocol to wireless networks is still in the theoretical research stage and there are few literatures.
[0005] In summary, it is necessary to introduce wireless TSN technology to reduce the weight of spacecraft wiring harnesses while ensuring the time delay determinism of intra-satellite communication. However, the existing clock synchronization technology solutions mostly use software timestamps, which can only achieve synchronization accuracy of several hundred us or even ms, and cannot meet the synchronization accuracy requirements required for intra-spacecraft network communication. At the same time, the IEEE802.1AS protocol lacks practice on wireless networks. Therefore, a method based on the IEEE802.1AS protocol to achieve high-precision clock synchronization on wireless networks is urgently needed. Summary of the invention
[0006] In view of the shortcomings of the prior art, the present invention proposes a method for synchronizing a clock in a wireless time-sensitive network within a spacecraft, the method comprising:
[0007] S1: Build a wireless network inside the spacecraft, including access point AP and station STA, AP is used as the master clock and STA is used as the slave clock;
[0008] S2: The master clock and the slave clock obtain time information through Beacon frame communication; the slave clock performs drift compensation based on the time information to achieve coarse synchronization; the time information includes the Beacon frame sending timestamp and the Beacon frame arrival timestamp;
[0009] S3: The master clock and the slave clock perform two-way time measurement communication, and the slave clock obtains the timestamp required for calculating the average link propagation delay according to the communication result and calculates the first link propagation delay according to the timestamp;
[0010] S4: TDMA network time slot allocation is performed according to the propagation delay of the first link, the master clock and the slave clock communicate using the time measurement message of the IEEE802.1AS protocol and calculate the propagation delay of the second link;
[0011] S5: The master clock and the slave clock transmit synchronization information and complete clock synchronization according to the second link propagation delay.
[0012] Preferably, the process of the master clock and the slave clock performing Beacon frame communication includes:
[0013] S21: Design a wireless network card driver module and initialize the wireless network card driver module;
[0014] S22: Based on the wireless network card driver module, under the WiFi network, the master clock periodically broadcasts Beacon frames carrying a sending timestamp;
[0015] S23: Receive and parse the Beacon frame from the clock, obtain the Beacon frame sending timestamp and record the Beacon frame arrival timestamp.
[0016] Furthermore, the wireless network card driver module includes a channel access control module, a link scheduling module, a synchronization module, a timer and a message queue;
[0017] The channel access control module is used to manage the sites accessing the AP;
[0018] The link scheduling module is used to arrange the scheduling order of the accessed sites;
[0019] The synchronization module is used to implement a clock drift compensation algorithm to calibrate the local clock;
[0020] The timer is used to trigger the link scheduling module to perform link scheduling;
[0021] The message queue is used to interact with the link scheduling module to implement message processing and sending.
[0022] Preferably, the process of performing drift compensation from the clock according to the time information includes:
[0023] Calculate the clock drift ρ of the i-th synchronization cycle based on the time information i , predict the clock drift of the i+1th synchronization period S according to the clock drift of the i-th synchronization period i+1 ;
[0024] If the Beacon frame sending timestamp is greater than the Beacon frame arrival timestamp, The TSF timer of the slave clock increases by 1us, where T is the Beacon frame transmission period;
[0025] If the Beacon frame sending timestamp is equal to the Beacon frame arrival timestamp, the TSF timer of the slave clock is not adjusted;
[0026] If the Beacon frame sending timestamp is less than the Beacon frame arrival timestamp, The TSF timer of the slave clock is decremented by 1us.
[0027] Preferably, the process of the master clock and the slave clock performing bidirectional time measurement communication includes:
[0028] S31: The slave clock in each clock synchronization domain broadcasts P to the wireless channel delay_req Link propagation delay measurement request frame, and record the initiation time t 1 ; Among them, P delay_req The link propagation delay measurement request frame encapsulates the synchronization domain number of the current node;
[0029] S32: The master clock is at t 2 Always receive and parse P delay_req Frame, judge P delay_req Is the synchronization domain number in the frame the same as the domain number of the current node? If different, discard it; if the same, record the time t 2 And save P delay_req The source MAC address of the frame;
[0030] S33: The master clock is at t 3 Time t 2 Packaged in P delay_resp In the link propagation delay measurement response frame, P delay_req The source MAC address of the frame is the destination MAC address and is unicasted to the wireless channel. delay_resp Frame and record t 3 time;
[0031] S34: From the clock at t 4 Receive and parse to P at all times delay_resp frame, get time t 2 And record t 2 ,t 4 time;
[0032] S35: The master clock sends the content of t 3 P at the moment delay_resp_follow_up The message is sent to the slave clock, and the slave clock records t 3 time.
[0033] Preferably, the formula for calculating the first link propagation delay is:
[0034]
[0035] Among them, P delay ′ represents the first link propagation delay, t 4 Indicates that the slave clock receives and resolves to P delay_resp The time of the frame, t 1Indicates that P is initiated from the clock delay_req The time of the frame, r represents the clock frequency offset ratio of the master and slave clock nodes, t 3 Indicates that the master clock is unicast P delay_resp The time of the frame, t 2 Indicates that the master clock receives and analyzes P delay_req Frame moment.
[0036] Preferably, the formula for calculating the second link propagation delay is:
[0037]
[0038] Among them, P delay represents the second link propagation delay, D s represents the processing delay of the slave clock, W s Indicates the additional waiting time when the slave clock sends a request, T phy,s Indicates the physical medium occupancy time from sending a request to receiving a request, D m represents the processing delay of the master clock, W m Indicates the additional waiting time when the master clock sends a response, T phy,m Indicates the physical medium occupancy time from sending a response to receiving a response.
[0039] Preferably, the process of transmitting synchronization information between the master clock and the slave clock and completing clock synchronization includes:
[0040] The master clock encapsulates synchronization information in the Sync synchronization information transmission frame and broadcasts the Sync frame to the wireless channel; the synchronization information includes the original timestamp, synchronization domain number, clock frequency offset ratio and clock correction information of the current node;
[0041] Receive and parse the Sync frame from the clock; determine whether the synchronization domain number in the frame is the same as the synchronization domain number of the current node. If they are different, discard them; if they are the same, record the clock information in the Sync frame;
[0042] The slave clock corrects the slave clock according to the second link propagation delay and the clock information in the Sync frame to achieve accurate synchronization with the master clock.
[0043] Furthermore, the formula for correcting the slave clock is:
[0044] T sync =T origin +P delay
[0045] Among them, T sync Represents the corrected slave clock time, T origin Represents the original timestamp in the Sync frame, P delay Represents the second link propagation delay.
[0046] The beneficial effects of the present invention are as follows: the present invention obtains the link propagation delay between the slave clock and the master clock through a two-way clock measurement method, ensures that the node can send the clock measurement message in time and can flexibly adjust the time slot division according to the different time slot requirements of each node through TDMA time slot allocation, thereby ensuring the real-time performance of related synchronization messages and avoiding interference from other messages to the greatest extent, and ensuring the stable transmission of synchronization measurement messages in the network, thereby reducing the measurement error of the link delay and improving the clock synchronization accuracy of the master and slave devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 This is a flow chart of the method for synchronizing a clock in a wireless time-sensitive network inside a spacecraft in the present invention;
[0048] Figure 2 This is a schematic diagram of a wireless network scenario inside a spacecraft in the present invention;
[0049] Figure 3 This is a flow chart of implementing coarse synchronization through Beacon frames in the present invention;
[0050] Figure 4 This is a schematic diagram of the wireless link propagation delay measurement principle in the present invention;
[0051] Figure 5 This is a flow chart of link propagation delay measurement in the present invention;
[0052] Figure 6 A schematic diagram of a superframe structure used in the present invention;
[0053] Figure 7 A schematic diagram of a slave clock-master clock bidirectional communication on a TDMA network in the present invention;
[0054] Figure 8 A schematic diagram of a feedback loop from a master clock pair on a TDMA network of the present invention;
[0055] Fig. 9 This is a flow chart of synchronous information transmission in the present invention. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] The present invention proposes a method for synchronizing a clock in a wireless time-sensitive network within a spacecraft. Figure 1As shown, the method includes the following contents:
[0058] S1: Build a wireless network inside the spacecraft, including access points AP and stations STA, with AP as the master clock and STA as the slave clock.
[0059] like Figure 2 As shown in the figure, the wireless network inside the spacecraft includes access points AP and stations STA. Specifically, the nodes in the spacecraft internal network can be divided into sensor nodes, terminal nodes, wireless access points and central controllers. Sensors and mobile terminals in a certain area collect data to the central controller through the wireless network. Since the wireless access point in the cabin is far away from other cabins, the data is uploaded to the core cabin master controller through the TSN switch in a wired manner. The sensor node monitors the shell pressure, temperature and flight attitude of the spacecraft. This type of monitoring data has the characteristics of periodicity, fixed business volume and high sensitivity to end-to-end data delay. The transmission of time-sensitive services is based on time synchronization between nodes and within nodes. Only when each node has a common time reference can all devices achieve consistency and perform the required operations at the right time.
[0060] S2: The master clock and the slave clock obtain time information through Beacon frame communication; the slave clock performs drift compensation based on the time information to achieve coarse synchronization; the time information includes the Beacon frame sending timestamp and the Beacon frame arrival timestamp.
[0061] S21: Design a wireless network card driver module and initialize the wireless network card driver module.
[0062] like Figure 3 As shown, the wireless network card driver module includes a channel access control module, a link scheduling module, a synchronization module, a timer and a message queue; the channel access control module is used to manage the sites accessing the AP; the link scheduling module is used to arrange the scheduling order for the accessed sites; the synchronization module is used to implement the clock drift compensation algorithm to calibrate the local clock; the timer is used to trigger the link scheduling module to perform link scheduling; the message queue is used to interact with the link scheduling module to realize message processing and sending.
[0063] S22: Based on the wireless network card driver module, in the WiFi network, the master clock periodically broadcasts Beacon frames carrying a sending timestamp.
[0064] In a wireless time-sensitive network, the master clock periodically generates Beacon frames. The AP puts the Beacon frames into the sending buffer for transmission. When a Beacon cycle is reached, an interrupt is generated, and the transmission timestamp is added to the timestamp position reserved in the Beacon frame and sent together with the Beacon frame.
[0065] S23: Receive and parse the Beacon frame from the clock, obtain the Beacon frame sending timestamp and record the Beacon frame arrival timestamp
[0066] When a Beacon frame sent by the AP is received, an interrupt is generated, and the receiving timestamp of the slave clock device is recorded. After the reception is completed, the Beacon frame is parsed to obtain the sending timestamp of the Beacon frame.
[0067] The process of drift compensation from the clock based on time information includes:
[0068] Calculate the clock drift ρ of the i-th synchronization cycle based on the time information i , predict the clock drift of the i+1th synchronization period S according to the clock drift of the i-th synchronization period i+1 .
[0069] Calculate the clock drift ρ of the i-th synchronization cycle i :
[0070]
[0071] in, Indicates the Beacon frame arrival timestamp of the i-th synchronization cycle, Indicates the Beacon frame arrival timestamp of the i-1th synchronization cycle. Indicates the Beacon frame sending timestamp of the i-th synchronization cycle, Indicates the timestamp of the Beacon frame transmission in the i-1th synchronization period, where i indicates the number of synchronizations.
[0072] According to the calculated clock drift of the ith synchronization cycle ρ i , predict the clock drift S of the next cycle by an exponential smoothing method i+1 :
[0073] S i+1 =α×ρ i +(1-α)×S i
[0074] Among them, α is the smoothing coefficient, which is between 0.1 and 0.5, and ρ i is the actual calculated clock drift value in the i-th cycle, S i is the predicted clock drift value of the i-th cycle, S 1 =ρ 1 .
[0075] The predicted clock drift is used to compensate the STA local clock drift between two clock adjustments. The adjustment strategy is as follows:
[0076] If the Beacon frame sending timestamp is greater than the Beacon frame arrival timestamp, Then every The TSF timer of the slave clock increases by 1us, where T is the Beacon frame transmission period.
[0077] If the Beacon frame sending timestamp is equal to the Beacon frame arrival timestamp, No adjustment is made to the TSF timer of the slave clock.
[0078] If the Beacon frame sending timestamp is less than the Beacon frame arrival timestamp, Then every The TSF timer of the slave clock is decremented by 1us.
[0079] S3: The master clock and the slave clock perform two-way time measurement communication. The slave clock obtains a timestamp required for calculating the average link propagation delay according to the communication result and calculates the first link propagation delay according to the timestamp.
[0080] The process of bidirectional time measurement communication between a master clock and a slave clock includes:
[0081] Figure 4 The wireless link propagation delay measurement phase is shown. The slave clock device initiates a link propagation delay measurement request, and the master clock device processes the request and sends a response. Figure 5 shown.
[0082] S31: The slave clock (slave clock device) in each clock synchronization domain broadcasts P to the wireless channel delay_req Link propagation delay measurement request frame, and record the initiation time t at the initiator 1 ; Among them, P delay_req The link propagation delay measurement request frame encapsulates the synchronization domain number of the current node.
[0083] S32: The master clock (master clock device) is at t 2 Always receive and parse P delay_req Frame, judge P delay_req Whether the synchronization domain number in the frame is the same as the domain number of the current node, if different, it is discarded; if the same, the receiving end records the time t 2 And save P delay_req Source MAC address of the frame.
[0084] S33: The master clock is at t 3 Time t 2 Packaged in P delay_resp In the link propagation delay measurement response frame, P delay_reqThe source MAC address of the frame is the destination MAC address and is unicasted to the wireless channel. delay_resp frame and record t at the master clock end 3 time.
[0085] S34: From the clock at t 4 Receive and parse to P at all times delay_resp frame, get time t 2 And record t at the slave clock end 2 ,t 4 time.
[0086] S35: The master clock sends the content of t 3 P at the moment delay_resp_follow_up The message is sent to the slave clock, and the slave clock records t 3 time.
[0087] The slave clock obtains the timestamp required to calculate the average link propagation delay based on the communication result and calculates the first link propagation delay based on the timestamp. The calculation formula is:
[0088]
[0089] Among them, P delay ′ represents the first link propagation delay, t 4 Indicates that the slave clock receives and resolves to P delay_resp The time of the frame, t 1 Indicates that P is initiated from the clock delay_req The time of the frame, r represents the clock frequency offset ratio of the master and slave clock nodes, t 3 Indicates that the master clock is unicast P delay_resp The time of the frame, t 2 Indicates that the master clock receives and analyzes P delay_req Frame moment.
[0090] When the calculation of the propagation delay of the first link is completed, the coarse synchronization is completed, and the fine synchronization process is then carried out. The specific process is as follows:
[0091] S4: Perform TDMA network time slot allocation according to the first link propagation delay, the master clock and the slave clock communicate using the time measurement message of the IEEE802.1AS protocol and calculate the second link propagation delay.
[0092] As can be seen from the above, in the initialization phase from system startup to the arrival of the first time slot in the TDMA mode, the wireless access point AP measures the first link propagation delay of each link, i.e., the average propagation delay of the link, through two-way delay measurement; thereafter, in the TDMA network, the AP will allocate a corresponding time slot to each node (station). The superframe structure adopted by the present invention is as follows: Figure 6As shown in the figure, it allocates a time slot pair to each slave clock-master clock pair: one time slot is used for the slave clock to send a request message, and one time slot is used for the master clock to send a response message. After allocating the time slot, the slave clock sends a request message and records the sending time. After receiving the request, the master clock sends a response message. After receiving and parsing the response message, the slave clock calculates the current average link propagation delay. Finally, the master clock sends a synchronization message to the slave clock, and the slave clock corrects the local clock according to the propagation delay and clock drift error; the specific process is as follows:
[0093] The master clock and slave clock communicate using the time measurement message of the IEEE802.1AS protocol:
[0094] like Figure 7 As shown, in some preferred embodiments, it is assumed that each TDMA round consists of N time slots. Without loss of generality, time slot 0 of all rounds is dedicated to transmitting measurement requests from the slave clock end to the master clock end, and time slot n of all rounds is dedicated to transmitting responses from the master clock end to the slave clock end.
[0095] like Figure 8 As shown in FIG8 , the sequence of events in the feedback loop of measuring RTT between the slave clock STA and the master clock AP is shown, including:
[0096] Step 1: Before the transmission time slot arrives, the STA at the clock end generates an interrupt at the MAC layer. 0 Start generating measurement request frames and at time T 1 Generate Request M s Therefore, D s =T 1 -T 0 Is to generate M s The time required; D s It is called the processing delay of the slave clock device;
[0097] Step 2: STA waits until T 2 , which is the beginning of the next round of TDMA time slot 0, M s Transmitted to the AP, resulting in an additional STA waiting time W s =T 2 -T 1 . M s The transmission of STA requires a certain amount of time, which causes the transmission delay of STA. Figure 8 The sending time or delay is T 4 -T 2 , where T 2 STA transmits M s The first moment, T 4 STA transmits M s The last moment of
[0098] Step 3: In the wireless channel, a propagation delay from STA to AP needs to be considered. 3 Always receive M s The first one, in T 5 Always receive M s The last digit of . Among them is T 5 -T 3 =T 4 -T 2 , the channel propagation delay is T 3 -T 2 =T 5 -T 4 Through the transmission delay and propagation delay, it can be obtained that the time the physical medium is occupied is T phy,s =T 5 -T 2 ;
[0099] Step 4: After receiving M s After that, the AP takes some time to process it and generates a measurement response frame M. m , which causes AP processing delay. Assume that the interrupt occurs at T 6 Start generating M at this moment m Then the processing delay of AP is D m =T 6 -T 5 ;
[0100] Step 5: AP waits until T 7 At the time (the beginning of time slot n of the TDMA round), M m sent to the STA, resulting in an additional AP waiting time W m =T 7 -T 6 ;
[0101] Step 6: The first M of the response m In T 8 At the time of reaching STA, the last M m In T 10 Arrives at STA at time. Therefore, T 9 -T 7 =T 10 -T 8 is the transmission delay of the AP, T 8 -T 7 =T 10 -T 9 is the propagation delay of the server. The physical medium occupancy time is T phy,m =T 10 -T 7 .
[0102] Therefore, the entire STA to AP RTT consists of many delay components, and the RTT is calculated as follows:
[0103] RTT=T 10 -T 0 =D s +W s +T phy,s +D m +W m +T phy,m
[0104] The formula for calculating the second link propagation delay is:
[0105]
[0106] Among them, P delay represents the second link propagation delay, D s represents the processing delay of the slave clock, W s Indicates the additional waiting time when the slave clock sends a request, T phy,s Indicates the physical medium occupancy time from sending a request to receiving a request, D m represents the processing delay of the master clock, W m Indicates the additional waiting time when the master clock sends a response, T phy,m Indicates the physical medium occupancy time from sending a response to receiving a response.
[0107] S5: The master clock and the slave clock transmit synchronization information and complete clock synchronization according to the second link propagation delay.
[0108] In this embodiment, the clock synchronization protocol based on IEEE 802.1AS works at the data link layer, and a high-precision hardware timestamp is obtained through the MAC layer management entity MLME of IEEE802.11.
[0109] In the synchronization information transmission stage, the master clock device broadcasts synchronization information to the wireless channel. The clock information transmission process is as follows: Fig. 9 As shown, specifically including:
[0110] The master clock encapsulates the synchronization information in the Sync synchronization information transmission frame and broadcasts the Sync frame to the wireless channel; the synchronization information includes the original timestamp, the synchronization domain number, the clock frequency offset ratio and the clock correction information of the current node; preferably, the correctionField of the master clock node is 0, the clock frequency offset ratio is 1, and the Sync frame is broadcast to the wireless channel.
[0111] Receive and parse the Sync frame from the clock; determine whether the synchronization domain number in the frame is the same as the synchronization domain number of the current node. If they are different, discard them; if they are the same, record the clock information in the Sync frame.
[0112] After obtaining the clock information in the Sync frame, the slave clock corrects the slave clock according to the second link propagation delay and the clock information in the Sync frame to achieve accurate synchronization with the master clock; the formula for correcting the slave clock is:
[0113] T sync =T origin +P delay
[0114] Among them, T sync Represents the corrected slave clock time, T origin Represents the original timestamp in the Sync frame.
[0115] The present invention realizes coarse synchronization through the TSF mechanism to ensure the normal operation of the TDMA network; by combining the IEEE802.1AS synchronization protocol with the TDMA time slot, the conflict between the synchronization protocol message and other messages is avoided, and the waiting delay can be reduced under the premise of deterministically ensuring the successful transmission of the synchronization protocol message in the wireless network, thereby reducing the synchronization error accumulated due to processing delay and channel interference.
[0116] The above embodiments further illustrate the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above embodiments are only preferred implementation modes of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made to the present invention within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for synchronizing a wireless time-sensitive network clock in a spacecraft, characterized in that: include: S1: Build a wireless network inside the spacecraft, including access point AP and station STA, AP is used as the master clock and STA is used as the slave clock; S2: The master clock and the slave clock obtain time information through Beacon frame communication; the slave clock performs drift compensation based on the time information to achieve coarse synchronization; the time information includes the Beacon frame sending timestamp and the Beacon frame arrival timestamp; S3: The master clock and the slave clock perform two-way time measurement communication, and the slave clock obtains the timestamp required for calculating the average link propagation delay according to the communication result and calculates the first link propagation delay according to the timestamp; S4: TDMA network time slot allocation is performed according to the propagation delay of the first link, the master clock and the slave clock communicate using the time measurement message of the IEEE802.1AS protocol and calculate the propagation delay of the second link; S5: The master clock and the slave clock transmit synchronization information and complete clock synchronization according to the second link propagation delay.
2. A method for synchronizing a spacecraft internal wireless time-sensitive network clock according to claim 1, characterized in that: The process of Beacon frame communication between the master clock and the slave clock includes: S21: Design a wireless network card driver module and initialize the wireless network card driver module; S22: Based on the wireless network card driver module, under the WiFi network, the master clock periodically broadcasts Beacon frames carrying a sending timestamp; S23: Receive and parse the Beacon frame from the clock, obtain the Beacon frame sending timestamp and record the Beacon frame arrival timestamp.
3. A method for synchronizing a spacecraft internal wireless time-sensitive network clock according to claim 2, characterized in that: The wireless network card driver module includes a channel access control module, a link scheduling module, a synchronization module, a timer and a message queue; The channel access control module is used to manage the sites accessing the AP; The link scheduling module is used to arrange the scheduling order of the accessed sites; The synchronization module is used to implement a clock drift compensation algorithm to calibrate the local clock; The timer is used to trigger the link scheduling module to perform link scheduling; The message queue is used to interact with the link scheduling module to implement message processing and sending.
4. A method for synchronizing a spacecraft internal wireless time-sensitive network clock according to claim 1, characterized in that: The process of drift compensation from the clock based on time information includes: Calculate the clock drift ρ of the i-th synchronization cycle based on the time information i , predict the clock drift of the i+1th synchronization period S according to the clock drift of the i-th synchronization period i+1 ; If the Beacon frame sending timestamp is greater than the Beacon frame arrival timestamp, The TSF timer of the slave clock increases by 1us, where T is the Beacon frame transmission period; If the Beacon frame sending timestamp is equal to the Beacon frame arrival timestamp, the TSF timer of the slave clock is not adjusted; If the Beacon frame sending timestamp is less than the Beacon frame arrival timestamp, The TSF timer of the slave clock is decremented by 1us.
5. The method for synchronizing a spacecraft internal wireless time-sensitive network clock according to claim 1, characterized in that: The process of bidirectional time measurement communication between a master clock and a slave clock includes: S31: The slave clock in each clock synchronization domain broadcasts P to the wireless channel delay_req Link propagation delay measurement request frame, and record the initiation time t1; where P delay_req The link propagation delay measurement request frame encapsulates the synchronization domain number of the current node; S32: The master clock receives and analyzes P at time t2 delay_req Frame, judge P delay_req Is the synchronization domain number in the frame the same as the domain number of the current node? If different, discard it; if the same, record the time t2 and save P delay_req The source MAC address of the frame; S33: The master clock encapsulates time t2 in P at time t3 delay_resp In the link propagation delay measurement response frame, P delay_req The source MAC address of the frame is the destination MAC address and is unicasted to the wireless channel. delay_resp Frame and record time t3; S34: Receive and parse from the clock at time t4 to P delay_resp frame, get time t2 and record time t2 and t4; S35: The master clock sends a P containing the time t3 delay_resp_follow_up The message is sent to the slave clock, and the slave clock records the time t3.
6. A method for synchronizing a spacecraft internal wireless time-sensitive network clock according to claim 1, characterized in that: The formula for calculating the first link propagation delay is: Among them, P delay ′ represents the first link propagation delay, t4 represents the delay from the clock received and resolved to P delay_resp The frame time, t1 represents the time when the clock initiates P delay_req The time of the frame, r represents the clock frequency offset ratio of the master and slave clock nodes, and t3 represents the master clock unicast P delay_resp The time of the frame, t2 indicates that the master clock receives and analyzes P delay_req Frame moment.
7. A method for synchronizing a spacecraft internal wireless time-sensitive network clock according to claim 1, characterized in that: The formula for calculating the second link propagation delay is: Among them, P delay represents the second link propagation delay, D s represents the processing delay of the slave clock, W s Indicates the additional waiting time when the slave clock sends a request, T phy,s Indicates the physical medium occupancy time from sending a request to receiving a request, D m represents the processing delay of the master clock, W m Indicates the additional waiting time when the master clock sends a response, T phy,m Indicates the physical medium occupancy time from sending a response to receiving a response.
8. The method for synchronizing a clock in a wireless time-sensitive network in a spacecraft according to claim 1, characterized in that: The process of the master clock and the slave clock transmitting synchronization information and completing clock synchronization includes: The master clock encapsulates synchronization information in the Sync synchronization information transmission frame and broadcasts the Sync frame to the wireless channel; the synchronization information includes the original timestamp, synchronization domain number, clock frequency offset ratio and clock correction information of the current node; Receive and parse the Sync frame from the clock; determine whether the synchronization domain number in the frame is the same as the synchronization domain number of the current node. If they are different, discard them; if they are the same, record the clock information in the Sync frame; The slave clock corrects the slave clock according to the second link propagation delay and the clock information in the Sync frame to achieve accurate synchronization with the master clock.
9. A method for synchronizing a clock in a wireless time-sensitive network within a spacecraft according to claim 8, characterized in that: The formula for correcting the slave clock is: T sync =T origin +P delay Among them, T sync Represents the corrected slave clock time, T origin Represents the original timestamp in the Sync frame, P delay Represents the second link propagation delay.
Citation Information
Patent Citations
Hierarchical clock synchronization method between low-orbit small satellites
CN112904705A
Time synchronization in hybrid wired-wireless time-sensitive networking
US20220248354A1