CN116299144A - Ammeter clock calibration method and device - Google Patents
Ammeter clock calibration method and device Download PDFInfo
- Publication number
- CN116299144A CN116299144A CN202310420495.2A CN202310420495A CN116299144A CN 116299144 A CN116299144 A CN 116299144A CN 202310420495 A CN202310420495 A CN 202310420495A CN 116299144 A CN116299144 A CN 116299144A
- Authority
- CN
- China
- Prior art keywords
- clock
- time
- intelligent
- calibration
- current
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 230000005540 biological transmission Effects 0.000 claims description 123
- 238000005259 measurement Methods 0.000 claims description 74
- 230000004044 response Effects 0.000 claims description 29
- 238000004364 calculation method Methods 0.000 claims description 20
- 230000006854 communication Effects 0.000 description 10
- 238000012360 testing method Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 8
- 230000001934 delay Effects 0.000 description 8
- 230000006870 function Effects 0.000 description 6
- 230000005611 electricity Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000001360 synchronised effect Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 230000003203 everyday effect Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R35/00—Testing or calibrating of apparatus covered by the other groups of this subclass
- G01R35/04—Testing or calibrating of apparatus covered by the other groups of this subclass of instruments for measuring time integral of power or current
-
- G—PHYSICS
- G04—HOROLOGY
- G04G—ELECTRONIC TIME-PIECES
- G04G5/00—Setting, i.e. correcting or changing, the time-indication
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Electric Clocks (AREA)
Abstract
The invention relates to the technical field of electric power meters, in particular to an ammeter clock calibration method and device, wherein the method comprises the following steps: acquiring a first clock of a metering master station and a first current clock of an intelligent summary table; calculating a first absolute value of a difference between the first clock and the first current clock; when the first absolute value is larger than a first preset threshold, acquiring a time calibration coefficient and second current clocks of all intelligent electric meters, and determining first calibration time according to the first current clocks, the time calibration coefficient and all second current clocks; calculating a second absolute value of the difference between the first clock and the first calibration time; when the second absolute value is larger than a second preset threshold value, an alarm signal is fed back to the metering master station, and when a second clock of the metering master station is not received within preset time, the intelligent summary table and the clocks of all intelligent electric meters are calibrated according to the first calibration time, so that the technical problem that the accuracy rate of the existing electric meter time setting mode is low is solved.
Description
Technical Field
The invention relates to the technical field of electric power meters, in particular to an ammeter clock calibration method and device.
Background
The power industry is closely related to life of people, and the aspects of electricity consumption measurement, line loss calculation, voltage quality monitoring, electricity consumption safety management and the like are more relevant to the personal interests of each citizen. The accuracy in the aspects of electricity consumption measurement, line loss calculation, voltage quality monitoring, electricity consumption safety management and the like depends on the clock accuracy of the intelligent summary meter and the intelligent ammeter in the distribution area, so that when the intelligent summary meter and the intelligent ammeter are used, clock calibration needs to be carried out in real time to complete clock synchronization, and the intelligent summary meter and the intelligent ammeter work under the correct clock.
When the clock calibration is carried out on the intelligent summary list and the intelligent electric meter, the Beijing time is generally used as the timing standard of all electric meter devices in the platform area, and the clock of each local device is strictly consistent with the Beijing time by adopting the technical means of clock synchronization, so that the clock error among the devices is maintained within an acceptable range. The current common clock synchronization modes of the ammeter include broadcasting timing of a metering master station, satellite timing and the like.
The method is characterized in that the metering master station transmits timing signals containing time information to the intelligent summary table in a broadcasting mode, after the intelligent summary table finishes timing, the intelligent summary table regenerates new timing signals containing the time information, the new timing signals are transmitted to the intelligent electric meters, the intelligent electric meters set clocks according to the time information transmitted by the intelligent summary table, however, the pyramid clock synchronization mode is highly dependent on the clock accuracy of the metering master station, when the metering master station runs and encounters abnormal restarting, the wrong clocks are synchronized to all devices in a station area, and the clock disorder of all devices is caused. For the scheme of realizing satellite time synchronization through a Beidou satellite navigation system, a GPS global satellite positioning system and the like, good performance can be realized only outdoors, however, the installation environment of the intelligent ammeter is quite complex and various, and satellite signals can not be received, so that the clock accuracy of each ammeter device in a platform area is difficult to improve by adopting satellite time synchronization.
From the above, the existing ammeter time setting mode has the technical problem of low accuracy.
Disclosure of Invention
The invention provides an ammeter clock calibration method and device, which are used for solving the technical problem that the accuracy rate of the existing ammeter time setting mode is low.
In one aspect, the present invention provides a method for calibrating a clock of an electric meter, including:
acquiring a first clock of a metering master station and a first current clock of an intelligent summary table; the first current clock is the current clock of the intelligent summary table when the first clock is obtained;
calculating a first absolute value of a difference between the first clock and the first current clock;
when the first absolute value is larger than a first preset threshold, acquiring a time calibration coefficient and second current clocks of all intelligent electric meters, and determining first calibration time according to the first current clocks, the time calibration coefficient and the second current clocks;
calculating a second absolute value of the difference between the first clock and the first calibration time;
and when the second absolute value is larger than a second preset threshold value, feeding back an alarm signal to the metering master station, and when a second clock of the metering master station is not received within a preset time, calibrating the intelligent summary table and the clocks of the intelligent ammeter according to the first calibration time.
Optionally, the time calibration coefficient includes a first weight of the smart summary and a second weight of each of the smart meters, and the step of acquiring the first weight and the second weight includes:
acquiring a first metering error frequency of the intelligent summary table corresponding to the first current clock and a second metering error frequency of each intelligent ammeter;
calculating the first weight according to the first metering error times;
and calculating each second weight according to each second metering error frequency.
Optionally, the determining the first calibration time according to the first current clock, the time calibration coefficient and each second current clock further includes:
calculating a third absolute value of the difference between the first current clock and the first calibration time;
and judging whether the third absolute value is larger than a third preset threshold value, if so, updating the first metering error times.
Optionally, the determining the first calibration time according to the first current clock, the time calibration coefficient and each second current clock further includes:
respectively calculating a fourth absolute value of the difference value between each second current clock and the first calibration time;
And respectively judging whether each fourth absolute value is larger than a fourth preset threshold value, and if so, updating the second metering error times.
Optionally, the step of obtaining the first clock includes:
receiving first clock information issued by the metering master station, and acquiring a predetermined first transmission time delay; the first transmission delay is the data transmission delay between the intelligent summary and the metering master station;
and determining a first clock of the metering master station according to the first clock information and the first transmission delay.
Optionally, the determining of the first transmission delay includes:
when a first measurement message issued by a metering master station is received, a first reply message is constructed; the first reply message is sent to the metering master station at a first sending moment;
when a second measurement message issued by the metering master station is received, recording the receiving time of the second measurement message as a first receiving time; analyzing the second measurement message to obtain the first sending moment, the first response moment and the first reply moment;
and determining the first transmission delay according to the first sending time, the first response time, the first reply time and the first receiving time.
Optionally, the step of obtaining the second current clock includes:
acquiring current clock information and identification codes of the intelligent electric meters;
acquiring a second transmission delay corresponding to each intelligent ammeter according to the identification code and a first association relation constructed in advance; the second transmission delay is the data transmission delay between the intelligent summary list and the intelligent ammeter;
and determining each second current clock according to the current clock information of each intelligent ammeter and the second transmission delay.
Optionally, the step of constructing the first association relationship includes:
constructing a third measurement message, and transmitting the third measurement message to each intelligent ammeter at a second transmitting moment;
receiving a second reply message returned by each intelligent ammeter, recording the receiving time of the second reply message as a second receiving time, and analyzing the second reply message to obtain a second sending time, a second response time, a second reply time and an identification code; the second response time is the time when the intelligent ammeter receives the third measurement message; the second reply time is the time when the intelligent ammeter sends the second reply message;
Determining the second transmission delay according to the second receiving time, the second sending time, the second response time and the second reply time;
and respectively associating each identification code with the corresponding second transmission delay to obtain a first association relation.
Optionally, the calibrating the smart summary and the clocks of each of the smart meters according to the first calibration time includes:
and calibrating a first current clock of the intelligent summary table into the first calibration time, and sending the first calibration time to each intelligent ammeter so that each intelligent ammeter calibrates the second current clock according to the first calibration time.
In another aspect, the present invention provides an ammeter clock calibration device, including:
the first acquisition module is used for acquiring a first clock of the metering master station and a first current clock of the intelligent summary table; the first current clock is the current clock of the intelligent summary table when the first clock is obtained;
a first calculating module, configured to calculate a first absolute value of a difference between the first clock and the first current clock;
the second acquisition module is used for acquiring a time calibration coefficient and second current clocks of the intelligent electric meters when the first absolute value is larger than a first preset threshold value, and determining first calibration time according to the first current clocks, the time calibration coefficient and the second current clocks;
A second calculation module for calculating a second absolute value of a difference between the first clock and the first calibration time;
and the calibration module is used for feeding back an alarm signal to the metering master station when the second absolute value is larger than a second preset threshold value, and calibrating the intelligent summary table and the clocks of the intelligent ammeter according to the first calibration time when the second clock of the metering master station is not received within the preset time.
From the above technical scheme, the invention has the following advantages:
the invention provides an ammeter clock calibration method, which comprises the steps of obtaining a first clock of a metering master station and a first current clock of an intelligent summary table corresponding to the first clock, and calculating a first absolute value of a difference value between the first clock and the first current clock, so that preliminary judgment on clock reliability of the metering master station can be realized based on the first absolute value; when the first absolute value is larger than a first preset threshold value, acquiring a time calibration coefficient and a second current clock of each intelligent ammeter, determining first calibration time according to the first current clock, the time calibration coefficient and each second current clock, and calculating a second absolute value of a difference value between the first clock and the first calibration time so as to realize further judgment of clock reliability of the metering master station based on the second absolute value, thereby performing more accurate clock calibration; when the second absolute value is larger than a second preset threshold value, the problem that the clock of the metering master station is disordered is solved, at the moment, an alarm signal is fed back to the metering master station, and when the second clock of the metering master station is not received in the preset time, the intelligent summary and the clocks of all intelligent electric meters are calibrated according to the first calibration time, so that the situation that clock accuracy is low due to clock calibration by using the disordered metering master station time is avoided, and the technical problem that the accuracy is low in the existing electric meter time setting mode is solved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a flowchart of a method for calibrating a clock of an ammeter according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for calibrating a clock of an electric meter according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a measurement error count update provided in a second embodiment of the present invention;
fig. 4 is a flowchart of an ammeter clock calibration method according to a second embodiment of the present invention;
fig. 5 is a flow chart of a method for determining a first transmission delay according to a third embodiment of the present invention;
fig. 6 is a schematic diagram of determining a first transmission delay according to a third embodiment of the present invention;
fig. 7 is a flow chart of a method for determining a second transmission delay according to a fourth embodiment of the present invention;
Fig. 8 is a schematic diagram of a determination principle of a second transmission delay according to a fourth embodiment of the present invention;
fig. 9 is a schematic structural diagram of an ammeter clock calibration device according to a fifth embodiment of the present invention.
Detailed Description
The embodiment of the invention provides an ammeter clock calibration method, which is used for solving the technical problem that the existing ammeter time setting mode has low accuracy.
In order to make the objects, features and advantages of the present invention more comprehensible, the technical solutions in the embodiments of the present invention are described in detail below with reference to the accompanying drawings, and it is apparent that the embodiments described below are only some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, a first embodiment of the present invention provides a method for calibrating an ammeter clock, including:
101. acquiring a first clock of a metering master station and a first current clock of an intelligent summary table; the first current clock is the current clock of the intelligent summary table when the first clock is obtained.
It should be noted that, a PTP clock service is deployed on the metering master station, and the current beijing time is synchronized from the network according to the PTP clock service every day, and after clock synchronization is completed, the metering master station broadcasts the current clock to all intelligent summary tables in the platform area, which need to perform clock synchronization. The intelligent summary table receives the clock issued by the metering master station and calibrates the current clock according to the received clock and the first transmission delay. The first clock is a clock obtained by superposing a first transmission delay on the clock issued by the metering master station. The first transmission delay refers to the transmission delay between the metering master station and the intelligent summary.
In this embodiment, when the first clock of the metering master station is obtained, the intelligent summary table obtains its own current clock, that is, the first current clock.
102. A first absolute value of a difference between the first clock and the first current clock is calculated.
It should be noted that, the intelligent summary table itself has a timing function, and as the intelligent summary table is improved and developed in hardware and software, the timing function of the intelligent summary table is relatively reliable. Therefore, the first absolute value of the difference value between the first clock of the metering master station and the first current clock is calculated, and the difference between the clock of the metering master station and the clock of the intelligent summary table is fed back, so that whether the clock of the metering master station is wrong or not can be primarily judged by using the first absolute value.
103. When the first absolute value is larger than a first preset threshold, a time calibration coefficient and second current clocks of the intelligent electric meters are obtained, and first calibration time is determined according to the first current clocks, the time calibration coefficient and the second current clocks.
When the first absolute value is larger than the first preset threshold, the clock gap between the metering master station and the intelligent summary table is larger, so that the problem that the current clock of the metering master station is possibly disordered or the problem that the clock of the intelligent summary table is disordered is solved, and further determination is needed.
The intelligent summary is connected with a plurality of intelligent electric meters, and when clock synchronization is needed, the intelligent summary broadcasts the current clock of the intelligent summary to all the intelligent electric meters subordinate to the intelligent summary, so that the intelligent electric meters perform self-calibration according to the received clock. The intelligent ammeter has timing function, and the timing function is relatively reliable. Therefore, the embodiment further judges whether the clock of the metering master station is disordered or not by using the clock of the intelligent summary table and the clocks of the intelligent electric meters.
In this embodiment, the time calibration coefficient is calculated based on the number of historical clock errors of the smart summary and the number of historical clock errors of each smart meter, and is stored in a database in advance, and the time calibration coefficient can be fed back to the reliability degree of the smart summary and the clocks of each smart meter up to the current time. Therefore, the first calibration time is determined according to the first current clock, the calibration coefficient and each second current clock, so that the obtained first calibration time has higher reliability and is more attached to accurate time, and whether the clock of the metering master station is disordered or not can be further determined based on the first calibration time.
The first preset threshold is a threshold for judging whether the clock error is excessive or not, and can be set according to the actual ammeter situation or the situation of the metering master station.
104. A second absolute value of the difference between the first clock and the first calibration time is calculated.
105. And when the second absolute value is larger than a second preset threshold value, feeding back an alarm signal to the metering master station, and when the second clock of the metering master station is not received within the preset time, calibrating the intelligent summary table and the clocks of all the intelligent electric meters according to the first calibration time.
When the second absolute value is larger than the second preset threshold value, the clock error of the metering master station exceeds the error allowable range, and the first clock of the metering master station is disordered, so that the intelligent total table feeds back an alarm signal to the metering master station, a manager of the metering master station is reminded to pay attention, and the metering master station issues a new correct clock under the intervention of the manager. If the second clock of the metering master station is not received within the preset time, the metering master station is possibly crashed or cannot communicate or other special conditions are indicated, the intelligent summary table self-calibrates the first current clock in the intelligent summary table according to the first calibration time, and the first calibration time is broadcasted to each intelligent ammeter, so that each intelligent ammeter calibrates the second current clock according to the received first calibration time, the problem of low clock accuracy caused by clock calibration by using the disordered metering master station time is avoided, and clock autonomy in the station area is realized.
The value of the second preset threshold can be set and determined according to actual conditions, and can be used as a judgment standard for clock disorder of the metering master station. For example, the second preset threshold value can be obtained by analyzing historical clock data of the metering master station, the intelligent summary table, the operation speed of the intelligent ammeter and the historical clock data, or before practical application, a manager performs a plurality of clock calibration tests, adjusts the threshold value according to test results until the set threshold value can be used as a judgment reference of clock disorder of the metering master station, and then uses the threshold value as the second preset threshold value. It should be understood that the foregoing examples are merely illustrative, and not limiting, and those skilled in the art may set, in practical application, a specific value of the second preset threshold value as a criterion for determining clock disorder of the metering master station in combination with an actual clock condition.
The preset time may be determined according to the actual operating speed of the metering master station, and in this embodiment is preferably 1h.
The embodiment provides an ammeter clock calibration method, which comprises the steps of obtaining a first clock of a metering master station and a first current clock of an intelligent summary table corresponding to the first clock, and calculating a first absolute value of a difference value between the first clock and the first current clock, so that preliminary judgment on clock reliability of the metering master station can be realized based on the first absolute value; when the first absolute value is larger than a first preset threshold value, acquiring a time calibration coefficient and a second current clock of each intelligent ammeter, determining first calibration time according to the first current clock, the time calibration coefficient and each second current clock, and calculating a second absolute value of a difference value between the first clock and the first calibration time so as to realize further judgment of clock reliability of the metering master station based on the second absolute value, thereby performing more accurate clock calibration; when the second absolute value is larger than a second preset threshold value, the problem that the clock of the metering master station is disordered is solved, at the moment, an alarm signal is fed back to the metering master station, and when the second clock of the metering master station is not received in the preset time, the intelligent summary and the clocks of all intelligent electric meters are calibrated according to the first calibration time, so that the situation that clock accuracy is low due to clock calibration by using the disordered metering master station time is avoided, and the technical problem that the accuracy is low in the existing electric meter time setting mode is solved.
Referring to fig. 2, a second embodiment of the present invention provides a method for calibrating an ammeter clock, including:
201. receiving first clock information issued by a metering master station, and acquiring a predetermined first transmission time delay; the first transmission delay is the data transmission delay between the intelligent summary and the metering master station.
When the clock calibration is performed, the metering master station transmits a clock synchronization instruction to the intelligent summary table, the clock synchronization instruction carries a time stamp of a transmission time during transmission, and after the intelligent summary table receives the time synchronization instruction, the time stamp of the transmission time is obtained by analyzing the time synchronization instruction, namely, first clock information is obtained, and the corresponding transmission time can be determined by analyzing the time stamp.
The first transmission delay is obtained by performing communication test on the intelligent summary table and the metering master station before clock calibration, and is stored in a storage module inside the intelligent summary table.
202. And determining a first clock of the metering master station according to the first clock information and the first transmission delay.
The first clock is obtained by superposing the first transmission delay on the basis of the transmission time of the metering master station, and the first clock is used as the current time of the metering master station.
Therefore, when clock calibration is performed, the transmission time delay between the metering master station and the intelligent summary table is considered, clock deviation caused by the transmission time delay is avoided, and the clock calibration accuracy is further improved.
203. Acquiring a first current clock of an intelligent summary table; the first current clock is the current clock of the intelligent summary table when the first clock is obtained.
It should be noted that, while the first clock in step 202 is obtained, the intelligent summary table obtains the current clock inside itself, i.e., the first current clock.
204. A first absolute value of a difference between the first clock and the first current clock is calculated.
It should be noted that, step 204 may refer to step 102 of the first embodiment.
205. When the first absolute value is larger than a first preset threshold, a time calibration coefficient and second current clocks of the intelligent electric meters are obtained, and first calibration time is determined according to the first current clocks, the time calibration coefficient and the second current clocks.
The second current clock refers to a clock obtained by superposing a second transmission delay on the basis of the received clock after the intelligent summary receives the clock sent by the intelligent ammeter. The second current clock is obtained as follows:
T21: and acquiring the current clock information and the identification code of each intelligent ammeter.
It should be noted that, the intelligent summary table obtains the current clock information of each intelligent ammeter, and obtains the current clock of each intelligent ammeter by analyzing the current clock information. The identification code is the asset number of the intelligent ammeter.
T22: acquiring second transmission delays corresponding to the intelligent electric meters according to the identification codes and the first association relation constructed in advance; the second transmission delay is the data transmission delay between the intelligent summary list and the intelligent ammeter.
It should be noted that the second transmission delay is obtained through a communication test in advance and is stored in the intelligent summary table in advance. And according to the identification codes and the first association relation, determining the second transmission delay of each intelligent ammeter and the intelligent summary table.
T23: and determining each second current clock according to the current clock information and the second transmission delay of each intelligent ammeter.
It should be noted that, the corresponding second transmission delay is superimposed on the basis of the current clocks of the smart meters, so as to obtain the second current clocks corresponding to the smart meters.
It should be noted that the time calibration coefficient includes a first weight of the smart summary table and a second weight of each smart meter.
In the last time of time synchronization, the intelligent summary table and the intelligent ammeter in the platform area have completed accurate clock synchronization, and along with the progress of technology, the timing functions of the existing intelligent summary table and the intelligent ammeter have certain reliability, so different weights are given according to the historical error times of the intelligent summary table and the timing of each intelligent ammeter, and the current clocks of the intelligent summary table and each intelligent ammeter are weighted and averaged based on the weights, so that a first calibration time which is more fit with the actual time is obtained.
The number of manufacturers of the intelligent electric meters used in the transformer area is 20 or more, and the chip, the storage device and the clock related hardware used by each manufacturer are different, so that the clock accuracy of the electric meters of each manufacturer is different. According to the embodiment, the first weight and the second weight are dynamically updated according to the intelligent summary and the metering errors of each intelligent ammeter during the last clock synchronization, and the accuracy of the first calibration time is improved.
The updating steps of the first weight and the second weight are as follows:
s21: and acquiring the first metering error times of the intelligent summary table corresponding to the first current clock and the second metering error times of each intelligent ammeter.
The first error number refers to the number of times that the third absolute value exceeds the third preset threshold. The second number of measurement errors refers to the number of times the fourth absolute value exceeds a fourth preset threshold. The third absolute value refers to the absolute value of the difference between the clock of the smart meter and the first calibration time, and the fourth absolute value refers to the absolute value of the difference between the clock of the smart meter and the first calibration time. Each smart meter has a second number of metering errors.
In this embodiment, the first metering error frequency and the second metering error frequency refer to the frequency of errors obtained by stopping the first current clock and accumulating, that is, the frequency of errors obtained by the last clock synchronization update based on the first current clock.
The first metering error times and the second metering error times are stored in a storage module in the intelligent summary table. Because the relation between the intelligent summary table and the intelligent electric meters is one-to-many, one intelligent electric meter can only hang below one intelligent summary table, therefore in this embodiment, the intelligent summary table stores the intelligent summary table and the second metering error times of each intelligent electric meter by adopting a key-value data structure, and the metering error times are stored in association with the electric meter IDs, and the storage format can refer to the following table:
table 1 storage format for first and second metering error times
Device identification | Number of times of measuring error |
Total surface ID | Ctotalmeter |
Ammeter 1ID | Cmeter1 |
Ammeter 2ID | Cmeter2 |
…… | …… |
Ammeter nID | Cmetern |
S22: and calculating according to the first metering error times to obtain first weights, and calculating according to the second metering error times to obtain second weights.
Note that, the calculation formula of the first weight is wtotalmeter=e -C1 Wherein C1 is the first number of errors, e is a natural constant, and Wtotal is a first weight.
The calculation formula of the second weight is wmeter=e -C2 Wherein C2 is the second number of measurement errors and Wmeter is the second weight.
S33: and determining the first calibration time according to the first current clock, the first weight, the second weight and each second current clock.
It should be noted that, the first calibration time is obtained by calculating according to the first current clock, the first weight, the second weight and each second current clock, and the calculation formula is as follows:
wherein Taverage is the first calibration time, wtotal meter is the first weight, wmeter is the second weight, ttotal meter is the first current clock, tmeter is the second current clock, i is the serial number of the intelligent ammeter, i is less than or equal to n, and n is the total number of the intelligent ammeter.
S34: calculating a third absolute value of the difference between the first current clock and the first calibration time;
s35: and judging whether the third absolute value is larger than a third preset threshold value, if so, updating the first metering error times.
When the third absolute value is larger than the third preset threshold value, the error occurring in the time of the intelligent summary table is larger, and the error allowable range is exceeded, so that 1 is added on the basis of the first metering error times obtained in the last clock synchronization to obtain new first metering error times, and the dynamic update of the first metering error times is realized.
For example: the number of times of clock synchronization is 12, the number of times of first metering errors obtained by accumulating 11 th time is 8, and if the third absolute value obtained by calculating is larger than a third preset threshold value, the number of times of first metering errors obtained by accumulating the time is 8+1=9; if the third absolute value is not greater than the third preset threshold value, the number of times of the first metering error obtained by the accumulation is 8.
S37: respectively calculating a fourth absolute value of the difference value between each second current clock and the first calibration time;
s38: and respectively judging whether each fourth absolute value is larger than a fourth preset threshold value, and if so, updating the second metering error times.
When the fourth absolute value is larger than a fourth preset threshold value, the clock error of the intelligent electric meter exceeds the error allowable range, 1 is added on the basis of the second metering error frequency of the intelligent electric meter obtained by the last clock synchronization, the new second metering error frequency is obtained, and dynamic update of the second metering error frequency is realized.
It should be noted that the third preset threshold and the fourth preset threshold may be the same threshold, or may be set according to actual situations.
The method for dynamically updating the first metering error number and the second metering error number in the present embodiment will be further described with reference to the application example.
As shown in fig. 3, when it is determined that the clock of the metering master station is disordered or communication with the metering master station is impossible, the clock autonomous state of the station is entered, and the first metering error number Ctotalmeter and the second metering error number Cmeter calculated by using the last clock synchronization are utilized i Calculating to obtain a first weight and a second weight according to the first weight Wtotal meter and the second weight Wmeter 1 、Wmeter 2 …Wmeter n A first current clock Ttotalmeter and a second current clock Tmeter 1 、Tmeter 2 …Tmeter n And carrying out weighted average to obtain a first calibration time Taverage. Judging |Ttotalmeter-Taverage|>Whether Tthreshold (Ttotalmeter is the first current clock) is established, if yes, the first measurement error count Ctotalmeter is increased by 1. Traversing the serial numbers i of the intelligent electric meters (i is less than or equal to n, n is the total number of the intelligent electric meters), and judging the |Tmeter i -Taverage|>Whether Tthreshold is true or not, if so, the second metering error number Cmeter of the ith smart meter i And adding 1, wherein threshold is a threshold (namely a third threshold and/or a fourth threshold) for judging that the clock error is overlarge, the specific value of the threshold can be set according to actual conditions, and when i is greater than n, the traversal is finished, so that the updating of the first metering error times and the second metering error times is completed.
206. Calculating a second absolute value of the difference between the first clock and the first calibration time;
207. when the second absolute value is larger than a second preset threshold value, an alarm signal is fed back to the metering master station, and when a second clock of the metering master station is not received within a preset time, the first current clock of the intelligent summary table is calibrated to be first calibration time, and the first calibration time is sent to each intelligent ammeter, so that each intelligent ammeter calibrates the second current clock according to the first calibration time.
It should be noted that, each smart meter receives the first calibration time, and superimposes the first calibration time and the second transmission delay to obtain the current time of the smart summary table, and adjusts the clock in itself to the current time of the smart summary table, so as to complete clock synchronization.
In this embodiment, when clock synchronization is performed on each smart meter, transmission delay between the smart meter and the smart meter is considered, so that accuracy of each smart meter clock is further improved.
In another preferred embodiment, step 204 further comprises, after:
and when the first absolute value is not greater than a first preset threshold value or the second absolute value is not greater than a second preset threshold value, calibrating the intelligent summary table and clocks of all intelligent electric meters according to the first clock.
When the first absolute value is not greater than the first preset threshold or the second absolute value is not greater than the second preset threshold, the clock of the metering master station is normal, and no disorder occurs, so that the intelligent summary table and the clocks of the intelligent ammeter are calibrated according to the first clock.
The step of calibrating the intelligent summary and clocks of the intelligent ammeter according to the first clock comprises the following steps: the intelligent summary list adjusts the self clock to be a first clock, constructs a clock calibration message, sends the clock calibration message to each subordinate intelligent ammeter, receives the clock calibration message by each intelligent ammeter, analyzes the clock calibration message to obtain the sending time of the clock calibration message, superimposes the clock obtained by the second transmission time delay on the basis of the sending time to serve as the current clock of the intelligent summary list, and calibrates the self internal clock according to the current clock to realize clock synchronization.
In another preferred embodiment, step 206 further comprises:
and when the second absolute value is larger than a second preset threshold value, feeding back an alarm signal to the metering master station, and when a second clock of the metering master station is received within a preset time, calibrating the intelligent summary table and the clocks of all intelligent electric meters according to the second clock.
When the second absolute value is larger than a second preset threshold value, the clock of the metering master station is disordered, so that the intelligent summary table feeds back an alarm signal to the metering master station, management personnel intervention of the metering master station is applied, when the second clock of the metering master station is received in preset time, the management personnel recalibrates the clock of the metering master station, the metering master station is enabled to issue a new clock again, the second clock of the metering master station is an accurate clock, and the intelligent summary table and the clocks of all intelligent electric meters are calibrated according to the second clock.
It is understood that the second clock is a clock superimposed with the first transmission delay.
The actual implementation of the present embodiment will be further described below in conjunction with the application examples.
First, the entire area Zhong Chushi is initialized with the participation of an administrator, and the specific procedure of initialization includes: the metering master station is used for fixedly synchronizing the latest Beijing time every day through PTP clock synchronization service, generating clock information according to the synchronized time after successful synchronization, and broadcasting the clock information to all intelligent summary tables in the station area. After receiving clock information of a metering master station, the intelligent summary table calls transmission time delay of the metering master station and the intelligent summary table, which are stored in a memory of the intelligent summary table in advance, adds the received clock to a clock obtained by the transmission time delay, and uses the clock as a clock Tmaster provided by the metering master station, calibrates the clock according to the Tmaster, and after calibrating, the intelligent summary table broadcasts the current clock of the intelligent summary table to all the intelligent electric meters subordinate to the intelligent summary table. After receiving the clock of the intelligent summary table, the intelligent ammeter calls the transmission time delay of the intelligent ammeter and the intelligent summary table in the internal storage, the transmission time delay is overlapped on the basis of the received clock to obtain the clock, the clock is used as the current clock Tttalmeter provided by the intelligent summary table, and the clock is calibrated according to the Tttalmeter.
Then, after initialization is completed, and the next clock synchronization is entered, as shown in fig. 4, when the intelligent summary table receives the clock Tmaster provided by the metering master station, the intelligent summary table compares Tmaster with the current clock information Ttotalmeter of the intelligent summary table, if |tmaster-ttotalmeter| > Tthreshold (Tthreshold is a threshold value for determining that the clock error is too large and can be freely set), it is determined that a large error exists between the clocks of the metering master station and the intelligent summary table, and the system enters a station area clock autonomous state, and performs weighted average calculation by using the current clock of the intelligent summary table and the clock of the intelligent ammeter, so as to obtain a first calibration time Taverage.
If Tmaster-taverage| > Tthreshold, the clock transmitted by the metering master station is considered to have a certain risk, an alarm is fed back to the metering master station to remind an administrator to intervene, the administrator waits for 1h, whether the administrator intervenes to enable the metering master station to issue a correct clock is determined, and if yes, the step of Zhong Chushi in the station area is referred to again, and clocks of all devices are synchronized. If the metering master station does not issue a new correct clock after 1h, the clock of the intelligent summary table is updated by using Taverage, and then the clock of all the subordinate intelligent electric meters is updated by the clock message sent by the intelligent summary table.
If |Tmaster-Tmaster| > Tthreshold is not satisfied, broadcasting the current clock to all intelligent summary tables needing clock initialization in the station area by the metering master station, superposing the first transmission delay on the basis of the received clock of the metering master station by the intelligent summary tables as the time provided by the metering master station, calibrating the clock by the time, broadcasting the clock to all intelligent electric meters subordinate to the metering master station, and updating the clocks of the intelligent electric meters.
For sites with complex network environment and unreliable communication, if the clock synchronization information of the metering master station is not received, taverage can be used, and the Taverage is used as an accurate clock to update the clock information of the whole-area equipment.
Referring to fig. 5, the third embodiment of the present invention further defines the steps of acquiring the first transmission delay on the basis of the first embodiment, and the steps are as follows:
301. when a first measurement message issued by a metering master station is received, a first reply message is constructed; and transmitting the first reply message to the metering master station at the first transmitting moment.
Before the synchronization of the station clock, the metering master station and the intelligent summary station are subjected to communication test, and the first transmission time delay between the intelligent summary station and the metering master station is determined according to the test result.
After the test is started, the metering master station constructs a first measurement message and sends the first measurement message to the intelligent summary table, wherein the first measurement message carries a time stamp of the sending time. When the intelligent summary receives the first measurement message, the first measurement message is analyzed to obtain the sending time of the first measurement message, then the intelligent summary constructs a first reply message, and the first reply message is sent to the metering master station at the first sending time because of the ordering of the internal message queues of the intelligent summary, wherein the first reply message carries the timestamp of the first sending time.
302. When a second measurement message issued by the metering master station is received, recording the receiving time of the second measurement message as a first receiving time; and analyzing the second measurement message to obtain a first sending time, a first response time and a first reply time.
After receiving the first reply message, the metering master station records that the receiving time of the first reply message is the first response time, constructs a second measurement message, and sends the second measurement message to the intelligent summary table at the first reply time, wherein the second measurement message carries the first response time, a timestamp of the first reply time and the first sending time.
303. And determining the first transmission delay according to the first sending moment, the first response moment, the first reply moment and the first receiving moment.
It should be noted that, the calculation formula of the first transmission delay is: ((first reception time-first transmission time) - (first reply time-first response time))/2.
Further description will be made below in connection with application examples.
As shown in fig. 6, it is assumed that, after the measurement message is sequenced by the message queue, the measurement master station constructs a first measurement message at time T1, and then sends the first measurement message to the intelligent summary table at time T2, the intelligent summary table receives the first measurement message at time T1 and sends the first reply message to the measurement master station at time T2, the measurement master station receives the first reply message at time T3 and constructs a second measurement message, and sends the second measurement message to the intelligent summary table at time T4, and the intelligent summary table receives the second measurement message at time T3, then in this transmission process, the first transmission delay jtdelay= ((T3-T2) - (T4-T3))/2.
In a specific embodiment, step 303 further comprises: steps 301-303 are circularly executed until the number of times of circulation within a preset time length meets the requirement of the preset number of times, a preset number of first transmission delays are obtained, average value calculation is carried out on the preset number of first transmission delays, a first transmission delay average value is obtained, and the first transmission delay average value is used as the transmission delay between the intelligent summary table and the metering master station.
In order to avoid delay calculation errors caused by accidental network fluctuation, the message communication process of the metering master station and the intelligent summary table is carried out for a plurality of times within preset time to obtain a plurality of first transmission delays, average value calculation is carried out on the plurality of first transmission delays to obtain a first transmission delay average value, and the first transmission delay average value is replaced by the first transmission delay average value to serve as the transmission delay between the intelligent summary table and the metering master station, so that errors are reduced, and the accuracy of clock calibration is further improved.
The preset time and the cycle number can be set according to practical situations, in this embodiment, the preset time is preferably 1 minute, and the cycle number is preferably 3 times.
Referring to fig. 7, on the basis of the first embodiment, the fourth embodiment of the present invention further defines the step of obtaining the second transmission delay, which includes the following steps:
401. and constructing a third measurement message, and transmitting the third measurement message to each intelligent ammeter at the second transmitting moment.
It should be noted that, the execution main body of the embodiment is an intelligent summary table, before clock calibration, the intelligent summary table and each intelligent ammeter perform communication test, the second transmission delay between the intelligent summary table and each intelligent ammeter is determined according to the test result,
After the test is started, the intelligent summary table constructs a third measurement message for determining the transmission delay, and the third measurement message is sent out at the second sending moment due to the queuing of the message queue in the intelligent summary table, and the sent measurement message carries the timestamp of the second sending moment.
402. Receiving a second reply message returned by each intelligent ammeter, recording the receiving time of the second reply message as a second receiving time, and analyzing the second reply message to obtain a second sending time, a second response time, a second reply time and an identification code; the second response time is the time when the intelligent ammeter receives the third measurement message; the second reply time is the time when the intelligent ammeter sends the second reply message.
After each smart meter receives the measurement message, recording the receiving time (namely the second response time) of the measurement message, analyzing the measurement message to obtain the second sending time, and constructing a second reply message.
When the intelligent summary table receives the second reply message of each intelligent ammeter, recording the receiving time of the second reply message as the second receiving time, and obtaining the second sending time, the second response time, the second reply time and the corresponding intelligent ammeter identification code by analyzing the second reply message.
403. And determining a second transmission delay according to the second receiving time, the second sending time, the second response time and the second reply time.
It should be noted that, the second transmission delay calculating method includes: ((second reception time-second transmission time) - (second reply time-second response time))/2.
404. And respectively associating each identification code with the corresponding second transmission delay to obtain a first association relation.
It should be noted that, there is a corresponding transmission delay between the intelligent summary table and each intelligent ammeter, and after each second transmission delay is obtained by calculation, the identification code of each intelligent ammeter is associated with the corresponding second transmission delay. Because the intelligent summary table and the intelligent ammeter have one-to-many relationship, the obtained association relationship (namely the first association relationship) is stored in a storage module inside the intelligent summary table in a storage format of a key-value data structure. Therefore, when the transmission time delay of a certain intelligent ammeter and the intelligent summary table needs to be determined, the asset number of the intelligent ammeter can be used as an index keyword, and the storage module inquires to obtain the corresponding second transmission time delay.
In another preferred embodiment, steps 401 to 404 are performed in a circulating manner until the number of circulating times reaches a preset number within a preset duration, a preset number of second transmission delays are obtained, average calculation is performed on all the obtained second transmission delays, a second transmission delay average value is obtained, and the second transmission delay average value is used as the transmission delay of the intelligent summary and the intelligent ammeter.
In another preferred embodiment, the method for determining the second transmission delay further includes:
when a third measurement message is received, a second reply message is sent to the intelligent summary list, wherein the second reply message carries a second sending moment, a second response moment, a second reply moment and an identification code;
it should be noted that, the method provided in this embodiment is applied to an intelligent ammeter, after receiving a third measurement message, the intelligent ammeter constructs a second reply message and sends the second reply message to an intelligent summary table, the intelligent summary table receives the second reply message, records a receiving time of the second reply message, and constructs a fourth measurement message, where the fourth measurement message carries the second reply time, the second receiving time and the third sending time.
When a fourth measurement message is received, recording the receiving time of the fourth measurement message as a third response time, and analyzing the fourth measurement message to obtain a second reply time, a second receiving time and a third sending time;
And determining a second transmission delay according to the second receiving time, the third sending time, the second reply time and the third response time.
Further description will be made with reference to application examples:
as shown in fig. 8, it is assumed that the smart meter constructs a third measurement message at time T1, the measurement message is sent to the smart meter at time T2 after being sequenced by the message queue and is attached with a timestamp T2, the smart meter receives the third measurement message at time T1 and sends a second reply message to the smart meter at time T2, the second reply message carries timestamps T1, T2, the smart meter receives the second reply message at time T3 and constructs a fourth measurement message, and sends the fourth measurement message to the smart meter at time T4, the fourth measurement message carries timestamps T2, T3, T4, and the smart meter receives the fourth measurement message at time T3, so that in the transmission process, the transmission delay between the smart meter and the smart meter is tdelay= ((T3-T2) - (T2-T1))/2, and the transmission delay between the smart meter and the smart meter tdelay= ((T3-T2) - (T4-T3))/T2).
Tdelay is very close to Tdelay and can be considered equal. In order to avoid error of delay calculation of two equipment ends caused by accidental network fluctuation, the communication process of the intelligent ammeter and the intelligent summary table is carried out three times within 1min, and then the transmission delay Tdelay is obtained at the intelligent summary table end 1 、Tdelay 2 、Tdelay 3 The transmission delay obtained at the intelligent ammeter end is tdelay 1 、tdelay 2 、tdelay 3 . The obtained transmission delay Tdelay is paired at the intelligent total surface end 1 、Tdelay 2 、Tdelay 3 Average value calculation is carried out to obtain a transmission delay average value Tdelay= (Tdelay) 1 +Tdelay 2 +Tdelay 3 ) 3, obtaining the transmission time delay tdelay at the intelligent ammeter end pair 1 、tdelay 2 、tdelay 3 Average value calculation is carried out to obtain a transmission delay average value tdelay= (tdelay) 1 +tdelay 2 +tdelay 3 ) The transmission delays Tdelay and Tdelay calculated by averaging can be regarded as equal.
Because the intelligent summary table and the intelligent electric meter have a one-to-many relationship, a key-value type data structure is adopted on the intelligent summary table to store the transmission delay Tdelay of each intelligent electric meter and the intelligent summary table, and the asset number of the intelligent electric meter is used as a unique identifier and index; the smart meter is only hung under one smart meter, so tdelay is directly stored inside the smart meter.
Referring to fig. 9, a fifth embodiment of the present invention provides an ammeter clock calibration device, including:
a first obtaining module 501, configured to obtain a first clock of a metering master station and a first current clock of an intelligent summary table; the first current clock is the current clock of the intelligent summary table when the first clock is obtained;
a first calculating module 502, configured to calculate a first absolute value of a difference between the first clock and the first current clock;
A second obtaining module 503, configured to obtain the time calibration coefficient and the second current clocks of the smart meters when the first absolute value is greater than a first preset threshold, and determine a first calibration time according to the first current clock, the time calibration coefficient and the second current clocks;
a second calculation module 504 for calculating a second absolute value of the difference between the first clock and the first calibration time;
the calibration module 505 is configured to feed back an alarm signal to the metering master station when the second absolute value is greater than a second preset threshold, and calibrate the smart summary table and the clocks of the smart meters according to the first calibration time when the second clock of the metering master station is not received within the preset time.
In a specific embodiment, the time calibration coefficient includes a first weight of the smart summary and a second weight of each smart meter, and the second obtaining module 503 includes:
the first acquisition sub-module is used for acquiring the first metering error times of the intelligent summary corresponding to the first current clock and the second metering error times of each intelligent ammeter;
the first calculation sub-module is used for calculating and obtaining a first weight according to the first measurement error times;
the second calculation submodule is used for calculating and obtaining second weights according to the second metering error times.
In a specific embodiment, the method further comprises:
a third calculating module for calculating a third absolute value of the difference between the first current clock and the first calibration time;
and the first updating module is used for judging whether the third absolute value is larger than a third preset threshold value, and if so, updating the first metering error times.
In a specific embodiment, the method further comprises:
a fourth calculating module, configured to calculate a fourth absolute value of a difference between each second current clock and the first calibration time;
and the second updating module is used for respectively judging whether each fourth absolute value is larger than a fourth preset threshold value, and if so, updating the second metering error times.
In a specific embodiment, the first acquisition module 501 includes:
the second acquisition module sub-module is used for receiving the first clock information issued by the metering master station and acquiring a predetermined first transmission delay; the first transmission delay is the data transmission delay between the intelligent summary and the metering master station;
and the first determining module is used for determining a first clock of the metering master station according to the first clock information and the first transmission delay.
In a specific embodiment, the method further comprises:
the first construction and sending module is used for constructing a first reply message when receiving a first measurement message issued by the metering master station; the first reply message is sent to the metering master station at the first sending moment;
The first analysis module is used for recording the receiving time of the second measurement message as the first receiving time when the second measurement message issued by the metering master station is received; analyzing the second measurement message to obtain a first sending moment, a first response moment and a first reply moment;
the second determining module is configured to determine a first transmission delay according to the first sending time, the first response time, the first reply time, and the first receiving time.
In a specific embodiment, the second obtaining module 503 further includes:
the third acquisition sub-module is used for acquiring the current clock information and the identification code of each intelligent ammeter;
a fourth obtaining sub-module, configured to obtain a second transmission delay corresponding to each smart meter according to the identification code and the first association relationship constructed in advance; the second transmission delay is the data transmission delay between the intelligent summary list and the intelligent ammeter;
the first determining submodule is used for determining each second current clock according to the current clock information of each intelligent ammeter and the second transmission delay.
In a specific embodiment, the method further comprises:
the second construction and transmission module is used for constructing a third measurement message and transmitting the third measurement message to each intelligent ammeter at the second transmission moment;
The second analysis module is used for receiving a second reply message returned by each intelligent ammeter, recording the receiving time of the second reply message as a second receiving time, and analyzing the second reply message to obtain a second sending time, a second response time, a second reply time and an identification code; the second response time is the time when the intelligent ammeter receives the third measurement message; the second reply time is the time when the intelligent ammeter sends the second reply message;
the second determining submodule is used for determining a second transmission time delay according to a second receiving time, a second sending time, a second response time and a second reply time;
and the association sub-module is used for respectively associating each identification code with the corresponding second transmission delay to obtain a first association relation.
In a specific embodiment, the calibration module 505 is specifically configured to calibrate a first current clock of the smart meter to a first calibration time, and send the first calibration time to each smart meter, so that each smart meter calibrates a second current clock according to the first calibration time.
It will be clear to those skilled in the art that, for convenience and brevity of description, reference may be made to the corresponding process in the foregoing method embodiment for the specific working process of the apparatus described above, which is not described herein again.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each functional unit may exist separately and physically, or two or more functional units may be integrated in one processing unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-only memory (ROM), a random access memory (RAM, randomAccessMemory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In addition, the terms "first," "second," "third," "fourth," etc. (if present) in the description of the present application and in the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be capable of operation in sequences other than those illustrated or described herein, for example. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (10)
1. A method for calibrating a meter clock, the method comprising:
acquiring a first clock of a metering master station and a first current clock of an intelligent summary table; the first current clock is the current clock of the intelligent summary table when the first clock is obtained;
calculating a first absolute value of a difference between the first clock and the first current clock;
when the first absolute value is larger than a first preset threshold, acquiring a time calibration coefficient and second current clocks of all intelligent electric meters, and determining first calibration time according to the first current clocks, the time calibration coefficient and the second current clocks;
calculating a second absolute value of the difference between the first clock and the first calibration time;
And when the second absolute value is larger than a second preset threshold value, feeding back an alarm signal to the metering master station, and when a second clock of the metering master station is not received within a preset time, calibrating the intelligent summary table and the clocks of the intelligent ammeter according to the first calibration time.
2. The method of claim 1, wherein the time calibration factor comprises a first weight of the smart meter and a second weight of each of the smart meters, the obtaining of the first weight and the second weight comprising:
acquiring a first metering error frequency of the intelligent summary table corresponding to the first current clock and a second metering error frequency of each intelligent ammeter;
calculating the first weight according to the first metering error times;
and calculating each second weight according to each second metering error frequency.
3. The method of claim 2, wherein said determining a first calibration time based on said first current clock, said time calibration coefficients, and each of said second current clocks further comprises:
calculating a third absolute value of the difference between the first current clock and the first calibration time;
And judging whether the third absolute value is larger than a third preset threshold value, if so, updating the first metering error times.
4. The method of claim 2, wherein said determining a first calibration time based on said first current clock, said time calibration coefficients, and each of said second current clocks further comprises:
respectively calculating a fourth absolute value of the difference value between each second current clock and the first calibration time;
and respectively judging whether each fourth absolute value is larger than a fourth preset threshold value, and if so, updating the second metering error times.
5. The method of claim 1, wherein the step of obtaining the first clock comprises:
receiving first clock information issued by the metering master station, and acquiring a predetermined first transmission time delay; the first transmission delay is the data transmission delay between the intelligent summary and the metering master station;
and determining a first clock of the metering master station according to the first clock information and the first transmission delay.
6. The method of claim 5, wherein the determining of the first transmission delay comprises:
When a first measurement message issued by a metering master station is received, a first reply message is constructed; the first reply message is sent to the metering master station at a first sending moment;
when a second measurement message issued by the metering master station is received, recording the receiving time of the second measurement message as a first receiving time; analyzing the second measurement message to obtain the first sending moment, the first response moment and the first reply moment;
and determining the first transmission delay according to the first sending time, the first response time, the first reply time and the first receiving time.
7. The method of claim 1, wherein the step of obtaining the second current clock comprises:
acquiring current clock information and identification codes of the intelligent electric meters;
acquiring a second transmission delay corresponding to each intelligent ammeter according to the identification code and a first association relation constructed in advance; the second transmission delay is the data transmission delay between the intelligent summary list and the intelligent ammeter;
and determining each second current clock according to the current clock information of each intelligent ammeter and the second transmission delay.
8. The method of claim 7, wherein the constructing the first association relationship includes:
constructing a third measurement message, and transmitting the third measurement message to each intelligent ammeter at a second transmitting moment;
receiving a second reply message returned by each intelligent ammeter, recording the receiving time of the second reply message as a second receiving time, and analyzing the second reply message to obtain a second sending time, a second response time, a second reply time and an identification code; the second response time is the time when the intelligent ammeter receives the third measurement message; the second reply time is the time when the intelligent ammeter sends the second reply message;
determining the second transmission delay according to the second receiving time, the second sending time, the second response time and the second reply time;
and respectively associating each identification code with the corresponding second transmission delay to obtain a first association relation.
9. The method of claim 1, wherein calibrating the smart summary and the clocks of each of the smart meters based on the first calibration time comprises:
And calibrating a first current clock of the intelligent summary table into the first calibration time, and sending the first calibration time to each intelligent ammeter so that each intelligent ammeter calibrates the second current clock according to the first calibration time.
10. An ammeter clock calibration device, said device comprising:
the first acquisition module is used for acquiring a first clock of the metering master station and a first current clock of the intelligent summary table; the first current clock is the current clock of the intelligent summary table when the first clock is obtained;
a first calculating module, configured to calculate a first absolute value of a difference between the first clock and the first current clock;
the second acquisition module is used for acquiring a time calibration coefficient and second current clocks of the intelligent electric meters when the first absolute value is larger than a first preset threshold value, and determining first calibration time according to the first current clocks, the time calibration coefficient and the second current clocks;
a second calculation module for calculating a second absolute value of a difference between the first clock and the first calibration time;
and the calibration module is used for feeding back an alarm signal to the metering master station when the second absolute value is larger than a second preset threshold value, and calibrating the intelligent summary table and the clocks of the intelligent ammeter according to the first calibration time when the second clock of the metering master station is not received within the preset time.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310420495.2A CN116299144A (en) | 2023-04-19 | 2023-04-19 | Ammeter clock calibration method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310420495.2A CN116299144A (en) | 2023-04-19 | 2023-04-19 | Ammeter clock calibration method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116299144A true CN116299144A (en) | 2023-06-23 |
Family
ID=86813354
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310420495.2A Pending CN116299144A (en) | 2023-04-19 | 2023-04-19 | Ammeter clock calibration method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116299144A (en) |
-
2023
- 2023-04-19 CN CN202310420495.2A patent/CN116299144A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3009897B1 (en) | Distribution device, distribution system, and distribution method | |
US9271057B2 (en) | Methods and apparatus for time synchronization and measurement of power distribution systems | |
US9306692B2 (en) | Method and device for assessing the performance of one or more packet synchronization services in a packet data transmission network | |
AU2023202152A1 (en) | Method and system for distributing clock signals | |
WO2018006686A1 (en) | Method, apparatus and device for optimizing time synchronization between communication network devices | |
EP3284217A1 (en) | Methods, systems, and computer readable media for synchronizing timing among network interface cards (nics) in a network equipment test device | |
US20210328698A1 (en) | Clock synchronization method and apparatus, and storage medium | |
CN112543078A (en) | Network time server calibration method and device based on satellite common view | |
WO2022116071A1 (en) | Time trusted calibration system used for traffic monitoring network and method for operation thereof | |
CN111865707B (en) | Method and device for monitoring transmission time sequence of sensor data | |
CN103546267A (en) | Time synchronization monitoring method and system | |
CN113835336B (en) | Multi-dimensional self-adaptive metering device patrol and timing method for supporting electric power spot market | |
CN112187560A (en) | NTP network time service evaluation system, method and time service evaluation device | |
CN116299144A (en) | Ammeter clock calibration method and device | |
CN106647228B (en) | Converter station master clock fault judgment system | |
US20240235887A9 (en) | Network node for a vehicle | |
CN111756466B (en) | Method and system for synchronizing clocks of platform sensing terminals based on platform power failure event grabbing | |
CN113162718B (en) | Time determination method, system and medium based on multiple time service signals | |
CN113141227B (en) | Time determination method, system and medium based on hierarchical control | |
US8843615B2 (en) | Method and device for measuring the temporal drift of an item of electronic equipment connected to a network | |
JP2000253466A (en) | Road survey system, central device and terminal equipment | |
CN111654350A (en) | Method for detecting frequency deviation of communication transmission network element equipment | |
CN113328823B (en) | Clock identification method and device based on PTP | |
CN117792541B (en) | Monitoring and evaluating method for current differential protection service 5G time service terminal performance | |
KR102507649B1 (en) | Power grid time synchronization accuracy monitoring apparatus and 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 |