CN112462848A - Clock offset correction method and device and computer equipment - Google Patents

Clock offset correction method and device and computer equipment Download PDF

Info

Publication number
CN112462848A
CN112462848A CN202011420333.1A CN202011420333A CN112462848A CN 112462848 A CN112462848 A CN 112462848A CN 202011420333 A CN202011420333 A CN 202011420333A CN 112462848 A CN112462848 A CN 112462848A
Authority
CN
China
Prior art keywords
frequency
moment
equipment
monitored
determining
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
CN202011420333.1A
Other languages
Chinese (zh)
Other versions
CN112462848B (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.)
Shenzhen Power Supply Bureau Co Ltd
Original Assignee
Shenzhen Power Supply Bureau 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 Shenzhen Power Supply Bureau Co Ltd filed Critical Shenzhen Power Supply Bureau Co Ltd
Priority to CN202011420333.1A priority Critical patent/CN112462848B/en
Publication of CN112462848A publication Critical patent/CN112462848A/en
Application granted granted Critical
Publication of CN112462848B publication Critical patent/CN112462848B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/14Time supervision arrangements, e.g. real time clock
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/08Clock generators with changeable or programmable clock frequency
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • Economics (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Electric Clocks (AREA)
  • Supply And Distribution Of Alternating Current (AREA)

Abstract

The application relates to the technical field of power grid monitoring, and particularly discloses a clock offset correction method, a clock offset correction device and computer equipment. The method comprises the following steps: acquiring the frequency monitored by each monitoring device at each moment; determining abnormal frequency equipment and normal frequency equipment corresponding to each moment according to the frequency monitored by each monitoring device at each moment; determining a first target frequency corresponding to each moment according to the frequency monitored by the normal frequency equipment corresponding to each moment; and correcting the frequency monitored by the abnormal frequency equipment at each moment according to the first target frequency corresponding to each moment so as to correct the time synchronization deviation among the monitoring equipment. And the clock deviation between the monitoring devices is corrected by correcting the frequency. Because the frequencies at the same moment in the power grid have consistency, the time synchronism can be traced back based on the deviation between the monitored frequencies, and the problem of clock deviation caused by time synchronization deviation is solved.

Description

Clock offset correction method and device and computer equipment
Technical Field
The invention relates to the technical field of power grid monitoring, in particular to a clock deviation correction method, a clock deviation correction device and computer equipment.
Background
With the transformation of the power grid to high-quality development, the massive access of new energy and the rapid development of direct current technology, the power electronization characteristics of the power system become more obvious, and the power quality problem caused by the obvious characteristics is increasingly concerned. At present, domestic power grid companies gradually install on-line power quality monitoring devices in substations of all levels to monitor the power quality conditions of all regions in real time. While the number of the power quality monitoring devices is rapidly increased, massive monitoring data generated in a geometric series explosive mode is generated.
At present, the methods mainly adopted by device manufacturers or power grid companies for applying the large data are still large-scale storage and post-analysis calculation, diagnosis and error correction of the monitoring data are not involved, and more monitoring data are found to have data quality problems in engineering application. Among them, the problem of time shift of data acquisition due to clock skew between devices is more and more prominent, and a solution is lacking.
Disclosure of Invention
In view of the above, it is necessary to provide a clock skew correction method, a clock skew correction device, and a computer apparatus for solving the problem of time skew occurring in data acquisition due to clock skew between devices.
A clock deviation correction method is used for correcting clock deviations among online power quality monitoring devices in a power grid and comprises the following steps:
acquiring the frequency monitored by each monitoring device at each moment;
determining abnormal frequency equipment and normal frequency equipment corresponding to each moment according to the frequency monitored by each monitoring device at each moment;
determining a first target frequency corresponding to each moment according to the frequency monitored by the normal frequency equipment corresponding to each moment;
and correcting the frequency monitored by the abnormal frequency equipment at each moment according to the first target frequency corresponding to each moment so as to correct the time synchronization deviation among the monitoring equipment.
In one embodiment, after the step of correcting the frequency monitored by the abnormal frequency device at each time according to the first target frequency corresponding to each time to correct the time offset between the monitoring devices, the clock offset correction method further includes:
updating the first target frequency according to the frequency monitored by the normal frequency equipment and the frequency corrected by the abnormal frequency equipment to obtain a second target frequency corresponding to each moment;
determining the frequency monitored by the normal frequency equipment and the frequency deviation amount of the frequency corrected by the abnormal frequency equipment and the second target frequency corresponding to the moment at the same moment;
and determining a clock deviation amount according to each frequency deviation amount so as to carry out secondary correction on each monitoring device.
In one embodiment, the step of determining the abnormal frequency device and the normal frequency device corresponding to each time according to the frequency monitored by each monitoring device at each time includes:
determining a first average value of the frequencies monitored by a plurality of monitoring devices at the same time;
determining the standard deviation of the frequencies of a plurality of monitoring devices at the same time;
and determining abnormal frequency equipment and normal frequency equipment corresponding to the moment according to the first average value, the frequency calibration difference and the frequency monitored by each monitoring device.
In one embodiment, the step of determining the first target frequency corresponding to each time according to the frequency monitored by the normal frequency device corresponding to each time includes:
and determining a second average value of the frequencies monitored by the plurality of normal frequency devices at the same moment, and taking the second average value as a first target frequency corresponding to the moment.
In one embodiment, the step of correcting the frequency monitored by the abnormal frequency device at each time according to the first target frequency corresponding to each time includes:
forming a system frequency curve according to a plurality of first target frequencies corresponding to each moment;
generating a plurality of device frequency curves according to the frequency monitored by the abnormal frequency device at each moment;
and correcting a plurality of device frequency curves according to the system frequency curve so as to correct the time synchronization deviation of each monitoring device.
In one embodiment, in the step of correcting a number of the device frequency curves according to the system frequency curve to correct the time-lapse deviation of each monitoring device,
translating the equipment frequency curve along a time axis to match the system frequency curve, and acquiring a preset coefficient between the equipment frequency curve and the system frequency curve in real time, wherein the preset coefficient is used for reflecting the correlation degree of the equipment frequency curve and the system frequency curve;
and when the preset coefficient does not meet the first preset condition, determining that the timing function of the current monitoring equipment is invalid.
In one embodiment, the predetermined coefficients include pearson correlation coefficients.
In one embodiment, the step of updating the first target frequency according to the frequency monitored by the normal frequency device and the frequency corrected by the abnormal frequency device to obtain a second target frequency corresponding to each time includes:
and acquiring a third average value of the frequency monitored by the normal frequency equipment and the frequency corrected by the abnormal frequency equipment at the same moment, and taking the third average value as a second target frequency corresponding to the moment.
In one embodiment, the step of determining a clock deviation amount according to each frequency deviation amount to perform secondary correction on each monitoring device includes:
determining a frequency deviation allowance quantity;
comparing each frequency deviation amount with the frequency deviation allowable amount;
when the frequency deviation amount exceeds the frequency deviation allowable amount, determining a clock deviation amount according to the frequency deviation amount so as to correct the monitoring equipment.
A clock skew correction device, the clock skew correction device is used for correcting clock skew between each electric energy quality on-line monitoring equipment in a power grid, the clock skew correction device comprises:
the first acquisition unit is used for acquiring the frequency monitored by each monitoring device at each moment;
the first determining unit is used for determining abnormal frequency equipment and normal frequency equipment corresponding to each moment according to the frequency monitored by each monitoring device at each moment;
the second determining unit is used for determining a first target frequency corresponding to each moment according to the frequency monitored by the normal frequency equipment corresponding to each moment;
and the correcting unit is used for correcting the frequency monitored by the abnormal frequency equipment at each moment according to the first target frequency corresponding to each moment so as to correct the time synchronization deviation among the monitoring equipment.
A computer device comprising a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the clock skew correction method described above.
A computer readable storage medium having stored therein computer instructions which, when executed by a processor, implement a clock skew correction method as described above.
According to the clock offset correction method, firstly, the frequency monitored by each monitoring device at each moment is obtained, then the abnormal frequency device and the normal frequency device corresponding to each moment are determined, the first target frequency corresponding to each moment is determined according to the frequency monitored by the normal frequency device, the frequency monitored by the abnormal frequency device is corrected according to the first target frequency, and therefore the clock offset between the monitoring devices is corrected in a frequency correction mode. Because the frequencies at the same moment in the power grid have consistency, the time synchronism can be traced back based on the deviation between the monitored frequencies, and the problem of clock deviation caused by time synchronization deviation is solved.
Drawings
Fig. 1 is a block flow diagram of an implementation manner of a clock skew correction method according to an embodiment of the present application;
fig. 2 is a block flow diagram of another implementation of a clock skew correction method according to an embodiment of the present disclosure;
fig. 3 is a flowchart illustrating an implementation manner of step S110 in the clock skew correction method according to an embodiment of the present application;
fig. 4 is a flowchart of an implementation manner of step S130 in the clock skew correction method according to an embodiment of the present application;
fig. 5 is a flowchart of an implementation manner of step S160 in the clock skew correction method according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a clock skew correction apparatus according to a second embodiment of the present application;
fig. 7 is a schematic structural diagram of a computer device according to a third embodiment of the present application.
Detailed Description
To facilitate an understanding of the invention, the invention will now be described more fully with reference to the accompanying drawings. Preferred embodiments of the present invention are shown in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
The terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
As described in the background art, domestic power grid companies have installed online power quality monitoring devices in substations at different levels step by step, and the online power quality monitoring devices monitor the power quality conditions of various areas in real time. However, with the rapid increase of the number of the on-line monitoring equipment for the power quality, a large amount of monitoring data is brought along. At present, the mass monitoring data are only stored and analyzed in a large scale, and the monitoring data cannot be diagnosed and corrected. In practice, time shift often occurs between the data monitored by each monitoring device.
The applicant has found that the main cause of data skew is clock skew between monitoring devices. To save costs, most monitoring devices are not equipped with accurate GPS or employ communication time synchronization methods, and have no external time-correcting clock source, but rather employ a local clock. Due to the fact that factory settings of the monitoring devices are inconsistent or timing deviation problems such as artificial time service deviation exist in the installation and verification process, clock deviation among the monitoring devices is prone to occurring. In addition, the inherent characteristics or aging of the clock module inside each monitoring device can also cause clock deviation, specifically, the internal timing of the monitoring device mainly adopts a singlechip integrated clock module which mainly adopts a low-frequency crystal oscillator technology and mainly provides clock service, but the oscillation frequency of the quartz crystal oscillator inside the monitoring device can change along with the temperature change, namely, the monitoring device has temperature characteristics, due to the characteristics, the accuracy of the clock module can deviate along with the temperature change, the temperature characteristics of different crystal oscillators are different, different crystal oscillators also have different accuracy levels, for example, the accuracy levels are different from 0.1ppm to 200ppm, the inherent deviation can be inevitably generated, the operating time of the monitoring device is too long, and the aging of devices can also influence the working accuracy of the crystal oscillators.
Therefore, in order to solve the problem of clock skew among the monitoring devices, timing skew such as inconsistency of factory settings of the monitoring devices or artificial timing skew in the installation and verification process and skew caused by clock modules inside the monitoring devices can be solved.
In order to solve the above problems, the present application provides a clock skew correction method, apparatus, computer device, and computer-readable storage medium.
Example one
The embodiment provides a clock deviation correction method, which is used for correcting clock deviations among online power quality monitoring devices in a power grid.
Referring to fig. 1, the clock skew correction method provided in this embodiment includes the following steps:
step S100: and acquiring the frequency monitored by each monitoring device at each moment.
Specifically, in practical application, each transformer substation is provided with corresponding monitoring equipment, and the power quality condition of the transformer substation area is monitored through the monitoring equipment. Each monitoring device uploads the monitored data to the power grid master station according to a preset period, for example, the monitored data is uploaded every three minutes or five minutes. In this embodiment, the system frequency of each substation is monitored by the monitoring device, and since the frequencies at various places in the power grid are consistent at the same time, if there is no clock deviation between the monitoring devices, the obtained frequencies should be consistent, and if there is clock deviation between the monitoring devices, there will be a deviation between the obtained frequencies, so in this embodiment, the frequency index is used as a reference for time synchronization.
The time window is given as an example of a day, and assuming that the monitoring device uploads frequency data every three minutes, in one day, one monitoring device corresponds to 480 time frequency data samples, x monitoring devices correspond to x × 480 frequency data samples, and all the data samples may form an x × 480 matrix.
Step S110: and determining abnormal frequency equipment and normal frequency equipment corresponding to each moment according to the frequency monitored by each monitoring equipment at each moment.
After the frequencies monitored by the monitoring devices at all times are obtained, the abnormal frequencies in the frequencies at the same time can be determined, and then the monitoring devices corresponding to the abnormal frequencies are determined, namely the abnormal frequency devices at the same time can be determined, and the abnormal frequency devices opposite to the abnormal frequency devices are normal frequency devices. Therefore, a plurality of abnormal frequency devices and a plurality of normal frequency devices corresponding to each moment can be determined.
The method for determining the abnormal frequency in the plurality of frequencies may be various, and the abnormal frequency may be determined according to the difference between each frequency and the average value of the plurality of frequencies, or one standard frequency value may be determined according to the difference between each frequency and the standard frequency value, or other determination methods may be used, which are not listed here, as long as the abnormal frequency and the normal frequency can be determined.
Step S120: and determining a first target frequency corresponding to each moment according to the frequency monitored by the normal frequency equipment corresponding to each moment.
After the normal frequency device and the abnormal frequency device are determined, a reference frequency value can be determined according to the frequency monitored by the normal frequency device at the same moment, the reference frequency value is taken as a first target frequency corresponding to the moment, each moment has a corresponding first target frequency, and the first target frequency corresponding to each moment can be determined. The determined first target frequency is used for correcting the frequency of the abnormal frequency device.
Step S130: and correcting the frequency monitored by the abnormal frequency equipment according to the first target frequency corresponding to each moment so as to correct the time synchronization deviation among the monitoring equipment.
After the first target frequency corresponding to each moment is determined, the frequency monitored by the abnormal frequency equipment corresponding to the moment can be corrected according to the first target frequency corresponding to the same moment, and accordingly, correction can be performed one by one according to the frequency of the abnormal frequency equipment at each moment, and correction of time deviation among the monitoring equipment is achieved.
According to the clock offset correction method, firstly, the frequency monitored by each monitoring device at each moment is obtained, then the abnormal frequency device and the normal frequency device corresponding to each moment are determined, the first target frequency corresponding to each moment is determined according to the frequency monitored by the normal frequency device, the frequency monitored by the abnormal frequency device is corrected according to the first target frequency, and therefore the clock offset between the monitoring devices is corrected in a frequency correction mode. Because the frequencies at the same moment in the power grid have consistency, the time synchronism can be traced back based on the deviation between the monitored frequencies, and the problem of clock deviation caused by time synchronization deviation is solved.
In one embodiment, referring to fig. 2, after step S130, that is, the step of correcting the frequencies of the abnormal frequency devices centralized monitoring devices according to the first target frequency corresponding to each time to correct the time deviation between the monitoring devices, the clock deviation correction method provided in this embodiment further includes the following steps:
step S140, updating the first target frequency according to the frequency monitored by the normal frequency device and the frequency corrected by the abnormal frequency device, and obtaining a second target frequency corresponding to each time.
When the frequency of the abnormal frequency device is corrected, the first target frequency may be updated according to the corrected frequency and the frequency monitored by the normal frequency device, and in order to distinguish from the first target frequency, the updated first target frequency is defined as the second target frequency in the embodiment. Similar to the previous step of determining the first target frequency, each time corresponds to one second target frequency, that is, a plurality of second target frequencies are determined, and each second target frequency corresponds to each time. The second target frequency is used in the subsequent process of secondarily correcting the frequency.
Step S150, determining the frequency monitored by the normal frequency device and the frequency deviation amount between the frequency corrected by the abnormal frequency device and the second target frequency corresponding to the time at the same time.
After the second target frequency at each time is obtained, the deviation amount between the frequency of each monitoring device at the same time (including the frequency monitored by the normal frequency device and the frequency obtained by correcting the frequency monitored by the abnormal frequency device) and the second target frequency at the time can be calculated. Note that, in the abnormal frequency devices, there are devices whose accurate timing function is lost, the frequencies of these devices cannot be corrected, and in step S150, these devices whose accurate timing function is lost are not calculated.
Assuming that a total of y monitoring devices are removed from the device with lost precision timing function, then y × 480 offsets are obtained.
And step S160, determining the clock deviation according to each frequency deviation amount so as to perform secondary correction on each monitoring device.
After the frequency deviation amount is determined, the frequency of each monitoring device can be secondarily corrected according to each frequency deviation amount. The secondary correction corrects the clock skew problem caused by the internal clock device of the monitoring equipment, that is, the clock skew caused by the internal clock device is finely adjusted on the basis of the primary correction in step S130, so that the clock skew is corrected from two angles, namely, the timing skew such as the factory setting of each monitoring equipment is inconsistent or the artificial time service skew exists in the installation and verification process, and the skew caused by the internal clock module of the monitoring equipment, and the corrected clock is good in consistency.
In one embodiment, referring to fig. 3, in step S110, the step of determining the abnormal frequency device and the normal frequency device corresponding to each time according to the frequency monitored by each monitoring device at each time includes:
step S111, determining a first average value of the frequencies monitored by the plurality of monitoring devices at the same time.
That is, the frequencies monitored by a plurality of monitoring devices at the same time are averaged, which is defined as the first average value in this embodiment. From this, a number of first averages can be determined, each corresponding to a time instant.
Step S112, determining the standard deviation of the frequencies of the plurality of monitoring devices at the same time.
And step S113, determining abnormal frequency equipment and normal frequency equipment corresponding to the moment according to the first average value, the frequency calibration difference and the frequency monitored by each monitoring device.
The difference between the frequency of each monitoring device and the first average value can be determined firstly, the tolerance amount is determined according to the standard deviation of the frequency, the difference between the frequency of each monitoring device and the first average value is compared with the tolerance amount, if the tolerance amount is exceeded, the frequency is determined to be abnormal frequency, otherwise, the frequency is determined to be normal frequency.
Specifically, the monitoring device with abnormal frequency at each moment can be screened out according to an n-sigma criterion, wherein the formula of the n-sigma criterion is as follows:
Figure BDA0002821875320000111
wherein f isiFor the frequency monitored by the ith monitoring device at a certain moment,
Figure BDA0002821875320000112
the first average value of the frequencies monitored by the x monitoring devices at the same moment, and sigma is the standard deviation of the frequencies of the x monitoring devices at the same moment. Given that most are good devices, n typically takes 1 or 2, although other values may be used. And the monitoring equipment with the delta f larger than the n sigma is abnormal frequency equipment.
In one embodiment, in step S120, the step of determining the first target frequency corresponding to each time according to the frequency monitored by the normal frequency device corresponding to each time includes:
and determining a second average value of the frequencies monitored by the plurality of normal frequency devices at the same moment, and taking the second average value as the first target frequency corresponding to the moment. That is, an average value of frequencies monitored by a plurality of normal frequency devices at the same time is taken, and the average value is taken as a first target frequency at the time, where the second average value is defined as the first target frequency in this embodiment. From this, a number of first target frequencies can be determined, each first target frequency corresponding to each time instant.
In one embodiment, referring to fig. 4, in step S130, the step of correcting the frequency of each monitoring device in the abnormal frequency device set according to the first target frequency corresponding to each time includes:
step S131, a system frequency curve is formed according to the first target frequency corresponding to each time.
Since each time has a corresponding first target frequency, a system frequency curve with time on the abscissa and frequency on the ordinate is generated.
Step S132, generating a plurality of device frequency curves according to the frequency monitored by the abnormal frequency device at each moment.
Similarly, an equipment frequency curve of the abnormal frequency equipment is generated according to the frequency monitored by the abnormal frequency equipment at each moment, wherein the abscissa of the equipment frequency curve is the moment, and the ordinate is the frequency. Each abnormal frequency device has a corresponding device frequency curve.
And S133, correcting a plurality of equipment frequency curves according to the system frequency curve so as to correct the frequency of each monitoring equipment.
When the system frequency curve and the plurality of equipment frequency curves are determined, the system frequency curve can be used as a reference curve, and the plurality of equipment frequency curves are adjusted one by one or synchronously, so that the difference between the equipment frequency curve and the system frequency curve is reduced, the frequency of each monitoring equipment is corrected, and the aim of correcting the time synchronization deviation is fulfilled.
The mode of correcting the frequency curve of the equipment through the system frequency curve can realize quick batch adjustment of time deviation, and the correction efficiency is high.
In one embodiment, in step S133, i.e. the step of correcting several device frequency curves according to the system frequency curve to correct the frequency-versus-time deviation of each monitoring device,
and translating the equipment frequency curve along a time axis to match the system frequency curve, and acquiring a preset coefficient between the equipment frequency curve and the system frequency curve in real time, wherein the preset coefficient is used for reflecting the correlation degree of the equipment frequency curve and the system frequency curve.
And when the preset coefficient does not meet the first preset condition, determining that the timing function of the current monitoring equipment is invalid. It should be noted that the term "timing function failure" as used in this application refers to the failure of the precise timing function, and does not mean that the timing is completely disabled.
The clock deviation is reflected as the time deviation on the abscissa on the curve, and when the clock deviation occurs to the same monitoring device, the frequency monitored at each time is always kept to be fixed with the system frequency at the corresponding time, namely, the frequency curve of the whole device is deviated leftwards or rightwards along the time axis compared with the whole horizontal line of the frequency curve of the system. Based on this, in this embodiment, the device frequency curve is moved along the time axis to approach and match the device frequency curve to the system frequency curve, and the matching process is a correction process. In the correction process, a preset coefficient reflecting the correlation degree (or matching degree) of the device frequency curve and the system frequency curve can be analyzed in real time, and whether the device frequency curve and the system frequency curve are successfully matched or not is judged according to the analysis result, namely whether the correction is successful or not is judged. And when the preset coefficient meets a certain preset condition, judging that the correction is successful, otherwise, judging that the correction is failed, confirming that the accurate timing function of the monitoring equipment is lost, and marking the monitoring equipment for subsequent manual verification.
In one embodiment, the predetermined coefficients include Pearson's correlation coefficients.
The calculation formula of the pearson correlation coefficient is as follows:
Figure BDA0002821875320000131
wherein sigmafiIs the standard deviation, σ, of the frequency of the i-th monitoring deviceMIs the standard deviation of the system frequency, w is the total number of time instants, fiRefers to the frequency curve of the ith station device,
Figure BDA0002821875320000132
is a system frequency curve, fi,tFor the frequency monitored by the ith monitoring device at the time t,
Figure BDA0002821875320000133
is the average value of the frequency of the ith monitoring device at different time points, mtIs the system frequency at the t-th time.
If the calculated r is greater than or equal to 0.95, determining that the system frequency curve is successfully matched with the equipment frequency curve of the monitoring equipment and the frequency deviation is successfully corrected, and if the r is less than 0.95, determining that the accurate timing function of the monitoring equipment is lost.
In one embodiment, in step S140, the step of updating the first target frequency according to the frequency monitored by the normal frequency device and the frequency corrected by the abnormal frequency device to obtain the second target frequency corresponding to each time includes:
and acquiring a third average value of the frequency monitored by the normal frequency equipment and the frequency corrected by the abnormal frequency equipment at the same moment, and taking the third average value as a second target frequency corresponding to the moment.
After the frequency of the abnormal frequency device is corrected, an average value of the frequency corrected by the abnormal frequency device and the frequency monitored by the normal frequency device at the same time may be taken, which is defined as a third average value in this embodiment, and the third average value is taken as a second target frequency corresponding to the time.
In one embodiment, referring to fig. 5, step S160, determining a clock offset according to each frequency offset to perform secondary correction on each monitoring device, includes:
step S161, determining the allowable amount of frequency deviation.
And step S162, comparing each deviation amount with the allowable frequency deviation amount.
And step S163, when the deviation amount exceeds the frequency deviation allowance amount, determining the clock deviation according to the frequency deviation amount so as to correct the monitoring equipment.
Specifically, according to the general requirements of GB/T19862-2016 electric energy quality monitoring equipment: under the condition of no external time setting, the device allows the time setting error to be +/-1 s/24 h. Assuming that the monitoring device uploads data every three minutes, the allowable amount k of frequency deviation every three minutes can be calculated according to the following formula:
Figure BDA0002821875320000141
wherein the content of the first and second substances,
Figure BDA0002821875320000142
for the total number of cycles measured by the monitoring device per day (0.02 s per cycle of the power signal),
Figure BDA0002821875320000143
in order to monitor the number of cycles contained by the device per day tolerance 1s,
Figure BDA0002821875320000144
is the frequency at which there is a 1s deviation per day.
And when the deviation amount exceeds k, determining the clock deviation based on the frequency deviation amount to correct the monitoring equipment, marking the monitoring equipment for subsequent manual verification, and if the deviation amount does not exceed k, proving that the monitoring equipment does not need to be corrected.
In this way, it is possible to correct for deviations caused by the internal clock means of the monitoring device.
Example two
The embodiment provides a clock deviation correction device, which is used for correcting clock deviations among online power quality monitoring equipment in a power grid. Referring to fig. 6, the clock skew correction apparatus provided by the present embodiment includes a first acquisition unit 20, a first determination unit 21, a second determination unit 22, and a correction unit 23.
The first obtaining unit 20 is configured to obtain a frequency monitored by each monitoring device at each time;
the first determining unit 21 is configured to determine, according to the frequency monitored by each monitoring device at each time, an abnormal frequency device and a normal frequency device corresponding to each time;
the second determining unit 22 is configured to determine a first target frequency corresponding to each time according to the frequency monitored by the normal frequency device corresponding to each time;
the correcting unit 23 is configured to correct the frequency monitored by the abnormal frequency device according to the first target frequency corresponding to each time, so as to correct the time synchronization deviation between the monitoring devices.
The clock offset correction device firstly acquires the frequency monitored by each monitoring device at each moment, then determines the abnormal frequency device and the normal frequency device corresponding to each moment, determines the first target frequency corresponding to each moment according to the frequency monitored by the normal frequency device, and corrects the frequency monitored by the abnormal frequency device according to the first target frequency, namely realizes the correction of the clock offset among the monitoring devices in a frequency correction mode. Because the frequencies at the same moment in the power grid have consistency, the time synchronism can be traced back based on the deviation between the monitored frequencies, and the problem of clock deviation caused by time synchronization deviation is solved.
The clock skew correction device provided in this embodiment and the clock skew correction method provided in the first embodiment belong to the same inventive concept, and for specific contents of the clock skew correction device, reference may be made to the corresponding description in the first embodiment, which is not described herein again.
EXAMPLE III
The embodiment of the present application further provides a computer device, as shown in fig. 7, the computer device includes a memory 100 and a processor 200. The memory 100 and the processor 200 are communicatively connected to each other through a bus or other means, and fig. 7 illustrates the connection through the bus as an example.
Processor 200 may be a Central Processing Unit (CPU). The Processor 200 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof.
The memory 100, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions corresponding to the clock skew correction method in the embodiments of the present invention. The processor 200 executes various functional applications and data processing of the processor 200, i.e., implements a clock skew correction method, by running non-transitory software programs, instructions, and modules stored in the memory 100.
The memory 100 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 200, and the like. Further, the memory 100 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 100 may optionally include memory located remotely from processor 200, which may be connected to the processor via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (12)

1. A clock skew correction method is characterized in that the clock skew correction method is used for correcting clock skew among online power quality monitoring devices in a power grid, and comprises the following steps:
acquiring the frequency monitored by each monitoring device at each moment;
determining abnormal frequency equipment and normal frequency equipment corresponding to each moment according to the frequency monitored by each monitoring device at each moment;
determining a first target frequency corresponding to each moment according to the frequency monitored by the normal frequency equipment corresponding to each moment;
and correcting the frequency monitored by the abnormal frequency equipment at each moment according to the first target frequency corresponding to each moment so as to correct the time synchronization deviation among the monitoring equipment.
2. The clock skew correction method according to claim 1, wherein after the step of correcting the frequency monitored by the abnormal frequency device at each time based on the first target frequency corresponding to each time to correct the time synchronization skew between the monitoring devices, the clock skew correction method further comprises:
updating the first target frequency according to the frequency monitored by the normal frequency equipment and the frequency corrected by the abnormal frequency equipment to obtain a second target frequency corresponding to each moment;
determining the frequency monitored by the normal frequency equipment and the frequency deviation amount of the frequency corrected by the abnormal frequency equipment and the second target frequency corresponding to the moment at the same moment;
and determining a clock deviation according to each frequency deviation amount so as to perform secondary correction on each monitoring device.
3. The clock skew correction method according to claim 1, wherein the step of determining an abnormal frequency device and a normal frequency device corresponding to each time, based on the frequency monitored by each monitoring device at each time, includes:
determining a first average value of the frequencies monitored by a plurality of monitoring devices at the same time;
determining the standard deviation of the frequencies of a plurality of monitoring devices at the same time;
and determining abnormal frequency equipment and normal frequency equipment corresponding to the moment according to the first average value, the frequency calibration difference and the frequency monitored by each monitoring device.
4. The clock skew correction method according to claim 1, wherein the step of determining the first target frequency corresponding to each time according to the frequency monitored by the normal frequency device corresponding to each time comprises:
and determining a second average value of the frequencies monitored by the plurality of normal frequency devices at the same moment, and taking the second average value as a first target frequency corresponding to the moment.
5. The clock skew correction method according to claim 1, wherein the step of correcting the frequency monitored by the abnormal frequency device at each time according to the first target frequency corresponding to each time includes:
forming a system frequency curve according to a plurality of first target frequencies corresponding to each moment;
generating a plurality of device frequency curves according to the frequency monitored by the abnormal frequency device at each moment;
and correcting a plurality of device frequency curves according to the system frequency curve so as to correct the time synchronization deviation of each monitoring device.
6. The clock skew correction method of claim 5, wherein in said step of correcting a plurality of said device frequency profiles according to said system frequency profile to correct the time-lapse skew of each monitoring device,
translating the equipment frequency curve along a time axis to match the system frequency curve, and acquiring a preset coefficient between the equipment frequency curve and the system frequency curve in real time, wherein the preset coefficient is used for reflecting the correlation degree of the equipment frequency curve and the system frequency curve;
and when the preset coefficient does not meet the first preset condition, determining that the timing function of the current monitoring equipment is invalid.
7. The clock skew correction method of claim 6, wherein the preset coefficients comprise Pearson's correlation coefficients.
8. The clock skew correction method according to claim 2, wherein the step of updating the first target frequency according to the frequency monitored by the normal frequency device and the frequency corrected by the abnormal frequency device to obtain a second target frequency corresponding to each time includes:
and acquiring a third average value of the frequency monitored by the normal frequency equipment and the frequency corrected by the abnormal frequency equipment at the same moment, and taking the third average value as a second target frequency corresponding to the moment.
9. The clock skew correction method according to claim 2, wherein the step of determining the clock skew from each of the frequency skew amounts to secondarily correct each of the monitoring devices includes:
determining a frequency deviation allowance quantity;
comparing each frequency deviation amount with the frequency deviation allowable amount;
and when the frequency deviation amount exceeds the frequency deviation allowable amount, determining a clock deviation according to the frequency deviation amount so as to correct the monitoring equipment.
10. A clock skew correction device, characterized in that, the clock skew correction device is used for correcting clock skew between each electric energy quality on-line monitoring equipment in the electric network, the clock skew correction device includes:
the first acquisition unit is used for acquiring the frequency monitored by each monitoring device at each moment;
the first determining unit is used for determining abnormal frequency equipment and normal frequency equipment corresponding to each moment according to the frequency monitored by each monitoring device at each moment;
the second determining unit is used for determining a first target frequency corresponding to each moment according to the frequency monitored by the normal frequency equipment corresponding to each moment;
and the correcting unit is used for correcting the frequency monitored by the abnormal frequency equipment at each moment according to the first target frequency corresponding to each moment so as to correct the time synchronization deviation among the monitoring equipment.
11. A computer device comprising a memory and a processor, the memory and the processor being communicatively coupled to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the clock skew correction method of any of claims 1-9.
12. A computer-readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the clock skew correction method of any one of claims 1-9.
CN202011420333.1A 2020-12-07 2020-12-07 Clock deviation correction method and device and computer equipment Active CN112462848B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011420333.1A CN112462848B (en) 2020-12-07 2020-12-07 Clock deviation correction method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011420333.1A CN112462848B (en) 2020-12-07 2020-12-07 Clock deviation correction method and device and computer equipment

Publications (2)

Publication Number Publication Date
CN112462848A true CN112462848A (en) 2021-03-09
CN112462848B CN112462848B (en) 2024-04-09

Family

ID=74800835

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011420333.1A Active CN112462848B (en) 2020-12-07 2020-12-07 Clock deviation correction method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN112462848B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114978403A (en) * 2022-07-29 2022-08-30 深圳市英特瑞半导体科技有限公司 Method and device for measuring clock holding phase deviation value
CN115134905A (en) * 2022-06-27 2022-09-30 国网青海省电力公司信息通信公司 Frequency calibration method and device, nonvolatile storage medium and computer equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001007686A (en) * 1999-06-24 2001-01-12 Nec Corp Method and circuit for controlling clock signal and data transmitter using the same
US20020023239A1 (en) * 2000-07-26 2002-02-21 Kiyoshi Nomura Clock supply circuit
CN1514255A (en) * 2002-12-25 2004-07-21 恩益禧电子股份有限公司 Frequency detecting circuit and data processor
CN101900777A (en) * 2009-05-27 2010-12-01 河南省电力勘测设计院 Monitoring method and device of power system
CN103984305A (en) * 2014-05-06 2014-08-13 国网吉林省电力有限公司 Method for evaluating clock state of power grid automation equipment based on data statistic analysis
CN107272821A (en) * 2017-06-07 2017-10-20 上海东软载波微电子有限公司 Calibration method of real-time clock and device, storage medium, electronic equipment
CN110543093A (en) * 2019-07-05 2019-12-06 齐鲁工业大学 Power distribution terminal time synchronization method using power grid frequency value comparison

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001007686A (en) * 1999-06-24 2001-01-12 Nec Corp Method and circuit for controlling clock signal and data transmitter using the same
US20020023239A1 (en) * 2000-07-26 2002-02-21 Kiyoshi Nomura Clock supply circuit
CN1514255A (en) * 2002-12-25 2004-07-21 恩益禧电子股份有限公司 Frequency detecting circuit and data processor
CN101900777A (en) * 2009-05-27 2010-12-01 河南省电力勘测设计院 Monitoring method and device of power system
CN103984305A (en) * 2014-05-06 2014-08-13 国网吉林省电力有限公司 Method for evaluating clock state of power grid automation equipment based on data statistic analysis
CN107272821A (en) * 2017-06-07 2017-10-20 上海东软载波微电子有限公司 Calibration method of real-time clock and device, storage medium, electronic equipment
CN110543093A (en) * 2019-07-05 2019-12-06 齐鲁工业大学 Power distribution terminal time synchronization method using power grid frequency value comparison

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115134905A (en) * 2022-06-27 2022-09-30 国网青海省电力公司信息通信公司 Frequency calibration method and device, nonvolatile storage medium and computer equipment
CN115134905B (en) * 2022-06-27 2023-12-01 国网青海省电力公司信息通信公司 Frequency calibration method and device, nonvolatile storage medium and computer equipment
CN114978403A (en) * 2022-07-29 2022-08-30 深圳市英特瑞半导体科技有限公司 Method and device for measuring clock holding phase deviation value
CN114978403B (en) * 2022-07-29 2022-10-04 深圳市英特瑞半导体科技有限公司 Method and device for measuring clock holding phase deviation value

Also Published As

Publication number Publication date
CN112462848B (en) 2024-04-09

Similar Documents

Publication Publication Date Title
CN109299496B (en) High-precision synchronous clock generation method
CN112462848A (en) Clock offset correction method and device and computer equipment
CN110206683B (en) Method, device and system for estimating deviation of wind angle and correcting wind angle
CN111458661A (en) Power distribution network line variation relation diagnosis method, device and system
CN110531380A (en) The device and method of satellite clock source low amplitude persistent anomaly for identification
CN110855590A (en) Frequency offset compensation method, system, electronic device and computer readable storage medium
CN114978956A (en) Method and device for detecting abnormal performance mutation points of network equipment in smart city
CN111680398B (en) Single machine performance degradation prediction method based on Holt-windows model
CN112100574A (en) Resampling-based AAKR model uncertainty calculation method and system
CN114706363B (en) Quality management platform based on process optimization
CN107566105B (en) Time synchronization equipment compensation method, device, storage medium and computer equipment thereof
CN112636857A (en) High-precision time-frequency signal dynamic driving method based on residual error correction
CN114205045B (en) TTE network clock calibration method and system
CN112126907B (en) Vacuum coating control system and control method thereof, and vacuum coating equipment
CN116819932B (en) Atomic clock steering parameter determining method, device, terminal equipment and storage medium
US20210232106A1 (en) Method and apparatus for adjusting process control prediction model and process controller
JP2003271231A (en) Estimation device of detector drift and monitor system of detector
CN112731049A (en) Clock synchronization abnormity monitoring method and device and computer readable storage medium
CN116990691A (en) Method, device, equipment and medium for evaluating remaining full charge time of battery
JP2019039764A (en) Impedance estimating device
CN114808143B (en) Parameter determination model training method of wafer heating equipment, heating method and device
CN116980065B (en) Clock calibration method, clock calibration device, terminal equipment and storage medium
CN116388913B (en) RTC clock self-calibration method, electronic equipment and storage medium
CN117572137B (en) Seven-level ANPC high-voltage frequency converter remote monitoring system
CN113300324B (en) Longitudinal differential protection synchronization method and device

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