CN109286459B - Time synchronization method and system - Google Patents

Time synchronization method and system Download PDF

Info

Publication number
CN109286459B
CN109286459B CN201710599086.8A CN201710599086A CN109286459B CN 109286459 B CN109286459 B CN 109286459B CN 201710599086 A CN201710599086 A CN 201710599086A CN 109286459 B CN109286459 B CN 109286459B
Authority
CN
China
Prior art keywords
time
time synchronization
data
pulse signal
window
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710599086.8A
Other languages
Chinese (zh)
Other versions
CN109286459A (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.)
Beijing Zhiyunxin Technology Co ltd
Original Assignee
Beijing Zhiyunxin 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 Beijing Zhiyunxin Technology Co ltd filed Critical Beijing Zhiyunxin Technology Co ltd
Priority to CN201710599086.8A priority Critical patent/CN109286459B/en
Publication of CN109286459A publication Critical patent/CN109286459A/en
Application granted granted Critical
Publication of CN109286459B publication Critical patent/CN109286459B/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

Abstract

The invention discloses a time synchronization method and a system, wherein the method comprises the following steps: the data collecting device receives the time synchronization pulse signal when detecting that the receiving time window of the time synchronization pulse signal is effective; generating a time synchronization data packet based on the time synchronization pulse signal and sending the time synchronization data packet to data acquisition equipment; when the data acquisition equipment receives a time synchronization data packet sent by the data collection equipment in a wireless communication mode, recording a clock count value; calculating to obtain a local time interval based on the recorded adjacent clock count values; subtracting the local time interval from a preset standard time interval to obtain a time interval deviation; judging whether the time interval deviation is greater than a deviation threshold value; if so, adjusting the sampling parameters of the data acquisition equipment, otherwise, not adjusting the sampling parameters. The invention greatly reduces the delay of the time synchronization data packet and controls the delay within a predictable range.

Description

Time synchronization method and system
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a time synchronization method and system.
Background
The global power backbone network is a three-phase ac power system with a frequency of 50Hz or 60 Hz. In order to ensure stable operation of the power system, accurate measurement of the voltage and current of the three-phase alternating current is required. The modern mainstream measurement technology is a computer-based digital measurement technology, and firstly, a high-voltage and high-current signal (namely, a primary signal of a power system) is converted into a voltage or current signal (namely, a secondary signal of the power system) with a smaller amplitude value, which is suitable for measurement, through a voltage and current sensor (or a mutual inductor), and then the voltage or current signal is sent into an analog-to-digital converter (ADC) for quantization to be converted into a digital signal, and the acquired signal is correspondingly converted and calculated by utilizing a digital signal processing technology, so that the working states of a single power device and a local power grid or a global power grid are sensed, and further fault judgment and isolation, steady-state and transient-state control, parameter estimation, fault prediction and other applications are carried.
The data acquisition and calculation of a single power device are equivalent to the action of human eyes or ears on the brain of a human on the power system. The technical direction of the smart grid is to sense data of various power equipment (such as a transformer, a line and a switch) by arranging a large number of smart sensors, and calculate the working state of the grid according to sampling data of single equipment. The power system equipment is dispersed in physical space, so that data acquisition of the equipment is also dispersed, and then the dispersed data is collected to a background central machine room through wired or wireless communication to be further calculated.
The transmission speed of the power signal in the power equipment is close to the speed of light, namely 30 kilometres per second, or 300 meters per microsecond (us). In order to accurately sense the overall state of the power system, data of each power device at the same time must be acquired, and if the sampled data of each device are too different in time, the calculated result is meaningless. For example, in the application field of single-phase earth fault location of a low-current earth distribution network, fault location through transient zero-sequence current is a fault location method with the best recognized effect, but the fault location is premised on that the measurement of the zero-sequence current must be accurate, and the sampling time deviation of each phase current is controlled within 10 us. In the application fields of traveling wave protection and lightning wave positioning, the time difference is needed to calculate the space distance, so the time deviation of each data acquisition point is controlled within 1 us. It is very challenging to ensure that the sampling times of physically distributed devices are strictly synchronized, or to control the deviation of the sampling times within 10us, even 1 us.
There is a class of applications for power systems: the method comprises the steps that a plurality of devices are needed to collect three-phase voltage and three-phase current respectively, collected data are collected into local collection devices in a wireless communication mode, and the collected data are uploaded to a background of a power grid through wired or wireless communication by the collection devices to be subjected to data processing. Such a device is a fault indicator for a distribution network.
To ensure the data acquisition of each phase is strictly synchronized, a collecting device is required to provide a uniform time reference for each acquisition device, and the time reference of the collecting device is generally from a global positioning system, such as a GPS, a beidou, and the like. Therefore, a three-level time synchronization system is formed, wherein the global positioning system comprises a collecting device for receiving and distributing timing information, and a collecting device for receiving the timing information. The method of the invention mainly solves the problem of time synchronization between the last two stages through a wireless communication technology.
The prior art scheme for time synchronization by wireless communication technology is shown in fig. 1. The scheme adopts a general wireless communication technology, uses the same wireless communication channel and transmits data and time synchronization information in a time division multiplexing mode. This technical scheme has serious technical defect, can not guarantee the time synchronization precision (synchronization error is too big) between a plurality of data acquisition equipment, and the leading cause lies in:
1. timing Pulse signals (such as Pulse Per Second (PPS) sent from the GPS/beidou receiving module are generally sent to the CPU for processing in an external or internal interrupt manner, and when the timing Pulse signals are valid, the CPU may be processing a higher priority task and cannot process an interrupt request of the timing Pulse in time. When the CPU starts to process the timing pulse interruption, in order to ensure the correctness of the wireless communication, the state of a relevant register is firstly read, if the wireless communication module allows to send the time synchronization information, the time synchronization information can be written into the wireless communication module, and the wireless communication module starts the wireless transmission after receiving a complete data packet. The time delay from the time when the timing pulse is effective to the time when the wireless communication module starts to transmit the wireless signal is relatively large and is not fixed.
2. Because the same wireless communication channel needs to transmit data and time synchronization information in a time division multiplexing mode, when a timing pulse signal sent by the global positioning module is received, the wireless communication module may be just transmitting other data packets, so that the time synchronization information needs to be transmitted after the current data packet transmission is finished, and extra uncertain delay is introduced for the distribution of the time synchronization information.
3. In the data acquisition equipment, a wireless data packet is received through a wireless communication receiving module, then an interrupt application is sent to a CPU, and the CPU reads and analyzes the content of the data packet to judge whether the data packet of the wireless communication is time synchronization information or other data. If the time synchronization information is the time synchronization information, the CPU reads the time information carried by the data packet and adjusts the AD acquisition parameters. Because the CPU is adopted for time synchronization, the time delay is long and is not fixed from the time when the wireless communication signal is received to the time when the AD acquisition parameter is really adjusted in the data acquisition equipment.
Due to the above reasons, the delay from the timing pulse signal being valid to the AD sampling parameter being valid of the collector is generally larger, for example, about 50 us. The delay is not fixed, namely the same technical principle is adopted for technical realization, the delay of some equipment is large, and the delay of some equipment is small; or the same device, the delay of two adjacent time synchronizations is different and the difference is large. This results in large errors in time synchronization between devices, resulting in large errors in data acquisition and data synthesis, which may reduce data availability in some application scenarios (e.g., fault location), and may result in complete loss of time reference in some application scenarios (e.g., traveling wave protection, and lightning wave detection), thereby making the data completely unusable.
Disclosure of Invention
The invention aims to provide a time synchronization method and a time synchronization system, which solve the problem that extra and uncertain time delay is introduced in the sending of time synchronization information in the prior art, utilize a time synchronization module to replace a CPU (central processing unit) to carry out time synchronization, and the time synchronization module only receives a time synchronization data packet when a time window is effective, thereby greatly reducing the time delay of the time synchronization data packet and controlling the time delay within a predictable range.
To solve the above problem, a first aspect of the present invention provides a time synchronization information method, including:
when detecting that a receiving time window of the time synchronization pulse signal is effective, the data collecting equipment receives the time synchronization pulse signal sent by the global positioning system;
generating a time synchronization data packet based on the time synchronization pulse signal and sending the time synchronization data packet to data acquisition equipment;
when the data acquisition equipment receives a time synchronization data packet sent by the data collection equipment in a wireless communication mode, recording a clock count value of a clock counter in the data acquisition equipment;
calculating to obtain a local time interval based on the recorded adjacent clock count values;
subtracting the local time interval from a preset standard time interval to obtain a time interval deviation;
judging whether the time interval deviation is greater than a deviation threshold value;
if so, adjusting the sampling parameters of the data acquisition equipment, otherwise, not adjusting the sampling parameters.
Further, before the step of receiving the time synchronization pulse signal when the data sink device detects that the receiving time window is valid, the method further includes:
the data collecting device detects whether the receiving time window is valid;
when the data sink device detects that the reception time window is invalid, a non-time-synchronized data packet is received.
Further, the step of the data sink device detecting whether the reception time window is valid comprises:
reading a window clock count value in a data acquisition device, the window clock count value representing a local time counted in clocks;
dividing the window clock count value by the clock frequency to obtain local time;
judging whether the local time is greater than a first time threshold and less than a second time threshold;
if yes, the receiving time window is valid; otherwise, the receive time window is invalid.
Further, when the data sink device detects that the receiving time window is valid, the data sink device blocks the non-time-synchronized data packet to be sent to the data sink device, and/or temporarily stores the non-time-synchronized data packet in the buffer and prohibits reading of the non-time-synchronized data packet received by the data sink device.
Further, before the data acquisition device receives the time synchronization data packet, the method further comprises:
the data acquisition equipment receives a data packet;
judging whether the data packet is a time synchronization data packet or not;
if so, starting to receive the time synchronization data packet.
Further, before the step of generating the time synchronization packet by the data aggregation device based on the time synchronization pulse signal, the method further includes:
generating synchronization data required by the time synchronization pulse signal before the data aggregation equipment receives the time synchronization pulse signal;
the step of generating a time synchronization packet based on the time synchronization pulse signal when the data aggregation device receives the time synchronization pulse signal includes:
when the data gathering device receives the time synchronization pulse signal, a time synchronization data packet is generated based on the time synchronization pulse signal and the synchronization data.
According to another aspect of the present invention, there is provided a time synchronization system including:
the system comprises a data collection device and at least one data acquisition device in wireless communication connection with the data collection device;
the data aggregation apparatus includes:
the first time synchronization module is used for receiving a time synchronization pulse signal sent by a global positioning system when detecting that a receiving time window of the time synchronization pulse signal is effective, and generating a time synchronization data packet based on the time synchronization pulse signal;
the first wireless communication module is used for sending the time synchronization data packet to the at least one data acquisition device;
each of the data acquisition devices includes:
the second wireless communication module is used for receiving a time synchronization data packet sent by the data aggregation equipment in a wireless communication mode;
the second time synchronization module is used for recording the clock count value of the clock counter in the data acquisition equipment when the second wireless communication module receives the time synchronization data packet sent by the data collection equipment in a wireless communication mode; calculating to obtain a local time interval based on the recorded adjacent clock count values; subtracting the local time interval from a preset standard time interval to obtain a time interval deviation; judging whether the time interval deviation is greater than a deviation threshold value; if so, adjusting the sampling parameters of the data acquisition equipment, otherwise, not adjusting the sampling parameters.
Further, the first time synchronization module performs the following operations before the step of receiving the time synchronization pulse signal when detecting that the receiving time window is valid:
detecting whether a receiving time window is valid;
when the reception time window is detected to be invalid, a non-time synchronization packet is received.
Further, the first time synchronization module detects whether a receiving time window is valid, and performs the following operations:
reading a window clock count value in a data acquisition device, the window clock count value representing a local time counted in clocks;
dividing the window clock count value by the clock frequency to obtain local time;
judging whether the local time is greater than a first time threshold and less than a second time threshold;
if yes, the receiving time window is valid; otherwise, the receive time window is invalid.
Further, when the first time synchronization module detects that the receiving time window is valid, the non-time synchronization data packet to be sent to the first wireless communication module is blocked, and/or the non-time synchronization data packet is temporarily stored in the buffer area and the received non-time synchronization data packet is prohibited from being read.
Further, before the second time synchronization module receives the time synchronization packet, the following operations are performed:
receiving a data packet;
judging whether the data packet is a time synchronization data packet or not;
if so, starting to receive the time synchronization data packet.
Further, before the step of the first time synchronization module generating a time synchronization packet based on the time synchronization pulse signal, the following operations are performed:
generating synchronization data required for the time synchronization pulse signal before the first wireless communication module receives the time synchronization pulse signal;
when the first wireless communication module receives the time synchronization pulse signal, the following operations are performed:
and when the first time synchronization module receives the time synchronization pulse signal, generating a time synchronization data packet based on the time synchronization pulse signal and the synchronization data.
The invention replaces the CPU with the time synchronization module to carry out time synchronization, and the time synchronization module only receives the time synchronization data packet when the time window is effective, thereby greatly reducing the time delay of the time synchronization data packet and controlling the time delay within a predictable range.
The technical scheme of the invention has the following beneficial technical effects: the invention aims to protect a method and a system for adjusting sampling parameters based on time synchronization information, wherein the time synchronization module replaces a CPU (central processing unit) to carry out time synchronization, and the time synchronization module sets a time window, so that the time window sends the time synchronization information within a specific time, and extra and uncertain time delay is not introduced into the sending of the time synchronization information; and the time synchronization module can send time synchronization information and non-time synchronization information, and a special wireless communication channel for sending the time synchronization information at a certain time is formed. The invention can reduce the end-to-end time delay and fix the time delay in a smaller range, and can enable each data acquisition device to achieve higher time synchronization precision, compared with the prior art, the time synchronization precision of the invention is improved by 5-10 times, and the time synchronization precision within 10us can be realized.
Drawings
FIG. 1 is a schematic diagram of a prior art time synchronization system;
FIG. 2 is a schematic flow chart of the time synchronization method of the present invention;
FIG. 3 is a flow chart illustrating invalidation of a receive time window according to a second embodiment of the present invention;
fig. 4 is a schematic flow chart of detecting whether a receiving time window is valid according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a time synchronization system according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings in conjunction with the following detailed description. It should be understood that the description is intended to be exemplary only, and is not intended to limit the scope of the present invention. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present invention.
Fig. 2 is a flow chart illustrating the time synchronization method of the present invention.
As shown in fig. 2, a time synchronization method of the present invention is applied to a time synchronization system, and the system includes: a data aggregation device 100 and at least one data collection device 200 in wireless communication with the data aggregation device, the method comprising:
in step S100, the data sink device 100 receives the time synchronization pulse signal sent by the global positioning system when detecting that the receiving time window of the time synchronization pulse signal is valid.
The gps transmits a time synchronization pulse signal to the data sink device 100 every predetermined time period (e.g., 1 second), and the data sink device 100 outputs the time synchronization pulse signal every predetermined time period (e.g., 1 second, 2 seconds, etc.) after receiving the time synchronization pulse signal. The predetermined time period of the global positioning system and the predetermined time period of the data aggregation device may be the same or different, for example, both are 1 second, or one of them is 1 second, and the other is 2 seconds, for example, the predetermined time period of the global positioning system is 1, and the predetermined time period of the data aggregation device is 2, but not vice versa. The time synchronization period of the data sink device is typically greater than or equal to the time period of the global positioning system.
In one embodiment, when the data sink device detects that the reception time window is valid, the data sink device blocks non-time-synchronized data packets to be sent to the data sink device and/or temporarily stores the non-time-synchronized data packets in a buffer and prohibits reading of non-time-synchronized data packets that have been received by the data sink device. Specifically, when the data sink device detects that the receiving time window is valid, the data sink device may block non-time-synchronized data packets to be sent to the data sink device, and/or temporarily buffer the received non-time-synchronized data packets in a buffer and prohibit other modules from reading the non-time-synchronized data packets received by the data sink device.
And S200, generating a time synchronization data packet based on the time synchronization pulse signal and sending the time synchronization data packet to data acquisition equipment.
In one embodiment, before the step 200 of generating the time synchronization packet by the data aggregating device based on the time synchronization pulse signal, the method further includes: generating synchronization data required by the time synchronization pulse signal before the data aggregation equipment receives the time synchronization pulse signal; when the data gathering device receives the time synchronization pulse signal, a time synchronization data packet is generated based on the time synchronization pulse signal and the synchronization data.
In this step, before the data aggregation device 100 receives the time synchronization pulse signal, the data aggregation device 100 may generate in advance synchronization data required for the time synchronization information transmitted by wireless communication, where the synchronization data includes, but is not limited to: current system time, current location, status of the data aggregation device 100 or other collection device, local or overall power system operating conditions (e.g., whether in a fault condition), and control commands sent to the data collection device 200, among others. Any information transmitted to the data collection device 200 together with the time synchronization information needs to be generated in advance. The data sink device 100 may send out the time synchronization information by wireless communication upon receiving the time synchronization pulse signal.
Step S300, when the data collecting device 200 receives the time synchronization data packet sent by the data collecting device in the wireless communication manner, recording a clock count value of a clock counter inside the data collecting device 200.
Specifically, the data acquisition device 200 is provided with a clock counter inside for recording a clock count value. Once the data collection device 200 receives the time synchronization packet sent by the data sink device 100, the clock count value is recorded.
And step S400, calculating to obtain a local time interval based on the recorded adjacent two-time clock count values.
Specifically, the local time interval may be calculated, for example, from the current clock count value and the previous clock count value. And dividing the current clock count value by the clock frequency to obtain the current local time, similarly, dividing the previous clock count value by the clock frequency to obtain the previous local time, and subtracting the current local time from the previous local time to obtain the local time interval.
Step S500, subtracting the preset standard time interval from the local time interval to obtain a time interval deviation.
Step S600, determining whether the time interval deviation is greater than a deviation threshold.
Step S700, if yes, adjusting sampling parameters of the data acquisition equipment;
step S800, otherwise, the sampling parameters do not need to be adjusted.
Specifically, the local time interval is subtracted from a preset standard time interval to obtain a time interval deviation, the time interval deviation is compared with a deviation threshold value, if the time interval deviation is larger than the deviation threshold value, it is indicated that the local time is deviated too much, the sampling parameter is adjusted, and otherwise, the sampling parameter is not adjusted. The sampling parameters include, but are not limited to: local clock speed, sampling interval, starting sampling instant, etc.
Fig. 3 is a flow chart illustrating invalidation of a reception time window according to a second embodiment of the present invention.
As shown in fig. 3, before the step S100 of receiving the time synchronization pulse signal when the data sink device detects that the receiving time window is valid, the method further includes:
in step T10, the data sink device detects whether the reception time window is valid.
In step T20, when the data sink device detects that the reception time window is invalid, a non-time-synchronized data packet is received.
Specifically, the data sink device detects whether the receiving time window is valid in real time, receives the time synchronization data packet when detecting that the receiving time window is valid, and otherwise, receives the non-time synchronization data packet. The non-time synchronized data packet may be any other data packet than a time synchronized data packet.
Fig. 4 is a flowchart illustrating a process of detecting whether a reception time window is valid according to a third embodiment of the present invention.
As shown in fig. 4, in an embodiment, the step T10 of the data aggregation device detecting whether the receiving time window is valid includes:
step T11, reading a window clock count value in the data acquisition equipment, wherein the window clock count value represents local time counted by a clock;
step T12, dividing the window clock count value by the clock frequency to obtain the local time;
step T13, judging whether the local time is greater than the first time threshold and less than the second time threshold;
in step T14, if yes, the receiving time window is valid.
Step T15, otherwise, the reception time window is invalid.
Specifically, a window clock count value in the data acquisition device is read, the window clock count value is divided by the clock frequency to obtain local time, whether the local time is greater than a first time threshold and less than a second time threshold is judged, if yes, the receiving time window is valid, and if not, the receiving time window is invalid. Wherein the first time threshold is less than the second time threshold.
In an embodiment, before the step T10 of receiving the time synchronization packet, the method further includes:
step Y1, the data acquisition device 200 receives the data packet;
step Y2, judging whether the data packet is a time synchronization data packet;
and step Y2, if yes, starting to receive the time synchronization data packet.
Specifically, when receiving the time synchronization data packet, the data acquisition device receives the data packet in real time, and judges whether the received data packet is the time synchronization data packet in real time according to the time synchronization attribute information, and if so, starts to receive the time synchronization data packet.
Fig. 5 is a schematic structural diagram of a time synchronization system according to a fourth embodiment of the present invention.
As shown in fig. 5, a time synchronization system according to a fourth embodiment of the present invention includes: a data collection device 100 and at least one data collection device 200 in wireless communication with the data collection device 100.
The data aggregating apparatus 100 includes: a first time synchronization module 110 and a first wireless communication module 120.
The first time synchronization module 110 is configured to receive a time synchronization pulse signal sent by a global positioning system and generate a time synchronization data packet based on the time synchronization pulse signal when it is detected that a receiving time window of the time synchronization pulse signal is valid. And the global positioning system sends the time synchronization pulse signal to the data gathering equipment at intervals of a preset time period.
In one embodiment, the first time synchronization module 110 performs the following operations before the step of receiving the time synchronization pulse signal when detecting that the receiving time window is valid: detecting whether a receiving time window is valid; when the reception time window is detected to be invalid, a non-time synchronization packet is received.
In one embodiment, the first time synchronization module 110 detects whether the receiving time window is valid, and performs the following operations: reading a window clock count value in the data acquisition device 200, the window clock count value representing a local time counted in clocks; dividing the window clock count value by the clock frequency to obtain local time; judging whether the local time is greater than a first time threshold and less than a second time threshold; if yes, the receiving time window is valid; otherwise, the receive time window is invalid.
In one embodiment, when the first time synchronization module 110 detects that the receiving time window is valid, the non-time synchronization packet to be sent to the first wireless communication module 120 is blocked, and/or the non-time synchronization packet is buffered in a buffer and the received non-time synchronization packet is prohibited from being read.
In one embodiment, before the step of generating the time synchronization packet by the first time synchronization module 110 based on the time synchronization pulse signal, the following operations are performed: generating synchronization data required for the time synchronization pulse signal before the first wireless communication module 120 receives the time synchronization pulse signal; when the first wireless communication module 120 receives the time synchronization pulse signal, the following operations are performed: when the first time synchronization module 110 receives the time synchronization pulse signal, a time synchronization packet is generated based on the time synchronization pulse signal and the synchronization data.
The first wireless communication module 120 is connected to the first time synchronization module 110, and transmits the time synchronization packet to the data acquisition device 200.
Each of the data collection devices 200 includes: a second wireless communication module 210 and a second time synchronization module 220.
The second wireless communication module 210 is configured to receive a time synchronization packet sent by the data aggregation device 100 through a wireless communication manner.
In one embodiment, before the second wireless communication module 120 receives the time synchronization packet, the following operations are performed: receiving a data packet; judging whether the data packet is a time synchronization data packet or not; if so, starting to receive the time synchronization data packet.
The second time synchronization module 220 is connected to the second wireless communication module 210, and when the second wireless communication module 210 receives a time synchronization data packet sent by the data aggregation device in a wireless communication manner, records a clock count value of a clock counter inside the data acquisition device 200; calculating to obtain a local time interval based on the recorded adjacent clock count values; subtracting the local time interval from a preset standard time interval to obtain a time interval deviation; judging whether the time interval deviation is greater than a deviation threshold value; if so, adjusting the sampling parameters of the data acquisition equipment, otherwise, not adjusting the sampling parameters. In the invention, if the time interval deviation is greater than the deviation threshold value, an instruction for adjusting the sampling parameter is sent to the AD controller; otherwise, sending an instruction for not adjusting the local sampling parameter to the AD controller.
The execution process of each module is described with reference to the foregoing method specifically, and is not described herein again.
The invention aims to protect a time synchronization method and a time synchronization system, the time synchronization module replaces a CPU to carry out time synchronization, and the time synchronization module sets a time window, so that the time window sends time synchronization information within specific time, and the sending of the time synchronization information is ensured not to introduce extra and uncertain time delay; and the time synchronization module can send time synchronization information and non-time synchronization information, and a special wireless communication channel for sending the time synchronization information at a certain time is formed. The invention can reduce the end-to-end time delay and fix the time delay in a smaller range, and can enable each data acquisition device to achieve higher time synchronization precision, compared with the prior art, the time synchronization precision of the invention is improved by 5-10 times, and the time synchronization precision within 10us can be realized.
It is to be understood that the above-described embodiments of the present invention are merely illustrative of or explaining the principles of the invention and are not to be construed as limiting the invention. Therefore, any modification, equivalent replacement, improvement and the like made without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention. Further, it is intended that the appended claims cover all such variations and modifications as fall within the scope and boundaries of the appended claims or the equivalents of such scope and boundaries.

Claims (10)

1. A method of time synchronization, comprising:
the data collecting device detects whether the receiving time window is valid;
when the data collecting equipment detects that the receiving time window of the time synchronization pulse signal is invalid, receiving a non-time synchronization data packet;
when detecting that a receiving time window of the time synchronization pulse signal is effective, the data collecting equipment receives the time synchronization pulse signal sent by the global positioning system;
generating a time synchronization data packet based on the time synchronization pulse signal and sending the time synchronization data packet to data acquisition equipment;
when the data acquisition equipment receives a time synchronization data packet sent by the data collection equipment in a wireless communication mode, recording a clock count value of a clock counter in the data acquisition equipment;
calculating to obtain a local time interval based on the recorded adjacent clock count values;
subtracting the local time interval from a preset standard time interval to obtain a time interval deviation;
judging whether the time interval deviation is greater than a deviation threshold value;
if so, adjusting the sampling parameters of the data acquisition equipment, otherwise, not adjusting the sampling parameters.
2. The method of claim 1, wherein the step of the data sink device detecting whether the receive time window is valid comprises:
reading a window clock count value in a data acquisition device, the window clock count value representing a local time counted in clocks;
dividing the window clock count value by the clock frequency to obtain local time;
judging whether the local time is greater than a first time threshold and less than a second time threshold;
if yes, the receiving time window is valid; otherwise, the receive time window is invalid.
3. The method of claim 1, wherein when the data sink device detects that the receive time window is valid, the data sink device blocks non-time synchronized data packets intended for the data sink device and/or buffers the non-time synchronized data packets in a buffer and inhibits reading of non-time synchronized data packets that have been received by the data sink device.
4. The method of claim 1, wherein prior to the data collection device receiving the time synchronization data packet, the method further comprises:
the data acquisition equipment receives a data packet;
judging whether the data packet is a time synchronization data packet or not;
if so, starting to receive the time synchronization data packet.
5. The method according to any one of claims 1-4, wherein prior to the step of the data aggregation device generating time synchronization data packets based on the time synchronization pulse signal, further comprising:
generating synchronization data required by the time synchronization pulse signal before the data aggregation equipment receives the time synchronization pulse signal;
the step of generating a time synchronization packet based on the time synchronization pulse signal when the data aggregation device receives the time synchronization pulse signal includes:
when the data gathering device receives the time synchronization pulse signal, a time synchronization data packet is generated based on the time synchronization pulse signal and the synchronization data.
6. A time synchronization system, comprising:
a data collection device (100) and at least one data acquisition device (200) in wireless communication connection with the data collection device (100);
the data aggregation device (100) comprises:
the first time synchronization module (110) is used for receiving a time synchronization pulse signal sent by a global positioning system when detecting that a receiving time window of the time synchronization pulse signal is effective, and generating a time synchronization data packet based on the time synchronization pulse signal;
the first time synchronization module (110) performs the following operations before the step of receiving a time synchronization pulse signal when detecting that the reception time window is valid:
detecting whether a receiving time window is valid;
receiving a non-time synchronization data packet when detecting that the receiving time window is invalid;
a first wireless communication module (120) for transmitting the time synchronization data packet to the at least one data acquisition device (200);
each of the data acquisition devices (200) comprises:
the second wireless communication module (210) is used for receiving the time synchronization data packet sent by the data aggregation equipment in a wireless communication mode;
the second time synchronization module (220) is used for recording the clock count value of the internal clock counter of the data acquisition equipment (200) when the second wireless communication module (210) receives the time synchronization data packet sent by the data aggregation equipment in a wireless communication mode; calculating to obtain a local time interval based on the recorded adjacent clock count values; subtracting the local time interval from a preset standard time interval to obtain a time interval deviation; judging whether the time interval deviation is greater than a deviation threshold value; if so, adjusting the sampling parameters of the data acquisition equipment, otherwise, not adjusting the sampling parameters.
7. The system of claim 6, wherein the first time synchronization module (110) detects whether a receive time window is valid and performs the following operations:
reading a window clock count value in a data acquisition device, the window clock count value representing a local time counted in clocks;
dividing the window clock count value by the clock frequency to obtain local time;
judging whether the local time is greater than a first time threshold and less than a second time threshold;
if yes, the receiving time window is valid; otherwise, the receive time window is invalid.
8. The system according to claim 6, wherein when the first time synchronization module (110) detects that the reception time window is valid, the non-time synchronization packet to be sent to the first wireless communication module (120) is blocked, and/or the non-time synchronization packet is buffered in a buffer and reading of the received non-time synchronization packet is prohibited.
9. The system of claim 6, wherein, prior to the second time synchronization module (220) receiving the time synchronization packet, performing the following:
receiving a data packet;
judging whether the data packet is a time synchronization data packet or not;
if so, starting to receive the time synchronization data packet.
10. The system of claim 6, wherein prior to the step of the first time synchronization module (110) generating a time synchronization packet based on the time synchronization pulse signal, performing the following operations:
generating synchronization data required for the time synchronization pulse signal before the first wireless communication module (120) receives the time synchronization pulse signal;
when the first wireless communication module (120) receives the time synchronization pulse signal, the following operations are performed:
when the first time synchronization module (110) receives the time synchronization pulse signal, a time synchronization data packet is generated based on the time synchronization pulse signal and the synchronization data.
CN201710599086.8A 2017-07-21 2017-07-21 Time synchronization method and system Active CN109286459B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710599086.8A CN109286459B (en) 2017-07-21 2017-07-21 Time synchronization method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710599086.8A CN109286459B (en) 2017-07-21 2017-07-21 Time synchronization method and system

Publications (2)

Publication Number Publication Date
CN109286459A CN109286459A (en) 2019-01-29
CN109286459B true CN109286459B (en) 2020-09-15

Family

ID=65185654

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710599086.8A Active CN109286459B (en) 2017-07-21 2017-07-21 Time synchronization method and system

Country Status (1)

Country Link
CN (1) CN109286459B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111132201A (en) * 2020-01-09 2020-05-08 华南理工大学 Wireless measurement system based on UWB
CN113141226A (en) * 2020-01-20 2021-07-20 南京深视光点科技有限公司 Global clock synchronization method combining data packets and short pulses
CN111787013B (en) * 2020-07-03 2022-02-25 中国电子科技集团公司第三十研究所 Attack monitoring device and method of optical fiber time synchronization system
CN112333815B (en) * 2020-09-16 2022-09-16 慧感(上海)物联网科技有限公司 Clock matching method of industrial wireless interconnection system
CN113110369B (en) * 2021-03-09 2022-09-09 广东安朴电力技术有限公司 Hierarchical control system time synchronization method and communication system
CN114364010B (en) * 2021-12-10 2023-10-27 深圳市汇顶科技股份有限公司 Synchronous relation establishing method, chip, electronic equipment and storage medium
CN114727382B (en) * 2022-04-18 2024-02-13 杭州魔迅科技有限公司 Networking method, networking device, computer equipment and storage medium
CN116579762B (en) * 2023-04-14 2023-10-20 广州林旺空调工程有限公司 Intelligent operation and maintenance platform for cooling tower

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339229A (en) * 2008-08-18 2009-01-07 江西省电力科学研究院 High-voltage circuit-breaker status on-line monitoring method based on synchronous sampling
CN102183253A (en) * 2010-12-31 2011-09-14 北京航空航天大学 Software time synchronization method for position and orientation system
CN105511256A (en) * 2015-12-14 2016-04-20 国网山西省电力公司大同供电公司 Insulation online high-precision synchronization measurement and time marking method based on master station GPS

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8018950B2 (en) * 2008-03-17 2011-09-13 Wi-Lan, Inc. Systems and methods for distributing GPS clock to communications devices

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101339229A (en) * 2008-08-18 2009-01-07 江西省电力科学研究院 High-voltage circuit-breaker status on-line monitoring method based on synchronous sampling
CN102183253A (en) * 2010-12-31 2011-09-14 北京航空航天大学 Software time synchronization method for position and orientation system
CN105511256A (en) * 2015-12-14 2016-04-20 国网山西省电力公司大同供电公司 Insulation online high-precision synchronization measurement and time marking method based on master station GPS

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
数字变电站的一起同步采样事故分析及变时间窗综合纠错对时方案;张晓华等;《电力系统保护与控制》;20111201;第39卷(第23期);128-132 *

Also Published As

Publication number Publication date
CN109286459A (en) 2019-01-29

Similar Documents

Publication Publication Date Title
CN109286459B (en) Time synchronization method and system
DK1807706T3 (en) PLATFORM WITH ELECTRICAL INSTRUMENTS INTENDED FOR FITTING AND REMOVING A HIGH VOLTAGE UNDER VOLTAGE
CN101331736B (en) Using travel-time as means for improving the accuracy of simple network time protocol
CN105785144B (en) A kind of whole station detecting system of wireless distributed substation's electrical quantity and method
CN106547240B (en) A kind of port sample rate can separate configurations site acquisition and control public terminals and method
CN102033190A (en) Traveling wave fault location method for transmission line based on electronic transformer
CN103069526B (en) Circuit breaker phase control switch system and circuit breaker control unit
JP5373260B2 (en) Accident point location method and system for transmission and distribution systems
WO2019196425A1 (en) Method and apparatus for credibility assessment of network packet delay measurement, and storage medium
CN109425844A (en) A kind of calibration method and system of data sampling
KR101698227B1 (en) Apparatus for time synchronization of substation automation system
CN201425704Y (en) Satellite synchronous main clock device
CN109286460A (en) A kind of method for synchronizing time and system based on wireless communication
CN103715766A (en) Ring network distributed bus protection synchronization method
CN109342884A (en) Travelling wave ranging and fault recording integrated device and implementation method
JP6186978B2 (en) Protection monitoring control system
CA2936242C (en) Synchrophasor data management systems and methods
CN108666990B (en) Power grid differential protection method and system
CN103399264B (en) High-tension cable partial discharge monitoring and positioning system
CN103616653A (en) System and method for testing clock synchronization and clock precision of power quality monitor terminal
CN105162726A (en) Remote SV data transmission and delay compensation method based on E1 link
CN107566072A (en) A kind of secondary device clock synchronizing method based on dual time correction
CN107359599B (en) A kind of difference current time difference modification method, device and differential protecting method, device
JP2007188299A (en) System and method for multipoint measurement
CN102411085B (en) Alternating current collecting and merging device and alternating current collecting method

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