CN115189796A - Equipment master clock synchronization method and device based on IEEE1588 protocol - Google Patents

Equipment master clock synchronization method and device based on IEEE1588 protocol Download PDF

Info

Publication number
CN115189796A
CN115189796A CN202211094842.9A CN202211094842A CN115189796A CN 115189796 A CN115189796 A CN 115189796A CN 202211094842 A CN202211094842 A CN 202211094842A CN 115189796 A CN115189796 A CN 115189796A
Authority
CN
China
Prior art keywords
pulse signal
navigation satellite
local
clock
counting
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.)
Granted
Application number
CN202211094842.9A
Other languages
Chinese (zh)
Other versions
CN115189796B (en
Inventor
雷文明
曾振兴
邓勇志
廖启峰
蒋政
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shiju Network Technology Co Ltd
Original Assignee
Guangzhou Shiju Network Technology 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 Guangzhou Shiju Network Technology Co Ltd filed Critical Guangzhou Shiju Network Technology Co Ltd
Priority to CN202211094842.9A priority Critical patent/CN115189796B/en
Publication of CN115189796A publication Critical patent/CN115189796A/en
Application granted granted Critical
Publication of CN115189796B publication Critical patent/CN115189796B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S19/00Satellite radio beacon positioning systems; Determining position, velocity or attitude using signals transmitted by such systems
    • G01S19/01Satellite radio beacon positioning systems transmitting time-stamped messages, e.g. GPS [Global Positioning System], GLONASS [Global Orbiting Navigation Satellite System] or GALILEO
    • G01S19/13Receivers
    • G01S19/24Acquisition or tracking or demodulation of signals transmitted by the system
    • G01S19/25Acquisition or tracking or demodulation of signals transmitted by the system involving aiding data received from a cooperating element, e.g. assisted GPS
    • G01S19/256Acquisition or tracking or demodulation of signals transmitted by the system involving aiding data received from a cooperating element, e.g. assisted GPS relating to timing, e.g. time of week, code phase, timing offset

Abstract

The application discloses a device master clock synchronization method and device based on an IEEE1588 protocol. Aiming at the problems of complex time synchronization and high cost, the following technical scheme is provided, when an initial navigation satellite pulse signal of a navigation satellite is obtained, a master clock of local equipment sends an initial local pulse signal; when a first local pulse signal and a first navigation satellite pulse signal are respectively obtained, a time counter respectively records a first counting time and a second counting time; calculating the difference value between the first counting number and the second counting number; when the difference value exceeds a preset range, comparing the first counting number with the second counting number; and when the first counting number is greater than the second counting number, reducing the stepping value of the time counter to synchronize the first local pulse signal and the first navigation satellite pulse signal. The local master clock is adjusted through the time counter, an additional mechanism is not needed to ensure that the navigation satellite clock is synchronous with the local clock, and the complexity and the cost of time synchronization are reduced.

Description

Equipment master clock synchronization method and device based on IEEE1588 protocol
Technical Field
The present application relates to the field of communications technologies, and in particular, to a device master clock synchronization method and apparatus based on an IEEE1588 protocol.
Background
IEEE1588 defines Precision Time Protocol (PTP) for sub-microsecond synchronization of clocks in sensors, actuators and other terminals in standard ethernet or other distributed bus systems using multicast technology. In the synchronization process of the system, a master clock of the master device periodically issues PTP time synchronization and time information, a slave clock of the slave device receives timestamp information of the master clock of the master device, the system calculates master-slave line time delay and master-slave time difference according to the information, and adjusts local time by using the time difference, so that the time of the slave device keeps frequency and phase consistent with the time of the master device. The clock signal of the master clock of the local device is used as a follow-up standard of the clock signal of the slave clock of the local device, and has a great significance for leading the working time of the whole local device, so that the synchronization accuracy of the master clock and the navigation satellite clock is ensured.
In a real communication device, a phase deviation occurs between the second pulse of the clock of the navigation satellite and the second pulse of the master clock of the communication device due to the influence of the stability of the reception device of the navigation satellite signal and the ambient temperature of the communication device, that is, the second pulse drifts.
There is a technique of converting a navigation satellite signal into a pulse per second signal and generating a synchronization reference signal based on the pulse per second signal; processing one path of frequency division signal of the VCXO module to be consistent with the frequency of the synchronous reference signal; calculating a phase difference value of the synchronous reference signal and the frequency division signal; converting the phase difference value into a frequency difference value and further converting the frequency difference value into a direct current deviation rectifying voltage value; and performing voltage control correction on the VCXO module according to the direct-current deviation correcting voltage value. The frequency of the second pulse of the local clock is adjusted through the VCXO module, so that the second pulse of the local clock follows the second pulse of the clock of the navigation satellite, and the aim of synchronization is fulfilled.
In the process of implementing the prior art, the inventor finds that:
this prior art requires an additional VCXO chip and related pll control chip circuit components to synchronize the local clock with the navigation satellite clock, which is costly to manufacture and has complex time synchronization steps.
Disclosure of Invention
Aiming at the defects in the prior art, a first object of the present application is to provide a device master clock synchronization method based on IEEE1588 protocol, in which the time of the pulse per second sent by the master clock of the local device is adjusted by the time counter of the local device, so that the navigation satellite clock is synchronized with the local master clock, no additional mechanism is required, and the complexity and cost of time synchronization are reduced.
In order to achieve the purpose, the application provides the following technical scheme:
an equipment master clock synchronization method based on an IEEE1588 protocol comprises the following steps:
when an initial navigation satellite pulse signal of a clock signal of a navigation satellite is acquired, a main clock of local equipment sends an initial local pulse signal;
when a first local pulse signal adjacent to the initial local pulse signal is obtained, a time counter records a first counting number;
when a first navigation satellite pulse signal adjacent to the initial navigation satellite pulse signal is acquired, the time counter records a second counting time;
calculating a count number difference between the first count number and the second count number;
when the counting number difference exceeds a preset range, judging whether the first counting number is greater than the second counting number;
when the first count number is greater than the second count number, the step value of the time counter is decreased to synchronize the first local pulse signal with the first navigation satellite pulse signal, thereby synchronizing the clock signal of the master clock of the local device with the clock signal of the navigation satellite.
Further, when an initial navigation satellite pulse signal of a clock signal of a navigation satellite is acquired, a master clock of the local device sends out an initial local pulse signal, which specifically includes the following steps:
when an initial navigation satellite pulse signal of a clock signal of a navigation satellite is acquired, detecting the upper edge of the initial navigation satellite pulse signal;
when the upper edge of the initial navigation satellite pulse signal is detected, the master clock of the local device sends out an initial local pulse signal.
Further, when a first local pulse signal adjacent to the initial local pulse signal is acquired, the time counter records a first count number, which specifically includes the following steps:
when a first local pulse signal adjacent to the initial local pulse signal is acquired, detecting an upper edge or a lower edge of the first local pulse signal;
when an upper edge or a lower edge of the first local pulse signal is detected, the time counter records a first count number.
Further, when a first navigation satellite pulse signal adjacent to the initial navigation satellite pulse signal is acquired, the time counter records a second counting time, which specifically includes the following steps:
when a first navigation satellite pulse signal adjacent to the initial navigation satellite pulse signal is obtained, detecting the upper edge or the lower edge of the first navigation satellite pulse signal;
when the upper edge or the lower edge of the first navigation satellite pulse signal is detected, the time counter records a second counting number.
Further, when the first count number is greater than the second count number, the step value of the time counter is decreased, specifically including the steps of:
when the first counting number is greater than the second counting number, judging whether the difference value of the counting numbers is greater than a first preset threshold value;
when the difference value of the counting times is larger than a first preset threshold value, reducing the stepping value of the time counter according to a first step change value;
and when the difference value of the counting times is smaller than a first preset threshold value and larger than a second preset threshold value, reducing the step value of the time counter according to a second step change value, wherein the second step change value is smaller than the first step change value, and the first preset threshold value is larger than the second preset threshold value.
Further, the clock signal of the navigation satellite comes from a GPS satellite and/or a Beidou satellite.
Furthermore, a main clock of the local device is in communication connection with a forward card and/or an extension unit and/or a remote radio frequency module, and the forward card, the extension unit and the remote radio frequency module are all used for acquiring clock signals of the navigation satellite.
In view of the defects in the prior art, a second object of the present application is to provide an apparatus master clock synchronization apparatus based on IEEE1588 protocol, which has the advantages of reducing the complexity and cost of time synchronization.
In order to achieve the purpose, the application provides the following technical scheme:
an apparatus master clock synchronization device based on IEEE1588 protocol, comprising:
the device comprises a navigation satellite pulse signal acquisition unit, a first time delay unit and a second time delay unit, wherein the navigation satellite pulse signal acquisition unit is used for acquiring an initial navigation satellite pulse signal of a clock signal of a navigation satellite and a first navigation satellite pulse signal adjacent to the initial navigation satellite pulse signal;
the local pulse signal acquisition unit is used for acquiring an initial local pulse signal sent by a master clock of local equipment and a first local pulse signal adjacent to the initial local pulse signal;
a count number acquisition unit for acquiring a first count number of the time counter in the first local pulse signal and a second count number of the time counter in the first navigation satellite pulse signal;
a calculating unit for calculating a count number difference between the first count number and the second count number;
a counting number difference judging unit for judging whether the counting number difference exceeds a preset range;
the comparison unit is used for judging whether the first counting number is greater than the second counting number or not;
and a time counter step value adjusting unit for adjusting a step value of the time counter to synchronize the first local pulse signal with the first navigation satellite pulse signal, thereby synchronizing a clock signal of a master clock of the local device with a clock signal of the navigation satellite.
Further, the counting number obtaining unit is connected with a pulse signal edge detecting unit, the pulse signal edge detecting unit is used for detecting the upper edge or the lower edge of the pulse signal, and the pulse signal edge detecting unit is connected with the time counter.
Further, still include:
the first preset threshold value judging unit is used for judging whether the difference value of the counting times is larger than a first preset threshold value or not;
and the second preset threshold value judging unit is used for judging whether the difference value of the counting times is smaller than the first preset threshold value and larger than the second preset threshold value, the first preset threshold value is larger than the second preset threshold value, and the first preset threshold value judging unit and the second preset threshold value judging unit are both in communication connection with the time counter stepping value adjusting unit.
In summary, the present application has the following beneficial effects:
the time of the main clock of the local equipment sending the second pulse signal is adjusted through the time counter, so that the time of the main clock sending the second pulse signal always follows the acquisition time of the second pulse signal of the navigation satellite, and the clock synchronization of the local equipment and the navigation satellite is realized. Compared with a method for adjusting the clock frequency through a VCXO chip and a related phase-locked loop control chip circuit, the method and the device ensure the synchronization of the navigation satellite clock and the local clock on the premise of not adjusting the main clock of the local device by an additional mechanism, simplify the signal processing process and reduce the complexity and cost of time synchronization.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic diagram illustrating steps of a device master clock synchronization method based on IEEE1588 protocol.
Fig. 2 is a schematic diagram illustrating a specific step of the master clock of the local device in fig. 1 sending out an initial local pulse signal.
Fig. 3 is a schematic diagram illustrating a specific step of the time counter of fig. 1 recording a first count number.
Fig. 4 is a diagram illustrating a specific step of the time counter of fig. 1 recording the second count number.
Fig. 5 is a diagram illustrating specific steps of decreasing the step value of the time counter in fig. 1.
Fig. 6 is a schematic structural diagram of a device master clock synchronization apparatus based on IEEE1588 protocol.
100. Device master clock synchronization device
11. Navigation satellite pulse signal acquisition unit
12. Local pulse signal acquisition unit
13. Pulse signal edge detection unit
14. Count number acquisition unit
15. Computing unit
16. Counting number difference judgment unit
17. Comparison unit
18. First preset threshold value judging unit
19. Second preset threshold value judging unit
110. A time counter step value adjusting unit.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only a few embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The application provides a device master clock synchronization method based on an IEEE1588 protocol, referring to fig. 1, comprising the following steps:
s100: when an initial navigation satellite pulse signal of the clock signal of the navigation satellite is acquired, the master clock of the local device sends out an initial local pulse signal.
In the present application, the navigation satellite may be a GPS satellite. The clock signal is a pulsed digital signal having a low level or a high level with a fixed period generated by a clock generator. This pulsed digital signal is a pulse-per-second signal. The clock signal of the navigation satellite is generated by a clock generator of the navigation satellite. The initial navigation satellite pulse signal is the first pulse-per-second signal of the clock signal from the navigation satellite received by the signal receiving apparatus. The initial local pulse signal is the first pulse-per-second signal of the clock signal from the master clock of the local device. The initial navigation satellite pulse signal serves as a reference signal for synchronization of the local device master clock. When the local device receives the initial navigation satellite pulse signal, the master clock of the local device is started immediately. The master clock immediately issues a pulse-per-second signal, i.e., an initial local pulse signal.
It can be understood that, when the initial navigation satellite pulse signal is received, the master clock of the local device is powered on, and the master clock of the local device immediately sends out a second pulse as the initial local pulse signal, so as to achieve synchronization between the initial navigation satellite pulse signal and the initial local pulse signal. And the synchronization of the first pulse signal of the navigation satellite clock and the local equipment main clock is used as a basis for judging whether the clock signal of the subsequent navigation satellite and the second pulse of the clock signal of the local equipment are synchronous or not.
Further, referring to fig. 2, step S100 specifically includes the following steps:
s101: when an initial navigation satellite pulse signal of a clock signal of a navigation satellite is acquired, an upper edge of the initial navigation satellite pulse signal is detected.
S102: when the upper edge of the initial navigation satellite pulse signal is detected, the master clock of the local device sends out an initial local pulse signal.
It can be understood that the clock signal of the master clock of the local device is used as a follow-up standard for the clock signal of the slave clock of the local device, which has a great significance for leading the working time of the local device as a whole, and therefore, the accuracy of the master clock and the navigation satellite is ensured. The clock signal includes not only the high level and the low level of the pulse-per-second signal but also a pulse-per-second edge signal between the high level and the low level. The pulse-per-second edge signal includes an upper edge and a lower edge. The upper edge of the pulse signal is the change of the electrical signal in the circuit from a low voltage to a high voltage. The lower edge of the pulse signal is the change of the electrical signal in the circuit from a high voltage to a low voltage. The time of the upper and lower edges is typically on the order of picoseconds. The time for the upper and lower edges to occur is much shorter relative to the time for the high signal to occur. Therefore, when the edge signal of the initial navigation satellite pulse signal is detected, the main clock of the local equipment is quickly started in a very short time, and the inaccuracy of the time for capturing the second pulse signal caused by the high-level time delay of the second pulse signal is reduced, so that the synchronization precision of the initial navigation satellite pulse signal and the initial local pulse signal is improved, and the accurate synchronization of the initial navigation satellite pulse signal and the initial local pulse signal is realized.
In addition, a pulse signal is generated by first raising the electric signal from a low potential to a high potential, then maintaining the high potential, and finally lowering the high potential to the low potential. That is, the pulse signal generates an upper edge, then maintains a high voltage, and finally generates a lower edge. When the upper edge of the initial navigation satellite pulse signal is detected, a main clock of the local equipment is immediately started, the upper edge of a first second pulse signal sent by the main clock is synchronous with the upper edge of the initial navigation satellite pulse signal, accurate synchronization of the initial navigation satellite pulse signal and the initial local pulse signal is achieved, and therefore an accurate basis is provided for synchronization of a clock signal of a subsequent navigation satellite and a clock signal of the main clock of the local equipment.
S200: when a first local pulse signal adjacent to the initial local pulse signal is acquired, the time counter records a first counting number.
Specifically, the time counter is a 1588 clock counter. The time counter is connected to the master clock of the local device. The time required for the time counter to count once is the step value of the time counter. The step value of the time counter has a unit of nanosecond. When the step value of the time counter is reduced, the time interval of two second pulses sent by the main clock of the local device is reduced, the period of the second pulses sent by the main clock of the local device is shorter, and the frequency of the second pulses sent by the main clock of the local device is higher. The first local pulse signal is the next second pulse signal issued by the local device master clock after the initial local pulse signal was issued. The first count number is a current count number of the time counter when the first local pulse signal is acquired.
It will be appreciated that the number of counts recorded by the time counter multiplied by the step value equals the total time of the current total count. When the counting times are not changed, the step value of the time counter determines the time interval of two adjacent second pulses sent by the main clock. Under the condition that the counting times are not changed, when the stepping value is reduced, the second pulse time interval of the master clock is reduced. As the step value increases, the second pulse interval of the master clock increases. Therefore, the period or frequency of the second pulse signal sent by the local equipment main clock can be adjusted by adjusting the step value of the time counter.
In a specific implementation, when the master clock of the local device is powered on, the master clock of the local device sends out a first second pulse, i.e., an initial local pulse signal. At the same time, the time counter starts counting. When the master clock of the local device issues the second pulse of second, i.e., when the first local pulse signal is issued, the time counter records the number of counts from the start of counting to this time, i.e., the first count.
Further, referring to fig. 3, step S200 specifically includes the following steps:
s201: when a first local pulse signal adjacent to the initial local pulse signal is acquired, an upper edge or a lower edge of the first local pulse signal is detected.
S202: when an upper edge or a lower edge of the first local pulse signal is detected, the time counter records a first count number.
It will be appreciated that the upper edge of the pulse signal is the change in the electrical signal in the circuit from a low voltage to a high voltage. The lower edge of the pulse signal is the change of the electrical signal in the circuit from a high voltage to a low voltage. The time of the upper and lower edges is typically on the order of picoseconds. The time for the upper and lower edges to occur is much shorter relative to the time for the high signal to occur. When the electric signal is at the upper edge or the lower edge, the time counter records the counting times instantly, so that the counting times are more accurate. When the rising edge or the falling edge of the first local pulse signal is detected, the time counter records the counting times, namely the first counting times, and the counting accuracy of the time counter is improved, so that the accuracy of the first counting times is higher.
S300: and when the first navigation satellite pulse signal adjacent to the initial navigation satellite pulse signal is acquired, the time counter records a second counting time.
In this application, the first navigation satellite pulse signal is the next second pulse signal received after the initial navigation satellite pulse signal is received.
In a specific implementation, when the local device receives the second pulse signal from the navigation satellite for the first time, that is, when the initial navigation satellite pulse signal is received, the master clock of the local device is powered on. At the same time, the time counter starts counting. When the local device receives the pulse-per-second signal from the navigation satellite for the second time, that is, when the first navigation satellite pulse signal is received, the time counter records the number of counts at this time, that is, the second count number.
Further, referring to fig. 4, step S300 specifically includes the following steps:
s301: when a first navigation satellite pulse signal adjacent to the initial navigation satellite pulse signal is acquired, detecting an upper edge or a lower edge of the first navigation satellite pulse signal.
S302: when the upper edge or the lower edge of the first navigation satellite pulse signal is detected, the time counter records a second counting number.
It will be appreciated that the time taken for the clock to generate the upper and lower edges of the pulse signal is shorter than the high level of the pulse signal, making the count number of times when the time counter takes the upper and lower edge signals more accurate. When the rising edge or the falling edge of the first navigation satellite pulse signal is detected, the time counter records the counting times, namely the second counting times, the counting accuracy of the time counter is improved, the accuracy of the second counting times is higher, and an accurate data basis is provided for the synchronization of the subsequent local clock signal and the navigation satellite signal.
In addition, both the upper edge and the lower edge can be used as trigger signals for recording counting times by the time counter. One of the upper edge and the lower edge is selected, so that the accuracy of recording the counting times by the time counter can be ensured, and the application range of the method is widened.
S400: a count difference between the first count and the second count is calculated.
It is understood that when the first navigation satellite pulse signal is not synchronized with the first local pulse signal, there is necessarily a difference between the first count number and the second count number, and the difference is supported as data for adjusting the step value of the time counter.
S500: and when the difference value of the counting times exceeds a preset range, judging whether the first counting time is greater than the second counting time.
In this application, the preset range may be a set value input in advance in the local device. And if the difference value of the counting times is within a preset range, synchronizing the first navigation satellite pulse signal and the first local pulse signal. If the difference value of the counting times exceeds the preset range, the first navigation satellite pulse signal and the first local pulse signal are not synchronous, and at this time, the time for the master clock of the local device to send the first local pulse signal needs to be adjusted by adjusting the stepping value of the time counter, so that the difference value of the counting times is within the preset range, and the first navigation satellite pulse signal and the first local pulse signal are synchronous. On the premise of determining to adjust the time counter, judging how to adjust the time counter by judging whether the first counting number is greater than the second counting number, so that the first navigation satellite pulse signal is synchronous with the first local pulse signal.
It will be appreciated that in real-life situations, the first count and the second count may not be exactly ideally equal due to equipment manufacturing errors, environmental factors, etc. As long as the difference value of the counting times of the first counting time and the second counting time is within a reasonable range, the first navigation satellite pulse signal and the first local pulse signal can be considered to be synchronous, and the scheme has practicability. And when the difference value of the counting times exceeds a preset range, comparing the first counting time with the second counting time to provide data support for the step value of the subsequent adjustment time counter.
S600: and when the first counting number is greater than the second counting number, reducing the step value of the time counter to synchronize the first local pulse signal with the first navigation satellite pulse signal, so that the clock signal of the main clock of the local device is synchronized with the clock signal of the navigation satellite.
In this application, when the first count number is greater than the second count number, a time interval between the first local pulse signal and the initial local pulse signal is greater than a time interval between the first navigation satellite pulse signal and the initial navigation satellite pulse signal. That is, the second pulse signal from the master clock of the local device is delayed from the second pulse signal of the navigation satellite. At this time, it is necessary to reduce the time interval of the pulse-per-second signal sent out by the master clock of the local device each time. The time interval of the pulse per second signal sent by the main clock of the ground equipment is reduced by reducing the step value of the time counter, so that the time between the initial local pulse signal and the first local pulse signal is reduced, and the first local pulse signal and the first navigation satellite pulse signal are synchronized.
Likewise, when the first count number is smaller than the second count number, the step value of the time counter is increased. The first count number is smaller than the second count number, that is, the time interval between the first local pulse signal and the initial local pulse signal is smaller than the time interval between the first navigation satellite pulse signal and the initial navigation satellite pulse signal. That is, the second pulse signal from the master clock of the local device is ahead of the second pulse signal from the navigation satellite. At this time, it is necessary to increase the time interval of the pulse-per-second signal sent out by the master clock of the local device each time. By increasing the step value of the time counter, the purpose of increasing the time interval of the second pulse signal sent by the main clock of the ground equipment is achieved, the time between the initial local pulse signal and the first local pulse signal is increased, and therefore the first local pulse signal and the first navigation satellite pulse signal are synchronized.
It can be understood that the phase of the pulse-per-second signal sent by the main clock of the local device is adjusted by the time counter, so that the phase of the pulse-per-second signal sent by the main clock always follows the pulse-per-second signal of the navigation satellite, and the clock synchronization of the local device and the navigation satellite is realized. Compared with a method for adjusting the clock frequency through a VCXO chip and a related phase-locked loop control chip circuit, the scheme simplifies the signal processing process and reduces the hardware cost.
Further, referring to fig. 5, step S600 specifically includes the following steps:
s601: and when the first counting number is greater than the second counting number, judging whether the difference value of the counting numbers is greater than a first preset threshold value.
S602: and when the difference value of the counting times is larger than a first preset threshold value, reducing the step value of the time counter according to the first step change value.
S603: and when the difference value of the counting times is smaller than a first preset threshold value and larger than a second preset threshold value, reducing the step value of the time counter according to a second step change value, wherein the second step change value is smaller than the first step change value, and the first preset threshold value is larger than the second preset threshold value.
In the present application, the first step change value, the second step change value, the first preset threshold value, and the second preset threshold value may be set values input into the local device in advance. The first step change value and the second step change value are both adjustment amounts of a step value of a time counter of a master clock of the local device.
It can be understood that, when the first counting number is greater than the second counting number, or when the first counting number is less than the second counting number, it is necessary to determine whether the difference between the counting numbers is greater than a first preset threshold. In short, when the difference between the first counting number and the second counting number exceeds the preset range, whether the difference between the counting numbers is larger than the first preset threshold value is judged.
And on the premise that the first counting number is greater than the second counting number, when the difference value of the counting numbers is greater than a first preset threshold value, the time interval between the first local pulse signal and the first navigation satellite pulse signal is overlarge. That is, the master clock of the local device sends out the pulse per second signal for an excessively long time interval. At this moment, the time counter is reduced by the stepping value according to the first further change value, so that the time interval between the first local pulse signal and the initial local pulse signal is rapidly reduced, the time error of the local equipment caused by serious asynchronism of the local equipment and the clock of the navigation satellite is avoided, the higher synchronization precision of the main clock of the local equipment is ensured, and the method has higher practicability.
When the difference value of the counting times is smaller than a first preset threshold value and larger than a second preset threshold value, the time interval between the first local pulse signal and the first navigation satellite pulse signal is not as large as that when the difference value of the counting times is larger than the first preset threshold value. At this time, the time counter is decreased by the step value by the second step change value, so that the time interval between the first local pulse signal and the initial local pulse signal is slowly decreased, thereby avoiding the burden of increasing the system due to the rapid change of the step value of the time counter, and enabling the system to work more stably.
When the difference value of the counting times is smaller than a second preset threshold value, namely the difference value of the counting times is within a preset range, the first local pulse signal and the first navigation satellite pulse signal are synchronous, and the time counter is not adjusted.
The step value of the time counter has two adjustment amounts: the first step change value and the second step change value enable the system to adjust the step value of the time counter according to the condition of asynchronization between the local clock and the navigation satellite clock, and the flexibility of the system is improved.
In addition, on the premise that the first counting number is smaller than the second counting number, when the difference between the counting numbers is larger than a first preset threshold value, the time interval between the first local pulse signal and the first navigation satellite pulse signal is too large. That is, the master clock of the local device sends out the pulse-per-second signal for an excessively long time interval. At this time, the time counter is increased by the step value by the first step change value, so that the time interval between the first local pulse signal and the initial local pulse signal is rapidly increased. When the difference value of the counting times is smaller than a first preset threshold value and larger than a second preset threshold value, the time interval between the first local pulse signal and the first navigation satellite pulse signal is not as large as that when the difference value of the counting times is larger than the first preset threshold value. At this time, the time counter is increased by the step value by the second step change value, so that the time interval between the first local pulse signal and the initial local pulse signal is slowly increased.
Further, the clock signal of the navigation satellite comes from a GPS satellite and/or a Beidou satellite.
It can be understood that both GPS satellites and beidou satellites belong to navigation satellites. Clock signals of the navigation satellite can be determined from signals transmitted by a GPS satellite and a Beidou satellite, so that the application range of the invention is enlarged, and the invention has compatibility.
Furthermore, a main clock of the local device is in communication connection with a forward card and/or an extension unit and/or a remote radio frequency module, and the forward card, the extension unit and the remote radio frequency module are all used for acquiring clock signals of the navigation satellite.
It is understood that the clock signals of the navigation satellites can be obtained from the forward card, the extension unit and the remote radio frequency module. The equipment for acquiring the clock signal of the navigation satellite is not limited to a single piece of equipment, so that the compatibility of the device is improved, the application range of the device is expanded, and the application range of the device is wider.
The present application further provides an apparatus master clock synchronization apparatus 100 based on IEEE1588 protocol, which is adapted to an apparatus master clock synchronization method based on IEEE1588 protocol, and referring to fig. 6, the method includes:
a navigation satellite pulse signal acquisition unit 11 configured to acquire an initial navigation satellite pulse signal of a clock signal of a navigation satellite and a first navigation satellite pulse signal adjacent to the initial navigation satellite pulse signal;
a local pulse signal acquiring unit 12, configured to acquire an initial local pulse signal sent by a master clock of a local device and a first local pulse signal adjacent to the initial local pulse signal;
a count number acquisition unit 14 for acquiring a first count number of the time counter at the time of the first local pulse signal and a second count number of the time counter at the time of the first navigation satellite pulse signal;
a calculating unit 15 for calculating a count number difference between the first count number and the second count number;
a count number difference value judgment unit 16 for judging whether the count number difference value exceeds a preset range;
a comparing unit 17 for judging whether the first counting number is greater than the second counting number;
a time counter step value adjusting unit 110 for adjusting a step value of the time counter to synchronize the first local pulse signal with the first navigation satellite pulse signal, thereby synchronizing a clock signal of a master clock of the local device with a clock signal of the navigation satellite.
In the present application, the navigation satellite may be a GPS satellite. The navigation satellite pulse signal acquiring unit 11 is further connected with a navigation satellite antenna and a navigation satellite signal acquiring module. The navigation satellite antenna is used for receiving navigation satellite signals, and a GPS antenna can be adopted. The navigation module is used for converting the navigation satellite signals into digital signals and can adopt a GPS chip. The clock signal is a pulsed digital signal having a low level or a high level with a fixed period. This pulsed digital signal is a pulse-per-second signal. The clock signal is generated by a clock generator. The clock signal of the navigation satellite is generated by a clock generator of the navigation satellite. The initial navigation satellite pulse signal is a clock signal from a navigation satellite received by the receiving apparatus of the navigation satellite signal, and is acquired by the navigation satellite pulse signal acquisition unit 11 from the first second pulse signal of the clock signal of the navigation satellite. The initial local pulse signal is a clock signal sent from the master clock of the local device, and is obtained by the local pulse signal obtaining unit 12 from the first pulse signal per second sent from the clock of the local device. The initial navigation satellite pulse signal of the clock signal of the navigation satellite is a synchronized reference signal of the local device master clock.
In a specific implementation process, when the navigation satellite pulse signal acquisition unit 11 receives an initial navigation satellite pulse signal, the power-on starts the master clock of the local device immediately. Meanwhile, the master clock of the local device immediately sends a second pulse signal of the clock signal, that is, an initial local pulse signal to the local pulse signal acquiring unit 12, so as to achieve synchronization between the initial navigation satellite pulse signal and the initial local pulse signal, and serve as a basis for determining whether the second pulse of the clock signal of the subsequent navigation satellite and the second pulse of the clock signal of the local device are synchronized.
In this application, the time counter is a 1588 clock counter. The time counter, the master clock of the local device, the count number acquisition unit 14, the navigation satellite pulse signal acquisition unit 11, and the local pulse signal acquisition unit 12 are all connected. The time required for the time counter to count once is the step value of the time counter. The step value of the time counter has a unit of nanosecond. When the step value of the time counter is decreased, the time interval between two pulses of second sent by the master clock of the local device is decreased, that is, the period of the second sent by the master clock of the local device is shorter, and the frequency of the second sent is higher. The first local pulse signal is the next second pulse signal issued by the local device master clock after the initial local pulse signal was issued. The first counting number is a current counting number of the time counter when the first local pulse signal is acquired.
The time counter may specifically be an unsigned number TS _ DATA [ 79. In TS _ DATA [79 ], [ 0], TS _ DATA [31 ] is a second-level counter of Time information (TOD), which is essentially an abbreviation for a serial Time interface protocol. Generally, the information of year, month, day, hour, minute and second is called TOD. TS _ DATA [ 31. The step value of TS _ DATA [ 31. If a master clock with a frequency of 1000MHz is used, then the step value of TS _ DATA [31 ] is 1ns. At this time, TS _ DATA [31 ]. If a master clock with a frequency of 100MHz is used, then the step value of TS _ DATA [31 ] is 10ns. At this time, TS _ DATA [31 ] requires 10ns of time per step.
It will be appreciated that the number of counts recorded by the time counter multiplied by the step value equals the total time of the current total count. When the counting times are not changed, the step value of the time counter determines the time interval of two adjacent second pulses sent by the main clock. Specifically, in the case where the number of counts is unchanged, when the step value decreases, the interval of the second pulse sent out by the master clock decreases. As the step value increases, the second pulse interval of the master clock increases. Therefore, the period or the frequency of the pulse-per-second signal sent by the local equipment main clock can be adjusted by adjusting the step value of the time counter, and an additional mechanism is not needed for adjusting the local equipment main clock, so that the navigation satellite clock and the local clock are ensured to be synchronous, and the complexity and the cost of time synchronization are reduced.
In a specific implementation, when the master clock of the local device is powered on, the master clock of the local device sends out a first second pulse, i.e., an initial local pulse signal. At the same time, the time counter starts counting. When the master clock of the local device issues the second pulse of second, i.e., when the first local pulse signal is issued, the time counter records the number of counts from the start of counting to this time, i.e., the first count. The first count number is recorded in the count number acquisition unit 14.
In the present application, the first navigation satellite pulse signal is the next second pulse signal received after the initial navigation satellite pulse signal is received by the navigation satellite pulse signal acquisition unit 11. The count number acquisition unit 14 is connected to the calculation unit 15.
In a specific implementation, when the navigation satellite pulse signal acquisition unit 11 receives the second pulse signal from the navigation satellite for the first time, that is, when the initial navigation satellite pulse signal is received, the master clock of the local device is powered on. At the same time, the time counter starts counting. When the navigation satellite pulse signal acquisition unit 11 receives the pulse-per-second signal from the navigation satellite for the second time, that is, when the first navigation satellite pulse signal is received, the time counter records the number of counts at this time, that is, the second number of counts. The second count number is recorded in the count number acquisition unit 14. The count number acquisition unit 14 transmits the first count number and the second count number to the calculation unit 15. The calculation unit 15 calculates a count number difference between the first count number and the second count number.
It is understood that when the first navigation satellite pulse signal is not synchronized with the first local pulse signal, there is necessarily a difference between the first count number and the second count number, and the difference is supported as data for adjusting the step value of the time counter.
In the present application, the preset range may be a set value input in advance in the local device. And if the difference value of the counting times is within a preset range, synchronizing the first navigation satellite pulse signal and the first local pulse signal. If the difference value of the counting times exceeds the preset range, the first navigation satellite pulse signal and the first local pulse signal are not synchronous, and at this time, the time for the main clock of the local device to send the first local pulse signal needs to be adjusted by adjusting the step value of the time counter, so that the difference value of the counting times is within the preset range, and the first navigation satellite pulse signal and the first local pulse signal are synchronous. On the premise of determining to adjust the time counter, judging how to adjust the time counter by judging whether the first counting number is greater than the second counting number, so that the first navigation satellite pulse signal is synchronous with the first local pulse signal.
In the implementation process, the calculating unit 15 is connected to the counting number difference judging unit 16. The calculation unit 15 sends the count-number difference between the first count number and the second count number to the count-number-difference judgment unit 16. The counting number difference value judgment unit 16 inputs a preset range value in advance. The counting number difference determining unit 16 determines whether the counting number difference exceeds a preset range to determine whether the first navigation satellite pulse signal and the first local pulse signal are synchronous, so as to provide data support for determining whether to adjust the step value of the time counter. The count number difference judgment unit 16 is connected to the comparison unit 17. When the count number difference exceeds the preset range, the count number difference judgment unit 16 sends information that determines the step value of the adjustment time counter to the comparison unit 17. The comparing unit 17 determines whether the first count number is greater than the second count number, and provides data support for the step value of the subsequent adjustment time counter. When the count number difference is within the preset range, the count number difference judgment unit 16 does not send out information, and at this time, the comparison unit 17 waits for the information of the count number difference judgment unit 16.
It will be appreciated that in real-world situations, the first count number and the second count number may not be exactly ideally equal due to device manufacturing errors, environmental factors, etc. As long as the difference value of the counting times of the first counting time and the second counting time is within a reasonable range, the first navigation satellite pulse signal and the first local pulse signal can be considered to be synchronous, and the scheme has practicability. And when the difference value of the counting times exceeds a preset range, comparing the first counting time with the second counting time to provide data support for the step value of the subsequent adjustment time counter.
In this application, when the first count number is greater than the second count number, a time interval between the first local pulse signal and the initial local pulse signal is greater than a time interval between the first navigation satellite pulse signal and the initial navigation satellite pulse signal. That is, the second pulse signal from the master clock of the local device is delayed from the second pulse signal of the navigation satellite. At this time, it is necessary to reduce the time interval of the second pulse signal each time the master clock of the local device issues. The time interval of the pulse per second signal sent by the main clock of the ground equipment is reduced by reducing the step value of the time counter, so that the time between the initial local pulse signal and the first local pulse signal is reduced, and the first local pulse signal and the first navigation satellite pulse signal are synchronized.
Similarly, when the first count number is smaller than the second count number, the time interval between the first local pulse signal and the initial local pulse signal is smaller than the time interval between the first navigation satellite pulse signal and the initial navigation satellite pulse signal. That is, the second pulse signal from the master clock of the local device is ahead of the second pulse signal from the navigation satellite. At this time, it is necessary to increase the time interval of the pulse-per-second signal sent out by the master clock of the local device each time. By increasing the step value of the time counter, the purpose of increasing the time interval of the second pulse signal sent by the main clock of the ground equipment is achieved, the time between the initial local pulse signal and the first local pulse signal is increased, and therefore the first local pulse signal and the first navigation satellite pulse signal are synchronized.
In a specific implementation, the comparing unit 17 is connected to the time counter step value adjusting unit 110. The time counter step value adjusting unit 110 is connected to the time counter. The comparing unit 17 sends the information that the first count number is judged to be greater than or less than the second count number to the time counter step value adjusting unit 110. When the first count number is greater than the second count number, the time counter step value adjustment unit 110 transmits information to decrease the step value of the time counter to the time counter. The time counter is decremented by the step value upon receipt of the signal.
It can be understood that the phase of the pulse-per-second signal sent by the main clock of the local device is adjusted by the time counter, so that the phase of the pulse-per-second signal sent by the main clock always follows the phase of the pulse-per-second signal of the navigation satellite, and clock synchronization between the local device and the navigation satellite is realized. Compared with a method for adjusting the clock frequency through a VCXO chip and a related phase-locked loop control chip circuit, the method and the device simplify the signal processing process and reduce the hardware cost.
Further, referring to fig. 6, the count number obtaining unit 14 is connected to a pulse signal edge detecting unit 13, the pulse signal edge detecting unit 13 is configured to detect an upper edge or a lower edge of a pulse signal, and the pulse signal edge detecting unit 13 is connected to a time counter.
It is understood that the clock signal includes not only the high level and the low level of the pulse-per-second signal but also a pulse-per-second edge signal between the high level and the low level. The edge signal occurs in a shorter time relative to the time when the high level signal occurs. Therefore, when the edge signal of the initial navigation satellite pulse signal is detected, the main clock of the local device is started immediately, the inaccuracy of the time for capturing the second pulse signal caused by the high-level time delay of the second pulse signal is reduced, and therefore the synchronization precision of the initial navigation satellite pulse signal and the initial local pulse signal is improved, and the accurate synchronization of the initial navigation satellite pulse signal and the initial local pulse signal is achieved.
In addition, a pulse signal occurs with an upper edge first, then a high level, and finally a lower edge, and finally falls back to a low level. When the upper edge of the initial navigation satellite pulse signal is detected, a main clock of the local equipment is immediately started, the upper edge of a first second pulse signal sent by the main clock is synchronized with the upper edge of the initial navigation satellite pulse signal, accurate synchronization of the initial navigation satellite pulse signal and the initial local pulse signal is achieved, and therefore an accurate basis is provided for synchronization of a clock signal of a subsequent navigation satellite and a clock signal of the main clock of the local equipment.
In a specific implementation, the pulse signal edge detecting unit 13 is connected to the navigation satellite pulse signal acquiring unit 11, the local pulse signal acquiring unit 12, the count number acquiring unit 14, and the time counter. When the initial navigation satellite pulse signal is detected, the pulse signal edge detecting unit 13 detects the upper edge of the initial navigation satellite pulse signal, and immediately sends the upper edge signal of the initial navigation satellite pulse signal to the count number acquiring unit 14 and the local pulse signal acquiring unit 12. The count number acquisition unit 14 starts counting. Meanwhile, the local pulse signal acquiring unit 12 notifies the main clock of the local device to be powered on, and sends out an initial local pulse signal. When the first navigation satellite pulse signal and the first local pulse signal are detected, the pulse signal edge detecting unit 13 detects an upper edge of the first navigation satellite pulse signal and an upper edge of the first local pulse signal, and immediately sends the upper edge signal of the first navigation satellite pulse signal and the upper edge signal of the first local pulse signal to the count number acquiring unit 14. The count number acquisition unit 14 records the count value when the first navigation satellite pulse signal is obtained and the count value when the first local pulse signal is obtained as the second count number and the first count number, respectively.
Further, referring to fig. 6, the method further includes: a first preset threshold value judging unit 18, configured to judge whether the difference between the counted times is greater than a first preset threshold value; and a second preset threshold value judging unit 19, configured to judge whether the difference between the counted times is smaller than a first preset threshold value and larger than a second preset threshold value, where the first preset threshold value is larger than the second preset threshold value, and both the first preset threshold value judging unit 18 and the second preset threshold value judging unit 19 are in communication connection with the time counter step value adjusting unit 110.
It is understood that both the first preset threshold and the second preset threshold may be set values input into the local device in advance. When the first counting number is greater than the second counting number, or when the first counting number is less than the second counting number, it is necessary to determine whether the difference between the counting numbers is greater than a first preset threshold. In short, when the difference between the first counting number and the second counting number exceeds the preset range, it is determined whether the difference is greater than a first preset threshold.
And when the difference value of the counting times is larger than a first preset threshold value, the time interval between the first local pulse signal and the first navigation satellite pulse signal is overlarge. That is, the master clock of the local device sends out the pulse-per-second signal for an excessively long time interval. At this moment, the time counter is adjusted to a stepping value according to the first further change value, so that the time interval between the first local pulse signal and the initial local pulse signal is rapidly reduced, the time error of the local equipment caused by serious asynchronism of the local equipment and the clock of the navigation satellite is avoided, the higher synchronization precision of the main clock of the local equipment is ensured, and the method has higher practicability. The first step change value and the second step change value are both adjustment amounts of a step value of a time counter of a master clock of the local device. The second step change value is smaller than the first step change value.
When the difference value of the counting times is smaller than a first preset threshold value and larger than a second preset threshold value, the time interval between the first local pulse signal and the first navigation satellite pulse signal is not as large as that when the difference value of the counting times is larger than the first preset threshold value. At this time, the time counter is decreased by the step value by the second step change value, so that the time interval between the first local pulse signal and the initial local pulse signal is slowly decreased, thereby avoiding the burden of increasing the system due to the rapid change of the step value of the time counter, and enabling the system to work more stably.
In a specific implementation process, the comparing unit 17 sends the information that the first counting number is greater than the second counting number and the difference value of the counting numbers to the first preset threshold value judging unit 18 and the second preset threshold value judging unit 19.
When the first preset threshold value judging unit 18 obtains the information that the first counting number is greater than the second counting number and the difference value of the counting numbers, it is judged whether the difference value of the counting numbers is greater than the first preset threshold value. The first preset threshold and the second preset threshold are values set in advance in the first preset threshold judgment unit 18. When the difference value of the counted times is greater than the first preset threshold, the first preset threshold sends information for decreasing the step value of the time counter according to the first step change value to the time counter step value adjustment unit 110. The time counter step value adjusting unit 110 transmits information decreased by the first step change value to the time counter to cause the time counter to change the step value by the first step change value.
When the second preset threshold value judging unit 19 obtains the information that the difference value of the number of counts is greater than the first preset threshold value, no judgment is made.
When the second preset threshold value determining unit 19 obtains the information that the first count number is greater than the second count number and the count number difference value, it determines whether the count number difference value is smaller than the first preset threshold value and greater than the second preset threshold value. The first preset threshold and the second preset threshold are values set in advance in the second preset threshold judgment unit 19. When the difference value of the number of counts is smaller than the first preset threshold and larger than the second preset threshold, the second preset threshold sends information for decreasing the step value of the time counter according to the second step change value to the time counter step value adjustment unit 110. The time counter step value adjusting unit 110 transmits information decreased by the second step change value to the time counter so that the time counter changes the step value by the second step change value.
The first preset threshold value judging unit 18 obtains the information that the difference value of the count times is smaller than the first preset threshold value and larger than the second preset threshold value, and does not make any judgment.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. An equipment master clock synchronization method based on an IEEE1588 protocol is characterized by comprising the following steps of:
when an initial navigation satellite pulse signal of a clock signal of a navigation satellite is acquired, a main clock of local equipment sends an initial local pulse signal;
when a first local pulse signal adjacent to the initial local pulse signal is obtained, a time counter records a first counting number;
when a first navigation satellite pulse signal adjacent to the initial navigation satellite pulse signal is acquired, the time counter records a second counting time;
calculating a count difference between the first count and the second count;
when the counting number difference exceeds a preset range, judging whether the first counting number is greater than the second counting number;
and when the first counting number is greater than the second counting number, reducing the step value of the time counter to synchronize the first local pulse signal with the first navigation satellite pulse signal, so that the clock signal of the main clock of the local device is synchronized with the clock signal of the navigation satellite.
2. The method according to claim 1, wherein when an initial navigation satellite pulse signal of a clock signal of a navigation satellite is acquired, a master clock of a local device sends out an initial local pulse signal, and the method specifically comprises the following steps:
when an initial navigation satellite pulse signal of a clock signal of a navigation satellite is acquired, detecting the upper edge of the initial navigation satellite pulse signal;
when the upper edge of the initial navigation satellite pulse signal is detected, the main clock of the local device sends out an initial local pulse signal.
3. The method according to claim 1, wherein when a first local pulse signal adjacent to the initial local pulse signal is acquired, the time counter records a first count number of times, and specifically includes the following steps:
when a first local pulse signal adjacent to the initial local pulse signal is acquired, detecting an upper edge or a lower edge of the first local pulse signal;
when an upper edge or a lower edge of the first local pulse signal is detected, the time counter records a first count number.
4. The method for synchronizing device master clocks based on the IEEE1588 protocol of claim 1, wherein the time counter records a second count number of times when a first navigation satellite pulse signal adjacent to the initial navigation satellite pulse signal is acquired, specifically comprising the steps of:
when a first navigation satellite pulse signal adjacent to the initial navigation satellite pulse signal is obtained, detecting the upper edge or the lower edge of the first navigation satellite pulse signal;
when the upper edge or the lower edge of the first navigation satellite pulse signal is detected, the time counter records a second counting number.
5. The method for synchronizing device master clocks based on the IEEE1588 protocol of claim 1, wherein when the first count number is greater than the second count number, the step value of the time counter is decreased, specifically comprising the steps of:
when the first counting number is larger than the second counting number, judging whether the difference value of the counting numbers is larger than a first preset threshold value or not;
when the difference value of the counting times is larger than a first preset threshold value, reducing the stepping value of the time counter according to a first step change value;
and when the difference value of the counting times is smaller than a first preset threshold value and larger than a second preset threshold value, reducing the step value of the time counter according to a second step change value, wherein the second step change value is smaller than the first step change value, and the first preset threshold value is larger than the second preset threshold value.
6. The IEEE1588 protocol-based device master clock synchronization method of claim 1, wherein the navigation satellite clock signal is from a GPS satellite and/or a Beidou satellite.
7. The method for synchronizing master clocks of devices according to claim 1, wherein the master clock of the local device is communicatively connected to a forward card and/or an extension unit and/or a remote rf module, and the forward card, the extension unit and the remote rf module are all configured to obtain clock signals of the navigation satellite.
8. An apparatus for synchronizing master clocks of devices based on IEEE1588 protocol is characterized in that the apparatus comprises:
the device comprises a navigation satellite pulse signal acquisition unit, a first time delay unit and a second time delay unit, wherein the navigation satellite pulse signal acquisition unit is used for acquiring an initial navigation satellite pulse signal of a clock signal of a navigation satellite and a first navigation satellite pulse signal adjacent to the initial navigation satellite pulse signal;
the local pulse signal acquisition unit is used for acquiring an initial local pulse signal sent by a master clock of local equipment and a first local pulse signal adjacent to the initial local pulse signal;
a count number acquisition unit for acquiring a first count number of the time counter in the first local pulse signal and a second count number of the time counter in the first navigation satellite pulse signal;
a calculating unit for calculating a count number difference between the first count number and the second count number;
a counting number difference value judging unit for judging whether the counting number difference value exceeds a preset range;
the comparison unit is used for judging whether the first counting number is greater than the second counting number or not;
and a time counter step value adjusting unit for adjusting a step value of the time counter to synchronize the first local pulse signal with the first navigation satellite pulse signal, thereby synchronizing a clock signal of a master clock of the local device with a clock signal of the navigation satellite.
9. The device master clock synchronization apparatus according to claim 8, wherein the count number obtaining unit is connected to a pulse signal edge detecting unit, the pulse signal edge detecting unit is configured to detect an upper edge or a lower edge of a pulse signal, and the pulse signal edge detecting unit is connected to the time counter.
10. The device master clock synchronization apparatus based on IEEE1588 protocol of claim 8, further comprising:
the first preset threshold value judging unit is used for judging whether the difference value of the counting times is larger than a first preset threshold value or not;
and the second preset threshold value judging unit is used for judging whether the difference value of the counting times is smaller than the first preset threshold value and larger than the second preset threshold value, the first preset threshold value is larger than the second preset threshold value, and the first preset threshold value judging unit and the second preset threshold value judging unit are both in communication connection with the time counter stepping value adjusting unit.
CN202211094842.9A 2022-09-08 2022-09-08 Equipment master clock synchronization method and device based on IEEE1588 protocol Active CN115189796B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211094842.9A CN115189796B (en) 2022-09-08 2022-09-08 Equipment master clock synchronization method and device based on IEEE1588 protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211094842.9A CN115189796B (en) 2022-09-08 2022-09-08 Equipment master clock synchronization method and device based on IEEE1588 protocol

Publications (2)

Publication Number Publication Date
CN115189796A true CN115189796A (en) 2022-10-14
CN115189796B CN115189796B (en) 2022-12-06

Family

ID=83523807

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211094842.9A Active CN115189796B (en) 2022-09-08 2022-09-08 Equipment master clock synchronization method and device based on IEEE1588 protocol

Country Status (1)

Country Link
CN (1) CN115189796B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1909410A (en) * 2006-08-11 2007-02-07 华为技术有限公司 Method for improving satellite time synchronism pulse keeping performance
CN102148652A (en) * 2011-02-17 2011-08-10 上海奇微通讯技术有限公司 System and method for measuring network clock synchronization
CN102566410A (en) * 2012-02-16 2012-07-11 北京华力创通科技股份有限公司 Method and device for calibrating local clock based on satellite time service
CN106817184A (en) * 2017-01-19 2017-06-09 重庆重邮汇测通信技术有限公司 The method for synchronizing time and device of local clock and gps clock in network measure
CN215117190U (en) * 2021-06-24 2021-12-10 中国科学院新疆天文台 Clock error measuring device and digital clock

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1909410A (en) * 2006-08-11 2007-02-07 华为技术有限公司 Method for improving satellite time synchronism pulse keeping performance
CN102148652A (en) * 2011-02-17 2011-08-10 上海奇微通讯技术有限公司 System and method for measuring network clock synchronization
CN102566410A (en) * 2012-02-16 2012-07-11 北京华力创通科技股份有限公司 Method and device for calibrating local clock based on satellite time service
CN106817184A (en) * 2017-01-19 2017-06-09 重庆重邮汇测通信技术有限公司 The method for synchronizing time and device of local clock and gps clock in network measure
CN215117190U (en) * 2021-06-24 2021-12-10 中国科学院新疆天文台 Clock error measuring device and digital clock

Also Published As

Publication number Publication date
CN115189796B (en) 2022-12-06

Similar Documents

Publication Publication Date Title
US10868664B2 (en) Minimizing timestamp error in PTP systems
CN102546071B (en) Clock synchronization method and system
US9763207B2 (en) Timing synchronization device and timing synchronization control method
CN111208727B (en) High-precision satellite pulse-per-second synchronous time keeping device and method
EP2293629A1 (en) Time synchronizer
US20200127752A1 (en) Time synchronization device and time synchronization method
WO2014083725A1 (en) Synchronization apparatus, synchronization system, wireless communication apparatus and synchronization method
EP4216019A1 (en) Device synchronous calibration method and apparatus, devices, and storage medium
CN108023723B (en) Method for frequency synchronization and slave clock
CN111580380B (en) Method for improving GNSS synchronous time service precision
US9571262B2 (en) Hybrid timing for a GNSS receiver
CN108768577B (en) Communication network time service method and system based on PTP time synchronization signal
CN112486246A (en) Clock delay detection and compensation method, device, terminal and readable storage medium
CN115189796B (en) Equipment master clock synchronization method and device based on IEEE1588 protocol
CN209949115U (en) Multi-clock source integrated network time system card
JP2012004914A (en) Timing synchronizing apparatus, and timing synchronizing method
CN111092713B (en) Clock synchronization device and clock synchronization method
CN110098885B (en) Clock synchronization circuit, device and method
US20070195829A1 (en) Phase-locked loop for maintaining system synchronization through packet dropout
US20230216653A1 (en) Data transfer circuit and communication apparatus
CN112290935B (en) Crystal oscillator frequency adjusting method and circuit
CN113359948A (en) Time synchronization device and synchronization method
JP6198075B2 (en) Time synchronization apparatus, time synchronization method, and time synchronization program
CA3119809C (en) Delay time detection circuit, stamping information generation device, and delay time detection method
TWI400596B (en) Synchronized receiving circuit and method thereof

Legal Events

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