Power distribution network reactive power optimization decision-making method and system based on knowledge and data fusion

By combining physical models and machine learning in the distribution network, high-quality sample data is generated and the decision model is optimized, which solves the problem of voltage exceeding limits under high proportion of photovoltaic access, realizes fast and robust reactive power optimization, and ensures voltage stability and real-time response.

CN121546635APending Publication Date: 2026-02-17SUQIAN POWER SUPPLY COMPANY OF JIANGSU PROVINCE POWER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511881924.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-15
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

In existing technologies, traditional reactive power optimization methods for distribution networks face challenges such as model accuracy and parameter sensitivity, computational complexity and real-time difficulties, and insufficient adaptability to uncertainties when dealing with high proportions of photovoltaic access, making it difficult to effectively solve voltage over-limit problems.

Method used

A hierarchical fusion technical solution is adopted, which uses a linearized physical model to generate high-quality sample data. Combined with data preprocessing and machine learning techniques, a reactive power optimization decision model is constructed to achieve fast and robust decision-making.

Benefits of technology

It achieves millisecond-level real-time response, improves the physical rationality and accuracy of decision-making, reduces dependence on precise parameters, enhances adaptability to photovoltaic power output fluctuations, and ensures voltage stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121546635A_ABST
    Figure CN121546635A_ABST
Patent Text Reader

Abstract

The invention discloses a power distribution network reactive power optimization decision-making method and system based on knowledge and data fusion, and the method comprises the steps: constructing a power distribution network optimal power flow model of high-proportion photovoltaic access, and generating a reactive power optimization decision-making data set; preprocessing the data set, removing repeated samples and screening key features; constructing and screening a machine learning regression model based on the preprocessed data set; further optimizing the model performance by adopting a data quality improvement method, and determining the decision tree model based on Gaussian noise enhancement as an optimal decision model; and performing real-time reactive power optimization control on the power distribution network by using the model, and outputting an optimal reactive power output set value. Through the fusion thought of model-driven sample generation and data-driven learning decision making, rapid and accurate decision making of reactive power optimization is realized, and the voltage out-of-limit problem under high-proportion photovoltaic access is effectively relieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of power system operation and control, distribution network automation and intelligence technology, and specifically relates to a novel reactive power optimization decision-making method and system for distribution networks that integrates optimal power flow physical models and machine learning data-driven technology. Background Technology

[0002] With the growing acceptance of green and environmentally friendly concepts and the reduction of carbon emissions, the proportion of renewable energy, represented by photovoltaics, in the energy system continues to rise. The distribution network, as the "last mile" connecting the main grid and users, is undergoing a profound transformation from a passive to an active network. While the high proportion of photovoltaic power brings clean electricity, its intermittent, random, and fluctuating output also poses unprecedented challenges to the safe and stable operation of the distribution network. One of the most prominent problems is bidirectional voltage exceeding limits, meaning that the voltage at local nodes is too high or too low, exceeding the safe operating range stipulated by national standards (e.g., 0.95~1.05 pu).

[0003] Voltage is a core indicator for measuring power quality, and its stability directly affects the safe lifespan of electrical equipment and the normal power supply for users. Excessive voltage accelerates insulation aging and can even cause insulation breakdown; insufficient voltage leads to insufficient output and increased current in motors and other equipment, resulting in overheating and burnout. In severe cases, localized voltage instability can trigger a chain reaction, causing widespread voltage collapse and resulting in enormous socio-economic losses.

[0004] In power distribution networks, voltage is closely related to reactive power. According to circuit principles, voltage loss on a line can be approximated as ΔU = (PR + QX) / U, where reactive power Q is a key controllable variable affecting voltage levels. Therefore, optimizing and controlling reactive power equipment such as photovoltaic inverters, capacitor banks, and static var compensators is one of the most economical and effective means to solve voltage exceedance problems.

[0005] Traditional reactive power optimization methods for distribution networks primarily rely on physical model-driven optimization algorithms, with the optimal power flow model at their core. These methods establish accurate nonlinear power flow equations for the distribution network, aiming to minimize network losses and voltage deviations, while constraining power balance, equipment capacity, and voltage safety. They construct a nonlinear programming problem and solve it using interior-point methods, mixed-integer programming, and intelligent algorithms. However, these methods face three major bottlenecks in practical engineering applications:

[0006] The challenges of model accuracy and parameter sensitivity: The accuracy of optimal power flow models is highly dependent on the accuracy of network topology and line parameters (R,X). However, the actual distribution network structure is complex, the nameplate values ​​of line parameters deviate from the actual values, and they change dynamically with factors such as ambient temperature and equipment aging. This leads to a mismatch between the model and the actual system, resulting in a significant reduction in the effectiveness of the obtained "optimal solution" in practical applications, and even triggering the risk of control mismatch.

[0007] Computational complexity and real-time performance challenges: Distribution network power flow equations are non-convex and nonlinear. Even after various convex relaxations (such as second-order cone programming and semidefinite programming) or linearizations (such as Distflow linearization), solving them still requires several seconds to several minutes of computation time when dealing with large-scale actual distribution networks with hundreds or thousands of nodes. This makes it difficult to meet the requirements of online rolling optimization and real-time control at the second or even minute level.

[0008] Insufficient adaptability to uncertainty: Traditional optimization models are mostly deterministic optimizations, with limited ability to handle highly uncertain factors such as photovoltaic output and load changes. Although probabilistic optimal power flow and robust optimization methods have been proposed, their computational complexity is even higher, further exacerbating the difficulties of real-time applications.

[0009] In recent years, data-driven technologies, especially machine learning and deep learning, have provided a new paradigm for addressing the aforementioned bottlenecks. Machine learning models do not rely on precise physical models; instead, they learn from massive amounts of historical or simulation data to establish complex mappings between system states (such as node voltages and active power output) and control decisions (such as reactive power output). Once trained, these models exhibit extremely fast forward inference speeds, achieving millisecond-level decisions and perfectly solving the real-time problem. Furthermore, data-driven models are relatively tolerant of parameter variations; as long as the training data covers sufficient operational scenarios, the model demonstrates good adaptability.

[0010] However, purely data-driven approaches also face challenges:

[0011] Data quality dependence: Model performance is highly dependent on the quality and quantity of training data. If the data is not representative or contains a lot of noise, the model accuracy will be difficult to guarantee.

[0012] Physical safety: As a "black box", the model's output may violate physical laws (such as power balance), making the decision infeasible.

[0013] Poor interpretability: The decision-making process lacks a clear physical explanation, which is not conducive to the understanding and trust of operators.

[0014] Therefore, both single model-driven and data-driven approaches have inherent limitations. The core idea of ​​this invention is to combine the strengths of both while avoiding their weaknesses. Through a fusion framework of "model-driven sample generation and data-driven decision learning," the physical model ensures the physical rationality and optimality of the samples, while the data-driven model achieves speed and adaptability in decision-making. Ultimately, this constructs a reactive power optimization decision-making system that is accurate, fast, physically interpretable, and engineering-practical. Summary of the Invention

[0015] To address the aforementioned technical problems, the objective of this invention is to overcome the shortcomings of existing model-driven methods, such as low computational efficiency and reliance on precise parameters, as well as the poor interpretability and reliance on high-quality data in purely data-driven methods. The invention provides a knowledge- and data-fusion-based reactive power optimization decision-making method and system for distribution networks. This method aims to achieve the following objectives:

[0016] 1. Achieve online real-time response for reactive power optimization decisions in distribution networks, reducing computational latency to the millisecond level.

[0017] 2. Reduce reliance on distribution network physical parameters that are difficult to measure accurately, and improve the engineering applicability of the method.

[0018] 3. Ensure the physical rationality and high precision of optimization decisions to effectively suppress voltage over-limit.

[0019] 4. Enhance the robustness and adaptability of optimization strategies to uncertainties such as fluctuations in photovoltaic power output.

[0020] To achieve the above objectives, this invention employs a layered and integrated technical solution: the bottom layer utilizes a linearized physical model to efficiently generate "optimal" sample data covering various operational scenarios; the middle layer uses data preprocessing and augmentation techniques to improve dataset quality; and the top layer utilizes advanced machine learning techniques to learn optimal decision-making patterns from high-quality data. This ultimately forms a complete technical chain of "sample generation - data processing - model learning - real-time decision-making."

[0021] This invention provides a reactive power optimization decision-making method for distribution networks based on knowledge and data fusion, comprising:

[0022] S100. Construct an optimal power flow model for a distribution network with a high proportion of photovoltaic access, and generate a reactive power optimization decision dataset;

[0023] S200. Perform preliminary preprocessing on the reactive power optimization decision dataset, remove duplicate samples and screen key features;

[0024] S300. Based on the preprocessed dataset, construct and screen machine learning regression models;

[0025] S400. For the selected machine learning models, data quality improvement methods are used to further optimize their performance.

[0026] S500 utilizes the finalized reactive power optimization decision model to perform real-time reactive power optimization control of the distribution network.

[0027] Specifically, in S100, the construction of the optimal power flow model for a distribution network with a high proportion of photovoltaic access and the generation of a reactive power optimization decision dataset include:

[0028] Several nodes were selected in the standard distribution network test system and connected to photovoltaic generators to form a power system topology model with a high proportion of photovoltaic access.

[0029] Obtain the actual photovoltaic power output fluctuation data of the reference area within the target time period, and normalize it as the active power output of the connected photovoltaic nodes;

[0030] Construct and solve a linearized optimal power flow model, that is, construct an optimal power flow model based on the Distflow power flow equation, with the objective function being to minimize the sum of the squared differences between the voltages of each node in the system and the reference voltage;

[0031] The nonlinear Distflow equation is linearized and approximated, transforming it into a linear programming problem.

[0032] For each photovoltaic power output scenario at each time point, conventional power flow calculation and the linearized Distflow optimal power flow model are used to calculate and obtain the PV node voltage amplitude, phase angle, active power output and optimal reactive power output.

[0033] Integrate data from all time points to form an initial reactive power optimization decision dataset.

[0034] Furthermore, the linearized optimal power flow model is constructed and solved as follows:

[0035] An optimal power flow model is constructed with the objective function of minimizing the sum of the squared differences between the voltages at each node of the system and the reference voltage. Its mathematical expression is as follows: ;

[0036] The constraints include:

[0037] Linearized Distflow power balance constraints:

[0038] , ;

[0039] Node voltage constraints:

[0040] ;

[0041] Upper and lower limits of generator active and reactive power output constraints:

[0042] , ;

[0043] Assume voltage amplitude constraints at each node:

[0044] ;

[0045] This model is a convex optimization problem, which can be solved efficiently using mature mathematical programming solvers or related algorithms in MATLAB.

[0046] Furthermore, the reactive power optimization decision dataset is generated as follows:

[0047] For each point in time corresponding to a set of photovoltaic power output scenarios:

[0048] a. Using conventional power flow calculations, without reactive power optimization, calculate the operating status of the PV nodes in this scenario, including: voltage amplitude V. PV Voltage phase angle θ PV and the contribution of P PV ;

[0049] b. Using the linearized Distflow optimal power flow model, calculate the optimal reactive power output Q of the PV nodes required to achieve the most stable system voltage. PV ;

[0050] c. Use the result of a as the feature input and the result of b as the label output to form a data sample;

[0051] Integrate data from all time points to form an initial reactive power optimization decision dataset: [V PV , θ PV , P PV | Q PV ]; where V PV , θ PV , P PV Q PV All are matrices of dimension , with 3 samples and 3 PV nodes.

[0052] Specifically, in S200, the preliminary preprocessing of the reactive power optimization decision dataset includes:

[0053] Remove duplicate samples with zero photovoltaic output;

[0054] Analyze the correlation between features and output values, and eliminate feature variables that have extremely weak correlation with the optimal reactive power decision value;

[0055] The preprocessed dataset is of high quality, with its dimensionality significantly reduced.

[0056] Specifically, in S300, the construction and selection of machine learning regression models based on the preprocessed dataset includes:

[0057] Several typical machine learning regression models were selected, including decision trees, random forests, support vector regression, feedforward neural networks, and the K nearest neighbor algorithm;

[0058] The preprocessed dataset is divided into training and test sets proportionally.

[0059] Each model is trained using the training set and its performance is evaluated on the test set. Evaluation metrics include mean squared error, coefficient of determination, and model training time.

[0060] By comparing and analyzing the performance of each model, several models with small mean square error, high coefficient of determination, and acceptable training time are selected to proceed to the next stage.

[0061] Specifically, in S400, the process of further optimizing the performance of the selected machine learning models using data quality improvement methods includes:

[0062] Kernel principal component analysis, K-means clustering, and Gaussian noise methods were used to further process the preprocessed dataset;

[0063] The new datasets processed by each data quality improvement method were used to train the selected machine learning models, and their performance was evaluated.

[0064] Compare the performance changes of the model before and after each data quality improvement method, and select the method that can significantly improve the model performance.

[0065] Ultimately, the decision tree model based on Gaussian noise data augmentation was determined to be the optimal reactive power optimization decision model.

[0066] Specifically, in S500, the real-time reactive power optimization control of the distribution network using the finally determined reactive power optimization decision model includes:

[0067] Real-time measurement or acquisition of the voltage phase angle and active power output of PV nodes;

[0068] The real-time data is input into the pre-trained decision tree model, which quickly outputs the corresponding optimal reactive power output setting value.

[0069] The optimal reactive power output setting value is sent to the photovoltaic inverter or reactive power compensation equipment to execute the reactive power adjustment command.

[0070] Furthermore, the Gaussian noise method involves adding noise to the feature data with a mean of zero and a standard deviation of 10.-8 New samples are generated using Gaussian distributed random noise to increase the diversity of the dataset and the robustness of the model.

[0071] A reactive power optimization decision-making system for power distribution networks based on knowledge and data fusion includes: a data acquisition and sample generation module, a data preprocessing module, a machine learning model library and training platform, a data quality improvement and model optimization module, a real-time reactive power decision engine, and a database;

[0072] The data acquisition and sample generation module takes into account the distribution network topology parameters, historical / real-time photovoltaic output data, and load data from the external system. It generates an initial reactive power optimization decision dataset and outputs it to the data preprocessing module and the database. The data preprocessing module cleans, deduplicates, and filters the initial data to produce a high-quality, low-dimensional dataset, which is then sent to the machine learning model library and training platform for model training and stored in the database. The machine learning model that has been trained and preliminarily selected is then sent to the data quality improvement and model optimization module for further optimization. It is then combined with the training dataset from the database to form the optimal model after data augmentation or optimization. The optimal model is then sent to the real-time reactive power decision engine and stored in the database.

[0073] The machine learning models initially selected are at least one of DT, RF, or KNN models;

[0074] The optimal model is the Gaussian noise-enhanced DT model.

[0075] Specifically, the data acquisition and sample generation module includes, in sequence: a topology modeling unit, a photovoltaic data processing unit, an optimal power flow modeling unit, and a sample generation unit;

[0076] The topology modeling unit is used to select photovoltaic access nodes in a standard distribution network test system to form a power system topology model with a high proportion of photovoltaic access.

[0077] The photovoltaic data processing unit is used to acquire and standardize actual photovoltaic power output fluctuation data.

[0078] The optimal power flow modeling unit is used to construct an optimal power flow model based on linearized Distflow.

[0079] The sample generation unit is used to generate an initial dataset through conventional power flow calculation and optimal power flow calculation.

[0080] Specifically, the data preprocessing module includes, in sequence: a duplicate sample removal unit, a feature filtering unit, and a dataset reconstruction unit;

[0081] The duplicate sample removal unit is used to identify and remove repeated time samples where the photovoltaic output is zero.

[0082] The feature filtering unit is used to analyze the correlation between features and output values ​​and eliminate weakly correlated feature variables.

[0083] The dataset reconstruction unit is used to output a preprocessed, high-quality, low-dimensional dataset.

[0084] Data acquisition and sample generation module:

[0085] This module is responsible for accessing data sources such as distribution network SCADA, AMI (Advanced Metering Architecture), and photovoltaic power generation forecasting systems to obtain historical / real-time data on grid topology, load, and photovoltaic output. It has a built-in optimal power flow calculation engine capable of generating large-scale reactive power optimization decision datasets in a single step, either offline or online.

[0086] Data preprocessing module:

[0087] Receive the original dataset, perform step "2" to complete tasks such as data cleaning, duplicate sample removal, feature correlation analysis and screening, and output a high-quality training dataset.

[0088] Machine learning model libraries and training platforms:

[0089] This module integrates various machine learning algorithms (DT, RF, SVR, FNN, KNN, etc.), providing model training, hyperparameter tuning, cross-validation, and performance evaluation functions. It automatically executes the "3" steps to complete the initial screening of models.

[0090] Data quality improvement and model optimization module:

[0091] This module provides various data preprocessing and augmentation algorithms, such as KPCA, K-means, and Gaussian noise. It can further process the preprocessed dataset and drive the machine learning model to retrain and fine-tune it, performing a "4" step to finally determine the optimal model and its parameters.

[0092] Real-time reactive power decision engine:

[0093] This is the online core of the system. It loads the optimal machine learning model (such as a .pkl or .h5 file) generated by the model optimization module. It receives PV node running data from the data acquisition module in real time, performs necessary feature extraction, inputs it into the model, and immediately obtains the reactive power optimization decision result, which is then sent to the execution unit through the control interface.

[0094] database:

[0095] It is used to store historical running data, generated sample datasets, intermediate results during training, parameters of all candidate models, and complete information of the final deployed model, providing data support and persistence services for other modules.

[0096] A power distribution network reactive power optimization decision-making system based on knowledge and data fusion features a human-computer interaction and monitoring interface.

[0097] It provides operators with interfaces for system status monitoring, model performance reporting, decision result visualization, parameter configuration, and manual intervention.

[0098] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described knowledge and data fusion-based reactive power optimization decision-making method for power distribution networks.

[0099] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described knowledge and data fusion-based reactive power optimization decision-making method for power distribution networks.

[0100] A reactive power optimization decision-making method for power distribution networks based on knowledge and data fusion. This invention has the following beneficial technical effects:

[0101] It has pioneered a new paradigm of "model-data" fusion: it organically combines the "authoritativeness" of samples generated by physical models with the "agility" of data-driven model decision-making, which not only ensures the physical rationality of the decision but also achieves millisecond-level real-time response, providing a new approach to solving complex system optimization problems.

[0102] Significant improvement in computational efficiency: By transforming complex online optimal power flow calculations into offline sample generation and model training, only one efficient forward inference needs to be performed in the online phase, reducing decision latency by 2-3 orders of magnitude, perfectly meeting the real-time control requirements of large-scale distribution networks.

[0103] Highly practical and fault-tolerant: This method reduces reliance on difficult-to-obtain information such as precise line parameters, requiring only the measurement of common operating data (voltage, power angle, power), making it easier to deploy and apply in practical engineering projects. It also exhibits better tolerance for model parameter errors and measurement noise.

[0104] Excellent decision-making accuracy and robustness: The linearized optimal power flow model ensures the quality of the samples. Combined with data preprocessing and Gaussian noise enhancement techniques, the final trained machine learning model (such as DT) not only performs well on small sample test sets (R²>0.99), but also shows excellent stability and generalization ability when facing new scenarios and noisy data.

[0105] Full-process automation and intelligence: From data generation, processing, model training and optimization to final deployment decision-making, a complete automated closed loop is formed, which greatly reduces human intervention and improves the intelligence level of power distribution network operation. Attached Figure Description

[0106] The accompanying drawings illustrate exemplary embodiments of the invention and, together with the description thereof, serve to explain the principles of the invention. These drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification.

[0107] Figure 1 This is a flowchart of the data-driven reactive power optimization decision-making method for distribution networks provided in this embodiment of the invention.

[0108] Figure 2 This is a schematic diagram of the IEEE 33-node system topology for connecting photovoltaic generators constructed in an embodiment of the present invention.

[0109] Figure 3 This is a schematic diagram illustrating the principle of the random forest regression algorithm used in this embodiment of the invention.

[0110] Figure 4 This is a schematic diagram of the data augmentation principle based on Gaussian noise used in an embodiment of the present invention.

[0111] Figure 5 This is a comparison chart of the MSE performance of three machine learning models (DT, RF, KNN) before and after data quality improvement in this embodiment of the invention.

[0112] Figure 6 This is a comparison chart of the R² performance of three machine learning models (DT, RF, KNN) before and after data quality improvement in this embodiment of the invention.

[0113] Figure 7 This is a performance comparison chart of the training time of three machine learning models (DT, RF, KNN) before and after data quality improvement in this embodiment of the invention (c).

[0114] Figure 8 This is a block diagram illustrating the composition principle of a data-driven reactive power optimization decision-making system for power distribution networks, as provided in an embodiment of the present invention.

[0115] Figure 9 This is a comparison chart of the voltage deviation between the linearized Distflow optimal power flow model and the conventional power flow calculation under a typical day in this embodiment of the invention.

[0116] Figure 10 This is the final block diagram of the data-driven reactive power optimization decision-making model algorithm determined in this invention.

[0117] Figure 11 This is a comparison chart of the mean square error (MSE) of DT, RF, and KNN in an embodiment of the present invention.

[0118] Figure 12 A comparison chart of the correlation coefficients R² of DT, RF, and KNN in this embodiment of the invention.

[0119] Figure 13 A comparison chart of training time t for DT, RF, and KNN models in this embodiment of the invention. Detailed Implementation

[0120] The following is in conjunction with the appendix Figures 1 to 13 The invention will be further described in detail below with reference to specific embodiments. It is understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.

[0121] It should be noted that, unless otherwise specified, the embodiments and features described in this invention can be combined with each other. The technical solution of this invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0122] Unless otherwise stated, the exemplary embodiments / exemplifications shown are to be understood as providing exemplary features of various details that provide ways in which the technical concept of the invention can be implemented in practice. Therefore, unless otherwise stated, the features of the various embodiments / exemplifications may be additionally combined, separated, interchanged and / or rearranged without departing from the technical concept of the invention.

[0123] The use of crosshairs and / or shading in the accompanying drawings is generally used to clarify the boundaries between adjacent components. Thus, unless otherwise stated, the presence or absence of crosshairs or shading does not convey or indicate any preference or requirement for the specific material, material properties, dimensions, proportions, commonalities between the illustrated components, or any other characteristics, properties, etc., of the components. Furthermore, in the accompanying drawings, the dimensions and relative dimensions of components may be exaggerated for clarity and / or descriptive purposes. When exemplary embodiments can be implemented differently, a specific process sequence may be performed in a different order than that described. For example, two consecutively described processes may be performed substantially simultaneously or in the reverse order of their description. Moreover, the same reference numerals denote the same components.

[0124] When a component is referred to as being "on" or "above" another component, "connected to," or "joined to" another component, the component may be directly on, directly connected to, or directly joined to the other component, or there may be intermediate components. However, when a component is referred to as being "directly on" another component, "directly connected to," or "directly joined to" another component, there are no intermediate components. Therefore, the term "connection" can refer to a physical connection, an electrical connection, etc., and may or may not have intermediate components.

[0125] For descriptive purposes, the present invention may use spatial relative terms such as “below,” “under,” “below,” “down,” “above,” “above,” “higher,” and “side (e.g., in a “sidewall”)” to describe the relationship between one component and another component as shown in the accompanying drawings. In addition to the orientations depicted in the drawings, the spatial relative terms are also intended to encompass different orientations of the device during use, operation, and / or manufacture. For example, if the device in the drawings is flipped, a component described as “below” or “under” another component or feature would subsequently be positioned “above” said other component or feature. Thus, the exemplary term “below” can encompass both “above” and “below” orientations. Furthermore, the device may be otherwise positioned (e.g., rotated 90 degrees or in other orientations), thus interpreting the spatial relative descriptive terms used herein accordingly.

[0126] The terminology used herein is for the purpose of describing particular embodiments and is not intended to be limiting. As used herein, unless the context clearly indicates otherwise, the singular forms “a” and “the” are intended to include the plural forms as well. Furthermore, when the terms “comprising” and / or “including” and variations thereof are used in this specification, it indicates the presence of the stated features, integrals, steps, operations, parts, components, and / or groups thereof, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, parts, components, and / or groups thereof. It should also be noted that, as used herein, the terms “substantially,” “about,” and other similar terms are used as approximate terms rather than as terms of degree, thus explaining the inherent biases in measurements, calculated values, and / or provided values ​​that would be recognized by one of ordinary skill in the art.

[0127] This invention provides a reactive power optimization decision-making method for distribution networks based on knowledge and data fusion, comprising:

[0128] S100. Construct an optimal power flow model for a distribution network with a high proportion of photovoltaic access, and generate a reactive power optimization decision dataset.

[0129] Its core is to use physical models to generate a large number of diverse and physically optimal "input-output" sample pairs, providing high-quality "teaching materials" for subsequent machine learning, specifically:

[0130] (1) Establish a distribution network topology model with a high proportion of photovoltaic access. Select a standard distribution network test system, such as the IEEE 33-node system or the IEEE 123-node system, as the research object. Select several nodes in the system to connect photovoltaic generators.

[0131] For example, in the IEEE 33-node system, nodes 7, 18, and 33 can be selected as photovoltaic access points (PV1, PV2, PV3).

[0132] (2) Acquire and process photovoltaic power output uncertainty data. In order to simulate the real fluctuation of photovoltaic power output, historical photovoltaic power output data of the actual region is used.

[0133] For example, photovoltaic power output data for a certain location in a certain month of a certain year (e.g., March 2025) is used, with a sampling interval of 15 minutes. These actual power data are then normalized to match the power reference value of the selected distribution network model, and then used as the active power output values ​​of PV1, PV2, and PV3 at each time point.

[0134] (3) Construct an optimal power flow mathematical model based on Distflow.

[0135] The Distflow model, commonly used in distribution network analysis, is adopted as the basic power flow equation. This model can well describe the power flow of radial distribution networks, and its complete model equation is nonlinear and nonconvex.

[0136] (4) Linearize the Distflow model.

[0137] To enable rapid solution to the optimal power flow problem and transform it into a linear programming or quadratic programming problem, the Distflow model needs to be linearized. Based on the assumption that the voltage at distribution network nodes typically fluctuates within a small range around their rated values, the following simplification can be adopted:

[0138] Ignore the square term of the branch power flow (i.e., the loss term), as its value is much smaller than the power flow itself; assume the voltage amplitude of each node is U. j ≈ U sub ≈ 1 pu.

[0139] (5) Construct and solve the linearized optimal power flow model.

[0140] An optimal power flow model is constructed with the objective function of minimizing the sum of the squared differences between the voltages at each node and the reference voltage. Its mathematical expression is: .

[0141] The constraints include:

[0142] Linearized Distflow power balance constraints:

[0143] , ;

[0144] Node voltage constraints:

[0145] ;

[0146] Upper and lower limits of generator active and reactive power output constraints:

[0147] , ;

[0148] Assume voltage amplitude constraints at each node:

[0149] ;

[0150] This model is a convex optimization problem, which can be solved efficiently using mature mathematical programming solvers (such as CPLEX, gurobi) or related algorithms in Matpower.

[0151] (6) Generate reactive power optimization decision dataset.

[0152] For each point in time (corresponding to a set of photovoltaic power output scenarios):

[0153] a. Using conventional power flow calculations (such as the runpf function in matpower), without reactive power optimization, calculate the operating status of the PV nodes in this scenario, including: voltage amplitude V. PV Voltage phase angle θ PV and the contribution of P PV These data reflect the system's natural operating state under this photovoltaic output.

[0154] b. Using the linearized Distflow optimal power flow model, calculate the optimal reactive power output Q of the PV nodes required to achieve the most stable system voltage (minimum deviation). PV .

[0155] c. Use the result of a as the feature input and the result of b as the label output to form a data sample.

[0156] Integrate data from all time points to form an initial reactive power optimization decision dataset: [V PV , θ PV , P PV | QPV ]. Among them, V PV , θ PV , P PV Q PV All are matrices with dimensions (number of samples, 3) (3 PV nodes).

[0157] S200. Perform preliminary preprocessing on the reactive power optimization decision dataset.

[0158] Raw datasets typically contain redundancy and noise; the aim is to cleanse the data and improve the training efficiency and performance of subsequent machine learning models. This includes:

[0159] (1) Remove duplicate samples.

[0160] Because photovoltaic output is zero at night, a large number of time-point feature inputs ([V PV , θ PV , P PV Duplicate samples are either completely identical or highly similar. These duplicate samples are not helpful for model learning; instead, they increase the computational burden and may introduce bias. Use a program (such as Python's numpy.unique function) to identify and remove these duplicate samples.

[0161] (2) Feature correlation analysis and screening.

[0162] Analyze each feature variable (V) PV1 V PV2 ,..., θ PV1 , θ PV2 ,..., P PV1 , P PV2 ...) and the target variable (Q) PV1 Q PV2 The correlation between (, ...) can be observed. For example, by calculating the Pearson correlation coefficient or observing a scatter plot, certain features (such as the voltage amplitude V at certain PV nodes) can be identified. PV ) and optimal reactive power decision Q PV The correlation between these features and the dataset is very weak. Removing these irrelevant or weakly correlated features from the dataset can reduce data dimensionality, avoid noise interference, and improve the model's generalization ability. After filtering, the final feature set may become [θ]. PV , P PV ].

[0163] (3) Dataset reconstruction.

[0164] After the above processing, a high-quality, low-dimensional dataset is obtained, which can be used for subsequent machine learning training.

[0165] S300. Based on the preprocessed dataset, construct and screen machine learning regression models.

[0166] This is the core of the data-driven approach, designed to select the most suitable regression model from a variety of candidate models to solve the mapping problem from PV state to optimal reactive power.

[0167] (1) Selection of machine learning models.

[0168] Five representative machine learning models widely used in regression tasks were selected, including:

[0169] Decision Tree (DT): A tree-structured model that makes decisions through a series of if-trace rules, making it easy to understand and interpret.

[0170] Random Forest (RF): An ensemble learning model that combines the results of multiple decision trees to achieve higher accuracy and robustness.

[0171] Support Vector Regression (SVR): Based on statistical learning theory, it aims to find a hyperplane that makes most sample points fall within a single interval. It is good at handling high-dimensional data and small samples.

[0172] Feedforward Neural Network (FNN): A basic deep learning model that learns complex mapping relationships through nonlinear transformations of multiple layers of neurons.

[0173] K-Nearest Neighbors (KNN): A lazy learning algorithm that predicts a new input based on the output values ​​of its K nearest neighbors.

[0174] (2) Data set partitioning.

[0175] The preprocessed dataset is randomly divided into a training set (e.g., 80%) and a test set (e.g., 20%). The training set is used for learning model parameters, and the test set is used to evaluate model performance.

[0176] (3) Model training and performance evaluation.

[0177] Each model is trained separately using the training set, and the optimal configuration for each model is found through hyperparameter tuning (such as decision tree depth, number of trees in a random forest, and the K value of a KNN). Then, its performance is evaluated on the test set. Evaluation metrics include:

[0178] Mean Squared Error (MSE): The mean of the squared differences between the predicted and actual values. It measures the accuracy of the prediction; the smaller the better.

[0179] Coefficient of determination (R²): Reflects the extent to which the model explains the variation in the target variable; the closer to 1, the better.

[0180] Training time (t): The time required for the model to complete training, which measures computational efficiency.

[0181] (4) Model selection.

[0182] A comprehensive analysis of the performance of each model on the test set is conducted. For example, it may be found that:

[0183] SVR and FNN performed poorly on this problem (negative R²) and had long computation times, so they were eliminated. DT, RF, and KNN, on the other hand, all showed high R² (>0.9) and low MSE, and their training time was within an acceptable range. Therefore, DT, RF, and KNN were selected for the next stage of optimization.

[0184] S400. For the selected machine learning models, data quality improvement methods are used to further optimize their performance.

[0185] The aim is to further explore the potential of data and improve the accuracy and robustness of the final decision-making model through advanced data processing technologies.

[0186] (1) Selection of data quality improvement methods.

[0187] Three different data quality improvement strategies are introduced, including:

[0188] Kernel Principal Component Analysis (KPCA): A nonlinear dimensionality reduction method. It maps data to a high-dimensional feature space using a kernel function, and then performs principal component analysis to extract the most discriminative low-dimensional features from the data.

[0189] K-means clustering: an unsupervised clustering algorithm. It divides samples into K clusters, and then selects representative samples from each cluster, or samples based on the cluster structure, aiming to optimize the data distribution.

[0190] Gaussian noise: a data augmentation technique. It adds a Gaussian-distributed random noise with a mean of zero and a small standard deviation to the original feature data, thereby generating new, slightly different samples. This method can effectively increase the diversity of training data, simulate small fluctuations in actual operation, and improve the robustness and generalization ability of the model.

[0191] (2) Data quality improvement and model retraining.

[0192] The dataset processed in step "2" was reprocessed using the three methods described above, resulting in three new datasets. Then, the DT, RF, and KNN models selected in step "3" were retrained using these three new datasets, respectively.

[0193] (3) Performance comparison and determination of the optimal method.

[0194] The performance of each model was evaluated on the dataset augmented by different methods. Comparison revealed that KPCA and K-means did not improve performance in this instance, and may even have led to a decrease in performance (reduced R²). This indicates that simple dimensionality reduction or clustering may lose key information related to reactive decision-making. Gaussian noise data augmentation was significantly effective. After adding noise of appropriate strength (e.g., standard deviation of 1e-8), the performance of the DT and RF models was further improved, with R² very close to 1 and MSE further reduced. This shows that data augmentation effectively improves the model's generalization ability. The KNN model is not sensitive to data augmentation, and its performance improvement is limited.

[0195] (4) The final model is determined.

[0196] Taking into account MSE, R², and training time, the decision tree (DT) model based on Gaussian noise data augmentation was ultimately determined as the optimal reactive power optimization decision model for this invention. It achieves the highest prediction accuracy and robustness while maintaining the advantages of fast training speed and strong interpretability of the decision tree model.

[0197] S500. Real-time reactive power optimization control of the distribution network is performed using the finalized reactive power optimization decision model.

[0198] Deploy the trained model to the production environment, completing the final step from offline training to online application. Integrate the trained, optimal machine learning model (such as a Gaussian noise-enhanced DT model) into the distribution network dispatching system or local controller. The system collects or receives real-time operational data from PV nodes, i.e., filtered feature variables, such as voltage phase angle θ. PV And those who have contributed their efforts PV Inputting this real-time data into the model, the model instantly (in milliseconds) outputs the corresponding optimal reactive power setpoint Q. PV The setpoint is then sent to the corresponding photovoltaic inverters or other reactive power compensation equipment to execute reactive power regulation commands. Through this closed-loop control, rapid, accurate, and adaptive optimization of the distribution network voltage level is achieved.

[0199] To achieve the above method, the present invention also provides a reactive power optimization decision-making system for power distribution networks based on knowledge and data fusion, characterized in that,

[0200] It includes a data acquisition and sample generation module, a data preprocessing module, a machine learning model library and training platform, a data quality improvement and model optimization module, a real-time reactive power decision engine, and a database;

[0201] The data acquisition and sample generation module takes input from external systems (such as SCADA, photovoltaic monitoring platform, historical database) as input, including distribution network topology parameters, historical / real-time photovoltaic output data, and load data. It generates an initial reactive power optimization decision dataset and outputs it to the data preprocessing module and the database. The data preprocessing module cleans, deduplicates, and filters the initial data to produce a high-quality, low-dimensional dataset, which is then sent to the machine learning model library and training platform for model training and stored in the database. The trained and initially selected machine learning models are then output to the data quality improvement and model optimization module for further optimization. The model is then synthesized with the training dataset from the database to form the optimal model after data augmentation or optimization. This optimal model is then sent to the real-time reactive power decision engine and stored in the database.

[0202] The machine learning models initially selected are at least one of DT, RF, or KNN models.

[0203] The optimal model is the Gaussian noise-enhanced DT model.

[0204] Data acquisition and sample generation module:

[0205] This module is responsible for accessing data sources such as distribution network SCADA, AMI (Advanced Metering Architecture), and photovoltaic power generation forecasting systems to obtain historical / real-time data on grid topology, load, and photovoltaic output. It has a built-in optimal power flow calculation engine capable of generating large-scale reactive power optimization decision datasets in a single step, either offline or online.

[0206] Data preprocessing module:

[0207] Receive the original dataset, perform step "2" to complete tasks such as data cleaning, duplicate sample removal, feature correlation analysis and screening, and output a high-quality training dataset.

[0208] Machine learning model libraries and training platforms:

[0209] This module integrates various machine learning algorithms (DT, RF, SVR, FNN, KNN, etc.), providing model training, hyperparameter tuning, cross-validation, and performance evaluation functions. It automatically executes the "3" steps to complete the initial screening of models.

[0210] Data quality improvement and model optimization module:

[0211] This module provides various data preprocessing and augmentation algorithms, such as KPCA, K-means, and Gaussian noise. It can further process the preprocessed dataset and drive the machine learning model to retrain and fine-tune it, performing a "4" step to finally determine the optimal model and its parameters.

[0212] Real-time reactive power decision engine:

[0213] This is the online core of the system. It loads the optimal machine learning model (such as a .pkl or .h5 file) generated by the model optimization module. It receives PV node running data from the data acquisition module in real time, performs necessary feature extraction, inputs it into the model, and immediately obtains the reactive power optimization decision result, which is then sent to the execution unit through the control interface.

[0214] database:

[0215] It is used to store historical running data, generated sample datasets, intermediate results during training, parameters of all candidate models, and complete information of the final deployed model, providing data support and persistence services for other modules.

[0216] A power distribution network reactive power optimization decision-making system based on knowledge and data fusion features a human-computer interaction and monitoring interface.

[0217] It provides operators with interfaces for system status monitoring, model performance reporting, decision result visualization, parameter configuration, and manual intervention.

[0218] Example

[0219] In one embodiment, reference is made to Figure 1 This invention provides a data-driven reactive power optimization decision-making method for distribution networks, comprising the following steps:

[0220] S100. Construct an optimal power flow model for a distribution network with a high proportion of photovoltaic access, and generate a reactive power optimization decision dataset;

[0221] S200. Preprocess the dataset to remove duplicate samples and filter key features;

[0222] S300: Construct and screen machine learning regression models based on the preprocessed dataset;

[0223] S400. Further optimize model performance using data quality improvement methods, and determine the decision tree model based on Gaussian noise enhancement as the optimal decision model;

[0224] S500. Use the model to perform real-time reactive power optimization control of the power distribution network and output the optimal reactive power output setpoint.

[0225] Example 1: Complete implementation of the method flow.

[0226] Step S100 includes:

[0227] S101, Platform and Model: The MATLAB R2024b system environment uses the Matpower 7.1 toolkit; case33bw is used as the basic model, and its topology is shown below. Figure 2 .

[0228] Photovoltaic generators are installed at nodes 7, 18, and 33, and the type is PV node.

[0229] S102, Photovoltaic Data: The photovoltaic output data for the entire month of March 2025 from three publicly available locations abroad (at 15-minute intervals) is used, totaling 2976 time points; the original power data is normalized by dividing it by a system reference power (e.g., 10MW), and then assigned to the three PV nodes respectively.

[0230] S103. Optimal Power Flow Modeling and Solution:

[0231] The input distribution network parameter table and model decision variable table for the optimization problem are constructed as follows:

[0232] Table 1 Input distribution network parameters for the optimal power flow model

[0233] Parameter symbol Parameter meaning <![CDATA[R ij ]]> Resistance of the line connecting node i and node j <![CDATA[X ij ]]> Reactance of the line connecting node i and node j <![CDATA[P dj ]]> Active power of the load at node j <![CDATA[Q dj ]]> Reactive power of the load at node j <![CDATA[P gjmin ]]> Lower limit of active power output of generator at node j <![CDATA[P gjmax ]]> Upper limit of active power output of generator at node j <![CDATA[Q gjmin ]]> Lower limit of reactive power output of generator at node j <![CDATA[Q gjmax ]]> upper limit of reactive power output of generator at node j

[0234] Table 2 Decision Variables for Optimal Power Flow Model

[0235] Decision variable symbols Significance of decision variables <![CDATA[U j ]]> Node j voltage <![CDATA[P gj ]]> Active power output of generator at node j <![CDATA[Q gj ]]> reactive power output of generator at node j <![CDATA[P ij ]]> The active power component of the power flow connecting nodes i and j <![CDATA[Q ij ]]> The reactive power component of the power flow connecting nodes i and j

[0236] The optimization problem is as follows:

[0237] (1);

[0238] (2);

[0239] (3);

[0240] (4);

[0241] (5);

[0242] (6);

[0243] (7);

[0244] Use the runopf function in Matpower (configured to use either the linear programming LP or quadratic programming QP solver) to solve this linearized optimal power flow problem.

[0245] S104. Data Acquisition: At each time point, run runpf to perform routine power flow calculations and record V.PV , θ PV , P PV Run runopf to calculate the optimal power flow and record Q. PV The final result is an initial dataset of 2964×12 (3 PV nodes × (3 input features + 1 output) = 12).

[0246] Step S200 includes:

[0247] S201. Processing was performed using Python's Pandas and NumPy libraries. A total of 1487 samples from nighttime (output of 0) were identified and removed.

[0248] S202, Calculate each feature and Q PV The correlation coefficient matrix reveals V PV With Q PV The absolute values ​​of the correlation coefficients are all below 0.1, indicating a weak correlation. Therefore, all voltage amplitudes V are removed from the features. PV .

[0249] S203, the dataset dimension was reduced from (2964, 12) to (1477, 9). The comparison before and after processing is shown in Table 3.

[0250] Table 3 Comparison of dataset dimensionality before and after data preprocessing

[0251] Before data preprocessing After data preprocessing Dataset Dimensions (2964, 12) (1477, 9)

[0252] Step S300 includes:

[0253] S301. Environment and Tools: In the Python 3.8 environment, the Scikit-learn 1.0.2 library is used to implement DT, RF, SVR, and KNN models, and TensorFlow 2.5 is used to implement the FNN model.

[0254] S302. Dataset partitioning: Randomly partition the training set and test set by 80% / 20%.

[0255] S303, Model and Parameters:

[0256] DT: Use default parameters.

[0257] RF: The number of decision trees n_estimators was tuned from 70 to 130.

[0258] SVR: The kernel function is rbf.

[0259] FNN: The structure consists of two hidden layers (64 and 32 neurons respectively), with ReLU as the activation function, and the number of training epochs ranges from 100 to 350.

[0260] KNN: The number of neighbors k is tuned from 3 to 15.

[0261] S304. Results and Analysis: The performance evaluation results on the test set are summarized in Tables 4 to 8.

[0262] Table 4 Comparison of DT model performance before and after data preprocessing.

[0263] Before data preprocessing After data preprocessing DT model performance (6.78e-10, 0.793, 0.00797) (4.15e-10, 0.918, 0.00997)

[0264] Table 5 Comparison of RF model performance before and after data preprocessing.

[0265] Number of decision trees n Before data preprocessing After data preprocessing 70 (5.22e-10, 0.843, 0.392) (5.42e-10, 0.913, 0.365) 80 (5.26e-10, 0.842, 0.652) (5.17e-10, 0.916, 0.585) 90 (5.27e-10, 0.842, 0.531) (5.08e-10, 0.917, 0.527) 100 (5.26e-10, 0.842, 0.574) (4.93e-10, 0.919, 0.528) 110 (5.17e-10, 0.844, 0.602) (5.15e-10, 0.917, 0.591) 120 (5.19e-10, 0.843, 0.846) (5.14e-10, 0.916, 0.636) 130 (5.16e-10, 0.844, 0.719) (5.22e-10, 0.915, 0.672)

[0266] Table 6 Comparison of SVR model performance before and after data preprocessing.

[0267] Before data preprocessing After data preprocessing SVR model performance (2.47e-8, -5.17, 0.00704) (3.24e-8, -2.82, 0.00501)

[0268] Table 7 Comparison of FNN model performance before and after data preprocessing.

[0269] Number of training rounds Before data preprocessing After data preprocessing 100 (1.74e-5, -29210, 13.9) (2.50e-5, -21296, 10.3) 200 (1.17e-5, -17095, 27.5) (4.61e-6, -4959, 20.0) 250 (7.84e-5, -142502, 34.6) (1.05e-5, -3417, 25.5) 300 (2.84e-6, -7238, 39.4) (3.03e-4, -206605, 33.5) 350 (6.97e-6, -19317, 46.7) (2.36e-5, -10753, 36.5)

[0270] Table 8 Comparison of KNN model performance before and after data preprocessing.

[0271] Number of neighbors k Before data preprocessing After data preprocessing 3 (7.44e-10, 0.767, 0.00613) (5.19e-10, 0.910, 0.000997) 4 (7.35e-10, 0.774, 0.00199) (5.04e-10, 0.908, 0.000997) 5 (7.20e-10, 0.780, 0.00412) (5.07e-10, 0.909, 0.00101) 7 (6.68e-10, 0.794, 0.00199) (5.31e-10, 0.905, 0.00205) 10 (6.26e-10, 0.806, 0.00299) (5.49e-10, 0.902, 0.00109) 15 (6.15e-10, 0.804, 0.00220) (7.72e-10, 0.869, 0.00115)

[0272] SVR and FNN have negative or extremely low R² values ​​and large MSE values, and are therefore deemed unsuitable. DT, RF, and KNN all perform well, with R² values ​​greater than 0.9. Among them, RF (n=100) has the highest R² (0.919), DT has the lowest MSE (4.15e-10) and extremely fast training speed, and KNN trains the fastest but performs slightly worse. These three advance to the next round. The performance comparison visualization is as follows. Figure 11 , Figure 12 and Figure 13 As shown.

[0273] Step S400 includes:

[0274] S401. Method Implementation: Use Scikit-learn's KernelPCA, KMeans, and numpy.random.normal to implement KPCA, K-means clustering, and Gaussian noise addition, respectively.

[0275] S402. Experimental Design:

[0276] KPCA: Try different numbers of principal components (50, 100, 150, 200).

[0277] K-means: Try different numbers of clusters (6, 10, 15, 20, 25, 30).

[0278] Gaussian noise: Adds noise to the feature data with a mean of 0 and a standard deviation of [0, 1e-8, 5e-8, 5e-8, 1e-7, 5e-7, 1e-6, 1e-5, 1e-4]. 0 indicates that only samples are copied to augment the dataset.

[0279] S403, Results and Decisions: Detailed results are shown in Tables 9 to 11 of the DOC. Neither KPCA nor K-means effectively improved model performance. Gaussian noise performed best at a standard deviation of 1e-8. At this value, the performance of the DT model improved significantly from (4.15e-10, 0.918) to (5.35e-11, 0.994). The RF model also showed a similar improvement. KNN did not show a significant improvement. Figures 5-7 The performance comparison before and after the quality improvement is clearly demonstrated. Finally, "Gaussian noise (1e-8) + decision tree" is selected as the final reactive power optimization decision model.

[0280] Table 9. Performance Comparison of Three Models Before and After KPCA Quality Improvement

[0281] Do not process / KPCA parameters DT RF (n=100) KNN (k=4) No action taken (4.15e-10, 0.918, 9.97e-3) (4.93e-10, 0.919, 0.528) (5.04e-10, 0.908, 9.97e-4) 50 (2.22e-9, 0.642, 7.90e-2) (1.33e-9, 0.799, 4.29) (1.04e-9, 0.841, 9.97e-4) 100 (2.02e-9, 0.670, 0.160) (1.29e-9, 0.799, 7.98) (1.04e-9, 0.841, 9.97e-4) 150 (2.54e-9, 0.616, 0.204) (1.22e-9, 0.812, 11.0) (1.04e-9, 0.841, 1.00e-3) 200 (2.56e-9, 0.619, 0.192) (1.30e-9, 0.800, 10.2) (1.04e-9, 0.841, 9.96e-4)

[0282] Table 10 Comparison of the performance of the three models before and after K-means quality improvement.

[0283] No processing / cluster number DT RF (n=100) KNN (k=4) No action taken (4.15e-10, 0.918, 9.97e-3) (4.93e-10, 0.919, 0.528) (5.04e-10, 0.908, 9.97e-4) 6 (1.35e-9, -1.79, 9.97e-4) (3.32e-9, -1.07, 7.87e-2) (4.69e-9, -0.359, 9.97e-4) 10 (2.45e-9, -0.069, 9.97e-4) (8.00e-8, -3.78, 7.57e-2) (8.53e-10, -2.924, 9.97e-4) 15 (3.72e-8, -0.749, 9.97e-4) (4.41e-8, -0.695, 7.57e-2) (7.38e-10, -0.019, 2.99e-3) 20 (5.15e-10, 0.061, 9.97e-4) (5.01e-9, 0.611, 9.18e-2) (2.24e-9, -0.319, 9.97e-4) 25 (3.28e-10, 0.741, 9.97e-4) (9.25e-10, 0.597, 7.23e-2) (1.23e-9, -0.665, 9.97e-4) 30 (8.89e-10, -6.22, 9.95e-4) (5.55e-10, 0.138, 7.49e-2) (5.90e-10, 0.398, 9.98e-4)

[0284] Table 11 Comparison of performance of the three models before and after Gaussian noise quality improvement.

[0285] No processing / noise parameters DT RF (n=100) KNN (k=4) No action taken (4.15e-10, 0.918, 9.97e-3) (4.93e-10, 0.919, 0.528) (5.04e-10, 0.908, 9.97e-4) 0 (8.13e-11, 0.987, 1.13e-2) (1.35e-10, 0.984, 0.927) (8.48e-10, 0.900, 1.99e-3) 1e-8 (5.35e-11, 0.994, 1.32e-2) (1.35e-10, 0.984, 0.934) (8.48e-10, 0.900, 2.16e-3) 5e-8 (5.36e-11, 0.994, 2.09e-2) (1.37e-10, 0.984, 1.06) (8.48e-10, 0.900, 2.20e-3) 8e-8 (5.37e-11, 0.994, 1,40e-2) (1.35e-10, 0.984, 0.984) (8.48e-10, 0.900, 2.09e-3) 1e-7 (5.35e-11, 0.994, 1.42e-2) (1.34e-10, 0.984, 1.25) (8.48e-10, 0.900, 2.09e-3) 5e-7 (6.03e-11, 0.990, 1.70e-2) (1.34e-10, 0.984, 1.10) (8.49e-10, 0.900, 2.98e-3) 1e-6 (6.17e-11, 0.989, 1.73e-2) (1.33e-10, 0.984, 1.09) (8.49e-10, 0.900, 1.99e-3) 1e-5 (1.01e-10, 0.920, 1.80e-2) (2.04e-10, 0.927, 1.27) (9.22e-10, 0.847, 2.12e-3) 1e-4 (9.54e-9, -0.346, 2.20e-2) (6.87e-9, 0.138, 1.26) (7.11e-9, 0.177, 1.99e-3)

[0286] Step S500 includes:

[0287] S501. Export the trained optimal DT model as a .pkl file.

[0288] S502. In a simulated real-time environment, write a lightweight decision service. This service loads a model file and listens for a data interface.

[0289] S503, Simulate sending real-time data [θ] PV1 , θ PV2 , θ PV3 , P PV1 , P PV2, P PV3 The service returns the predicted [Q] within 1 millisecond. PV1 Q PV2 Q PV3 ].

[0290] See the complete algorithm flowchart. Figure 10 .

[0291] Example 2: System Deployment Example

[0292] Reference Figure 8 The system block diagram shown indicates that the system of the present invention can be deployed as follows:

[0293] The system can be deployed on the intelligent distribution network dispatch and control cloud platform of a municipal power supply company.

[0294] Data acquisition and sample generation module: Communicates with the dispatch SCADA system, distribution automation system, electricity consumption information collection system, and photovoltaic monitoring platform to acquire real-time and historical data. This module has an offline computing cluster on the cloud platform, which executes the S100 steps periodically (e.g., weekly) or on demand to update and expand the sample library using the latest network parameters and photovoltaic output data.

[0295] The data preprocessing module, the machine learning model library and training platform, and the data quality improvement and model optimization module together constitute the model training and optimization center, which also runs in an offline environment. When the sample library is updated or the algorithm is upgraded, the model retraining and optimization process (steps S200-S400) is automatically or manually triggered, producing a new generation of decision models.

[0296] Real-time reactive power decision engine: Deployed as an online service in the production environment of the cloud platform. It connects to the SCADA / distribution automation system via a high-speed data bus and subscribes to the operating data of PV nodes in real time. It loads the optimal model published by the training center and provides high-concurrency decision services.

[0297] Database: It adopts a hybrid architecture of time-series database and relational database to store massive amounts of historical running data, sample data, model metadata and version information.

[0298] Human-computer interaction and monitoring interface: Integrated into the visual interface of the dispatcher's workstation, it displays the voltage status of the entire network, the status of reactive power equipment, model decision results, confidence level, and the health status of the model itself (such as data drift alarm).

[0299] Example 3: Effect Verification and Analysis

[0300] To quantitatively evaluate the effectiveness of this invention, rigorous comparative tests were conducted on an IEEE 33-node system.

[0301] Comparison objects:

[0302] Baseline case: No reactive power optimization (PF).

[0303] Traditional method: Solve linearized Distflow optimal power flow (Online OPF) online.

[0304] The method of this invention: using a trained "Gaussian noise-DT" model for decision-making (Proposed Data-Driven).

[0305] Evaluation indicators:

[0306] Voltage quality: the degree of deviation of the system's average voltage. .

[0307] Decision speed: The average time from acquiring data to outputting a decision.

[0308] Computing resources: CPU and memory usage during the online decision-making phase.

[0309] result:

[0310] Voltage quality: Figure 9 This demonstrates that under a typical daytime condition, both the Online OPF and the Proposed method can reduce the voltage deviation from 10% of the normal power flow. -3 The magnitude was reduced to 10 -8 The magnitudes are comparable, and the effects are significant and substantial. However, the voltage fluctuations in the Only PF case are much larger.

[0311] Decision speed: The average time for solving the Online OPF is about 2.1 seconds. In contrast, the Proposed Data-Driven method has an average decision time of only 1.3 milliseconds, which is about 1600 times faster.

[0312] Computational resources: Solving the Online OPF requires calling the mathematical programming solver, which consumes a significant amount of CPU. The Proposed method only needs to perform a simple model inference once, with extremely low CPU consumption and fixed memory usage (determined by the model size).

[0313] Robustness testing:

[0314] Adding 5% random measurement noise to the test set data, the MSE of the proposed method (enhanced with Gaussian noise) increased by only 8%, while the MSE of the DT model without data augmentation increased by 25%. This indicates that the method of the present invention is more adaptable to data uncertainty.

[0315] Conclusion: The method proposed in this invention achieves a thousand-fold increase in reactive power optimization decision speed while maintaining the same optimization effect as the physical model-driven method, and exhibits excellent robustness, fully demonstrating its great potential and practical value in solving the voltage control problem of high-proportion photovoltaic distribution networks.

[0316] Those skilled in the art should understand that the above embodiments are merely for illustrating the present invention and are not intended to limit the scope of the invention. Those skilled in the art can make other changes or modifications based on the above disclosure, and these changes or modifications still fall within the scope of the present invention.

Claims

1. A power distribution network reactive power optimization decision method based on knowledge and data fusion, characterized in that, The method comprises the following steps: S100, constructing an optimal power flow model of a power distribution network with high proportion of photovoltaic access to generate a reactive power optimization decision dataset; S200, preliminarily preprocessing the reactive power optimization decision dataset to eliminate repeated samples and screen key features; S300, constructing and screening a machine learning regression model based on the preprocessed dataset; S400, further optimizing the performance of the screened machine learning model by using a data quality improvement method; S500, using the finally determined reactive power optimization decision model to perform real-time reactive power optimization control of the power distribution network.

2. The knowledge and data fusion-based reactive power optimization decision method for a power distribution network according to claim 1, wherein in S100, the construction of the optimal power flow model of the power distribution network with high proportion of photovoltaic access to generate the reactive power optimization decision dataset comprises the following steps: selecting a plurality of nodes to access photovoltaic generators in a standard power distribution network test system to form a power system topology model with high proportion of photovoltaic access; obtaining actual photovoltaic output fluctuation data of a reference region in a target time period, and normalizing the photovoltaic output fluctuation data to serve as active output of the photovoltaic access node; constructing and solving a linearized optimal power flow model, i.e., constructing an optimal power flow model based on a Distflow power flow equation to minimize the sum of squares of differences between voltages of all nodes of the system and a reference voltage as an objective function; linearizing and approximating the nonlinear Distflow equation to convert it into a linear programming problem; for each photovoltaic output scenario at a time point, performing calculation by using a conventional power flow calculation and the linearized Distflow optimal power flow model to obtain a voltage amplitude, a phase angle, active output and optimal reactive output of the PV node; integrating all time point data to form an initial reactive power optimization decision dataset.

3. The knowledge and data fusion-based reactive power optimization decision method for a power distribution network according to claim 2, wherein the construction and solution of the linearized optimal power flow model are as follows: the constraint conditions comprise: the linearized Distflow power balance constraint: The optimal power flow model is constructed by taking the sum of squared differences between voltages of each node of the system and reference voltages as an objective function, and the mathematical expression is: ; the node voltage constraint: the upper and lower limits of active and reactive output of the generator: 、 ; the assumption of the voltage amplitude constraint of each node: ; the model is a convex optimization problem, and can be efficiently solved by using a mature mathematical programming solver or a related algorithm in matpower. 、 ; 4. The knowledge and data fusion-based reactive power optimization decision method for a power distribution network according to claim 2, wherein the generation of the reactive power optimization decision dataset is as follows: ; for each time point corresponding to a group of photovoltaic output scenarios: c. the result of a is input as a feature, and the result of b is output as a label to form a data sample; 5. The knowledge and data fusion-based reactive power optimization decision method for a power distribution network according to claim 1, wherein in S200, the preliminary preprocessing of the reactive power optimization decision dataset comprises the following steps: eliminating repeated samples with zero photovoltaic output; a. Using conventional power flow calculation, the operating state of the PV node under this scenario is calculated without reactive power optimization, including: voltage amplitude V PV , voltage phase angle θ PV , and active power output P PV ; b. Using the linearized Distflow optimal power flow model, the optimal reactive power output Q of the PV node required to make the system voltage most stable is calculated PV ; analyzing the correlation between the features and the output values, and eliminating feature variables with extremely weak correlation with the optimal reactive power decision value; Integrate the data of all time points to form the initial reactive power optimization decision dataset: [V PV , θ PV , P PV | Q PV ]; wherein V PV , θ PV , P PV , Q PV are all matrices with the dimension of 3, the sample number is 3, and the matrix has 3 PV nodes. obtaining a high-quality preprocessed dataset with significantly reduced dimension. ​ ​ ​ ​ 6. The knowledge and data fusion based decision-making method for reactive power optimization of distribution network according to claim 1, characterized in that, In S300, the machine learning regression model is constructed and screened based on the pre-processed data set, including: Selecting a variety of typical machine learning regression models, including decision tree, random forest, support vector regression, feedforward neural network and K nearest neighbor algorithm; The pre-processed data set is divided into training set and test set according to the proportion; Using the training set to train each model and evaluating its performance on the test set, the evaluation indexes include mean square error, determination coefficient and model training time; Comparative analysis of the performance of each model, screening out several models with small mean square error, high determination coefficient and acceptable training time to enter the next link.

7. The knowledge and data fusion based decision-making method for reactive power optimization of distribution network according to claim 1, characterized in that, In S400, the performance of the screened machine learning model is further optimized by using data quality improvement method, including: Using kernel principal component analysis, K-means clustering and Gaussian noise method to rework the pre-processed data set; The new data set processed by each data quality improvement method is used to train the screened machine learning model respectively, and its performance is evaluated; Compare the performance changes of the models before and after each data quality improvement method, and select the method that can significantly improve the performance of the model; Finally, the decision tree model based on Gaussian noise data enhancement is determined as the optimal reactive power optimization decision-making model.

8. The knowledge and data fusion based decision-making method for reactive power optimization of distribution network according to claim 1, characterized in that, In S500, the real-time reactive power optimization control of distribution network is carried out by using the finally determined reactive power optimization decision-making model, including: Real-time measurement or acquisition of the voltage phase angle and active power output of PV node; Input the real-time data into the trained decision tree model to quickly output the corresponding optimal reactive power output set value; The optimal reactive power output set value is sent to photovoltaic inverter or reactive power compensation equipment to execute the reactive power regulation command.

9. The knowledge and data fusion based decision-making method for reactive power optimization of distribution network according to claim 7, characterized in that, The Gaussian noise method is to generate new samples by adding Gaussian distributed random noise with mean zero and standard deviation of 10 -8 to the feature data to increase the diversity of the dataset and the robustness of the model.

10. A knowledge and data fusion based decision-making system for reactive power optimization of distribution network, characterized in that, Including: Data acquisition and sample generation module, data preprocessing module, machine learning model library and training platform, data quality improvement and model optimization module, real-time reactive power decision engine, and database; The data acquisition and sample generation module inputs the power distribution network topology parameters of an external system, photovoltaic output historical / real-time data, and load data through an input end, generates an initial reactive power optimization decision dataset, and outputs the dataset to a data preprocessing module and a database, respectively. The data preprocessing module sends a high-quality, low-dimensional dataset obtained by cleaning, deduplicating, and feature screening of the initial data to a machine learning model library and a training platform for model training and storage in the database. The trained and preliminarily screened machine learning model is further optimized in the data quality improvement and model optimization module, and is combined with the training dataset from the database. Finally, an optimal model obtained through data enhancement or optimization is formed, and is sent to a real-time reactive power decision engine and stored in the database.

11. The knowledge and data fusion based decision system for optimal reactive power control of power distribution network as claimed in claim 10 wherein, Comprise: The preliminarily screened machine learning model is at least one of a DT, RF, or KNN model; The optimal model is a DT model enhanced by Gaussian noise.

12. The knowledge and data fusion-based reactive power optimization decision system for a power distribution network according to claim 10, characterized in that The data acquisition and sample generation module comprises, in sequence, a topology modeling unit, a photovoltaic data processing unit, an optimal power flow modeling unit, and a sample generation unit; The topology modeling unit is configured to select a photovoltaic access node in a standard power distribution network test system, and form a power system topology model with high proportion of photovoltaic access; The photovoltaic data processing unit is configured to obtain and normalize actual photovoltaic output fluctuation data; The optimal power flow modeling unit is configured to construct an optimal power flow model based on linearized Distflow; The sample generation unit is configured to generate an initial dataset through conventional power flow calculation and optimal power flow calculation.

13. The knowledge and data fusion-based reactive power optimization decision system for a power distribution network according to claim 10, characterized in that The data preprocessing module comprises, in sequence, a duplicate sample elimination unit, a feature screening unit, and a dataset reconstruction unit; The duplicate sample elimination unit is configured to identify and eliminate duplicate time samples with zero photovoltaic output; The feature screening unit is configured to analyze the correlation between features and output values, and eliminate weakly correlated feature variables; The dataset reconstruction unit is configured to output a high-quality, low-dimensional dataset after preprocessing.