A method, system, medium and terminal for identifying time error of smart electric meter

By combining the interpolation method and the generalized least squares method, the problem of identifying time deviations smaller than the measurement granularity in smart meters is solved, improving the accuracy and timeliness of time error identification, reducing operation and maintenance costs, and supporting the high efficiency of smart grid applications. run.

CN118519089BActive Publication Date: 2024-10-11STATE GRID TIANJIN ELECTRIC POWER CO CHENGXI POWER SUPPLY BRANCH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410977501.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-10-11
Estimated Expiration
2044-07-22

AI Technical Summary

Technical Problem

The existing technology cannot effectively identify the time deviation in smart meters that is smaller than the measurement granularity, and the calculation amount is large and the timeliness is poor. This results in the failure of fault analysis and judgment caused by time errors in smart grid applications and the difficulty in achieving real-time requirements.

Method used

The interpolation method (cubic spline interpolation method) is used to improve the time difference sensitivity of the smart meter data matrix, and the smart meter interpolation temporal model is constructed through the generalized least squares method to solve the time error and perform analysis and processing.

Benefits of technology

It improves the accuracy and timeliness of smart meter time error identification, reduces operation and maintenance costs, and enables more accurate smart grid big data analysis and application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118519089B_ABST
    Figure CN118519089B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system, medium and terminal for identifying time errors of smart meters. The method includes the following steps: collecting meter data and constructing a first meter data matrix; defining time errors and setting the time difference sensitivity of the first meter data matrix; using an interpolation method to improve the time difference sensitivity of the first meter data matrix and outputting a second meter data matrix, wherein the interpolation method is a cubic spline interpolation method; constructing a smart meter interpolation temporal model; setting and initializing variables for a generalized least squares method; solving the smart meter interpolation temporal model using a generalized least squares method to obtain an estimated value of a time error correction of the smart meter; and performing analysis and processing based on the estimated value of a time error correction of the smart meter. The scheme can overcome the problems that the existing methods cannot identify time errors smaller than the measurement granularity and the large amount of calculation, and can effectively improve the accuracy and timeliness of smart meter time error identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart meter clock calibration and time error identification, and in particular to a smart meter time error identification method, system, medium and terminal. Background Art

[0002] With the deployment and application of the new generation of electricity consumption information collection system, the massive amount of smart meters and electricity consumption data provide an important basis for the planning, operation and maintenance of the power grid and the value-added expansion of services. However, due to the large number of smart meters and the complex working environment, the collected data often have various errors. Among them, the time error caused by the asynchronous clock of the meter is one of the main reasons for interfering with the application of big data. The time error often leads to the failure of fault analysis, abnormal line loss in the same period, and the difficulty of implementing services with high real-time requirements such as time-of-use electricity prices and demand response.

[0003] Currently, the industry has proposed some solutions to the above problems. However, these solutions cannot identify time deviations smaller than the measurement granularity, and these solutions have technical problems such as large amount of calculation and poor timeliness when used. Summary of the invention

[0004] In view of the fact that the current solutions pointed out in the background technology cannot identify time deviations smaller than the measurement granularity, and these solutions have technical problems such as large amount of calculation and poor timeliness when used, the purpose of the present invention is to provide a smart meter time error identification method, system, medium, and terminal.

[0005] To achieve the purpose of the present invention, the technical solution provided by the present invention is specifically as follows:

[0006] First aspect

[0007] The present invention provides a method for identifying time errors of smart meters, comprising the following steps:

[0008] Step S1: Collecting electric meter data and constructing a first electric meter data matrix;

[0009] Step S2: define the time error and set the time difference sensitivity of the first electric meter data matrix;

[0010] Step S3: using an interpolation method to improve the time difference sensitivity of the first electric meter data matrix, and outputting a second electric meter data matrix, wherein the interpolation method is a cubic spline interpolation method;

[0011] Step S4: constructing a smart meter interpolation temporal model according to the second meter data matrix;

[0012] Step S5: setting and initializing variables for the generalized least squares method;

[0013] Step S6: Use the generalized least squares method obtained in step S5 to solve the smart meter interpolation temporal model obtained in step S4 to obtain an estimated value of the smart meter time error correction. x etm ( t itp );

[0014] Step S7: Estimated value of the time error correction of the smart meter obtained in step S6 x etm ( t itp ) for analysis and processing.

[0015] Furthermore, step S1 specifically includes:

[0016] Step S1.1: Obtain static data, including obtaining smart meter information, electrical characteristic parameters related to the area network topology architecture, and electrical characteristic parameters related to the load;

[0017] Step S1.2: obtaining dynamic information, including obtaining electric energy metering data with time stamps and sorted by time;

[0018] Step S1.3: Construct a first electric meter data matrix according to the static data obtained in step S1.1 and the dynamic information obtained in step S1.2.

[0019] Further, step S4 specifically includes:

[0020] Step S4.1: define the time error multiplier and obtain the interpolated active power of the sub-meter;

[0021] Step S4.2: constructing the energy conservation matrix of the substation area according to the time difference multiplier and the active interpolation power;

[0022] Step S4.3: Setting time difference parameters;

[0023] Step S4.4: setting generalized parameters;

[0024] Step S4.5: constructing a smart meter interpolation temporal model according to the energy conservation matrix of the substation area, the time difference parameter, and the generalized parameter.

[0025] Further, step S7 specifically includes:

[0026] Step S7.1: Estimation of the time error correction value of the smart meter x etm ( t itp ) to reduce the dimension and obtain n Block table time error d n In thet itp Estimated value of time d n_etm ( t itp );

[0027] when d n_etm ( t itp ) = 0, it indicates that the estimation result of the smart meter is bias-free;

[0028] when d n_etm ( t itp )<0, it indicates that the estimated result of the smart meter is that the clock of the sub-meter lags behind the clock of the main meter d n_etm ( t itp ) measurement intervals;

[0029] when d n_etm ( t itp )>0, it indicates that the estimated result of the smart meter is that the sub-meter clock is ahead of the main meter clock d n_etm ( t itp ) measurement intervals;

[0030] Step S7.2: Setting the clock deviation threshold d hold = K / 5, K is the maximum time error multiplier; when | d n_etm ( t itp )|> d hold When the clock of the smart meter is out of tolerance, it is judged that the smart meter is normal; otherwise,

[0031] Step S7.3: dispatching operation and maintenance personnel to the site to inspect the out-of-tolerance smart meter obtained in step S7.2.

[0032] Second aspect

[0033] Corresponding to the above method, the present invention also provides a smart meter time error identification system, including a first meter data matrix construction unit, a time error definition and time difference sensitivity setting unit, a second meter data matrix output unit, a smart meter interpolation temporal model construction unit, a variable setting and initialization unit, a smart meter time error correction amount estimation value acquisition unit and an analysis and processing unit;

[0034] The first electric meter data matrix construction unit is used to collect electric meter data and construct a first electric meter data matrix;

[0035] The time error definition and time difference sensitivity setting unit are used to define the time error and set the time difference sensitivity of the first electric meter data matrix;

[0036] The second electric meter data matrix output unit is used to improve the time difference sensitivity of the first electric meter data matrix by using an interpolation method and output a second electric meter data matrix, wherein the interpolation method is a cubic spline interpolation method;

[0037] The smart meter interpolation temporal model construction unit is used to construct a smart meter interpolation temporal model according to the second meter data matrix;

[0038] The variable setting and initialization unit is used to set and initialize variables for the generalized least squares method;

[0039] The smart meter time error correction value estimation unit is used to obtain the smart meter time error correction value estimation value by solving the obtained smart meter interpolation temporal model using the obtained generalized least squares method. x etm ( t itp );

[0040] The analysis and processing unit is used to obtain the estimated value of the time error correction amount of the smart meter x etm ( t itp ) for analysis and processing.

[0041] Furthermore, the first electric meter data matrix construction unit is specifically configured to perform the following steps:

[0042] Step S1.1: Obtain static data, including obtaining smart meter information, electrical characteristic parameters related to the area network topology architecture, and electrical characteristic parameters related to the load;

[0043] Step S1.2: obtaining dynamic information, including obtaining electric energy metering data with time stamps and sorted by time;

[0044] Step S1.3: Construct a first electric meter data matrix according to the static data obtained in step S1.1 and the dynamic information obtained in step S1.2.

[0045] Furthermore, the smart meter interpolation temporal model construction unit is specifically used to perform the following steps:

[0046] Step S4.1: define the time error multiplier and obtain the interpolated active power of the sub-meter;

[0047] Step S4.2: constructing the energy conservation matrix of the substation area according to the time difference multiplier and the active interpolation power;

[0048] Step S4.3: Setting time difference parameters;

[0049] Step S4.4: setting generalized parameters;

[0050] Step S4.5: constructing a smart meter interpolation temporal model according to the energy conservation matrix of the substation area, the time difference parameter, and the generalized parameter.

[0051] Furthermore, the analysis and processing unit is specifically configured to perform the following steps:

[0052] Step S7.1: Estimation of the time error correction value of the smart meter x etm ( t itp ) to reduce the dimension and obtain n Block table time error d n In the t itp Estimated value of time d n_etm ( t itp );

[0053] when d n_etm ( t itp ) = 0, it indicates that the estimation result of the smart meter is bias-free;

[0054] when d n_etm ( t itp )<0, it indicates that the estimated result of the smart meter is that the clock of the sub-meter lags behind the clock of the main meter d n_etm ( t itp ) measurement intervals;

[0055] when d n_etm ( t itp )>0, it indicates that the estimated result of the smart meter is that the sub-meter clock is ahead of the main meter clock d n_etm ( t itp ) measurement intervals;

[0056] Step S7.2: Setting the clock deviation threshold d hold = K / 5, K is the maximum time error multiplier; when | d n_etm ( t itp )|> d hold When the clock of the smart meter is out of tolerance, it is judged that the smart meter is normal; otherwise,

[0057] Step S7.3: dispatching operation and maintenance personnel to the site to inspect the out-of-tolerance smart meter obtained in step S7.2.

[0058] The third aspect

[0059] The present invention also provides a storage medium, in which at least one instruction, at least one program, code set or instruction set is stored. The at least one instruction, the at least one program, the code set or instruction set is loaded and executed by a processor to implement the method for identifying time errors of smart meters.

[0060] The fourth aspect

[0061] The present invention also provides an electronic terminal, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the method for identifying time errors of smart meters.

[0062] Compared with the prior art, the present invention has the following beneficial effects:

[0063] The technical solution disclosed in the present invention uses cubic spline interpolation method to improve the temporal model according to the time difference sensitivity, and then uses generalized least squares method to solve the temporal model, and finally obtains the time error of each smart meter, and processes it according to the obtained time error. This solution can overcome the problem that the existing method cannot identify the time error smaller than the measurement granularity and the huge amount of calculation, and can effectively improve the accuracy and timeliness of smart meter time error identification, reduce the operation and maintenance costs of smart meters for power companies, so as to carry out more targeted dispatching and investigation, and better serve the analysis and application of smart grid big data. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 A schematic diagram of a method flow chart provided in an embodiment of the present application;

[0065] Figure 2 This is a schematic diagram of the time error in the embodiment of the present application;

[0066] Figure 3 This is a schematic diagram of time difference sensitivity in an embodiment of the present application;

[0067] Figure 4 This is a schematic diagram of the time error identification results of a smart meter obtained using the present application. DETAILED DESCRIPTION

[0068] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0069] The present invention provides a method, system, medium and terminal for identifying time errors of smart meters. Under the premise of avoiding on-site time calibration and installation of additional equipment, the present invention can realize time state estimation of smart meters of each user in the substation area, with high accuracy and engineering applicability. Example 1

[0070] like Figure 1 As shown, this embodiment provides a method for identifying time errors of smart meters, comprising the following steps:

[0071] Step S1: Collecting meter data and constructing a first meter data matrix; which specifically includes:

[0072] Step S1.1: Obtain static data, including the following:

[0073] (1) Smart meter information: including the total number of smart meters for users in the area m、 Smart meter number ;

[0074] (2) The main electrical characteristic parameters related to the substation network topology architecture, including power supply radius, total length of low-voltage lines, household transformer relationship, and phase transformation relationship;

[0075] (3) Main electrical characteristic parameters related to the load, including load rate, power consumption characteristics and proportion.

[0076] Step S1.2: obtaining dynamic information, including obtaining electric energy metering data with time stamps and sorted by time;

[0077] It is the measurement timestamp index, which is equivalent to the primary key in the database table; T total =card( T set )for T set The total number of elements of ; T setis the measurement timestamp column vector, the elements of which represent the timestamps of each moment. Among these timestamps, T set (1) and T set ( T total ) can be any time, and the other timestamps must be arranged in chronological order from top to bottom; T set ( t )express T set No. t The timestamp of the row, whose format is determined according to the international standard "Data element and interchange format·Information interchange·Date and time representation" (ISO 8601:2000); Δ t is the time interval between two adjacent timestamps. In general, dynamic information is sampled at equal intervals by default. T set ( t ), then T set ( t )= T set (1)+( t -1) Δ t ; L true ( t )yes T set ( t ) at the time of the actual network loss of the substation, referred to as the actual loss (kWh), the dynamic information obtained includes: (1) the total power of the substation at the time of the T set ( t Total meter power at time Y ( t );(2)The station area n The user table is in the t Power at all times a n ( t ).

[0078] Step S1.3: Construct a first electric meter data matrix according to the static data obtained in step S1.1 and the dynamic information obtained in step S1.2.

[0079] In order to facilitate data processing and calculation, the total meter power and sub-meter power are expressed in matrix form. Y ( t ) is the t The total meter power column vector at each moment, from the first moment to the t Total meter electricity at that timeY ( t ) is organized into columns; I 2 ( t ) is the t The total meter current square column vector at the moment, from the first moment to the t Total meter current squared at the moment I 2 ( t ) is organized into columns; For the t The row vector of the meter electricity at each moment, from the 1st to the n Block table t Power at all times Composition by row; For the t The moment n The electric quantity column vector of the block meter, from the first moment to the t The moment n Block meter power Composition by row; A ( t ) is the t There are two ways to form the sub-meter electricity matrix at each moment. The first is from the first moment to the t The row vector of the electricity consumption of each meter at a certain moment The second type is composed of columns from 1 to 2. n The column vector of the electricity quantity of the block meter Composition by row; L true ( t ) is the t The actual loss column vector at each moment, from the first moment to the t The actual network loss in the area at the moment L true ( t ) is organized into columns, as shown in the following formula:

[0080] ;

[0081] ;

[0082] ;

[0083] ;

[0084] ;

[0085] ;

[0086] In order to make the construction of the first electric meter data matrix easier to understand, a specific example of the first electric meter data matrix is ​​given below, as shown in Table 1. In the example, the relevant data are sampled at equal intervals. T set ( t )=00:00, Δ t =00:15:

[0087] Table 1

[0088] <![CDATA[ T set ( t )= T set (1)+ ( t -1) D t ]]> (kWh) <![CDATA[ a 1( t ) (kWh)]]> <![CDATA[ a 2( t ) (kWh)]]> … <![CDATA[ a n ( t ) (kWh)]]> … <![CDATA[ a m ( t ) (kWh)]]> <![CDATA[ L true ( t ) (kWh)]]> 1 00:00 300 20 25 … … … 30 6 2 00:15 400 30 35 … … … 50 8 3 00:30 350 25 30 … … … 25 7 … … … … … … … … … … <![CDATA[ T total -1]]> <![CDATA[00:00+( T total -2) D t ]]> 250 5 10 … … … 20 5 <![CDATA[ T total ]]> <![CDATA[00:00+( T total -1) D t ]]> 200 10 15 … … … 40 4

[0089] Step S2: define the time error and set the time difference sensitivity of the first electric meter data matrix; it specifically includes the following steps:

[0090] Step S2.1: Define the time error.

[0091] According to the Digital Energy Meter Calibration Specification (DL / T1507-2016) and Smart Energy Meter Functional Specification (DL / T1490-2015), the clock daily timing error should not exceed ±0.5s / d. Therefore, it can be considered that the time error of smart meters is in the order of seconds to minutes. Very few smart meters may have time errors at the hour level due to poor operating conditions or severe battery aging. d n For the n The error of the block meter clock relative to the master meter clock is referred to as the n The time error of the block meter indicates that the clock of the block meter is ahead of or behind the clock of the main meter in the area. Figure 2 When the sub-meter clock lags behind the main meter clock, it means that the main meter clock has reached T set ( t ) , the submeter clock still stays at T set ( t )-| d n |Time, still needs to pass d n Time to arrive T set ( t ), that is, the sub-meter displays the local clock T set ( t )- | d n The data collected at each moment actually corresponds to the total table in T set ( t) at the time, as shown by the red curve in the figure; when the sub-meter clock is ahead of the main meter clock, it means that the main meter clock has reached T set ( t ) when the submeter clock reaches T set ( t ) and walked more d n The time has arrived T set ( t )+ d n Time, that is, the time displayed by the local clock T set ( t )+ d n The data collected at each moment actually corresponds to the total table in T set ( t ) as shown by the blue curve in the figure.

[0092] Step S2.2: Time difference sensitivity setting.

[0093] Since the present application obtains the time error of each sub-meter by identifying the difference between the measured data in the synchronous tense and the deviation tense, the accuracy of time error identification is closely related to the acquisition frequency and granularity of the measured data. For example, when the acquisition frequency is too low and the data acquisition interval is too large, the data feature differences caused by the smaller time error will be diluted, and the collected data will be insensitive to the time error, which will make it impossible to distinguish the time error. The data acquisition frequency of smart meters varies according to the accuracy of the electricity meter and the application scenario: Level 2 (Level A) smart meters are generally installed on the residential user side, and the acquisition frequency interval is generally d, h or 15min; Level 0.5 (Level C) smart meters are generally gateway meters in the substation area, and the acquisition frequency interval is generally 5min or 1min. Therefore, there are differences in the sensitivity of smart meter data collection to time errors in different application scenarios. In order to quantify the sensitivity difference, let the first n Time difference sensitivity of block meter c n for: .

[0094] Figure 3 A schematic diagram of time difference sensitivity is given. t =00:15, , and They represent the difference of power data under three different time error states. As can be seen from the figure, c nThe smaller it is, the smaller the difference in power data caused by the time error is, that is, the less sensitive the measured data is to the time error, and the time error is more difficult to obtain through the characteristic analysis of the collected data; when c n When it gets bigger, the difference of the power data caused by the time error becomes larger, that is, the measured data is more sensitive to the time error, and the time error is easier to be obtained through the characteristic analysis of the collected data. Note that due to the uncertainty of the data curve shape, there may be T set ( t ) and T set ( t )+ d n The situation where the data values ​​collected at each moment are the same. However, since multiple continuous measurements are performed and the overall offset characteristics of the data curve are investigated rather than individual data points, the situation where the data values ​​collected at different moments are the same does not affect the identification of the characteristics of the data curve offset caused by the large time difference.

[0095] Step S3: using an interpolation method to improve the time difference sensitivity of the first meter data matrix and outputting a second meter data matrix, wherein the interpolation method is a cubic spline interpolation method; the process includes the following steps:

[0096] From the above analysis, it can be seen that the lower the time difference sensitivity of the data set, the more difficult it is to determine the time error of each sub-meter by analyzing the offset characteristics of the measured data. However, when deploying and setting up the electricity consumption information collection system, the collection frequency and the granularity of the first meter data matrix need to be configured according to the actual environment and needs. It is difficult to improve the time difference sensitivity by modifying the collection parameters, and the time error is a variable to be determined, and its size cannot be determined. Therefore, it is necessary to use mathematical methods to improve the time difference sensitivity of the original data set. Interpolation is a data granularity refinement method, which provides ideas for improving the time difference sensitivity of the first meter data matrix.

[0097] This application adopts the cubic spline interpolation method, which can not only ensure the smoothness of the interpolated data curve and reduce the interpolation error, but also reduce the occurrence of Runge phenomenon, and is suitable for interpolation of data curves with strong randomness. The specific steps are as follows:

[0098] Step S3.1: Set the interpolation ratio, as follows:

[0099] set up c itp is the interpolation ratio, then the total number of time indexes after interpolation T total_itp for:

[0100] ;

[0101] set up is the interpolation index, T itp is the interpolation timestamp column vector, T itp ( t itp )for T itp The t itp The interpolated timestamp of the row, T itp ( t itp )and T set ( t ) has the following corresponding relationship:

[0102] ;

[0103] Step S3.2: Calculate interpolation data, as follows:

[0104] Assume that the original data column vector and the interpolated data column vector are Y A_org and Y A_itp , Y A_org ( t )and Y A_itp ( t itp ) are Y A_org and Y A_itp The t Row and t tip Row elements, according to the cubic spline interpolation method, we can get: for any t itp , there is one t , so that T set ( t )≤ T itp ( t itp )≤ T set ( t +1), then Y A_itp ( t itp ) can be obtained by the following formula:

[0105] ;

[0106] in,s p1 ( t ), s p2 ( t ), s p3 ( t )and s p43 ( t ) are all spline curve coefficients, and the calculation formula is as follows:

[0107] ;

[0108] in, h ( t ) Calculate the step length, the calculation formula is as follows:

[0109] ;

[0110] This application considers equally spaced data sampling, so for any t , h ( t ) are interpolation ratios c itp The reciprocal of this is the following quadratic differential value g ( t ) provides convenience for the calculation of the second derivative. g ( t ) requires solving a matrix equation group with boundary conditions. The cubic spline interpolation method provides three solution methods under free boundary, fixed boundary and non-node boundary conditions. This application chooses to solve the matrix equation group with free boundary endpoint conditions. g ( t ), as follows:

[0111] ;

[0112] Step S3.3: Assignment and arrangement of interpolation data, specifically: the original data column vector of this application Y A_org Select the total meter power column vector Y ( t ), total meter current square column vector I 2 ( t ), column vector of electricity consumption in sub-meters and the actual network loss column vector L true ( t ), after the cubic spline interpolation method, the interpolation data column vector Y A_itp Divided into total table interpolation power column vectorY itp ( t itp ), total table interpolation current square column vector I 2 itp ( t itp ), interpolation column vector of electricity in sub-meters and the interpolation network loss column vector L itp ( t itp ), the elements of the three are recorded as t itp Total meter interpolation power at the time Y itp ( t itp ), total meter interpolation current square I 2 itp ( t itp ), No. n Interpolation power of block meters and interpolation network loss L itp ( t itp The essence of the interpolation method to improve the time difference sensitivity of the first meter data matrix is ​​to refine the granularity of the first meter data matrix through mathematical methods, that is, to reduce Δ t , thereby increasing the sensitivity to time difference c n , interpolation factor c itp This means that the interpolation method converts the Δ of the original data set t Reduced c itp times, then the time difference sensitivity of the interpolated second meter data matrix c n Enlarged 1 / c itp times.

[0113] Preferably, the present application first estimates the magnitude of the time error of each sub-meter in the application area, and then sets the interpolation magnification in combination with the system acquisition frequency. c itp , the time difference sensitivity c n Zoom in to above 1 to facilitate subsequent time difference determination.

[0114] Step S4: constructing a smart meter interpolation temporal model according to the second meter data matrix; specifically:

[0115] Step S4.1: Define the time difference multiplier, specifically: define k n For the n The time error multiplier of the block meter; K is the maximum time error multiplier; the clock offset of the sub-meter will inevitably lead to the misalignment of the data timestamp, so the time axis needs to be corrected to restore the measurement data at the correct time. n Block in t itp The interpolated active power of the sub-meter at the moment can be expressed as: , it can be seen that due to t itp + k n >0, then t itp > K .

[0116] Step S4.2: Construct the energy conservation matrix of the substation area. Specifically, when all sub-meters are corrected to be synchronized with the main meter clock, for any time t itp According to the law of conservation of energy, we can get:

[0117] ;

[0118] Since multiple measurements are performed, the above formula is converted from the first moment to the t itp By expanding all measurement sections at the time instant, the energy conservation matrix of the station area can be obtained:

[0119] ;

[0120] Step S4.3: Setting the time difference parameters, specifically: For the n The block table is in t itp The interpolated electric quantity temporal generalized column vector at time, A K ( t itp ) is the t itp The interpolated power temporal matrix at the moment is composed of all users constitute and A K ( t itp ) t itp The row vector is set to , For the titp The interpolated electrical quantity temporal row vector at the time:

[0121] ;

[0122] set up x is the temporal column vector of all sub-tables, x n For the n The temporal column vector of the block table, x n(k) For the n Block table for the k The choice value of the tense, the relationship between the three is as follows:

[0123] ;

[0124] ;

[0125] in, x n(k) The values ​​of are as follows:

[0126] ;

[0127] in, Temporal index.

[0128] Step S4.4: Generalized parameter setting.

[0129] In order to perform the least squares solution, the interpolation loss needs to be regarded as a generalized parameter and written into the coefficient matrix and the energy conservation formula of the station area needs to be converted into the least squares standard form. The specific steps are as follows: Assume s is the clustering index, S is the number of clusters, ; For the interpolation loss column vector L itp ( t itp ) performs k-means clustering and obtains S Cluster centers; x F(s) For the s loss cluster centers, x F is the loss cluster center column vector, and the relationship between them is as follows:

[0130] ;

[0131] ;

[0132] set up For the t itp Interpolation loss at timeL itp ( t itp ) For the s Loss Cluster Centers x F(s) The membership degree of is as follows:

[0133] ;

[0134] set up is the loss membership row vector, given by S indivual composition; A F ( t itp ) is the loss membership matrix, from the 1st row to the t itp OK composition:

[0135] ;

[0136] ;

[0137] Step S4.5: Construct a smart meter interpolation temporal model.

[0138] Set as A G ( t itp ) is the generalized input matrix, A G ( t itp ) is the row vector of , x G is the generalized parameter column vector:

[0139] ;

[0140] ;

[0141] ;

[0142] Afterwards, the energy conservation matrix of the substation area can be rewritten into the following generalized least squares standard form, which is the smart meter interpolation temporal model:

[0143] ;

[0144] Step S5: setting and initializing variables for the generalized least squares method, the process includes the following steps:

[0145] Step S5.1: Parameter setting, including the forgetting factor r Settings, damping factor m 0 setting, the number of clusters S The experiment shows that the best estimation effect is set to: r = 0.5; m 0 = 0.01; S =80.

[0146] Step S5.2: variable setting, specifically: setting the generalized system parameter column vector x G_etm ( t itp )as follows:

[0147] ;

[0148] ;

[0149] ;

[0150] in, x etm ( t itp )for x In the t itp The estimated value of the time, and x The dimensions are the same, both are [ m (2 K +1)]´1-dimensional column vector, x n_etm ( t itp )express x n In the t itp The estimated value of the time, and x n The dimensions are the same, both are (2 K +1) ´1-dimensional column vector; x F_etm for x F In the t itp The estimated values ​​of the moment, dimensions and x F Same, both S ´1-dimensional column vector, x F_etm(s) ( t itp )express x F(s) In the titp Estimated value of the moment.

[0151] Step S5.3: variable initialization, specifically: initialization includes t itp =1 and t itp =2 time x G_etm (1) x G_etm (2) x F_etm (1) x F_etm (2) The specific settings are:

[0152] ;

[0153] ;

[0154] ;

[0155] ;

[0156] ;

[0157] Step S5.4: Covariance Matrix P G ( t itp ) to initialize, that is P G (1)=1000×I, where I is the dimension ( m (2 K +1)+ S )× ( m (2 K +1)+ S )’s identity matrix;

[0158] Step S6: Use the generalized least squares method obtained in step S5 to solve the smart meter interpolation temporal model obtained in step S4 to obtain an estimated value of the smart meter time error correction. x etm ( t itp ); the process includes the following steps:

[0159] Step S6.1: Read the latest second meter data matrix, including the total meter interpolation power of the area y ( t itp ), the total table interpolation current square column vector I 2 itp ( t itp ), interpolation electricity of sub-meters , and follow step S4.3 to build ;

[0160] Step S6.2: During the construction of the smart meter temporal model, the loss membership matrix and loss cluster center are the interpolation loss column vectors. L itp ( t itp ) is obtained by k-means clustering. In actual engineering applications, the network loss of the substation area may be difficult to obtain, so it is not possible to directly perform L itp ( t itp ) clustering. Therefore, the measured data with strong linear correlation with the loss can be clustered. This application chooses to cluster the total meter interpolation current square I 2 ( t itp ) Perform k-means clustering to obtain the loss membership row vector and the loss center column vector x F :

[0161] ;

[0162] ;

[0163] ;

[0164] ;

[0165] Step S6.3: Obtain the generalized system input row vector , constructed as ;

[0166] Step S6.4: Update the damping factor according to the following formula: , where mean refers to the average value of all elements in the matrix;

[0167] Step 6.5: Update the covariance matrix. Read the previous covariance matrix P G ( t itp -1), and update the covariance matrix according to the following formula: ;

[0168] Step S6.6: Update the generalized system parameter column vector. Read the previous two generalized system parameter column vector estimates and update the generalized system parameter column vector according to the following formula:

[0169]

[0170] ;

[0171] Step S6.7: Obtain the estimated value of the time error estimation correction of the smart meter and the estimated value of the loss cluster center. x etm ( t itp )for x G_etm ( t itp ) from line 1 to line 2 m (2 K +1) rows, where the n Temporal column vector estimate for block table x n_etm ( t itp )for x etm ( t itp ) n (2 K +1)-2 K Go to n (2 K +1) row; loss cluster center column vector estimate x F_etm ( t itp )for x G_etm ( t itp ) m (2 K +1)+1 row to m (2 K +1)+ S The column vector composed of rows;

[0172] Step S6.8: Determine whether there is a next set of second electric meter data matrix. If yes, return to step 6.3; otherwise, wait for a new second electric meter data matrix input and jump to step 7 for result analysis.

[0173] Step S7: Estimated value of the time error correction of the smart meter obtained in step S6 x etm ( t itp ), and carries out analysis and processing, the process of which includes the following steps:

[0174] Step S7.1: Result conversion. The following formula is used to convert the high-dimensional smart meter time error correction estimate x etm ( t itp ) dimension reduction, and obtain the d n In the t itp Estimated value of time d n_etm ( t itp ):

[0175] ;

[0176] when d n_etm ( t itp ) = 0, it indicates that the estimation result of the smart meter is bias-free; when d n_etm ( t itp )<0, it indicates that the estimated result of the smart meter is that the clock of the sub-meter lags behind the clock of the main meter. d n_etm ( t itp ) measurement intervals; when d n_etm ( t itp )>0, it indicates that the estimated result of the smart meter is that the sub-meter clock is ahead of the main meter clock d n_etm ( t itp ) measurement intervals.

[0177] Step S7.2: Identify out-of-tolerance meters. Set clock out-of-tolerance threshold d hold = K / 5 ; when | d n_etm ( t itp )|> d hold When the clock of the smart meter is out of tolerance, it is judged that the smart meter is normal.

[0178] Step S7.3: dispatching operation and maintenance personnel to the site to inspect the out-of-tolerance smart meter obtained in step S7.2. Example 2

[0179] Corresponding to the above method, this embodiment provides a smart meter time error identification system, including a first meter data matrix construction unit, a time error definition and time difference sensitivity setting unit, a second meter data matrix output unit, a smart meter interpolation temporal model construction unit, a variable setting and initialization unit, a smart meter time error correction amount estimation value acquisition unit, and an analysis and processing unit;

[0180] The first electric meter data matrix construction unit is used to collect electric meter data and construct a first electric meter data matrix;

[0181] The time error definition and time difference sensitivity setting unit are used to define the time error and set the time difference sensitivity of the first electric meter data matrix;

[0182] The second electric meter data matrix output unit is used to improve the time difference sensitivity of the first electric meter data matrix by using an interpolation method and output a second electric meter data matrix, wherein the interpolation method is a cubic spline interpolation method;

[0183] The smart meter interpolation temporal model construction unit is used to construct a smart meter interpolation temporal model according to the second meter data matrix;

[0184] The variable setting and initialization unit is used to set and initialize variables for the generalized least squares method;

[0185] The smart meter time error correction value estimation unit is used to obtain the smart meter time error correction value estimation value by solving the obtained smart meter interpolation temporal model using the obtained generalized least squares method. x etm ( t itp );

[0186] The analysis and processing unit is used to obtain the estimated value of the time error correction amount of the smart meter x etm ( t itp ) for analysis and processing. Example 3

[0187] This embodiment provides a storage medium, in which at least one instruction, at least one program, a code set or an instruction set is stored. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the method for identifying time errors of smart meters. Example 4

[0188] This embodiment provides an electronic terminal, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method for identifying time errors of smart meters.

[0189] The optional implementation modes of the embodiments of the present invention are described in detail above in conjunction with the accompanying drawings. However, the embodiments of the present invention are not limited to the specific details in the above implementation modes. Within the technical concept of the embodiments of the present invention, various simple modifications can be made to the technical scheme of the embodiments of the present invention, and these simple modifications all belong to the protection scope of the embodiments of the present invention.

Claims

1. A method for identifying time errors of smart meters. It is characterized in that The steps include: Step S1: Collecting electric meter data and constructing a first electric meter data matrix; Step S2: define the time error and set the time difference sensitivity of the first electric meter data matrix; Step S3: using an interpolation method to improve the time difference sensitivity of the first meter data matrix, and outputting a second meter data matrix, wherein the interpolation method is a cubic spline interpolation method, and the specific steps are as follows: Step S3.1: Set the interpolation ratio, as follows: Assume γ itp is the interpolation ratio, then the total number of time indexes after interpolation is T total_itp for: Assume t itp ∈[1, 2, ..., T total_itp ] is the interpolation index, T itp is the interpolation timestamp column vector, T itp (t itp ) is T itp The tth itp The interpolated timestamp of the row, T itp (t itp ) and T set (t) There is the following corresponding relationship: Step S3.2: Calculate interpolation data, as follows: Assume that the original data column vector and the interpolated data column vector are Y A_org and Y A_itp , Y A_org (t) and Y A_itp (t itp ) are Y A_org and Y A_itp The tth row and tth row in tip Row elements, according to the cubic spline interpolation method, we can get: for any t itp , there exists a t such that T set (t)≤T itp (t itp )≤T set (t+1), then Y A_itp (t itp ) can be obtained by the following formula: Among them, s p1 (t), s p2 (t), s p3 (t) and s p43 (t) are all spline curve coefficients, and the calculation formula is as follows: Among them, h(t) is the calculation step length, and the calculation formula is as follows: Step S3.3: interpolation data assignment and arrangement, specifically: the original data column vector Y of this application A_org Select the total meter electricity column vector Y(t) and the total meter current square column vector I 2 (t), column vector a of the electricity quantity in the meter n (t) and the actual network loss column vector L true (t), after the cubic spline interpolation method, the interpolation data column vector Y A_itp Divided into total table interpolation power column vector Y itp (t itp ), total table interpolation current square column vector I 2 itp (t itp ), interpolation column vector a of the sub-meter itp_n (t itp ) and the interpolation network loss column vector L itp (t itp ), the elements of the three are recorded as t itp Total meter interpolation power Y at the time itp (t itp ), total meter interpolation current square I 2 itp (t itp ), the interpolated power a of the nth block itp_n (t itp ) and the interpolation network loss L itp (t itp ); Step S4: constructing a smart meter interpolation temporal model according to the second meter data matrix; Step S5: setting and initializing variables for the generalized least squares method; Step S6: Use the generalized least squares method obtained in step S5 to solve the smart meter interpolation temporal model obtained in step S4 to obtain the estimated value x of the smart meter time error correction etm (t itp ); Step S7: The estimated value x of the time error correction of the smart meter obtained in step S6 etm (t itp ) for analysis and processing.

2. A smart meter time error identification method according to claim 1, It is characterized in that Step S1 specifically includes: Step S1.1: Obtain static data, including obtaining smart meter information, electrical characteristic parameters related to the area network topology architecture, and electrical characteristic parameters related to the load; Step S1.2: obtaining dynamic information, including obtaining electric energy metering data with time stamps and sorted by time; Step S1.3: Construct a first electric meter data matrix according to the static data obtained in step S1.1 and the dynamic information obtained in step S1.

2.

3. A smart meter time error identification method according to claim 2, It is characterized in that Step S4 specifically includes: Step S4.1: define the time error multiplier and obtain the interpolated active power of the sub-meter; Step S4.2: constructing the energy conservation matrix of the substation area according to the time difference multiplier and the active interpolation power; Step S4.3: Setting time difference parameters; Step S4.4: setting generalized parameters; Step S4.5: constructing a smart meter interpolation temporal model according to the energy conservation matrix of the substation area, the time difference parameter, and the generalized parameter.

4. A smart meter time error identification method according to claim 3, It is characterized in that Step S7 specifically includes: Step S7.1: Estimated value x of the time error correction of the smart meter etm (t itp ) to reduce the dimension and obtain the time error d of the nth block table n In the t itp The estimated value of time d n_etm (t itp ); When n_etm (t itp ) = 0, indicating that the estimation result of the smart meter is bias-free; When n_etm (t itp )<0, it indicates that the estimated result of the smart meter is that the clock of the sub-meter lags behind the clock of the main meter by d n_etm (t itp ) measurement intervals; When n_etm (t itp )>0, it indicates that the estimated result of the smart meter is that the clock of the sub-meter is ahead of the clock of the main meter by d n_etm (t itp ) measurement intervals; Step S7.2: Setting the clock deviation threshold d hold =K / 5, K is the maximum time error ratio; when |d n_etm (t itp )|>d hold When the clock of the smart meter is out of tolerance, it is judged that the smart meter is normal; otherwise, Step S7.3: dispatching operation and maintenance personnel to the site to inspect the out-of-tolerance smart meter obtained in step S7.

2.

5. A smart meter time error identification system, It is characterized in that It includes a first meter data matrix construction unit, a time error definition and time difference sensitivity setting unit, a second meter data matrix output unit, a smart meter interpolation temporal model construction unit, a variable setting and initialization unit, a smart meter time error correction amount estimation value acquisition unit and an analysis and processing unit; The first electric meter data matrix construction unit is used to collect electric meter data and construct a first electric meter data matrix; The time error definition and time difference sensitivity setting unit are used to define the time error and set the time difference sensitivity of the first electric meter data matrix; The second electric meter data matrix output unit is used to improve the time difference sensitivity of the first electric meter data matrix by using an interpolation method and output a second electric meter data matrix, wherein the interpolation method is a cubic spline interpolation method; The specific steps are as follows: Step S3.1: Set the interpolation ratio, as follows: Assume γ itp is the interpolation ratio, then the total number of time indexes after interpolation is T total_itp for: Assume t itp ∈[1, 2, ..., T total_itp ] is the interpolation index, T itp is the interpolation timestamp column vector, T itp (t itp ) is T itp The tth itp The interpolated timestamp of the row, T itp (t itp ) and T set (t) There is the following corresponding relationship: Step S3.2: Calculate interpolation data, as follows: Assume that the original data column vector and the interpolated data column vector are Y A_org and Y A_itp , Y A_org (t) and Y A_itp (t itp ) are Y A_org and Y A_itp The tth row and tth row in tip Row elements, according to the cubic spline interpolation method, we can get: for any t itp , there exists a t such that T set (t)≤T itp (t itp )≤T set (t+1), then Y A_itp (t itp ) can be obtained by the following formula: Among them, s p1 (t), s p2 (t), s p3 (t) and s p43 (t) are all spline curve coefficients, and the calculation formula is as follows: Among them, h(t) is the calculation step length, and the calculation formula is as follows: Step S3.3: interpolation data assignment and arrangement, specifically: the original data column vector Y of this application A_org Select the total meter electricity column vector Y(t) and the total meter current square column vector I 2 (t), column vector a of the electricity quantity in the meter n (t) and the actual network loss column vector L true (t), after the cubic spline interpolation method, the interpolation data column vector Y A_itp Divided into total table interpolation power column vector Y itp (t itp ), total table interpolation current square column vector I 2 itp (t itp ), interpolation column vector a of the sub-meter itp_n (t itp ) and the interpolation network loss column vector L itp (t itp ), the elements of the three are recorded as t itp Total meter interpolation power Y at the time itp (t itp ), total meter interpolation current square I 2 itp (t itp ), the interpolated power a of the nth block itp_n (t itp ) and the interpolation network loss L itp (t itp ); The smart meter interpolation temporal model construction unit is used to construct a smart meter interpolation temporal model according to the second meter data matrix; The variable setting and initialization unit is used to set and initialize variables for the generalized least squares method; The smart meter time error correction value estimation unit is used to solve the obtained smart meter interpolation temporal model using the obtained generalized least squares method to obtain the smart meter time error correction value estimation value x etm (t itp ); The analysis and processing unit is used to obtain the estimated value x of the time error correction amount of the smart meter etm (t itp ) for analysis and processing.

6. A smart meter time error identification system according to claim 5, It is characterized in that The first electric meter data matrix construction unit is specifically used to perform the following steps: Step S1.1: Obtain static data, including obtaining smart meter information, electrical characteristic parameters related to the area network topology architecture, and electrical characteristic parameters related to the load; Step S1.2: obtaining dynamic information, including obtaining electric energy metering data with time stamps and sorted by time; Step S1.3: Construct a first electric meter data matrix according to the static data obtained in step S1.1 and the dynamic information obtained in step S1.

2.

7. A smart meter time error identification system according to claim 6, It is characterized in that The smart meter interpolation temporal model construction unit is specifically used to perform the following steps: Step S4.1: define the time error multiplier and obtain the interpolated active power of the sub-meter; Step S4.2: constructing the energy conservation matrix of the substation area according to the time difference multiplier and the active interpolation power; Step S4.3: Setting time difference parameters; Step S4.4: setting generalized parameters; Step S4.5: constructing a smart meter interpolation temporal model according to the energy conservation matrix of the substation area, the time difference parameter, and the generalized parameter.

8. A smart meter time error identification system according to claim 7, It is characterized in that The analysis and processing unit is specifically used to perform the following steps: Step S7.1: Estimated value x of the time error correction of the smart meter etm (t itp ) to reduce the dimension and obtain the time error d of the nth block table n In the t itp The estimated value of time d n_etm (t itp ); When n_etm (t itp ) = 0, indicating that the estimation result of the smart meter is bias-free; When n_etm (t itp )<0, it indicates that the estimated result of the smart meter is that the clock of the sub-meter lags behind the clock of the main meter by d n_etm (t itp ) measurement intervals; When n_etm (t itp )>0, it indicates that the estimated result of the smart meter is that the clock of the sub-meter is ahead of the clock of the main meter by d n_etm (t itp ) measurement intervals; Step S7.2: Setting the clock deviation threshold d hold =K / 5, K is the maximum time error ratio; when |d n_etm (t itp )|>d hold When the clock of the smart meter is out of tolerance, it is judged that the smart meter is normal; otherwise, Step S7.3: dispatching operation and maintenance personnel to the site to inspect the out-of-tolerance smart meter obtained in step S7.

2.

9. A storage medium, It is characterized in that The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a smart meter time error identification method as described in any one of claims 1-4.

10. An electronic terminal, It is characterized in that The electronic terminal includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a smart meter time error identification method as described in any one of claims 1-4.