[go: up one dir, main page]

WO2012055360A1 - 时间同步方法和相关设备及系统 - Google Patents

时间同步方法和相关设备及系统 Download PDF

Info

Publication number
WO2012055360A1
WO2012055360A1 PCT/CN2011/081373 CN2011081373W WO2012055360A1 WO 2012055360 A1 WO2012055360 A1 WO 2012055360A1 CN 2011081373 W CN2011081373 W CN 2011081373W WO 2012055360 A1 WO2012055360 A1 WO 2012055360A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
synchronization message
time synchronization
clock device
message
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.)
Ceased
Application number
PCT/CN2011/081373
Other languages
English (en)
French (fr)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of WO2012055360A1 publication Critical patent/WO2012055360A1/zh
Anticipated expiration legal-status Critical
Ceased 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
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes
    • H04W56/0015Synchronization between nodes one node acting as a reference for the others

Definitions

  • the present invention relates to the field of communications, and in particular, to a time synchronization method and related devices and systems. Background technique
  • Time synchronization means that the absolute time between different systems is the same.
  • each system has an internal time, that is, a local clock, which is managed by the clock device of the system, due to the locality of each system.
  • the clocks are all running independently, so the local clocks of the various systems are not necessarily the same.
  • time synchronization technology is a technology that controls the time deviation between different systems within a certain range.
  • IEEE-1588 defines the Precision Time Protocol (PTP). Time synchronization of other clock devices in the wired network with other clock devices based on the IEEE-1588 standard.
  • PTP Precision Time Protocol
  • Embodiments of the present invention provide a time synchronization method and related device and system, which are used to improve a main Time synchronization accuracy from the clock device.
  • the embodiment of the present invention provides the following technical solutions:
  • a time synchronization method including:
  • the master clock device sends the first time synchronization message to the slave clock device, and acquires the time when the first time synchronization message is sent through the radio frequency.
  • the master clock device sends a second time synchronization message to the slave clock device, and carries the time stamp of the above 1 ⁇ in the second time synchronization message;
  • the master clock device receives the third time synchronization message sent by the slave clock device, and acquires the time ⁇ 4 when the air interface physical layer receives the third time synchronization message;
  • the master clock device sends a fourth time synchronization message to the slave clock device, and carries the time stamp of the ⁇ 4 in the fourth time synchronization message, so that the slave clock device calculates the slave clock device according to the foregoing 1 ⁇ and ⁇ 4 And a clock offset of the master clock device, and correcting the local clock of the slave clock device according to the calculated clock offset.
  • a time synchronization method including:
  • the slave clock device calculates a clock offset of the slave clock device and the master clock device according to the above 1 ⁇ , ⁇ 2 , ⁇ 3 and ⁇ 4 ;
  • the slave clock device corrects the local clock of the slave clock device based on the calculated clock offset.
  • a master clock device including: a transceiver module, configured to send a first time synchronization message to the slave clock device;
  • An acquiring module configured to acquire a time when the transceiver module sends the first time synchronization message by using a radio frequency
  • the transceiver module is further configured to send the second time synchronization message to the slave clock device, and carry the time stamp of the above 1 ⁇ in the second time synchronization message;
  • the transceiver module is further configured to receive a third time synchronization message sent by the slave clock device.
  • the obtaining module is further configured to acquire, when the transceiver module sends the third synchronization message, the time ⁇ 4 at which the air interface physical layer receives the third time synchronization message;
  • the transceiver module is further configured to send a fourth time synchronization message to the slave clock device, and carry the time stamp of the ⁇ 4 in the fourth time synchronization message; so that the slave clock device calculates the foregoing according to the foregoing 1 and ⁇ 4
  • the clock offset of the slave clock device from the clock device and the master clock device is corrected, and the local clock of the slave clock device is corrected according to the calculated clock offset.
  • a slave clock device including:
  • a transceiver module configured to receive a first time synchronization message sent by the master clock device, and an acquiring module, configured to acquire, according to the first time synchronization message received by the transceiver module, a time ⁇ 2 when the air interface physical layer receives the first time synchronization message ;
  • the transceiver module is further configured to receive a second time synchronization message sent by the primary clock device, where the second time synchronization message carries a time stamp of 1 ⁇ ;
  • the acquiring module is configured to receive, by using the second synchronization message, the timestamp carried in the second time synchronization message, where the first time is a time when the primary clock device sends the first time synchronization message by using a radio frequency. ;
  • the transceiver module is further configured to send a third time synchronization message to the master clock device; the acquiring module is further configured to: when the transceiver module sends the third time synchronization message, acquire the time ⁇ 3 sent by the third synchronization message by using the radio frequency;
  • the transceiver module is further configured to receive a fourth time synchronization message sent by the master clock device, and obtain a timestamp of ⁇ 4 carried in the fourth time synchronization message, where the ⁇ 4 is the air interface physics of the master clock device. a time when the third time synchronization message is received on the layer; the processing module is configured to calculate the slave according to 1 ⁇ , ⁇ 2 , ⁇ 3 and ⁇ 4 acquired by the acquiring module The clock offset of the clock device from the above-mentioned master clock device;
  • a correction module configured to correct the local clock of the slave clock device according to the clock offset calculated by the processing module.
  • a time synchronization system including:
  • a master clock device configured to send a first time synchronization message to the slave clock device, and obtain a second time synchronization message sent to the slave clock device by using the time when the first time synchronization message is sent by using the radio frequency, and in the second time synchronization message Carrying the timestamp of the above 1 ⁇ ; receiving the third time synchronization message sent by the slave clock device, and acquiring the time ⁇ 4 when the air interface physical layer receives the third time synchronization message; sending the fourth time to the slave clock device Synchronizing the message, and carrying the time stamp of the above ⁇ 4 in the fourth time synchronization message;
  • the slave clock device is configured to receive the first time synchronization message sent by the master clock device, and obtain the time ⁇ 2 when the air interface physical layer receives the first time synchronization message, and receive the second time synchronization message sent by the master clock device. And obtaining the timestamp of the time 1 ⁇ carried in the second time synchronization message, where 1 ⁇ is the time when the primary clock device sends the first time synchronization message by using the radio frequency; and sending the third time synchronization message to the primary clock device.
  • ⁇ 4 is a time when the master clock device receives the third time synchronization message on the air interface physical layer; and calculates a clock offset between the slave clock device and the master clock device according to the above ⁇ , ⁇ 2 , ⁇ 3 and ⁇ 4 Correction of the local clock of the above slave clock device based on the calculated clock offset.
  • the embodiments of the present invention have the following advantages:
  • the master-slave clock device acquires the time when the time synchronization message is sent by the radio frequency (RF, Rad io Frequency) and the time when the physical layer of the air interface receives the time synchronization message, as the time of sending and receiving the time synchronization message, thereby
  • the influence of the delay and jitter of the processing such as physical layer modulation and demodulation on the accuracy of acquiring the time of sending and receiving the time synchronization message can be eliminated, and the accuracy of the time of sending and receiving the time synchronization message is improved, and the acquisition is utilized.
  • the higher accuracy of the time synchronization message transmission and reception time information, the time synchronization of the master-slave clock device can improve the time synchronization accuracy of the master-slave clock device.
  • DRAWINGS 1 is a schematic flow chart of a time synchronization method in the prior art
  • FIG. 2 is a schematic flowchart of another embodiment of a time synchronization method according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of another embodiment of a time synchronization method according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a time-frequency structure of a 0.5 millisecond time slot in an LTE system according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of a manner of acquiring a time for sending or receiving a time synchronization message by using scheduling information or time-frequency resource information according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of another manner of obtaining, by using scheduling information or time-frequency resource information, a time for transmitting or receiving a time synchronization message according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of another manner of obtaining, by using scheduling information or time-frequency resource information, a time for transmitting or receiving a time synchronization message according to an embodiment of the present disclosure
  • FIG. 5-a is a schematic flow chart of another embodiment of a time synchronization method according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of a hardware recording manner according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic diagram of another hardware recording manner according to an embodiment of the present disclosure.
  • FIG. 5-d is a schematic diagram of another hardware recording manner according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of a master clock device according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic structural diagram of a slave clock device according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of a time synchronization system according to an embodiment of the present invention. detailed description
  • Embodiments of the present invention provide a time synchronization method and related device and system for improving time synchronization accuracy of a master-slave clock device.
  • the basic principle of realizing time synchronization between devices is to set a system default in the communication system. It is a master clock device, and other devices are slave clock devices.
  • a time synchronization message carrying a time stamp (including a time synchronization message, a PTP message following a message, and a delayed response message) is transmitted between the master clock device and the slave clock device, and the time information described by the clock device through the time stamp.
  • the specific process of time synchronization between the master and slave clock devices can be:
  • the master clock device sends time synchronization to the slave clock device, and measures the exact time when the Sync message leaves the application layer.
  • the master clock device sends a follow message to the Follow_up message after sending the Sync message, and carries the timestamp in the Follow_up message;
  • the master clock device to the slave clock device transmits a response packet delay Delay_Resp, 4 and carry the time stamp t Delay_Resp message, acquires a time stamp of t 4 the slave clock device by receiving the packet Delay_Resp;
  • the slave clock device calculates the clock offset from the master clock device according to the above t l t 2 , t 3 and t 4 , and corrects the local clock according to the result of the final calculation, thereby implementing the master-slave clock device. Time synchronization.
  • the time synchronization message sent by the application layer of the sender needs to be processed by the physical layer after being modulated, and then transmitted through the RF through the physical layer air interface.
  • the receiving end (slave device or master clock device) receives the time synchronization message from the physical layer air interface, it also needs to go to the application layer after the physical layer undergoes demodulation and the like.
  • the processing and demodulation of the physical layer will bring a certain delay and jitter to the transmission of the time synchronization cancellation.
  • the delay and jitter are related to the speed of the baseband processing, and The difference in the downlink mechanism may lead to the asymmetry of the uplink and downlink processing delay.
  • the sending end usually takes the time when the time synchronization message leaves its application layer as the sending time of the time synchronization message, and the receiving end usually takes the time synchronization message to reach the application layer.
  • the delay of the time synchronization message transmission or reception and the asymmetry of the jitter caused by the adjustment and demodulation processing of the physical layer of the master-slave clock device will greatly affect the main Time synchronization accuracy from the clock device.
  • the time synchronization method in the embodiment of the present invention may include: the primary clock device sends a first time synchronization message to the slave clock device, and acquires a time when the first time synchronization message is sent by the RF.
  • the master clock device sends the message to the slave clock device. a time synchronization message, and carrying a timestamp of 1 ⁇ in the second time synchronization message;
  • the master clock device receives the third time synchronization message sent by the slave clock device, and acquires the third time synchronization received by the air interface physical layer
  • the master clock device sends a fourth time synchronization message to the slave clock device, and carries a time stamp of ⁇ 4 in the fourth time synchronization message.
  • the master clock device sends a first time synchronization message to the slave clock device.
  • the default primary clock device When time synchronization is required, the default primary clock device periodically sends a unique first time synchronization message in the form of multicast according to a preset interval (default is 2 seconds), such as a time synchronization message.
  • a preset interval default is 2 seconds
  • Sync all in the default primary clock device network segment, and the slave clock device with the same domain as the primary clock device can receive the above first time synchronization message.
  • the embodiment of the present invention only describes the interaction between a slave clock device and the master clock device. It can be understood that the interaction process between the other slave clock device and the master clock device may refer to the embodiment of the present invention. description.
  • the master clock device acquires a time when the first time synchronization message is sent through the RF.
  • the first time synchronization message sent by the master clock device needs to be processed by the physical layer, such as modulation and demodulation, and then transmitted through the RF. Therefore, the physical layer modulation and demodulation process may bring a certain time to the first time synchronization message.
  • the delay and jitter therefore, the master clock device can realize the processing of the physical layer modulation and demodulation by acquiring the time when the first time synchronization message is sent through the RF.
  • the compensation of the delay increases the accuracy of obtaining the transmission timing of the first time synchronization message.
  • the master clock device may obtain the time 1 ⁇ sent by the first time synchronization message according to the scheduling information of the first time synchronization message (the scheduling information is usually generated by the medium access control layer). Specifically, the master clock device may obtain, according to the scheduling information of the first time synchronization message, a corresponding time slot sent by the first time synchronization message through the RF, and calculate, according to the local clock and the time slot, send any one of the symbols in the time slot.
  • the scheduling information is usually generated by the medium access control layer.
  • the master clock device may obtain, according to the scheduling information of the first time synchronization message, a corresponding time slot sent by the first time synchronization message through the RF, and calculate, according to the local clock and the time slot, send any one of the symbols in the time slot.
  • the end time of transmitting the last symbol in the time slot can be calculated according to the local clock and the time slot, and The time when the first time synchronization message is sent by the radio frequency, or the start time of transmitting the last symbol in the time slot is calculated according to the local clock and the time slot, and is used as the time when the first time synchronization message is sent through the radio frequency or The time at which the first symbol in the time slot is transmitted is calculated according to the local clock and the time slot, and the time when the first time synchronization message is sent as a first time synchronization message is not limited herein.
  • the time 1 ⁇ sent by the first time synchronization message through the RF may also be obtained by means of hardware (such as a radio device or other hardware device).
  • hardware such as a radio device or other hardware device.
  • the transmitting end and the receiving end can be executed according to a unified hardware recording mechanism, thereby ensuring time synchronization precision of the master-slave time device. For example, in the interaction process of the time synchronization message between the master and slave clock devices, if the master clock device (or the slave clock device) acting as the transmitting end records the time synchronization message through the hardware, the end time of the last symbol in the time slot sent by the RF is recorded.
  • the slave clock device (or the master clock device) as the receiving end receives the time synchronization by the hardware physical layer of the air interface when receiving the time synchronization message.
  • the start time of the first symbol in the time slot of the message is recorded as the time when the air interface physical layer receives the time synchronization message; if the master clock device (or the slave clock device) serving as the transmitting end passes hardware (such as a radio frequency device) Or other hardware device) sends a time synchronization message via RF
  • the start time of the last symbol in the slot is recorded as the time synchronization cancellation, the packet, the time sent by the RF, and correspondingly, the slave clock device (or master clock device) as the receiving end receives the time synchronization message.
  • the start time of the second symbol in the time slot of the time synchronization message received by the physical layer of the air interface is recorded by the hardware, and is received as the air interface physical layer.
  • the time of the time synchronization message if the master clock device (or the slave clock device) as the transmitting end records the time synchronization message through the hardware, the start time of the first symbol in the time slot sent by the RF is recorded as the time
  • the corresponding slave clock device (or master clock device) receives the time synchronization message, and receives the air interface physical layer in the time slot of the time synchronization message through hardware.
  • the start time of the first symbol is recorded as the time when the air interface physical layer receives the time synchronization message, and so on.
  • the mechanism for recording the time of sending and receiving the time synchronization message by using the hardware may set the master and slave clock devices before performing the time synchronization operation, which is not limited herein.
  • the master clock device sends a second time synchronization message to the slave clock device, and carries a timestamp of 1 ⁇ in the second time synchronization message.
  • the master clock device After transmitting the first time synchronization message, the master clock device sends a second time synchronization message carrying a time stamp of 1 ⁇ to the slave clock device, such as a follow message Follow_up, so that the slave clock device knows that the master clock device passes
  • the clock device can obtain the time when the air interface physical layer receives the second time synchronization message when receiving the second time synchronization message.
  • the master clock device receives the third time synchronization message sent by the slave clock device, and acquires a time T 4 when the air interface physical layer receives the third time synchronization message.
  • the time synchronization process needs to measure the transmission delay of the time synchronization message between the master and slave clock devices.
  • the slave clock device sends the third time synchronization message to the master clock device irregularly, such as may be delayed.
  • the request message Delay_Req the default value of the interval time may be a random value between 4 and 60 seconds.
  • the slave clock device may acquire the time T sent by the third time synchronization message through the RF. 3 .
  • the time ⁇ 4 at which the air interface physical layer receives the third time synchronization message is obtained to implement compensation for the processing delay of the physical layer modulation and demodulation.
  • the master clock device when receiving the third time synchronization message, may be configured according to scheduling information of the third time synchronization message (the scheduling information may be generated by the master clock device or by the slave clock device, for example, if the master clock device For the macro base station, the slave clock device is a micro base station or a user equipment, etc., the scheduling information may be generated by the master clock device, and vice versa, may be generated by the slave clock device. And obtaining a time T 4 when the air interface physical layer receives the third time synchronization message. Specifically, the master clock device may obtain, according to the scheduling information of the third time synchronization message, the corresponding time slot of the air interface physical layer to receive the third time synchronization message.
  • a start or end time of the physical layer received by the air interface physical layer as the time ⁇ 4 of receiving the third time synchronization message by the air interface physical layer.
  • the start time of the first symbol in the time slot received by the physical layer of the air interface can be calculated according to the local clock and the time slot, and the time ⁇ 4 of the third time synchronization message is received as the air interface physical layer.
  • the start time of the second symbol in the time slot received by the physical layer of the air interface is calculated according to the local clock and the time slot, and is received as the time ⁇ 4 of the third time synchronization message by the physical layer of the air interface. This is not a limitation.
  • the master clock device may also acquire the time when the air interface physical layer receives the third time synchronization message by using hardware recording.
  • the master clock time synchronization device sends a fourth message to the slave clock device, and to carry a timestamp ⁇ 4 in the fourth time synchronization message.
  • the master clock device may send a fourth time synchronization message carrying the timestamp of ⁇ 4 to the slave clock device, such as a delayed response message. Resp, so that the slave clock device knows the time T 4 at which the master clock device receives the third time synchronization message at the air interface physical layer.
  • the master clock is received from the device may be extended clock device sends a message (e.g., packets may follow Fol low_up) after the fourth time from the transmitting apparatus to carry a timestamp clock synchronization message to T 4, as can be delayed
  • the slave clock device learns the time T 4 at which the master clock device receives the third time synchronization message at the air interface physical layer.
  • the foregoing extended message is a message extended from the clock device by extending the 1588v2 protocol, and is sent to the primary clock device after the third time synchronization message is sent, and may carry the slave clock device in the added message.
  • the slave clock device may also not send the above extended message to the master clock device.
  • a time synchronization message interaction process is completed between the master and slave clock devices, and the slave clock device can be based on the clock.
  • the four time information obtained during the synchronization message interaction process is calculated correspondingly, and the local clock can be corrected according to the calculation result, and the slave clock device can also perform the time synchronization message interaction process between the master and slave clock devices.
  • the plurality of calculation results obtained by the calculation are averaged, and the local clock is corrected according to the average value, thereby realizing time synchronization between the master and slave clock devices.
  • time synchronization method described in this embodiment can be applied to various communication systems, such as a Long Term Evolution (LTE) communication system, a Universal Mobile Telecommunications System (UMTS), and a broadband.
  • LTE Long Term Evolution
  • UMTS Universal Mobile Telecommunications System
  • WCDMA Wideband Code Division Multiple Access
  • WIMAX Worldwide Interoperability for Microwave Access
  • GSM Global System for Mobile
  • the master clock device and the slave clock device may be base stations or other devices having wireless links.
  • the master clock device obtains the time when the first time synchronization message is sent by the RF and the time when the air interface physical layer receives the third time synchronization message, and passes the timestamps of the two times respectively through the second time.
  • the synchronization message and the fourth time synchronization message are sent to the slave clock device, so that the slave clock device can know that the master clock device sends the first time synchronization message through the RF and the third time synchronization message is received at the air interface physical layer, which is correspondingly improved.
  • the clock device subsequently calculates the accuracy of the clock offset from the master clock device, and uses a more accurate calculation result to correct the local clock of the slave clock device, thereby improving the time synchronization accuracy of the master-slave clock device.
  • the time synchronization method in the embodiment of the present invention will be described below from the perspective of a clock device.
  • Another embodiment of the time synchronization method in the embodiment of the present invention includes: receiving a first time synchronization message sent by the master clock device from the clock device, and acquiring a time T 2 at which the air interface physical layer receives the first time synchronization message; a second time synchronization message sent by the master clock device, and acquiring a timestamp of the time 1 ⁇ carried in the second time synchronization message, where the time 1@ the primary clock device sends the first time synchronization message through the RF Sending a third time synchronization message to the master clock device, and acquiring the time ⁇ 3 sent by the third time synchronization message through the RF;
  • the clock device receives the fourth time synchronization message sent by the master clock device, and acquires a timestamp of the time ⁇ 4 carried in the fourth time synchronization message, where the ⁇ 4 is received by the master clock device on the physical layer of the air interface.
  • the time of the third time synchronization message; the clock offset from the master clock device is calculated according to the above
  • the specific steps may include:
  • the default primary clock device When time synchronization is required, the default primary clock device periodically sends a unique first time synchronization message in the form of multicast according to a preset interval (default is 2 seconds), such as a time synchronization message.
  • a preset interval default is 2 seconds
  • Sync all in the default primary clock device network segment, and the slave clock device with the same domain as the primary clock device can receive the above first time synchronization message.
  • the time T 2 at which the air interface physical layer receives the first time synchronization message is obtained, so as to implement compensation for the processing delay of the physical layer modulation and demodulation.
  • the scheduling information of the first time synchronization message may be generated according to the scheduling information of the first time synchronization device (the scheduling information may be generated by the master clock device, or may be generated by the slave clock device, for example, if the master clock device is a macro base station, from the clock device is a micro base station or a user equipment, the scheduling information by the master clock device generates, on the contrary, by the slave clock device generates), obtaining air interface physical layer receiving the first time synchronization message time ⁇ 2 Specifically, the slave clock device may obtain, according to the scheduling information of the first time synchronization message, a corresponding time slot in which the air interface physical layer receives the first time synchronization message, and calculate, according to the local clock and the time slot, the physical layer of the air interface receives the foregoing time.
  • the start or end time of any one of the slots is received as the time ⁇ 2 of the first time synchronization message as the air interface physical layer.
  • the physical layer reception of the air interface can be calculated according to the local clock and the time slot.
  • the time of receiving the first time synchronization message ⁇ 2 or calculate the starting time of the air interface physical layer receives the slot of the second symbol and said slots according to the local clock, which is received as a physical layer air interface
  • the time ⁇ 2 of the first time synchronization message is not limited herein.
  • the apparatus when the apparatus is received from the clock synchronization message to said first time, may acquire the physical layer air interface receiving the first time synchronization message by time T 2 records the hardware embodiment.
  • the hardware such as a radio frequency device or other hardware device
  • the transmitting end and the receiving end can be executed according to a unified hardware recording mechanism.
  • the master-slave clock device Assuring the time synchronization accuracy of the master-slave time device, for example, when the master-slave clock device performs the time synchronization message interaction, if the master clock device (or the slave clock device) acting as the sender transmits the time synchronization message through the RF through the hardware The end time of the last symbol in the slot is recorded as the time when the time synchronization message is sent by the RF, and accordingly, the slave clock device (or the master clock device) as the receiving end passes the time synchronization message when receiving the time synchronization message.
  • the hardware records the start time of the first symbol in the time slot in which the air interface physical layer receives the time synchronization message, and records the time when the air interface physical layer receives the time synchronization message; if it is the master clock device of the transmitting end ( Or from the clock device) through the hardware to send time synchronization messages through the RF
  • the start time of the last symbol in the outgoing time slot is recorded as the time when the time synchronization message is sent by the RF, and accordingly, the slave clock device (or master clock device) as the receiving end receives the In the time synchronization message, the start time of the second symbol in the time slot in which the air interface physical layer receives the time synchronization message is recorded by the hardware, and is recorded as the time when the air interface physical layer receives the time synchronization message;
  • the master clock device (or the slave clock device) as the transmitting end records the time synchronization message through the hardware at the start time of the first symbol in the time slot sent by the RF as the time when the time synchronization message is
  • the mechanism for recording the time of the transmission and the reception of the time synchronization by the hardware may set the master-slave clock device before the time synchronization operation is performed, which is not limited herein.
  • the slave device receives the second time synchronization message sent by the master clock device, such as the following message Follow_up, and obtains the time stamp of 1 ⁇ carried in the second time synchronization message, so that Perform subsequent calculations.
  • 1 ⁇ is the time when the above-mentioned master clock device sends the first time synchronization message through the RF.
  • the slave clock device sends a third time synchronization message to the master clock device.
  • the third slave clock device acquiring the time synchronization message sent by the RF time T 3;
  • the time synchronization process needs to measure the transmission delay of the time synchronization message between the master and the slave device.
  • the slave clock device sends the third time synchronization message to the master clock device irregularly, such as delay.
  • the request message Delay_Req has an interval value default value of a random value between 4 and 60 seconds.
  • the modulation and demodulation processing of the physical layer may bring a certain time to the transmission of the third time synchronization message. Delay and jitter. Therefore, the time delay of processing the physical layer modulation and demodulation can be compensated by the clock device by acquiring the time when the third time synchronization message is sent through the RF, thereby improving the transmission time of acquiring the third time synchronization message. The accuracy.
  • the slave clock device may perform scheduling information according to the third time synchronization message (the scheduling information may be generated by the master clock device or may be generated by the slave clock device, for example, if the master clock device is a macro base station, the slave clock device is a micro base station or a user equipment, the scheduling information generated by the master clock device, and vice versa, may be generated from the clock device), the third time acquisition time synchronization message sent by RF T 3, in particular, from the clock apparatus according to And scheduling information of the third time synchronization message, acquiring a corresponding time slot sent by the third time synchronization message through the RF, calculating, according to the local clock and the time slot, a start or end time of sending any one of the time slots, and As the time ⁇ 3 sent by the third time synchronization message through the RF, for example, the end time of transmitting the last symbol in the time slot may be calculated according to the local clock and the time slot, and used as the third time synchronization message.
  • the scheduling information may be generated by the master clock device
  • the time the RF emission ⁇ 3 by the time the RF emission ⁇ 3, or calculated according to the local clock and said transmission time slot the Starting time of the last symbol of the slot, by the time the RF emission as a third time synchronization message ⁇ 3, or from the local clock and the calculated according to the above-described first symbol transmission time slot the slot At the beginning time, it is used as the time ⁇ 3 sent by the third time synchronization message through the RF, which is not limited herein.
  • the time ⁇ 3 sent by the third time synchronization message through the RF may also be obtained by means of hardware recording. Refer to step 301 for the specific manner of hardware recording. The description in the description will not be repeated here.
  • the slave clock device may send a new message to the master clock device, such as a follow-up report, by extending the 1588 ⁇ 2 protocol after acquiring the third time synchronization message through the time T 3 sent by the RF.
  • Wen Fol low_up, and carry timestamp T 3 in the new message to the master device can know the above-described clock time synchronization message sent from the third apparatus through the RF clock time ⁇ 3.
  • the slave clock device may not send the above-mentioned new message to the master clock device, which is not limited herein.
  • a fourth clock device by receiving the time synchronization message transmitted by the master clock device, for example, may be a Delay_Resp delay response packet, acquires a time stamp of the synchronization message carried in a fourth time T 4 of the, for the subsequent calculations.
  • ⁇ 4 is the time when the master clock device receives the third time synchronization message at the air interface physical layer.
  • the slave clock device calculates a clock offset from the master clock device according to the obtained ⁇ 2 , ⁇ 3, and ⁇ 4 ;
  • the message average delay Delay between the master clock device and the master clock device can be calculated according to the following formula, and the clock offset from the master clock device can be calculated accordingly. Offset:
  • T 2 T! + Delay + Offset
  • T 4 T 3 + Delay-Offset
  • Delay ( T 2 - 1 ⁇ +1> T 3 ) 12;
  • the clock device can pass the time synchronization message interaction process between the master and slave clock devices, the values of the multiple Off sets obtained by the calculation are averaged.
  • the slave clock device corrects its local clock according to the calculated result
  • the slave clock device may correct the local clock according to the clock offset Off set, or may perform the clock skew according to the calculation after the time synchronization message interaction process between the master and slave clock devices.
  • the average of the shift Off set is corrected for its local clock to achieve time synchronization with the master clock device.
  • the time synchronization method described in this embodiment can be applied to various communication systems, such as UMTS, WCDMA, WIMAX, GSM, and LTE communication systems.
  • the master clock device and the slave clock device can be base stations or other devices with wireless links.
  • the time of the first time synchronization message sent by the master clock device carried in the two time synchronization messages and the time when the master clock device receives the third time synchronization message at the physical layer of the air interface is obtained.
  • the stamping device can make the slave clock device more accurately calculate the clock offset from the master clock device according to the obtained four time information, and correspondingly improve the accuracy of the slave clock device to correct the local clock according to the calculation result. , thereby improving the time synchronization accuracy of the master-slave clock device.
  • the following is an example of the time when the master-slave clock device obtains the time for transmitting or receiving the time synchronization message through the scheduling information or the time-frequency resource information, as shown in FIG. 4-a.
  • Another embodiment of the time synchronization method in the embodiment of the present invention may specifically include:
  • the master clock device sends a time synchronization message Sync to the slave clock device.
  • the default primary clock device When time synchronization is required, the default primary clock device periodically sends a unique Sync packet in multicast according to the preset interval (default is 2 seconds), and all are in the default primary clock device network. Within the segment, and the same slave clock device as the master clock device can receive the Sync message.
  • the master clock device obtains the time when the Sync message is sent through the RF according to the scheduling information of the Sync message.
  • the master clock device can obtain the corresponding time slot sent by the Sync message through the RF according to the scheduling information of the Sync message, and calculate the last symbol in the time slot according to the local clock and the time slot. At the end time, it is used as the Sync message at the time 1 ⁇ sent by the RF, or the start time of the last symbol in the time slot is calculated according to the local clock and the above time slot, and is used as the Sync message through the RF.
  • the time of time 1 ⁇ is sent, or, according to the local clock and the above time slot, the starting time of transmitting the first symbol in the time slot is calculated, and The time T ⁇ sent by the Sync message through the RF, or the start or end time of sending other symbols in the time slot according to the local clock and the above time slot, and sent as a Sync message through the RF.
  • Time 1 ⁇ not limited here.
  • the above time slot may be a time slot corresponding to one radio frame or subframe.
  • the slave clock device obtains the time slot of the physical layer receiving the Sync according to the scheduling information of the Sync message, and calculates the first one of the time slots received by the physical layer of the air interface according to the local clock and the time slot.
  • the start time of the symbol is received as the time T 2 of the Sync message as the air interface physical layer, or the start of the second symbol in the time slot received by the physical layer of the air interface is calculated according to the local clock and the time slot.
  • it is received as the time T 2 of the Sync message as the air interface physical layer, or the start or end time of the other symbols in the time slot received by the physical layer of the air interface may be calculated according to the local clock and the time slot.
  • the time T 2 at which the Sync message is received as the air interface physical layer is not limited herein.
  • the time slot may be a time slot corresponding to one radio frame or a subframe.
  • the master clock device passes the timestamp of T ⁇ to the slave clock device by following the message Fo 11 ow-up;
  • the master clock device After transmitting the Sync message, the master clock device sends a Fol low_up message carrying the time stamp of 1 ⁇ to the slave clock device, so that the slave clock device knows the time 1 ⁇ at which the master clock device sends the Sync message through the RF.
  • the time synchronization process needs to measure the transmission delay of the time synchronization message between the master and the slave device.
  • the slave clock device sends the De l ay-Req ⁇ message to the master clock device irregularly.
  • the interval defaults to a random value between 4 and 60 seconds.
  • the slave clock device obtains, according to the scheduling information of the Delay-Req packet, the time slot sent by the Delay-Red 4 message through the RF, and calculates and sends the time slot according to the local clock and the time slot.
  • the end of the last symbol use it as De lay-Red
  • the time ⁇ 3 is sent, or the start time of transmitting the last symbol in the time slot is calculated according to the local clock and the time slot, and is used as the time T 3 sent by the Delay-Req message through the RF, or Calculating, according to the local clock and the foregoing time slot, the starting time of transmitting the first symbol in the time slot, and using it as the time when the Delay-Req message is sent by the RF ⁇ 3 , or according to the local clock and the foregoing
  • the time slot is used to calculate the start or end time of the other symbols in the time slot, and is used as the time T 3 sent by the Delay-Req message through the RF, which is not limited herein.
  • the master clock device receives the Delay-Req packet sent by the slave clock device, and obtains a time T 4 when the air interface physical layer receives the De lay-Req ⁇ message according to the scheduling information of the Delay-Red message. ;
  • the master clock device obtains the time slot of the Delay-Req packet received by the physical layer of the air interface according to the scheduling information of the Delay-Req packet, and calculates the physical layer of the air interface according to the local clock and the time slot.
  • the start time of the first symbol in the time slot is received as the air interface physical layer at time T 4 of the Delay-Req message, or the physical layer of the air interface is received according to the local clock and the time slot.
  • the start time of the second symbol in the time slot is received as the air interface physical layer at time T 4 of the Delay-Red frame, or the physical layer reception of the air interface may be calculated according to the local clock and the time slot.
  • the time T 4 of the Delay-Req message is received as the air interface physical layer at the start or end time of the other symbols in the time slot, which is not limited herein.
  • the slave clock device passes the timestamp of 1 ⁇ to the master clock device by following the message Fol low_up;
  • Slave clock device after transmitting the message De lay-Red, by extending-1588v2, to the new master clock device sends timestamp carrying Fol low_u T P of packet 3, so that the master clock device can be known from the above-described clock
  • the device sends the time T 3 of the above Delay-Red message through the RF.
  • the master clock device After receiving the Fol low_up message sent by the slave clock device, the master clock device sends a De 1 ay-Re s ⁇ message carrying the time stamp of T 4 to the slave clock device, so that the slave clock device learns the master clock device.
  • the time T 4 of the above Delay-Red message is received at the air interface physical layer.
  • the slave clock device calculates a clock offset from the master clock device according to the obtained ⁇ , ⁇ 2 , ⁇ , and ⁇ 4 ; After acquiring the ⁇ 2 , ⁇ 3 and ⁇ 4 from the clock device, the average delay of the message between the master clock device and the master clock device can be calculated according to the following formula, and the clock offset from the master clock device can be calculated accordingly. Offset:
  • T 2 T! + Delay + Offset
  • T 4 T 3 + Delay-Offset
  • Delay ( T 2 - 1 ⁇ +1> T 3 ) 12;
  • the clock device can pass the time synchronization message interaction process between the master and slave clock devices, the multiple Of f sets obtained by calculation are averaged.
  • the slave clock device corrects its local clock according to the calculated result
  • the slave clock device can correct the local clock according to the clock offset Off set, or after calculating the time synchronization message interaction process between the master and slave clock devices.
  • the average of the offset Off set is corrected for its local clock to achieve time synchronization with the master clock device.
  • a sub-frame defined in the LTE system includes two time slots, each of which is 0. 5, for example, in the LTE system, by using the scheduling information to obtain the time of sending or receiving the time synchronization message.
  • the time slot of milliseconds includes 6 or 7 Orthogonal Frequency Division Multiplexing (OFDM) symbols, as shown in Figure 4b, and Figure 4-b shows the LTE system.
  • OFDM Orthogonal Frequency Division Multiplexing
  • the data to be transmitted after the baseband processing is carried by the 0F picture symbol, at the beginning of each symbol (such as ⁇ , t 2 , t 3 , t 4 , t 5 , t 6 and t 7 in Figure 4_b ) Transmitted by RF, correspondingly, the receiving end correspondingly receives the above-mentioned 0F drawing symbol.
  • the present invention provides three optional ways to obtain the time synchronization message transmission or reception time through the scheduling information, and the three methods provided may be better.
  • the symmetry of the time that the guaranteed time synchronization message is transmitted back and forth between the master and slave clock devices ensures the time synchronization accuracy of the master-slave time device.
  • a manner of obtaining a time for transmitting or receiving a time synchronization message by using scheduling information is provided in the embodiment of the present invention.
  • the specific implementation manner is as follows:
  • the transmission time is the same.
  • a step message such as a Sync message or a De 1 ay.Req message
  • the time slot of the subframe that carries the time synchronization message sent by the RF may be obtained according to the scheduling information of the time synchronization message, according to the local clock and the foregoing
  • the time slot calculates the end time ⁇ and ⁇ of the last symbol in the time slot, and uses ⁇ and as the time when the time synchronization message is sent through the RF, correspondingly as the clock device of the receiving end (such as the slave clock device or the master clock)
  • the device when receiving the time synchronization message, obtains a time slot of the subframe in which the air interface physical layer receives the time synchronization message according to the scheduling information of the time synchronization message, and calculates the physical layer of the air interface according to the local clock and the time slot.
  • the time synchronization message is The delays delay and de lay' in the transmission line are symmetrical, and because the acquisition is the end time of the last symbol in the time slot of the time synchronization message sent by RF and the physical interface of the air interface Receiving the start time of the first symbol in the time slot of the time synchronization message, so that the time of the transmission or reception of the subframe by the master-slave clock device due to the unsynchronization of the frequency between the master and slave clock devices can be eliminated, so With this acquisition method, the sending time and receiving time of the time synchronization message can be obtained more accurately.
  • FIG. 4-d Another manner for obtaining a time for transmitting or receiving a time synchronization message by using scheduling information is also provided in the embodiment of the present invention. For details, refer to FIG. 4-d.
  • the specific manner is as follows:
  • the scheduling information of the time synchronization message may be obtained through the RF.
  • the transmitted time slot of the subframe carrying the time synchronization message calculates the starting times t a2 and t of the last symbol in the time slot according to the local clock and the time slot. 2 , will t a2 and t.
  • the clock device as the receiving end when receiving the time synchronization message, obtains according to the scheduling information of the time synchronization message.
  • the air interface physical layer receives the time slot of the subframe that carries the time synchronization message, and calculates, according to the local clock and the time slot, the start times t b2 and t d2 of the second symbol in the time slot received by the air interface physical layer, t b2 and t d2 are the moments when the air interface physical layer receives the time synchronization message.
  • the delays of the time synchronization message during transmission are desymmetrical and de lay', and t a2 and t d2 Symmetric, t b2 and t. 2 symmetry, the acquisition time and the receiving time of the time synchronization message can also be accurately recorded by this acquisition method.
  • Another embodiment of the present invention further provides that the sending or receiving time is the same through scheduling information.
  • the way to step the message please refer to Figure 4-e in the following way:
  • the scheduling information of the time synchronization message may be obtained through the RF.
  • the transmitted time slot of the subframe carrying the time synchronization message calculates the starting times t a3 and t of the first symbol in the time slot according to the local clock and the time slot. 3 , will t a3 and t.
  • the clock device as the receiving end (such as the slave clock device or the master clock device), when receiving the time synchronization message, obtains according to the scheduling information of the time synchronization message.
  • the air interface physical layer receives the time slot of the subframe that carries the time synchronization message, and calculates, according to the local clock and the time slot, the start times t b3 and t d3 of the first symbol in the time slot received by the air interface physical layer, t b3 and t d3 are the moments when the air interface physical layer receives the time synchronization message.
  • the delays of the time synchronization message during transmission are desymmetrical and de yy', so In the same way, the sending time and the receiving time of the time synchronization message can be obtained more accurately.
  • the time when the time synchronization message is obtained by the scheduling information and the time when the air interface physical layer receives the time synchronization message the compensation for the processing delay of the physical layer modulation and demodulation is realized, thereby eliminating The effect of obtaining the accuracy of the transmission and reception time of the time synchronization message due to the delay and jitter of the processing such as the physical layer modulation and demodulation, and improving the accuracy of the time of transmitting and receiving the time synchronization message.
  • the obtained transmission and reception time information of the higher-precision time synchronization message is time-synchronized by the master-slave clock device, and the time synchronization accuracy of the master-slave clock device can be improved accordingly.
  • time synchronization method described in the embodiment of the present invention is described in detail by taking the time when the master-slave clock device acquires the time synchronization message at the physical layer of the air interface by means of hardware recording. description.
  • another embodiment of the time synchronization method in the embodiment of the present invention may specifically include:
  • the master clock device sends a time synchronization message Sync to the slave clock device;
  • the default primary clock device When time synchronization is required, the default primary clock device periodically sends a unique Sync packet in multicast according to the preset interval (default is 2 seconds), and all are in the default primary clock device network. Within the segment, and the same slave clock device as the master clock device Received a Sync message.
  • the master clock device records the time when the Sync message is sent through the RF through the hardware 1 ⁇ ;
  • the Sync message can be recorded by the hardware (such as a radio device or other hardware device) through the end time of the last symbol in the time slot sent by the RF, and sent as a Sync message through the RF.
  • the Sync message is recorded by the start time of the last symbol in the time slot sent by the RF, and is recorded as the Sync message by the start time of the symbol, as Sync.
  • the time when the text is sent by the RF, or the Sync/ ⁇ text can be recorded by the hardware through the start or end time of other symbols in the time slot sent by the RF, as the time when the Sync message is sent through the RF.
  • the time slot may be a time slot corresponding to one radio frame or subframe.
  • the clock device may record the start time of the first symbol in the time slot of the Sync message received by the physical layer of the air interface, as the time when the physical layer of the air interface receives the Sync message.
  • the start time of the second symbol in the slot of the Sync packet received by the physical layer of the air interface is recorded by the hardware, as the time when the physical layer of the air interface receives the Sync message, or the physical layer of the air interface may be used by hardware.
  • the start or end time of the other symbol in the slot in which the Sync packet is received is recorded as the time at which the Sync packet is received by the physical layer of the air interface, which is not limited herein.
  • the master clock device passes the timestamp of T ⁇ to the slave clock device by following the message Fo 1 1 ow-up;
  • the master clock device After transmitting the Sync message, the master clock device sends a Fo l low_up message carrying the time stamp of 1 ⁇ to the slave clock device, so that the slave clock device knows the time 1 when the master clock device sends the Sync message through the RF. .
  • the slave clock device sends a delay request message De 1 ay - Re d to the master clock device at time 1 3 ; in order to improve the correction precision, the time synchronization process needs to measure the transmission delay of the time synchronization message between the master and the slave device. At this time, the slave clock device sends the De l ay-Req ⁇ message to the master clock device irregularly.
  • the interval time defaults to a random value between 4 and 60 seconds.
  • the slave device records the time T 3 sent by the Delay-Red message through the hardware through the hardware.
  • the Delay-Req message is sent from the clock device, the De l ay-Req message can be sent through the hardware.
  • the end time of the last symbol in the time slot sent by the RF is recorded as the time when the Delay-Req message is sent by RF, or by the hardware to send the Delay-Red message to the time slot sent by the RF.
  • the start time of the last symbol is recorded as the time when the release is made by the Delay-Req ⁇ text, or the first of the time slots issued by the RF by Delay-Req ⁇ t ⁇ by the hardware.
  • the start time of the symbol is recorded as the time when the Delay-Rec ⁇ message is sent by the RF, or the start of other symbols in the time slot issued by the RF by Delay-Red can also be transmitted by hardware. Recorded at the end time or as the time when the Delay-Req message is sent by RF, it is not limited here.
  • the master clock device can record the start time of the first symbol in the time slot of the physical layer receiving the Delay-Req ⁇ message through the hardware, and receive it as the air interface physical layer.
  • the start time of the second symbol in the time slot of the physical layer receiving the De 1 ay-Req ⁇ text is recorded by the hardware, and the De is received as the physical layer of the air interface.
  • the time of the lay-red packet, or the hardware starts to record the start or end time of other symbols in the time slot of the Delay-Red ⁇ physical layer, and receive the De lay-Req as the air interface physical layer.
  • the time of the message is not limited here.
  • the slave clock device passes the timestamp of 1 ⁇ to the master clock device by following the message Fol low_up;
  • Slave clock device after transmitting the message De lay-Red, by extending-1588v2, to the new master clock device sends timestamp carrying Fol low_u T P of packet 3, so that the master clock device can be known from the above-described clock
  • the device sends the time T 3 of the above Delay-Red message through the RF.
  • the master clock device After receiving the Fol low_up message sent by the slave clock device, the master clock device sends a De 1 ay-Re s ⁇ message carrying the time stamp of T 4 to the slave clock device, so that the slave clock device learns the master clock device.
  • the time T 4 of the above Delay-Red message is received at the air interface physical layer.
  • the slave clock device calculates a clock offset from the master clock device according to the foregoing ⁇ , ⁇ 2 , ⁇ , and ⁇ 4 ;
  • the average delay of the message between the slave clock and the master clock device can be calculated according to the following formula, and the master clock is calculated accordingly.
  • Backup clock offset Offset
  • T 2 T! + Delay + Offset
  • T 4 T 3 + Delay-Offset
  • Delay ( T 2 - 1 ⁇ +1> T 3 ) 12;
  • the slave clock device corrects its local clock according to the calculated result.
  • the slave clock device can correct its local clock according to the clock offset Off set, thereby achieving time synchronization with the master clock device.
  • the clock device can pass the time synchronization message interaction process between the master and slave clock devices, the values of the multiple Off sets obtained by the calculation are averaged.
  • the steps of implementing the time synchronization method of the present invention by other hardware recording mechanisms may refer to the time synchronization method described in the foregoing embodiments, and the specific hardware recording mechanism may set the master-slave clock device when performing the time synchronization operation. This will not be repeated here.
  • the LTE system has a 0. 5ms time slot in the LTE system.
  • the following is a description of the hardware recording mechanism in the hardware recording mode, where the LTE system uses a hardware recording method to obtain a time of sending or receiving a time synchronization message.
  • a time-frequency structure can be as shown in the time-frequency structure shown in Figure 4-b.
  • three optional hardware recording mechanisms are provided in the embodiment of the present invention.
  • the time synchronization message can be better guaranteed in the master-slave The symmetry of the time of transmission between clock devices, thus ensuring the time synchronization accuracy of the master-slave time device.
  • a hardware recording mechanism provided by the present invention can be referred to as FIG. 5-b, and the specific implementation manner is as follows:
  • a clock device of the transmitting end such as a master clock device or a slave clock device
  • a time synchronization message such as a Sync message or When De 1 ay.Req message
  • the time synchronization message is transmitted by hardware through the end times t a4 and t of the last symbol in the time slot issued by the RF. 4 is recorded as the time when the time synchronization message is sent by the RF, and correspondingly, the clock device (such as the slave clock device or the master clock device) as the receiving end receives the time synchronization message through the hardware, and receives the physical layer of the air interface through the hardware.
  • the start times t b4 and t d4 of the first symbol in the time slot of the time synchronization message are recorded as the time when the air interface physical layer receives the time synchronization message.
  • the time synchronization message is The delays delay and de lay' in the transmission line are symmetrical, and because of the hardware Recording is the end time of the last symbol in the time slot of the time synchronization message sent by the RF and the start time of the first symbol in the time slot of the time slot receiving the time synchronization message of the air interface physical layer, so the master slave clock device is eliminated.
  • the time when the master-slave clock device transmits or receives the subframe is not synchronized due to the unsynchronized frequency, and therefore, the hardware recording method can more accurately record the transmission timing and the reception timing of the time synchronization message.
  • FIG. 5-c Another hardware recording mechanism provided by the present invention can be referred to FIG. 5-c in the following manner:
  • a clock device of the transmitting end such as a master clock device or a slave clock device
  • a time synchronization message (such as a Sync message or a De lay) is sent.
  • -Req message the time synchronization message is passed by hardware through the start time ⁇ 5 and t of the last symbol in the time slot issued by the RF.
  • the hardware recording method can also accurately record the sending time and receiving time of the time synchronization message.
  • FIG. 5-d Another hardware recording mechanism provided by the present invention can be referred to FIG. 5-d in the following manner:
  • a clock device of the transmitting end such as a master clock device or a slave clock device
  • a time synchronization message (such as a Sync message or De 1) is sent.
  • the time synchronization message is transmitted by hardware through the start times t a6 and t of the first symbol in the time slot issued by the RF.
  • time synchronization message recorded as the time of the time synchronization message through the RF emission, corresponding, as a clock device receiving end (e.g., the slave clock device, or master clock device), upon receiving the time synchronization message, by a hardware empty physical layer receiving opening
  • the time instants t b6 and t d6 of the first symbol in the time slot of the time synchronization message are recorded as the time at which the air interface physical layer receives the time synchronization message.
  • the time synchronization message is The delays delay and de lay' in the transmission process are symmetrical, and the hardware recording method can also accurately record the sending time and receiving time of the time synchronization message.
  • a master clock device includes:
  • the transceiver module 601 is configured to send a first time synchronization message to the slave clock device, and obtain a time when the first time synchronization message is sent by using the RF
  • the obtaining module 602 is configured to acquire a time when the transceiver module 601 sends the first time synchronization message by using the radio frequency.
  • the obtaining module 602 is specifically configured to obtain, according to the scheduling information of the first time synchronization message, a time when the first time synchronization message is sent by using the RF or a time when the first time synchronization message is sent by the hardware through the RF. ⁇ .
  • the obtaining module 602 can include:
  • the obtaining module 1 is configured to obtain, according to the scheduling information of the first time synchronization message, a corresponding time slot sent by the first time synchronization message by using a radio frequency;
  • the processing module 1 is configured to calculate, according to the time slot acquired by the local clock and the acquiring module, the end time of sending the last symbol in the time slot, as the time when the first time synchronization message is sent by using the radio frequency, or according to the local time.
  • the time slot obtained by the clock and the acquiring module calculates the starting time of transmitting the last symbol in the time slot, and uses it as the time when the first time synchronization message is sent by using the radio frequency or acquired according to the local clock and the acquiring module 1.
  • the time slot calculates the start time of transmitting the first symbol in the above time slot, and uses it as the time 1 ⁇ that the first time synchronization message is sent through the radio frequency.
  • the transceiver module 601 is further configured to send a second time synchronization message to the slave clock device, and carry a timestamp of the T i in the second time synchronization message;
  • the transceiver module 601 is further configured to receive the third time synchronization message sent by the slave clock device, and the acquiring module 602 is further configured to acquire, according to the third time synchronization message received by the transceiver module 601, the air interface physical layer to receive the third time synchronization message.
  • Time T 4 is further configured to acquire, according to the third time synchronization message received by the transceiver module 601, the air interface physical layer to receive the third time synchronization message.
  • the obtaining module 602 is specifically configured to synchronize according to the foregoing third time. Scheduling information message, acquires the air interface physical layer receives the third time synchronization message a time ⁇ 4; or a hardware recording time ⁇ 4 by the air interface physical layer receives the third time synchronization messages.
  • the obtaining module 602 includes:
  • the obtaining module 2 is configured to obtain, according to the scheduling information of the third time synchronization message, a corresponding time slot in which the air interface physical layer receives the third time synchronization message;
  • the processing module 2 is configured to calculate, according to the time slot acquired by the local clock and the acquiring module 2, the start time of the first symbol in the time slot received by the physical layer of the air interface, and receive the same as the primary clock device in the physical layer of the air interface.
  • the device receives the time ⁇ 4 of the third time synchronization message at the air interface physical layer.
  • Transceiver module 601 is further configured to the clock synchronization message from a sending device a fourth time, and carry timestamp Î ⁇ 4 in the fourth time synchronization message; to calculate according to the clock apparatus ⁇ 1 and 4 from the slave clock Î ⁇ The clock offset of the device from the master clock device, and correcting the local clock of the slave clock device according to the calculated clock offset.
  • the transceiver module 601 is further configured to receive the new message sent by the slave clock device by using the extended 1588 ⁇ 2 protocol, such as the following message F1 1 ow.up, and the obtaining module 602 may also be used to obtain The timestamp of ⁇ 3 carried in the above new message.
  • the extended 1588 ⁇ 2 protocol such as the following message F1 1 ow.up
  • the first time synchronization message is, for example, a time synchronization message Sync or other message
  • the second time synchronization message is, for example, a follow-up message Fo 1 1 ow_ up or other message
  • the third time synchronization message is, for example, Deferred request message De lay-Req or other message
  • the fourth time synchronization message is, for example, a delayed response message De lay-Re sp or other message.
  • the master clock device in this embodiment may be used as the master clock device in the foregoing method embodiment, and may be used to implement all the technical solutions in the foregoing method embodiments, and the functions of the respective function modules may be according to the foregoing method embodiments.
  • the functions of the respective function modules may be according to the foregoing method embodiments.
  • the master clock device obtains, by the obtaining module 602, the time when the first time synchronization message is sent by the RF and the time when the air interface physical layer receives the third time synchronization message. And sending, by the transceiver module 601, the timestamps of the two moments to the slave clock device through the second time synchronization message and the fourth time synchronization message, respectively, so that the slave clock device can know that the master clock device sends the first time through the RF. Synchronization message and the moment when the third time synchronization message is received at the physical layer of the air interface, correspondingly improve the accuracy of the clock device to calculate the clock offset from the master clock device, and use the more accurate calculation result to the slave clock device. The local clock is corrected to improve the time synchronization accuracy of the master and slave clock devices.
  • a slave clock device includes:
  • the transceiver module 701 is configured to receive the first time synchronization message sent by the master clock device, and the acquiring module 702 is configured to obtain, according to the first time synchronization message received by the transceiver module 701, the air interface physical layer to receive the first time synchronization message.
  • Time T 2 is configured to obtain, according to the first time synchronization message received by the transceiver module 701, the air interface physical layer to receive the first time synchronization message.
  • the obtaining module 702 is specifically configured to obtain, according to the scheduling information of the first time synchronization message, a time ⁇ 2 when the physical interface of the air interface receives the first time synchronization message; or receive the first physical layer through the hardware recording interface. The time of the synchronization message at a time ⁇ 2 .
  • the obtaining module 702 can include:
  • a first acquiring module configured to acquire, according to the scheduling information of the first time synchronization message, a corresponding time slot of the first physical synchronization message received by the physical layer of the air interface;
  • a first processing module configured to calculate, according to the local clock and the time slot acquired by the first acquiring module, a start time of the first symbol in the time slot received by the physical layer of the air interface, and use the same as the slave clock device in the air interface physical
  • the layer receives the time ⁇ 2 of the first time synchronization message, or calculates the starting time of the second symbol in the time slot received by the physical layer of the air interface according to the local clock and the time slot acquired by the first acquiring module, It is the time ⁇ 2 at which the slave clock device receives the first time synchronization message at the air interface physical layer.
  • the transceiver module 701 is further configured to receive the second time synchronization message sent by the master clock device.
  • the acquiring module 702 is further configured to obtain, by using the second time synchronization message received by the transceiver module 701, the 1 ⁇ a timestamp, where the above 1 ⁇ is a time when the master clock device sends the first time synchronization message by using the RF;
  • the transceiver module 701 is further configured to: after receiving the second time synchronization message, to the master clock The device sends a third time synchronization message;
  • Obtaining module 702 is further configured in accordance with a third time synchronization messages sent by the transceiver module 701, the third acquisition time synchronization message through radio frequency emitted T 3;
  • the obtaining module 702 is specifically configured to obtain, according to the scheduling information of the third time synchronization message, a time ⁇ 3 sent by the third time synchronization message by using the RF, or send a third time synchronization message through the hardware to send the RF through the RF.
  • the moment ⁇ 3 is specifically configured to obtain, according to the scheduling information of the third time synchronization message, a time ⁇ 3 sent by the third time synchronization message by using the RF, or send a third time synchronization message through the hardware to send the RF through the RF.
  • the obtaining module 702 can include:
  • a second acquiring module configured to obtain, according to the scheduling information of the third time synchronization message, a corresponding time slot sent by the third time synchronization message by using a radio frequency
  • a second processing module configured to calculate, according to the local clock and the time slot acquired by the second processing module, an end time of transmitting the last symbol in the time slot, as a time when the third time synchronization message is sent by using the radio frequency ⁇ 3 Or calculating, according to the local clock and the time slot acquired by the second processing module, the start time of transmitting the last symbol in the time slot, as the time ⁇ 3 sent by the third time synchronization message through the radio frequency, or Calculating, according to the local clock and the time slot acquired by the second processing module, the starting time of transmitting the first symbol in the time slot as the time ⁇ 3 sent by the third time synchronization message through the radio frequency.
  • the transceiver module 701 may be further configured to: after the extension of the 1588 ⁇ 2 protocol, send a new message to the master clock device, such as a follow message Follow_up, where the new message carries the slave clock device.
  • the master clock device such as a follow message Follow_up
  • the transceiver module 701 is further configured to receive a fourth time synchronization message sent by the master clock device, where the acquiring module 702 is further configured to acquire a timestamp of the time ⁇ 4 carried in the fourth time synchronization message, where the ⁇ 4 is the foregoing The time at which the master clock device receives the third time synchronization message on the physical layer of the air interface;
  • the processing module 703 is configured to calculate a clock offset from the master clock device according to the foregoing ⁇ 2 , ⁇ 3, and ⁇ 4 ;
  • Delay ( T 2 - 1 ⁇ +1> T 3 ) 12;
  • the correction module 704 is configured to correct the local clock according to the result calculated by the processing module 703.
  • the correction module 704 can correct the local clock according to the clock offset Offset, or after the time synchronization message interaction process between the master and slave clock devices, the processing module 703
  • the values of the plurality of clock offsets Off se t obtained by performing the multiple operations are averaged, and the local clock is corrected based on the average value to achieve time synchronization with the master clock device.
  • the first time synchronization message is, for example, a time synchronization message Sync or other message
  • the second time synchronization message is, for example, a follow-up message Fo 1 1 ow_ up or other message
  • the third time synchronization message is, for example, Deferred request message De lay-Req or other message
  • the fourth time synchronization message is, for example, a delayed response message De lay-Re sp or other message.
  • slave clock device in this embodiment may be used as the slave clock device in the foregoing method embodiment, and may be used to implement all the technical solutions in the foregoing method embodiments, and the functions of the function modules may be according to the foregoing method embodiments.
  • the functions of the function modules may be according to the foregoing method embodiments.
  • the obtaining, by the acquiring device 702, the clock device obtains the time T 2 of the first time synchronization message received by the physical layer of the air interface, and acquires the time L sent by the third synchronization message by using the radio to obtain the second time synchronization message.
  • the clock offset improves the accuracy of the correction of the local clock by the correction module 704 according to the calculation result of the processing module 703, thereby improving the time synchronization accuracy of the master-slave clock device.
  • the embodiment of the present invention further provides a time synchronization system for implementing the time synchronization method described above. A time synchronization system provided by the implementation of the present invention is described below.
  • a time synchronization system includes: Master clock device 801 and slave clock device 802.
  • the master clock device 801 is configured to send the first time synchronization message to the slave clock device 802, and acquire the time 1 ⁇ sent by the first time synchronization message through the RF; send the second time synchronization message to the slave clock device 802, and The second time synchronization message carries a timestamp of 1 ⁇ ; receives the third time synchronization message sent by the slave clock device 802, and acquires the time T 4 at which the air interface physical layer receives the third time synchronization message; to the slave clock device 802 A fourth time synchronization message is sent, and a timestamp of ⁇ 4 is carried in the fourth time synchronization message.
  • the slave clock device 802 is configured to receive the first time synchronization message sent by the master clock device 801, and acquire the time ⁇ 2 when the air interface physical layer receives the first time synchronization message; receive the second time synchronization sent by the master clock device 801. a message, and acquiring a timestamp of the time 1 ⁇ carried in the second time synchronization message, where the above 1 ⁇ is the time when the primary clock device 801 sends the first time synchronization message by using the RF; and sends the first time to the master clock device 801.
  • the structure of the master clock device 801 in this embodiment may be a master clock device as shown in FIG. 6.
  • the structure of the slave clock device 802 in this embodiment can be a slave clock device as shown in FIG.
  • the master clock device 801 of the embodiment may be the master clock device in the foregoing method embodiment
  • the slave clock device 802 may be the slave clock device in the foregoing method embodiment, which may be used to implement the foregoing method embodiment.
  • the functions of the various functional modules may be specifically implemented according to the method in the foregoing method embodiments. For the specific implementation process, refer to the related description in the foregoing embodiments, and details are not described herein again.
  • the time synchronization system acquires the time when the time synchronization message is sent by the RF and the time when the physical layer of the air interface receives the time synchronization message, as the time of sending and receiving the time synchronization message, thereby eliminating the physical physics.
  • the transmission and reception time information of the synchronization message is time-synchronized by the master-slave clock device, and the time synchronization accuracy of the master-slave clock device can be improved accordingly.
  • the medium can be a read only memory, a magnetic disk or a compact disk or the like.

Landscapes

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

Description

时间同步方法和相关 i殳备及系统 本申请要求于 2010 年 10 月 27 日提交中国专利局、 申请号为 201010527699.9、发明名称为"时间同步方法和相关设备及系统"的中国专利 申请的优先权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信领域, 尤其涉及一种时间同步方法和相关设备及系统。 背景技术
目前, 随着通信网络核心网网络协议( IP, Internet Protocol )化改造的 逐步完成, 无线接入网的 IP化将成为整个移动网络向全 IP ( ALL-IP )网络 演进的关键。 而在实现无线接入网 IP化的过程中, 时间同步问题是需要重 点研究并解决的问题。 时间同步指的是不同系统之间的绝对时间是相同的, 如在通信系统中, 每个系统都有内部时间, 即本地时钟, 其由该系统的时 钟设备所管理, 由于每个系统的本地时钟都是独立运行的, 所以各个系统 的本地时钟不一定是相同的, 而在分布式的网络环境之中, 如果没有一个 统一、 准确的时间标准, 那么系统将很难正常的协调各子系统的运行, 时 间同步技术就是将各个不同系统之间的时间偏差控制在特定范围之内的技 术。
为实现网络设备间的时间同步, 网络中引入了美国电气和电子工程师 十办会 ( IEEE, Institute of Electrical and Electronics Engineers ) -1588标准, IEEE-1588定义了精确时间协议( PTP , Precision Time Protocol ) , 以其基于 IEEE-1588 标准实现有线网络中时钟最精确的设备与其它时钟设备的时间 同步。
实践发现, 现有有线网络中主从时钟设备时间同步机制在应用到无线 网络中时, 主从时钟设备之间的时间同步精度通常较低。 发明内容
本发明实施例提供一种时间同步方法和相关设备及系统, 用于提高主 从时钟设备的时间同步精度。
为解决上述技术问题, 本发明实施例提供以下技术方案:
一种时间同步方法, 包括:
主时钟设备向从时钟设备发送第一时间同步消息, 并获取上述第一时 间同步消息通过射频发出的时刻
主时钟设备向上述从时钟设备发送第二时间同步消息, 并在上述第二 时间同步消息中携带上述 1\的时间戳;
主时钟设备接收由上述从时钟设备发送的第三时间同步消息, 并获取 空口物理层接收到上述第三时间同步消息的时刻 τ4;
主时钟设备向上述从时钟设备发送第四时间同步消息, 并在上述第四 时间同步消息中携带上述 Τ4的时间戳, 以便于上述从时钟设备根据上述 1\ 和 τ4计算上述从时钟设备与上述主时钟设备的时钟偏移量, 并根据计算的 上述时钟偏移量, 对上述从时钟设备的本地时钟进行修正。
一种时间同步方法, 包括:
从时钟设备接收由主时钟设备发送的第一时间同步消息, 并获取空口 物理层接收到上述第一时间同步消息的时刻 τ2;
从时钟设备接收由上述主时钟设备发送的第二时间同步消息, 并获取 上述第二时间同步消息中携带1\的时间戳, 其中, 上述 1\为上述主时钟设 备通过射频发出上述第一时间同步消息的时刻;
从时钟设备向上述主时钟设备发送第三时间同步消息, 并获取上述第 三时间同步消息通过射频发出的时刻 τ3;
从时钟设备接收由上述主时钟设备发送的第四时间同步消息, 并获取 上述第四时间同步消息中携带的 τ4的时间戳, 其中, 上述 τ4为上述主时钟 设备在空口物理层上接收到上述第三时间同步消息的时刻;
从时钟设备根据上述 1\、 τ2、 τ3和 τ4计算上述从时钟设备与上述主时 钟设备的时钟偏移量;
从时钟设备根据计算的上述时钟偏移量, 对上述从时钟设备的本地时 钟进行修正。
一种主时钟设备, 包括: 收发模块, 用于向从时钟设备发送第一时间同步消息;
获取模块, 用于获取上述收发模块通过射频发出上述第一时间同步消 息的时刻
上述收发模块还用于向上述从时钟设备发送第二时间同步消息, 并在 上述第二时间同步消息中携带上述 1\的时间戳;
上述收发模块还用于接收由上述从时钟设备发送的第三时间同步消 息;
上述获取模块还用于在上述收发模块发送第三同步消息时获取空口物 理层接收上述第三时间同步消息的时刻 τ4;
上述收发模块还用于向上述从时钟设备发送第四时间同步消息, 并在 上述第四时间同步消息中携带上述 τ4的时间戳; 以便于上述从时钟设备根 据上述 1\和 τ4计算上述从时钟设备与上述主时钟设备的时钟偏移量, 并根 据计算的上述时钟偏移量, 对上述从时钟设备的本地时钟进行修正。
一种从时钟设备, 包括:
收发模块, 用于接收由主时钟设备发送的第一时间同步消息; 获取模块, 用于根据上述收发模块接收的第一时间同步消息获取空口 物理层接收到上述第一时间同步消息的时刻 τ2;
上述收发模块还用于接收由上述主时钟设备发送的第二时间同步消 息, 上述第二时间同步消息携带 1\的时间戳;
上述获取模块用于从上述收发模块接收上述第二同步消息中获取上述 第二时间同步消息中携带 的时间戳, 其中, 上述 1\为上述主时钟设备通 过射频发出上述第一时间同步消息的时刻;
上述收发模块还用于向上述主时钟设备发送第三时间同步消息; 上述获取模块还用于在上述收发模块发送第三时间同步消息时获取上 述第三同步消息通过射频发出的时刻 τ3;
上述收发模块还用于接收由上述主时钟设备发送的第四时间同步消 息, 并获取上述第四时间同步消息中携带的 τ4的时间戳, 其中, 上述 τ4 为上述主时钟设备在空口物理层上接收到上述第三时间同步消息的时刻; 处理模块, 用于根据上述获取模块获取的 1\、 τ2、 τ3和 τ4计算上述从 时钟设备与上述主时钟设备的时钟偏移量;
修正模块, 用于根据上述处理模块计算的上述时钟偏移量, 对上述从 时钟设备的本地时钟进行修正。
一种时间同步系统, 包括:
主时钟设备, 用于向从时钟设备发送第一时间同步消息, 并获取上述 第一时间同步消息通过射频发出的时刻 向上述从时钟设备发送第二时 间同步消息, 并在上述第二时间同步消息中携上述 1\的时间戳; 接收由上 述从时钟设备发送的第三时间同步消息, 并获取空口物理层接收到上述第 三时间同步消息的时刻 τ4; 向上述从时钟设备发送第四时间同步消息, 并 在上述第四时间同步消息中携带上述 τ4的时间戳;
从时钟设备, 用于接收上述主时钟设备发送的第一时间同步消息, 并 获取空口物理层接收到上述第一时间同步消息的时刻 τ2; 接收由上述主时 钟设备发送的第二时间同步消息, 并获取上述第二时间同步消息中携带的 时刻 1\的时间戳, 上述 1\为上述主时钟设备通过射频发出上述第一时间同 步消息的时刻; 向上述主时钟设备发送第三时间同步消息, 并获取上述第 三时间同步消息通过射频发出的时刻 τ3; 接收由上述主时钟设备发送的第 四时间同步消息, 并获取上述第四时间同步消息中携带的时刻 τ4的时间戳, 上述 τ4为上述主时钟设备在空口物理层上接收到上述第三时间同步消息的 时刻; 根据上述 τ\、 τ2、 τ3和 τ4计算上述从时钟设备与主时钟设备的时钟偏 移量; 根据计算的时钟偏移量, 对上述从时钟设备的本地时钟进行修正。
从以上技术方案可以看出, 本发明实施例具有以下优点:
本发明实施例中,主从时钟设备获取时间同步消息通过射频( RF, Rad io Frequency ) 发出的时刻以及获取空口物理层接收到时间同步消息的时刻, 作为时间同步消息的发送和接收时刻, 从而, 可剔除因物理层调制解调等 处理的时延和抖动而对获取时间同步消息的发送和接收时刻的精确度的影 响, 提高获取时间同步消息的发送和接收时刻的精确度, 利用该获取的更 高精确度的时间同步消息的发送和接收时刻信息, 进行主从时钟设备的时 间同步, 能够相应提高主从时钟设备的时间同步精度。
附图说明 图 1为现有技术的一种时间同步方法的流程示意图;
图 2为本发明实施例提供的时间同步方法的一个实施例流程示意图; 图 3为本发明实施例提供的时间同步方法的另一个实施例流程示意图; 图 4-a 为本发明实施例提供的时间同步方法的另一个实施例流程示意 图;
图 4-b为本发明实施例提供的 LTE系统中一个 0. 5毫秒时隙的一种时 频结构示意图;
图 4-c 为本发明实施例提供的一种通过调度信息或时频资源信息获取 发送或接收时间同步消息的时刻的方式示意图;
图 4-d为本发明实施例提供的另一种通过调度信息或时频资源信息获 取发送或接收时间同步消息的时刻的方式示意图;
图 4-e 为本发明实施例提供的另一种通过调度信息或时频资源信息获 取发送或接收时间同步消息的时刻的方式示意图;
图 5-a 为本发明实施例提供的时间同步方法的另一个实施例流程示意 图;
图 5-b为本发明实施例提供的一种硬件记录方式示意图;
图 5-c为本发明实施例提供的另一种硬件记录方式示意图;
图 5-d为本发明实施例提供的另一种硬件记录方式示意图;
图 6为本发明实施例提供的一种主时钟设备结构示意图;
图 7为本发明实施例提供的一种从时钟设备结构示意图;
图 8为本发明实施例提供的一种时间同步系统结构示意图。 具体实施方式
本发明实施例提供了一种时间同步方法和相关设备及系统, 用于提高 主从时钟设备的时间同步精度。
为了使本技术领域的人员更好地理解本发明方案, 下面将结合本发明 实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分的实施例, 而不是全部的实施 例。 基于本发明中的实施例, 本领域普通技术人员在没有做出创造性劳动 前提下所获得的所有其他实施例, 都应当属于本发明保护的范围。
实现设备间时间同步的基本原理是, 在通信系统中默认一个系统的设 备为主时钟设备, 其它设备为从时钟设备。 主从时钟设备和从时钟设备间 传递携带时间戳的时间同步消息 (包括时间同步 4艮文、 跟随 4艮文和延迟响 应报文等 PTP消息),从时钟设备通过该时间戳描述的时间信息, 计算主从 时钟设备和从时钟设备之间的时钟偏移量, 并根据计算的结果对从时钟设 备的本地时钟进行修正, 从而实现了从时钟设备与主时钟设备的时间同步。
参照图 1 , 现有的有线网络中, 主从时钟设备实现时间同步的具体过程 可以 ¾口下:
XI、 主时钟设备向从时钟设备发送时间同步 4艮文 Sync , 并测量该 Sync 报文离开应用层的准确时刻
X2、 从时钟设备测量接收到的 Sync报文到达其应用层的准确时刻 t2;
X3、 主时钟设备在发送 Sync报文之后发送跟随报文 Follow_up , 并在 该 Follow_up报文中携带 的时间戳;
X4、 从时钟设备通过接收该 Follow_up报文获取 t!的时间戳; 从时钟 设备向主时钟设备发送延迟请求报文 Delay_Req , 并测量该 Delay_Req报 文离开其应用层的准确时刻 t3;
X5、 主时钟设备接收到该 Delay_Req 4艮文时, 测量该 Delay_Req消息 到达其应用层的准确时刻 t4;
X6、 主时钟设备向该从时钟设备发送延迟响应报文 Delay_Resp , 并在 该 Delay_Resp报文中携带 t4的时间戳, 从时钟设备通过接收该 Delay_Resp 报文获取 t4的时间戳;
X7、 从时钟设备根据上述 tl t2 , t3和 t4 , 计算其与主时钟设备的时钟 偏移量, 并根据最后计算的结果对其本地时钟进行修正, 进而实现主从时 钟设备的时间同步。
发明人研究和实践发现, 由于发送端 (主时钟设备或从时钟设备) 的 应用层发出的时间同步消息需要在物理层经过调制等处理后, 再从物理层 空口通过 RF发送出去, 同样的, 接收端 (从时钟设备或主时钟设备)在物 理层空口接收到的时间同步消息时, 也需要在物理层经过解调等处理之后 才到达应用层。 而物理层的调制解调等处理会对时间同步消, 的传输带来 一定的时延和抖动, 该时延和抖动与基带处理的速度有关, 并且, 由于上 下行机制的差异, 可能会导致上下行处理时延的不对称性。 而现有主从时 钟设备时间同步机制中, 发送端通常是以时间同步消息离开其应用层的时 间作为该时间同步消息的发送时刻, 而接收端通常是以时间同步消息到达 其应用层的时间作为该时间同步消息的接收时刻的, 这样, 主从时钟设备 的物理层的调整解调处理带来的时间同步消息发送或接收的时延和抖动的 不对称性, 将较大的影响到主从时钟设备时间同步精度。
下面以主时钟设备的角度, 对本发明实施例中的时间同步方法进行描 述。
本发明实施例中的时间同步方法可以包括: 主时钟设备向从时钟设备 发送第一时间同步消息, 并获取该第一时间同步消息通过 RF发出的时刻 Ύΰ 主时钟设备向上述从时钟设备发送第二时间同步消息, 并在该第二时 间同步消息中携带 1\的时间戳; 主时钟设备接收由上述从时钟设备发送的 第三时间同步消息, 并获取空口物理层接收到该第三时间同步消息的时刻 τ4; 主时钟设备向上述从时钟设备发送第四时间同步消息, 并在该第四时 间同步消息中携带 τ4的时间戳。
请参阅图 2, 具体步骤可以包括:
201、 主时钟设备向从时钟设备发送第一时间同步消息;
当需要进行时间同步时, 系统默认的主时钟设备按照预置的间隔时间 (缺省为 2秒)周期性地以多播的形式发送唯一的第一时间同步消息, 如 可以是时间同步报文 Sync, 则所有处在默认主时钟设备网段内, 并且与主 时钟设备所在域相同的从时钟设备都能接收到上述的第一时间同步消息。
需要说明的是, 为了便于描述, 本发明实施例只对一个从时钟设备与 主时钟设备的交互进行描述, 可以理解, 其他从时钟设备与主时钟设备的 交互过程可以参照本发明实施例中的描述。
202、 主时钟设备获取第一时间同步消息通过 RF发出的时刻
由于主时钟设备发送的第一时间同步消息需要经过物理层的调制解调 等处理之后, 才通过 RF发送出去, 故物理层的调制解调处理可能会对第一 时间同步消息的发送带来一定的时延和抖动, 因此, 主时钟设备通过获取 第一时间同步消息通过 RF发出的时刻,可以实现对物理层调制解调的处理 时延的补偿, 从而提高获取第一时间同步消息的发送时刻的精确度。
其中, 在一种应用场景下, 主时钟设备可以根据第一时间同步消息的 调度信息(调度信息通常由介质访问控制层生成), 获取第一时间同步消息 通过 RF发出的时刻 1\。 具体的, 主时钟设备可根据第一时间同步消息的 调度信息, 获取第一时间同步消息通过 RF发出的对应时隙,根据本地时钟 和上述时隙计算出发送该时隙中的任意一个符号的起始或结束时刻, 将其 作为上述第一时间同步消息通过射频发出的时刻 举例来说, 可根据本 地时钟和上述时隙计算出发送该时隙中的最后一个符号的结束时刻, 将其 作为第一时间同步消息通过射频发出的时刻 或者, 根据本地时钟和上 述时隙计算出发送该时隙中的最后一个符号的起始时刻, 将其作为第一时 间同步消息通过射频发出的时刻 或者, 根据本地时钟和上述时隙计算 出发送该时隙中的第一个符号的起始时刻, 将其作为第一时间同步消息通 过射频发出的时刻 此处不作限定。
在另一种应用场景下, 也可以通过硬件(如射频装置或其他硬件装置) 记录的方式来获取第一时间同步消息通过 RF发出的时刻 1\。 需要说明的 是, 通过硬件记录的方式获取时间同步消息在空口物理层的发送和接收时 刻, 发送端与接收端可按照统一的硬件记录机制来执行, 从而保证主从时 间设备的时间同步精度, 例如, 在主从时钟设备进行时间同步消息的交互 过程中, 若作为发送端的主时钟设备(或从时钟设备)通过硬件将时间同 步消息通过 RF发出的时隙中的最后一个符号的结束时刻记录下来,作为该 时间同步消息通过 RF发出的时刻,则相应的,作为接收端的从时钟设备(或 主时钟设备), 在接收到该时间同步消息时, 通过硬件将空口物理层接收到 该时间同步消息的时隙中的第一个符号的起始时刻记录下来, 作为空口物 理层接收到该时间同步报文的时刻; 若作为发送端的主时钟设备(或从时 钟设备)通过硬件(如射频装置或其他硬件装置)将时间同步消息通过 RF 发出的时隙中的最后一个符号的起始时刻记录下来, 作为该时间同步消 ,包、 通过 RF发出的时刻, 相应的, 作为接收端的从时钟设备(或主时钟设备), 在接收到该时间同步消息时, 通过硬件将空口物理层接收到的该时间同步 消息的时隙中的第二个符号的起始时刻记录下来, 作为空口物理层接收到 该时间同步报文的时刻; 若作为发送端的主时钟设备(或从时钟设备), 通 过硬件将时间同步消息通过 RF发出的时隙中的第一个符号的起始时刻记 录下来, 作为该时间同步消息通过 RF发出的时刻, 则相应的, 作为接收端 的从时钟设备(或主时钟设备), 在接收到该时间同步消息时, 通过硬件将 空口物理层接收到该时间同步消息的时隙中的第一个符号的起始时刻记录 下来, 作为空口物理层接收到该时间同步报文的时刻, 以此类推。 具体的, 通过硬件记录时间同步报文的发送和接收时刻的机制可以在执行时间同步 操作之前对主从时钟设备进行设定, 此处不作限定。
203、 主时钟设备向该从时钟设备发送第二时间同步消息, 并在该第二 时间同步消息中携带 1\的时间戳;
主时钟设备在发送上述第一时间同步消息之后, 向上述从时钟设备发 送携带 1\的时间戳的第二时间同步消息, 如可以是跟随报文 Follow_up, 以便该从时钟设备获知主时钟设备通过 RF发出上述第一时间同步消息的 时刻 从时钟设备在接收到第二时间同步消息时, 可获取其空口物理层 接收到该第二时间同步消息的时刻。
204、 主时钟设备接收由该从时钟设备发送的第三时间同步消息, 并获 取空口物理层接收到该第三时间同步消息的时刻 T4;
为了提高修正精度, 时间同步过程需要对主从时钟设备间的时间同步 消息的传输延迟进行测量, 此时, 从时钟设备会向主时钟设备不定期的发 送第三时间同步消息, 如可以是延迟请求报文 Delay_Req, 其间隔时间缺省 值可为 4到 60秒之间的随机值, 在发送该第三时间同步消息时, 从时钟设 备可获取该第三时间同步消息通过 RF发出的时刻 T3
当主时钟设备接收到该第三时间同步消息时, 获取其空口物理层接收 到该第三时间同步消息的时刻 Τ4, 以实现对物理层调制解调的处理时延的 补偿。
在一种应用场景下, 主时钟设备接收第三时间同步消息时, 可以根据 第三时间同步消息的调度信息 (该调度信息可由主时钟设备生成, 也可由 从时钟设备生成, 例如若主时钟设备为宏基站, 从时钟设备为微基站或用 户设备等, 则该调度信息可由主时钟设备生成, 反之, 可由从时钟设备生 成), 获取空口物理层接收到第三时间同步消息的时刻 T4, 具体的, 主时钟 设备可根据第三时间同步消息的调度信息, 获取空口物理层接收第三时间 同步消息的对应时隙, 根据本地时钟和上述时隙计算出空口物理层接收到 该时隙中的任意一个符号的起始或结束时刻作为空口物理层接收到第三时 间同步消息的时刻 τ4。 举例来说, 可根据本地时钟和上述时隙计算出空口 物理层接收到该时隙中的第一个符号的起始时刻, 将其作为空口物理层接 收到第三时间同步消息的时刻 τ4, 或者, 将根据本地时钟和上述时隙计算 出空口物理层接收到该时隙中的第二个符号的起始时刻, 将其作为空口物 理层接收到第三时间同步消息的时刻 τ4, 此处不作限定。
在一种应用场景下, 主时钟设备在接收到第三时间同步消息时, 也可 通过硬件记录的方式获取空口物理层接收到该第三时间同步消息的时刻
Τ4。 硬件记录的具体方式可参照步骤 202中的描述, 此处不再赘述。
205、 主时钟设备向该从时钟设备发送第四时间同步消息, 并在该第四 时间同步消息中携带 Τ4的时间戳。
在一种应用场景下, 主时钟设备可在接收到第三时间同步消息之后, 向上述从时钟设备发送携带 τ4的时间戳的第四时间同步消息, 如可以是延 迟响应报文 De lay-Resp , 以便该从时钟设备获知主时钟设备在空口物理层 接收到第三时间同步消息的时刻 T4。 或者, 主时钟设备可在接收到从时钟 设备发送的扩展消息(如可以是跟随报文 Fol low_up )之后, 向从时钟设备 发送携带 T4的时间戳的第四时间同步消息, 如可以是延迟响应 4艮文 De lay-Resp , 以便该从时钟设备获知主时钟设备在空口物理层接收到第三 时间同步消息的时刻 T4
需要说明的是, 上述的扩展消息是从时钟设备通过扩展 1588v2协议之 后扩展的消息, 并在发出第三时间同步消息之后向主时钟设备发送, 并可 在该新增消息中携带从时钟设备通过 RF发出第三时间同步消息的时刻的时 间戳, 以便主时钟设备可以获知该时刻。 当然, 从时钟设备也可以不向主 时钟设备发送上述的扩展消息。
可以理解, 当从时钟设备接收到第四时间同步消息时, 主从时钟设备 之间即完成了一次时间同步消息交互过程, 从时钟设备可根据在上述时钟 同步消息交互过程中获取到的四个时刻信息进行相应的计算, 并可根据计 算的结果对其本地时钟进行修正, 从时钟设备也可以在经过多次主从时钟 设备间的时间同步消息交互过程之后, 对通过计算得出的多个计算结果取 平均值, 根据该平均值对其本地时钟进行修正, 从而实现主从时钟设备间 的时间同步。
可以理解, 本实施例描述的上述时间同步方法可应用于多种通信系统 之中, 如长期演进 ( LTE, Long Term Evolution )通信系统、 演进通用移 动通信系统 ( UMTS, Universal Mobile Telecommunications System )、 宽 带码分多址接入 ( WCDMA, Wideband Code Division Multiple Access ), 全球互联微波接入 ( WIMAX, Worldwide Interoperability for Microwave Access ) , 全球移动通信系统 ( GSM , Global System for Mobile co匪 un ication)等。 其中, 主时钟设备和从时钟设备可以是基站, 或是其 它具有无线链路的设备。
由上可见, 本实施例主时钟设备通过获取第一时间同步消息通过 RF发 出的时刻以及空口物理层接收到第三时间同步消息的时刻, 并把这两个时 刻的时间戳分别通过第二时间同步消息和第四时间同步消息发送给从时钟 设备, 使得该从时钟设备可以获知主时钟设备通过 RF发出第一时间同步消 息以及在空口物理层接收到第三时间同步消息的时刻, 相应提高了从时钟 设备后续计算其与主时钟设备的时钟偏移量的准确性, 利用更准确的计算 结果来对从时钟设备的本地时钟进行修正, 提高了主从时钟设备的时间同 步精度。
下面以从时钟设备的角度, 对本发明实施例中的时间同步方法进行描 述。
本发明实施例中的时间同步方法另一个实施例包括: 从时钟设备接收 由主时钟设备发送的第一时间同步消息, 并获取空口物理层接收到该第一 时间同步消息的时刻 T2; 接收由主时钟设备发送的第二时间同步消息, 并 获取上述第二时间同步消息中携带的时刻 1\的时间戳, 其中, 上述 1\为主 时钟设备通过 RF发出上述第一时间同步消息的时刻;向主时钟设备发送第 三时间同步消息, 并获取该第三时间同步消息通过 RF发出的时刻 Τ3; 从 时钟设备接收由主时钟设备发送的第四时间同步消息, 并获取上述第四时 间同步消息中携带的时刻 τ4的时间戳, 其中, 上述 τ4为主时钟设备在空口 物理层上接收到上述第三时间同步消息的时刻; 根据上述 τ2, τ3和 τ4 计算其与主时钟设备的时钟偏移量; 根据计算的结果对其本地时钟进行修 正。
请参阅图 3 , 具体步骤可以包括:
301、 从时钟设备接收由主时钟设备发送的第一时间同步消息, 并获取 空口物理层接收到该第一时间同步消息的时刻 Τ2;
当需要进行时间同步时, 系统默认的主时钟设备按照预置的间隔时间 (缺省为 2秒)周期性地以多播的形式发送唯一的第一时间同步消息, 如 可以是时间同步报文 Sync, 则所有处在默认主时钟设备网段内, 并且与主 时钟设备所在域相同的从时钟设备都能接收到上述的第一时间同步消息。
从时钟设备接收到上述第一时间同步消息时, 获取空口物理层接收到 该第一时间同步消息的时刻 T2, 以实现对物理层调制解调的处理时延的补 偿。
在一种应用场景下, 从时钟设备接收到第一时间同步消息时, 可以根 据第一时间同步消息的调度信息 (该调度信息可由主时钟设备生成, 也可 由从时钟设备生成, 例如若主时钟设备为宏基站, 从时钟设备为微基站或 用户设备等, 则该调度信息可由主时钟设备生成, 反之, 可由从时钟设备 生成), 获取空口物理层接收到第一时间同步消息的时刻 Τ2, 具体的, 从时 钟设备可根据第一时间同步消息的调度信息, 获取空口物理层接收到第一 时间同步消息的对应时隙, 根据本地时钟和上述时隙计算出空口物理层接 收到上述时隙中的任意一个符号的起始或结束时刻, 将其作为空口物理层 接收到上述第一时间同步消息的时刻 Τ2, 举例来说, 可根据本地时钟和上 述时隙计算出空口物理层接收到上述时隙中的第一个符号的起始时刻, 将 其作为空口物理层接收到第一时间同步消息的时刻 Τ2, 或者, 根据本地时 钟和上述时隙计算出空口物理层接收到上述时隙中的第二个符号的起始时 刻, 将其作为空口物理层接收到第一时间同步消息的时刻 Τ2, 此处不作限 定。 在另一种应用场景下, 从时钟设备接收到上述第一时间同步消息时, 也可以通过硬件记录的方式获取空口物理层接收到该第一时间同步消息的 时刻 T2。 需要说明的是, 通过硬件(如射频装置或其他硬件装置)记录的 方式获取时间同步报文在空口物理层的发送和接收时刻, 发送端与接收端 可按照统一的硬件记录机制来执行, 从而保证主从时间设备的时间同步精 度, 例如, 在主从时钟设备进行时间同步消息的交互过程中, 若作为发送 端的主时钟设备 (或从时钟设备 )通过硬件将时间同步消息通过 RF发出的 时隙中的最后一个符号的结束时刻记录下来, 作为该时间同步消息通过 RF 发出的时刻, 则相应的, 作为接收端的从时钟设备(或主时钟设备), 在接 收到该时间同步消息时, 通过硬件将空口物理层接收该时间同步消息的时 隙中的第一个符号的起始时刻记录下来, 作为空口物理层接收到该时间同 步报文的时刻记录下来; 若作为发送端的主时钟设备(或从时钟设备)通 过硬件将时间同步消息通过 RF发出的时隙中的最后一个符号的起始时刻 记录下来, 作为该时间同步消息通过 RF发出的时刻记录下来, 则相应的, 作为接收端的从时钟设备(或主时钟设备), 在接收到该时间同步消息时, 通过硬件将空口物理层接收该时间同步消息的时隙中的第二个符号的起始 时刻记录下来, 作为空口物理层接收到该时间同步 4艮文的时刻记录下来; 若作为发送端的主时钟设备(或从时钟设备)通过硬件将时间同步消息通 过 RF发出的时隙中的第一个符号的起始时刻记录下来,作为该时间同步消 息通过 RF发出的时刻,相应的,作为接收端的从时钟设备(或主时钟设备), 在接收到该时间同步消息时, 通过硬件将空口物理层接收该时间同步消息 的时隙中的第一个符号的起始时刻记录下来, 作为空口物理层接收到该时 间同步 4艮文的时刻, 以此类推。 具体的, 通过硬件记录时间同步 4艮文的发 送和接收时刻的机制可以在执行时间同步操作之前对主从时钟设备进行设 定, 此处不作限定。
302、 从时钟设备接收由主时钟设备发送的第二时间同步消息, 并获取 该第二时间同步消息中携带的时刻 1 的时间戳;
从时钟设备通过接收由主时钟设备发送的第二时间同步消息如可以是 跟随报文 Follow_up, 获取第二时间同步消息中携带的 1\的时间戳, 以便 进行后续的计算。其中, 1\为上述主时钟设备通过 RF发出上述第一时间同 步消息的时刻。
303、 从时钟设备向主时钟设备发送第三时间同步消息;
304、 从时钟设备获取第三时间同步消息通过 RF发出的时刻 T3;
为了提高修正精度, 时间同步过程需要对主从设备间的时间同步报文 的传输延迟进行测量, 此时, 从时钟设备会向主时钟设备不定期的发送第 三时间同步消息, 如可以是延迟请求报文 Delay_Req , 其间隔时间缺省值为 4到 60秒之间的随机值。
由于从时钟设备发送的第三时间同步消息需要经过物理层的调制解调 等处理之后, 才通过 RF发送出去, 故物理层的调制解调处理可能会对第三 时间同步消息的发送带来一定的时延和抖动, 因此, 从时钟设备通过获取 第三时间同步消息通过 RF发出的时刻,可实现对物理层调制解调的处理时 延的补偿, 从而提高获取第三时间同步消息的发送时刻的精确度。
其中, 在一种应用场景下, 从时钟设备可以根据第三时间同步消息的 调度信息 (该调度信息可由主时钟设备生成, 也可由从时钟设备生成, 例 如若主时钟设备为宏基站, 从时钟设备为微基站或用户设备等, 则该调度 信息可由主时钟设备生成, 反之, 可由从时钟设备生成), 获取第三时间同 步消息通过 RF发出的时刻 T3, 具体的, 从时钟设备可以根据第三时间同 步消息的调度信息, 获取第三时间同步消息通过 RF发出的对应时隙, 根据 本地时钟和上述时隙计算出发送该时隙中的任意一个符号的起始或结束时 刻, 将其作为该第三时间同步消息通过 RF发出的时刻 Τ3, 举例来说, 可 根据本地时钟和上述时隙计算出发送该时隙中的最后一个符号的结束时 刻, 将其作为第三时间同步消息通过 RF发出的时刻 Τ3, 或者, 根据本地 时钟和上述时隙计算出发送该时隙中的最后一个符号的起始时刻, 将其作 为第三时间同步消息通过 RF发出的时刻 Τ3, 或者, 根据本地时钟和上述 时隙计算出发送该时隙中的第一个符号的起始时刻, 将其作为第三时间同 步消息通过 RF发出的时刻 Τ3, 此处不作限定。
在另一种应用场景下, 也可以通过硬件记录的方式来获取第三时间同 步消息通过 RF发出的时刻 Τ3。 通过硬件记录的具体方式可参照步骤 301 中的描述, 此处不再赘述。
需要说明的是, 在一种应用场景下, 从时钟设备可以在获取第三时间 同步消息通过 RF发出的时刻 T3之后, 通过扩展 1588ν2协议, 向主时钟设 备发送新增消息如可以是跟随报文 Fol low_up , 并在该新增消息中携带 T3 的时间戳, 以便主时钟设备可以获知上述从时钟设备通过 RF发出第三时间 同步消息的时刻 Τ3。 当然, 从时钟设备也可以不向主时钟设备发送上述的 新增消息, 此处不作限定。
305、 从时钟设备接收由主时钟设备发送的第四时间同步消息, 并获取 该第四时间同步消息中携带的时刻 Τ4的时间戳
从时钟设备通过接收由主时钟设备发送的第四时间同步消息, 例如可 以是延迟响应报文 Delay_Resp, 获取该第四时间同步消息中携带的 T4的时 间戳, 以便进行后续的计算。 其中, Τ4为上述主时钟设备在空口物理层接 收到上述第三时间同步消息的时刻。
306、 从时钟设备根据获取到的上述 Τ2, Τ3和 Τ4计算其与主时钟 设备的时钟偏移量;
从时钟设备获取到上述 Τ2, Τ3和 Τ4后, 可以根据下述公式计算其 与主时钟设备之间的消息平均延迟 Delay,并相应的计算出其与主时钟设备 的时钟偏移量 Offset:
T2= T!+Delay+Offset; T4= T3+Delay-Offset。
上述两条公式可以变成:
Delay = ( T2- 1\+1> T3 ) 12;
Offset= T2- TV Delay, 即 Offset= ( T2- T T4+ T3 ) /2。
需要说明的是, 从时钟设备可以经过多次主从时钟设备间的时间同步 消息交互过程之后, 对通过计算得出的多个 Off set的值取平均值。
307、 从时钟设备根据计算的结果对其本地时钟进行修正;
根据步骤 306计算的结果, 从时钟设备可以根据时钟偏移量 Off set对 其本地时钟进行修正, 也可以在经过多次主从时钟设备间的时间同步消息 交互过程之后, 根据计算得到的时钟偏移量 Off set的平均值对其本地时钟 进行修正, 从而达到与主时钟设备的时间同步。 需要说明的是, 本实施例所描述的时间同步方法可应用于多种通信系 统之中, 例如 UMTS , WCDMA, WIMAX , GSM, 和 LTE通信系统等。 主时钟设 备和从时钟设备可以是基站, 或是其它具有无线链路的设备。
由上可见, 本实施例中, 从时钟设备通过获取空口物理层接收到第一 时间同步消息的时刻以及获取第三时间同步消息通过 RF发出的时刻, 并在 接收到第二时间同步消息和第四时间同步消息时, 获取上述两种时间同步 报文中分别携带的主时钟设备通过 RF发出第一时间同步消息的时刻和主时 钟设备在空口物理层接收到第三时间同步消息的时刻的时间戳, 使得该从 时钟设备可以根据获取到的上述四个时刻信息更加准确地计算出其与主时 钟设备的时钟偏移量, 相应提高了从时钟设备根据计算结果对本地时钟进 行修正的精确度, 从而提高了主从时钟设备的时间同步精度。 为便于更好地理解本发明的技术方案, 下面以主从时钟设备通过调度 信息或时频资源信息来获取发送或接收时间同步消息的时刻为例, 以一具 请参阅图 4-a , 本发明实施例中的时间同步方法的另一个实施例, 具体 可以包括:
401、 主时钟设备向从时钟设备发送时间同步报文 Sync;
当需要进行时间同步时, 系统默认的主时钟设备按照预置的间隔时间 (缺省为 2秒)周期性地以多播的形式发送唯一的 Sync报文, 则所有处在 默认主时钟设备网段内, 并且与主时钟设备所在域相同的从时钟设备都能 接收到 Sync报文。
402、 主时钟设备根据 Sync报文的调度信息, 获取 Sync报文通过 RF 发出的时刻 1\;
在一种应用场景下, 主时钟设备可以根据 Sync报文的调度信息, 获取 Sync报文通过 RF发出的对应时隙,根据本地时钟和上述时隙计算出发送该 时隙中的最后一个符号的结束时刻, 将其作为 Sync报文通过 RF发出的时 刻 1\ , 或者, 根据本地时钟和上述时隙计算出发送该时隙中的最后一个符 号的起始时刻, 将其作为 Sync报文通过 RF发出的时刻 1\ , 或者, 根据本 地时钟和上述时隙计算出发送该时隙中的第一个符号的起始时刻, 将其作 为 Sync报文通过 RF发出的时刻 T\ , 或者, 也可以根据本地时钟和上述时 隙计算出发送该时隙中的其它符号的起始或结束时刻, 将其作为 Sync报文 通过 RF发出的时刻 1\ , 此处不作限定。
上述时隙可以是对应一个无线帧或者子帧的时隙。
403、 从时钟设备接收 Sync报文, 并根据 Sync报文的调度信息, 获取 Sync报文在空口物理层接收到 Sync报文的时刻 T2;
在一种应用场景下, 从时钟设备根据 Sync报文的调度信息, 获取空口 物理层接收 Sync的时隙, 根据本地时钟和上述时隙计算出空口物理层接收 到该时隙中的第一个符号的起始时刻, 将其作为空口物理层接收到 Sync报 文的时刻 T2, 或者, 根据本地时钟和上述时隙计算出空口物理层接收到该 时隙中的第二个符号的起始时刻, 将其作为空口物理层接收到 Sync报文的 时刻 T2, 或者, 也可以根据本地时钟和上述时隙计算出空口物理层接收到 该时隙中的其它符号的起始或结束时刻, 将其作为空口物理层接收到 Sync 报文的时刻 T2 , 此处不作限定。 其中, 上述时隙可以是对应一个无线帧或 者子帧的时隙。
404、主时钟设备通过跟随报文 Fo 11 ow-up把 T\的时间戳传递给从时钟 设备;
主时钟设备在发送上述 Sync报文之后, 向上述从时钟设备发送携带 1\ 的时间戳的 Fol low_up报文, 以便该从时钟设备获知主时钟设备通过 RF发 出上述 Sync报文的时刻 1\。
405、 从时钟设备向主时钟设备发送延迟请求报文 De lay-Req;
为了提高修正精度, 时间同步过程需要对主从设备间的时间同步报文 的传输延迟进行测量, 此时, 从时钟设备会向主时钟设备不定期的发送 De l ay-Req ^艮文, 其间隔时间缺省值为 4到 60秒之间的随机值。
406、 从时钟设备根据 De lay-Req报文的调度信息, 获取 De lay—Req报 文通过 RF发出的时刻 T3;
在一种应用场景下, 从时钟设备根据 De lay-Req报文的调度信息, 获 取 De lay-Red 4艮文通过 RF发出的时隙, 根据本地时钟和上述时隙计算出发 送该时隙中的最后一个符号的结束时刻, 将其作为 De lay-Red ^艮文通过 RF 发出的时刻 τ3 , 或者, 根据本地时钟和上述时隙计算出发送该时隙中的最 后一个符号的起始时刻, 将其作为 De lay-Req报文通过 RF发出的时刻 T3, 或者, 根据本地时钟和上述时隙计算出发送该时隙中的第一个符号的起始 时刻, 将其作为 De lay-Req报文通过 RF发出的时刻 Τ3, 或者, 也可以根据 本地时钟和上述时隙计算出发送该时隙中的其它符号的起始或结束时刻, 将其作为 De lay-Req报文通过 RF发出的时刻 T3, 此处不作限定。
407、 主时钟设备接收由该从时钟设备发送的 De lay-Req报文, 并根据 De lay-Red ^艮文的调度信息,获取空口物理层接收到 De lay-Req ^艮文的时刻 T4;
在一种应用场景下, 主时钟设备根据 De lay-Req报文的调度信息, 获 取空口物理层接收 De lay-Req报文的时隙, 根据本地时钟和上述时隙计算 出空口物理层接收到该时隙中的第一个符号的起始时刻, 将其作为空口物 理层接收到 De lay-Req报文的时刻 T4, 或者, 根据本地时钟和上述时隙计 算出空口物理层接收到该时隙中的第二个符号的起始时刻, 将其作为空口 物理层接收到 De lay-Red ^艮文的时刻 T4 , 或者, 也可以根据本地时钟和上 述时隙计算出空口物理层接收到该时隙中的其它符号的起始或结束时刻, 将其作为空口物理层接收到 De lay-Req报文的时刻 T4, 此处不作限定。
408、从时钟设备通过跟随报文 Fol low_up把 1^的时间戳传递给主时钟 设备;
从时钟设备在发送上述 De lay-Red报文之后, 通过扩展 1588v2协议, 向主时钟设备发送新增的携带 T3的时间戳的 Fol low_uP报文, 以便该主时 钟设备可以获知上述从时钟设备通过 RF发出上述 De lay-Red报文的时刻 T3
409、 主时钟设备通过延迟响应报文 De lay-Resp把 T4的时间戳传递给 从时钟设备;
主时钟设备在接收到上述从时钟设备发送的 Fol low_up报文之后, 向 上述从时钟设备发送携带 T4的时间戳的 De 1 ay-Re s ρ报文,以便该从时钟设 备获知主时钟设备在空口物理层接收到上述 De lay-Red报文的时刻 T4
410、 从时钟设备根据获取到的 Τ\ , Τ2, ^和 Τ4计算其与主时钟设备的 时钟偏移量; 从时钟设备在获取到 τ2, τ3和 τ4后, 可以根据下述公式计算其与 主时钟设备之间的报文平均延迟 Delay,并相应计算出其与主时钟设备的时 钟偏移量 Offset:
T2= T!+Delay+Offset; T4= T3+Delay-Offset。
上述两条公式可以变成:
Delay = ( T2- 1\+1> T3 ) 12;
0ff set= T2- Τ - De lay, 即 Off set= ( T2_ T -T4+ T3 ) /2。
需要说明的是, 从时钟设备可以经过多次主从时钟设备间的时间同步 消息交互过程之后, 对通过计算得出的多个 Of f set取平均值。
411、 从时钟设备根据计算的结果对其本地时钟进行修正;
根据步骤 410计算的结果, 从时钟设备可以根据时钟偏移量 Off set对 其本地时钟进行修正, 也可以在经过多次主从时钟设备间的时间同步报文 交互过程之后, 根据计算得到的时钟偏移量 Off set的平均值对其本地时钟 进行修正, 从而达到与主时钟设备的时间同步。
为便于理解, 下面以在 LTE 系统下通过调度信息来获取发送或接收时 间同步报文的时刻的方式为例进行说明, LTE系统中定义的一个子帧包含两 个时隙, 每个 0. 5 毫秒的时隙包括 6 或 7 个正交频分多路复用 ( 0F画, Or thogona l Frequency Divi s ion Mul t i plexing )符号, 如图 4_b所示, 图 4-b示出了 LTE系统中一个 0. 5毫秒时隙的一种时频结构。
经过基带处理后的待发送数据由 0F画符号承载发送, 在每个符号对应 的起始时刻 (如图 4_b中的 ^ , t2 , t3 , t4, t5 , t6 和 t7 )通过 RF发 送出去, 相应的, 接收端对应接收上述 0F画符号。
为了保证主从时钟设备的时间同步精度, 本发明实施例中举例提供了 三种可选的通过调度信息来获取时间同步消息发送或接收时刻的方式, 通 过提供的这三种方式, 可以较好的保证时间同步消息在主从时钟设备间来 回传输的时间的对称性, 从而保证主从时间设备的时间同步精度。
本发明实施例提供的一种通过调度信息来获取发送或接收时间同步消 息的时刻的方式, 可参阅图 4-c,其具体实现方式如下:
作为发送端的时钟设备(如主时钟设备或从时钟设备), 在发送时间同 步消息 (如 Sync报文或 De 1 ay.Req报文 )时, 可根据该时间同步消息的调 度信息, 获取通过 RF发送的承载该时间同步消息的子帧的时隙, 根据本地 时钟和上述时隙计算出该时隙中的最后一个符号的结束时刻 ^和^,并将 ^和 作为该时间同步消息通过 RF发出的时刻, 相应的, 作为接收端的 时钟设备(如从时钟设备或主时钟设备), 在接收到该时间同步消息时, 根 据该时间同步消息的调度信息, 获取空口物理层接收承载该时间同步消息 的子帧的时隙, 根据本地时钟和上述时隙计算出空口物理层接收到该时隙 中的第一个符号的起始时刻 ^和 tdl , 并将 ^和 tdl作为空口物理层接收到 该时间同步消息的时刻, 由图 4-c可见, 时间同步消息在传输线路中的延 时 de lay和 de lay'是对称,且因为获取的是通过 RF发送时间同步消息的时 隙中的最后一个符号的结束时刻和空口物理层接收时间同步消息的时隙中 的第一个符号的起始时刻, 故可剔除因主从时钟设备间频率的不同步而导 致的主从时钟设备发送或接收子帧的时间的不同步, 因此, 通过此获取方 式可更为精确的获取到时间同步消息的发送时刻和接收时刻。
本发明实施例还提供的另一种通过调度信息来获取发送或接收时间同 步消息的时刻的方式, 可参阅图 4-d, 具体方式如下:
作为发送端的时钟设备(如主时钟设备或从时钟设备), 在发送时间同 步消息 (如 Sync报文或 De 1 ay.Req报文 )时, 可根据该时间同步消息的调 度信息, 获取通过 RF发送的承载该时间同步消息的子帧的时隙, 根据本地 时钟和上述时隙计算出该时隙中的最后一个符号的起始时刻 ta2和 t。2,将 ta2 和 t。2作为该时间同步消息通过 RF发出的时刻,相应的,作为接收端的时钟 设备(如从时钟设备或主时钟设备), 在接收到该时间同步消息时, 根据该 时间同步消息的调度信息, 获取空口物理层接收承载该时间同步消息的子 帧的时隙, 根据本地时钟和上述时隙计算出空口物理层接收到该时隙中的 第二个符号的起始时刻 tb2和 td2 , 将 tb2和 td2作为空口物理层接收到该时间 同步消息的时刻, 由图 4-d可见, 时间同步消息在传输过程中的延时 de lay 和 de lay'是对称, 且 ta2和 td2对称, tb2和 t。2对称, 通过此获取方式同样可 精确的记录时间同步消息的发送时刻和接收时刻。
本发明实施例还提供的另一种通过调度信息来获取发送或接收时间同 步消息的时刻的方式, 可参阅图 4-e具体方式如下:
作为发送端的时钟设备(如主时钟设备或从时钟设备), 在发送时间同 步消息 (如 Sync报文或 De 1 ay.Req报文 )时, 可根据该时间同步消息的调 度信息, 获取通过 RF发送的承载该时间同步消息的子帧的时隙, 根据本地 时钟和上述时隙计算出该时隙中的第一个符号的起始时刻 ta3和 t。3, 将 ta3 和 t。3作为该时间同步消息通过 RF发出的时刻,相应的,作为接收端的时钟 设备(如从时钟设备或主时钟设备), 在接收到该时间同步消息时, 根据该 时间同步消息的调度信息, 获取空口物理层接收承载该时间同步消息的子 帧的时隙, 根据本地时钟和上述时隙计算出空口物理层接收到该时隙中的 第一个符号的起始时刻 tb3和 td3 , 将 tb3和 td3作为空口物理层接收到该时间 同步消息的时刻, 由图 4-e可见, 时间同步消息在传输过程中的延时 de lay 和 de l ay'是对称, 因此, 通过此获取方式同样可较为精确的获取到时间同 步消息的发送时刻和接收时刻。
由上可见, 本实施例中, 通过调度信息获取时间同步消息通过 RF发出 的时刻和空口物理层接收到时间同步消息的时刻, 实现了对物理层调制解 调的处理时延的补偿, 从而剔除了因物理层调制解调等处理的时延和抖动 而对获取时间同步报文的发送和接收时刻的精确度的影响, 提高了获取时 间同步报文的发送和接收时刻的精确度, 利用该获取的更高精确度的时间 同步消息的发送和接收时刻信息进行主从时钟设备的时间同步, 能够相应 提高主从时钟设备的时间同步精度。 为便于更好地理解本发明的技术方案, 下面以在主从时钟设备通过硬 件记录的方式获取在空口物理层发送或接收时间同步消息的时刻为例对本 发明实施例描述的时间同步方法进行详细描述。
请参阅图 5-a , 本发明实施例中的时间同步方法的另一个实施例, 具体 可以包括:
501、 主时钟设备向从时钟设备发送时间同步报文 Sync;
当需要进行时间同步时, 系统默认的主时钟设备按照预置的间隔时间 (缺省为 2秒)周期性地以多播的形式发送唯一的 Sync报文, 则所有处在 默认主时钟设备网段内, 并且与主时钟设备所在域相同的从时钟设备都能 接收到 Sync报文。
502、 主时钟设备通过硬件记录 Sync报文通过 RF发出的时刻 1\;
主时钟设备发送 Sync报文时, 可通过硬件(如射频装置或其他硬件装 置)将 Sync报文通过 RF发出的时隙中的最后一个符号的结束时刻记录下 来, 作为 Sync ^艮文通过 RF发出的时刻, 或者, 通过硬件将 Sync ·^艮文通过 RF发出的时隙中的最后一个符号的起始时刻记录下来,作为 Sync报文通过 个符号的起始时刻记录下来, 作为 Sync ·^艮文通过 RF发出的时刻, 或者, 也可以通过硬件将 Sync ^艮文通过 RF发出的时隙中的其它符号的起始或结 束时刻记录下来, 作为 Sync ·^艮文通过 RF发出的时刻, 此处不作限定。 上 述时隙可以是对应一个无线帧或者子帧的时隙。
503、 从时钟设备在 12时刻接收 Sync报文, 并通过硬件记录空口物理 层接收到 Sync报文的时刻 T2;
从时钟设备在接收到 Sync报文时,可通过硬件将空口物理层接收 Sync 报文的时隙中的第一个符号的起始时刻记录下来, 作为空口物理层接收到 Sync报文的时刻, 或者, 通过硬件将空口物理层接收 Sync报文的时隙中的 第二个符号的起始时刻记录下来,作为空口物理层接收到 Sync报文的时刻, 或者, 也可以通过硬件将空口物理层接收 Sync报文的时隙中的其它符号的 起始或结束时刻记录下来, 作为空口物理层接收到 Sync报文的时刻, 此处 不作限定。
504、主时钟设备通过跟随报文 Fo 1 1 ow-up把 T\的时间戳传递给从时钟 设备;
主时钟设备在发送上述 Sync报文之后, 向上述从时钟设备发送携带 1\ 的时间戳的 Fo l low_up报文, 以便该从时钟设备获知主时钟设备通过 RF发 出上述 Sync报文的时刻 1\。
505、从时钟设备在 13时刻向主时钟设备发送延迟请求报文 De 1 ay - Re d; 为了提高修正精度, 时间同步过程需要对主从设备间的时间同步报文 的传输延迟进行测量, 此时, 从时钟设备会向主时钟设备不定期的发送 De l ay-Req ^艮文, 其间隔时间缺省值为 4到 60秒之间的随机值。
506、 从时钟设备通过硬件记录 De lay-Red 艮文通过 RF发出的时刻 T3; 从时钟设备发送 De lay-Req报文时, 可通过硬件将 De l ay-Req报文通 过 RF发出的时隙中的最后一个符号的结束时刻记录下来, 作为 De lay-Req 艮文通过 RF发出的时刻, 或者, 通过硬件将 De lay-Red ·^艮文通过 RF发出 的时隙中的最后一个符号的起始时刻记录下来, 作为 De lay-Req ·^艮文通过 RF发出的时刻, 或者, 通过硬件将 De lay-Req ^t艮文通过 RF发出的时隙中的 第一个符号的起始时刻记录下来,作为 De lay-Rec^艮文通过 RF发出的时刻, 或者, 也可以通过硬件将 De lay-Red ·^艮文通过 RF发出的时隙中的其它符号 的起始或结束时刻记录下来, 作为 De lay-Req报文通过 RF发出的时刻, 此 处不作限定。
507、主时钟设备在 t4时刻接收由该从时钟设备发送的 De lay-Req报文, 并通过硬件记录空口物理层接收到 De l ay-Req ^艮文的时刻 T4;
主时钟设备在接收到 De lay-Req报文时, 可通过硬件将空口物理层接 收 De lay-Req ^艮文的时隙中的第一个符号的起始时刻记录下来, 作为空口 物理层接收到 De lay-Req报文的时刻, 或者, 通过硬件将空口物理层接收 De 1 ay-Req ^艮文的时隙中的第二个符号的起始时刻记录下来,作为空口物理 层接收到 De lay-Red 报文的时刻, 或者, 通过硬件将空口物理层接收 De lay-Red ^艮文的时隙中的其它符号的起始或结束时刻记录下来,作为空口 物理层接收到 De lay-Req报文的时刻, 此处不作限定。
508、从时钟设备通过跟随报文 Fol low_up把 1^的时间戳传递给主时钟 设备;
从时钟设备在发送上述 De lay-Red报文之后, 通过扩展 1588v2协议, 向主时钟设备发送新增的携带 T3的时间戳的 Fol low_uP报文, 以便该主时 钟设备可以获知上述从时钟设备通过 RF发出上述 De lay-Red报文的时刻 T3
509、 主时钟设备通过延迟响应报文 De lay-Resp把 T4的时间戳传递给 从时钟设备;
主时钟设备在接收到上述从时钟设备发送的 Fol low_up报文之后, 向 上述从时钟设备发送携带 T4的时间戳的 De 1 ay-Re s ρ报文, 以便该从时钟设 备获知主时钟设备在空口物理层接收到上述 De lay-Red报文的时刻 T4
510、 从时钟设备根据上述 Τ\ , Τ2, ^和 Τ4计算其与主时钟设备的时钟 偏移量;
从时钟设备在获取到上述 Τ2, Τ3和 Τ4之后, 可以根据下述公式计 算其与主时钟设备之间的报文平均延迟 Delay,并相应计算出其与主时钟设 备的时钟偏移量 Offset:
T2= T!+Delay+Offset; T4= T3+Delay-Offset。
上述两条公式可以变成:
Delay = ( T2- 1\+1> T3 ) 12;
0ff set= T2- Τ - De lay, 即 Off set= ( T2_ T -T4+ T3 ) /2。
511、 从时钟设备根据计算的结果对其本地时钟进行修正;
根据步骤 510计算的结果, 从时钟设备可以根据时钟偏移量 Off set对 其本地时钟进行修正, 从而达到与主时钟设备的时间同步。
需要说明的是, 从时钟设备可以经过多次主从时钟设备间的时间同步 消息交互过程之后, 对通过计算得出的多个 Off set的值取平均值。
可以理解, 通过其他的硬件记录机制实现本发明的时间同步方法的步 骤可参照上述实施例中描述的时间同步方法, 至于具体的硬件记录机制可 在执行时间同步操作时对主从时钟设备进行设定, 此处不再赘述。
为便于理解, 下面以在 LTE 系统下通过硬件记录的方式获取发送或接 收时间同步消息的时刻为例, 对硬件记录方式中的硬件记录机制进行说明, 其中, LTE系统中一个 0. 5ms时隙的一种时频结构可如图 4-b中所示的时频 结构。
为了保证主从时间设备的时间同步精度, 本发明实施例中提供了三种 可选的硬件记录机制, 通过提供的这三种优选的硬件记录机制, 可以较好 的保证时间同步消息在主从时钟设备间来回传输的时间的对称性, 从而保 证主从时间设备的时间同步精度。
本发明提供的一种硬件记录机制,可参阅图 5-b,其具体实现方式如下: 作为发送端的时钟设备(如主时钟设备或从时钟设备), 在发送时间同 步消息 (如 Sync报文或 De 1 ay.Req报文 )时, 通过硬件将该时间同步消息 通过 RF发出的时隙中的最后一个符号的结束时刻 ta4和 t。4记录下来, 作为 该时间同步消息通过 RF发出的时刻, 相应的, 作为接收端的时钟设备(如 从时钟设备或主时钟设备), 在接收到该时间同步消息时, 通过硬件将空口 物理层接收该时间同步消息的时隙中的第一个符号的起始时刻 tb4和 td4记录 下来, 作为空口物理层接收到该时间同步报文的时刻, 由图 5-b可见, 时 间同步消息在传输线路中的延时 de lay和 de lay'是对称, 且因为通过硬件 记录的是时间同步消息通过 RF发出的时隙中的最后一个符号的结束时刻和 空口物理层接收时间同步消息的时隙中的第一个符号的起始时刻, 故剔除 了因主从时钟设备间频率的不同步而导致的主从时钟设备发送或接收子帧 的时间的不同步, 因此, 通过此硬件记录方式可更为精确的记录时间同步 消息的发送时刻和接收时刻。
本发明提供的另一种硬件记录机制, 可参阅图 5-c,具体方式如下: 作为发送端的时钟设备(如主时钟设备或从时钟设备), 在发送时间同 步消息(如 Sync消息或 De lay-Req消息 )时, 通过硬件将该时间同步消息 通过 RF发出的时隙中的最后一个符号的起始时刻 ^5和 t。5记录下来, 作为 该时间同步消息通过 RF发出的时刻, 相应的, 作为接收端的时钟设备(如 从时钟设备或主时钟设备), 在接收到该时间同步消息时, 通过硬件将空口 物理层接收该时间同步消息的时隙中的第二个符号的起始时刻 tb5和 td5记录 下来, 作为空口物理层接收到该时间同步报文的时刻, 由图 5-c可见, 时 间同步消息在传输过程中的延时 de lay和 de lay'是对称, 且 ^5和 td5对称, tb5和 t。5对称, 通过此硬件记录方式同样可精确的记录时间同步消息的发送 时刻和接收时刻。
本发明提供的另一种硬件记录机制, 可参阅图 5-d, 具体方式如下: 作为发送端的时钟设备(如主时钟设备或从时钟设备), 在发送时间同 步消息(如 Sync消息或 De 1 ay.Req消息 )时, 通过硬件将该时间同步消息 通过 RF发出的时隙中的第一个符号的起始时刻 ta6和 t。6记录下来, 作为该 时间同步消息通过 RF发出的时刻, 相应的, 作为接收端的时钟设备(如从 时钟设备或主时钟设备), 在接收到该时间同步消息时, 通过硬件将空口物 理层接收到时间同步消息的时隙中的第一个符号的起始时刻 tb6和 td6记录下 来, 作为空口物理层接收到该时间同步报文的时刻, 由图 5-d可见, 时间 同步消息在传输过程中的延时 de lay和 de lay'是对称, 通过此硬件记录方 式同样可以较为精确的记录时间同步消息的发送时刻和接收时刻。
由上可见, 本实施例中, 通过硬件记录的方式获取主从时钟设备在空 口物理层发送和接收时间同步报文的时刻, 剔除了因物理层调制解调等处 理的时延和抖动而对获取时间同步 4艮文的发送和接收时刻的精确度的影 响, 提高了获取时间同步报文的发送和接收时刻的精确度, 利用该获取的 更高精确度的时间同步消息的发送和接收时刻信息进行主从时钟设备的时 间同步, 能够相应提高主从时钟设备的时间同步精度。 下面对基于本发明实施例的上述方法的主时钟设备进行描述, 如图 6 所示, 本发明实施例提供的一种主时钟设备, 包括:
收发模块 601 , 用于向从时钟设备发送第一时间同步消息, 并获取上述 第一时间同步消息通过 RF发出的时刻
获取模块 602,用于获取收发模块 601通过射频发出第一时间同步消息 的时刻
在一种应用场景下, 获取模块 602具体可用于根据上述第一时间同步 消息的调度信息, 获取第一时间同步消息通过 RF发出的时刻 或者通 过硬件记录第一时间同步消息通过 RF发出的时刻 1\。
在实际应用中, 获取模块 602可包括:
获取模块一, 用于根据上述第一时间同步消息的调度信息, 获取上述 第一时间同步消息通过射频发出的对应时隙;
和,
处理模块一, 用于根据本地时钟和获取模块一获取的时隙计算出发送 上述时隙中的最后一个符号的结束时刻, 将其作为上述第一时间同步消息 通过射频发出的时刻 或, 根据本地时钟和获取模块一获取的时隙计算 出发送上述时隙中的最后一个符号的起始时刻, 将其作为上述第一时间同 步消息通过射频发出的时刻 或者, 根据本地时钟和获取模块一获取的 时隙计算出发送上述时隙中的第一个符号的起始时刻, 将其作为上述第一 时间同步消息通过射频发出的时刻 1\。
收发模块 601还用于向从时钟设备发送第二时间同步消息, 并在上述 第二时间同步消息中携带 T i的时间戳;
收发模块 601还用于接收由上述从时钟设备发送的第三时间同步消息; 获取模块 602, 还用于根据收发模块 601接收的第三时间同步消息, 获 取空口物理层接收上述第三时间同步消息的时刻 T4;
在一种应用场景下, 获取模块 602具体可用于根据上述第三时间同步 消息的调度信息, 获取在空口物理层接收到上述第三时间同步消息的时刻 τ4;或者通过硬件记录空口物理层接收到上述第三时间同步消息的时刻 τ4
在实际应用中, 获取模块 602包括:
获取模块二, 用于根据上述第三时间同步消息的调度信息, 获取空口 物理层接收上述第三时间同步消息的对应时隙;
和,
处理模块二, 用于根据本地时钟和获取模块二获取的时隙计算出空口 物理层接收到上述时隙中的第一个符号的起始时刻, 将其作为上述主时钟 设备在空口物理层接收到上述第三时间同步消息的时刻 Τ4, 或者, 根据本 地时钟和获取模块二获取的计算出空口物理层接收到上述时隙中的第二个 符号的起始时刻, 将其作为上述主时钟设备在空口物理层接收到上述第三 时间同步消息的时刻 τ4
收发模块 601还用于向上述从时钟设备发送第四时间同步消息, 并在 上述第四时间同步消息中携带 Τ4的时间戳; 以便于上述从时钟设备根据 Ί1 和 Τ4计算上述从时钟设备与上述主时钟设备的时钟偏移量, 并根据计算的 时钟偏移量, 对上述从时钟设备的本地时钟进行修正。
进一步的, 在一种应用场景下, 收发模块 601 还可用于接收上述从时 钟设备通过扩展 1588ν2协议发送的新增消息如可以是跟随报文 Fo 1 1 ow.up , 获取模块 602还可用于获取上述新增消息中携带的 Τ3的时间戳。
在一种应用场景下, 第一时间同步消息例如是时间同步报文 Sync或其 它消息; 第二时间同步消息例如是跟随 4艮文 Fo 1 1 ow_ up或其它消息; 第三 时间同步消息例如是延迟请求报文 De lay-Req或其它消息; 第四时间同步 消息例如是延迟响应报文 De lay-Re sp或其它消息。
需要说明的是, 本实施例的主时钟设备可如上述方法实施例中的主时 钟设备, 可以用于实现上述方法实施例中的全部技术方案, 其各个功能模 块的功能可以根据上述方法实施例中的方法具体实现, 其具体实现过程可 参照上述实施例中的相关描述, 此处不再赘述。
由上可见, 本实施例中, 主时钟设备通过获取模块 602 获取第一时间 同步消息通过 RF 发出的时刻和空口物理层接收到第三时间同步消息的时 刻, 并通过收发模块 601 把上述两个时刻的时间戳分别通过第二时间同步 消息和第四时间同步消息发送给从时钟设备, 使得该从时钟设备可以获知 主时钟设备通过 RF发出第一时间同步消息以及在空口物理层接收到第三时 间同步消息的时刻, 相应提高了从时钟设备后续计算其与主时钟设备的时 钟偏移量的准确性, 利用更准确的计算结果来对从时钟设备的本地时钟进 行修正, 提高了主从时钟设备的时间同步精度。
所示, 本发明实施例提供的一种从时钟设备, 包括:
收发模块 701 , 用于接收由主时钟设备发送的第一时间同步消息; 获取模块 702 , 用于根据收发模块 701接收的第一时间同步消息, 获取 空口物理层接收到上述第一时间同步消息的时刻 T2;
在一种应用场景下, 获取模块 702具体可用于根据上述第一时间同步 消息的调度信息, 获取空口物理层接收到第一时间同步消息的时刻 Τ2; 或 者通过硬件记录空口物理层接收到第一时间同步消息的时刻 Τ2
其中, 在实际应用中, 获取模块 702可包括:
第一获取模块, 用于根据上述第一时间同步消息的调度信息, 获取空 口物理层接收上述第一时间同步消息的对应时隙;
和,
第一处理模块, 用于根据本地时钟和第一获取模块获取的时隙计算出 空口物理层接收到上述时隙中的第一个符号的起始时刻, 将其作为上述从 时钟设备在空口物理层接收到上述第一时间同步消息的时刻 Τ2, 或者, 根 据本地时钟和第一获取模块获取的时隙计算出空口物理层接收到上述时隙 中的第二个符号的起始时刻, 将其作为上述从时钟设备在空口物理层接收 到上述第一时间同步消息的时刻 τ2
收发模块 701还用于接收由上述主时钟设备发送的第二时间同步消息; 获取模块 702还用于从收发模块 701接收的第二时间同步消息中获取 该第二时间同步消息携带的 1\的时间戳, 其中, 上述 1\为上述主时钟设备 通过 RF发出上述第一时间同步消息的时刻;
收发模块 701还用于在接收到第二时间同步消息之后, 向上述主时钟 设备发送第三时间同步消息;
获取模块 702还用于根据收发模块 701发送的第三时间同步消息, 获 取上述第三同步消息通过射频发出的时刻 T3;
在一种应用场景下, 获取模块 702具体用于根据上述第三时间同步消 息的调度信息, 获取第三时间同步消息通过 RF发出的时刻 Τ3; 或者通过 硬件记录第三时间同步消息通过 RF发出的时刻 Τ3
在实际应用中, 获取模块 702可包括:
第二获取模块, 用于根据上述第三时间同步消息的调度信息, 获取上 述第三时间同步消息通过射频发出的对应时隙;
和,
第二处理模块, 用于根据本地时钟和第二处理模块获取的时隙计算出 发送上述时隙中的最后一个符号的结束时刻, 将其作为上述第三时间同步 消息通过射频发出的时刻 Τ3, 或, 根据本地时钟和第二处理模块获取的时 隙计算出发送上述时隙中的最后一个符号的起始时刻, 将其作为上述第三 时间同步消息通过射频发出的时刻 τ3, 或者, 根据本地时钟和第二处理模 块获取的时隙计算出发送上述时隙中的第一个符号的起始时刻, 将其作为 上述第三时间同步消息通过射频发出的时刻 τ3
进一步的, 在一种应用场景下, 收发模块 701还可以用于扩展 1588ν2 协议之后向上述主时钟设备发送新增消息如可以是跟随报文 Follow_up , 其 中,上述新增消息携带上述从时钟设备通过 RF发出上述第三时间同步消息 的时刻 T3
收发模块 701还用于接收由上述主时钟设备发送的第四时间同步消息; 获取模块 702还用于获取上述第四时间同步消息中携带的时刻 Τ4的时 间戳, 其中, 上述 Τ4为上述主时钟设备在空口物理层上接收到上述第三时 间同步消息的时刻;
处理模块 703 , 用于根据上述 Τ2, Τ3和 Τ4, 计算其与上述主时钟 设备的时钟偏移量;
具体的, 计算模块 703 可用于根据下述公式计算其与主从设备之间的 消息平均延迟 Delay,并相应的计算出其与主时钟设备的时钟偏移量 Offset: T2= T!+Delay+Offset; T4= T3+Delay-Offset。
上述两条公式可以变成:
Delay = ( T2- 1\+1> T3 ) 12;
Offset= T2- TV Delay, 即 Offset= ( T2- T T4+ T3 ) /2。
修正模块 704 ,用于根据处理模块 703计算的结果对其本地时钟进行修 正。
根据处理模块 703 计算的结果, 修正模块 704 可以根据时钟偏移量 Off se t对其本地时钟进行修正, 也可以在经过多次主从时钟设备间的时间 同步消息交互过程之后, 对处理模块 703 进行多次运算得到的多个时钟偏 移量 Off se t的值取平均值, 根据该平均值对其本地时钟进行修正, 从而达 到与主时钟设备的时间同步。
在一种应用场景下, 第一时间同步消息例如是时间同步报文 Sync或其 它消息; 第二时间同步消息例如是跟随 4艮文 Fo 1 1 ow_ up或其它消息; 第三 时间同步消息例如是延迟请求报文 De lay-Req或其它消息; 第四时间同步 消息例如是延迟响应报文 De lay-Re sp或其它消息。
需要说明的是, 本实施例的从时钟设备可如上述方法实施例中的从时 钟设备, 可以用于实现上述方法实施例中的全部技术方案, 其各个功能模 块的功能可以根据上述方法实施例中的方法具体实现, 其具体实现过程可 参照上述实施例中的相关描述, 此处不再赘述。
由上可见, 本实施例中, 从时钟设备通过获取模块 702 获取空口物理 层接收到第一时间同步消息的时刻 T2 , 获取第三同步消息通过射频发出的 时刻 L, 获取第二时间同步消息中携带的 1\的时间戳以及第四时间同步消 息中携带的 Τ4的时间戳; 并根据获取到的 Τ\ , Τ2 , Τ3和 Τ4更加准确的计算出 其与主时钟设备的时钟偏移量,相应提高了修正模块 704根据处理模块 703 的计算结果对本地时钟进行修正的精确度, 从而提高了主从时钟设备的时 间同步精度。 本发明实施例还提供了实现上述时间同步方法的时间同步系统, 下面 对本发明实施提供的一种时间同步系统进行描述。
请参阅图 8 , 本发明实施例提供的一种时间同步系统, 包括: 主时钟设备 801和从时钟设备 802。
其中, 主时钟设备 801用于向从时钟设备 802发送第一时间同步消息, 并获取第一时间同步消息通过 RF发出的时刻 1\; 向从时钟设备 802发送第 二时间同步消息, 并在该第二时间同步消息中携带 1\的时间戳; 接收由从 时钟设备 802发送的第三时间同步消息, 并获取空口物理层接收到该第三 时间同步消息的时刻 T4; 向从时钟设备 802发送第四时间同步消息, 并在 该第四时间同步消息中携带 Τ 4的时间戳。
从时钟设备 802用于接收由主时钟设备 801发送的第一时间同步消息, 并获取空口物理层接收到该第一时间同步消息的时刻 Τ2; 接收由主时钟设 备 801发送的第二时间同步消息,, 并获取上述第二时间同步消息中携带的 时刻 1\的时间戳, 其中, 上述 1\为主时钟设备 801通过 RF发出上述第一时 间同步消息的时刻; 向主时钟设备 801 发送第三时间同步消息, 并获取第 三时间同步消息通过 RF发出的时刻 Τ3; 接收由主时钟设备 801发送的第四 时间同步消息, 并获取上述第四时间同步消息中携带的时刻 Τ4的时间戳, 其中, 上述 Τ4为主时钟设备 801在空口物理层上接收到上述第三时间同步 消息的时刻; 根据上述 Τ\ , Τ2, Τ3和 Τ4计算其与主时钟设备 801的时钟偏移 量; 根据计算的时钟偏移量对其本地时钟进行修正。
本实施例中的主时钟设备 801的结构可如图 6所示的主时钟设备。 本实施例中的从时钟设备 802的结构可如图 7所示的从时钟设备。 需要说明的是, 本实施例的主时钟设备 801 可如上述方法实施例中的 主时钟设备, 从时钟设备 802 可如上述方法实施例中的从时钟设备, 其可 以用于实现上述方法实施例中的全部技术方案, 其各个功能模块的功能可 以根据上述方法实施例中的方法具体实现, 其具体实现过程可参照上述实 施例中的相关描述, 此处不再赘述。
由上可见, 本实施例中, 时间同步系统获取时间同步消息通过 RF发出 的时间以及获取空口物理层接收到时间同步消息的时刻, 作为时间同步消 息的发送和接收时刻, 从而, 可剔除因物理层调制解调等处理的时延和抖 动而对获取时间同步消息的发送和接收时刻的精确度的影响, 提高获取时 间同步消息的发送和接收时刻的精确度, 利用该获取的更高精确度的时间 同步消息的发送和接收时刻信息进行主从时钟设备的时间同步, 能够相应 提高主从时钟设备的时间同步精度。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步 骤是可以通过程序来指令相关的硬件完成, 所述的程序可以存储于一种计 算机可读存储介质中, 上述提到的存储介质可以是只读存储器, 磁盘或光 盘等。
以上对本发明所提供的一种时间同步方法和相关设备及系统进行了详 细介绍, 对于本领域的一般技术人员, 依据本发明实施例的思想, 在具体 实施方式及应用范围上均会有改变之处, 综上所述, 本说明书内容不应理 解为对本发明的限制。

Claims

权利要求
1、 一种时间同步方法, 其特征在于, 包括:
主时钟设备向从时钟设备发送第一时间同步消息, 并获取所述第一时 间同步消息通过射频发出的时刻
主时钟设备向所述从时钟设备发送第二时间同步消息, 并在所述第二 时间同步消息中携带所述 1\的时间戳;
主时钟设备接收由所述从时钟设备发送的第三时间同步消息, 并获取 空口物理层接收到所述第三时间同步消息的时刻 τ4;
主时钟设备向所述从时钟设备发送第四时间同步消息, 并在所述第四 时间同步消息中携带所述 Τ4的时间戳, 以便于所述从时钟设备根据所述 1\ 和 τ4计算所述从时钟设备与所述主时钟设备的时钟偏移量, 并根据计算的 所述时钟偏移量, 对所述从时钟设备的本地时钟进行修正。
2、 根据权利要求 1所述的方法, 其特征在于,
所述获取所述第一时间同步消息通过射频发出的时刻 具体为: 根据所述第一时间同步消息的调度信息, 获取所述第一时间同步消息 通过射频发出的时刻
或者, 通过硬件记录所述第一时间同步消息通过射频发出的时刻 1\。
3、 根据权利要求 2所述的方法, 其特征在于,
所述根据所述第一时间同步消息的调度信息, 获取所述第一时间同步 消息通过射频发出的时刻 具体为:
根据所述第一时间同步消息的调度信息, 获取所述第一时间同步消息 通过射频发出的对应时隙;
根据本地时钟和所述时隙计算出发送所述时隙中的最后一个符号的结 束时刻, 将其作为所述第一时间同步消息通过射频发出的时刻 或, 根 据本地时钟和所述时隙计算出发送所述时隙中的最后一个符号的起始时 刻, 将其作为所述第一时间同步消息通过射频发出的时刻 或者, 根据 本地时钟和所述时隙计算出发送所述时隙中的第一个符号的起始时刻, 将 其作为所述第一时间同步消息通过射频发出的时刻 1\。
4、 根据权利要求 1所述的方法, 其特征在于, 所述获取空口物理层接 收到所述第三时间同步消息的时刻 T4, 具体为:
根据所述第三时间同步消息的调度信息, 获取在空口物理层接收到所 述第三时间同步消息的时刻 Τ4
或者, 通过硬件记录空口物理层接收到所述第三时间同步消息的时刻 τ4
5、 根据权利要求 4所述的方法, 其特征在于,
所述根据所述第三时间同步消息的调度信息, 获取在空口物理层接收 到所述第三时间同步消息的时刻 Τ4, 具体为:
根据所述第三时间同步消息的调度信息, 获取空口物理层接收所述第 三时间同步消息的对应时隙;
根据本地时钟和所述时隙计算出空口物理层接收到所述时隙中的第一 个符号的起始时刻, 将其作为所述主时钟设备在空口物理层接收到所述第 三时间同步消息的时刻 Τ4, 或者, 根据本地时钟和所述时隙计算出空口物 理层接收到所述时隙中的第二个符号的起始时刻, 将其作为所述主时钟设 备在空口物理层接收到所述第三时间同步消息的时刻 Τ4
6、 根据权利要求 1至 5中任一项所述的方法, 其特征在于, 所述第一时间同步消息是时间同步 ·^艮文 Sync;
所述第二时间同步消息是跟随报文 Follow_up;
所述第三时间同步消息是延迟请求报文 Delay_Req;
所述第四时间同步消息是延迟响应报文 Delay_Resp。
7、 一种时间同步方法, 其特征在于, 包括:
从时钟设备接收由主时钟设备发送的第一时间同步消息, 并获取空口 物理层接收到所述第一时间同步消息的时刻 T2;
从时钟设备接收由所述主时钟设备发送的第二时间同步消息, 并获取 所述第二时间同步消息中携带 1 的时间戳, 其中, 所述 1\为所述主时钟设 备通过射频发出所述第一时间同步消息的时刻;
从时钟设备向所述主时钟设备发送第三时间同步消息, 并获取所述第 三时间同步消息通过射频发出的时刻 Τ3; 从时钟设备接收由所述主时钟设备发送的第四时间同步消息, 并获取 所述第四时间同步消息中携带的 τ4的时间戳, 其中, 所述 τ4为所述主时钟 设备在空口物理层上接收到所述第三时间同步消息的时刻;
从时钟设备根据所述 1\、 τ2、 τ3和 τ4计算所述从时钟设备与所述主时 钟设备的时钟偏移量;
从时钟设备根据计算的所述时钟偏移量, 对所述从时钟设备的本地时 钟进行修正。
8、 根据权利要求 7所述的方法, 其特征在于, 所述获取空口物理层接 收到所述第一时间同步消息的时刻 Τ2, 具体为:
根据所述第一时间同步消息的调度信息, 获取空口物理层接收到所述 第一时间同步消息的时刻 Τ2;
或者, 通过硬件记录空口物理层接收到所述第一时间同步消息的时刻 τ2
9、 根据权利要求 8所述的方法, 其特征在于,
所述根据所述第一时间同步消息的调度信息, 获取在空口物理层接收 到所述第一时间同步消息的时刻 Τ2, 具体为:
根据所述第一时间同步消息的调度信息, 获取空口物理层接收所述第 一时间同步消息的对应时隙, 根据本地时钟和所述时隙计算出空口物理层 接收到所述时隙中的第一个符号的起始时刻, 将其作为所述从时钟设备在 空口物理层接收到所述第一时间同步消息的时刻 Τ2, 或者, 根据本地时钟 和所述时隙计算出空口物理层接收到所述时隙中的第二个符号的起始时 刻, 将其作为所述从时钟设备在空口物理层接收到所述第一时间同步消息 的时刻 Τ2
10、 根据权利要求 7所述的方法, 其特征在于, 所述获取所述第三时 间同步消息通过射频发出的时刻 Τ3, 具体为:
根据所述第三时间同步消息的调度信息, 获取所述第三时间同步消息 通过射频发出的时刻 Τ3;
或者, 通过硬件记录所述第三时间同步消息通过射频发出的时刻 Τ3
11、 根据权利要求 10所述的方法, 其特征在于, 所述根据所述第三时间同步消息的调度信息, 获取所述第三时间同步 消息通过射频发出的时刻 T3, 具体为:
根据所述第三时间同步消息的调度信息, 获取所述第三时间同步消息 通过射频发出的对应时隙, 根据本地时钟和所述时隙计算出发送所述时隙 中的最后一个符号的结束时刻, 将其作为所述第三时间同步消息通过射频 发出的时刻 τ3, 或, 根据本地时钟和所述时隙计算出发送所述时隙中的最 后一个符号的起始时刻, 将其作为所述第三时间同步消息通过射频发出的 时刻 τ3, 或者, 根据本地时钟和所述时隙计算出发送所述时隙中的第一个 符号的起始时刻,将其作为所述第三时间同步消息通过射频发出的时刻 τ3
12、 一种主时钟设备, 其特征在于, 包括:
收发模块, 用于向从时钟设备发送第一时间同步消息;
获取模块, 用于获取所述收发模块通过射频发出所述第一时间同步消 息的时刻
所述收发模块还用于向所述从时钟设备发送第二时间同步消息, 并在 所述第二时间同步消息中携带所述 1\的时间戳;
所述收发模块还用于接收由所述从时钟设备发送的第三时间同步消 息;
所述获取模块还用于根据所述收发模块接收的所述第三时间同步消 息, 获取空口物理层接收所述第三时间同步消息的时刻 τ4;
所述收发模块还用于向所述从时钟设备发送第四时间同步消息, 并在 所述第四时间同步消息中携带所述 τ4的时间戳; 以便于所述从时钟设备根 据所述 1\和 τ4计算所述从时钟设备与所述主时钟设备的时钟偏移量,并根 据计算的所述时钟偏移量, 对所述从时钟设备的本地时钟进行修正。
13、 根据权利要求 12所述的主时钟设备, 其特征在于,
所述获取模块具体用于根据所述第一时间同步消息的调度信息, 获取 所述第一时间同步消息通过射频发出的时刻 或者通过硬件记录所述第 一时间同步消息通过射频发出的时刻 1\。
14、 根据权利要求 13所述的主时钟设备, 其特征在于, 所述获取模块 包括: 获取模块一, 用于根据所述第一时间同步消息的调度信息, 获取所述 第一时间同步消息通过射频发出的对应时隙;
处理模块一, 用于根据本地时钟和所述获取模块一获取的时隙计算出 发送所述时隙中的最后一个符号的结束时刻, 将其作为所述第一时间同步 消息通过射频发出的时刻 1\, 或, 根据本地时钟和所述获取模块一获取的 时隙计算出发送所述时隙中的最后一个符号的起始时刻, 将其作为所述第 一时间同步消息通过射频发出的时刻 或者, 根据本地时钟和所述获取 模块一获取的时隙计算出发送所述时隙中的第一个符号的起始时刻, 将其 作为所述第一时间同步消息通过射频发出的时刻 1\。
15、 根据权利要求 12所述的主时钟设备, 其特征在于,
所述获取模块具体用于根据所述第三时间同步消息的调度信息, 获取 在空口物理层接收到所述第三时间同步消息的时刻 T4; 或者通过硬件记录 空口物理层接收到所述第三时间同步消息的时刻 Τ4
16、 根据权利要求 15所述的主时钟设备, 其特征在于, 所述获取模块 包括;
获取模块二, 用于根据所述第三时间同步消息的调度信息, 获取空口 物理层接收所述第三时间同步消息的对应时隙;
处理模块二, 用于根据本地时钟和所述获取模块二获取的时隙计算出 空口物理层接收到所述时隙中的第一个符号的起始时刻, 将其作为所述主 时钟设备在空口物理层接收到所述第三时间同步消息的时刻 Τ4, 或者, 根 据本地时钟和所述获取模块二获取的计算出空口物理层接收到所述时隙中 的第二个符号的起始时刻, 将其作为所述主时钟设备在空口物理层接收到 所述第三时间同步消息的时刻 Τ4
17、 一种从时钟设备, 其特征在于, 包括:
收发模块, 用于接收由主时钟设备发送的第一时间同步消息; 获取模块, 用于根据所述收发模块接收的第一时间同步消息, 获取空 口物理层接收到所述第一时间同步消息的时刻 Τ2;
所述收发模块还用于接收由所述主时钟设备发送的第二时间同步消 息, 所述第二时间同步消息携带 1\的时间戳; 所述获取模块还用于从所述收发模块接收的所述第二时间同步消息中 获取所述第二时间同步消息中携带 1\的时间戳, 其中, 所述 1\为所述主时 钟设备通过射频发出所述第一时间同步消息的时刻;
所述收发模块还用于向所述主时钟设备发送第三时间同步消息; 所述获取模块还用于根据所述收发模块发送的第三时间同步消息, 获 取所述第三同步消息通过射频发出的时刻 τ3;
所述收发模块还用于接收由所述主时钟设备发送的第四时间同步消 息;
所述获取模块还用于获取所述第四时间同步消息中携带的 τ4的时间 戳, 其中, 所述 τ4为所述主时钟设备在空口物理层上接收到所述第三时间 同步消息的时刻;
处理模块, 用于根据所述获取模块获取的 1\、 τ2、 τ3和 τ4计算所述从 时钟设备与所述主时钟设备的时钟偏移量;
修正模块, 用于根据所述处理模块计算的所述时钟偏移量, 对所述从 时钟设备的本地时钟进行修正。
18、 根据权利要求 17所述的从时钟设备, 其特征在于,
所述获取模块具体用于根据所述第一时间同步消息的调度信息, 获取 空口物理层接收到所述第一时间同步消息的时刻 Τ2; 或者, 通过硬件记录 空口物理层接收到所述第一时间同步消息的时刻 Τ2
19、 根据权利要求 18所述的从时钟设备, 其特征在于, 所述获取模块 包括:
第一获取模块, 用于根据所述第一时间同步消息的调度信息, 获取空 口物理层接收所述第一时间同步消息的对应时隙;
第一处理模块, 用于根据本地时钟和所述第一获取模块获取的时隙计 算出空口物理层接收到所述时隙中的第一个符号的起始时刻, 将其作为所 述从时钟设备在空口物理层接收到所述第一时间同步消息的时刻 Τ2,或者, 根据本地时钟和所述第一获取模块获取的时隙计算出空口物理层接收到所 述时隙中的第二个符号的起始时刻, 将其作为所述从时钟设备在空口物理 层接收到所述第一时间同步消息的时刻 Τ2
20、 根据权利要求 17所述的从时钟设备, 其特征在于,
所述获取模块具体用于根据所述第三时间同步消息的调度信息, 获取 所述第三时间同步消息通过射频发出的时刻 T3; 或者, 通过硬件记录所述 第三时间同步消息通过射频发出的时刻 Τ3
21、 根据权利要求 20所述的从时钟设备, 其特征在于, 所述的获取模 块包括:
第二获取模块, 用于根据所述第三时间同步消息的调度信息, 获取所 述第三时间同步消息通过射频发出的对应时隙;
第二处理模块, 用于根据本地时钟和所述第二获取模块获取的时隙计 算出发送所述时隙中的最后一个符号的结束时刻, 将其作为所述第三时间 同步消息通过射频发出的时刻 Τ3, 或, 根据本地时钟和所述第二获取模块 获取的时隙计算出发送所述时隙中的最后一个符号的起始时刻, 将其作为 所述第三时间同步消息通过射频发出的时刻 Τ3, 或者, 根据本地时钟和所 述第二获取模块获取的时隙计算出发送所述时隙中的第一个符号的起始时 刻, 将其作为所述第三时间同步消息通过射频发出的时刻 Τ3
22、 一种时间同步系统, 其特征在于, 包括:
主时钟设备, 用于向从时钟设备发送第一时间同步消息, 并获取所述 第一时间同步消息通过射频发出的时刻 向所述从时钟设备发送第二时 间同步消息, 并在所述第二时间同步消息中携所述 1\的时间戳; 接收由所 述从时钟设备发送的第三时间同步消息, 并获取空口物理层接收到所述第 三时间同步消息的时刻 Τ4; 向所述从时钟设备发送第四时间同步消息, 并 在所述第四时间同步消息中携带所述 Τ4的时间戳;
从时钟设备, 用于接收所述主时钟设备发送的第一时间同步消息, 并 获取空口物理层接收到所述第一时间同步消息的时刻 Τ2; 接收由所述主时 钟设备发送的第二时间同步消息, 并获取所述第二时间同步消息中携带的 时刻 1\的时间戳,所述 1\为所述主时钟设备通过射频发出所述第一时间同 步消息的时刻; 向所述主时钟设备发送第三时间同步消息, 并获取所述第 三时间同步消息通过射频发出的时刻 Τ3; 接收由所述主时钟设备发送的第 四时间同步消息 ,并获取所述第四时间同步消息中携带的时刻 Τ4的时间戳 , 所述 T4为所述主时钟设备在空口物理层上接收到所述第三时间同步消息的 时刻; 根据所述 1\、 τ2、 τ3和 τ4计算所述从时钟设备与主时钟设备的时钟 偏移量; 根据计算的时钟偏移量, 对所述从时钟设备的本地时钟进行修正。
PCT/CN2011/081373 2010-10-27 2011-10-27 时间同步方法和相关设备及系统 Ceased WO2012055360A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010527699.9 2010-10-27
CN201010527699.9A CN102457371B (zh) 2010-10-27 2010-10-27 时间同步方法和相关设备及系统

Publications (1)

Publication Number Publication Date
WO2012055360A1 true WO2012055360A1 (zh) 2012-05-03

Family

ID=45993173

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/081373 Ceased WO2012055360A1 (zh) 2010-10-27 2011-10-27 时间同步方法和相关设备及系统

Country Status (2)

Country Link
CN (1) CN102457371B (zh)
WO (1) WO2012055360A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103945523A (zh) * 2014-04-21 2014-07-23 中国联合网络通信集团有限公司 一种实现时间同步的方法和系统

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103118029A (zh) * 2013-02-18 2013-05-22 中兴通讯股份有限公司 一种加密报文互传时间同步方法及装置
CN104581923B (zh) * 2013-10-25 2018-08-28 上海无线通信研究中心 通过无线链路传输精确时间信息的方法
CN108781162A (zh) * 2015-12-31 2018-11-09 华为技术有限公司 一种网络节点、报文传输方法和网络
CN106488550B (zh) * 2016-12-20 2019-11-12 华为技术有限公司 确定终端与基站时钟时间偏差的方法与装置
CN106895953B (zh) * 2017-01-25 2019-04-12 浙江大学 溃坝实验中多种测量仪器的时间同步方法
CN110324889B (zh) * 2018-03-30 2021-02-09 华为技术有限公司 时钟同步方法、通信装置及通信设备
CN109068384A (zh) * 2018-08-23 2018-12-21 平安科技(深圳)有限公司 一种时间同步方法及系统
CN110944379B (zh) * 2018-09-25 2022-03-01 维沃移动通信有限公司 时间校准的方法和设备
CN111432465B (zh) * 2019-01-09 2021-06-22 华为技术有限公司 一种同步方法及装置
CN111147177B (zh) * 2019-12-16 2022-04-05 国家电网有限公司大数据中心 一种面向智能电网的移动网络授时方法和系统
CN113132041B (zh) * 2019-12-31 2022-03-04 中移(成都)信息通信科技有限公司 一种数据传输延时的计算方法和装置
CN113260038A (zh) * 2020-02-07 2021-08-13 维沃移动通信有限公司 参考时间信息的获取方法、信息收发方法及相关设备
CN113765839B (zh) * 2020-06-03 2022-07-29 华为技术有限公司 空口时间同步方法及设备
CN112838903B (zh) * 2020-12-31 2022-08-26 广东大普通信技术股份有限公司 一种时钟同步方法、设备及存储介质
CN113381832B (zh) * 2021-06-09 2022-11-15 北京紫玉伟业电子科技有限公司 一种基于fpga平台的精确时间同步方法
CN117155499A (zh) * 2022-05-24 2023-12-01 华为技术有限公司 一种时钟同步方法、序列号生成方法和装置
CN115276866B (zh) * 2022-06-02 2024-05-14 智己汽车科技有限公司 一种智能驾驶系统的时钟同步方法及设备
CN115765911A (zh) * 2022-11-11 2023-03-07 深圳市镭神智能系统有限公司 以太网的时间同步方法、系统及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080075217A1 (en) * 2006-09-22 2008-03-27 Ilnicki Slawomir K Mechanism For Making Delay From Network Elements Transparent To IEEE 1588 Protocols
CN101242230A (zh) * 2007-02-05 2008-08-13 汤姆森许可贸易公司 时钟同步辅助设备以及关联的时钟同步设备
CN101800613A (zh) * 2010-02-09 2010-08-11 瑞斯康达科技发展股份有限公司 一种包交换网络的抖动消除方法和装置
CN101834712A (zh) * 2010-04-19 2010-09-15 浙江大学 利用ieee1588协议实现精确时间同步的方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080075217A1 (en) * 2006-09-22 2008-03-27 Ilnicki Slawomir K Mechanism For Making Delay From Network Elements Transparent To IEEE 1588 Protocols
CN101242230A (zh) * 2007-02-05 2008-08-13 汤姆森许可贸易公司 时钟同步辅助设备以及关联的时钟同步设备
CN101800613A (zh) * 2010-02-09 2010-08-11 瑞斯康达科技发展股份有限公司 一种包交换网络的抖动消除方法和装置
CN101834712A (zh) * 2010-04-19 2010-09-15 浙江大学 利用ieee1588协议实现精确时间同步的方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103945523A (zh) * 2014-04-21 2014-07-23 中国联合网络通信集团有限公司 一种实现时间同步的方法和系统

Also Published As

Publication number Publication date
CN102457371A (zh) 2012-05-16
CN102457371B (zh) 2014-07-30

Similar Documents

Publication Publication Date Title
WO2012055360A1 (zh) 时间同步方法和相关设备及系统
EP3550899B1 (en) Method and apparatus for determining clock time deviation between terminal and base station
US11503557B2 (en) Time synchronization in integrated 5G wireless and time-sensitive networking systems
US11470568B2 (en) Synchronizing TSN master clocks in wireless networks
CN102111380B (zh) 一种时间同步的方法、设备及系统
CN110324889B (zh) 时钟同步方法、通信装置及通信设备
CN112314017A (zh) 用于支持基于精度定时协议(ptp)的时间敏感网络(tsn)应用的时间同步无线电承载
CN102013931B (zh) 时间同步方法及系统、从属定时设备及主定时设备
US10129839B2 (en) Techniques for synchronizing timing of wireless streaming transmissions to multiple sink devices
US10237836B2 (en) Frequency and phase synchronization using full duplex radios over wireless mesh networks
CN102769906B (zh) 一种家庭型基站的同步方法及家庭型基站
US20190059066A1 (en) Time Synchronization Between Nodes Connected by a Wireless Network
CN111869138A (zh) 时钟同步的方法和第一设备
CN102244603B (zh) 传输承载时间的报文的方法、设备及系统
TW202029790A (zh) 蜂巢運載工具到萬物覆蓋外的同步
EP3180876B1 (en) Method and apparatus for synchronising a plurality of distributed devices with a network
JP2019518351A (ja) 拡張カバレッジモードにおけるワイヤレス通信デバイスにおけるタイミングアドバンスコマンドの適用
EP3553994A1 (en) Method for exchanging time synchronisation message, and network device
CN110662284A (zh) 修正时间信息的方法和装置
WO2012068844A1 (zh) 一种主从时钟设备的时钟同步方法及系统
CN116458221A (zh) 用于同步无线网络的设备的方法和设备
TW202226875A (zh) 傳播延遲補償方法和相關設備
CN113099527A (zh) 基于定时消息交换的5g无线边缘绝对时间同步方法
WO2010102565A1 (zh) 时间同步的方法、装置和系统
WO2012075921A1 (zh) 实现时间同步的方法及基站

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11835633

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11835633

Country of ref document: EP

Kind code of ref document: A1