Demand-side resources and active distribution network collaborative interactive control system and method based on double-layer machine learning

Through double-layer machine learning combined with graph neural network and XGBoost model, the reactive power and voltage optimization of the distribution network is realized, which solves the problems of large calculation amount and difficulty in applying deep reinforcement learning in the distribution network, and achieves fast and effective reactive power and voltage optimization. .

CN118199190BActive Publication Date: 2024-09-24STATE GRID JIANGSU ELECTRIC POWER CO LIANYUNGANG POWER SUPPLY CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410620767.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-20
Publication Date
2024-09-24
Estimated Expiration
2044-05-20

AI Technical Summary

Technical Problem

The existing technology has problems such as large amount of calculation and long solution time in reactive power and voltage optimization of distribution network. It is difficult to apply deep reinforcement learning technology and it is difficult to achieve online reactive power and voltage optimization.

Method used

A collaborative and interactive control system for demand-side resources and active distribution networks based on double-layer machine learning is used, combined with graph neural networks and XGBoost models, to predict distribution network node voltage and network loss data in real time through offline and online learning, and optimize distributed distribution Reactive power output of photovoltaic power source.

Benefits of technology

It achieves fast and effective reactive power and voltage optimization, avoids the shortcomings of traditional heuristic algorithms, supports the safe and stable online operation of distribution networks, and reduces the difficulty of applying deep reinforcement learning technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118199190B
    Figure CN118199190B
Patent Text Reader

Abstract

The present invention provides a demand-side resource and active distribution network coordinated interactive control system and method based on double-layer machine learning, the system comprising: collecting system raw data and performing state estimation in combination with the raw data; using the obtained distribution network data, taking active load, reactive load, solar irradiance, ambient temperature, photovoltaic reactive output and electric vehicle charging pile load in the distribution network as graph neural network input, taking voltage of each node in the distribution network and network loss of the distribution network as graph neural network output, and performing offline training on the graph neural network model; establishing a distribution network reactive voltage optimization model; solving the established optimization model to obtain the reactive output of photovoltaic power sources in the distribution network; using an extreme gradient boosting tree machine learning model to mine the nonlinear mapping relationship between the state information of each area of ​​the distribution network and the reactive output of the photovoltaic power source, so as to realize the reactive voltage optimization of the distribution network based on the double-layer machine learning model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of reactive power optimization of distribution networks, and in particular relates to a system and method for collaborative interactive control of demand-side resources and active distribution networks based on double-layer machine learning. Background Art

[0002] With the continuous advancement of carbon reduction, State Grid Corporation of China and China Southern Power Grid Corporation proposed to plan and build a new power system with new energy as the main body. Among them, the new distribution network that connects to a large number of distributed power sources, distributed energy storage and non-linear loads such as electric vehicles is the key link for the new power system to achieve the "dual carbon" goal. With the gradual increase in the penetration rate of distributed new energy in the distribution network, the power flow of the distribution network has become increasingly complex, and the boundaries between the power supply and power consumption have gradually blurred, which has brought great challenges to the voltage control of the new distribution network. The voltage over-limit problem has seriously restricted the rapid development of distributed new energy. With the accelerated advancement of electric energy substitution, non-linear loads such as electric vehicles and air conditioners have increased year by year, and the system's requirements for reactive power have also increased. The reactive power voltage optimization of the distribution network has received more and more attention.

[0003] The reactive voltage optimization model of distribution network is generally a multi-objective optimization model with distribution network loss, voltage offset, reactive compensation equipment operation cost, etc. as objective functions, safe and stable operation of distribution network as constraints, and reactive output of reactive compensation equipment as decision variables; the reactive voltage optimization model is a nonlinear non-convex optimization model, which can be solved by heuristic algorithms such as genetic algorithm and particle swarm algorithm. However, heuristic algorithms generally have problems such as large amount of calculation and long solution time, which is not convenient for online operation of reactive voltage optimization.

[0004] At present, some related studies have used convex relaxation technology to convert the reactive power optimization model of active distribution network into a second-order cone programming model. However, the use of second-order cone programming requires cone relaxation of some nonlinear constraints in the reactive voltage optimization model under certain constraints. In recent years, data-driven methods such as machine learning, deep learning, and deep reinforcement learning have been applied in the field of reactive voltage optimization of distribution networks. Some relevant researchers have used reinforcement learning algorithms to achieve reactive voltage optimization of distribution networks. The use of reinforcement learning algorithms can solve the problem of lack of historical data in supervised learning algorithms and achieve rapid optimization. However, it is difficult to build deep reinforcement learning scenarios, which makes it difficult to apply deep reinforcement learning technology in practice.

[0005] Therefore, it is necessary to invent an online reactive voltage optimization system and method that can take into account demand-side resources and meet the reactive power optimization needs of a new distribution network. Summary of the invention

[0006] The present invention mainly provides a system and method for collaborative interactive control of demand-side resources and active distribution networks based on double-layer machine learning, which solves the problem that the current deep reinforcement learning technology is difficult to apply in practice and realizes collaborative interactive control of demand-side resources and new energy distribution networks.

[0007] The technical solution to achieve the purpose of the present invention is:

[0008] A demand-side resource and active distribution network collaborative interactive control system based on double-layer machine learning, including a demand-side resource data acquisition module, an active distribution network data acquisition module, a first state estimation module, a second state estimation module, a graph neural network offline learning module, a graph neural network online learning operation module, a distribution network reactive voltage optimization model establishment module, a distribution network state data extraction module, a heuristic algorithm calculation module, a reactive power optimization data collection module and an XGBoost model offline training module, wherein:

[0009] The demand-side resource data collection module is used to collect demand-side resource data, and the second state estimation module is used to calculate the collected demand-side resource data to obtain the corresponding best estimate value closest to the actual state, and use it as an input data set for the graph neural network offline learning module;

[0010] The active distribution network data acquisition module is used to collect active distribution network data, and the first state estimation module is used to calculate the collected active distribution network data to obtain the corresponding best estimation value closest to the actual state, and use it as the output data set of the graph neural network offline learning module;

[0011] The graph neural network offline learning module trains the graph neural network in an offline manner based on the input data set and the output data set to obtain a graph neural network that meets the requirements;

[0012] The distribution network status data extraction module is used to extract the real-time data collected by the demand-side resource data acquisition module as the input of the graph neural network online learning operation module, the solution condition of the distribution network reactive voltage optimization model and the input of the XGBoost model offline training module;

[0013] The graph neural network online learning operation module is based on real-time data and uses the graph neural network trained by the graph neural network offline learning module to predict the voltage and network loss data of each node in the distribution network in real time;

[0014] The distribution network reactive power voltage optimization model establishment module is used to establish a distribution network reactive power voltage optimization model;

[0015] The heuristic algorithm calculation module solves the reactive voltage optimization model of the distribution network according to the heuristic algorithm and in combination with the graph neural network online operation module to obtain the optimal photovoltaic reactive output of the distributed photovoltaic power source in the distribution network;

[0016] The reactive power optimization data collection module collects the optimal reactive power output of the distributed photovoltaic power source in the distribution network obtained by solving the problem;

[0017] The XGBoost model offline training module takes the data extracted by the distribution network state data extraction module as input and the optimal reactive power collected by the reactive power optimization data collection module as output to train the XGBoost model and obtain an XGBoost model that meets the requirements.

[0018] A method for coordinated interactive regulation of demand-side resources and active distribution networks based on double-layer machine learning, comprising the steps of:

[0019] The demand-side resource data collection module collects the demand-side resource data, and the second state estimation module calculates the collected original data to obtain the corresponding best estimate value closest to the actual state, and uses it as the input data set of the graph neural network offline learning module;

[0020] The active distribution network data is collected by the active distribution network data collection module, and the first state estimation module calculates the collected active distribution network data to obtain the corresponding best estimation value closest to the actual state, and uses it as the output data set of the graph neural network offline learning module;

[0021] Based on the input data set and the output data set, the graph neural network offline learning module trains the graph neural network offline to obtain a graph neural network that meets the requirements;

[0022] Extract the real-time data collected by the demand-side resource data acquisition module as the input of the graph neural network online learning operation module, the solution condition of the distribution network reactive power and voltage optimization model, and the input of the XGBoost model offline training module;

[0023] The graph neural network online learning operation module is based on real-time data and uses the graph neural network trained by the graph neural network offline learning module to predict the voltage and network loss data of each node in the distribution network in real time;

[0024] The heuristic algorithm calculation module solves the reactive voltage optimization model of the distribution network according to the heuristic algorithm and combines it with the graph neural network online operation module to obtain the optimal photovoltaic reactive output of the distributed photovoltaic power source in the distribution network;

[0025] The reactive power optimization data collection module collects the optimal reactive power output of the distributed photovoltaic power source in the distribution network obtained by solving the problem;

[0026] The XGBoost model offline training module uses the data extracted by the distribution network state data extraction module as input and the reactive power collected by the reactive power optimization data collection module as output to train the XGBoost model and obtain an XGBoost model that meets the requirements;

[0027] The optimal reactive power output is predicted through the XGBoost model to achieve coordinated interactive regulation of demand-side resources and new energy distribution networks.

[0028] Compared with the prior art, the beneficial effects of the present invention are: (1) After training the XGBoost model, the optimal reactive power output can be obtained faster; (2) The graph neural network online learning operation module is based on real-time data, and the graph neural network trained by the graph neural network offline learning module is used to predict the voltage and network loss data of each node in the distribution network in real time; (3) It avoids the traditional heuristic algorithm to solve the reactive power optimization model, and can quickly perform reactive power optimization, which is conducive to the safe, stable and economical operation of the distribution network online, and solves the problem that the current deep reinforcement learning technology is difficult to apply in practice. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 Schematic diagram of the graph convolutional network structure.

[0030] Figure 2 Schematic diagram of the Boosting framework.

[0031] Figure 3 Schematic diagram of eigenvalue selection.

[0032] Figure 4 This is a schematic diagram of an electrical system application of a preferred embodiment of a collaborative interactive control system of demand-side resources and active distribution networks based on double-layer machine learning. DETAILED DESCRIPTION

[0033] Combination Figure 4 , a demand-side resource and active distribution network coordinated interactive control system based on double-layer machine learning, in order to achieve coordinated interactive control of demand-side resources and new energy distribution network, specifically including active load acquisition module 1, reactive load acquisition module 2, solar irradiance acquisition module 3, ambient temperature acquisition module 4, photovoltaic reactive output acquisition module 5, electric vehicle charging pile load characteristic acquisition module 6, node voltage acquisition module 7, power grid loss acquisition module 8, first state estimation module 9, second state estimation module 10, graph neural network offline learning module 11, graph neural network online learning operation module 12, distribution network reactive voltage optimization model establishment module 13, distribution network state data extraction module 14, heuristic algorithm calculation module 16, reactive optimization data collection module 15 and XGBoost model offline training module 17.

[0034] The active load acquisition module 1 collects the active load data of the PQ nodes in the distribution network; the reactive load acquisition module 2 collects the reactive load data of the PQ nodes in the distribution network; the solar irradiance acquisition module 3 collects the solar irradiance data of the distributed photovoltaic power supply nodes connected to the distribution network; the ambient temperature acquisition module 4 collects the ambient temperature data of the distributed photovoltaic power supply nodes connected to the distribution network; the photovoltaic reactive output acquisition module 5 collects the reactive output data of the distributed photovoltaic power supply connected to the distribution network; the electric vehicle charging pile load characteristic acquisition module 6 collects the load data of the electric vehicle charging piles in the distribution network.

[0035] The node voltage acquisition module 7 acquires voltage data of each node of the distribution network, and the distribution network loss acquisition module 8 acquires distribution network loss data.

[0036] The first state estimation module 9 and the second state estimation module 10 calculate the collected original data (including active and reactive loads, solar irradiance, ambient temperature, photovoltaic reactive output, and electric vehicle charging pile load) according to the measurement accuracy and Kirchhoff's law according to the best estimation criterion to obtain the best estimation value closest to the actual state of the system.

[0037] The graph neural network offline learning module 11 uses the active load, reactive load, solar irradiance, ambient temperature, photovoltaic reactive output and electric vehicle charging pile load in the distribution network as graph neural network input, and uses the voltage of each node in the distribution network and the network loss of the distribution network as graph neural network output, and trains the graph neural network offline.

[0038] The graph neural network online learning operation module 12 can obtain the voltage and network loss of each node in the distribution network based on the operating status data of the distribution network (active load, reactive load, solar irradiance, ambient temperature, photovoltaic reactive output and electric vehicle charging pile load) and the trained graph neural network.

[0039] The distribution network reactive power voltage optimization model establishment module 13 is used to establish a reactive power optimization model with the goal of minimizing distribution network loss and distribution network voltage deviation, the constraint of safe and stable operation of the distribution network, and the reactive power output of photovoltaic power as the decision variable.

[0040] The distribution network status data extraction module 14 extracts the operating status data of the distribution network, including the active load, reactive load, solar irradiance, ambient temperature, photovoltaic reactive output and electric vehicle charging pile load of the distribution network, and uses it as the solution condition of the reactive voltage optimization model.

[0041] The heuristic algorithm calculation module 16 calculates the optimal reactive power output of the distributed photovoltaic power source in the distribution network according to the heuristic algorithm and in combination with the graph neural network online operation module.

[0042] The reactive power optimization data collection module 15 collects the optimal reactive power output of distributed photovoltaic power sources in the distribution network obtained by solving the heuristic algorithm calculation module.

[0043] The XGBoost model offline training module 17 takes the operating status of the distribution network as input and takes the optimal reactive output of the distributed photovoltaic power sources in the distribution network as output to train the XGBoost model.

[0044] In this patent, a graph convolutional neural network is selected for training.

[0045] Graph convolutional neural network: Based on the design idea of ​​Chebyshev network, Kipf et al. proposed a classic graph convolutional network to further simplify the network structure and reduce the amount of calculation. This method limits the polynomial convolution kernel in the Chebyshev network to order 1, so that the calculation of graph convolution can be approximated as a linear function of the symmetric normalized Laplacian matrix. Although such a restriction brings about the problem that nodes can only be affected by the surrounding 1st-order neighboring points, by superimposing such multiple layers of graph convolution layers, the influence of the node can be extended to the order neighboring nodes, and the node's dependence on the order neighboring nodes can also become more flexible. In practice, superimposing multiple layers of 1st-order graph convolution and node diffusion has also achieved good results. Since the maximum eigenvalue of the Laplacian matrix can be approximately taken as λmax=2, the expression of the 1st-order graph convolution is:

[0046]

[0047] matrix The eigenvalue range of is between [0, 2]. Multiple iterations may lead to numerical instability and gradient explosion or diffusion problems. To alleviate this problem, a normalization operation is required to make the eigenvalue range of the matrix within [0, 1]. Specifically, define the matrix , where the diagonal matrix Elements , after normalization, it can be updated:

[0048]

[0049] The convolution operation is updated as Expand the graph signal to (which is equivalent to having n nodes and each node has c-dimensional attributes, X is the initial attribute matrix of all nodes):

[0050]

[0051] Where: is the parameter matrix, is the output after graph convolution.

[0052] Multiple layers of graph convolution are stacked to construct a graph convolutional network, such as Figure 1 As shown; the first layer of the network is Represents the node matrix of this layer, and uses Represents the parameter matrix of this layer; define the symbol is a convolution operation, then the convolution of each layer of the graph based on the activation function σ(·) is defined as:

[0053]

[0054] In a possible implementation, the objective function is established based on the distribution network loss and the distribution network voltage deviation as the optimization target:

[0055]

[0056] Wherein, f represents the objective function, represents the first weight coefficient, Represents the second weight coefficient.

[0057] The relationship between the reactive output and current of the photovoltaic power source includes:

[0058] The relationship between the reactive output of photovoltaic power source and the rated apparent power and active output is:

[0059]

[0060] In the formula, S max P is the rated apparent power of the photovoltaic power source; PV It is the active output of photovoltaic power source.

[0061] When the reactive power output of the photovoltaic power source is zero, the IGBT current in the photovoltaic power source for

[0062]

[0063] In the formula, is the effective value of the AC side voltage of the inverter in the distribution network.

[0064] When the reactive power output of the photovoltaic power source is not zero, the IGBT current in the photovoltaic power source for

[0065]

[0066]

[0067] In the formula, S is the output apparent power of the photovoltaic power source; It is the reactive power output of photovoltaic power source.

[0068] In a possible implementation, the heuristic algorithm calculation module 16 uses a particle swarm algorithm to solve the reactive power voltage optimization model of the distribution network.

[0069] In general, the hyperparameters in the XGBoost model can be determined by trial and error, but the trial and error method can only obtain a relatively good XGBoost model, and there is a large degree of randomness and contingency, and the performance of the XGBoost algorithm cannot be fully utilized. In this regard, the present invention uses Bayesian theory to optimize the XGBoost machine learning model.

[0070] XGBoost (eXtreme Gradient Boosting) is an algorithm toolkit (including engineering implementation) based on the Boosting framework. It is very powerful in parallel computing efficiency, missing value processing, and prediction performance. Figure 2 As shown, specifically including:

[0071] 1. Algorithm Principle

[0072] 1.1 Second-order Taylor expansion of the objective function

[0073] Like GBDT, XGBoost is an additive model that optimizes only the sub-model in the current step in each iteration. In the mth step:

[0074]

[0075] is the sub-model of the current step, To train the first m-1 sub-models that have been fixed, the objective function is empirical risk + structural risk (regular term):

[0076]

[0077] The regularization term Ω(f) represents the complexity of the sub-model and has nothing to do with the second-order Taylor expansion.

[0078] Taylor's formula is a method of approximating a function f(x) with an n-order derivative at x=x0 using an n-order polynomial about Δx=x-x0. XGBoost uses a second-order expansion to approximate the loss function.

[0079]

[0080] Will Assuming x0, Assuming Δx, As about Function, we can get: The first m-1 sub-models have been determined, so except for The parts are all constants and do not affect Optimization solution. The objective function can be transformed into:

[0081]

[0082] In the formula,

[0083]

[0084] Where L is the loss function, which measures the quality of a prediction. When it is determined, a and .

[0085] 1.2 Tree-based Regularization

[0086] The base classifiers supported by XGBoost include decision trees and linear models. To prevent overfitting, XGBoost sets the tree-based complexity as a regularization term:

[0087]

[0088] T is the number of leaf nodes of tree f, Output a vector of regression values ​​for all leaf nodes, is the square of the L2 norm (modulus) of the vector, and γ and λ are hyperparameters.

[0089] Based on the above objective function and regularization term, the objective function is as follows:

[0090]

[0091] Next, a mathematical process is used to combine the regularization term and the empirical risk term. The empirical risk term is summed at the sample level and converted to the sum at the leaf node level.

[0092] Define the sample set on node j as ,in is the index function that maps samples to leaf nodes, and the regression value on leaf node j is , then:

[0093]

[0094] Further simplifying the expression, let , pay attention here and They are all functions of j:

[0095]

[0096] At this point, if the structure of a tree has been determined, the samples in each node It is also certain that G j , H j , T It is determined that the regression value output by each leaf node should minimize the above formula, which is determined by the extreme point of the quadratic function:

[0097]

[0098] After outputting the regression value according to this rule, the objective function value, that is, the score of the tree, is as follows. The smaller the value, the better the tree structure. Observe the following formula, the score of the tree can also be understood as the sum of the scores of all leaf nodes:

[0099]

[0100] 1.3 Node Splitting Criteria

[0101] XGBoost's sub-model tree is the same as the decision tree model, relying on the greedy criterion of node recursive splitting to achieve tree generation. In addition, XGBoost also supports approximate algorithms to solve the problem of excessive data volume exceeding memory or parallel computing requirements.

[0102] 1.3.1 Greedy Principle

[0103] The basic idea is the same as CART. After sorting the eigenvalues, traverse the partition points, take the optimal split benefit as the split benefit of the feature, select the feature with the optimal split benefit as the partition feature of the current node, and perform binary partitioning according to its optimal partition point to obtain the left and right subtrees.

[0104] 1.3.2 Approximate Algorithms

[0105] XGBoost also provides an approximate version of the above greedy criterion. In short, feature quantiles are used as candidate points for partitioning, which reduces the set of candidate points for partitioning from traversing all samples to traversing between several quantiles.

[0106] Specifically, there are two optional strategies for selecting feature quantiles: global and local. The global strategy is to select from the feature values ​​of all samples, which can be performed once before the root node is split; the local strategy is to select from the feature values ​​of the samples contained in the node to be split, which must be performed before each node is split. Usually, the global strategy can only be divided once, so the division granularity needs to be finer.

[0107] 1.3.3 Weighted Quantile

[0108] Looking at the objective function above, setting the partial derivative to 0 easily yields , this objective function is understood as h i is the weight, is the quadratic loss function of the label:

[0109]

[0110] Therefore, when the approximate algorithm takes the quantile, XGBoost actually takes the second-order derivative h i , is the weighted quantile (WeightedQuantile Sketch).

[0111] 1.4 Column Sampling and Learning Rate

[0112] XGBoost also introduces two features: column sampling and learning rate.

[0113] Column sampling is a method used in random forests. The set of selected features for each node split is not all the remaining features, but a subset of the remaining features. This is to better combat overfitting and reduce computational overhead.

[0114] The learning rate, or shrinkage, is multiplied by the coefficient before each sub-model (i.e., on the regression value of each leaf node) to weaken the influence of each tree and make the iteration more stable. The default setting of XGBoost is 0.3.

[0115] 1.5 Sparse Perception

[0116] The missing value coping strategy is something that the algorithm needs to consider. Feature sparsity also needs to be considered, such as when some features have a large number of zeros or are simply one-hot encoded. XGBoost uses a sparse-aware strategy to handle both problems at the same time: in general, missing values ​​and sparse zero values ​​are treated as missing values, and then these missing values ​​are "bound" together, and the traversal of the split node will skip the entirety of the missing values, which greatly improves the computational efficiency.

[0117] The split nodes are still obtained by traversal. There are two directions for NA, based on which the non-missing values ​​are split and traversed. Alternatively, NA is divided into a fixed direction, and the non-missing values ​​are split and traversed in ascending and descending order.

[0118] like Figure 3 As shown in the figure, if a feature value is 1, 2, 5 and a large number of NA, XGBoost will traverse the above 6 cases (3 non-missing value split points x two directions of missing values), and the maximum split benefit is the split benefit on this feature. At the same time, NA will be divided into the right node.

[0119] 2. Engineering Optimization

[0120] 2.1 Parallel block design

[0121] XGBoost sorts each column of features in advance, stores them in the cache in the form of blocks, and indexes the feature values ​​and gradient statistics. , Correspondingly, the sorted blocks are called repeatedly each time a node splits, and different features are distributed in independent blocks, so distributed or multi-threaded computing can be performed.

[0122] 2.2 Cache Access

[0123] After sorting the eigenvalues, the gradient is taken by index , , which will lead to inconsistent memory space access, thus reducing the cache hit rate and affecting the efficiency of the algorithm. To solve this problem, XGBoost allocates a separate continuous cache area for each thread to store gradient information.

[0124] 2.3 Out-of-core block computation

[0125] When the amount of data is too large, it cannot be loaded into the memory at the same time. XGBoost divides the data into multiple blocks and stores them on the hard disk. It uses an independent thread to read data from the disk into the memory, so as to realize the simultaneous calculation and reading of data. In order to further improve the performance of disk reading data, XGBoost also uses two methods: one is to compress the block and exchange the decompression cost for the disk reading cost; the other is to store the block in multiple disks, which helps to improve the disk throughput.

[0126] 3. The model expression of the XGBoost model is:

[0127]

[0128] In the formula, Indicates The model prediction value corresponding to the sample data is represents the number of decision trees, Representing function space Middle The data sample corresponds to function values, Indicates the input Sample data, Indicates The leaf node weight of the corresponding leaf node where each sample data falls.

[0129] The training process of the XGBoost model is essentially a learning process, which is used to learn the nonlinear mapping relationship between historical state information and historical optimal output. By continuously training the decision tree, the gap between the output result of the entire model and the actual result (that is, the historical optimal output) is narrowed until the gap between the output result of the entire model and the actual result is less than the preset value, the training is completed, and the optimal output XGBoost model is obtained.

[0130] The gap between the output results of the entire model and the actual results can be expressed by the objective function. When the objective function is less than the preset value, the training is completed and the optimal output XGBoost model is obtained.

[0131] Based on the calculation process of the above XGBoost model, the XGBoost model, as a supervised ensemble learning model, can be understood as a summation model of multiple decision trees. Assuming that the model has k decision trees, that is,

[0132]

[0133]

[0134] Where k is the number of trees; is a function in the function space F; The calculated value of the optimal reactive power output of the photovoltaic power source of the XGBoost model; For the input individual data; Representation sample Fall to the corresponding leaf node; Representation sample The leaf node weight that falls to the corresponding leaf node.

[0135] The XGBoost objective function is divided into two parts, the first part is the loss difference function, and the second part is the regularization term.

[0136]

[0137]

[0138] In the formula, is the optimal reactive power output historical data of photovoltaic power source; T is the number of leaf nodes; is the penalty coefficient of T; is the leaf node weight; n is the number of samples, k is the number of trees, is the optimal reactive power output calculation value of the photovoltaic power source, L represents the objective function, l represents the loss difference function, is the complexity of k trees, is the function value at point j in Gaussian process regression; is the L2 regularization term.

[0139] When training to the tth tree, the objective function is

[0140]

[0141] Since the first t-1 regression trees have been obtained, they have no effect on the optimization process of the tth tree, so the objective function can be simplified to

[0142]

[0143] Rewrite the objective function into a leaf node traversal

[0144]

[0145] According to the Taylor series expansion of the binary function, removing the constant term, we can get

[0146]

[0147]

[0148]

[0149] when hour, Get the minimum value, that is

[0150]

[0151] As described above, based on actual application situations, when historical status information is used as input information, only the parameters that have changed, such as light intensity, ambient temperature, active load, and reactive load, need to be used as input information of the XGBoost model.

[0152] In summary, the present invention collects the original data of the system and performs state estimation in combination with the original data; uses the obtained distribution network data, takes the active load, reactive load, solar irradiance, ambient temperature, photovoltaic reactive output and electric vehicle charging pile load in the distribution network as the graph neural network input, and takes the voltage of each node in the distribution network and the network loss of the distribution network as the graph neural network output to perform offline training on the graph neural network model; establishes a distribution network reactive voltage optimization model; solves the established optimization model to obtain the reactive output data of photovoltaic power sources in the distribution network; uses the extreme gradient boosting tree machine learning model to mine the nonlinear mapping relationship between the state information of each area of ​​the distribution network and the reactive output of the photovoltaic power source, and realizes the reactive voltage optimization of the distribution network based on the double-layer machine learning model.

[0153] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0154] As described above, the present invention has been described in detail. Obviously, the present invention is not limited to the given embodiments. As long as they do not substantially deviate from the inventive point and effect of the present invention and various modifications that can be made by technicians familiar with the field are also included in the protection scope of the present invention.

Claims

1. A collaborative interactive control system of demand-side resources and active distribution network based on double-layer machine learning, characterized in that: It includes demand-side resource data acquisition module, active distribution network data acquisition module, first state estimation module, second state estimation module, graph neural network offline learning module, graph neural network online learning operation module, distribution network reactive power voltage optimization model establishment module, distribution network state data extraction module, heuristic algorithm calculation module, reactive power optimization data collection module and XGBoost model offline training module, among which, The demand-side resource data collection module is used to collect demand-side resource data, and the second state estimation module is used to calculate the collected demand-side resource data to obtain the corresponding best estimate value closest to the actual state, and use it as an input data set for the graph neural network offline learning module; The active distribution network data acquisition module is used to collect active distribution network data, and the first state estimation module is used to calculate the collected active distribution network data to obtain the corresponding best estimation value closest to the actual state, and use it as the output data set of the graph neural network offline learning module; The graph neural network offline learning module trains the graph neural network in an offline manner based on the input data set and the output data set to obtain a graph neural network that meets the requirements; The distribution network status data extraction module is used to extract the real-time data collected by the demand-side resource data acquisition module as the input of the graph neural network online learning operation module, the solution condition of the distribution network reactive voltage optimization model and the input of the XGBoost model offline training module; The graph neural network online learning operation module is based on real-time data and uses the graph neural network trained by the graph neural network offline learning module to predict the voltage and network loss data of each node in the distribution network in real time; The distribution network reactive power voltage optimization model establishment module is used to establish a distribution network reactive power voltage optimization model; The heuristic algorithm calculation module solves the reactive voltage optimization model of the distribution network according to the heuristic algorithm and in combination with the graph neural network online operation module to obtain the optimal photovoltaic reactive output of the distributed photovoltaic power source in the distribution network; The reactive power optimization data collection module collects the optimal reactive power output of the distributed photovoltaic power source in the distribution network obtained by solving the problem; The XGBoost model offline training module takes the data extracted by the distribution network state data extraction module as input and the optimal reactive power collected by the reactive power optimization data collection module as output to train the XGBoost model and obtain an XGBoost model that meets the requirements.

2. According to claim 1, a demand-side resource and active distribution network collaborative interactive control system based on double-layer machine learning is characterized in that: The demand-side resource data acquisition module includes an active load acquisition module, a reactive load acquisition module, a solar irradiance acquisition module, an ambient temperature acquisition module, a photovoltaic reactive output acquisition module, and an electric vehicle charging pile load acquisition module, which are respectively used to collect active load data of PQ nodes in the distribution network, reactive load data of PQ nodes in the distribution network, solar irradiance data of distributed photovoltaic power supply nodes connected to the distribution network, ambient temperature data of distributed photovoltaic power supply nodes connected to the distribution network, reactive output data of distributed photovoltaic power supplies connected to the distribution network, and load data of electric vehicle charging piles in the distribution network.

3. According to the demand-side resource and active distribution network collaborative interactive control system based on double-layer machine learning in claim 1, it is characterized in that: The active distribution network data acquisition module includes a node voltage acquisition module and a distribution network loss acquisition module, which are respectively used to collect voltage data of each node in the distribution network and distribution network loss data.

4. According to claim 1, a demand-side resource and active distribution network collaborative interactive control system based on double-layer machine learning is characterized in that: The first state estimation module and the second state estimation module calculate and estimate the collected data according to the measurement accuracy and Kirchhoff's law and the best estimation criterion.

5. According to the demand-side resource and active distribution network collaborative interactive control system based on double-layer machine learning in claim 1, it is characterized in that: The distribution network reactive voltage optimization model aims to minimize the distribution network loss and the distribution network voltage deviation, takes the safe and stable operation of the distribution network as a constraint, and takes the photovoltaic reactive output as a decision variable.

6. According to claim 5, a demand-side resource and active distribution network collaborative interactive control system based on double-layer machine learning is characterized in that: The objectives of the distribution network reactive power voltage optimization model are: ; In the formula, f represents the objective function, represents the first weight coefficient, represents the second weight coefficient, is the distribution network loss, is the voltage offset of the distribution network.

7. According to claim 1, a demand-side resource and active distribution network collaborative interactive control system based on double-layer machine learning is characterized in that: The graph neural network is constructed by stacking multiple layers of graph convolution. Represents the node matrix of the lth layer of the network, and Represents the parameter matrix of this layer, and defines is a convolution operation, then the convolution of each layer of the graph based on the activation function σ(·) is , , is a diagonal matrix whose elements , A is the adjacency matrix, is the identity matrix, For the matrix elements.

8. According to the demand-side resource and active distribution network collaborative interactive control system based on double-layer machine learning in claim 1, it is characterized in that: The XGBoost model is trained using Bayesian optimization, and column sampling and learning rate are introduced. The model is: ; ; In the formula, is the optimal reactive power output historical data of photovoltaic power source; T is the number of leaf nodes; γ is the penalty coefficient of T; λ is the weight of leaf node; n is the number of samples, k is the number of trees, is the calculated value of the optimal reactive power output of the photovoltaic power source, L represents the objective function, l() represents the loss difference function, is the complexity of k trees, f j is the function value at point j in Gaussian process regression; is the regularization term.

9. The collaborative interactive control system of demand-side resources and active distribution network based on double-layer machine learning according to claim 8 is characterized in that: The minimum value of L is: ; ; ; in, and is the intermediate process parameter.

10. A method for collaborative interactive control of demand-side resources and active distribution networks based on double-layer machine learning of the system described in any one of claims 1 to 9, characterized in that: Includes steps: The demand-side resource data collection module collects the demand-side resource data, and the second state estimation module calculates the collected original data to obtain the corresponding best estimate value closest to the actual state, and uses it as the input data set of the graph neural network offline learning module; The active distribution network data is collected by the active distribution network data collection module, and the first state estimation module calculates the collected active distribution network data to obtain the corresponding best estimation value closest to the actual state, and uses it as the output data set of the graph neural network offline learning module; Based on the input data set and the output data set, the graph neural network offline learning module trains the graph neural network offline to obtain a graph neural network that meets the requirements; Extract the real-time data collected by the demand-side resource data acquisition module as the input of the graph neural network online learning operation module, the solution condition of the distribution network reactive power and voltage optimization model, and the input of the XGBoost model offline training module; The graph neural network online learning operation module is based on real-time data and uses the graph neural network trained by the graph neural network offline learning module to predict the voltage and network loss data of each node in the distribution network in real time; The heuristic algorithm calculation module solves the reactive voltage optimization model of the distribution network according to the heuristic algorithm and combines it with the graph neural network online operation module to obtain the optimal photovoltaic reactive output of the distributed photovoltaic power source in the distribution network; The reactive power optimization data collection module collects the optimal reactive power output of the distributed photovoltaic power source in the distribution network obtained by solving the problem; The XGBoost model offline training module uses the data extracted by the distribution network state data extraction module as input and the optimal reactive power collected by the reactive power optimization data collection module as output to train the XGBoost model and obtain an XGBoost model that meets the requirements; The optimal reactive power output is predicted through the XGBoost model to achieve coordinated interactive regulation of demand-side resources and new energy distribution networks.