Reactive power metering method suitable for nonlinear load

By acquiring electrical data under all operating conditions, extracting harmonic feature vectors, constructing a load classification model, and calling a dedicated correction model, the problem of decreased accuracy in nonlinear load metering was solved, achieving high-precision and reliable reactive power metering.

CN122000857APending Publication Date: 2026-05-08CHINA SOUTHERN POWER GRID COMPANY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA SOUTHERN POWER GRID COMPANY
Filing Date
2025-12-02
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing technologies suffer from a significant decrease in metering accuracy when faced with nonlinear loads. Traditional methods cannot accurately separate the reactive components of the fundamental wave and each harmonic, and intelligent metering methods lack consideration for the physical mechanism of the load, have insufficient generalization ability, and cannot form a closed loop for continuous optimization.

Method used

By acquiring electrical data under all operating conditions, extracting harmonic feature vectors, constructing a load classification model, calling a dedicated load correction model to calculate high-precision reactive power, and combining it with general reactive power values, accurate metering of nonlinear loads can be achieved.

Benefits of technology

It improves the accuracy and stability of reactive power metering for nonlinear loads, has the ability to identify and dynamically adapt to new types of loads, and ensures the reliability and continuity of metering results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122000857A_ABST
    Figure CN122000857A_ABST
Patent Text Reader

Abstract

The invention discloses a reactive power metering method suitable for a nonlinear load, and belongs to the technical field of power grid metering, and the method comprises the steps: obtaining all-condition electrical data, and obtaining a load harmonic feature vector data set based on the all-condition electrical data; constructing a load classification model based on the load harmonic feature vector data set; acquiring a real-time feature vector based on the current operation data; obtaining a load type based on the real-time feature vector and a load classification model; inputting the real-time feature vectors into the exclusive load correction model to obtain equivalent circuit parameters; obtaining a virtual optimal circuit structure based on equivalent circuit parameters, and obtaining a high-precision reactive power value; acquiring a universal reactive value based on the real-time feature vector and a universal reactive correction model; and obtaining a nonlinear load reactive power calculation result based on the high-precision reactive power value and the general reactive power value. According to the reactive power metering method suitable for the non-linear load disclosed by the invention, the accuracy and the stability of the reactive power metering of the non-linear load are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power grid metering technology, and in particular to a reactive power metering method suitable for nonlinear loads. Background Technology

[0002] With the widespread application of nonlinear loads such as power electronic devices in power systems, the harmonics and distortion currents they generate pose a serious challenge to traditional reactive power metering methods. When dealing with such nonlinear loads, traditional metering theories based on the sine wave assumption and fixed compensation algorithms relying on Fourier transforms often fail to accurately separate the reactive components of the fundamental wave and each harmonic, and they also ignore the unique nonlinear characteristics of different loads, leading to a significant decrease in metering accuracy.

[0003] While some existing smart metering methods attempt to use machine learning models for correction, most rely on general "black box" models, lacking consideration of the physical mechanisms of the load. When faced with unknown or complex loads, they suffer from insufficient generalization ability, poor interpretability, and an inability to form a closed loop for continuous optimization. Therefore, developing a high-precision reactive power metering method capable of accurately identifying load types, adaptively correcting errors, and possessing continuous learning capabilities has become a key requirement for refined metering and management of smart grids. Summary of the Invention

[0004] This invention provides a reactive power metering method suitable for nonlinear loads, which can solve the technical problem that the metering accuracy drops significantly when facing unknown or complex loads in the prior art, and achieve the accuracy and stability of reactive power metering for nonlinear loads.

[0005] This invention provides a reactive power metering method suitable for nonlinear loads, comprising: Obtain full-condition electrical data, and obtain a load harmonic feature vector dataset based on the full-condition electrical data and a preset harmonic feature extraction algorithm; A load classification model is constructed based on the aforementioned load harmonic feature vector dataset; Obtain current operating data, and obtain real-time feature vectors based on the current operating data and a preset load harmonic feature extraction algorithm; The load type is obtained based on the real-time feature vector and the load classification model; Based on the load type and the preset load correction library, call the dedicated load correction model, input the real-time feature vector into the dedicated load correction model, and obtain the equivalent circuit parameters; A virtual optimal circuit structure is obtained based on the equivalent circuit parameters, and a high-precision reactive power value is obtained based on the virtual optimal circuit structure and the real-time feature vector. The general reactive power value is obtained based on the real-time feature vector and the general reactive power correction model. The nonlinear load reactive power calculation results are obtained based on the high-precision reactive power value and the general reactive power value.

[0006] This invention provides a reactive power metering method suitable for nonlinear loads. It extracts harmonic feature vectors from full-condition electrical data, constructs a load classification model to identify the current load type, and then calls a dedicated load correction model to obtain equivalent circuit parameters for calculating high-precision reactive power. The final result is obtained by combining this with general reactive power values. The method uses full-condition data to support the construction of a load classification model for load classification, and employs dedicated load correction models for different loads. This customized model adapts to the characteristics of nonlinear loads, improving metering accuracy. Simultaneously, comparison and verification with a general model ensures the reliability of the results, guaranteeing the accuracy and stability of reactive power metering for nonlinear loads.

[0007] Further, the step of acquiring full-condition electrical data, and acquiring a load harmonic feature vector dataset based on the full-condition electrical data and a preset harmonic feature extraction algorithm, includes: Obtain electrical data for all operating conditions based on a pre-set full-condition test plan; The full-condition electrical data includes the test load type, raw operating condition waveforms, and true reactive power; The original feature vector is obtained based on the original operating condition waveform; Quality assessment is performed based on the original feature vectors and the preset isolated forest algorithm to obtain anomaly scores; Based on the anomaly score and the preset anomaly threshold, anomalies are removed to obtain the preprocessed waveform. Zero-crossing detection is performed based on the preprocessed operating condition waveform to obtain discrete periodic samples; The original material library is obtained based on the discrete periodic samples, test load types, and true reactive power. The load harmonic feature vector dataset is obtained based on the original material library and the preset harmonic feature extraction algorithm.

[0008] In the above scheme, full-condition electrical data covering all operating states is obtained by pre-setting a full-condition test scheme, and data quality assessment and anomaly removal are performed to ensure the quality of the dataset. Finally, the periodic processing of zero-crossing detection is combined to make the feature extraction more consistent with the electrical characteristics of the load, providing accurate and high-quality basic data for subsequent classification model training, and improving the effectiveness and reliability of model training.

[0009] Further, the step of obtaining the load harmonic feature vector dataset based on the original material library and the preset harmonic feature extraction algorithm includes: Based on the original material library, voltage and current waveform data, load type labels, and true reactive power labels are obtained and extracted. Fourier transform is performed on the voltage and current waveform data to obtain the fundamental and harmonic characteristics; Based on the voltage and current waveform data, power energy characteristics, time-domain waveform characteristics, and time-domain analysis characteristics are obtained; The initial load harmonic feature vector is obtained based on the fundamental wave characteristics, harmonic characteristics, power energy characteristics, time-domain waveform characteristics, and time-domain analysis characteristics. Principal component analysis and structural normalization are performed based on the initial load harmonic eigenvectors to obtain the load harmonic eigenvectors. The load harmonic feature vector dataset is obtained based on the load harmonic feature vector, load type label, and true reactive power label.

[0010] In the above scheme, by integrating information such as voltage and current waveforms, load type, and true reactive power from the original material library, the frequency domain features of the fundamental and harmonic waves are first extracted using Fourier transform, while simultaneously acquiring multi-dimensional features such as power energy and time-domain waveforms. These features are then integrated into an initial load harmonic feature vector. Subsequently, principal component analysis is used to simplify the feature dimensions and standardize the structure to unify the feature scale, ultimately forming a feature vector dataset that associates the load type with the true reactive power. This achieves a multi-dimensional and comprehensive characterization of the load's electrical characteristics, and the effectiveness and adaptability of the feature vectors are improved through feature dimensionality reduction and standardization. This provides accurate and efficient input data for the subsequent construction of the load classification model. At the same time, the associated true reactive power labels provide a reference benchmark for model training and validation, ensuring the relevance and accuracy of model training.

[0011] Furthermore, the construction of the load classification model based on the load harmonic feature vector dataset includes: A training set and a validation set are constructed based on the aforementioned load harmonic feature vector dataset; An original load classification model, including several parallel load identification paths, is constructed based on a preset target load type and training set. Activation scores are obtained based on several parallel load identification paths and validation sets. Based on the activation score and the preset consistency check mechanism, determine whether the preset path identification conditions are met, and obtain the identification judgment result; Based on the identification and judgment results, the hyperparameters of several parallel load identification paths are optimized to obtain the current load identification path. A load classification model is obtained based on the current load identification path.

[0012] In the above scheme, by constructing and training an optimized load classification model based on parallel pathways to adapt to the identification needs of different load types, and by combining the validation set to correct the activation score and the consistency check to screen effective pathways and optimize the model parameters, the classification model has the ability to accurately identify different loads, thereby improving the accuracy and adaptability of load classification.

[0013] Furthermore, obtaining the load type based on the real-time feature vector and the load classification model includes: Path activation scores are obtained based on the real-time feature vectors and load classification model. Based on the probability distribution of load type obtained by activating scores, the current load classification result is obtained based on the probability distribution of load type. Dynamic confidence assessment is performed based on the probability distribution of the load type to obtain confidence results; When the load classification result meets the preset high confidence condition based on the confidence result and the preset confidence threshold, the current load classification result is taken as the load type.

[0014] In the above scheme, the reliability of the quantitative classification results is evaluated by probability distribution and confidence level. Only high-confidence results are adopted as the load type to avoid interference from low-reliability classification results in subsequent measurement and improve the credibility of load type identification.

[0015] Furthermore, obtaining the load type based on the real-time feature vector and the load classification model includes: When the confidence result and the preset confidence threshold are used to determine that the conditions for low confidence are met, the low confidence processing mechanism is triggered: Obtain the historical classification results of the real-time feature vector; Based on the historical classification results, a time-series vote is performed to obtain the voting classification results; When the voting classification result determines that the preset stability condition is met, the voting classification result is taken as the load type; If the load type is determined to be inconsistent with the preset stability conditions based on the voting classification results, it will be marked as an unknown type.

[0016] In the above scheme, a time-series vote of historical classification results is triggered when the confidence level is low. Stable voting results are used as the load type, otherwise they are marked as unknown. By integrating historical classification information through time-series voting, the error impact of a single low-confidence result is reduced. At the same time, unstable results are marked as unknown, which improves the effectiveness of classification in low-confidence scenarios, avoids the propagation of misclassification, and ensures the rationality of subsequent measurement.

[0017] Furthermore, obtaining the load type based on the real-time feature vector and the load classification model includes: When the preset secondary verification conditions are met based on the confidence result and the preset confidence threshold, the secondary verification mechanism is triggered: Data on load behavior changes are acquired based on preset micro-amplitude excitation actions; The matching degree is calculated based on the load behavior change data and the benchmark physical fingerprint database corresponding to the current load classification result to obtain the matching result; When the matching result determines that the preset matching conditions are met, the current load classification result is taken as the load type, and the benchmark physical fingerprint database is updated based on the real-time feature vector for the next reactive power metering.

[0018] In the above scheme, under secondary verification conditions, load behavior change data is obtained through micro-excitation, and the matching degree is calculated with the benchmark physical fingerprint database. If the matching is successful, the classification result is adopted and the database is updated to enhance the subsequent recognition capability and improve the accuracy of classification and the iterative nature of the model in medium confidence scenarios.

[0019] Furthermore, including: When the matching result determines that the preset matching conditions are not met, a cross-category comparison process is triggered to obtain the cross-category comparison result; When the cross-category comparison results determine that the load meets the preset new judgment conditions, the load type is a suspected new load sample. The load classification model is then optimized and updated based on the load behavior change data to obtain an optimized load classification model, which is then used for the next reactive power metering.

[0020] In the above scheme, cross-category comparison is triggered when a match fails. If the sample is determined to be a suspected new type of load, the classification model is optimized based on behavioral data. At the same time, the new load data is used for model optimization to enhance the classification model's adaptability to new loads and expand the model's applicability and dynamic update capability.

[0021] Furthermore, based on the high-precision reactive power value and the universal reactive power value, the reactive power calculation results for nonlinear loads are obtained, including: The relative difference value is obtained based on the high-precision reactive power value and the general reactive power value; When the relative difference value and the preset dynamic threshold are determined to be inconsistent with the preset correction conditions, the high-precision reactive power value marked with high confidence is used as the reactive power calculation result of the nonlinear load. When the result reliability analysis mechanism is triggered based on the relative difference value and the preset dynamic threshold, the preset correction conditions are met. Acquire adjacent cycle metering data. When it is determined based on the adjacent cycle metering data that the preset adoption conditions are not met, the general reactive power value marked with the status to be checked is used as the nonlinear load reactive power calculation result, and the parameters of the dedicated load correction model are updated based on the general reactive power value. When the preset adoption conditions are met based on the metering data of the adjacent cycles, the high-precision reactive power value marked with medium confidence level is used as the reactive power calculation result of the nonlinear load.

[0022] In the above scheme, the relative difference between high-precision reactive power value and general reactive power value is calculated. The reliability of the result is determined by combining dynamic threshold and adjacent period data. The measurement results with different reliability are distinguished, marked and selected to ensure the priority adoption of high-precision results. At the same time, the continuity of measurement is ensured by general model and parameter update in abnormal scenarios, thereby improving the reliability and adaptability of measurement calculation.

[0023] Furthermore, it also includes: Real-time acquisition of reactive power metering stability data; The classification confidence level is obtained based on the nonlinear load reactive power calculation results. Anomaly diagnosis results are obtained based on a preset anomaly database, the reactive power metering stability data, and classification confidence levels. When the pre-defined optimization conditions are met based on the anomaly diagnosis results, an optimization alarm mechanism is triggered: Semi-automatic annotation is performed based on the current running data, real-time feature vectors, and preset physical rule base to obtain a high-quality optimized dataset; Based on the high-quality optimized dataset, the load classification model is subjected to physical constraint incremental learning to obtain the target load classification model, so as to perform the next reactive power metering based on the target load classification model; Based on the high-quality optimized dataset, the dedicated load correction model is dynamically expanded to obtain the target load correction model, so as to perform the next reactive power metering based on the target load correction model.

[0024] In the above scheme, stable reactive power metering data and classification confidence are acquired in real time. Diagnostic results are obtained by combining the anomaly database. After triggering optimization alarms, a high-quality dataset is constructed through semi-automatic annotation. The classification model is subjected to incremental learning of physical constraints, and the correction model is dynamically expanded and updated. Real-time monitoring and anomaly diagnosis are added to promptly identify problems in metering and the model. The high-quality dataset is used to optimize the model in a targeted manner to prevent knowledge forgetting in the classification model and ensure its physical consistency. At the same time, the network structure of the correction model is dynamically expanded to achieve dynamic iteration and long-term effectiveness of the model.

[0025] The implementation of this invention has the following beneficial effects: Through high-quality acquisition and preprocessing of electrical data under all operating conditions, an accurate load classification model is constructed, and mechanisms such as confidence assessment, time-series voting, and secondary verification are combined to improve the accuracy and adaptability of load type identification; simultaneously, a dedicated load correction model is used to calculate high-precision reactive power, and the reliability of the metering results is ensured by comparing and verifying with general reactive power values; subsequently, through real-time monitoring and anomaly diagnosis, the classification model is incrementally learned under physical constraints using high-quality datasets, and the correction model is dynamically expanded via network expansion to achieve iterative optimization of the model; ultimately, high precision and high reliability of reactive power metering under nonlinear loads are achieved, while also possessing the ability to identify and dynamically adapt to new types of loads, ensuring long-term stability and accurate metering under complex operating conditions. Attached Figure Description

[0026] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0027] Figure 1 This embodiment provides a schematic diagram of a reactive power metering method suitable for nonlinear loads; Figure 2 This embodiment provides a schematic diagram of a reactive power metering method for power systems with nonlinear loads. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.

[0030] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.

[0031] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0032] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0033] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).

[0034] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.

[0035] This embodiment provides a reactive power metering method suitable for nonlinear loads, such as... Figure 1 As shown, it includes: S1. Obtain full-condition electrical data, and obtain a load harmonic feature vector dataset based on the full-condition electrical data and a preset harmonic feature extraction algorithm; S2. Construct a load classification model based on the load harmonic feature vector dataset; S3. Obtain current operating data, and obtain real-time feature vectors based on the current operating data and a preset load harmonic feature extraction algorithm; S4. Obtain the load type based on the real-time feature vector and the load classification model; S5. Based on the load type and the preset load correction library, call the dedicated load correction model, input the real-time feature vector into the dedicated load correction model, and obtain the equivalent circuit parameters; S6. Obtain a virtual optimal circuit structure based on the equivalent circuit parameters, and obtain a high-precision reactive power value based on the virtual optimal circuit structure and the real-time feature vector. S7. Obtain the general reactive power value based on the real-time feature vector and the general reactive power correction model; S8. Obtain the reactive power calculation results of the nonlinear load based on the high-precision reactive power value and the general reactive power value.

[0036] This embodiment provides a reactive power metering method suitable for nonlinear loads. It extracts harmonic feature vectors by acquiring electrical data under all operating conditions, constructs a load classification model to identify the current load type, and then calls a dedicated load correction model to obtain equivalent circuit parameters to calculate high-precision reactive power. The final result is obtained by combining general reactive power values. The load classification model is constructed to support the full operating condition data for load classification, and a dedicated load correction model is used for different loads. The metering accuracy is improved by adapting the customized dedicated model to the characteristics of nonlinear loads. At the same time, the reliability of the results is ensured by comparing and verifying with the general model, thus ensuring the accuracy and stability of reactive power metering when dealing with nonlinear loads.

[0037] Optionally, step S1 includes: Obtain electrical data for all operating conditions based on a pre-set full-condition test plan; The full-condition electrical data includes the test load type, raw operating condition waveforms, and true reactive power; The original feature vector is obtained based on the original operating condition waveform; Quality assessment is performed based on the original feature vectors and the preset isolated forest algorithm to obtain anomaly scores; Based on the anomaly score and the preset anomaly threshold, anomalies are removed to obtain the preprocessed waveform. Zero-crossing detection is performed based on the preprocessed operating condition waveform to obtain discrete periodic samples; The original material library is obtained based on the discrete periodic samples, test load types, and true reactive power. The load harmonic feature vector dataset is obtained based on the original material library and the preset harmonic feature extraction algorithm.

[0038] In the specific implementation process, when obtaining the load harmonic characteristic vector dataset based on the full-condition electrical data, the full-condition test scheme of the nonlinear load is first planned, and the original operating condition waveform and the corresponding true reactive power are obtained by using a high-precision synchronous acquisition unit. Then, the original operating condition waveform data is subjected to quality inspection, outlier removal and time alignment, and it is cut and organized into an original material library in units of power frequency cycle.

[0039] Specifically, when determining the preset full-condition test plan, based on the target application scenario and the typical nonlinear load types covered, a test plan covering the complete working cycle of each typical load is designed. Typical nonlinear load types include frequency converters, uninterruptible power supplies, etc. The complete working cycle includes stable operating conditions (no load, light load, rated load, overload, etc.) and dynamic transient operating conditions (start-up, shutdown, load step change, etc.). Then, high-precision synchronous acquisition is used to collect the original waveforms (instantaneous voltage waveform, instantaneous current waveform, etc.) and true reactive power for each test load type.

[0040] Specifically, this embodiment employs a pre-defined isolated forest algorithm to check the signal integrity, signal-to-noise ratio (SNR), amplitude reasonableness, and waveform distortion of the original operating condition waveform, and removes abnormal data. Specifically, multiple features are extracted from the original operating condition waveform data of each power frequency cycle to form an original feature vector, which serves as the input to the pre-defined isolated forest algorithm. The original feature vector includes: a signal integrity index (calculating the number of sampling points and time series continuity for each cycle), a signal-to-noise ratio (SNR) index (calculating the waveform's SNR by separating signal and noise through wavelet transform), an amplitude reasonableness index (calculating the peak, effective, and mean values ​​of voltage and current waveforms), and a waveform distortion index (calculating the total harmonic distortion rate, i.e., the ratio of the sum of squares of each harmonic amplitude to the fundamental amplitude, using fast Fourier transform). These indices are combined and extracted to form an original feature vector. For example, for each power frequency cycle, the original feature vector is: [number of sampling points, SNR, peak voltage, peak current, waveform distortion index].

[0041] Specifically, when performing quality assessment based on the original feature vectors and a pre-defined Isolation Forest algorithm, an Isolation Forest model is first trained using historical normal data. The Isolation Forest model constructs multiple isolation trees by randomly selecting original feature vectors and split values. During the inference phase, each original feature vector is input into the model, and an anomaly score is calculated. The anomaly score represents the path length required to isolate a data point: the closer the score is to 1, the higher the probability of an anomaly. For example, if a pre-defined anomaly threshold of 0.6 is set, data points with an anomaly score higher than 0.6 are marked as anomalies. For instance, if the original feature vector for one power frequency cycle is [200, 12 dB, 311V, 10A, 4%], the Isolation Forest model calculates an anomaly score of 0.3, indicating that the original feature vector is normal. However, if the feature vector for another cycle is [180, 3 dB, 600V, 50A, 30%] due to interference, the Isolation Forest model outputs an anomaly score of 0.8, which will be identified as an anomaly, and the data point will be marked as an anomaly. Data points marked as anomalous will be removed and will not be included in the subsequent material library. Simultaneously, the anomaly type (e.g., signal interruption, excessive noise, amplitude exceeding limits, or excessive distortion) is recorded. After removing anomalous portions from the original operating condition waveform, a preprocessed operating condition waveform is obtained. This preprocessed waveform is then time-synchronized, and a zero-crossing detection method is used to identify the start and end points of each voltage frequency cycle. Based on the start and end points of each voltage frequency cycle, the continuous waveform data is segmented into continuous, equal-length, discrete periodic samples, with each cycle as a unit. Next, each segmented periodic sample is normalized and assigned a metadata tag. This metadata tag should at least include the test load type, timestamp, and corresponding true reactive power. Finally, all samples are constructed into the original material library in a structured format.

[0042] Optionally, obtaining the load harmonic feature vector dataset based on the original material library and the preset harmonic feature extraction algorithm includes: Based on the original material library, voltage and current waveform data, load type labels, and true reactive power labels are obtained and extracted. Fourier transform is performed on the voltage and current waveform data to obtain the fundamental and harmonic characteristics; Based on the voltage and current waveform data, power energy characteristics, time-domain waveform characteristics, and time-domain analysis characteristics are obtained; The initial load harmonic feature vector is obtained based on the fundamental wave characteristics, harmonic characteristics, power energy characteristics, time-domain waveform characteristics, and time-domain analysis characteristics. Principal component analysis and structural normalization are performed based on the initial load harmonic eigenvectors to obtain the load harmonic eigenvectors. The load harmonic feature vector dataset is obtained based on the load harmonic feature vector, load type label, and true reactive power label.

[0043] In the specific implementation process, when obtaining the load harmonic feature vector dataset based on the original material library and the preset harmonic feature extraction algorithm, signal processing and feature calculation are uniformly performed on all data samples in the original material library to generate the load harmonic feature vector dataset for classification model training.

[0044] Specifically, a fixed algorithm is first used to extract load harmonic feature vectors from all power frequency cycle data in the original data library. The load harmonic feature vectors include fundamental and harmonic features (extracting harmonic amplitude and relative phase, calculating total harmonic distortion rate, total demand distortion rate, and the content of each harmonic), power energy features (apparent power, active power, true reactive power, calculated power factor, displacement power factor, and instantaneous power waveform characteristics of voltage and current waveforms within a cycle), time-domain waveform features (statistics such as peak value, mean, RMS value, waveform factor, crest factor, skewness, kurtosis, etc., and cross-correlation coefficients between voltage and current waveforms), and time-frequency analysis features (energy values ​​of different frequency bands of the waveform signal, constituting an energy distribution feature vector).

[0045] The fixed algorithm describes a standardized signal processing procedure that transforms the raw voltage and current waveforms of each power frequency cycle into a multi-dimensional harmonic feature vector that comprehensively characterizes the load. This process begins with a windowed Fast Fourier Transform (FFT) of the synchronously sampled discrete voltage and current sequences. First, voltage and current waveform data, load type labels, and true reactive power labels are extracted from the original data library. Next, a Hanning window is applied to the voltage and current waveform data to suppress spectral leakage. Then, a Fourier transform operation is performed; in this embodiment, the Fast Fourier Transform (FFT) is used to accurately extract the amplitude and phase of the fundamental frequency (50Hz) from its spectrum, and the phase difference between the fundamental voltage and current is calculated. This parameter is crucial for determining the load characteristics. Following this, the 2nd to 25th harmonic components are scanned, and the current content of each harmonic is quantitatively calculated, i.e., the ratio of the harmonic amplitude to the fundamental amplitude. Simultaneously, the phase angle of each harmonic current relative to the fundamental voltage is recorded. These harmonic amplitude and phase relationships collectively constitute the unique spectral fingerprint of the load. Furthermore, the total harmonic distortion rate is calculated by integrating all harmonic components to quantify the overall distortion of the waveform. These parameters are then combined into fundamental and harmonic characteristics. At the power characteristic level, the average active power over one cycle is calculated in the time domain using voltage and current waveform data, and the apparent power is obtained by combining the effective values ​​of voltage and current, thereby deriving the power factor and the displacement power factor based solely on the fundamental phase difference. Simultaneously, statistical features are directly extracted from the voltage and current waveform data, including the crest factor characterizing the relationship between peak and effective values, kurtosis reflecting the sharpness of the waveform distribution, and skewness describing waveform asymmetry. Finally, all calculated scalar features, encompassing fundamental parameters, harmonic spectrum information, power data, and time-domain statistics, are generated into a one-dimensional array. Next, all the obtained original feature values ​​are structurally standardized to eliminate the influence of different feature dimensions and orders of magnitude, resulting in an initial load harmonic feature vector. Additionally, principal component analysis is used to transform and filter the load harmonic feature vector, retaining the most discriminative information.

[0046] Specifically, using the initial load harmonic feature vector as input, a series of new orthogonal coordinate axes, i.e., principal components, are calculated through linear transformation to maximize the variance of the original data. These principal components are then sorted in descending order of the variance they can explain. Next, based on a preset cumulative variance contribution rate threshold (e.g., 95%), the top k principal components are selected. Finally, the initial load harmonic feature vector is projected onto the low-dimensional subspace composed of these k principal components, thereby generating a new, low-dimensional feature vector for each sample, i.e., the final load harmonic feature vector. Subsequently, the load harmonic feature vector is associated with its corresponding load type label and true reactive power label (corresponding to the content in the metadata labels mentioned earlier) to construct the load harmonic feature vector dataset.

[0047] In the specific implementation process, in step S3, when extracting features from the real-time running data, the process is consistent with the steps described above for constructing the load harmonic feature vector dataset. Specifically, during online operation, for each new acquisition waveform (i.e., the current running data) of each power frequency cycle, a real-time feature vector is calculated and output in real time. In practical applications, this embodiment fully inherits and solidifies all the calculation conditions of the load harmonic feature vector dataset obtained from the original material library and preset harmonic feature extraction algorithm in the above steps, based on the feature extraction module deployed in the online environment. All standardized features are assembled into an array according to predefined rules, i.e., the real-time feature vector. The core of the predefined rules is a set of solidified feature mapping protocols to ensure consistency between online and offline operations. These rules clearly stipulate that the assembly of the real-time feature vector must fully inherit all the calculation conditions of the load harmonic feature vector dataset in the offline training phase. Specifically, this includes: a strictly solidified feature order (such as the arrangement order of fundamental parameters, harmonic content and phase, power factor, time-domain statistics, etc., which must be completely consistent with the training dataset) and directly applied standardized parameters (using the mean and standard deviation obtained offline to standardize the real-time original feature values).

[0048] Optionally, step S2 includes: A training set and a validation set are constructed based on the aforementioned load harmonic feature vector dataset; An original load classification model, including several parallel load identification paths, is constructed based on a preset target load type and training set. Activation scores are obtained based on several parallel load identification paths and validation sets. Based on the activation score and the preset consistency check mechanism, determine whether the preset path identification conditions are met, and obtain the identification judgment result; Based on the identification and judgment results, the hyperparameters of several parallel load identification paths are optimized to obtain the current load identification path. A load classification model is obtained based on the current load identification path.

[0049] In the specific implementation process, a load classification model is trained based on load harmonic feature vectors to enable real-time determination of the corresponding load type from subsequent input feature vectors. Specifically, training the load classification model based on load harmonic feature vectors includes: using an offline feature library and its load type labels (i.e., the labels of the preset target load types), training an original load classification model including several parallel load identification paths, enabling it to learn to identify load categories from feature vectors; during model training, the system adopts a feature-driven main architecture and a physically guided optimization mechanism. Training data uses load harmonic feature vectors as input representations and is divided into three independent datasets according to a preset ratio: a training set, a validation set, and a test set. The training set is used as the offline feature library for parameter learning of the load classification model, the validation set is used for hyperparameter tuning, and the test set is used for final performance evaluation. During training, the feature vectors of each training batch are input in parallel into multiple physical paths of the model (i.e., the parallel load identification paths).

[0050] Specifically, by simulating the physical characteristics and competition mechanisms of different types of loads, a load classification model is constructed to achieve high-precision and robust load type identification. Its core lies in three hierarchical modules: First, the physical path layer consists of multiple parallel fully connected subnetworks forming parallel load identification paths. Each load identification path specifically corresponds to a type of target load (such as frequency converters, UPS, LED drivers, etc.). By analyzing the typical harmonic characteristic patterns of this type of load in the training set (such as the amplitude range of specific harmonics, harmonic phase distribution characteristics, etc.), higher initial values ​​are assigned to the weights connected to the input layer and key feature dimensions in the path, so that each path has a basic physical characteristic identification tendency from the beginning of training. After each path performs forward computation on the input feature vector, it outputs the activation score representing the degree of matching. Next, the competitive incentive layer receives the activation scores of all paths. By introducing a preset consistency check mechanism, this embodiment uses a physical consistency check mechanism (including harmonic phase relationship verification, feature weight matching degree calculation, etc.) to determine whether the preset path identification conditions are met, and obtains the identification judgment result. Based on the identification judgment result, the original activation scores are corrected. Paths that conform to the typical physical laws of this type of load (i.e., when it is determined to meet the preset path identification conditions) are given gain incentives, and paths with physical contradictions (i.e., when it is determined not to meet the preset path identification conditions) are subject to suppression penalties. This achieves hyperparameter optimization of the parallel load identification paths, and the current load identification path will output a weighted activation score adjusted by physical rules. Finally, the classification decision layer converts the weighted activation score vector into a probability distribution through the Softmax activation function, selects the category corresponding to the maximum probability value as the load type determination result, and completes the mapping from the feature space to the category space.

[0051] Optionally, step S4 includes: Path activation scores are obtained based on the real-time feature vectors and load classification model. Based on the probability distribution of load type obtained by activating scores, the current load classification result is obtained based on the probability distribution of load type. Dynamic confidence assessment is performed based on the probability distribution of the load type to obtain confidence results; When the load classification result meets the preset high confidence condition based on the confidence result and the preset confidence threshold, the current load classification result is taken as the load type.

[0052] Optionally, step S4 includes: When the confidence result and the preset confidence threshold are used to determine that the conditions for low confidence are met, the low confidence processing mechanism is triggered: Obtain the historical classification results of the real-time feature vector; Based on the historical classification results, a time-series vote is performed to obtain the voting classification results; When the voting classification result determines that the preset stability condition is met, the voting classification result is taken as the load type; If the load type is determined to be inconsistent with the preset stability conditions based on the voting classification results, it will be marked as an unknown type.

[0053] Optionally, step S4 includes: When the preset secondary verification conditions are met based on the confidence result and the preset confidence threshold, the secondary verification mechanism is triggered: Data on load behavior changes are acquired based on preset micro-amplitude excitation actions; The matching degree is calculated based on the load behavior change data and the benchmark physical fingerprint database corresponding to the current load classification result to obtain the matching result; When the matching result determines that the preset matching conditions are met, the current load classification result is taken as the load type, and the benchmark physical fingerprint database is updated based on the real-time feature vector for the next reactive power metering.

[0054] Optional, including: When the matching result determines that the preset matching conditions are not met, a cross-category comparison process is triggered to obtain the cross-category comparison result; When the cross-category comparison results determine that the load meets the preset new judgment conditions, the load type is a suspected new load sample. The load classification model is then optimized and updated based on the load behavior change data to obtain an optimized load classification model, which is then used for the next reactive power metering.

[0055] In the specific implementation process, real-time feature vectors are input into the deployed load classification model to obtain preliminary load type results, and their confidence levels are checked. If the confidence level is higher than a threshold, the result is adopted; otherwise, it is marked as an unknown type. Specifically, real-time feature vectors are input into the trained load classification model to generate a load type probability distribution and determine the current load classification result. Then, dynamic confidence assessment is performed. The preset confidence thresholds include a preset high confidence threshold, a preset low confidence threshold, and a confidence interval between them. First, a high confidence check is performed. When the maximum probability value exceeds the preset high confidence threshold, it is determined that the preset high confidence condition is met, and the corresponding category is initially adopted as the load type result. For samples that fail the high confidence check or physical verification, a low confidence processing mechanism is activated. A time-series voting analysis is performed, combining historical classification results within a short time window. If a stable and consistent category consensus can be formed within a continuous period, it is determined that the preset stability condition is met, and the result is adopted; otherwise, it is determined that the preset stability condition is not met, and the result is ultimately marked as an unknown type and a low confidence flag is recorded. This constructs a multi-layered decision system that combines statistical reliability and physical rationality to enhance the reliability of the judgment. Specifically, this embodiment uses the calculation process shown in the following formula to calculate the confidence level. : ; In the formula: Indicates the probability advantage coefficient; The core component representing the probability advantage coefficient is calculated using the following formula: ;in It is the maximum class probability output by the load classification model; It is the second largest class probability output by the model, i.e., excluding... The probability of the class with the highest external probability; the difference between the highest probability and the second highest probability reflects the class discrimination, avoiding misjudgment caused by the two classes having similar load probabilities; It is a non-zero local minimum value, preventing A value of 0 results in a calculation error; Represents the probability gain term; It is the probability gain coefficient, which is controllable. The saturation rate is used to enhance the credibility of high-probability results; It is the dynamic weight of the physical consistency coefficient. When the model probability is in the low to medium range, The results will be appropriately improved, and the classification results will be verified using physical laws. The serial number indicating the key physical indicator; It is the total number of key physical indicators, such as the ratio of fundamental phase difference to dominant harmonic amplitude; It is the first The weights of physical indicators, such as the fundamental phase difference weight; It is the first real-time data collection. A physical indicator, such as the real-time fundamental phase difference of the current load; These are reference values ​​for the physical indicators of typical loads, i.e., the standard physical characteristics corresponding to the preliminary determination of the category; It is the smaller of the real-time value and the reference value; It is the larger of the real-time value and the reference value plus the minimum value. The ratio of the two is used to quantify the similarity between the real-time indicator and the reference indicator. It is the physical index deviation attenuation coefficient; It is the absolute deviation between the real-time indicator and the reference indicator, used to quantify the degree of difference between the two; It is a dynamic weight of the time series stability coefficient, in low-confidence scenarios. The maximum value is selected to avoid misjudgment caused by a single abnormal data point; It is the time series stability coefficient, and its calculation formula is: , Represents the time step within the short time window. Corresponding to the current power frequency cycle; It is the total number of power frequency cycles within the short time window; It is a time decay weight; It is the time decay coefficient, which gives higher weight to the classification results of recent periods and highlights the influence of the current and nearest period results; It is a consistency judgment function, if the first... If the preliminary classification results of the previous cycle are consistent with those of the current cycle, then... ,otherwise ; The closer the result is to 1, the more stable the classification result is, and the higher the reliability of the current result.

[0056] This embodiment also sets an intermediate confidence interval. When the confidence level falls within this interval, it is determined that the preset secondary verification conditions are met, and the secondary verification mechanism is activated. When the confidence level reaches a preset high confidence threshold, the system directly adopts the classification result and triggers a dedicated correction model; when the confidence level is lower than a preset low confidence threshold, it is marked as an unknown type and a general correction model is activated; for intermediate confidence level samples, the system actively guides the load into the secondary verification state by changing the operating conditions through preset micro-amplitude excitation actions. These preset micro-amplitude excitation actions, such as utilizing inherent power grid fluctuations or controlling relays to generate millisecond-level voltage dips, excite the dynamic response characteristics of the load. At the same time, real-time physical load behavior change data, such as transient current harmonic evolution trajectory and power factor dynamic response curve, are collected during this process. Subsequently, the real-time dynamic response reflected by these load behavior change data is matched with a preset benchmark physical fingerprint database of the target category load. The benchmark physical fingerprint database contains deep-level characteristics such as harmonic reconstruction characteristics and transient energy distribution patterns of various loads under typical disturbances. If the real-time dynamic response highly matches the baseline fingerprint of the target category (i.e., the current load classification result), it is determined that the preset matching conditions are met, the classification result is confirmed, and the baseline physical fingerprint database of that category is updated synchronously. If there is a significant deviation, it is determined that the preset matching conditions are not met, and a cross-category comparison process is initiated to find the optimal matching category. When all matching attempts fail to reach the threshold, it is determined that the preset novel judgment conditions are met, and the sample is labeled as a novel load suspected sample. Its complete dynamic response sequence is recorded and used for updating the load classification model parameters and optimizing training.

[0057] In practical applications, to stimulate the dynamic response characteristics of intermediate confidence loads, the preset micro-amplitude excitation action generates and executes precise control commands to create millisecond-level voltage sags. These control commands typically target fast-switching components, commanding them to instantaneously connect a parallel power resistor of a preset resistance value. Key parameters include sag depth (typically 3%–10%), duration (typically 20–40 milliseconds), and switching phase, all precisely calculated to generate a small disturbance sufficient to stimulate the load's dynamic characteristics without interfering with its normal operation. Simultaneously, the parameters of the control commands are dynamically adjusted based on the preset type of the load to be identified, its current operating power, and historical data. For example, in high-power industrial scenarios, a slighter, shorter disturbance is used to prevent production interruptions; in commercial building scenarios, a slightly more significant disturbance can be used to obtain clearer response characteristics. This differentiated control strategy ensures that the verification process can efficiently and accurately capture the unique dynamic "fingerprint" of the load within a safe range across various application scenarios.

[0058] Optionally, step S8 includes: The relative difference value is obtained based on the high-precision reactive power value and the general reactive power value; When the relative difference value and the preset dynamic threshold are determined to be inconsistent with the preset correction conditions, the high-precision reactive power value marked with high confidence is used as the reactive power calculation result of the nonlinear load. When the result reliability analysis mechanism is triggered based on the relative difference value and the preset dynamic threshold, the preset correction conditions are met. Acquire adjacent cycle metering data. When it is determined based on the adjacent cycle metering data that the preset adoption conditions are not met, the general reactive power value marked with the status to be checked is used as the nonlinear load reactive power calculation result, and the parameters of the dedicated load correction model are updated based on the general reactive power value. When the preset adoption conditions are met based on the metering data of the adjacent cycles, the high-precision reactive power value marked with medium confidence level is used as the reactive power calculation result of the nonlinear load.

[0059] In the specific implementation process, load-specific correction models are trained for each load type in steps S5, S6, and S7, and the corrected reactive power metering is output. Specifically, this embodiment first trains a high-precision regression model for each identified load type using its corresponding offline data, and constructs the preset load correction library. Specifically, a virtual component pool is established for each load type, containing 32 mathematically constructed basic component modules, each component being essentially a parameterized mathematical function. These virtual components are dynamically connected through a topology generation network. By analyzing the input load harmonic feature vector, the controller calculates the continuous connection strength between every two component nodes. When the connection strength exceeds a threshold, a circuit connection is established, forming a unique equivalent circuit topology. Then, when the real-time feature vector is input, the virtual optimal circuit structure is obtained by constructing the equivalent circuit topology.

[0060] This embodiment uses a parameter encoding network as a key component of the dedicated load correction model and employs a multi-scale feature extraction architecture to process input features. This includes: a low-frequency feature branch (fundamental to 13th harmonics), which generates linear component parameters through fully connected layers and gating mechanisms. The resistance values ​​are ensured to be positive using the Softplus activation function, while the inductance and capacitance values ​​are maintained physically rationally through exponential activation. A high-frequency feature branch (harmonics above the 13th harmonic and transient features) extracts local patterns through one-dimensional convolutional layers, generating nonlinear component parameters and controlled source coefficients. The nonlinear component function fitting module approximates the nonlinear characteristics of power electronic switching devices and magnetic saturation through a small neural network. All these generated equivalent circuit parameters are fed into a differentiable circuit simulation engine to obtain a virtual optimal circuit structure. Then, by constructing node admittance matrices and forming a system of equations, the nonlinear components provide equivalent linearized admittance through the adjoint model method, and the controlled sources modify matrix elements through control coefficients. Finally, the Jacobian matrix is ​​calculated in real-time through automatic differentiation, and the linear equation system is iteratively solved until convergence. The voltage and current of each branch are extracted from the solution results, the instantaneous power is calculated, and finally, reactive power metering is calculated through frequency domain analysis to obtain a high-precision reactive power value. Specifically, the reactive power metering method used in this embodiment... The calculation formula is shown below: ; In the formula: Indicates the harmonic order; Indicates the highest order of a low-order harmonic; Indicates the first The angular frequency of the subharmonic; Indicates the first The effective value of the current in the virtual linear branch under subharmonics; Indicates the first Equivalent linear inductance value under subharmonics; Indicates the first Equivalent linear capacitance under subharmonics; Indicates the first Phase correction factor for linear branches under subharmonics; It is the phase difference between the voltage and current of a linear branch, calculated using the following formula: ,in, It is the first The equivalent linear resistance under subharmonics is generated by the low-frequency characteristic branch; Indicates the highest order of a high-frequency harmonic; Indicates the first The nonlinear correction coefficient for the second harmonic reflects the impact of the load nonlinearity on the reactive power of that harmonic; the more significant the nonlinearity, the greater the impact. The closer to 1; ,in Indicates the first The voltage phasor of the subharmonic; in this embodiment, the inductive reactive power is adjusted by the cosine value of the phase difference. With compatibility without function The actual contribution direction of the item should be considered to avoid sign bias. Indicates the first Current phasor conjugation in nonlinear branches under subharmonics; This represents the phase compensation factor of the controlled source; It is the imaginary unit. ; It is the first The phase offset angle of the controlled source under subharmonics is used to compensate for the modulation of the harmonic phase by the controlled source (such as a voltage-controlled current source) and avoid reactive power calculation errors caused by phase deviation. Indicates the first Apparent power of nonlinear branches under subharmonics; It represents the apparent power threshold of high-frequency harmonics, used to set the filtering critical point of the hyperbolic tangent function to avoid interference from low-power high-frequency harmonics; This represents the transient attenuation coefficient. The more severe the transient process (such as sudden load switching or virtual component topology changes), the more significant the attenuation coefficient. The closer it is to 1; after the transient ends, Gradually reduce to 0, then stop correcting; This represents the averaging operator; This indicates the number of sampling points within the transient window; This represents the sampling point index, corresponding to each discrete sampling time within the transient window; Indicates the first [number] in the transient window The instantaneous reactive power components at each sampling point; It represents the average value of the instantaneous reactive power component within the transient window, used to separate transient fluctuation components from steady-state components; This indicates the fluctuation deviation of transient reactive power; This represents the average phase correction factor for transient states. It is the average phase offset of all sampling points within the transient window; It represents the phase shift during a transient process, compensating for sudden changes in the phase of voltage and current during transients.

[0061] This calculation result is the corrected high-precision reactive power value, whose correctiveness is reflected in its complete consideration of harmonic power exchange, nonlinear effects, and the unique characteristics of specific loads. Next, based on the online identified load type, the corresponding dedicated correction model is automatically invoked to calculate the real-time feature vector and correct the reactive power metering error for that type of load. Specifically, this includes: invoking the dedicated correction model to correct reactive power metering errors based on the load type, while simultaneously invoking a pre-trained general reactive power correction model; first, based on the identified load type, the corresponding dedicated correction model is invoked: the real-time feature vector is input into the pre-trained correction model, equivalent circuit parameters are dynamically generated through a parameter encoding network, the topology generation network reconstructs the optimal circuit structure for the current operating condition, the differentiable circuit simulation engine solves the circuit equations based on node analysis, and the high-precision reactive power value is obtained through frequency domain energy integration. Subsequently, the general reactive power correction model is activated in parallel, using traditional frequency domain analysis methods to process waveform data of the same period, and calculating the phase difference of each harmonic voltage and current through windowed fast Fourier transform to obtain the general reactive power value. The outputs of the two models together constitute the complete correction result, with the specific correction result serving as the main output and the general correction result serving as the validation benchmark and backup output.

[0062] Specifically, the system calculates the relative difference between the high-precision reactive power value and the general reactive power value, and compares this difference with a preset dynamic threshold. If the difference exceeds a reasonable range, it is determined that the preset correction conditions are not met, and the general model is used first while the parameters of the dedicated model are updated simultaneously. The preset dynamic threshold is not a fixed value but is dynamically adjusted according to the real-time operating status of the load: a stricter threshold is used when the load is stable, and the preset dynamic threshold is automatically relaxed during dynamic load processes. When the relative difference is lower than the preset dynamic threshold, it is determined that the preset correction conditions are not met, and the system adopts the dedicated correction result as the final output and marks it as a high-confidence measurement result; otherwise, it is determined that the preset correction conditions are met, and the reliability analysis mechanism of the result is initiated. Metering data from adjacent periods is obtained, and a comprehensive judgment is made by analyzing the consistency of metering results from multiple recent periods, the confidence trend of load type, and real-time waveform distortion rate, among other indicators. If the results of the dedicated model remain stable over time and the load type confidence level consistently exceeds the threshold, then if the preset adoption conditions are met, the dedicated correction result will still be adopted, but marked as having medium confidence. If a significant anomaly occurs, and the preset adoption conditions are not met, the output will be switched to the general reactive power value and marked as requiring verification. Simultaneously, this embodiment also records and sends all key parameters of the decision-making process (including difference values, adopted thresholds, and final decision criteria) to the continuous monitoring module, providing data support for model optimization.

[0063] In practical applications, the automatic threshold relaxation is achieved by dynamically adjusting the preset dynamic threshold based on the load's operating status, thus balancing accuracy and robustness. When the load is in a stable operating condition (characterized by smooth power changes and low waveform harmonic distortion), a strict relative difference threshold, such as 3%, is used. This means that if the difference between the calculation results of the load-specific correction model and the general correction model exceeds this limit, an in-depth verification will be triggered immediately. Conversely, when the load is in a dynamic process such as startup, shutdown, or load step change, the system automatically relaxes the threshold to, for example, 10%, to tolerate reasonable differences between models caused by the transient process itself, avoiding unnecessary false alarms and model switching, thereby prioritizing the continuity of metering output.

[0064] Optional, also includes: Real-time acquisition of reactive power metering stability data; The classification confidence level is obtained based on the nonlinear load reactive power calculation results. Anomaly diagnosis results are obtained based on a preset anomaly database, the reactive power metering stability data, and classification confidence levels. When the pre-defined optimization conditions are met based on the anomaly diagnosis results, an optimization alarm mechanism is triggered: Semi-automatic annotation is performed based on the current running data, real-time feature vectors, and preset physical rule base to obtain a high-quality optimized dataset; Based on the high-quality optimized dataset, the load classification model is subjected to physical constraint incremental learning to obtain the target load classification model, so as to perform the next reactive power metering based on the target load classification model; Based on the high-quality optimized dataset, the dedicated load correction model is dynamically expanded to obtain the target load correction model, so as to perform the next reactive power metering based on the target load correction model.

[0065] In its implementation, this embodiment also introduces a real-time monitoring mechanism to monitor the stability of reactive power metering and continuously optimize the load classification model and correction model based on the load type determination results. Specifically, by continuously monitoring the stability and classification confidence of reactive power metering, an optimization alarm is automatically triggered when a systematic deviation or frequent occurrence of unknown types is detected. In this process, this embodiment establishes an intelligent continuous monitoring system, using joint analysis of multiple indicators to ensure the long-term stability and accuracy of the reactive power metering system. Specifically, a three-level real-time monitoring architecture is constructed, comprising an electrical characteristic layer, a model decision layer, and a metering output layer: In the electrical characteristic layer, real-time reactive power metering stability data is acquired to track the distribution deviation of load harmonic characteristics, and the deviation between the current characteristic distribution and the training baseline distribution is analyzed by calculating Mahalanobis distance; in the model decision layer, classification confidence is extracted based on the nonlinear load reactive power calculation results, and the confidence trend of the load classification model, the statistical distribution of the differences between the output of the dedicated correction model and the general model, and the pass rate of physical consistency verification are monitored simultaneously; in the metering output layer, the sliding window technique is used to analyze the fluctuation characteristics of reactive power output and calculate its coefficient of variation and autocorrelation function. The data obtained from the three-layer monitoring architecture is used as the judgment indicator for anomaly diagnosis results, and an intelligent diagnostic engine is introduced. When any monitoring indicator exceeds a preset threshold, the diagnostic engine initiates a root cause analysis process: by analyzing the temporal correlation and statistical dependence between multiple indicators, it distinguishes between temporary interference, systematic deviation, or the emergence of new loads. For example, if a decrease in classification confidence is found accompanied by a shift in feature distribution, but physical consistency remains stable, it is judged as a slow drift in load characteristics; if a decrease in confidence and frequent failures in physical consistency verification occur, it may indicate the emergence of new loads. This embodiment establishes a feature fingerprint library for each anomaly mode to form the preset anomaly database. Through these feature fingerprints, accurate problem classification is achieved, and anomaly diagnosis results are obtained.

[0066] Different response procedures are initiated based on the risk level of the abnormal diagnosis results. Level 1 warnings are for minor system performance degradation, automatically recording relevant data and marking it as requiring attention; Level 2 warnings are for clear systemic deviations, triggering preparatory work for optimization processes, including data caching and resource allocation; Level 3 warnings are for situations that seriously affect metering accuracy, at which point it is determined that preset optimization conditions are met, the safety redundancy mechanism is immediately activated, and an emergency intervention request is sent to the operation and maintenance system, triggering the optimization alarm mechanism.

[0067] After the optimization alert mechanism is triggered, new data from the early warning phase is collected to incrementally train the existing load classification model and the dedicated correction model, thereby completing the online optimization and version update of the model parameters.

[0068] Specifically, upon receiving an early warning signal from the optimization alarm mechanism, the system first extracts the current operating data (including waveform data) and real-time feature vectors for the corresponding time period from the cache. Representative sample sets are automatically identified through density-based clustering analysis, and these samples are semi-automatically labeled: initial labels are generated using its built-in preset physical rule base, and then confirmed by domain experts through a human-computer interaction interface, forming a high-quality optimized dataset. Next, physical constraint incremental learning is employed. For the load classification model, elastic weight consolidation technology is introduced to minimize the loss function for new samples while imposing constraints on important parameters to prevent catastrophic forgetting of existing knowledge. The importance of parameters is calculated using the Fisher information matrix. Simultaneously, a physical consistency regularization term is added to the loss function to ensure that new knowledge does not violate basic electromagnetic laws, resulting in a target load classification model for subsequent reactive power metering. For the dedicated correction model, a dynamic network expansion strategy is adopted: when a new load pattern is detected, new virtual component branches are added to the existing equivalent circuit discovery network based on the high-quality optimized dataset, and gradient path isolation technology ensures the stability of the original structure. During training, an uncertainty-based weighted loss function is used, assigning greater weight to high-confidence samples to improve learning efficiency and obtain a target load correction model for subsequent reactive power metering. Optionally, after optimization, the old and new models (the dedicated correction model and the target dedicated correction model, the load correction model and the target load correction model) are run in parallel in a real environment, but only the comparison data is recorded. A 24-hour A / B test is conducted to comprehensively evaluate the performance of the optimized model in terms of classification accuracy, reactive power metering accuracy, physical consistency, and other metrics. Once all key metrics pass verification, the model is automatically switched over, and a detailed optimization report is generated, including information such as performance improvement, new load type features, and changes in model complexity.

[0069] In summary, this embodiment provides a reactive power metering method for power systems with nonlinear loads, such as... Figure 2 As shown, it includes: S21. Collect electrical data throughout the entire working range and under dynamic processes, and construct an original material library after preprocessing; S22. Extract the load harmonic feature vector and the real-time feature vector using the load harmonic feature extraction algorithm; S23. Train a load classification model based on load harmonic feature vectors, and input real-time feature vectors to determine the load type; S24. Train a load-specific correction model for each load type and output the corrected reactive power metering. S25. Continuously monitor the stability of reactive power metering and continuously optimize the load classification model and correction model based on the load type determination results.

[0070] This embodiment also provides a reactive power metering method for power systems with nonlinear loads. It collects electrical signal data across the entire operating range and during dynamic processes, and constructs a raw data library after preprocessing. Load harmonic feature vectors and real-time feature vectors are extracted using a load harmonic feature extraction algorithm. A load classification model is trained based on the load harmonic feature vectors, and the load type is determined by inputting the real-time feature vectors. A load-specific correction model is trained for each load type, outputting the corrected reactive power metering. The stability of the reactive power metering is continuously monitored, and the load classification model and correction model are continuously optimized based on the load type determination results. This forms a two-layer model architecture based on classification and specific correction, providing a customized high-precision correction model for each type of load. This fundamentally overcomes the poor adaptability of general algorithms to diverse nonlinear loads, achieving near-true-value-level reactive power metering. It enables high-precision identification of known loads and reliable detection of unknown types, and makes robust decisions under uncertainty, greatly enhancing its practical value. Meanwhile, this embodiment also constructs a complete closed-loop optimization method based on online monitoring, early warning, and incremental learning. It can continuously collect new data, discover new loads, and optimize existing models during use, achieving a leap from static metering to dynamic growth, effectively extending the technology life cycle and reducing operation and maintenance costs.

[0071] Based on the above embodiment of a reactive power metering method applicable to nonlinear loads, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a reactive power metering method applicable to nonlinear loads according to any embodiment of the present invention.

[0072] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.

[0073] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0074] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.

[0075] Based on the above-described method embodiments, another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute a reactive power metering method applicable to nonlinear loads as described in any of the above-described method embodiments of the present invention.

[0076] The modules / units integrated in the device / terminal equipment, if implemented as software functional units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0077] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A reactive power metering method suitable for nonlinear loads, characterized in that, include: Obtain full-condition electrical data, and obtain a load harmonic feature vector dataset based on the full-condition electrical data and a preset harmonic feature extraction algorithm; A load classification model is constructed based on the aforementioned load harmonic feature vector dataset; Obtain current operating data, and obtain real-time feature vectors based on the current operating data and a preset load harmonic feature extraction algorithm; The load type is obtained based on the real-time feature vector and the load classification model; Based on the load type and the preset load correction library, call the dedicated load correction model, input the real-time feature vector into the dedicated load correction model, and obtain the equivalent circuit parameters; A virtual optimal circuit structure is obtained based on the equivalent circuit parameters, and a high-precision reactive power value is obtained based on the virtual optimal circuit structure and the real-time feature vector. The general reactive power value is obtained based on the real-time feature vector and the general reactive power correction model. The nonlinear load reactive power calculation results are obtained based on the high-precision reactive power value and the general reactive power value.

2. The reactive power metering method applicable to nonlinear loads as described in claim 1, characterized in that, The acquisition of full-condition electrical data, and the acquisition of a load harmonic feature vector dataset based on the full-condition electrical data and a preset harmonic feature extraction algorithm, include: Obtain electrical data for all operating conditions based on a pre-set full-condition test plan; The full-condition electrical data includes the test load type, raw operating condition waveforms, and true reactive power; The original feature vector is obtained based on the original operating condition waveform; Quality assessment is performed based on the original feature vectors and the preset isolated forest algorithm to obtain anomaly scores; Based on the anomaly score and the preset anomaly threshold, anomalies are removed to obtain the preprocessed waveform. Zero-crossing detection is performed based on the preprocessed operating condition waveform to obtain discrete periodic samples; The original material library is obtained based on the discrete periodic samples, test load types, and true reactive power. The load harmonic feature vector dataset is obtained based on the original material library and the preset harmonic feature extraction algorithm.

3. The reactive power metering method applicable to nonlinear loads as described in claim 2, characterized in that, The process of obtaining the load harmonic feature vector dataset based on the original material library and the preset harmonic feature extraction algorithm includes: Based on the original material library, voltage and current waveform data, load type labels, and true reactive power labels are obtained and extracted. Fourier transform is performed on the voltage and current waveform data to obtain the fundamental and harmonic characteristics; Based on the voltage and current waveform data, power energy characteristics, time-domain waveform characteristics, and time-domain analysis characteristics are obtained; The initial load harmonic feature vector is obtained based on the fundamental wave characteristics, harmonic characteristics, power energy characteristics, time-domain waveform characteristics, and time-domain analysis characteristics. Principal component analysis and structural normalization are performed based on the initial load harmonic eigenvectors to obtain the load harmonic eigenvectors. The load harmonic feature vector dataset is obtained based on the load harmonic feature vector, load type label, and true reactive power label.

4. The reactive power metering method applicable to nonlinear loads as described in claim 1, characterized in that, The construction of the load classification model based on the load harmonic feature vector dataset includes: A training set and a validation set are constructed based on the aforementioned load harmonic feature vector dataset; An original load classification model, including several parallel load identification paths, is constructed based on a preset target load type and training set. Activation scores are obtained based on several parallel load identification paths and validation sets. Based on the activation score and the preset consistency check mechanism, determine whether the preset path identification conditions are met, and obtain the identification judgment result; Based on the identification and judgment results, the hyperparameters of several parallel load identification paths are optimized to obtain the current load identification path. A load classification model is obtained based on the current load identification path.

5. The reactive power metering method applicable to nonlinear loads as described in claim 1, characterized in that, The process of obtaining the load type based on the real-time feature vector and the load classification model includes: Path activation scores are obtained based on the real-time feature vectors and load classification model. Based on the probability distribution of load type obtained by activating scores, the current load classification result is obtained based on the probability distribution of load type. Dynamic confidence assessment is performed based on the probability distribution of the load type to obtain confidence results; When the load classification result meets the preset high confidence condition based on the confidence result and the preset confidence threshold, the current load classification result is taken as the load type.

6. The reactive power metering method applicable to nonlinear loads as described in claim 5, characterized in that, The process of obtaining the load type based on the real-time feature vector and the load classification model includes: When the confidence result and the preset confidence threshold are used to determine that the conditions for low confidence are met, the low confidence processing mechanism is triggered: Obtain the historical classification results of the real-time feature vector; Based on the historical classification results, a time-series vote is performed to obtain the voting classification results; When the voting classification result determines that the preset stability condition is met, the voting classification result is taken as the load type; If the load type is determined to be inconsistent with the preset stability conditions based on the voting classification results, it will be marked as an unknown type.

7. A reactive power metering method suitable for nonlinear loads as described in claim 5, characterized in that, The process of obtaining the load type based on the real-time feature vector and the load classification model includes: When the preset secondary verification conditions are met based on the confidence result and the preset confidence threshold, the secondary verification mechanism is triggered: Data on load behavior changes are acquired based on preset micro-amplitude excitation actions; The matching degree is calculated based on the load behavior change data and the benchmark physical fingerprint database corresponding to the current load classification result to obtain the matching result; When the matching result determines that the preset matching conditions are met, the current load classification result is taken as the load type, and the benchmark physical fingerprint database is updated based on the real-time feature vector for the next reactive power metering.

8. The reactive power metering method applicable to nonlinear loads as described in claim 7, characterized in that, include: When the matching result determines that the preset matching conditions are not met, a cross-category comparison process is triggered to obtain the cross-category comparison result; When the cross-category comparison results determine that the load meets the preset new judgment conditions, the load type is a suspected new load sample. The load classification model is then optimized and updated based on the load behavior change data to obtain an optimized load classification model, which is then used for the next reactive power metering.

9. The reactive power metering method applicable to nonlinear loads as described in claim 1, characterized in that, Based on the aforementioned high-precision reactive power value and universal reactive power value, the reactive power calculation results for nonlinear loads are obtained, including: The relative difference value is obtained based on the high-precision reactive power value and the general reactive power value; When the relative difference value and the preset dynamic threshold are determined to be inconsistent with the preset correction conditions, the high-precision reactive power value marked with high confidence is used as the reactive power calculation result of the nonlinear load. When the result reliability analysis mechanism is triggered based on the relative difference value and the preset dynamic threshold, the preset correction conditions are met. Acquire adjacent cycle metering data. When it is determined based on the adjacent cycle metering data that the preset adoption conditions are not met, the general reactive power value marked with the status to be checked is used as the nonlinear load reactive power calculation result, and the parameters of the dedicated load correction model are updated based on the general reactive power value. When the preset adoption conditions are met based on the metering data of the adjacent cycles, the high-precision reactive power value marked with medium confidence level is used as the reactive power calculation result of the nonlinear load.

10. A reactive power metering method suitable for nonlinear loads as described in claim 1, characterized in that, Also includes: Real-time acquisition of reactive power metering stability data; The classification confidence level is obtained based on the nonlinear load reactive power calculation results. Anomaly diagnosis results are obtained based on a preset anomaly database, the reactive power metering stability data, and classification confidence levels. When the pre-defined optimization conditions are met based on the anomaly diagnosis results, an optimization alarm mechanism is triggered: Semi-automatic annotation is performed based on the current running data, real-time feature vectors, and preset physical rule base to obtain a high-quality optimized dataset; Based on the high-quality optimized dataset, the load classification model is subjected to physical constraint incremental learning to obtain the target load classification model, so as to perform the next reactive power metering based on the target load classification model; Based on the high-quality optimized dataset, the dedicated load correction model is dynamically expanded to obtain the target load correction model, so as to perform the next reactive power metering based on the target load correction model.