[go: up one dir, main page]

CN116318506B - Clock synchronization method for wireless time-sensitive network in spacecraft - Google Patents

Clock synchronization method for wireless time-sensitive network in spacecraft Download PDF

Info

Publication number
CN116318506B
CN116318506B CN202310102009.2A CN202310102009A CN116318506B CN 116318506 B CN116318506 B CN 116318506B CN 202310102009 A CN202310102009 A CN 202310102009A CN 116318506 B CN116318506 B CN 116318506B
Authority
CN
China
Prior art keywords
clock
time
delay
frame
slave clock
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310102009.2A
Other languages
Chinese (zh)
Other versions
CN116318506A (en
Inventor
赵国锋
杨艳军
徐川
邢媛
张小林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing University of Post and Telecommunications
Original Assignee
Chongqing University of Post and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing University of Post and Telecommunications filed Critical Chongqing University of Post and Telecommunications
Priority to CN202310102009.2A priority Critical patent/CN116318506B/en
Publication of CN116318506A publication Critical patent/CN116318506A/en
Application granted granted Critical
Publication of CN116318506B publication Critical patent/CN116318506B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0682Clock or time synchronisation in a network by delay compensation, e.g. by compensation of propagation delay or variations thereof, by ranging
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0652Synchronisation among time division multiple access [TDMA] nodes, e.g. time triggered protocol [TTP]
    • H04J3/0655Synchronisation among time division multiple access [TDMA] nodes, e.g. time triggered protocol [TTP] using timestamps
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明属于无线时间敏感网络通信技术领域,具体涉及一种航天器内部无线时间敏感网络时钟同步方法;该方法包括:构建航天器内部无线网络,包括接入点AP和站点STA;作为主时钟的AP和作为从时钟的STA从时钟通过Beacon帧通信获取时间信息;从时钟根据时间信息进行漂移补偿,实现粗同步;主时钟和从时钟进行双向时间测量通信并计算第一链路传播时延;根据第一链路传播时延进行TDMA网络时隙分配,主时钟和从时钟采用IEEE802.1AS协议的时间测量报文进行通信并计算第二链路传播时延;主时钟和从时钟进行同步信息传递并完成时钟同步;本发明可保障同步测量报文在网络中的稳定传输,提高AP和STA的时钟同步精度。

The invention belongs to the technical field of wireless time-sensitive network communication, and specifically relates to a method for synchronizing a clock of a wireless time-sensitive network inside a spacecraft; the method comprises: constructing a wireless network inside a spacecraft, including an access point AP and a station STA; the AP as a master clock and the STA as a slave clock acquire time information from the slave clock through Beacon frame communication; the slave clock performs drift compensation according to the time information to achieve coarse synchronization; the master clock and the slave clock perform two-way time measurement communication and calculate the propagation delay of a first link; TDMA network time slot allocation is performed according to the propagation delay of the first link, and the master clock and the slave clock communicate using the time measurement message of the IEEE802.1AS protocol and calculate the propagation delay of a second link; the master clock and the slave clock perform synchronization information transmission and complete clock synchronization; the invention can ensure the stable transmission of the synchronization measurement message in the network and improve the clock synchronization accuracy of the AP and the STA.

Description

Clock synchronization method for wireless time-sensitive network in spacecraft
Technical Field
The invention belongs to the technical field of wireless time-sensitive network communication, and particularly relates to a clock synchronization method for a wireless time-sensitive network in a spacecraft.
Background
With the continuous development of space science and manned aerospace technology, the complexity of aerospace tasks is gradually increased, so that higher requirements are put on the reliability, the intelligence, the modularization and the like of a spacecraft. At present, high-speed data transmission of a spacecraft is generally realized by adopting a three-wire LVDS cable, and as data signals, clock signals and control signals are transmitted in the form of differential signal pairs, one-path LVDS comprises six cables. And LVDS belongs to simplex communication, 12 cables are required to realize two-way communication of two nodes. The signal cables are intricate and complex in the spacecraft, which not only brings difficulty to the design, manufacture, equipment and debugging of the spacecraft, but also occupies precious load and space, objectively reduces carrying capacity, and is quite difficult to repair, examine and reform the circuit when the equipment is inspected and maintained.
Although wireless communication has the advantage of providing mobility and reducing deployment costs, it is only used for non-critical, non-time sensitive industrial communications. The application of a time sensitive network (TIME SENSITIVE Networking, TSN) to a wireless network can meet the requirements of real-time communication and accurate control of the sensor. TSN is a high quality network proposed by the IEEE 802.1 working group that is capable of providing low latency, low jitter and extremely low data loss capabilities for time sensitive services. Based on the traditional Ethernet, the real-time and efficient transmission of the time-sensitive service is ensured by virtue of various optimization mechanisms such as time synchronization, flow scheduling, path redundancy and the like. The TSN is capable of providing reliable quality of service (Quality of Service, qoS) guarantees for time sensitive traffic while also supporting the transmission of non-time sensitive traffic in the network. Thus, existing TSN standards may be well utilized in an intra-satellite network.
The IEEE802.1AS clock synchronization protocol works on the data link layer of the full duplex Ethernet on the premise of realizing the TSN technology, and realizes high-precision clock synchronization in a time stamp transmission mode. The IEEE802.1AS protocol has simple structure, strong expansibility, easy deployment and accurate synchronization precision to nanosecond level, and provides high-precision clock synchronization service for various fields such as automatic factories, automobile control, audio and video transmission and the like. The accuracy of the time stamp determines the accuracy of synchronization, and a high-accuracy time stamp plays a critical role in improving the accuracy of synchronization in the ieee802.1as protocol in which information transmission and calculation are performed with the time stamp. While much attention is now paid to the IEEE802.1AS protocol in China to the study and implementation of clock synchronization on the wired network side, the application of the IEEE802.1AS protocol to wireless networks is still in the theoretical research stage and has little literature.
In summary, it is necessary to introduce a wireless TSN technology to reduce the weight ratio of the harness of the spacecraft and ensure the time delay certainty of the intra-satellite communication. However, the existing clock synchronization technical scheme mostly uses software time stamps, can only achieve synchronization accuracy of hundreds of us or even ms, cannot achieve synchronization accuracy requirements required by network communication in a spacecraft, and meanwhile, the IEEE802.1AS protocol lacks practice on a wireless network. Therefore, there is a need for a method for implementing high-precision clock synchronization over a wireless network based on the ieee802.1as protocol.
Disclosure of Invention
Aiming at the defects existing in the prior art, the invention provides a clock synchronization method of a wireless time-sensitive network in a spacecraft, which comprises the following steps:
s1, constructing a spacecraft internal wireless network, wherein the spacecraft internal wireless network comprises an Access Point (AP) and a Station (STA), the AP is used as a master clock, and the STA is used as a slave clock;
S2, the master clock and the slave clock acquire time information through Beacon frame communication, and the slave clock performs drift compensation according to the time information to realize coarse synchronization, wherein the time information comprises a Beacon frame sending time stamp and a Beacon frame arrival time stamp;
S3, the master clock and the slave clock carry out bidirectional time measurement communication, the slave clock obtains a time stamp required by calculating the average link propagation delay according to a communication result and calculates the first link propagation delay according to the time stamp;
s4, performing TDMA network time slot allocation according to the first link propagation delay, communicating the master clock and the slave clock by adopting a time measurement message of IEEE802.1AS protocol, and calculating a second link propagation delay;
And S5, the master clock and the slave clock carry out synchronous information transfer and complete clock synchronization according to the propagation delay of the second link.
Preferably, the process of the Beacon frame communication between the master clock and the slave clock includes:
s21, designing a wireless network card driving module and initializing the wireless network card driving module;
S22, based on the wireless network card driving module, under the WiFi network, periodically broadcasting a Beacon frame carrying a sending time stamp by a main clock;
S23, receiving and analyzing the Beacon frame from the clock, obtaining a Beacon frame sending time stamp and recording a Beacon frame arrival time stamp.
Further, the wireless network card driving module comprises 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 for managing stations accessed to the AP;
The link scheduling module is used for scheduling the accessed stations in sequence;
the synchronization module is used for realizing a clock drift compensation algorithm to calibrate the local clock;
The timer is used for triggering the link scheduling module to perform link scheduling;
The message queue is used for interacting with the link scheduling module to realize message processing and sending.
Preferably, the process of drift compensation of the slave clock according to time information includes:
calculating an ith synchronous period clock drift amount rho i according to the time information, and predicting an (i+1) th synchronous period clock drift amount S i+1 according to the ith synchronous period clock drift amount;
If the Beacon frame sending time stamp is greater than the Beacon frame arrival time stamp, every other time Increasing the TSF timer of the slave clock by 1us, wherein T is the Beacon frame transmission period;
If the Beacon frame sending time stamp is equal to the Beacon frame arrival time stamp, the TSF timer of the slave clock is not adjusted;
if the Beacon frame transmission time stamp is smaller than the Beacon frame arrival time stamp, every other time The TSF timer of the slave clock is reduced by 1us.
Preferably, the process of two-way time measurement communication between the master clock and the slave clock includes:
S31, broadcasting a P delay_req link propagation delay measurement request frame from a clock to a wireless channel in each clock synchronous domain, and recording an initiating time t 1, wherein the P delay_req link propagation delay measurement request frame is packaged with the synchronous domain number of the current node;
S32, the master clock receives and analyzes the P delay_req frame at the time t 2, judges whether the synchronous domain number in the P delay_req frame is the same as the domain number of the current node, if so, discards the synchronous domain number, and if so, records the time t 2 and stores the source MAC address of the P delay_req frame;
S33, the master clock encapsulates time t 2 in a P delay_resp link propagation delay measurement response frame at time t 3, unicasts a P delay_resp frame to a wireless channel by taking the source MAC address of the P delay_req frame as a destination MAC address, and records time t 3;
S34, receiving and analyzing the P delay_resp frame at the time t 4 by the slave clock to obtain the time t 2 and recording the time t 2、t4;
And S35, the master clock sends a P delay_resp_follow_up message containing the time t 3 to the slave clock, and the slave clock records the time t 3.
Preferably, the formula for calculating the propagation delay of the first link is:
where P delay' represents the first link propagation delay, t 4 represents the time when the slave clock receives and parses the P delay_resp frame, t 1 represents the time when the slave clock initiates the P delay_req frame, r represents the clock frequency offset ratio of the master clock node, t 3 represents the time when the master clock unicasts the P delay_resp frame, and t 2 represents the time when the master clock receives and parses the P delay_req frame.
Preferably, the formula for calculating the propagation delay of the second link is:
Wherein P delay represents the second link propagation delay, D s represents the processing delay of the slave clock, W s represents the additional latency in sending the request from the slave clock, T phy,s represents the physical medium occupation time during the period from the sending of the request to the receiving of the request, D m represents the processing delay of the master clock, W m represents the additional latency in sending the response of the master clock, and T phy,m represents the physical medium occupation time during the period from the sending of the response to the receiving of the response.
Preferably, the process of synchronizing information transfer between the master clock and the slave clock and completing clock synchronization includes:
The master clock encapsulates the synchronization information in a Sync synchronization information transfer frame and broadcasts the Sync frame to the wireless channel, wherein the synchronization information comprises an original time stamp, a synchronization domain number, a clock frequency offset ratio and clock correction information of a current node;
judging whether the synchronous domain number in the frame is the same as the synchronous domain number of the current node, if so, discarding the synchronous domain number, and if so, recording 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, so as to realize accurate synchronization with the master clock.
Further, the formula for correcting the slave clock is:
Tsync=Torigin+Pdelay
where T sync denotes the corrected slave clock time, T origin denotes the original timestamp in the Sync frame, and P delay denotes the second link propagation delay.
The method has the advantages that the method obtains the link propagation delay between the slave clock and the master clock through a bidirectional clock measurement method, ensures that the nodes can timely send clock measurement messages and flexibly adjust time slot division according to different time slot demands of each node through a TDMA time slot distribution mode, ensures the instantaneity of related synchronous messages, furthest avoids the interference of other messages, and can ensure the stable transmission of the synchronous measurement messages in a network, thereby reducing the measurement error of the link delay and improving the clock synchronization precision of master-slave equipment.
Drawings
FIG. 1 is a flow chart of a method for synchronizing clocks of a wireless time-sensitive network in a spacecraft in the invention;
FIG. 2 is a schematic view of a wireless network scenario inside a spacecraft in the present invention;
FIG. 3 is a flow chart of coarse synchronization achieved by Beacon frames in the present invention;
fig. 4 is a schematic diagram of propagation delay measurement of a radio link according to the present invention;
Fig. 5 is a flow chart of link propagation delay measurement in the present invention;
Fig. 6 is a schematic diagram of a superframe structure used in the present invention;
FIG. 7 is a schematic diagram of bi-directional communication from a slave clock to a master clock over a TDMA network in accordance with the present invention;
FIG. 8 is a schematic diagram of the feedback loop of a slave-master clock pair on a TDMA network according to the present invention;
fig. 9 is a flowchart of synchronization information transfer according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention provides a clock synchronization method of a wireless time-sensitive network in a spacecraft, which is shown in fig. 1 and comprises the following steps:
S1, constructing a spacecraft internal wireless network, wherein the spacecraft internal wireless network comprises an Access Point (AP) and a Station (STA), the AP is used as a master clock, and the STA is used as a slave clock.
As shown in fig. 2, the wireless network inside the spacecraft includes an access point AP and a station STA, specifically, nodes in the wireless network inside the spacecraft may be divided into a sensor node, a terminal node, a wireless access point, a central controller, and the like, and the sensor and the mobile terminal in a certain area gather data to the central controller through the wireless network. The sensor nodes monitor the shell pressure, temperature and flight attitude of the spacecraft, the monitoring data has the characteristics of periodicity, relatively fixed traffic, relatively sensitive data end-to-end delay and the like, the transmission of time sensitive services is established on the basis of time synchronization between nodes and inside the nodes, and all devices can achieve consistency and execute required operations at the right time point only when the inside of each node has a common time reference.
And S2, the master clock and the slave clock acquire time information through Beacon frame communication, the slave clock performs drift compensation according to the time information to realize coarse synchronization, and the time information comprises a Beacon frame sending time stamp and a Beacon frame arrival time stamp.
S21, designing a wireless network card driving module and initializing the wireless network card driving module.
As shown in fig. 3, the wireless network card driving module includes a channel access control module, a link scheduling module, a synchronization module, a timer and a message queue, wherein the channel access control module is used for managing stations accessed to the AP, the link scheduling module is used for scheduling the accessed stations, the synchronization module is used for implementing a clock drift compensation algorithm to calibrate a local clock, the timer is used for triggering the link scheduling module to perform link scheduling, and the message queue is used for interacting with the link scheduling module to implement message processing and sending.
And S22, based on the wireless network card driving module, under the WiFi network, the master clock periodically broadcasts the Beacon frame carrying the sending time stamp.
In a wireless time-sensitive network, a master clock periodically generates a Beacon frame, an AP places the Beacon frame in a transmission buffer area for transmission, generates an interrupt when reaching one Beacon period, adds a transmission time stamp into a time stamp position reserved by the Beacon frame, and transmits the Beacon frame together with the Beacon frame.
S23, receiving and analyzing the Beacon frame from the clock to obtain a Beacon frame sending time stamp and recording the Beacon frame arrival time stamp
And generating an interrupt when receiving the Beacon frame sent by the AP, recording a receiving time stamp of the slave clock equipment, and analyzing the Beacon frame after receiving to obtain the Beacon frame sending time stamp.
The process of drift compensation of the slave clock according to the time information comprises:
The i-th synchronization period clock drift amount ρ i is calculated according to the time information, and the i+1th synchronization period clock drift amount S i+1 is predicted according to the i-th synchronization period clock drift amount.
Calculating the clock drift amount rho i of the ith synchronization period:
Wherein, The Beacon frame arrival time stamp representing the ith synchronization period,Beacon frame arrival time stamps representing the i-1 st synchronization period,The Beacon frame representing the i-th synchronization period transmits a time stamp,Beacon frame transmission time stamp indicating i-1 st synchronization period, i indicating the number of synchronization times.
According to the calculated clock drift amount rho i of the ith synchronous period, predicting the clock drift S i+1 of the next period by a primary exponential smoothing method:
Si+1=α×ρi+(1-α)×Si
Wherein α is a smoothing coefficient, 0.1-0.5 is taken, ρ i is a clock drift value actually calculated in the ith period, S i is a predicted clock drift value in the ith period, and S 1=ρ1.
The STA local clock drift between two clock adjustments is compensated with the predicted clock drift, the adjustment strategy is as follows:
If the Beacon frame sending time stamp is greater than the Beacon frame arrival time stamp Every other The TSF timer of the slave clock is incremented by 1us, where T is the Beacon frame transmission period.
If the Beacon frame transmission time stamp is equal to the Beacon frame arrival time stampNo adjustment is made to the TSF timer of the slave clock.
If the Beacon frame sending time stamp is smaller than the Beacon frame arrival time stampEvery other The TSF timer of the slave clock is reduced by 1us.
And S3, the master clock and the slave clock carry out bidirectional time measurement communication, and the slave clock obtains a time stamp required for calculating the average link propagation delay according to a communication result and calculates the first link propagation delay according to the time stamp.
The process of two-way time measurement communication between the master clock and the slave clock comprises the following steps:
Fig. 4 illustrates a wireless link propagation delay measurement phase, in which a slave clock device initiates a link propagation delay measurement request, and a master clock device processes the request and issues a response. The flow of the propagation delay measurement of the wireless network link is shown in fig. 5.
S31, broadcasting a P delay_req link propagation delay measurement request frame from a slave clock (slave clock equipment) to a wireless channel in each clock synchronous domain, and recording an initiating time t 1 at an initiating end, wherein the P delay_req link propagation delay measurement request frame is encapsulated with the synchronous domain number of the current node.
S32, the master clock (master clock equipment) receives and analyzes the P delay_req frame at the time t 2, judges whether the synchronous domain number in the P delay_req frame is the same as the domain number of the current node, discards the synchronous domain number if the synchronous domain number is different from the domain number of the current node, records the time t 2 at the receiving end and stores the source MAC address of the P delay_req frame if the synchronous domain number is the same as the domain number of the current node.
And S33, the master clock encapsulates the time t 2 in a P delay_resp link propagation delay measurement response frame at the time t 3, unicasts the P delay_resp frame to the wireless channel by taking the source MAC address of the P delay_req frame as a destination MAC address, and records the time t 3 at the master clock end.
S34, the slave clock receives and analyzes the P delay_resp frame at the time t 4, obtains the time t 2 and records the time t 2、t4 at the slave clock end.
And S35, the master clock sends a P delay_resp_follow_up message containing the time t 3 to the slave clock, and the slave clock records the time t 3.
The slave clock obtains a time stamp required for calculating the average link propagation delay according to the communication result and calculates the first link propagation delay according to the time stamp, wherein the calculation formula is as follows:
where P delay' represents the first link propagation delay, t 4 represents the time when the slave clock receives and parses the P delay_resp frame, t 1 represents the time when the slave clock initiates the P delay_req frame, r represents the clock frequency offset ratio of the master clock node, t 3 represents the time when the master clock unicasts the P delay_resp frame, and t 2 represents the time when the master clock receives and parses the P delay_req frame.
When the first link propagation delay is calculated, the coarse synchronization is finished, and then the fine synchronization process is carried out, wherein the specific process is as follows:
and S4, performing TDMA network time slot allocation according to the first link propagation delay, communicating the master clock and the slave clock by adopting time measurement messages of the IEEE802.1AS protocol, and calculating the second link propagation delay.
From the foregoing, it can be seen that, in the initialization phase before the system is started to arrive at the first time slot of the TDMA mode, the wireless access point AP measures the first link propagation delay of each link, that is, the average propagation delay of the link, through bidirectional delay measurement, and then, in the TDMA network, the AP allocates a corresponding time slot to each node (station). The superframe structure adopted by the invention is shown in fig. 6, wherein each slave clock-master clock pair is allocated a time slot pair, namely one time slot is used for sending request messages by the slave clock, and one time slot is used for sending response messages by the master clock. After time slots are allocated, a slave clock sends a request message, the sending time is recorded, a master clock receives the request and then sends a response message, and after the slave clock receives and analyzes the response message, the current average link propagation delay is calculated. And finally, the master clock transmits a synchronous message to the slave clock, and the slave clock carries out clock correction on the local clock according to the propagation delay and clock drift error, wherein the specific process is as follows:
the master clock and the slave clock communicate by using time measurement messages of IEEE802.1AS protocol:
As shown in fig. 7, in some preferred embodiments, each TDMA wheel is assumed to consist of N time slots. Without loss of generality, slot 0 of all rounds is dedicated to transmitting measurement requests from the slave clock end to the master clock end, and slot n of all rounds is dedicated to transmitting responses from the master clock end to the slave clock end.
As shown in fig. 8, fig. 8 shows a sequence of events in a feedback loop for measuring RTT by the slave clock STA and the master clock AP, specifically including:
Step 1, an interrupt is generated at the MAC layer from the clock STA before the transmission time slot is about to come, a measurement request frame is generated at time T 0, and a request M s is generated at time T 1. Thus, D s=T1-T0 is the time required to generate M s, D s is referred to as the processing delay of the slave clock device;
Step 2 STA waits to T 2, the beginning of slot 0 of the next TDMA round, to transmit M s to AP, resulting in additional STA waiting time W s=T2-T1.Ms requiring a certain transmission time, resulting in STA transmission delay. In fig. 8, the transmission time or delay is T 4-T2, where T 2 is the time when the STA transmits the first bit of M s and T 4 is the time when the STA transmits the last bit of M s;
Step 3. In the wireless channel, a propagation delay from STA to AP needs to be considered. The AP receives the first bit of M s at time T 3 and the last bit of M s at time T 5. There is T 5-T3=T4-T2 and the channel propagation delay is T 3-T2=T5-T4. The transmission delay and the propagation delay can be obtained, and the occupied time of the physical medium is T phy,s=T5-T2;
Step 4-after receiving M s, the AP processes it and generates a measurement response frame M m over some time, resulting in a processing delay for the AP. Suppose the interrupt starts generating M m at time T 6. Then the processing delay of the AP is D m=T6-T5;
Step 5 AP waits until time T 7 (beginning of slot n of TDMA round) to send M m to STA, resulting in additional AP latency W m=T7-T6;
Step 6, the first bit M m of the response arrives at STA at time T 8, and the last bit M m arrives at STA at time T 10. Thus, T 9-T7=T10-T8 is the transmission delay of the AP and T 8-T7=T10-T9 is the propagation delay of the server. The physical medium occupation time is T phy,m=T10-T7.
Thus, the RTT of the entire STA to AP consists of many delay elements, calculated as follows:
RTT=T10-T0=Ds+Ws+Tphy,s+Dm+Wm+Tphy,m
the formula for calculating the propagation delay of the second link is as follows:
Wherein P delay represents the second link propagation delay, D s represents the processing delay of the slave clock, W s represents the additional latency in sending the request from the slave clock, T phy,s represents the physical medium occupation time during the period from the sending of the request to the receiving of the request, D m represents the processing delay of the master clock, W m represents the additional latency in sending the response of the master clock, and T phy,m represents the physical medium occupation time during the period from the sending of the response to the receiving of the response.
And S5, the master clock and the slave clock carry out synchronous information transfer and complete clock synchronization according to the propagation delay of the second link.
In this embodiment, the clock synchronization protocol based on IEEE 802.1AS works in the data link layer, and the high-precision hardware timestamp is obtained by the MAC layer management entity MLME of IEEE 802.11.
In the synchronization information transfer stage, the master clock device broadcasts synchronization information to the wireless channel, and the clock information transfer process is shown in fig. 9, and specifically includes:
The master clock encapsulates the synchronization information in the Sync synchronization information transfer frame and broadcasts the Sync frame to the wireless channel, the synchronization information comprises an original time stamp, a synchronization domain number, a clock frequency offset ratio and clock correction information of the current node, preferably 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.
And judging whether the synchronous domain number in the frame is the same as the synchronous domain number of the current node, if so, discarding the synchronous domain number, and if so, recording the clock information in the Sync frame.
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 realize accurate synchronization with the master clock, wherein the formula of the corrected slave clock is as follows:
Tsync=Torigin+Pdelay
Where T sync represents the corrected slave clock time and T origin represents the original timestamp in the Sync frame.
The invention realizes the coarse synchronization to ensure the normal operation of the TDMA network through a TSF mechanism, and avoids the conflict between the synchronous protocol message and other messages by combining the IEEE802.1AS synchronous protocol with the TDMA time slot, and can reduce the waiting time delay on the premise of ensuring the successful transmission of the synchronous protocol message in the wireless network, thereby reducing the synchronous error accumulated due to the processing time delay and the channel interference.
While the foregoing is directed to embodiments, aspects and advantages of the present invention, other and further details of the invention may be had by the foregoing description, it will be understood that the foregoing embodiments are merely exemplary of the invention, and that any changes, substitutions, alterations, etc. which may be made herein without departing from the spirit and principles of the invention.

Claims (9)

1. A method for synchronizing clocks of a wireless time-sensitive network in a spacecraft, comprising the steps of:
s1, constructing a spacecraft internal wireless network, wherein the spacecraft internal wireless network comprises an Access Point (AP) and a Station (STA), the AP is used as a master clock, and the STA is used as a slave clock;
S2, the master clock and the slave clock acquire time information through Beacon frame communication, and the slave clock performs drift compensation according to the time information to realize coarse synchronization, wherein the time information comprises a Beacon frame sending time stamp and a Beacon frame arrival time stamp;
S3, the master clock and the slave clock carry out bidirectional time measurement communication, the slave clock obtains a time stamp required by calculating the average link propagation delay according to a communication result and calculates the first link propagation delay according to the time stamp;
s4, performing TDMA network time slot allocation according to the first link propagation delay, communicating the master clock and the slave clock by adopting a time measurement message of IEEE802.1AS protocol, and calculating a second link propagation delay;
And S5, the master clock and the slave clock carry out synchronous information transfer and complete clock synchronization according to the propagation delay of the second link.
2. The method for synchronizing clocks of wireless time-sensitive networks in spacecraft of claim 1, wherein the process of Beacon frame communication between the master clock and the slave clock comprises:
s21, designing a wireless network card driving module and initializing the wireless network card driving module;
S22, based on the wireless network card driving module, under the WiFi network, periodically broadcasting a Beacon frame carrying a sending time stamp by a main clock;
S23, receiving and analyzing the Beacon frame from the clock, obtaining a Beacon frame sending time stamp and recording a Beacon frame arrival time stamp.
3. The method for synchronizing the clock of the wireless time-sensitive network in the spacecraft according to claim 2, wherein the wireless network card driving module comprises a channel access control module, a link scheduling module, a synchronizing module, a timer and a message queue;
the channel access control module is used for managing stations accessed to the AP;
The link scheduling module is used for scheduling the accessed stations in sequence;
the synchronization module is used for realizing a clock drift compensation algorithm to calibrate the local clock;
The timer is used for triggering the link scheduling module to perform link scheduling;
The message queue is used for interacting with the link scheduling module to realize message processing and sending.
4. The method for synchronizing clocks of a wireless time-sensitive network within a spacecraft of claim 1, wherein the process of drift compensation from the clock based on time information comprises:
calculating an ith synchronous period clock drift amount rho i according to the time information, and predicting an (i+1) th synchronous period clock drift amount S i+1 according to the ith synchronous period clock drift amount;
If the Beacon frame sending time stamp is greater than the Beacon frame arrival time stamp, every other time Increasing the TSF timer of the slave clock by 1us, wherein T is the Beacon frame transmission period;
If the Beacon frame sending time stamp is equal to the Beacon frame arrival time stamp, the TSF timer of the slave clock is not adjusted;
if the Beacon frame transmission time stamp is smaller than the Beacon frame arrival time stamp, every other time The TSF timer of the slave clock is reduced by 1us.
5. The method for synchronizing clocks of a wireless time-sensitive network within a spacecraft of claim 1, wherein the process of bi-directional time measurement communication between the master clock and the slave clock comprises:
S31, broadcasting a P delay_req link propagation delay measurement request frame from a clock to a wireless channel in each clock synchronous domain, and recording an initiating time t 1, wherein the P delay_req link propagation delay measurement request frame is packaged with the synchronous domain number of the current node;
S32, the master clock receives and analyzes the P delay_req frame at the time t 2, judges whether the synchronous domain number in the P delay_req frame is the same as the domain number of the current node, if so, discards the synchronous domain number, and if so, records the time t 2 and stores the source MAC address of the P delay_req frame;
S33, the master clock encapsulates time t 2 in a P delay_resp link propagation delay measurement response frame at time t 3, unicasts a P delay_resp frame to a wireless channel by taking the source MAC address of the P delay_req frame as a destination MAC address, and records time t 3;
S34, receiving and analyzing the P delay_resp frame at the time t 4 by the slave clock to obtain the time t 2 and recording the time t 2、t4;
And S35, the master clock sends a P delay_resp_follow_up message containing the time t 3 to the slave clock, and the slave clock records the time t 3.
6. The method for synchronizing clocks of a wireless time-sensitive network within a spacecraft of claim 1, wherein the formula for calculating the propagation delay of the first link is:
where P delay' represents the first link propagation delay, t 4 represents the time when the slave clock receives and parses the P delay_resp frame, t 1 represents the time when the slave clock initiates the P delay_req frame, r represents the clock frequency offset ratio of the master clock node, t 3 represents the time when the master clock unicasts the P delay_resp frame, and t 2 represents the time when the master clock receives and parses the P delay_req frame.
7. The method for synchronizing clocks of wireless time-sensitive networks in a spacecraft of claim 1, wherein the formula for calculating the propagation delay of the second link is:
Wherein P delay represents the second link propagation delay, D s represents the processing delay of the slave clock, W s represents the additional latency in sending the request from the slave clock, T phy,s represents the physical medium occupation time during the period from the sending of the request to the receiving of the request, D m represents the processing delay of the master clock, W m represents the additional latency in sending the response of the master clock, and T phy,m represents the physical medium occupation time during the period from the sending of the response to the receiving of the response.
8. The method for synchronizing clocks of a wireless time-sensitive network within a spacecraft of claim 1, wherein the process of synchronizing the master clock and the slave clock to transfer synchronization information and complete clock synchronization comprises:
The master clock encapsulates the synchronization information in a Sync synchronization information transfer frame and broadcasts the Sync frame to the wireless channel, wherein the synchronization information comprises an original time stamp, a synchronization domain number, a clock frequency offset ratio and clock correction information of a current node;
judging whether the synchronous domain number in the frame is the same as the synchronous domain number of the current node, if so, discarding the synchronous domain number, and if so, recording 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, so as to realize accurate synchronization with the master clock.
9. The method for synchronizing clocks in a wireless time-sensitive network within a spacecraft of claim 8, wherein the formula for correcting the slave clock is:
Tsync=Torigin+Pdelay
where T sync denotes the corrected slave clock time, T origin denotes the original timestamp in the Sync frame, and P delay denotes the second link propagation delay.
CN202310102009.2A 2023-02-10 2023-02-10 Clock synchronization method for wireless time-sensitive network in spacecraft Active CN116318506B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310102009.2A CN116318506B (en) 2023-02-10 2023-02-10 Clock synchronization method for wireless time-sensitive network in spacecraft

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310102009.2A CN116318506B (en) 2023-02-10 2023-02-10 Clock synchronization method for wireless time-sensitive network in spacecraft

Publications (2)

Publication Number Publication Date
CN116318506A CN116318506A (en) 2023-06-23
CN116318506B true CN116318506B (en) 2025-04-22

Family

ID=86796936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310102009.2A Active CN116318506B (en) 2023-02-10 2023-02-10 Clock synchronization method for wireless time-sensitive network in spacecraft

Country Status (1)

Country Link
CN (1) CN116318506B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117278190B (en) * 2023-11-21 2024-03-29 北京智芯微电子科技有限公司 Time synchronization unit, method, chip architecture, network device and medium
CN117728913B (en) * 2023-12-27 2024-09-24 小米汽车科技有限公司 Method, device, storage medium and vehicle for time synchronization

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112904705A (en) * 2021-01-22 2021-06-04 重庆邮电大学 Hierarchical clock synchronization method between low-orbit small satellites

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11419084B1 (en) * 2021-01-29 2022-08-16 Kabushiki Kaisha Toshiba Time synchronization in hybrid wired-wireless time-sensitive networking
CN114501654B (en) * 2022-03-08 2024-11-12 重庆邮电大学 A time slot allocation method for wireless time-sensitive network inside spacecraft with wired and wireless integration
CN114615211B (en) * 2022-03-08 2023-10-13 重庆邮电大学 Time-sensitive network queue management scheduling method based on wired and wireless integration

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112904705A (en) * 2021-01-22 2021-06-04 重庆邮电大学 Hierarchical clock synchronization method between low-orbit small satellites

Also Published As

Publication number Publication date
CN116318506A (en) 2023-06-23

Similar Documents

Publication Publication Date Title
CN113056880B (en) Method and apparatus for 5G system support for time synchronization of transmit TSN
CN116318506B (en) Clock synchronization method for wireless time-sensitive network in spacecraft
EP3188381B1 (en) Delay management for distributed communications networks
EP1104962B1 (en) Wireless communications system
US11503557B2 (en) Time synchronization in integrated 5G wireless and time-sensitive networking systems
EP2795995B1 (en) Methods and apparatus for communication synchronization
US8023976B2 (en) Method and system for accurate clock synchronization for communication networks
US8982897B2 (en) Data block output apparatus, communication system, data block output method, and communication method
JP5515735B2 (en) Time synchronization system, master node, slave node, relay device, time synchronization method, and time synchronization program
CN112904705B (en) A Hierarchical Clock Synchronization Method Between Low-Orbit Small Satellites
KR20100131015A (en) Method and system for implementing the time division multiple access method to ad-hoc multihopping wireless networks
CN103457685A (en) Method for precisely synchronizing time of industrial wireless network on basis of prediction and compensation
US20140064297A1 (en) Communication device, communication method, and communication system
KR20210088378A (en) Apparatu and method for updating time sensitive communications assistance information in a mobkle system
WO2015196685A1 (en) Clock synchronization method and apparatus
US12349083B2 (en) Device synchronization and connection management in wireless networks
CN113645686A (en) A wireless ad hoc network time synchronization method with motion compensation
CN103138828B (en) Network node clock synchronization and clock synchronous network
US20230292265A1 (en) Synchronising network nodes
US20220408313A1 (en) Data flow management in wireless networks
CN111294132A (en) Absolute time synchronization method, device and electronic device
Krummacker et al. Intra-network clock synchronization for wireless networks: From state of the art systems to an improved solution
Pinho et al. A robust gradient clock synchronization algorithm for wireless sensor networks
CN117641561A (en) A time synchronization method and system for 5G+TSN converged network
WO2011074529A1 (en) Time synchronization system, slave node, time synchronization method, and program for time synchronization

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant