Meter misalignment judgment method and system based on recursive least square method

By employing a recursive least squares method for judging meter malfunctions, combined with gradual disappearance memory recursion and quantum-inspired gradual disappearance memory recursion, and using least squares to process meter data, the real-time stability problem of metering deviation under light load and intermittent power consumption is solved, thereby improving the accuracy of metering deviation judgment and positioning accuracy.

CN121955862APending Publication Date: 2026-05-01JIANGSU RUIDIAN ZHIXIN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGSU RUIDIAN ZHIXIN INFORMATION TECH CO LTD
Filing Date
2026-01-30
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Traditional methods are insufficient for real-time, stable and reliable measurement deviation judgment of electricity meters under conditions such as light load operation, intermittent power consumption and unbalanced load.

Method used

A meter misalignment judgment method based on recursive least squares is adopted. The parameter vector is calculated by fading memory recursive least squares and quantum-inspired fading memory recursive least squares. Combined with dynamic line loss estimation, sampling time alignment and filtering, data preprocessing is performed, and the stability of the results is ensured by multiple stability criteria.

Benefits of technology

It achieves stable and reliable measurement deviation judgment under light load and intermittent power conditions, reduces systematic errors introduced by line impedance and sampling delay, and improves detection accuracy and positioning accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121955862A_ABST
    Figure CN121955862A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a system for judging meter misalignment based on a recursive least square method. The method comprises the following steps: acquiring data of a meter box and all electric meters under the meter box; performing data preprocessing on data acquired by the meter box and each electric meter under the meter box to obtain a meter box electric quantity increment and a corrected electric meter electric quantity increment; performing recursive calculation on the electric quantity increment of the meter box and the corrected electric quantity increments of all the electric meters under the meter box to obtain an information matrix, a parameter vector based on a fading memory recursive least square method and a parameter vector based on the introduced quantum inspiration fading memory recursive least square method; respectively carrying out stability judgment according to the information matrix, the parameter vector based on the fading memory recursive least square method and the parameter vector based on the introduced quantum inspiration fading memory recursive least square method, and judging that the calculation result is stable and credible after all the parameters are met; and carrying out misalignment judgment on the obtained stable and credible parameter vector.
Need to check novelty before this filing date? Find Prior Art

Description

A method and system for judging meter inaccuracies based on recursive least squares method Technical Field

[0001] This invention relates to the field of electricity meter data acquisition and judgment technology, and in particular to a method and system for judging meter inaccuracy based on recursive least squares method. Background Technology

[0002] In power systems, all electrical equipment is a component; therefore, under the premise of energy conservation, the parameters in the system must satisfy certain equality and inequality constraints. Methods for monitoring the operational status of smart meters by establishing corresponding calculation models based on the law of energy conservation have emerged. Furthermore, methods for monitoring operational errors by considering factors affecting the operational status of smart meters, such as natural environment, electrical environment, load type, and meter manufacturer, have also emerged. These methods include collecting and analyzing data on these factors to establish an operational status assessment model, predicting trends in meter operational errors, and providing reasonable replacement recommendations.

[0003] However, when performing metering status analysis on a single or small number of meters at the meter box side, traditional methods based on historical data or fixed weight parameters are difficult to obtain stable and reliable metering deviation judgment results while ensuring real-time performance due to factors such as light-load operation, intermittent power consumption, and unbalanced load. Summary of the Invention

[0004] Technical Objective: To address the shortcomings of existing technologies, this invention discloses a method and system for judging meter inaccuracies based on recursive least squares. The method analyzes the data of all meters under the meter box, calculates parameter vectors based on both the gradually diminishing memory recursive least squares method and the quantum-inspired gradually diminishing memory recursive least squares method, and then judges the stability, ensuring real-time performance while obtaining stable and reliable metering deviation judgment results.

[0005] Technical solution: To achieve the above technical objectives, the present invention adopts the following technical solution.

[0006] A method for judging meter malfunction based on recursive least squares method includes the following steps: S1, Data acquisition: Acquire voltage and power data of the meter box, and acquire voltage, current, and power data of all meters under each meter box; S2, Data preprocessing: Perform data preprocessing on the data collected from the meter box and each meter under the meter box; the preprocessing process includes: performing dynamic line loss estimation, sampling time alignment, and filtering on the meter box data and the data of individual meters under the meter box to obtain the meter box power increment and the corrected meter power increment; S3, Perform recursive least squares analysis on the meter box power increment and the corrected meter power increment of all meters under the meter box. The calculation process yields an information matrix, a parameter vector based on the diminishing memory recursive least squares method, and a parameter vector based on the quantum-inspired diminishing memory recursive least squares method. S4. Result Judgment and Screening: Stability is assessed based on the information matrix, the parameter vector based on the diminishing memory recursive least squares method, and the parameter vector based on the quantum-inspired diminishing memory recursive least squares method. If all three satisfy the stability criteria, the calculation result is deemed stable and reliable. S5. Inaccuracy Judgment: The obtained stable and reliable parameter vectors are subjected to inaccuracy judgment. The meter inaccuracy rate is calculated based on the parameter vectors. If the inaccuracy rate is within a preset inaccuracy threshold range, the meter is determined to be an accurate meter; otherwise, it is an inaccurate meter.

[0007] Preferably, step S2 involves performing dynamic line loss estimation, sampling time alignment, and filtering on the meter box data and the data of individual meters under the meter box to obtain the meter box power increment and the corrected meter power increment. This includes the following steps: S21, Dynamic line loss estimation: Based on the voltage difference between the meter box and the meter and the meter current, the equivalent impedance of the line before the meter is estimated, and then the dynamic line loss power is calculated; S22, Sampling time alignment: The meter power is time aligned and corrected so that the data within the same calculation period logically correspond to the same moment, and the corrected meter power data is obtained; S23, Sliding window filtering: The obtained meter box power data sequence and the obtained corrected meter power data sequence are subjected to sliding window filtering to obtain the meter box power increment and the corrected meter power increment.

[0008] Preferably, in S21, the formula for the equivalent impedance Z of the line before the meter includes: ,in, For meter box voltage, This is the meter voltage. For meter current; dynamic line loss. The calculation formula is: ,in, This is the sampling interval of the electricity meter.

[0009] Preferably, in step S22, the offset amount of the meter is first calculated using the following formula: ,in, This is the meter voltage. This is the meter current; The sampling time for electricity meter data. The sampling time for meter box data; based on the meter's offset power consumption. The final corrected meter reading is calculated using the following formula: ,in, This is the corrected meter reading. This refers to the dynamic line loss power.

[0010] Preferably, the formula for calculating the power increment in the m-th minute in S23 is: ,in, This represents the increase in the meter's battery level from minute m to minute m-wlen. The battery level in the meter box at minute m. This represents the battery level in the watch case at the m-wlen minute. This represents the corrected meter reading from minute m to minute m-wlen. This represents the meter reading after correction at minute m. This represents the meter reading after correction at minute m-wlen.

[0011] Preferably, S3 includes the following steps: S31, calculating the meter box power increment and the corrected meter power increment of all meters under the meter box based on the fading memory recursive least squares method, and obtaining a parameter vector; S32, after introducing quantum inspiration on the fading memory recursive least squares method, calculating the meter box power increment and the corrected meter power increment of all meters under the meter box, and obtaining a parameter vector based on the quantum-inspired fading memory recursive least squares method.

[0012] Preferably, in S31, the meter power increment is based on the correction of the m-th meter. The unbalance degree L is calculated using the following formula: ,in, Let N be the maximum corrected meter readings. Let L be the minimum corrected meter reading among N meters; when the imbalance degree L is less than a preset threshold, the load is considered extremely unbalanced, and the parameter estimation update formula is: ,in, The parameter vector when k is The parameter vector when k-1; For Kalman gain, The input vector for k corresponds to the corrected meter readings for all meters. The output vector for k corresponds to the increment of the meter's power.

[0013] Preferably, in S32, for the input vector Let the input vector without perturbation at time k be . We introduce a random perturbation vector to construct input vectors for M states, using the following formula: ,in, Let m be the input vector at time k and state m. Let be the random perturbation vector under state m, 1 ≤ m ≤ M, where M is the number of constructed states; the constructed M sets of candidate input vectors are: Referring to the S31 process, the corresponding M sets of calculation results are obtained, which are the M sets of perturbation parameter vectors: .

[0014] Preferably, S4 includes three stability criteria; all three criteria must be satisfied; Criterion 1: Pass through the information matrix To determine stability, calculate the confidence level for each meter. If the confidence level of meter i exceeds the confidence threshold, the result of meter i is considered stable. Criterion 2: Determine stability by analyzing the variation amplitude of the parameter vector based on the fading memory recursive least squares method in multiple calculations. Statistically analyze the parameter vector of meter i in the most recent n calculations based on the fading memory recursive least squares method, and calculate the fluctuation value of meter i. If the fluctuation value of meter i is less than the fluctuation value threshold, the result of meter i is considered stable; Criterion 3: judge whether it is stable by the change amplitude of the parameter vector based on the quantum-inspired fading memory recursive least squares method in the multiple calculation results, that is, in the constructed M states, compare whether the results of the M states at time k are stable.

[0015] This invention also discloses a meter misalignment judgment system based on recursive least squares method, used to implement any of the meter misalignment judgment methods based on recursive least squares method described above, including: a data acquisition module: used to acquire voltage and power data of the meter box and voltage, current and power data of all meters under each meter box; a data preprocessing module: used to preprocess the data collected from the meter box and each meter under the meter box; the preprocessing process includes: dynamic line loss estimation, sampling time alignment and filtering of the meter box data and the individual meter data under the meter box to obtain the meter box power increment and the corrected meter power increment; a recursive calculation module: used to calculate the meter box power increment and the meter power increment... The corrected meter readings of all meters under the box are recursively calculated to obtain an information matrix, a parameter vector based on the diminishing memory recursive least squares method, and a parameter vector based on the quantum-inspired diminishing memory recursive least squares method. The result discrimination module performs stability checks on the information matrix, the parameter vector based on the diminishing memory recursive least squares method, and the parameter vector based on the quantum-inspired diminishing memory recursive least squares method. If all three conditions are met, the calculation result is deemed stable and reliable. The inaccuracy discrimination module performs inaccuracy checks on the obtained stable and reliable parameter vectors, calculates the meter inaccuracy rate based on the parameter vectors, and determines the meter to be accurate if the inaccuracy rate is within a preset inaccuracy threshold range; otherwise, it is considered an inaccurate meter.

[0016] Beneficial effects: 1. This invention analyzes the data of all meters under the meter box, calculates parameter vectors based on the diminishing memory recursive least squares method and the quantum-inspired diminishing memory recursive least squares method respectively, and then judges stability, ensuring real-time performance while obtaining stable and reliable metering deviation judgment results; 2. This invention introduces dynamic line loss estimation and sampling time alignment in the data preprocessing stage, effectively reducing systematic errors introduced by line impedance and sampling delay; 3. This invention introduces quantum-inspired recursive least squares to improve detection accuracy in scenarios such as light load and intermittent inaccuracy; 4. This invention is deployed on the meter box side to realize direct data processing of all meters under the meter box, which has higher positioning accuracy and real-time performance compared with the substation-level model. Attached Figure Description

[0017] Figure 1 is a flowchart of the method in Embodiment 1 of the present invention; Figure 2 is a flowchart of the method in Embodiment 2 of the present invention; Figure 3 is a graph showing the change in electricity consumption of the meter in Embodiment 2 of the present invention; Figure 4 is a schematic diagram showing the change in ordinary RLS coefficients in Embodiment 2 of the present invention; Figure 5 is a schematic diagram showing the change in coefficients after adopting the method of the present invention in Embodiment 2 of the present invention. Detailed Implementation

[0018] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0019] Example 1: As shown in Figure 1, this example describes a meter malfunction judgment method based on recursive least squares, comprising the following steps: S1, Data Acquisition: Acquiring voltage and power data of the meter box, and acquiring voltage, current, and power data of all meters under each meter box; In this example, in the meter box-side acquisition unit, meter box data and data of all meters under the meter box are acquired at minute-level intervals, and the meter box voltage is defined as... The meter box power is The data sampling time of the meter box is The meter voltage is The meter current is The meter reading is The meter data sampling time is S2. Data Preprocessing: Data preprocessing is performed on the data collected from the meter box and each meter under the meter box. The preprocessing process includes: dynamic line loss estimation, sampling time alignment, and filtering of the meter box data and the data of individual meters under the meter box to obtain the meter box power increment and the corrected meter power increment. This includes the following steps: S21. Dynamic Line Loss Estimation: Based on the voltage difference between the meter box and the meter and the meter current, the equivalent impedance Z of the line before the meter is estimated. The estimation formula for the equivalent impedance Z of the line before the meter is: The dynamic line loss during the sampling period is calculated based on the equivalent impedance Z of the line before the meter. , The calculation formula is: ,in, This is the sampling interval for the electricity meter, which is usually set to 1 minute by default.

[0020] S22. Sampling time alignment: Due to the offset between the sampling time of the meter box and the meter, the meter's power consumption is time aligned and corrected by using the time difference between adjacent sampling points and the power consumption increment, so that the data within the same calculation cycle logically correspond to the same moment.

[0021] ,in, This refers to the offset of the electricity meter; based on the offset of the electricity meter... The final corrected meter reading is calculated using the following formula: ,in, This is the corrected meter reading.

[0022] S23. Sliding window filtering: Perform sliding window filtering on the meter box power data sequence obtained in S1 and the corrected meter power data sequence obtained in S22 to obtain the meter box power increment and the corrected meter power increment.

[0023] In this embodiment, a sliding window of length wLen is used to smooth the corrected instantaneous power consumption, thereby reducing the impact of sampling noise on subsequent calculations and further reducing the noise ratio.

[0024] For the meter box power data sequence of n sampling points: And the corrected electricity meter data sequence with n sampling points: The following formula is used to calculate the increase in battery power in the m-th minute: ,in, This represents the increase in the meter box's power level from minute m to minute m-wlen, specifically the cumulative increase in power level from minute m to minute m-wlen, calculated at minute m. The battery level in the meter box at minute m. This represents the battery level in the watch case at the m-wlen minute. This represents the corrected meter reading from minute m to minute m-wlen, which is the cumulative corrected meter reading from minute m to minute m-wlen calculated at minute m. This represents the meter reading after correction at minute m. S3. The meter reading is corrected at the m-wlen minute. S4. The meter box reading increment and the corrected meter reading increment of all meters under the meter box are recursively calculated to obtain the information matrix, the parameter vector based on the fading memory recursive least squares method, and the parameter vector based on the quantum-inspired fading memory recursive least squares method. S3 includes the following steps: S31. The meter box reading increment and the corrected meter reading increment of all meters under the meter box are calculated based on the fading memory recursive least squares method to obtain the parameter vector. In each sampling period, the meter box reading increment and the corrected meter reading increment of all meters under the meter box are used to update the metering deviation parameters of each meter online using the fading memory recursive least squares method, which is the parameter vector based on the fading memory recursive least squares method.

[0025] S31 includes the following steps: S311. Consider a linear regression problem, the goal of which is to estimate the parameter vector. This makes the output vector observed at time k... With input vector satisfy: ,in, To observe the noise, The input vector for k corresponds to the corrected meter readings for all meters. The output vector for k corresponds to the meter's charge increment. The parameter vector for time k corresponds to the coefficients of all meters. The goal of the diminishing memory recursive least squares method is to update the parameter vector over time. This minimizes the cumulative weighted squared error. Gradual decay (exponential decay) memory introduces a forgetting factor. Historical data is decayed with an exponential weight, enhancing the ability to respond to new data.

[0026] S312. Construct a cost function with a forgetting factor; define the weighted squared error cost function at time k as follows: ,in, Let be the output vector in the i-th iteration. Let be the input vector in the i-th iteration. Let k be the parameter vector in the i-th iteration, where 1 ≤ i ≤ k; . It degenerates into ordinary cumulative least squares, i.e., without a forgetting factor. Smaller The value assigns higher weight to recent samples. Let be the forgetting factor in the ki-th iteration, corresponding to different forgetting factors in time steps 1 to k. The historical data is preserved through the weighted squared error cost function.

[0027] S313, Construct the recurrence formula; Let Let be the information matrix at time k, also known as the covariance matrix. Its estimation formula is as follows: Based on matrix inequalities and the Sherman–Morrison formula, the following recursive updates can be obtained: (1) Kalman gain The formula for calculating the gain vector is: ,in, For the Kalman gain at time k, For the information matrix at time k-1, (2) The parameter estimation update formula is: where k is the forgetting factor at time k; ,in, The parameter vector is k-1; (3) The estimation and update formula for the information matrix is: ,in, Let be the information matrix at time k-1.

[0028] S314. The meter power increment based on the correction of the m-th meter. The unbalance degree is calculated, and a parameter update suppression mechanism based on load unbalance is constructed accordingly. This step mainly addresses the situation where the calculation effect is poor under light load. When the load is unbalanced or the power consumption is close to zero, the contribution of a single sample data to the identification of the metering deviation parameter decreases significantly. To avoid misjudgment under this condition, this invention uses the load unbalance degree index to suppress and control the parameter update process.

[0029] Based on the meter power increment after correction for the m-th meter The unbalance degree L is calculated using the following formula: ,in, Let N be the maximum corrected meter readings. Let L be the minimum corrected meter reading among N meters. When the imbalance degree L is less than a preset threshold (i.e., L < 0.2 in this embodiment), the load is considered extremely unbalanced. Then, a new variable is added to the parameter estimation update formula. : The parameter estimation update formula is modified as follows: This is used to reduce the impact of imbalanced data.

[0030] S32. Based on the diminishing memory recursive least squares method, quantum inspiration is introduced to calculate the increment of electricity in the meter box and the corrected increment of electricity in all meters under the meter box, obtaining the parameter vector based on the quantum-inspired diminishing memory recursive least squares method. Since in actual calculations, it often gets stuck in local optima or there are two or more solutions with similar results, the quantum-inspired recursive least squares method is introduced to increase the randomness of its state, simulating the output results under various slight perturbation states to determine the reliability of the final output result.

[0031] Therefore, based on S31, by introducing noise, multiple states are constructed and independent calculations are performed to realize quantum-inspired recursive least squares.

[0032] For the input vector Let the input vector without perturbation at time k be . We introduce a random perturbation vector to construct input vectors for M states, using the following formula: ,in, Let m be the input vector at time k and state m. Let m be a random perturbation vector with zero mean and finite variance in state m, used to simulate potential noise or model uncertainty. 1 ≤ m ≤ M, where M is the number of constructed states.

[0033] The constructed M candidate input vectors are: .

[0034] in, The construction of satisfies the following constraints: ,in, This indicates that the mean is 0 and the standard deviation is 0. The normal distribution is TH; TH is the maximum sampling accuracy error in the actual sampling process.

[0035] Each iteration introduces a corresponding perturbation, and finally, referring to process S31, we can obtain the corresponding M sets of calculation results, i.e., the parameter vector after M perturbations: It is also based on the parameter vector of the quantum-inspired diminishing memory recursive least squares method.

[0036] S4. Result Judgment and Screening: Stability is assessed based on the information matrix, the parameter vector of the fading memory recursive least squares method, and the parameter vector of the quantum-inspired fading memory recursive least squares method. The calculation result is considered stable and reliable only if all three criteria are met. In this invention, the output result needs to be judged for both stability and convergence. Only after convergence is the calculation result considered stable and usable. Three criteria are used to determine its stability.

[0037] Criterion 1: Through the information matrix To determine if the system is stable, a confidence level is calculated for each meter using the following formula: ,in, Let i be the confidence level of meter i. Information matrix The value in the i-th row and i-th column also corresponds to the coefficient of meter i; if the confidence level of meter i exceeds the confidence level threshold, that is, in this embodiment, when At that time, the result of meter i was considered to be relatively stable.

[0038] Criterion 2: Determine whether the parameter vector based on the diminishing memory recursive least squares method changes in the results of multiple calculations to determine its stability.

[0039] The parameter vector of meter i in the most recent n times based on the fading memory recursive least squares method. Calculate its extreme values: ,in, The maximum value of the parameter vector of meter i in the most recent n iterations using the fading memory recursive least squares method. Let the minimum value of the parameter vector of meter i be obtained from the n most recent iterations using the recursive least squares method based on diminishing memory; then calculate the fluctuation value of meter i. The calculation formula is: If the fluctuation value of meter i is less than the fluctuation value threshold, that is, in this embodiment, if At that time, the result of meter i was considered to be relatively stable.

[0040] Criterion 3: Determine stability by examining the magnitude of changes in the parameter vector based on the quantum-inspired fading memory recursive least squares method across multiple calculations. Specifically, compare the results of the M constructed states at time k to see if they are stable. The stability assessment process is the same as Criterion 2 and will not be elaborated upon here.

[0041] Based on the quantum-inspired recursion, the M sets of calculation results obtained by adding perturbation Then, according to criterion 2, for each meter, we statistically analyze its distribution in the M group results and obtain its corresponding fluctuation value. If the fluctuation value is <0.01, the result of meter i is considered to be relatively stable.

[0042] All three criteria must be met simultaneously for the calculation result to be considered stable and reliable.

[0043] S5. Inaccuracy Judgment: The obtained stable and reliable parameter vector is used to determine inaccuracy. The meter inaccuracy rate is calculated based on the parameter vector. If the inaccuracy rate is within the preset inaccuracy threshold range, the meter is determined to be an accurate meter; otherwise, it is an inaccurate meter.

[0044] After the results are judged and filtered in S4, if the calculation results are determined to be stable and reliable, then the parameter vector based on the diminishing memory recursive least squares method and the parameter vector based on the quantum-inspired diminishing memory recursive least squares method are consistent, and inaccuracy can be judged in S5. Each value in the parameter vector corresponds to the coefficient of a meter, denoted as the coefficient of meter i. The formula for calculating the inaccuracy rate of meter i is: ,in, Let i be the inaccuracy rate of meter i; Let be the coefficient of meter i in the parameter vector.

[0045] In this embodiment, the preset inaccuracy threshold range is within ±2%. That is, if the coefficient of a meter in the parameter vector is 1.05, the calculated inaccuracy rate is 1 - (1 / 1.05) = 0.048 = 4.8%, which means that the meter's measurement value is 4.8% less than the actual value. That is, for every 100 kWh of electricity used, only 95.2 kWh are measured, which exceeds the preset inaccuracy threshold range of ±2%. Therefore, the meter is determined to be inaccurate.

[0046] This invention further improves the detection capability under light load and intermittent operating conditions. On classical computing devices, it enhances the algorithm's ability to escape local minima through multiple candidate parameter states and an adaptive perturbation mechanism.

[0047] This invention provides a meter misalignment judgment system based on recursive least squares method, used to implement the meter misalignment judgment method based on recursive least squares method described above. This method is deployed in the meter box-side acquisition unit. Through high-time-resolution data acquisition and preprocessing of the meter box and its connected meters, the recursive least squares algorithm is used to estimate the meter measurement deviation online, thereby determining whether the meter has a measurement misalignment.

[0048] The system of the present invention mainly includes the following modules: 1) Data acquisition module: used to acquire the voltage and power data of the meter box and the voltage, current and power data of all meters under each meter box; deployed on the meter box side acquisition unit, used to periodically acquire the meter box voltage, power, sampling time, and the voltage, current, power, power and sampling time information of each connected meter.

[0049] 2) Data Preprocessing Module: This module preprocesses the data collected from the meter box and each meter under the meter box. The preprocessing process includes dynamic line loss estimation, sampling time alignment, and filtering of the meter box data and the data of individual meters under the meter box to obtain the meter box power increment and the corrected meter power increment. 3) Recursive Calculation Module: This module recursively calculates the meter box power increment and the corrected meter power increment of all meters under the meter box to obtain the information matrix, the parameter vector based on the fading memory recursive least squares method, and the parameter vector based on the quantum-inspired fading memory recursive least squares method.

[0050] 4) Result discrimination module: It is used to judge the stability of the information matrix, the parameter vector based on the fading memory recursive least squares method and the parameter vector based on the quantum-inspired fading memory recursive least squares method. If all of them are satisfied, the calculation result is determined to be stable and reliable.

[0051] 5) Inaccuracy Detection Module: This module is used to determine the inaccuracy of the acquired stable and reliable parameter vectors. It calculates the meter's inaccuracy rate based on the parameter vectors. If the inaccuracy rate is within the preset inaccuracy threshold range, the meter is determined to be an accurate meter; otherwise, it is an inaccurate meter.

[0052] Example 2: This example verifies the meter miscalculation calculation method based on the diminishing memory recursive least squares method of the present invention, including the following steps: Step 1: Set up a laboratory environment, including 2 miscalculated meters, 1 normal meter with low power consumption, and 3 normal meters, and collect minute-level data from the meter box and the meters. To adjust different miscalculation coefficients, multiple test data collections are performed in this example.

[0053] Step 2: The collected raw data is calculated using two methods: ordinary RLS, i.e., the existing recursive least squares method and the method in this invention. The calculation process of this invention is shown in Figure 2. The recursive least squares method based on diminishing memory is abbreviated as FMRLS, and the recursive least squares method based on quantum-inspired diminishing memory is abbreviated as QITLS.

[0054] Step 3: As shown in Figures 3 and 5, Figure 3 is a graph of electricity consumption changes, with six colored lines representing six meters. Figures 4 and 5 show meters of the same color as those in Figure 3, including two inaccurate meters, one normal meter with low electricity consumption, and three normal meters. From the electricity consumption change graph, it can be seen that meter 1, corresponding to the bottom line, is a normal meter with low electricity consumption. However, in Figure 3, inaccurate meters cannot be identified. When using ordinary RLS for processing, as shown in Figure 4, it can be observed that ordinary RLS converges slightly faster, but the final result differs slightly and is unstable. When using the method of this invention, as shown in Figure 5, due to the reduced influence of unbalanced data, convergence is slightly slower, but the deviation is smaller and more stable. From Figures 4 and 5, it can be seen that a coefficient change value approaching 1 indicates that the meter is accurate; otherwise, it is an inaccurate meter. The coefficient change values ​​of meters 13 and 10 are both far from 1, indicating that they are two inaccurate meters.

[0055] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus a general-purpose hardware platform. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This computer software product can be stored in a storage medium. The memory can be various types of memory, such as random access memory, read-only memory, flash memory, etc., such as read-only memory (ROM) / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which can be a personal computer, server, or network communication device such as a router) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0056] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for judging meter inaccuracy based on recursive least squares, characterized in that: The method includes the following steps: S1. Data Acquisition: Acquire voltage and power data of the meter box, and acquire voltage, current and power data of all meters under each meter box; S2. Data preprocessing: Data preprocessing is performed on the data collected from the meter box and each meter under the meter box. The preprocessing process includes: S3, performing dynamic line loss estimation, sampling time alignment, and filtering on the meter box data and the data of individual meters under the meter box to obtain the meter box power increment and the corrected meter power increment; S4, recursively calculating the meter box power increment and the corrected meter power increment of all meters under the meter box to obtain the information matrix, the parameter vector based on the fading memory recursive least squares method, and the parameter vector based on the quantum-inspired fading memory recursive least squares method; S5, result discrimination and screening: performing stability judgment on the information matrix, the parameter vector based on the fading memory recursive least squares method, and the parameter vector based on the quantum-inspired fading memory recursive least squares method respectively, and determining the calculation result to be stable and reliable if all of them are satisfied; S6, inaccuracy judgment: performing inaccuracy judgment on the obtained stable and reliable parameter vector, calculating the meter inaccuracy rate based on the parameter vector, if the inaccuracy rate is within the preset inaccuracy threshold range, the meter is determined to be an accurate meter, otherwise it is an inaccurate meter.

2. The meter misalignment judgment method based on recursive least squares method according to claim 1, characterized in that: S2 performs dynamic line loss estimation, sampling time alignment, and filtering on the meter box data and the data of individual meters under the meter box to obtain the meter box power increment and the corrected meter power increment. This includes the following steps: S21, Dynamic Line Loss Estimation: Based on the voltage difference between the meter box and the meter and the meter current, the equivalent impedance of the line before the meter is estimated, and then the dynamic line loss power is calculated; S22, Sampling Time Alignment: The meter power data is time aligned to ensure that the data within the same calculation period logically correspond to the same moment, and the corrected meter power data is obtained; S23, Sliding Window Filtering: The obtained meter box power data sequence and the obtained corrected meter power data sequence are subjected to sliding window filtering to obtain the meter box power increment and the corrected meter power increment.

3. The meter misalignment judgment method based on recursive least squares method according to claim 2, characterized in that: In S21, the formula for the equivalent impedance Z of the line before the table includes: ,in, For meter box voltage, This is the meter voltage. For meter current; dynamic line loss. The calculation formula is: ,in, This is the sampling interval of the electricity meter.

4. The meter misalignment judgment method based on recursive least squares method according to claim 2, characterized in that: In S22, the meter's offset amount is first calculated using the following formula: ,in, This is the meter voltage. This is the meter current; The sampling time for electricity meter data. The sampling time for meter box data; based on the meter's offset power consumption. The final corrected meter reading is calculated using the following formula: ,in, This is the corrected meter reading. This refers to the dynamic line loss power.

5. The meter misalignment judgment method based on recursive least squares method according to claim 2, characterized in that: The formula for calculating the electricity increment in the m-th minute in S23 is: ,in, This represents the increase in the meter's battery level from minute m to minute m-wlen. The battery level in the meter box at minute m is... This represents the battery level in the watch case at the m-wlen minute. This represents the corrected meter reading from minute m to minute m-wlen. This represents the meter reading after correction at minute m. This represents the meter reading after correction at minute m-wlen.

6. The meter misalignment judgment method based on recursive least squares method according to claim 1, characterized in that: S3 includes the following steps: S31. Calculate the power increment of the meter box and the corrected power increment of all meters under the meter box based on the gradually diminishing memory recursive least squares method, and obtain the parameter vector; S32. Based on the gradually diminishing memory recursive least squares method, after introducing quantum inspiration, calculate the power increment of the meter box and the corrected power increment of all meters under the meter box, and obtain the parameter vector based on the quantum-inspired gradually diminishing memory recursive least squares method.

7. The meter misalignment judgment method based on recursive least squares method according to claim 6, characterized in that: S31 is based on the meter power increment after correction for the m-th meter. The unbalance degree L is calculated using the following formula: ,in, Let N be the maximum corrected meter readings. Let L be the minimum corrected meter reading among N meters; when the imbalance degree L is less than the preset threshold, the load is considered extremely unbalanced, and the parameter estimation update formula is: ,in, The parameter vector when k is The parameter vector when k-1; For Kalman gain, The input vector for k corresponds to the corrected meter readings for all meters. The output vector for k corresponds to the increment of the meter's power.

8. The meter misalignment judgment method based on recursive least squares method according to claim 6, characterized in that: In S32, for the input vector Let the input vector without perturbation at time k be . We introduce a random perturbation vector to construct input vectors for M states, using the following formula: ,in, Let m be the input vector at time k and state m. Let be the random perturbation vector under state m, 1 ≤ m ≤ M, where M is the number of constructed states; the constructed M sets of candidate input vectors are: Referring to the S31 process, the corresponding M sets of calculation results are obtained, which are the M sets of perturbation parameter vectors: 。 9. The meter misalignment judgment method based on recursive least squares method according to claim 1, characterized in that: S4 includes three stability criteria; all three criteria must be satisfied; Criterion 1: Pass through the information matrix Determine whether it is stable; calculate the confidence level for each meter. If the confidence level of meter i exceeds the confidence threshold, the result of meter i is considered stable; Criterion 2: determine whether it is stable by the change amplitude of the parameter vector based on the fading memory recursive least squares method in the results of multiple calculations. Calculate the fluctuation value of meter i by analyzing the parameter vectors of meter i from the most recent n times using the recursive least squares method based on diminishing memory. If the fluctuation value of meter i is less than the fluctuation value threshold, the result of meter i is considered stable; Criterion 3: judge whether it is stable by the change amplitude of the parameter vector based on the quantum-inspired fading memory recursive least squares method in the multiple calculation results, that is, in the constructed M states, compare whether the results of the M states at time k are stable.

10. A meter malfunction judgment system based on recursive least squares method, used to implement the meter malfunction judgment method based on recursive least squares method as described in any one of claims 1-9, characterized in that, include: Data acquisition module: used to acquire voltage and power data of the meter box, as well as voltage, current and power data of all meters under each meter box; Data preprocessing module: This module is used to preprocess the data collected from the meter box and each meter under the meter box. The preprocessing process includes: dynamic line loss estimation, sampling time alignment, and filtering of the meter box data and the individual meter data under the meter box to obtain the meter box power increment and the corrected meter power increment; The recursive calculation module is used to recursively calculate the power increment of the meter box and the corrected power increment of all meters under the meter box, obtaining an information matrix, a parameter vector based on the fading memory recursive least squares method, and a parameter vector based on the quantum-inspired fading memory recursive least squares method. The result discrimination module is used to perform stability judgments on the information matrix, the parameter vector based on the fading memory recursive least squares method, and the parameter vector based on the quantum-inspired fading memory recursive least squares method. If all of them are satisfied, the calculation result is determined to be stable and reliable. The inaccuracy judgment module is used to judge the inaccuracy of the obtained stable and reliable parameter vectors, calculate the meter inaccuracy rate based on the parameter vectors, and if the inaccuracy rate is within the preset inaccuracy threshold range, the meter is determined to be an accurate meter; otherwise, it is an inaccurate meter.