[go: up one dir, main page]

CN116647304A - A time synchronization method, wireless communication device and system - Google Patents

A time synchronization method, wireless communication device and system Download PDF

Info

Publication number
CN116647304A
CN116647304A CN202310869316.3A CN202310869316A CN116647304A CN 116647304 A CN116647304 A CN 116647304A CN 202310869316 A CN202310869316 A CN 202310869316A CN 116647304 A CN116647304 A CN 116647304A
Authority
CN
China
Prior art keywords
communication device
wireless communication
time
moment
pulse signal
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.)
Pending
Application number
CN202310869316.3A
Other languages
Chinese (zh)
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 Liangjiang Satellite Mobile Communication Co Ltd
Original Assignee
Chongqing Liangjiang Satellite Mobile Communication Co Ltd
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 Liangjiang Satellite Mobile Communication Co Ltd filed Critical Chongqing Liangjiang Satellite Mobile Communication Co Ltd
Priority to CN202310869316.3A priority Critical patent/CN116647304A/en
Publication of CN116647304A publication Critical patent/CN116647304A/en
Pending legal-status Critical Current

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/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • 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

本发明公开了一种时间同步的方法、无线通信设备及系统,涉及通信领域,方法包括:第二无线通信设备接收第一无线通信设备发送的第一时刻和第一标记;第二无线通信设备生成第二时刻和第二标记;第二无线通信设备根据第一时刻和传输时延T1,确定出第二无线通信设备发送脉冲信号的第三时刻;第二无线通信设备根据第二时刻和第三时刻计算出传输时延T2;第二无线通信设备接收第四时刻和更新的第一标记;第二无线通信设备根据更新的第一标记,对第二标记的时间状态进行更新,根据更新后的第二标记指示的时间状态对传输时延T1进行调整,直至第一时刻和第四时刻对齐,以使传输时延T1与传输时延T2相等,第二无线通信设备完成对第一无线通信设备的时间同步。

The invention discloses a time synchronization method, wireless communication device and system, and relates to the field of communication. The method includes: the second wireless communication device receives the first time and the first mark sent by the first wireless communication device; the second wireless communication device Generate the second time and the second mark; the second wireless communication device determines the third time when the second wireless communication device sends the pulse signal according to the first time and the transmission delay T1; the second wireless communication device determines the third time according to the second time and the first Calculate the transmission delay T2 at the third moment; the second wireless communication device receives the fourth moment and the updated first mark; the second wireless communication device updates the time state of the second mark according to the updated first mark, and according to the updated Adjust the transmission delay T1 until the first moment is aligned with the fourth moment, so that the transmission delay T1 is equal to the transmission delay T2, and the second wireless communication device completes the first wireless communication Device time synchronization.

Description

一种时间同步的方法、无线通信设备及系统A time synchronization method, wireless communication device and system

技术领域technical field

本发明涉及通信领域,更具体地说,它涉及一种时间同步的方法、无线通信设备及系统。The present invention relates to the communication field, and more specifically, it relates to a time synchronization method, wireless communication equipment and system.

背景技术Background technique

在无线通信系统中,往往要求收发设备之间时间精准同步,以实现收发严格同时。无线通信设备用于技术验证效率较高,具备较好的实现灵活性,在无线系统开发中得到了广泛应用。分析无线通信设备的精准时间收发方法,对采用无线通信设备进行技术开发、开展半实物仿真等具有重要意义,无线通信设备是一种基于软件无线电技术(SDR)原理的无线通信设备。In wireless communication systems, time synchronization between transceiver devices is often required to achieve strict simultaneous transmission and reception. Wireless communication equipment is used for technical verification with high efficiency and good implementation flexibility, and has been widely used in wireless system development. Analyzing the precise time sending and receiving method of wireless communication equipment is of great significance for the use of wireless communication equipment for technology development and hardware-in-the-loop simulation. Wireless communication equipment is a wireless communication equipment based on the principle of software radio technology (SDR).

参见图1所示的现有技术的原理框图,无线通信设备一般通过USB、RJ45、RS232等与PC机相连。一般的方法是PC机之间采用NTP时间同步,同时无线通信设备再与PC机时间同步,无线通信设备按照同步后的时间进行信号收发。Referring to the functional block diagram of the prior art shown in FIG. 1 , the wireless communication device is generally connected to the PC through USB, RJ45, RS232 and the like. The general method is to use NTP time synchronization between PCs, and at the same time, the wireless communication device synchronizes with the PC time, and the wireless communication device sends and receives signals according to the synchronized time.

上述现有技术方案时间同步精度较差,不能满足无线通信设备应用于宽带系统在TDD模式下仿真和验证要求。这是因为采用PC机进行时间同步,会带来较大时间误差,一方面无论采用NTP还是PTP授时,虽然精度较高,可以达到us级,但时间同步基点在PC机端,通过PC机之间的授时,PC时间同步后再同步到无线通信设备,由于PC操作系统的非实时性以及PC与无线通信设备之间的时间传输时延,导致无线通信设备的时间收发时间存在较大误差,可以达到ms级误差。另一方面,PC机的时钟精度只有10e-4~10e-5,时间同步一段时间后,累积误差可达秒级。无线系统如5G NR、LTE和WLAN系统的仿真,要求时间精度达到微秒级别,因此现有的时间同步方案在应用上受到较大局限。The time synchronization accuracy of the above-mentioned prior art solution is relatively poor, and cannot meet the simulation and verification requirements of wireless communication equipment applied to a broadband system in TDD mode. This is because using a PC for time synchronization will bring a large time error. On the one hand, whether NTP or PTP is used for time service, although the accuracy is high and can reach the us level, the base point of time synchronization is at the PC end. Time service between PCs, PC time synchronization and then synchronization to wireless communication devices, due to the non-real-time nature of the PC operating system and the time transmission delay between PC and wireless communication devices, there is a large error in the time sending and receiving time of wireless communication devices, Can reach ms level error. On the other hand, the clock precision of the PC is only 10e-4 ~ 10e-5, after a period of time synchronization, the cumulative error can reach the second level. The simulation of wireless systems such as 5G NR, LTE and WLAN systems requires time accuracy to reach the microsecond level, so the existing time synchronization schemes are greatly limited in application.

发明内容Contents of the invention

鉴于此,本发明提供了一种时间同步的方法、无线通信设备及系统,用于实现无线通信设备之间收发的时间同步,规避了采用PC机进行时间同步带来的误差,同时也消除了PC机与无线通信设备之间再进行时间同步带来的误差。In view of this, the present invention provides a time synchronization method, wireless communication device and system, which are used to realize the time synchronization of transmission and reception between wireless communication devices, avoiding the error caused by using a PC for time synchronization, and also eliminating The error caused by the time synchronization between the PC and the wireless communication device.

本发明的上述技术目的是通过以下技术方案得以实现的:Above-mentioned technical purpose of the present invention is achieved through the following technical solutions:

本申请的第一方面提供了一种时间同步方法,方法包括:The first aspect of the present application provides a time synchronization method, the method comprising:

第二无线通信设备接收第一无线通信设备发送的脉冲信号所携带的第一时间戳和第一标记,其中第一时间戳指示第一无线通信设备发送脉冲信号的第一时刻,第一标记指示第二无线通信设备相对于第一无线通信设备的时间状态,时间状态为超前状态或滞后状态;The second wireless communication device receives the first time stamp and the first mark carried by the pulse signal sent by the first wireless communication device, wherein the first time stamp indicates the first moment when the first wireless communication device sends the pulse signal, and the first mark indicates The time state of the second wireless communication device relative to the first wireless communication device, the time state is an advanced state or a lagging state;

第二无线通信设备生成第二时间戳和第二标记,其中第二时间戳指示第二无线通信设备接收到脉冲信号的第二时刻,第二标记指示第一无线通信设备相对于第二无线通信设备的时间状态;The second wireless communication device generates a second time stamp and a second mark, wherein the second time stamp indicates the second moment when the second wireless communication device receives the pulse signal, and the second mark indicates that the first wireless communication device is relative to the second wireless communication device. The time state of the device;

第二无线通信设备根据第一时刻和传输时延T1,确定出第二无线通信设备发送脉冲信号给第一无线通信设备的第三时间戳,其中传输时延T1指示第二无线通信设备传输到第一软件通信设备的时延,第三时间戳指示第二无线通信设备发送脉冲信号的第三时刻;The second wireless communication device determines the third time stamp when the second wireless communication device sends a pulse signal to the first wireless communication device according to the first moment and the transmission delay T1, wherein the transmission delay T1 indicates that the second wireless communication device transmits the pulse signal to the first wireless communication device. The time delay of the first software communication device, the third time stamp indicates the third moment when the second wireless communication device sends the pulse signal;

第二无线通信设备根据第二时刻和第三时刻计算出第一无线通信设备传输到第二软件通信设备的传输时延T2;The second wireless communication device calculates the transmission delay T2 from the first wireless communication device to the second software communication device according to the second moment and the third moment;

第二无线通信设备接收第一无线通信设备在接收第三时刻后发送的脉冲信号所携带的第四时间戳和更新的第一标记,其中第四时间戳指示第一无线通信设备接收到第三时间戳所标记的第四时刻,第一标记的调整是第一无线通信设备比较第四时刻与第一时刻的时间状态后进行调整的;The second wireless communication device receives the fourth time stamp and the updated first mark carried by the pulse signal sent by the first wireless communication device after receiving the third moment, where the fourth time stamp indicates that the first wireless communication device has received the third For the fourth moment marked by the time stamp, the adjustment of the first mark is made by the first wireless communication device after comparing the time state at the fourth moment with the time state at the first moment;

第二无线通信设备根据更新的第一标记,对第二标记的时间状态进行更新,根据更新后的第二标记指示的时间状态对传输时延T1进行调整,直至第一时刻和第四时刻对齐,以使传输时延T1与传输时延T2相等,第二无线通信设备完成对第一无线通信设备的时间同步。The second wireless communication device updates the time state of the second mark according to the updated first mark, and adjusts the transmission delay T1 according to the time state indicated by the updated second mark until the first moment is aligned with the fourth moment , so that the transmission delay T1 is equal to the transmission delay T2, and the second wireless communication device completes time synchronization with the first wireless communication device.

在一种实现方案中,第三时刻的计算式为t3=t1-T1,其中,t3表示第三时刻,t1表示第一时刻,T1表示第二无线通信设备传输到第一软件通信设备的传输时延。In one implementation solution, the formula for calculating the third moment is t3=t1-T1, wherein t3 represents the third moment, t1 represents the first moment, and T1 represents the transmission from the second wireless communication device to the first software communication device delay.

本申请的第二方面还提供了一种时间同步的方法,方法包括:The second aspect of the present application also provides a method for time synchronization, including:

第一无线通信设备向第二无线通信设备发送携带有第一时间戳和第一标记的脉冲信号,其中第一时间戳指示第一无线通信设备发送脉冲信号的第一时刻,第一标记指示第二无线通信设备相对于第一无线通信设备的时间状态,时间状态为超前状态或滞后状态;The first wireless communication device sends a pulse signal carrying a first time stamp and a first mark to the second wireless communication device, where the first time stamp indicates the first moment when the first wireless communication device sends the pulse signal, and the first mark indicates the first time when the pulse signal is sent by the first wireless communication device. The time state of the second wireless communication device relative to the first wireless communication device, the time state is an advanced state or a lagging state;

第一无线通信设备接收第二无线通信设备发送的携带有第三时间戳的脉冲信号,其中第三时间戳指示第二无线通信设备发送脉冲信号的第三时刻,第三时刻是第二无线通信设备根据第一时刻和传输时延T1计算出的,传输时延T1指示第二无线通信设备传输到第一软件通信设备的时延;The first wireless communication device receives the pulse signal with the third time stamp sent by the second wireless communication device, wherein the third time stamp indicates the third time when the second wireless communication device sends the pulse signal, and the third time is the second wireless communication time Calculated by the device based on the first moment and the transmission delay T1, the transmission delay T1 indicates the delay for the second wireless communication device to transmit to the first software communication device;

第一无线通信设备向第二无线通信设备发送携带有第四时间戳和更新的第一标记的脉冲信号,以使第二无线通信设备根据更新的第一标记指示的时间状态对传输时延T1进行调整,直至第一时刻和第四时刻对齐,以使传输时延T1与传输时延T2相等,第二无线通信设备完成对第一无线通信设备的时间同步,其中第四时间戳指示第一无线通信设备接收到第三时间戳所标记的第四时刻,第一标记的调整是第一无线通信设备比较第四时刻与第一时刻的时间状态后进行调整的。The first wireless communication device sends a pulse signal carrying the fourth time stamp and the updated first flag to the second wireless communication device, so that the second wireless communication device delays the transmission by T1 according to the time state indicated by the updated first flag Adjust until the first moment and the fourth moment are aligned, so that the transmission delay T1 is equal to the transmission delay T2, and the second wireless communication device completes the time synchronization of the first wireless communication device, wherein the fourth time stamp indicates that the first The wireless communication device receives the fourth moment marked by the third time stamp, and the adjustment of the first mark is adjusted after the first wireless communication device compares the time status of the fourth moment with that of the first moment.

在一种实现方案中,第一标记的调整是第一无线通信设备比较第四时刻与第一时刻的时间状态后进行调整的,具体为:第一无线通信设备将第四时刻与第一时刻进行对比,检测携带有第三时间戳的脉冲信号的时间状态相较于与携带有第一时间戳的脉冲信号的时间状态是否超前或滞后,根据检测结果对第一标记进行调整。In an implementation solution, the first mark is adjusted after the first wireless communication device compares the time state of the fourth moment with the first moment, specifically: the first wireless communication device compares the fourth moment with the first moment For comparison, it is detected whether the time state of the pulse signal carrying the third time stamp is ahead or behind the time state of the pulse signal carrying the first time stamp, and the first flag is adjusted according to the detection result.

在一种实现方案中,循环调整所述第一标记,直至调整达到校准精度值。In an implementation solution, the first marker is cyclically adjusted until the adjustment reaches a calibration accuracy value.

本申请的第三方面,提供了一种时间同步的无线通信设备,包括处理器和转换模块,处理器和转换模块建立通信连接;The third aspect of the present application provides a time-synchronized wireless communication device, including a processor and a conversion module, and the processor and the conversion module establish a communication connection;

转换模块,用于接收第一无线通信设备发送的脉冲信号所携带的第一时间戳和第一标记,其中第一时间戳指示第一无线通信设备发送脉冲信号的第一时刻,第一标记指示第二无线通信设备相对于第一无线通信设备的时间状态,时间状态为超前状态或滞后状态;A conversion module, configured to receive a first time stamp and a first mark carried by the pulse signal sent by the first wireless communication device, wherein the first time stamp indicates the first moment when the first wireless communication device sends the pulse signal, and the first mark indicates The time state of the second wireless communication device relative to the first wireless communication device, the time state is an advanced state or a lagging state;

处理器,用于生成第二时间戳和第二标记,其中第二时间戳指示第二无线通信设备接收到脉冲信号的第二时刻,第二标记指示第一无线通信设备相对于第二无线通信设备的时间状态;a processor, configured to generate a second time stamp and a second mark, wherein the second time stamp indicates a second moment when the second wireless communication device receives the pulse signal, and the second mark indicates that the first wireless communication device is relative to the second wireless communication device The time state of the device;

处理器,还用于根据第一时刻和传输时延T1,确定出第二无线通信设备发送脉冲信号给第一无线通信设备的第三时间戳,其中传输时延T1指示第二无线通信设备传输到第一软件通信设备的时延,第三时间戳指示第二无线通信设备发送脉冲信号的第三时刻;The processor is further configured to determine a third time stamp when the second wireless communication device sends a pulse signal to the first wireless communication device according to the first moment and the transmission delay T1, where the transmission delay T1 indicates that the second wireless communication device transmits to the time delay of the first software communication device, the third time stamp indicates the third moment when the second wireless communication device sends the pulse signal;

处理器,还用于根据第二时刻和第三时刻计算出第一无线通信设备传输到第二软件通信设备的传输时延T2;The processor is further configured to calculate the transmission delay T2 from the first wireless communication device to the second software communication device according to the second moment and the third moment;

转换模块,还用于接收第一无线通信设备在接收第三时刻后发送的脉冲信号所携带的第四时间戳和更新的第一标记,其中第四时间戳指示第一无线通信设备接收到第三时间戳所标记的第四时刻,第一标记的调整是第一无线通信设备比较第四时刻与第一时刻的时间状态后进行调整的;The converting module is further configured to receive the fourth time stamp and the updated first mark carried by the pulse signal sent by the first wireless communication device after receiving the third moment, where the fourth time stamp indicates that the first wireless communication device has received the first For the fourth moment marked by the three time stamps, the adjustment of the first mark is adjusted by the first wireless communication device after comparing the time status of the fourth moment with the first moment;

处理器,还用于根据更新的第一标记,对第二标记的时间状态进行更新,根据更新后的第二标记指示的时间状态对传输时延T1进行调整,直至第一时刻和第四时刻对齐,以使传输时延T1与传输时延T2相等,第二无线通信设备完成对第一无线通信设备的时间同步。The processor is further configured to update the time state of the second mark according to the updated first mark, and adjust the transmission delay T1 according to the time state indicated by the updated second mark until the first moment and the fourth moment Align, so that the transmission delay T1 is equal to the transmission delay T2, and the second wireless communication device completes time synchronization with the first wireless communication device.

在一种实现方案中,处理器,还用于第三时刻的计算式为t3=t1-T1,其中,t3表示第三时刻,t1表示第一时刻,T1表示第二无线通信设备传输到第一软件通信设备的传输时延。In one implementation solution, the calculation formula used by the processor at the third moment is t3=t1-T1, where t3 indicates the third moment, t1 indicates the first moment, and T1 indicates that the second wireless communication device transmits to the first moment A transmission delay of a software communication device.

本申请的第四方面,提供了一种时间同步的无线通信设备,包括处理器和转换模块,处理器和转换模块建立通信连接;The fourth aspect of the present application provides a time-synchronized wireless communication device, including a processor and a conversion module, and the processor and the conversion module establish a communication connection;

转换模块,用于向第二无线通信设备发送携带有第一时间戳和第一标记的脉冲信号,第一时间戳指示第一无线通信设备发送脉冲信号的第一时刻,第一标记指示第二无线通信设备相对于第一无线通信设备的时间状态,时间状态为超前状态或滞后状态;A conversion module, configured to send a pulse signal carrying a first time stamp and a first mark to the second wireless communication device, the first time stamp indicates the first moment when the first wireless communication device sends the pulse signal, and the first mark indicates the second The time state of the wireless communication device relative to the first wireless communication device, where the time state is an advanced state or a lagging state;

转换模块,还用于接收第二无线通信设备发送的携带有第三时间戳的脉冲信号,其中第三时间戳指示第二无线通信设备发送脉冲信号的第三时刻,第三时刻是第二无线通信设备根据第一时刻和传输时延T1计算出的,传输时延T1指示第二无线通信设备传输到第一软件通信设备的时延;The conversion module is further configured to receive a pulse signal carrying a third time stamp sent by the second wireless communication device, wherein the third time stamp indicates a third moment when the second wireless communication device sends the pulse signal, and the third time is the second wireless communication device Calculated by the communication device based on the first moment and the transmission delay T1, the transmission delay T1 indicates the delay for the second wireless communication device to transmit to the first software communication device;

转换模块,还用于向第二无线通信设备发送携带有第四时间戳和更新的第一标记的脉冲信号,以使第二无线通信设备根据更新的第一标记指示的时间状态对传输时延T1进行调整,直至第一时刻和第四时刻对齐,以使传输时延T1与传输时延T2相等,第二无线通信设备完成对第一无线通信设备的时间同步,其中第四时间戳指示第一无线通信设备接收到第三时间戳所标记的第四时刻,第一标记的调整是第一无线通信设备比较第四时刻与第一时刻的时间状态后进行调整的;The conversion module is further configured to send a pulse signal carrying the fourth time stamp and the updated first label to the second wireless communication device, so that the second wireless communication device delays the transmission time according to the time state indicated by the updated first label T1 is adjusted until the first moment is aligned with the fourth moment, so that the transmission delay T1 is equal to the transmission delay T2, and the second wireless communication device completes the time synchronization of the first wireless communication device, where the fourth time stamp indicates the first A wireless communication device receives the fourth moment marked by the third time stamp, and the adjustment of the first mark is adjusted after the first wireless communication device compares the time status of the fourth moment with the first moment;

处理器,用于与转换模块进行通信。A processor for communicating with the conversion module.

在一种实现方案中,处理器,还用于将第四时刻与第一时刻进行对比,检测携带有第三时间戳的脉冲信号的时间状态相较于与携带有第一时间戳的脉冲信号的时间状态是否超前或滞后,根据检测结果对第一标记进行调整。In one implementation solution, the processor is further configured to compare the fourth moment with the first moment, and detect that the time state of the pulse signal carrying the third time stamp is compared with the pulse signal carrying the first time stamp Whether the time state of the device is ahead or behind, the first mark is adjusted according to the detection result.

在一种实现方案中,处理器,还用于循环调整所述第一标记,直至调整达到校准精度值。In an implementation solution, the processor is further configured to cyclically adjust the first mark until the adjustment reaches a calibration precision value.

本申请的第五方面还提供了一种时间同步的系统,系统包括本申请的第三方面所述的一种时间同步的无线通信设备和申请的第四方面所述的一种时间同步的无线通信设备。The fifth aspect of the present application also provides a time synchronization system, the system includes the time synchronization wireless communication device described in the third aspect of the application and the time synchronization wireless communication device described in the fourth aspect of the application communication device.

与现有技术相比,本发明具有以下有益效果:Compared with the prior art, the present invention has the following beneficial effects:

本发明提供的一种时间同步的方法,将时间同步基点设置在第一无线通信设备和第二无线通信设备,以第一无线通信设备为时间基点,提供基准脉冲信号。第二无线通信设备自身也产生基准脉冲信号,该基准脉冲通过无线信号与第一无线通信设备的基准脉冲同步。第一PC机和第二PC机的时间信息分别与第一无线通信设备和第二无线通信设备的基准脉冲信号同步,为保证同步精度,第二无线通信设备每隔一段时间,与第一无线通信设备进行同步,以此实现第一无线通信设备和第二无线通信设备之间收发的时间同步,规避了采用PC机进行时间同步带来的误差,同时也消除了PC机与无线通信设备之间再进行时间同步带来的误差。In the time synchronization method provided by the present invention, the time synchronization base point is set at the first wireless communication device and the second wireless communication device, and the first wireless communication device is used as the time base point to provide a reference pulse signal. The second wireless communication device itself also generates a reference pulse signal, which is synchronized with the reference pulse of the first wireless communication device via a wireless signal. The time information of the first PC and the second PC is synchronized with the reference pulse signals of the first wireless communication device and the second wireless communication device respectively. The communication devices are synchronized, so as to realize the time synchronization between the first wireless communication device and the second wireless communication device, which avoids the error caused by using the PC for time synchronization, and also eliminates the gap between the PC and the wireless communication device. The error caused by time synchronization between them.

附图说明Description of drawings

此处所说明的附图用来提供对本发明实施例的进一步理解,构成本申请的一部分,并不构成对本发明实施例的限定。在附图中:The drawings described here are used to provide a further understanding of the embodiments of the present invention, constitute a part of the application, and do not limit the embodiments of the present invention. In the attached picture:

图1示出了现有技术的时间同步的无线通信设备与PC机的原理框图;Fig. 1 shows the functional block diagram of the time-synchronized wireless communication device and PC of the prior art;

图2示出了本发明实施例提供的一种时间同步的系统的结构示意图;FIG. 2 shows a schematic structural diagram of a time synchronization system provided by an embodiment of the present invention;

图3示出了本发明实施例提供的一种时间同步的方法的流程示意图;FIG. 3 shows a schematic flowchart of a time synchronization method provided by an embodiment of the present invention;

图4a示出了本发明实施例提供的第一无线通信设备发送携带有第一时间戳的脉冲信号的时间图;Fig. 4a shows a time chart of sending a pulse signal carrying a first time stamp by a first wireless communication device according to an embodiment of the present invention;

图4b示出了本发明实施例提供的第二无线通信设备接收携带有第一时间戳的脉冲信号的时间图;Fig. 4b shows a timing diagram of receiving a pulse signal carrying a first time stamp by a second wireless communication device according to an embodiment of the present invention;

图4c示出了本发明实施例提供的第二无线通信设备发送携带有第三时间戳的脉冲信号的时间图;Fig. 4c shows a timing diagram of the second wireless communication device sending a pulse signal carrying a third time stamp according to an embodiment of the present invention;

图4d示出了本发明实施例提供的第一无线通信设备接收携带有第三时间戳的脉冲信号的时间图;Fig. 4d shows a timing chart of receiving a pulse signal carrying a third time stamp by the first wireless communication device according to an embodiment of the present invention;

图5示出了本发明实施例提供的一种时间同步的原理框图;FIG. 5 shows a functional block diagram of time synchronization provided by an embodiment of the present invention;

图6示出了本发明实施例提供的又一种时间同步的方法的流程示意图。Fig. 6 shows a schematic flowchart of another time synchronization method provided by an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚明白,下面结合实施例和附图,对本发明作进一步的详细说明,本发明的示意性实施方式及其说明仅用于解释本发明,并不作为对本发明的限定。In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the examples and accompanying drawings. As a limitation of the present invention.

需说明的是,可在本申请的各种实施例中使用的术语“包括”或“可包括”指示所申请的功能、操作或元件的存在,并且不限制一个或更多个功能、操作或元件的增加。此外,诸如术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本发明的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。It should be noted that the terms "comprising" or "may include" that may be used in various embodiments of the present application indicate the existence of the claimed functions, operations or elements, and do not limit one or more functions, operations or elements. Addition of components. In addition, terms such as "first", "second" and so on are used for descriptive purposes only, and should not be understood as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" and "second" may explicitly or implicitly include one or more of these features. In the description of the present invention, "plurality" means two or more, unless otherwise specifically defined.

本申请实施例的技术方案还可以应用于各种通信系统,例如:全球移动通讯(Global System of Mobile communication,GSM)系统、码分多址(CodeDivisionMultiple Access,CDMA)系统、宽带码分多址(Wideband Code DivisionMultipleA c c e s s,W C D M A)系统、基于正交频分复用(o r t h o g o n a l f r eq u e n c y d i v i s i o nmultiplexing,OFDM)技术的通信系统、通用分组无线业务(General Packet Rad ioService,GPRS)、长期演进(Long Term Evolution,LTE)系统、LTE频分双工(FrequencyDivision Duplex,FDD)系统、LTE时分双工(Time Division Duplex,TDD)、通用移动通信系统(Unive rsa l Mo bile Telecomm unica tion Sys tem,UMTS)、无线保真(WirelessFidelity,WiFi)系统、全球互联微波接入(WorldwideInteroperability for MicrowaveAccess,WiMAX)通信系统、无线局域网(Wireless LocalArea Networks,WLAN)系统、公共陆地移动网络(Pu blic La nd Mo bile Ne twork,PLMN)网络、车到一切(Vehicle toe v e r y t h i n g,V 2X)系统、第五代(5t h G e n e r at i o n,5G)系统、未来的第六代(6t hGeneration,6G)系统或新无线(New Radio,NR)、光传输网络、波分网络等。The technical solution of the embodiment of the present application can also be applied to various communication systems, such as: Global System of Mobile communication (Global System of Mobile communication, GSM) system, code division multiple access (Code Division Multiple Access, CDMA) system, wideband code division multiple access ( Wideband Code Division MultipleA c c e s s, W C D M A) system, communication system based on Orthogonal Frequency Division Multiplexing (or t h o g o n a l f r eq u en c y d i v i s i o n multiplexing, OFDM) technology, General Packet Radio Service (General Packet Radio Service, GPRS), Long Term Evolution (Long Term Evolution) , LTE ) system, LTE frequency division duplex (Frequency Division Duplex, FDD) system, LTE time division duplex (Time Division Duplex, TDD), universal mobile communication system (Unive rsa l Mobile Telecommunications unication System, UMTS), wireless fidelity (Wireless Fidelity, WiFi) system, Worldwide Interoperability for Microwave Access (WiMAX) communication system, Wireless Local Area Networks (Wireless Local Area Networks, WLAN) system, Public Land Mobile Network (Public Land Mobile Network, PLMN) network , Vehicle to everything (Vehicle toe v e r y t h i ng, V 2X) system, fifth generation (5t h Gen at i o n, 5G) system, future sixth generation (6t hGeneration, 6G) system or new wireless (New Radio, NR) , optical transmission network, wavelength division network, etc.

应理解,本申请实施例的通信方法可以用于对时间同步或时延敏感的应用场景,比如自动或辅助驾驶、增强现实(Augmented Reality,AR)、虚拟现实(Virtual Reality,VR)、触觉互联网、工业控制、智能电网(smart grid)、实时游戏、过程自动化(Processautomation)、工业自动化(Factory automation)等场景,本申请实施例对此不作限定。It should be understood that the communication method of the embodiment of the present application can be used in application scenarios sensitive to time synchronization or delay, such as automatic or assisted driving, augmented reality (Augmented Reality, AR), virtual reality (Virtual Reality, VR), tactile Internet , industrial control, smart grid (smart grid), real-time game, process automation (Process automation), industrial automation (Factory automation) and other scenarios, which are not limited in this embodiment of the present application.

举例来说,在工业控制场景中,控制器和执行器之间需要保持时间同步。控制器给执行器发送控制信令,指示执行器在确定的时间执行命令。若执行器与控制器对时间的认知不同,即时间不同步,会导致执行器在错误的时间执行命令,导致任务执行失败。For example, in industrial control scenarios, time synchronization between controllers and actuators is required. The controller sends a control signal to the actuator, instructing the actuator to execute the command at a certain time. If the executor and the controller have different perceptions of time, that is, the time is not synchronized, it will cause the executor to execute commands at the wrong time, resulting in task execution failure.

为了更好的理解本申请实施例,下面先对本申请实施例使用的一种应用场景进行描述。在通信网络中要求不同的基站时间同步,且时间同步精度在要求的精度内,1588V2协议用来解决基站之间时间同步问题。接收端设备与发送端设备通过携带时间戳的消息进行交互,接收端设备根据时间戳与发送端设备进行时间同步。具体地,发送端设备在t1时刻发送同步消息,并将指示t1时刻的t1时间戳携带在同步消息中;接收端设备在t2时刻接收到同步消息,在接收端设备本地产生指示t2时刻的t2时间戳,并从同步消息中提取t1时间戳;接收端设备在t3时刻发送延迟请求消息,并在接收端设备本地产生指示t3时刻的t3时间戳;发送端设备在t4时刻接收到延迟请求消息,并在发送端设备本地产生指示t4时刻的t4时间戳;发送端设备将t4时间戳携带在延迟响应消息中,发送给接收端设备;接收端设备从延迟响应消息中提取出t4时间戳;接收端设备可以根据获得的时间戳t1、t2、t3和t4计算出接收端设备与发送端设备的时间偏差,并调整接收端设备自身的时间,达到与发送端设备的时间同步。In order to better understand the embodiment of the present application, an application scenario used in the embodiment of the present application is firstly described below. In the communication network, different base stations are required to be time synchronized, and the time synchronization accuracy is within the required accuracy. The 1588V2 protocol is used to solve the time synchronization problem between base stations. The receiving-end device and the sending-end device interact through messages carrying timestamps, and the receiving-end device performs time synchronization with the sending-end device according to the timestamp. Specifically, the sending end device sends a synchronization message at time t1, and carries the t1 time stamp indicating time t1 in the synchronization message; the receiving end device receives the synchronization message at time t2, and locally generates a t2 time stamp indicating time t2 on the receiving end device. Timestamp, and extract the t1 timestamp from the synchronization message; the receiving end device sends a delay request message at t3 time, and generates a t3 time stamp indicating the t3 time locally on the receiving end device; the sending end device receives the delay request message at t4 time , and locally generate a t4 time stamp indicating time t4 at the sending end device; the sending end device carries the t4 time stamp in the delayed response message and sends it to the receiving end device; the receiving end device extracts the t4 time stamp from the delayed response message; The receiving end device can calculate the time deviation between the receiving end device and the sending end device according to the obtained time stamps t1, t2, t3 and t4, and adjust the time of the receiving end device itself to achieve time synchronization with the sending end device.

相应地,发送端设备到接收端设备之间存在传输延迟,现有1588V2时间同步在计算时间偏差时,假设Delay1=Delay2,发送端设备到接收端设备路径延迟和接收端设备到发送端设备路径延迟相等,即收发链路延迟相等;那么此时时间偏差计算公式进一步表达为:N=[(t2-t1)-(t4-t3)]/2。Correspondingly, there is a transmission delay between the sending end device and the receiving end device. When the existing 1588V2 time synchronization calculates the time deviation, it is assumed that Delay1=Delay2, the path delay from the sending end device to the receiving end device and the path from the receiving end device to the sending end device The delays are equal, that is, the transmission and reception link delays are equal; then the calculation formula of the time deviation is further expressed as: N=[(t2-t1)-(t4-t3)]/2.

由于收发链路时间戳传输的物理链路、波长往往不同,收发链路延迟相等Delay1=Delay2是难以达成的。如果发送端设备到接收端设备路径延迟和接收端设备到发送端设备路径延迟不相等,即收发链路延迟不相等,Delay1≠Delay2,将会给时间偏差的大小带来同步误差,同步误差M=(Delay1-Delay2)/2。为了实现高精度的时间同步,必须消除或减小收发链路延迟不相等带来的误差。Since the physical links and wavelengths used for transmitting and receiving link time stamps are often different, it is difficult to achieve the equal delay of sending and receiving links Delay1=Delay2. If the path delay from the sending end device to the receiving end device is not equal to the path delay from the receiving end device to the sending end device, that is, the sending and receiving link delays are not equal, and Delay1≠Delay2 will bring a synchronization error to the size of the time deviation, the synchronization error M =(Delay1-Delay2)/2. In order to achieve high-precision time synchronization, errors caused by unequal delays in the sending and receiving links must be eliminated or reduced.

应理解的是,时间戳即为指示发送端设备或者接收端设备打戳时自身时钟所处的时刻的信息。时间戳例如是字符串或编码信息。发送端设备和接收端设备可以是需要进行时间同步的端口、模块和网络设备等。同步消息、延迟请求消息和延迟响应消息可以是以报文的形式传递。It should be understood that the time stamp is information indicating the time at which the sending-end device or the receiving-end device stamps its own clock. Timestamps are for example strings or encoded information. The sending-end device and the receiving-end device may be ports, modules, and network devices that need time synchronization. Synchronization messages, delay request messages and delay response messages can be transmitted in the form of packets.

基于上述内容,参见图1所示的现有技术的原理框图,无线通信设备一般通过USB、RJ45、RS232等与PC机相连。基于1588V2通信协议的时间同步一般的方法是PC机之间采用NTP时间同步,同时无线通信设备再与PC机时间同步,无线通信设备按照同步后的时间进行信号收发。Based on the above content, referring to the functional block diagram of the prior art shown in FIG. 1 , the wireless communication device is generally connected to the PC through USB, RJ45, RS232 and so on. The general method of time synchronization based on the 1588V2 communication protocol is to use NTP time synchronization between PCs, and at the same time, the wireless communication device is synchronized with the PC time, and the wireless communication device sends and receives signals according to the synchronized time.

上述现有技术方案时间同步精度较差,不能满足无线通信设备应用于宽带系统在TDD模式下仿真和验证要求。这是因为采用PC机进行时间同步,会带来较大时间误差,一方面无论采用NTP还是PTP授时,虽然精度较高,可以达到us级,但时间同步基点在PC机端,通过PC机之间的授时,PC时间同步后再同步到无线通信设备,由于PC操作系统的非实时性以及PC与无线通信设备之间的时间传输时延,导致无线通信设备的时间收发时间存在较大误差,可以达到ms级误差。另一方面,PC机的时钟精度只有10e-4~10e-5,时间同步一段时间后,累积误差可达秒级。无线系统如5G NR、LTE和WLAN系统的仿真,要求时间精度达到微秒级别,因此现有的时间同步方案在5G NR、LTE和WLAN系统的仿真应用上受到较大局限。The time synchronization accuracy of the above-mentioned prior art solution is relatively poor, and cannot meet the simulation and verification requirements of wireless communication equipment applied to a broadband system in TDD mode. This is because using a PC for time synchronization will bring a large time error. On the one hand, whether NTP or PTP is used for time service, although the accuracy is high and can reach the us level, the base point of time synchronization is at the PC end. Time service between PCs, PC time synchronization and then synchronization to wireless communication devices, due to the non-real-time nature of the PC operating system and the time transmission delay between PC and wireless communication devices, there is a large error in the time sending and receiving time of wireless communication devices, Can reach ms level error. On the other hand, the clock precision of the PC is only 10e-4 ~ 10e-5, after a period of time synchronization, the cumulative error can reach the second level. The simulation of wireless systems such as 5G NR, LTE and WLAN systems requires time accuracy to reach the microsecond level. Therefore, the existing time synchronization schemes are greatly limited in the simulation applications of 5G NR, LTE and WLAN systems.

图2示出了本申请实施例公开的一种时间同步的系统。可选地,本申请实施例中的第一通信设备和第二通信设备可以是光网络的中的波分设备、OTN设备或其它波分网络中的节点单元;本申请实施例中的第一无线通信设备还可以是无线接入网设备或节点(比如基站(Base Station,BS),5G移动通信系统中的基站gNB,演进型基站eNodeB,集中单元(Centralized Unit,CU),分布式单元(Distributed Unit,DU)),第二无线通信设备还可以是终端设备,用户设备(User Equipment,UE),D2D(Device to Device,D2D)设备,BS,gNB,eNB,CU,DU;第一无线通信设备可以是上述的发送端设备,第二无线通信设备可以是上文的接收端设备。Fig. 2 shows a time synchronization system disclosed in the embodiment of the present application. Optionally, the first communication device and the second communication device in the embodiment of the present application may be a wavelength division device in an optical network, an OTN device, or a node unit in another wavelength division network; the first communication device in the embodiment of the present application The wireless communication device can also be a wireless access network device or node (such as a base station (Base Station, BS), a base station gNB in a 5G mobile communication system, an evolved base station eNodeB, a centralized unit (Centralized Unit, CU), a distributed unit ( Distributed Unit, DU)), the second wireless communication device can also be terminal equipment, user equipment (User Equipment, UE), D2D (Device to Device, D2D) equipment, BS, gNB, eNB, CU, DU; the first wireless communication device The communication device may be the above-mentioned sending-end device, and the second wireless communication device may be the above-mentioned receiving-end device.

如图2所示,一种时间同步的系统包括第一通信设备20和第二通信设备21,其中第一通信设备20和第二通信设备21之间可以通过单纤双向的光纤连接,第二通信设备21要调整自身的时钟,达到与第一通信设备20的时间同步。第一通信设备20发送的信号均是第一波长的脉冲信号,第二通信设备21发送的信号均是第二波长的脉冲信号,例如,第一波长信号可以是基于1588协议的波长为1490nm的光信号,第二波长信号可以是基于1588协议的波长为1510nm的光信号;或者第一波长信号还可以是波长为1506nm的光信号,第二波长信号还可以是波长为1514nm的光信号,本申请列举的光信号为常用的光信号,但不限于此,本实施例不做多余的赘述。As shown in Figure 2, a time synchronization system includes a first communication device 20 and a second communication device 21, wherein the first communication device 20 and the second communication device 21 can be connected by a single-fiber bidirectional optical fiber, and the second The communication device 21 needs to adjust its own clock to achieve time synchronization with the first communication device 20 . The signals sent by the first communication device 20 are all pulse signals of the first wavelength, and the signals sent by the second communication device 21 are all pulse signals of the second wavelength. For the optical signal, the second wavelength signal can be an optical signal with a wavelength of 1510nm based on the 1588 protocol; or the first wavelength signal can also be an optical signal with a wavelength of 1506nm, and the second wavelength signal can also be an optical signal with a wavelength of 1514nm. The optical signals listed in the application are commonly used optical signals, but are not limited thereto, and will not be described redundantly in this embodiment.

如图3所示,一种时间同步方法,应用于第二无线通信设备,包括:As shown in FIG. 3, a time synchronization method applied to a second wireless communication device includes:

S301,第二无线通信设备接收第一无线通信设备发送的脉冲信号所携带的第一时间戳和第一标记,其中第一时间戳指示第一无线通信设备发送脉冲信号的第一时刻,第一标记指示第二无线通信设备相对于第一无线通信设备的时间状态,时间状态为超前状态或滞后状态。S301. The second wireless communication device receives the first time stamp and the first mark carried by the pulse signal sent by the first wireless communication device, where the first time stamp indicates the first moment when the first wireless communication device sends the pulse signal, and the first The indicium indicates a time state of the second wireless communication device relative to the first wireless communication device, the time state being an advanced state or a lagging state.

本实施例中,如图4a所示,第一无线通信设备产生基准脉冲信号。在基准脉冲信号产生的同时,为该脉冲信号时间点打上第一时间戳a_pulseA,同时第一无线通信设备发送给第二无线通信设备,同时跟随发送第一标记a_flagA,第一标记a_flagA用以标记基准时间(亦可采用第一标记a_flagA的时间起始点为第一标记a_flagA)。第一标记a_flagA的作用为告诉第二无线通信设备,相对于第一无线通信设备的时间状态是超前还是滞后。In this embodiment, as shown in FIG. 4a, the first wireless communication device generates a reference pulse signal. At the same time as the reference pulse signal is generated, the first time stamp a_pulseA is marked on the time point of the pulse signal, and the first wireless communication device sends it to the second wireless communication device, and at the same time sends the first flag a_flagA, the first flag a_flagA is used to mark Reference time (the time starting point of the first flag a_flagA may also be used as the first flag a_flagA). The function of the first flag a_flagA is to tell the second wireless communication device whether the time state is ahead or behind relative to the first wireless communication device.

S302,第二无线通信设备生成第二时间戳和第二标记,其中第二时间戳指示第二无线通信设备接收到脉冲信号的第二时刻,第二标记指示第一无线通信设备相对于第二无线通信设备的时间状态。S302. The second wireless communication device generates a second time stamp and a second mark, wherein the second time stamp indicates the second moment when the second wireless communication device receives the pulse signal, and the second mark indicates that the first wireless communication device is relative to the second The temporal state of the wireless communication device.

本实施例中,如图4b所示,第二无线通信设备收到脉冲信号所携带的第一时间戳a_pulseA和第一标记a_flagA,并分别标记为第二时间戳a_pulseB和第二标记a_flagB。In this embodiment, as shown in FIG. 4b, the second wireless communication device receives the first time stamp a_pulseA and the first flag a_flagA carried by the pulse signal, and marks them as the second time stamp a_pulseB and the second flag a_flagB respectively.

S303,第二无线通信设备根据第一时刻和传输时延T1,确定出第二无线通信设备发送脉冲信号给第一无线通信设备的第三时间戳,其中传输时延T1指示第二无线通信设备传输到第一软件通信设备的时延,第三时间戳指示第二无线通信设备发送脉冲信号的第三时刻。S303. The second wireless communication device determines the third time stamp when the second wireless communication device sends the pulse signal to the first wireless communication device according to the first moment and the transmission delay T1, where the transmission delay T1 indicates that the second wireless communication device The time delay of transmission to the first software communication device, and the third time stamp indicates the third moment when the second wireless communication device sends the pulse signal.

本实施例中,如图4c所示,第二无线通信设备产生脉冲信号的第三时间戳b_pulseB,并将此脉冲信号发送给第一无线通信设备,设第二无线通信设备传输到第一无线通信设备的传输时延为T1,则第三时间戳b_pulseB的第三时刻的时间为第一时间戳a_pulseA的第一时刻-T1。T1值根据第二标记a_flagB是超前还是滞后指示进行调整,从而动态调整第三时间戳b_pulseB的第三时刻。In this embodiment, as shown in FIG. 4c, the second wireless communication device generates the third time stamp b_pulseB of the pulse signal, and sends the pulse signal to the first wireless communication device, and the second wireless communication device transmits the pulse signal to the first wireless communication device. The transmission delay of the communication device is T1, then the time of the third moment of the third time stamp b_pulseB is the first moment of the first time stamp a_pulseA - T1. The value of T1 is adjusted according to whether the second flag a_flagB is leading or lagging, so as to dynamically adjust the third moment of the third time stamp b_pulseB.

如图4d所示,第一无线通信设备收到第二无线通信设备发送的携带有第三时间戳b_pulseB的脉冲信号,为第一无线通信设备接收到携带有第三时间戳b_pulseB的脉冲信号的时刻打上第四时间戳b_pulseA。As shown in Figure 4d, the first wireless communication device receives the pulse signal carrying the third time stamp b_pulseB sent by the second wireless communication device, which means that the first wireless communication device receives the pulse signal carrying the third time stamp b_pulseB Mark the fourth time stamp b_pulseA at all times.

S304,第二无线通信设备根据第二时刻和第三时刻计算出第一无线通信设备传输到第二软件通信设备的传输时延T2。S304. The second wireless communication device calculates the transmission time delay T2 for transmission from the first wireless communication device to the second software communication device according to the second time point and the third time point.

S305,第二无线通信设备接收第一无线通信设备在接收第三时刻后发送的脉冲信号所携带的第四时间戳和更新的第一标记,其中第四时间戳指示第一无线通信设备接收到第三时间戳所标记的第四时刻,第一标记的调整是第一无线通信设备比较第四时刻与第一时刻的时间状态后进行调整的;S305. The second wireless communication device receives the fourth time stamp and the updated first mark carried by the pulse signal sent by the first wireless communication device after receiving the third moment, where the fourth time stamp indicates that the first wireless communication device has received For the fourth moment marked by the third time stamp, the adjustment of the first mark is adjusted after the first wireless communication device compares the time status of the fourth moment with the first moment;

S306,第二无线通信设备根据更新的第一标记,对第二标记的时间状态进行更新,根据更新后的第二标记指示的时间状态对传输时延T1进行调整,直至第一时刻和第四时刻对齐,以使传输时延T1与传输时延T2相等,第二无线通信设备完成对第一无线通信设备的时间同步。S306. The second wireless communication device updates the time state of the second mark according to the updated first mark, and adjusts the transmission delay T1 according to the time state indicated by the updated second mark until the first moment and the fourth Time is aligned so that the transmission delay T1 is equal to the transmission delay T2, and the second wireless communication device completes time synchronization with the first wireless communication device.

本实施例中,可参加图5所示,第一无线通信设备与第二无线通信设备之间的信号交互传输,会返回至步骤S301,第一无线通信设备将第四时间戳b_pulseA指示的时刻与第一时间戳a_pulseA所指示的时刻进行比较,判断脉冲信号的时间状态是超前或者滞后,根据超前或滞后,将第一标记a_flagA重新进行标记。后续S302到T306步骤循环执行,在每个如图4c所示的信号处理步骤时,第二无线通信设备根据第二标记a_flagB,调整第三时间戳b_pulseB所标记的发送时间,直到在如图4d所示,使得第一时间戳a_pulseA的第一时刻和第四时间戳b_pulseA的第四时刻对齐。这样,后续如图4b所示的第二无线通信设备标记的第二时间戳a_pulseB的时间相较于第三时间戳b_pulseB的时间滞后时间T2,T2的值为第一无线通信设备和第二无线通信设备之间的传输时延,与实施例步骤S303所述的传输时延T1相等。In this embodiment, as shown in FIG. 5, the interactive transmission of signals between the first wireless communication device and the second wireless communication device will return to step S301, and the first wireless communication device will record the time indicated by the fourth time stamp b_pulseA Compared with the time indicated by the first time stamp a_pulseA, it is judged whether the time state of the pulse signal is leading or lagging, and the first flag a_flagA is remarked according to the leading or lagging. Subsequent steps from S302 to T306 are executed cyclically. In each signal processing step as shown in FIG. 4c, the second wireless communication device adjusts the sending time marked by the third time stamp b_pulseB according to the second flag a_flagB until the signal processing step in FIG. 4d As shown, the first moment of the first time stamp a_pulseA is aligned with the fourth moment of the fourth time stamp b_pulseA. In this way, the time of the second time stamp a_pulseB marked by the second wireless communication device as shown in FIG. 4b is lagged by T2 compared with the time of the third time stamp b_pulseB. The transmission delay between communication devices is equal to the transmission delay T1 described in step S303 of the embodiment.

通过上述实施例所述的方法,重复执行上述步骤S301-S306,直到校准值达到要求,即可以精准测得第一无线通信设备和第二无线通信设备之间的传输时延,从而实现第一无线通信设备和第二无线通信设备平台之间的时间的精准同步。Through the method described in the above embodiment, the above steps S301-S306 are repeatedly executed until the calibration value meets the requirements, that is, the transmission delay between the first wireless communication device and the second wireless communication device can be accurately measured, thereby realizing the first Precise synchronization of time between the wireless communication device and the second wireless communication device platform.

故此,本发明实施例提出在软件无线电平台之间(即第一无线通信设备与第二无线通信设备)超前或滞后的时间同步方法,时间同步系统采用环路结构进行动态调整,具备实现简单、调整精度较高的特点。Therefore, the embodiment of the present invention proposes a time synchronization method that is ahead or behind between software defined radio platforms (that is, the first wireless communication device and the second wireless communication device). The characteristics of high adjustment accuracy.

应理解的是,时间基准设置是无线通信设备内,而不是PC机的系统上。无线通信设备之间采用信道(线缆或者无线信号)进行传输。It should be understood that the time base is set in the wireless communication device, not on the PC system. Channels (cables or wireless signals) are used between wireless communication devices for transmission.

可选地,时间状态为超前状态或滞后状态。时间状态包括超前或滞后是本领域技术人员的公知概率,不做多余的赘述。Optionally, the time state is an advanced state or a lag state. The time state including leading or lagging is a well-known probability for those skilled in the art, so no redundant description is given.

可选地,第三时刻的计算式为t3=t1-T1,其中,t3表示第三时刻,t1表示第一时刻,T1表示第二无线通信设备传输到第一软件通信设备的传输时延。Optionally, the formula for calculating the third moment is t3=t1-T1, where t3 represents the third moment, t1 represents the first moment, and T1 represents the transmission delay from the second wireless communication device to the first software communication device.

如图6所示,一种时间同步的方法,该方法应用于第一无线通信设备,包括:As shown in FIG. 6, a method for time synchronization, which is applied to a first wireless communication device, includes:

S601,第一无线通信设备向第二无线通信设备发送携带有第一时间戳和第一标记的脉冲信号,其中第一时间戳指示第一无线通信设备发送脉冲信号的第一时刻,第一标记指示第二无线通信设备相对于第一无线通信设备的时间状态,时间状态为超前状态或滞后状态;S601. The first wireless communication device sends a pulse signal carrying a first time stamp and a first mark to the second wireless communication device, where the first time stamp indicates the first moment when the first wireless communication device sends the pulse signal, and the first mark Indicating the time state of the second wireless communication device relative to the first wireless communication device, the time state is an advanced state or a lagging state;

S602,第一无线通信设备接收第二无线通信设备发送的携带有第三时间戳的脉冲信号,其中第三时间戳指示第二无线通信设备发送脉冲信号的第三时刻,第三时刻是第二无线通信设备根据第一时刻和传输时延T1计算出的,传输时延T1指示第二无线通信设备传输到第一软件通信设备的时延;S602. The first wireless communication device receives a pulse signal carrying a third time stamp sent by the second wireless communication device, where the third time stamp indicates the third time when the second wireless communication device sends the pulse signal, and the third time is the second Calculated by the wireless communication device based on the first moment and the transmission delay T1, the transmission delay T1 indicates the delay for the second wireless communication device to transmit to the first software communication device;

S603,第一无线通信设备向第二无线通信设备发送携带有第四时间戳和更新的第一标记的脉冲信号,以使第二无线通信设备根据更新的第一标记指示的时间状态对传输时延T1进行调整,直至第一时刻和第四时刻对齐,以使传输时延T1与传输时延T2相等,第二无线通信设备完成对第一无线通信设备的时间同步,其中第四时间戳指示第一无线通信设备接收到第三时间戳所标记的第四时刻,第一标记的调整是第一无线通信设备比较第四时刻与第一时刻的时间状态后进行调整的。S603. The first wireless communication device sends a pulse signal carrying the fourth time stamp and the updated first flag to the second wireless communication device, so that the second wireless communication device compares the transmission time according to the time state indicated by the updated first flag. The delay T1 is adjusted until the first moment is aligned with the fourth moment, so that the transmission delay T1 is equal to the transmission delay T2, and the second wireless communication device completes time synchronization with the first wireless communication device, wherein the fourth time stamp indicates The first wireless communication device receives the fourth time marked by the third time stamp, and the adjustment of the first mark is adjusted after the first wireless communication device compares the time status of the fourth time with that of the first time.

在一个实施例,第一标记的调整是第一无线通信设备比较第四时刻与第一时刻的时间状态后进行调整的,具体为:第一无线通信设备将第四时刻与第一时刻进行对比,检测携带有第三时间戳的脉冲信号的时间状态相较于与携带有第一时间戳的脉冲信号的时间状态是否超前或滞后,根据检测结果对第一标记进行调整。In one embodiment, the first mark is adjusted after the first wireless communication device compares the time state at the fourth moment with the first moment, specifically: the first wireless communication device compares the fourth moment with the first moment Detecting whether the time state of the pulse signal carrying the third time stamp is ahead or behind the time state of the pulse signal carrying the first time stamp, and adjusting the first flag according to the detection result.

在一个实施例,循环调整所述第一标记,直至调整达到校准精度值。In one embodiment, the first marker is cyclically adjusted until the adjustment reaches a calibrated precision value.

具体的,本实施例通过循环调整第一标记的时间状态,第一无线通信设备将第四时间戳b_pulseA指示的时刻与第一时间戳a_pulseA所指示的时刻进行比较,检测是否超前或者滞后,将第一标记a_flagA进行标记。后续S301到S306步骤循环执行,在每个S305步骤,第二无线通信设备根据第二标记a_flagB,调整第三时间戳b_pulseB的发送时间,直到在步骤S306,使得第一时刻a_pulseA和第四时刻b_pulseA对齐。这样,后续步骤2收到的a_pulseB较b_pulseB滞后时间T2,与前叙述T1基本相等。可以理解的是,校准精度值即T1和T2相等。Specifically, in this embodiment, by cyclically adjusting the time state of the first mark, the first wireless communication device compares the time indicated by the fourth time stamp b_pulseA with the time indicated by the first time stamp a_pulseA to detect whether it is ahead or behind, and then The first flag a_flagA flags. The subsequent steps from S301 to S306 are executed cyclically. In each step of S305, the second wireless communication device adjusts the sending time of the third time stamp b_pulseB according to the second flag a_flagB until step S306, so that the first moment a_pulseA and the fourth moment b_pulseA align. In this way, a_pulseB received in the subsequent step 2 is lagging behind b_pulseB by T2, which is basically equal to T1 described above. It can be understood that the calibration accuracy values, namely T1 and T2, are equal.

基于上述实施例提供的应用于第二无线通信设备的时间同步的方法,本实施例提供了一种时间同步的第二无线通信设备,包括处理器和转换模块,处理器和转换模块建立通信连接;Based on the time synchronization method applied to the second wireless communication device provided in the above embodiment, this embodiment provides a second wireless communication device with time synchronization, including a processor and a conversion module, and the processor and the conversion module establish a communication connection ;

转换模块,用于接收第一无线通信设备发送的脉冲信号所携带的第一时间戳和第一标记,其中第一时间戳指示第一无线通信设备发送脉冲信号的第一时刻,第一标记指示第二无线通信设备相对于第一无线通信设备的时间状态,时间状态为超前状态或滞后状态;A conversion module, configured to receive a first time stamp and a first mark carried by the pulse signal sent by the first wireless communication device, wherein the first time stamp indicates the first moment when the first wireless communication device sends the pulse signal, and the first mark indicates The time state of the second wireless communication device relative to the first wireless communication device, the time state is an advanced state or a lagging state;

处理器,用于生成第二时间戳和第二标记,其中第二时间戳指示第二无线通信设备接收到脉冲信号的第二时刻,第二标记指示第一无线通信设备相对于第二无线通信设备的时间状态;a processor, configured to generate a second time stamp and a second mark, wherein the second time stamp indicates a second moment when the second wireless communication device receives the pulse signal, and the second mark indicates that the first wireless communication device is relative to the second wireless communication device The time state of the device;

处理器,还用于根据第一时刻和传输时延T1,确定出第二无线通信设备发送脉冲信号给第一无线通信设备的第三时间戳,其中传输时延T1指示第二无线通信设备传输到第一软件通信设备的时延,第三时间戳指示第二无线通信设备发送脉冲信号的第三时刻;The processor is further configured to determine a third time stamp when the second wireless communication device sends a pulse signal to the first wireless communication device according to the first moment and the transmission delay T1, where the transmission delay T1 indicates that the second wireless communication device transmits to the time delay of the first software communication device, the third time stamp indicates the third moment when the second wireless communication device sends the pulse signal;

处理器,还用于根据第二时刻和第三时刻计算出第一无线通信设备传输到第二软件通信设备的传输时延T2;The processor is further configured to calculate the transmission delay T2 from the first wireless communication device to the second software communication device according to the second moment and the third moment;

转换模块,还用于接收第一无线通信设备在接收第三时刻后发送的脉冲信号所携带的第四时间戳和更新的第一标记,其中第四时间戳指示第一无线通信设备接收到第三时间戳所标记的第四时刻,第一标记的调整是第一无线通信设备比较第四时刻与第一时刻的时间状态后进行调整的;The converting module is further configured to receive the fourth time stamp and the updated first mark carried by the pulse signal sent by the first wireless communication device after receiving the third moment, where the fourth time stamp indicates that the first wireless communication device has received the first For the fourth moment marked by the three time stamps, the adjustment of the first mark is adjusted by the first wireless communication device after comparing the time status of the fourth moment with the first moment;

处理器,还用于根据更新的第一标记,对第二标记的时间状态进行更新,根据更新后的第二标记指示的时间状态对传输时延T1进行调整,直至第一时刻和第四时刻对齐,以使传输时延T1与传输时延T2相等,第二无线通信设备完成对第一无线通信设备的时间同步。The processor is further configured to update the time state of the second mark according to the updated first mark, and adjust the transmission delay T1 according to the time state indicated by the updated second mark until the first moment and the fourth moment Align, so that the transmission delay T1 is equal to the transmission delay T2, and the second wireless communication device completes time synchronization with the first wireless communication device.

可选地,处理器,还用于第三时刻的计算式为t3=t1-T1,其中,t3表示第三时刻,t1表示第一时刻,T1表示第二无线通信设备传输到第一软件通信设备的传输时延。Optionally, the calculation formula used by the processor at the third moment is t3=t1-T1, where t3 represents the third moment, t1 represents the first moment, and T1 represents the second wireless communication device transmitting to the first software communication The transmission delay of the device.

基于上述实施例的应用于第一无线通信设备的时间同步的方法,本实施例提供了一种时间同步的第一无线通信设备,包括处理器和转换模块,处理器和转换模块建立通信连接;Based on the time synchronization method applied to the first wireless communication device in the above embodiment, this embodiment provides a first wireless communication device with time synchronization, including a processor and a conversion module, and the processor and the conversion module establish a communication connection;

转换模块,用于向第二无线通信设备发送携带有第一时间戳和第一标记的脉冲信号,第一时间戳指示第一无线通信设备发送脉冲信号的第一时刻,第一标记指示第二无线通信设备相对于第一无线通信设备的时间状态,时间状态为超前状态或滞后状态;A conversion module, configured to send a pulse signal carrying a first time stamp and a first mark to the second wireless communication device, the first time stamp indicates the first moment when the first wireless communication device sends the pulse signal, and the first mark indicates the second The time state of the wireless communication device relative to the first wireless communication device, where the time state is an advanced state or a lagging state;

转换模块,还用于接收第二无线通信设备发送的携带有第三时间戳的脉冲信号,其中第三时间戳指示第二无线通信设备发送脉冲信号的第三时刻,第三时刻是第二无线通信设备根据第一时刻和传输时延T1计算出的,传输时延T1指示第二无线通信设备传输到第一软件通信设备的时延;The conversion module is further configured to receive a pulse signal carrying a third time stamp sent by the second wireless communication device, wherein the third time stamp indicates a third moment when the second wireless communication device sends the pulse signal, and the third time is the second wireless communication device Calculated by the communication device based on the first moment and the transmission delay T1, the transmission delay T1 indicates the delay for the second wireless communication device to transmit to the first software communication device;

转换模块,还用于向第二无线通信设备发送携带有第四时间戳和更新的第一标记的脉冲信号,以使第二无线通信设备根据更新的第一标记指示的时间状态对传输时延T1进行调整,直至第一时刻和第四时刻对齐,以使传输时延T1与传输时延T2相等,第二无线通信设备完成对第一无线通信设备的时间同步,其中第四时间戳指示第一无线通信设备接收到第三时间戳所标记的第四时刻,第一标记的调整是第一无线通信设备比较第四时刻与第一时刻的时间状态后进行调整的;The conversion module is further configured to send a pulse signal carrying the fourth time stamp and the updated first label to the second wireless communication device, so that the second wireless communication device delays the transmission time according to the time state indicated by the updated first label T1 is adjusted until the first moment is aligned with the fourth moment, so that the transmission delay T1 is equal to the transmission delay T2, and the second wireless communication device completes the time synchronization of the first wireless communication device, where the fourth time stamp indicates the first A wireless communication device receives the fourth moment marked by the third time stamp, and the adjustment of the first mark is adjusted after the first wireless communication device compares the time status of the fourth moment with the first moment;

处理器,用于与转换模块进行通信。A processor for communicating with the conversion module.

可选地,处理器,还用于将第四时刻与第一时刻进行对比,检测携带有第三时间戳的脉冲信号的时间状态相较于与携带有第一时间戳的脉冲信号的时间状态是否超前或滞后,根据检测结果对第一标记进行调整。Optionally, the processor is further configured to compare the fourth moment with the first moment, and detect that the time state of the pulse signal carrying the third time stamp is compared with the time state of the pulse signal carrying the first time stamp Whether it is leading or lagging, the first mark is adjusted according to the detection result.

可选地,处理器,还用于循环调整所述第一标记,直至调整达到校准精度值。Optionally, the processor is further configured to cyclically adjust the first mark until the adjustment reaches a calibration precision value.

基于上述示例所述的本方案的时间同步的方法,时间校准精度高,可以达到ns级,相较现有技术,精度可以提升100倍以上。Based on the time synchronization method of this solution described in the above example, the time calibration accuracy is high, reaching ns level, and compared with the prior art, the accuracy can be increased by more than 100 times.

以上的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above specific implementation manners have further described the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation modes of the present invention, and are not used to limit the protection scope of the present invention. Within the spirit and principles of the present invention, any modifications, equivalent replacements, improvements, etc., shall be included in the protection scope of the present invention.

Claims (10)

1.一种时间同步方法,其特征在于,方法包括:1. A time synchronization method, characterized in that the method comprises: 第二无线通信设备接收第一无线通信设备发送的脉冲信号所携带的第一时间戳和第一标记,其中第一时间戳指示第一无线通信设备发送脉冲信号的第一时刻,第一标记指示第二无线通信设备相对于第一无线通信设备的时间状态,时间状态为超前状态或滞后状态;The second wireless communication device receives the first time stamp and the first mark carried by the pulse signal sent by the first wireless communication device, wherein the first time stamp indicates the first moment when the first wireless communication device sends the pulse signal, and the first mark indicates The time state of the second wireless communication device relative to the first wireless communication device, the time state is an advanced state or a lagging state; 第二无线通信设备生成第二时间戳和第二标记,其中第二时间戳指示第二无线通信设备接收到脉冲信号的第二时刻,第二标记指示第一无线通信设备相对于第二无线通信设备的时间状态;The second wireless communication device generates a second time stamp and a second mark, wherein the second time stamp indicates the second moment when the second wireless communication device receives the pulse signal, and the second mark indicates that the first wireless communication device is relative to the second wireless communication device. The time state of the device; 第二无线通信设备根据第一时刻和传输时延T1,确定出第二无线通信设备发送脉冲信号给第一无线通信设备的第三时间戳,其中传输时延T1指示第二无线通信设备传输到第一软件通信设备的时延,第三时间戳指示第二无线通信设备发送脉冲信号的第三时刻;The second wireless communication device determines the third time stamp when the second wireless communication device sends a pulse signal to the first wireless communication device according to the first moment and the transmission delay T1, wherein the transmission delay T1 indicates that the second wireless communication device transmits the pulse signal to the first wireless communication device. The time delay of the first software communication device, the third time stamp indicates the third moment when the second wireless communication device sends the pulse signal; 第二无线通信设备根据第二时刻和第三时刻计算出第一无线通信设备传输到第二软件通信设备的传输时延T2;The second wireless communication device calculates the transmission delay T2 from the first wireless communication device to the second software communication device according to the second moment and the third moment; 第二无线通信设备接收第一无线通信设备在接收第三时刻后发送的脉冲信号所携带的第四时间戳和更新的第一标记,其中第四时间戳指示第一无线通信设备接收到第三时间戳所标记的第四时刻,第一标记的调整是第一无线通信设备比较第四时刻与第一时刻的时间状态后进行调整的;The second wireless communication device receives the fourth time stamp and the updated first mark carried by the pulse signal sent by the first wireless communication device after receiving the third moment, where the fourth time stamp indicates that the first wireless communication device has received the third For the fourth moment marked by the time stamp, the adjustment of the first mark is made by the first wireless communication device after comparing the time state at the fourth moment with the time state at the first moment; 第二无线通信设备根据更新的第一标记,对第二标记的时间状态进行更新,根据更新后的第二标记指示的时间状态对传输时延T1进行调整,直至第一时刻和第四时刻对齐,以使传输时延T1与传输时延T2相等,第二无线通信设备完成对第一无线通信设备的时间同步。The second wireless communication device updates the time state of the second mark according to the updated first mark, and adjusts the transmission delay T1 according to the time state indicated by the updated second mark until the first moment is aligned with the fourth moment , so that the transmission delay T1 is equal to the transmission delay T2, and the second wireless communication device completes time synchronization with the first wireless communication device. 2.根据权利要求1所述的一种时间同步的方法,其特征在于,第三时刻的计算式为t3=t1-T1,其中,t3表示第三时刻,t1表示第一时刻,T1表示第二无线通信设备传输到第一软件通信设备的传输时延。2. A method for time synchronization according to claim 1, characterized in that the formula for calculating the third moment is t3=t1-T1, wherein t3 represents the third moment, t1 represents the first moment, and T1 represents the first moment The transmission delay from the second wireless communication device to the first software communication device. 3.一种时间同步的方法,其特征在于,方法包括:3. A method for time synchronization, characterized in that the method comprises: 第一无线通信设备向第二无线通信设备发送携带有第一时间戳和第一标记的脉冲信号,其中第一时间戳指示第一无线通信设备发送脉冲信号的第一时刻,第一标记指示第二无线通信设备相对于第一无线通信设备的时间状态,时间状态为超前状态或滞后状态;The first wireless communication device sends a pulse signal carrying a first time stamp and a first mark to the second wireless communication device, where the first time stamp indicates the first moment when the first wireless communication device sends the pulse signal, and the first mark indicates the first time when the pulse signal is sent by the first wireless communication device. The time state of the second wireless communication device relative to the first wireless communication device, the time state is an advanced state or a lagging state; 第一无线通信设备接收第二无线通信设备发送的携带有第三时间戳的脉冲信号,其中第三时间戳指示第二无线通信设备发送脉冲信号的第三时刻,第三时刻是第二无线通信设备根据第一时刻和传输时延T1计算出的,传输时延T1指示第二无线通信设备传输到第一软件通信设备的时延;The first wireless communication device receives the pulse signal with the third time stamp sent by the second wireless communication device, wherein the third time stamp indicates the third time when the second wireless communication device sends the pulse signal, and the third time is the second wireless communication time Calculated by the device based on the first moment and the transmission delay T1, the transmission delay T1 indicates the delay for the second wireless communication device to transmit to the first software communication device; 第一无线通信设备向第二无线通信设备发送携带有第四时间戳和更新的第一标记的脉冲信号,以使第二无线通信设备根据更新的第一标记指示的时间状态对传输时延T1进行调整,直至第一时刻和第四时刻对齐,以使传输时延T1与传输时延T2相等,第二无线通信设备完成对第一无线通信设备的时间同步,其中第四时间戳指示第一无线通信设备接收到第三时间戳所标记的第四时刻,第一标记的调整是第一无线通信设备比较第四时刻与第一时刻的时间状态后进行调整的。The first wireless communication device sends a pulse signal carrying the fourth time stamp and the updated first flag to the second wireless communication device, so that the second wireless communication device delays the transmission by T1 according to the time state indicated by the updated first flag Adjust until the first moment and the fourth moment are aligned, so that the transmission delay T1 is equal to the transmission delay T2, and the second wireless communication device completes the time synchronization of the first wireless communication device, wherein the fourth time stamp indicates that the first The wireless communication device receives the fourth moment marked by the third time stamp, and the adjustment of the first mark is adjusted after the first wireless communication device compares the time status of the fourth moment with that of the first moment. 4.根据权利要求3所述的一种时间同步的方法,其特征在于,第一标记的调整是第一无线通信设备比较第四时刻与第一时刻的时间状态后进行调整的,具体为:第一无线通信设备将第四时刻与第一时刻进行对比,检测携带有第三时间戳的脉冲信号的时间状态相较于与携带有第一时间戳的脉冲信号的时间状态是否超前或滞后,根据检测结果对第一标记进行调整。4. A method for time synchronization according to claim 3, characterized in that the adjustment of the first mark is adjusted after the first wireless communication device compares the time state at the fourth moment with that at the first moment, specifically: The first wireless communication device compares the fourth moment with the first moment, and detects whether the time state of the pulse signal carrying the third time stamp is ahead or behind the time state of the pulse signal carrying the first time stamp, The first marker is adjusted according to the detection result. 5.根据权利要求4所述的一种时间同步的方法,其特征在于,循环调整所述第一标记的时间状态,直至调整达到校准精度值。5 . The method for time synchronization according to claim 4 , wherein the time state of the first marker is cyclically adjusted until the adjustment reaches a calibration precision value. 6 . 6.一种时间同步的无线通信设备,其特征在于,包括处理器和转换模块,处理器和转换模块建立通信连接;6. A time-synchronized wireless communication device, characterized in that it includes a processor and a conversion module, and the processor and the conversion module establish a communication connection; 转换模块,用于接收第一无线通信设备发送的脉冲信号所携带的第一时间戳和第一标记,其中第一时间戳指示第一无线通信设备发送脉冲信号的第一时刻,第一标记指示第二无线通信设备相对于第一无线通信设备的时间状态,时间状态为超前状态或滞后状态;A conversion module, configured to receive a first time stamp and a first mark carried by the pulse signal sent by the first wireless communication device, wherein the first time stamp indicates the first moment when the first wireless communication device sends the pulse signal, and the first mark indicates The time state of the second wireless communication device relative to the first wireless communication device, the time state is an advanced state or a lagging state; 处理器,用于生成第二时间戳和第二标记,其中第二时间戳指示第二无线通信设备接收到脉冲信号的第二时刻,第二标记指示第一无线通信设备相对于第二无线通信设备的时间状态;a processor, configured to generate a second time stamp and a second mark, wherein the second time stamp indicates a second moment when the second wireless communication device receives the pulse signal, and the second mark indicates that the first wireless communication device is relative to the second wireless communication device The time state of the device; 处理器,还用于根据第一时刻和传输时延T1,确定出第二无线通信设备发送脉冲信号给第一无线通信设备的第三时间戳,其中传输时延T1指示第二无线通信设备传输到第一软件通信设备的时延,第三时间戳指示第二无线通信设备发送脉冲信号的第三时刻;The processor is further configured to determine a third time stamp when the second wireless communication device sends a pulse signal to the first wireless communication device according to the first moment and the transmission delay T1, where the transmission delay T1 indicates that the second wireless communication device transmits to the time delay of the first software communication device, the third time stamp indicates the third moment when the second wireless communication device sends the pulse signal; 处理器,还用于根据第二时刻和第三时刻计算出第一无线通信设备传输到第二软件通信设备的传输时延T2;The processor is further configured to calculate the transmission delay T2 from the first wireless communication device to the second software communication device according to the second moment and the third moment; 转换模块,还用于接收第一无线通信设备在接收第三时刻后发送的脉冲信号所携带的第四时间戳和更新的第一标记,其中第四时间戳指示第一无线通信设备接收到第三时间戳所标记的第四时刻,第一标记的调整是第一无线通信设备比较第四时刻与第一时刻的时间状态后进行调整的;The converting module is further configured to receive the fourth time stamp and the updated first mark carried by the pulse signal sent by the first wireless communication device after receiving the third moment, where the fourth time stamp indicates that the first wireless communication device has received the first For the fourth moment marked by the three time stamps, the adjustment of the first mark is adjusted by the first wireless communication device after comparing the time status of the fourth moment with the first moment; 处理器,还用于根据更新的第一标记,对第二标记的时间状态进行更新,根据更新后的第二标记指示的时间状态对传输时延T1进行调整,直至第一时刻和第四时刻对齐,以使传输时延T1与传输时延T2相等,第二无线通信设备完成对第一无线通信设备的时间同步。The processor is further configured to update the time state of the second mark according to the updated first mark, and adjust the transmission delay T1 according to the time state indicated by the updated second mark until the first moment and the fourth moment Align, so that the transmission delay T1 is equal to the transmission delay T2, and the second wireless communication device completes time synchronization with the first wireless communication device. 7.一种时间同步的无线通信设备,其特征在于,包括处理器和转换模块,处理器和转换模块建立通信连接;7. A time-synchronized wireless communication device, characterized in that it includes a processor and a conversion module, and the processor and the conversion module establish a communication connection; 转换模块,用于向第二无线通信设备发送携带有第一时间戳和第一标记的脉冲信号,第一时间戳指示第一无线通信设备发送脉冲信号的第一时刻,第一标记指示第二无线通信设备相对于第一无线通信设备的时间状态,时间状态为超前状态或滞后状态;A conversion module, configured to send a pulse signal carrying a first time stamp and a first mark to the second wireless communication device, the first time stamp indicates the first moment when the first wireless communication device sends the pulse signal, and the first mark indicates the second The time state of the wireless communication device relative to the first wireless communication device, where the time state is an advanced state or a lagging state; 转换模块,还用于接收第二无线通信设备发送的携带有第三时间戳的脉冲信号,其中第三时间戳指示第二无线通信设备发送脉冲信号的第三时刻,第三时刻是第二无线通信设备根据第一时刻和传输时延T1计算出的,传输时延T1指示第二无线通信设备传输到第一软件通信设备的时延;The conversion module is further configured to receive a pulse signal carrying a third time stamp sent by the second wireless communication device, wherein the third time stamp indicates a third moment when the second wireless communication device sends the pulse signal, and the third time is the second wireless communication device Calculated by the communication device based on the first moment and the transmission delay T1, the transmission delay T1 indicates the delay for the second wireless communication device to transmit to the first software communication device; 转换模块,还用于向第二无线通信设备发送携带有第四时间戳和更新的第一标记的脉冲信号,以使第二无线通信设备根据更新的第一标记指示的时间状态对传输时延T1进行调整,直至第一时刻和第四时刻对齐,以使传输时延T1与传输时延T2相等,第二无线通信设备完成对第一无线通信设备的时间同步,其中第四时间戳指示第一无线通信设备接收到第三时间戳所标记的第四时刻,第一标记的调整是第一无线通信设备比较第四时刻与第一时刻的时间状态后进行调整的;The conversion module is further configured to send a pulse signal carrying the fourth time stamp and the updated first label to the second wireless communication device, so that the second wireless communication device delays the transmission time according to the time state indicated by the updated first label T1 is adjusted until the first moment is aligned with the fourth moment, so that the transmission delay T1 is equal to the transmission delay T2, and the second wireless communication device completes the time synchronization of the first wireless communication device, where the fourth time stamp indicates the first A wireless communication device receives the fourth moment marked by the third time stamp, and the adjustment of the first mark is adjusted after the first wireless communication device compares the time status of the fourth moment with the first moment; 处理器,用于与转换模块进行通信。A processor for communicating with the conversion module. 8.根据权利要求7所述的一种时间同步的无线通信设备,其特征在于,处理器,还用于将第四时刻与第一时刻进行对比,检测携带有第三时间戳的脉冲信号的时间状态相较于与携带有第一时间戳的脉冲信号的时间状态是否超前或滞后,根据检测结果对第一标记进行调整。8. A time-synchronized wireless communication device according to claim 7, wherein the processor is further configured to compare the fourth moment with the first moment, and detect the pulse signal carrying the third time stamp. The first mark is adjusted according to the detection result whether the time state is ahead or behind the time state of the pulse signal carrying the first time stamp. 9.根据权利要求8所述的一种时间同步的无线通信设备,其特征在于,处理器,还用于循环调整所述第一标记,直至调整达到校准精度值。9. The time-synchronized wireless communication device according to claim 8, wherein the processor is further configured to cyclically adjust the first mark until the adjustment reaches a calibration accuracy value. 10.一种时间同步的系统,其特征在于,系统包括权利要求6所述的一种时间同步的无线通信设备和权利要求7至9任一项所述的一种时间同步的无线通信设备。10. A time synchronization system, characterized in that the system comprises the time synchronization wireless communication device according to claim 6 and the time synchronization wireless communication device according to any one of claims 7 to 9.
CN202310869316.3A 2023-07-14 2023-07-14 A time synchronization method, wireless communication device and system Pending CN116647304A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310869316.3A CN116647304A (en) 2023-07-14 2023-07-14 A time synchronization method, wireless communication device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310869316.3A CN116647304A (en) 2023-07-14 2023-07-14 A time synchronization method, wireless communication device and system

Publications (1)

Publication Number Publication Date
CN116647304A true CN116647304A (en) 2023-08-25

Family

ID=87623216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310869316.3A Pending CN116647304A (en) 2023-07-14 2023-07-14 A time synchronization method, wireless communication device and system

Country Status (1)

Country Link
CN (1) CN116647304A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118102435A (en) * 2024-04-23 2024-05-28 杭州海联物联科技有限公司 Remote multi-device pulse communication method and communication device thereof
WO2025256267A1 (en) * 2024-06-14 2025-12-18 华为技术有限公司 Method for communication, and device, storage medium and program product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111555834A (en) * 2020-04-30 2020-08-18 北京邮电大学 Method and system for clock synchronization of wireless network based on IEEE1588 protocol
CN111638814A (en) * 2020-06-02 2020-09-08 深圳市汇顶科技股份有限公司 Synchronization method, wireless communication chip, touch control chip and coding chip
CN111867040A (en) * 2019-04-30 2020-10-30 华为技术有限公司 A communication method, terminal device and network device
WO2022021010A1 (en) * 2020-07-27 2022-02-03 Shenzhen University Method and apparatus for clock synchronization in wireless network
CN115061084A (en) * 2021-03-09 2022-09-16 华为技术有限公司 Time measuring method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111867040A (en) * 2019-04-30 2020-10-30 华为技术有限公司 A communication method, terminal device and network device
CN111555834A (en) * 2020-04-30 2020-08-18 北京邮电大学 Method and system for clock synchronization of wireless network based on IEEE1588 protocol
CN111638814A (en) * 2020-06-02 2020-09-08 深圳市汇顶科技股份有限公司 Synchronization method, wireless communication chip, touch control chip and coding chip
WO2022021010A1 (en) * 2020-07-27 2022-02-03 Shenzhen University Method and apparatus for clock synchronization in wireless network
CN115061084A (en) * 2021-03-09 2022-09-16 华为技术有限公司 Time measuring method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118102435A (en) * 2024-04-23 2024-05-28 杭州海联物联科技有限公司 Remote multi-device pulse communication method and communication device thereof
WO2025256267A1 (en) * 2024-06-14 2025-12-18 华为技术有限公司 Method for communication, and device, storage medium and program product

Similar Documents

Publication Publication Date Title
EP2528254B1 (en) Method and device for time synchronization
US11503557B2 (en) Time synchronization in integrated 5G wireless and time-sensitive networking systems
CN102783078B (en) Method and system for precise clock synchronization through interaction between communication layers and sublayers for a communication system
US9813175B2 (en) Method for detecting timing references affected by a change in path delay asymmetry between nodes in a communication network
US10785737B2 (en) Technique to align a radio interface frame timing reference in a pool of radio equipment controllers
CN102469571B (en) Method and system for realizing delay compensation in distributed base station system
CN101741853B (en) Method for synchronizing clock time, line card veneer and network equipment
EP3180876B1 (en) Method and apparatus for synchronising a plurality of distributed devices with a network
CN116647304A (en) A time synchronization method, wireless communication device and system
CN105959076A (en) Device and method for making passive optical network possess ability of supporting time synchronization
CN111989960B (en) Techniques for network-based time synchronization for UE-side uplink and/or uplink communications
CN103168440B (en) Time path compensation method and device
CN108650050A (en) A kind of distributed network clock synchronous method
JP4509921B2 (en) Wireless communication system and wireless communication method
WO2015117501A1 (en) Time synchronization method, programmable logic device, single board and network element
CN111342926A (en) Method for optimizing time synchronization of PTP (precision time protocol) in asymmetric network
CN112751639B (en) Time synchronization method, communication equipment and system
JP2009049591A (en) Mobile communication system
CN101989906A (en) Message synchronizing method, device and system
CN112104432B (en) Time verification method, system, base station and bearing network in mobile communication network
US11343007B2 (en) Time synchronization method and device
US20220039034A1 (en) Automatic alignment of presentation time offsets in different communication directions
JP5302051B2 (en) Radio base station, radio control apparatus, and radio apparatus
CN105873207B (en) Air interface synchronization system and method thereof
KR20150016735A (en) Network synchronization system using centralized control plane

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