A method and system for power quality monitoring based on smart meters

CN122307456APending Publication Date: 2026-06-30NANJING DIANRUN TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING DIANRUN TECH
Filing Date
2026-06-02
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

[0003]然而,在低压居民小区这类非线性负载高度集中的典型场景中,空调、家用充电桩、LED照明及小型光伏逆变器等设备的广泛应用,引发了以3、5、7次为主的高次谐波长期叠加现象(叠加次数不超过3次,谐波总含量最高达150%),这种谐波耦合效应不仅加剧了电网电压和电流波形的畸变,还直接导致总谐波畸变率计量值实际计量出现显著偏差,严重削弱了电能质量监测的准确性

Benefits of technology

本发明通过精细化的特征提取与监督型协方差矩阵的构建,有效地将电能表的谐波特征与计量偏差关联起来,形成一种能够自适应调整的监测机制,显著提高电能质量的测量精度。其核心在于通过精准模拟谐波组合,获取电能表在不同谐波环境下的动态响应,从而构建包含丰富信息的特征矩阵。利用监督学习的技术,结合计量偏差,获取自适应平衡系数,使得在谐波特征相关性强时,能够动态调整对计量偏差的重视程度,有效避免了因特征间重复计算而引起的误差。最终,基于优化的目标投影矩阵,采用稳健线性回归拟合计量偏差补正函数,在实际应用中,能够通过待检测电能表的谐波特征精准预测其计量偏差,从而为电力系统的质量监测提供了科学合理的补正依据,保障了电力计量的准确性和稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122307456A_ABST
    Figure CN122307456A_ABST
Patent Text Reader

Abstract

This invention relates to the field of power quality monitoring, and more particularly to a method and system for power quality monitoring based on smart meters. The method includes: acquiring the feature vector of any power meter, constructing a feature matrix, constructing a deviation matrix from the metering deviations of all power meters, and constructing a supervised covariance matrix based on the feature matrix and the deviation matrix; randomly generating initial weights, calculating fitness values, iterating through the initial weights to obtain fitness values, stopping iteration when a preset number of iterations is reached, and using the metering deviation correction function corresponding to the maximum fitness value as the optimal function; converting the feature vector of the power meter under test into a deviation value, and obtaining the metering deviation correction value by inputting the optimal function based on the feature vector. The technical solution of this invention can improve the accuracy of power meter quality inspection and monitoring results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power quality monitoring. In particular, it relates to a method and system for power quality monitoring based on a smart meter. Background Technology

[0002] As the core equipment for power quality monitoring, the monitoring accuracy of smart meters is crucial to ensuring the safe, stable and efficient operation of the power system. Among them, the total harmonic distortion rate (THD) measurement value is a key indicator for measuring the waveform distortion of periodic AC quantities, directly quantifying the degree to which harmonic components cause the waveform to deviate from the standard sine wave.

[0003] However, in typical scenarios such as low-voltage residential communities where nonlinear loads are highly concentrated, the widespread use of equipment such as air conditioners, home charging piles, LED lighting, and small photovoltaic inverters has led to a long-term superposition of high-order harmonics, mainly the 3rd, 5th, and 7th harmonics (with the superposition number not exceeding 3 and the total harmonic content reaching up to 150%). This harmonic coupling effect not only exacerbates the distortion of the grid voltage and current waveforms but also directly causes significant deviations in the actual measurement of the total harmonic distortion rate, severely weakening the accuracy of power quality monitoring.

[0004] In existing technologies, smart meters often use the traditional PCA algorithm for data processing to achieve total harmonic distortion rate (THD) measurement correction. However, as an unsupervised dimensionality reduction method, this algorithm cannot establish a direct correlation mechanism with the measurement deviation and does not fully consider the dynamic coupling characteristics of "multiple harmonic superposition". This results in insufficient correction accuracy in complex harmonic environments and makes it difficult to effectively cope with the challenges brought by harmonic interactions in actual power grids. Summary of the Invention

[0005] To address the aforementioned technical problems, the present invention provides solutions in the following aspects.

[0006] In the first aspect, a power quality monitoring method based on a smart meter includes: acquiring the preset harmonic amplitude and metering deviation of any power meter; constructing a feature vector based on the preset harmonic amplitude; constructing a feature matrix from the feature vectors of all power meters; constructing a deviation matrix from the metering deviations of all power meters; constructing a supervised covariance matrix based on the feature matrix and the deviation matrix; randomly generating initial weights; weighting the supervised covariance matrix using the initial weights to obtain a weighted covariance matrix; obtaining a target projection matrix based on the projection matrix and the weighted covariance matrix in the PCA algorithm; and using the target projection... The matrix transforms the feature vector of any energy meter into a deviation-based feature. A robust linear regression is used to fit the deviation-based feature and the metering deviation to obtain a metering deviation correction function, thus obtaining the metering deviation correction value for any energy meter. Based on the metering deviation correction value and the metering deviation, a fitness value is calculated. Initial weights are iterated, and fitness values ​​are obtained through iteration. Iteration stops when a preset number of iterations is reached. The metering deviation correction function corresponding to the maximum fitness value is taken as the optimal function. The feature vector of the energy meter to be tested is transformed into a deviation-based feature and input into the optimal function to obtain the metering deviation correction value, thus completing the quality monitoring.

[0007] Preferably, the construction of the supervised covariance matrix based on the feature matrix and the deviation matrix includes: taking the covariance between the feature matrix and the feature matrix as the first covariance, and taking the covariance between the feature matrix and the deviation matrix as the second covariance; calculating the first product between the second covariance and the transpose of the second covariance, calculating the variance of the deviation matrix, and calculating the first ratio of the first product to the variance; obtaining the adaptive balance coefficient, and calculating the second product of the adaptive balance coefficient and the first ratio; and taking the sum of the first covariance and the second product as the supervised covariance matrix.

[0008] Preferably, the adaptive balance coefficient includes: using the trace of the first covariance as the first trace, using the trace of the first ratio as the second trace, and using the ratio of the first trace to the second trace as the adaptive balance coefficient.

[0009] Preferably, obtaining the weighted covariance matrix includes: taking the elements in the supervised covariance matrix that are affected by both double coupling and triple coupling as elements to be weighted, randomly generating an initial weight for any element to be weighted; and multiplying the element to be weighted by the corresponding initial weight to obtain the weighted covariance matrix.

[0010] Preferably, obtaining the target projection matrix includes: obtaining a number of projection matrices in the PCA algorithm; for any projection matrix, calculating the transpose of the projection matrix; calculating the third product of the projection matrix, the transpose of the projection matrix, and the weighted covariance matrix; comparing the third products of all projection matrices; and selecting the projection matrix corresponding to the maximum value of the third product as the target projection matrix.

[0011] Preferably, the step of converting the feature vector of any energy meter into a deviation basis feature using the target projection matrix includes: using the product of the transpose of the target projection matrix and the feature vector of any energy meter as the deviation basis feature of any energy meter.

[0012] Preferably, the fitness value calculation includes: for any energy meter, calculating the square of the difference between the metering deviation correction value and the metering deviation; calculating the mean of the squares of the differences of all energy meters, and taking the reciprocal of the sum of the mean and 1 as the fitness value.

[0013] Secondly, a power quality monitoring system based on a smart meter includes: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a power quality monitoring method based on a smart meter as described in any one of the claims is implemented.

[0014] The present invention has the following effects: This invention effectively correlates the harmonic characteristics of electricity meters with metering deviations through refined feature extraction and the construction of a supervised covariance matrix, forming an adaptive monitoring mechanism that significantly improves the measurement accuracy of power quality. Its core lies in accurately simulating harmonic combinations to obtain the dynamic response of electricity meters under different harmonic environments, thereby constructing a feature matrix rich in information. Utilizing supervised learning techniques, combined with metering deviations, an adaptive balance coefficient is obtained. This allows for dynamic adjustment of the emphasis on metering deviations when harmonic features are highly correlated, effectively avoiding errors caused by redundant calculations between features. Finally, based on an optimized target projection matrix, a robust linear regression is used to fit the metering deviation correction function. In practical applications, this can accurately predict the metering deviation of the electricity meter under test through its harmonic characteristics, thus providing a scientific and reasonable correction basis for power system quality monitoring and ensuring the accuracy and stability of power metering. Attached Figure Description

[0015] Figure 1 This is a flowchart of a power quality monitoring method based on a smart meter according to an embodiment of the present invention. Detailed Implementation

[0016] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0017] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0018] Reference Figure 1 A power quality monitoring method based on a smart meter includes steps S1-S4, as detailed below: S1: Obtain the preset subharmonic amplitude and metering deviation of any electricity meter, construct a feature vector based on the preset subharmonic amplitude, construct a feature matrix from the feature vectors of all electricity meters, construct a deviation matrix from the metering deviation of all electricity meters, and construct a supervised covariance matrix based on the feature matrix and the deviation matrix.

[0019] In one embodiment, a preset number of brand-new smart energy meters of the same model (used for no more than one month, with negligible cumulative losses) are selected, and a multi-harmonic precision output device is used to accurately simulate seven typical harmonic combinations, including single harmonic groups, pairwise coupling groups, and three coupling groups. The number of superpositions is no more than three, the amplitude of unparticipated harmonics is set to 0V, and the total harmonic content is strictly no more than 150%. Under each harmonic combination, the device runs continuously and stably for 30 minutes (to fully capture steady-state and transient responses), and a set of data is collected synchronously every 100 milliseconds to ensure that the sample fully covers the dynamic characteristics of harmonic coupling.

[0020] The collected data includes: the amplitude of the third harmonic, the amplitude of the fifth harmonic, the amplitude of the seventh harmonic, the original total harmonic distortion rate (THD) measurement value of the electricity meter, and the standard value of the THD standard value of the standard calibration device.

[0021] The difference between the original total harmonic distortion (THD) measurement value of the electricity meter and the standard THD value of the standard calibration device is taken as the measurement deviation.

[0022] Based on a preset subharmonic amplitude, a feature vector is constructed. The feature vector of any energy meter can be expressed by the following formula: , Indicates electricity meter eigenvectors, Indicates the amplitude of the third harmonic. Indicates the amplitude of the fifth harmonic. Indicates the amplitude of the seventh harmonic. This indicates the coupling characteristics between the amplitudes of the third and fifth harmonics. This indicates the coupling characteristics between the third and seventh harmonic amplitudes. This indicates the coupling characteristics between the amplitudes of the fifth and seventh harmonics. This indicates the coupling characteristics of the third, fifth, and seventh harmonic amplitudes.

[0023] For example, This is obtained by multiplying the amplitude of the third harmonic by the amplitude of the fifth harmonic. It is used to characterize the coupling strength between the amplitudes of the third and fifth harmonics, showing that the larger the harmonic amplitude, the greater the mutual interference strength. The other three coupling strengths... Similarly.

[0024] The eigenvectors of all electricity meters are used to construct an eigenma matrix, which is an N-row, 7-column matrix where N represents the total number of electricity meters. The metering deviations of all electricity meters are also used to construct a deviation matrix, which is an N-row, 1-column matrix where N represents the total number of electricity meters.

[0025] The covariance between the feature matrices is taken as the first covariance, and the covariance between the feature matrix and the bias matrix is ​​taken as the second covariance. The first product of the second covariance and its transpose is calculated, the variance of the bias matrix is ​​calculated, and the first ratio of the first product to the variance is calculated. Adaptive balance coefficients are obtained, and the second product of the adaptive balance coefficients and the first ratio is calculated. The sum of the first and second products is taken as the supervised covariance matrix. The adaptive balance coefficients include: the trace of the first covariance is taken as the first trace, the trace of the first ratio is taken as the second trace, and the ratio of the first trace to the second trace is taken as the adaptive balance coefficient.

[0026] It should be explained that the first covariance is the autocovariance matrix, which is a 7x7 matrix; the second covariance is the cross covariance matrix, which is a 7x1 matrix. Therefore, the transpose of the second covariance is a 1x7 matrix. The variance of the deviation matrix is ​​used for standardization to eliminate the dimensional interference of the fluctuation range of the measurement deviation matrix on the cross covariance matrix, and to reduce the cross covariance term to a certain extent when the measurement deviation fluctuation is large, so as to avoid the proportion being too high.

[0027] The construction logic of supervised covariance matrix: The design of supervised covariance matrix is ​​essentially to combine the dimensionality reduction process of traditional PCA (Principal Component Analysis) with econometric bias. Its core formula integrates the autocovariance matrix and the standardized cross covariance matrix. The standardized cross covariance matrix is ​​the result of the second product, which realizes the dual optimization of "feature intrinsic correlation" and "bias guidance". Traditional PCA only performs dimensionality reduction based on the autocovariance matrix of the feature matrix (without supervised terms), which cannot ensure that the dimensionality reduction result is related to the econometric bias correction target.

[0028] This invention innovatively introduces a supervisory term, where the adaptive balance coefficient is dynamically adjusted by calculating the ratio of the trace of the self-covariance matrix to the trace of the standardized cross-covariance matrix. This ensures that when the internal correlation of harmonic features is strong, the weight of the supervisory term is automatically increased, preventing the bias correlation from being masked. The cross-covariance term, after being processed by the standardization of the measurement bias variance, not only eliminates dimensional interference but also intelligently adjusts the supervisory strength according to the deviation fluctuation amplitude (reducing the proportion of the cross term when the deviation fluctuation is large, and increasing it when it is small). This calculation method gives the matrix elements clear physical meaning: the diagonal elements of the matrix represent the independent contribution of the sum of the fluctuation intensity of a single harmonic feature to the measurement bias, while the off-diagonal elements quantify the synergistic effect of the inherent coupling correlation between harmonic features on the measurement bias.

[0029] S2: Randomly generate initial weights, use the initial weights to weight the supervised covariance matrix to obtain the weighted covariance matrix, and obtain the target projection matrix based on the projection matrix and weighted covariance matrix in the PCA algorithm.

[0030] It should be noted that there is a key issue to be addressed when constructing the supervised covariance matrix: the bi-coupling features and tri-coupling features contained in the eigenvectors have a mathematically derived relationship—the tri-coupling feature is essentially a direct product of the three harmonic amplitudes, while the bi-coupling feature is a partial product term. This inherent mathematical relationship leads to overlap and repeated calculations in contribution determination when analyzing the impact of these features on measurement bias during the calculation of the covariance matrix, causing distortion in the weighting of the coupling effect during the dimensionality reduction process.

[0031] To address this issue, it is necessary to weight the key elements in the covariance matrix that characterize the combined influence of bivariate and trivariate coupling on measurement bias. Specifically, due to the symmetry of the supervised covariance matrix, the elements in the 7th row and 4th column, 7th row and 5th column, and 7th row and 6th column, as well as their symmetrical positions in the 4th row and 7th column, 5th row and 7th column, and 6th row and 7th column, need to be weighted simultaneously. Three adjustable weight coefficients are introduced as initial weights multiplied by the corresponding matrix elements. By reducing the numerical contribution of these specific elements, the repetitive influence between coupling features is effectively suppressed, ensuring that the dimensionality reduction process can accurately separate the independent contributions of different order harmonic couplings to measurement bias.

[0032] In one embodiment, the elements in the supervised covariance matrix that are affected by both double coupling and triple coupling are taken as elements to be weighted, and the initial weight of any element to be weighted is randomly generated; the element to be weighted is multiplied by the corresponding initial weight to obtain the weighted covariance matrix.

[0033] Obtain a number of projection matrices in the PCA algorithm. For any projection matrix, calculate the transpose of the projection matrix. Calculate the third product of the projection matrix, the transpose of the projection matrix, and the weighted covariance matrix. Compare the third products of all projection matrices and select the projection matrix corresponding to the maximum value of the third product as the target projection matrix.

[0034] Specifically, when constructing the supervised covariance matrix, the mathematical derivation relationship between the two-coupling features and the three-coupling features contained in the eigenvectors leads to an overlap in the calculation of their effects on measurement bias. Therefore, the key elements in the supervised covariance matrix that represent this overlap effect, namely the elements in the 7th row and 4th column, the 7th row and 5th column, and the 7th row and 6th column, and their symmetrical positions in the 4th row and 7th column, the 5th row and 7th column, and the 6th row and 7th column, should be used as elements to be weighted. For the elements to be weighted, three initial weights are randomly generated, with values ​​ranging from 0 to 1. By multiplying the elements to be weighted by the corresponding initial weights, a weighted covariance matrix is ​​constructed, effectively reducing the redundant effects between coupled features.

[0035] Multiple candidate projection matrices are generated using a genetic algorithm. For each projection matrix, its corresponding third product is calculated. The physical meaning of the third product is the comprehensive explanatory power of the projected features for measurement deviation. Finally, the projection matrix corresponding to the maximum value of the third product is selected as the target projection matrix because it can retain the key information of harmonic coupling to the greatest extent, while accurately capturing the independent contribution of different orders of harmonic coupling to measurement deviation, providing the optimal feature transformation basis for the subsequent construction of a high-precision measurement deviation correction model.

[0036] S3: Use the target projection matrix to convert the feature vector of any energy meter into deviation basis features. Based on robust linear regression, fit the deviation basis features and the metering deviation to obtain the metering deviation correction function, so as to obtain the metering deviation correction value of any energy meter. Calculate the fitness value based on the metering deviation correction value and the metering deviation. Iterate the initial weights and traverse to obtain the fitness value. Stop iterating when the number of iterations reaches the preset number. Take the metering deviation correction function corresponding to the maximum fitness value as the optimal function.

[0037] In one embodiment, the product of the transpose of the target projection matrix and the eigenvector of any energy meter is used as the deviation basis feature of any energy meter.

[0038] Specifically, the transpose of the target projection matrix obtained through genetic algorithm optimization in step S2 is multiplied by the eigenvector of any energy meter. The resulting product is the deviation feature of that energy meter. This transformation process essentially projects high-dimensional harmonic coupling features onto a low-dimensional space optimized by supervised learning, enabling the projected single-dimensional features to retain key information related to metering deviation to the greatest extent possible, while effectively suppressing repetitive interference caused by multiple harmonic couplings.

[0039] Based on robust linear regression technology, a set of fitted data is constructed by combining the deviation characteristics of any electricity meter with the corresponding true value of the metering deviation. Based on the fitted data of all electricity meters, a function is fitted to construct a metering deviation correction function. The metering deviation correction function can accurately predict the metering deviation correction value based on the transformed deviation characteristics of any electricity meter.

[0040] For any electricity meter, calculate the squared difference between the metering deviation correction value and the metering deviation; calculate the mean of the squared differences of all electricity meters, and use the reciprocal of the sum of the mean and 1 as the fitness value. Within the genetic algorithm framework, iteratively change the initial weights to obtain the weighted covariance matrix, projection matrix, deviation-based features, and metering deviation correction function for each iteration, and obtain the fitness value after each iteration; generate a new generation of population through selection, crossover, and mutation operations, repeatedly evaluate the fitness value, and iteratively optimize the initial weights until the preset number of iterations is reached. Finally, select the metering deviation correction function corresponding to the maximum fitness value as the optimal function.

[0041] S4: Convert the feature vector of the energy meter to be tested into the deviation based on the feature input optimal function to obtain the metering deviation correction value, and complete the quality monitoring.

[0042] In one embodiment, the feature vector of the energy meter to be tested is input into the optimal function obtained in step S3 to obtain the metering deviation correction value of the energy meter to be tested. The metering deviation correction value is added to the original total harmonic distortion rate measurement value of the energy meter to obtain the corrected metering deviation, thereby realizing high-precision monitoring of power quality.

[0043] The system includes a processor and a memory, the memory storing computer program instructions. When the computer program instructions are executed by the processor, they implement a power quality monitoring method based on a smart meter according to the first aspect of the present invention.

[0044] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.

[0045] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this patent application should be determined by the appended claims.

Claims

1. A power quality monitoring method based on a smart meter, characterized in that, include: Obtain the preset subharmonic amplitude and metering deviation of any electricity meter, construct a feature vector based on the preset subharmonic amplitude, construct a feature matrix from the feature vectors of all electricity meters, construct a deviation matrix from the metering deviation of all electricity meters, and construct a supervised covariance matrix based on the feature matrix and the deviation matrix. Initial weights are randomly generated, and the supervised covariance matrix is ​​weighted using the initial weights to obtain the weighted covariance matrix. The target projection matrix is ​​then obtained based on the projection matrix and the weighted covariance matrix in the PCA algorithm. The feature vector of any energy meter is converted into deviation basis feature using the target projection matrix. The deviation basis feature and the metering deviation are fitted based on robust linear regression to obtain the metering deviation correction function, so as to obtain the metering deviation correction value of any energy meter. The fitness value is calculated based on the metering deviation correction value and the metering deviation. The initial weight is iterated and the fitness value is obtained by traversing. The iteration stops when the number of iterations reaches the preset number. The metering deviation correction function corresponding to the maximum fitness value is taken as the optimal function. The feature vector of the electricity meter to be tested is converted into the deviation based on the feature input of the optimal function to obtain the metering deviation correction value, thus completing the quality monitoring.

2. The power quality monitoring method based on a smart meter according to claim 1, characterized in that, The construction of the supervised covariance matrix based on the feature matrix and the bias matrix includes: The covariance between the characteristic matrices is taken as the first covariance, and the covariance between the characteristic matrix and the bias matrix is ​​taken as the second covariance. Calculate the first product between the second covariance and the transpose of the second covariance, calculate the variance of the deviation matrix, and calculate the first ratio of the first product to the variance. Obtain the adaptive balance coefficient, and calculate the second product of the adaptive balance coefficient and the first ratio; The sum of the first covariance and the second product is used as the supervised covariance matrix.

3. The power quality monitoring method based on a smart meter according to claim 2, characterized in that, The adaptive balance coefficient includes: The trace of the first covariance is taken as the first trace, and the trace of the first ratio is taken as the second trace; The ratio of the first trace to the second trace is used as the adaptive balance coefficient.

4. The power quality monitoring method based on a smart meter according to claim 1, characterized in that, The obtained weighted covariance matrix includes: The elements in the supervised covariance matrix that are affected by both double coupling and triple coupling are taken as the elements to be weighted, and the initial weights of any element to be weighted are randomly generated. Multiply the elements to be weighted by their corresponding initial weights to obtain the weighted covariance matrix.

5. The power quality monitoring method based on a smart meter according to claim 1, characterized in that, The process of obtaining the target projection matrix includes: Obtain a number of projection matrices in the PCA algorithm, and for any projection matrix, calculate the transpose of the projection matrix; Calculate the third product of the projection matrix, the transpose of the projection matrix, and the weighted covariance matrix. Compare the third products of all projection matrices and select the projection matrix corresponding to the maximum value of the third product as the target projection matrix.

6. The power quality monitoring method based on a smart meter according to claim 1, characterized in that, The process of converting the feature vector of any electricity meter into a deviation feature using the target projection matrix includes: The product of the transpose of the target projection matrix and the eigenvector of any energy meter is used as the deviation basis feature of any energy meter.

7. The power quality monitoring method based on a smart meter according to claim 1, characterized in that, The calculation of fitness values ​​includes: For any electricity meter, calculate the square of the difference between the metering deviation correction value and the metering deviation. Calculate the mean of the squared differences of all electricity meters, and take the reciprocal of the sum of the mean and 1 as the fitness value.

8. A power quality monitoring system based on a smart meter, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement a power quality monitoring method based on a smart energy meter according to any one of claims 1-7.