Reactive power optimization method and system for distribution network based on BP neural network and scenario matching

Through BP neural network and scene matching technology, the problem of voltage quality reduction in the distribution network after accessing random load is solved, reactive power optimization and voltage management are realized, power supply reliability and matching efficiency are improved, and distribution network automation is solved The problem of insufficient level and renewable energy consumption capacity.

CN114583696BActive Publication Date: 2024-11-05STATE GRID JIANGSU ELECTRIC POWER CO LTD RESEARCH INSTITUTE +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210242974.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-11
Publication Date
2024-11-05
Estimated Expiration
2042-03-11

AI Technical Summary

Technical Problem

After the distribution network is connected to distributed photovoltaics, energy storage systems and electric vehicle charging stations, the grid characteristics are complex, which can easily lead to a reduction in voltage quality, affecting power supply reliability, and insufficient consumption capacity of renewable energy and low automation level. The scheduling method is lagging behind.

Method used

Using a BP neural network and scene matching method, classifying optimized scenarios through classification rules, using historical scene library to match key control objects and regulation strategies, and generating optimization strategies based on multi-objective particle swarm optimization algorithm to realize reactive optimization and voltage management , improve voltage quality and power supply reliability.

Benefits of technology

Without relying on distribution network models and parameters, the distribution network reactive optimization and voltage management for accessing random loads is realized, which improves voltage quality and power supply reliability, improves matching speed and accuracy, and significantly reduces system voltage Deviation and active network loss.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114583696B_ABST
    Figure CN114583696B_ABST
Patent Text Reader

Abstract

The present invention discloses a distribution network reactive power optimization method and system based on BP neural network and scenario matching in the field of distribution network optimization and control technology. The method comprises: classifying the optimization scenarios according to the set classification rules; matching the classified optimization scenarios with the established historical scenario library to obtain the corresponding key control objects and control strategies. The present invention directly generates the historical scenario library by using the operation big data of the distribution network, fully considers the characteristics of the operation scenarios in the reactive power optimization and voltage management problems of the distribution network connected to random loads, matches the optimization scenarios with the established historical scenario library to obtain the corresponding key control objects and control strategies, and can realize reactive power optimization and voltage management of the distribution network connected to random loads without relying on the distribution network model and parameters, thereby improving the voltage quality and power supply reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of distribution network optimization and control, and in particular relates to a distribution network reactive power optimization method and system based on BP neural network and scene matching. Background Art

[0002] The continuous growth of electricity demand, the shortage of traditional energy and the opening of the electricity market are driving the distribution network to develop in an efficient, flexible, intelligent and sustainable way. In order to adapt to the development of technology, the distribution network has been connected to distributed photovoltaic (PV), energy storage systems and electric vehicle (EV) charging stations on a large scale, which has greatly improved the low carbon and intelligence of the distribution network. As a result, the characteristics of the power grid are becoming increasingly complex. Photovoltaic power generation has strong randomness and volatility, which can easily lead to reverse flow of distribution network feeders, voltage over-limit and other voltage quality problems, affecting the power supply reliability of the network; at the same time, the current distribution network still has problems such as insufficient renewable energy absorption capacity, weak primary grid, low automation level and backward dispatching methods. Summary of the invention

[0003] In order to address the deficiencies in the prior art, the present invention provides a distribution network reactive power optimization method and system based on BP neural network and scenario matching, which can realize reactive power optimization and voltage management of the distribution network connected to random loads without relying on the distribution network model and parameters, thereby improving the voltage quality and power supply reliability.

[0004] In order to achieve the above object, the technical solution adopted by the present invention is:

[0005] In a first aspect, a method for reactive power optimization of a distribution network is provided, comprising: classifying the scenarios to be optimized according to set classification rules; matching the classified scenarios to be optimized with an established historical scenario library to obtain corresponding key control objects and regulation strategies.

[0006] Furthermore, the method for establishing the historical scenario library comprises: establishing a historical scenario library based on the historical data of distribution network operation, the historical scenario library comprising at least three types of optimization objectives: avoiding the voltage from exceeding the upper limit, avoiding the voltage from exceeding the lower limit, and reducing network losses; on the basis of the historical scenario library, taking distributed photovoltaics, energy storage devices, and electric vehicle charging piles as control objects, taking minimizing voltage deviation and minimizing network losses as optimization objectives, generating a historical strategy library based on a multi-objective particle swarm optimization algorithm and storing key control objects and their control strategies.

[0007] Furthermore, the objective function of reactive power optimization is PV output (P PV ,Q PV ), energy storage capacity (P S ,Q S ) and the electric vehicle charging station power (P EV,Q EV ) function:

[0008] min F(P PV ,Q PV ,P S ,Q S ,P EV ,Q EV ) (1).

[0009] Furthermore, the set classification rules include: according to the three types of optimization objectives in the historical scenario library, the scenarios to be optimized are divided into three categories: the Newton-Raphson algorithm is used to calculate the power flow, the scenario with high active power network loss rate is defined as scenario type 1, and the active power network loss rate η ΔP for:

[0010]

[0011] Among them, ΔP is the active power loss of the distribution network, N p is the total number of nodes, is the active load power of node k; the scenario where the voltage exceeds the lower limit is scenario type 2, and the expression formula is as follows:

[0012] U k <U l (4)

[0013] Among them, U k is the voltage at node k, U l is the voltage lower limit; the scenario where the voltage exceeds the upper limit is scenario type 3, and the expression formula is as follows:

[0014] U k >U u (5)

[0015] Among them, U k is the voltage at node k, U u The upper voltage limit.

[0016] Furthermore, an intelligent scene matching method based on a three-layer BP neural network is used to match the classified scenes to be optimized with the established historical scene library, including: defining a vector X = (x1, x2, ..., x M ) m is the input layer of the BP neural network, representing M historical scenarios, each of which contains load data of m nodes; vector Y = (y1, y2, ..., y N ) n is the output layer, which represents the N operation scenarios to be optimized. Each scenario contains the load data of n nodes. The vector H = (h1, h2, ..., h P ) pis the hidden layer, indicating that the number of hidden layers is P, and each layer contains p elements; the weight W and threshold b represent the closeness of the connection between the layers of the BP neural network; the relationship from the input layer to the hidden layer is expressed as follows:

[0017] H=f(XW MP +b P ) (6)

[0018] Among them, the weight W MP is an M×P matrix; threshold b P is a 1×P vector; f is the transfer function, which uses the differentiable logsig function; the relationship from the hidden layer to the output layer is expressed as follows:

[0019] Y=f(HW PN +b N ) (8)

[0020] Among them, W PN represents the M×P weight matrix, b N Represents a 1×P threshold vector.

[0021] Furthermore, the activation function ReLU is used to add nonlinearity to the matrix calculation result of the hidden layer. The expression of the ReLU function is as follows:

[0022]

[0023] Furthermore, the softmax function is used to normalize the output results of the output layer so that the final output is a probability value. The expression of the Softmax function is as follows:

[0024]

[0025] Where exp(x) is the exponential function e x (e=2.7182…), Formula (9) means that when the output layer has N neurons, the output probability value S of the kth neuron is calculated: k .

[0026] Furthermore, after the softmax layer, the output probability value S is calculated k The negative value of the logarithm of is used to obtain the cross entropy loss:

[0027]

[0028] in, The smaller the loss, the more accurate the classification result. According to the chain rule, the gradient descent algorithm is used to implement the back propagation process and update the weights and thresholds. The back propagation starts with the result of the softmax layer to calculate dW and db. The regularization penalty term is introduced to modify dW:

[0029] dW=dW+reg·W (11)

[0030] Among them, the matrix W represents the weight, and the dispersion can be expressed as The final updated weights and thresholds are:

[0031]

[0032] Among them, ε is the learning rate, W is the weight, and b is the threshold.

[0033] Furthermore, two evaluation indicators, node load matching accuracy and system load matching accuracy, are constructed to evaluate the matching effect, and two evaluation indicators, active network loss reduction rate and system voltage deviation rate, are constructed to evaluate the reactive power optimization effect. Among them, the load matching accuracy E of node k is k for:

[0034]

[0035] Among them, L k is the actual load value of node k, is the load matching value of node k; the system load matching accuracy A is:

[0036] A=(1-RMSE)×100% (14)

[0037]

[0038] Where RMSE is the root mean square error of the system load matching deviation rate, N p is the total number of nodes; active network loss reduction rate ξ LR for:

[0039]

[0040] Among them, ΔP0 is the active network loss of the system without reactive power optimization strategy; ΔP is the active network loss of the system with reactive power optimization strategy; the system voltage deviation rate ΔU is:

[0041]

[0042] in, is the rated voltage of node k, U k is the voltage of node k after optimization.

[0043] On the second aspect, a distribution network reactive power optimization system is provided, including: a scenario classification module, used to classify the optimization scenarios according to the set classification rules; a reactive power optimization module, used to match the classified scenarios to be optimized with the established historical scenario library to obtain the corresponding key control objects and regulation strategies.

[0044] Compared with the prior art, the present invention has the following beneficial effects:

[0045] (1) The present invention directly uses the operation big data of the distribution network to generate a historical scenario library, fully considers the characteristics of the operation scenarios in the reactive power optimization and voltage management problems of the distribution network connected to random loads, matches the scenario to be optimized with the established historical scenario library, obtains the corresponding key control objects and regulation strategies, and can realize reactive power optimization and voltage management of the distribution network connected to random loads without relying on the distribution network model and parameters, thereby improving the voltage quality and power supply reliability;

[0046] (2) The present invention adopts a scene classification method based on three optimization objectives, classifies the scenes to be optimized before matching, and improves the matching speed and matching accuracy;

[0047] (3) The present invention realizes intelligent scene matching based on a three-layer BP neural network, makes full use of big data technology, uses the load data in the historical scene library as the training set, and uses the scene to be optimized as the test set. The scene matching process is simple, with high matching accuracy and fast speed. It also matches the corresponding key control objects and regulation strategies from the historical strategy library, greatly improving the optimization efficiency.

[0048] (4) The present invention constructs evaluation indicators such as node load matching rate, system load matching rate, system voltage deviation rate, and active network loss reduction rate, and verifies the correctness and effectiveness of the matching method and optimization strategy. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is a three-layer BP neural network structure diagram in an embodiment of the present invention;

[0050] Figure 2 is a flow chart of a BP neural network for classification problems in an embodiment of the present invention;

[0051] Figure 3 is a general flow chart of the intelligent scene matching method in an embodiment of the present invention;

[0052] Figure 4 It is an improved 30-node example system topology structure in an embodiment of the present invention;

[0053] Figure 5 is the load matching result of each node in the embodiment of the present invention;

[0054] Figure 6 is the cross entropy loss iteration result of the BP neural network in the embodiment of the present invention;

[0055] Figure 7 is the voltage optimization result in the embodiment of the present invention;

[0056] Figure 8 is the optimization result of active network loss rate in the embodiment of the present invention;

[0057] Fig. 9 is the system voltage deviation rate before and after optimization of the 10 scenes to be optimized in the embodiment of the present invention;

[0058] Fig.10 It is the active network loss reduction rate after optimization of the 10 scenes to be optimized in the embodiment of the present invention. DETAILED DESCRIPTION

[0059] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.

[0060] Embodiment 1:

[0061] A reactive power optimization method for a distribution network based on a BP neural network and scenario matching comprises: classifying scenarios to be optimized according to set classification rules; matching the classified scenarios to be optimized with an established historical scenario library to obtain corresponding key control objects and regulation strategies.

[0062] The method for establishing a historical scenario library includes: establishing a historical scenario library based on historical data of distribution network operation, and the historical scenario library includes at least three types of optimization objectives: avoiding voltage exceeding an upper limit, avoiding voltage exceeding a lower limit, and reducing network losses.

[0063] The objective function of reactive power optimization is simplified to photovoltaic output (P PV ,Q PV ), energy storage capacity (P S ,Q S ) and the electric vehicle charging station power (P EV ,Q EV ) function:

[0064] min F(P PV ,Q PV ,P S ,Q S ,P EV ,Q EV ) (1)

[0065] On the basis of the historical scenario library, distributed photovoltaic PV, energy storage devices, and electric vehicle EV charging piles are taken as the control objects, and minimizing voltage deviation and network loss are taken as the optimization goals. Based on the multi-objective particle swarm optimization algorithm, a historical strategy library is generated and the key control objects and their control strategies are stored.

[0066] According to the set classification rules, the optimization scenarios are classified. The historical scenario library contains three types: high active network loss rate, voltage lower limit and voltage upper limit. Among them, the voltage higher than the upper limit is a light load scenario, which often occurs at noon when the photovoltaic output is high; and the voltage lower than the lower limit is a heavy load scenario. In order to improve the matching speed and accuracy, this embodiment proposes a scenario classification method based on different optimization objectives. Before matching, the scenarios to be optimized are divided into three types.

[0067] The Newton-Raphson algorithm is used to calculate the power flow. The scenario with high active network loss rate is defined as scenario type 1. The active loss ΔP of the distribution network is calculated as follows:

[0068]

[0069] Among them, N b is the total number of branches, R i is the resistance of branch i, P i is the terminal active power of branch i, Q i is the terminal reactive power of branch i, U i is the terminal voltage of branch i.

[0070] Therefore, the active power network loss rate η ΔP for:

[0071]

[0072] Among them, N p is the total number of nodes, is the active load power of node k.

[0073] The scenario where the voltage exceeds the lower limit is defined as scenario type 2, and the expression formula is as follows:

[0074] U k <U l (4)

[0075] Among them, U k is the voltage at node k, U l is the voltage lower limit;

[0076] The scenario where the voltage exceeds the upper limit is defined as scenario type 3, and the expression formula is as follows:

[0077] U k >U u (5)

[0078] Among them, U k is the voltage at node k, U u The upper voltage limit.

[0079] The classified scenes to be optimized are matched with the established historical scene library to obtain the corresponding key control objects and regulation strategies.

[0080] like Figure 1 to Figure 3 As shown, the load data in the historical scenario library is used as the training set of the neural network, and the scene to be optimized is used as the training set. Intelligent scene matching is realized based on the three-layer BP neural network technology. Historical scenes are matched for the scene to be optimized from the historical scenario library, and corresponding key control objects and regulation strategies are matched from the historical strategy library.

[0081] The scene matching of the distribution network belongs to the classification problem. Define the vector X = (x1, x2, ..., x M ) m is the input layer of the BP neural network, representing M historical scenarios, each of which contains load data of m nodes; vector Y = (y1, y2, ..., y N ) n It is the output layer, which represents N operating scenarios to be optimized. Each scenario contains the load data of n nodes.

[0082] The hidden layer refers to the abstraction of the features of the input data into another dimensional space to represent its abstract features, making it more conducive to linear division. The number of neurons in the hidden layer can be given by yourself, and the definition vector H = (h1, h2, ..., h P ) p is a hidden layer, which means the number of hidden layers is P and each layer contains p elements.

[0083] The weight W and threshold b represent the closeness of the connection between the layers of the BP neural network; the relationship from the input layer to the hidden layer is expressed as follows:

[0084] H=f(XW MP +b P ) (6)

[0085] Among them, the weight W MP is an M×P matrix; threshold b P is a 1×P vector; f is the transfer function, which uses the differentiable logsig function.

[0086] The purpose of the activation layer is to add nonlinearity to the matrix calculation results of the hidden layer. There are three commonly used activation functions, namely step function, Sigmoid and ReLU. Due to the high accuracy of ReLU, this embodiment uses ReLU, and its expression is as follows:

[0087]

[0088] The relationship from the hidden layer to the output layer is expressed as follows:

[0089] Y=f(HW PN +b N ) (8)

[0090] Among them, W PN represents the M×P weight matrix, b N Represents a 1×P threshold vector.

[0091] The softmax function is used for classification problems. It normalizes the output results of the output layer so that the final output is a probability value, which is more intuitive. The expression of the Softmax function is as follows:

[0092]

[0093] Where exp(x) is the exponential function e x (e=2.7182…), Formula (9) means that when the output layer has N neurons, the output probability value S of the kth neuron is calculated: k .

[0094] After the softmax layer, the output probability value S is calculated k The negative value of the logarithm of is used to obtain the cross entropy loss:

[0095]

[0096] in, The smaller the loss, the more accurate the classification result; the purpose of neural network training is to reduce the loss as much as possible.

[0097] According to the chain rule, the gradient descent algorithm is used to implement the back propagation process and update the weights and thresholds. First, the back propagation starts with the result of the softmax layer to calculate dW and db. Secondly, in order to ensure the discreteness of the final weight, the regularization penalty term is introduced to modify dW:

[0098] dW=dW+reg·W (11)

[0099] Among them, the matrix W represents the weight, and the dispersion can be expressed as

[0100] Finally, the final updated weights and thresholds are:

[0101]

[0102] Among them, ε is the learning rate, W is the weight, and b is the threshold.

[0103] In addition, the training process of forward propagation and backward propagation needs to be iterated repeatedly so as to continuously reduce the loss and achieve results.

[0104] Two evaluation indicators, node load matching accuracy and system load matching accuracy, are constructed to evaluate the matching effect. Two evaluation indicators, active network loss reduction rate and system voltage deviation rate, are constructed to evaluate the reactive power optimization effect, in order to verify the accuracy and effectiveness of the matching method and control strategy proposed in the present invention.

[0105] Load matching accuracy E of node k k for:

[0106]

[0107] Among them, L k is the actual load value of node k, is the load matching value of node k.

[0108] Introducing the root mean square error (RMSE), the system load matching accuracy A is:

[0109] A=(1-RMSE)×100% (14)

[0110]

[0111] Where RMSE is the root mean square error of the system load matching deviation rate, N p is the total number of nodes.

[0112] At matching time T M and the optimization time T of the traditional algorithm (i.e. PSO) O The time reduction rate between is an evaluation indicator used to evaluate the matching speed:

[0113]

[0114] Where, the time unit is seconds. If η T >0, then T O >T M , which means that the faster the matching speed, the higher the optimization efficiency, and vice versa.

[0115] The active network loss reduction rate and system voltage deviation rate are used as evaluation indicators to evaluate the control effect of the reactive power optimization strategy. LR for:

[0116]

[0117] Wherein, ΔP0 is the active network loss of the system without adopting the reactive power optimization strategy; ΔP is the active network loss of the system with adopting the reactive power optimization strategy, and its calculation formula is shown in formula (2).

[0118] The system voltage deviation rate ΔU is:

[0119]

[0120] in, is the rated voltage of node k, U k is the voltage of node k after optimization.

[0121] This embodiment performs simulation calculation based on the improved IEEE 30-node system. The specific topology is as follows: Figure 4 As shown. Connect 4 PVs at nodes 3, 28, 10, and 11, 2 EV charging stations at nodes 15 and 25, and 1 energy storage device at node 12. And change the impedance of the following branches: R 3-4 =0.1, R 2-5 =0.3, R 8-28 =0.1, R 6-28 =0.1.

[0122] In order to verify the effectiveness of the method proposed in the present invention, the operating data of 600 scenarios of a distribution network are selected to generate a historical scenario library. Taking the minimization of system network loss rate and voltage deviation as the objective function, a historical strategy library is established based on the multi-objective PSO algorithm, and key control objects and control strategies are stored. The intelligent scenario matching based on the BP neural network uses 600 historical scenarios as the training set and the 10 scenarios to be optimized as the test set. Before performing scenario matching, it is necessary to classify the 10 scenarios to be optimized according to the three optimization objectives, and define the normal voltage range and normal active power loss rate as: U∈[0.95, 1.05], η ΔP ∈[0, 18%]. Table 1 and Table 2 show the matching results and matching effects of 10 scenes to be optimized. It can be seen from these two tables that the intelligent scene matching method based on the three-layer BP neural network proposed in the present invention has high accuracy and fast speed, and significantly saves time compared with the traditional optimization algorithm.

[0123] Table 1

[0124]

[0125]

[0126] Note: Negative PV output indicates charging state; negative energy storage capacity indicates charging state, and positive energy storage capacity indicates discharging state.

[0127] Table 2

[0128]

[0129] Taking the optimized scenario 1 as an example, the load matching results of each node, the cross entropy loss iteration results of the BP neural network, the voltage optimization results and the active network loss rate optimization results are as follows: Figure 5 , Figure 6 , Figure 7 and Figure 8 As shown. Figure 6 It can be seen that with the continuous iteration of the BP neural network, the cross entropy loss decreases and tends to 0, indicating that the training effect of the BP neural network is good and the accuracy of the scene matching results is guaranteed. Figure 5 As shown in , the load matching deviation of each node is very small, indicating that the matching accuracy is high. Figure 7 and Figure 8 It can be seen that using the control strategy corresponding to the matching scenario as the reactive power optimization solution for scenario 1 to be optimized can effectively reduce the voltage deviation and system active network loss.

[0130] The system voltage deviation rates of the 10 optimized scenarios before and after optimization are as follows: Fig. 9 As shown in the figure, the reduction rate of active network loss after optimization of the 10 scenarios to be optimized is as follows Fig.10 As shown. Fig. 9 and Fig.10 It can be seen that after the optimization of these 10 scenarios, the system voltage deviation rate and system active network loss are significantly reduced, which verifies the correctness and effectiveness of the reactive power optimization strategy proposed in this paper.

[0131] The present invention generates a historical scenario library by directly using the operation big data of the distribution network, fully considers the characteristics of the operation scenarios in the reactive power optimization and voltage management problems of the distribution network connected to random loads, matches the scenario to be optimized with the established historical scenario library, obtains the corresponding key control objects and regulation strategies, and can realize reactive power optimization and voltage management of the distribution network connected to random loads without relying on the distribution network model and parameters, thereby improving the voltage quality and power supply reliability; adopts a scenario classification method based on three optimization objectives, classifies the scenario to be optimized before matching, and improves the matching speed and matching accuracy; realizes intelligent scenario matching based on a three-layer BP neural network, makes full use of big data technology, takes the load data in the historical scenario library as a training set, and takes the scenario to be optimized as a test set, the scenario matching process is simple, the matching accuracy is high, and the speed is fast, and the corresponding key control objects and regulation strategies are matched from the historical strategy library, thereby greatly improving the optimization efficiency; constructs evaluation indicators such as node load matching rate, system load matching rate, system voltage deviation rate, and active network loss reduction rate, and verifies the correctness and effectiveness of the matching method and optimization strategy.

[0132] Embodiment 2:

[0133] Based on the distribution network reactive power optimization method based on BP neural network and scene matching described in Example 1, this embodiment provides a distribution network reactive power optimization system based on BP neural network and scene matching, including: a scene classification module, used to classify the optimization scenes according to the set classification rules; a reactive power optimization module, used to match the classified scenes to be optimized with the established historical scene library to obtain the corresponding key control objects and regulation strategies.

[0134] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for optimizing reactive power in a distribution network, characterized in that: include: Classify the optimization scenarios according to the set classification rules; Match the classified scenarios to be optimized with the established historical scenario library to obtain the corresponding key control objects and regulation strategies; The method for establishing the historical scene library includes: Establish a historical scenario library based on the historical data of distribution network operation, wherein the historical scenario library includes three types of optimization objectives: avoiding voltage exceeding an upper limit, avoiding voltage exceeding a lower limit, and reducing network loss; On the basis of the historical scenario library, distributed photovoltaic, energy storage devices, and electric vehicle charging piles are used as control objects, and voltage deviation minimization and network loss minimization are used as optimization goals. A historical strategy library is generated based on a multi-objective particle swarm optimization algorithm and key control objects and their control strategies are stored. The set classification rules include: classifying the scenes to be optimized into three categories according to the three types of optimization targets in the historical scene library: The Newton-Raphson algorithm is used to calculate the power flow. The scenario with high active power loss rate is defined as scenario type 1. for: (3) in, is the active power loss of the distribution network, is the total number of nodes, For Node Active load power; The scenario where the voltage exceeds the lower limit is scenario type 2, and the expression formula is as follows: (4) in, For Node The voltage, is the voltage lower limit; The scenario where the voltage exceeds the upper limit is scenario type 3, and the expression formula is as follows: (5) in, The upper voltage limit.

2. The method for optimizing reactive power of a distribution network according to claim 1, characterized in that: The objective function of reactive power optimization is photovoltaic output , Energy storage capacity and electric vehicle charging station power Function: (1)。 3. The method for optimizing reactive power of distribution network according to claim 1, characterized in that: An intelligent scene matching method based on a three-layer BP neural network is used to match the classified real-time scenes to be optimized with the established historical scene library, including: Defining vectors is the input layer of the BP neural network, indicating M Historical scenes, each containing m Load data of the node; vector is the output layer, which represents the N Run scenarios, each containing n Load data of nodes; vector is the hidden layer, indicating the number of hidden layers is P , each layer contains p elements; Weight W and threshold b Characterizes the closeness of the connection between the layers of the BP neural network; the relationship from the input layer to the hidden layer is expressed as follows: (6) Among them, the weight for Matrix of thresholds for A vector of As the transfer function, we use the differentiable function; The relationship from the hidden layer to the output layer is expressed as follows: (8) in, express The weight matrix of express The threshold vector.

4. The method for optimizing reactive power of distribution network according to claim 3, characterized in that: The activation function ReLU is used to add nonlinearity to the matrix calculation results of the hidden layer. The expression of the ReLU function is as follows: (7)。 5. The method for optimizing reactive power of distribution network according to claim 3, characterized in that: The softmax function is used to normalize the output results of the output layer so that the final output is a probability value. The expression of the Softmax function is as follows: (9) in, is an exponential function , Formula (9) means that when the output layer has N When the number of neurons is k The output probability of a neuron S k .

6. The method for optimizing reactive power of distribution network according to claim 5, characterized in that: After the softmax layer, the output probability value is calculated S k The negative value of the logarithm of is used to obtain the cross entropy loss: (10) in, It means that the smaller the loss, the more accurate the classification result; According to the chain rule, the gradient descent algorithm is used to implement the back propagation process and update the weights and thresholds. Back propagation starts with the result of the softmax layer and calculates dW , db ; Introduce regularization penalty terms dW To modify: (11) Among them, the matrix W represents the weight, and the dispersion can be expressed as ; The final updated weights and thresholds are: (12) in, is the learning rate, W is the weight, b is the threshold value.

7. The method for optimizing reactive power of a distribution network according to claim 1, characterized in that: Two evaluation indicators, node load matching accuracy and system load matching accuracy, are constructed to evaluate the matching effect. Two evaluation indicators, active network loss reduction rate and system voltage deviation rate, are constructed to evaluate the reactive power optimization effect. node k Load matching accuracy for: (13) in, For Node k The actual value of the load, Is a node k Load matching value; System load matching accuracy for: (14) (15) in, RMSE is the root mean square error of the system load matching deviation rate, N p is the total number of nodes; Active network loss reduction rate for: (17) in, It is the active network loss of the system without adopting reactive power optimization strategy; Active network loss of the system adopting reactive power optimization strategy; System voltage deviation rate for: (18) in, For Node k Rated voltage, ; After optimization, the node k voltage.

8. A reactive power optimization system for a distribution network, characterized in that: include: A scene classification module is used to classify the optimization scenes according to the set classification rules; Reactive power optimization module, used to match the classified scenes to be optimized with the established historical scene library to obtain the corresponding key control objects and regulation strategies; The method for establishing the historical scene library includes: Establish a historical scenario library based on the historical data of distribution network operation, wherein the historical scenario library includes three types of optimization objectives: avoiding voltage exceeding an upper limit, avoiding voltage exceeding a lower limit, and reducing network loss; On the basis of the historical scenario library, distributed photovoltaic, energy storage devices, and electric vehicle charging piles are used as control objects, and voltage deviation minimization and network loss minimization are used as optimization goals. A historical strategy library is generated based on a multi-objective particle swarm optimization algorithm and key control objects and their control strategies are stored. The set classification rules include: classifying the scenes to be optimized into three categories according to the three types of optimization targets in the historical scene library: The Newton-Raphson algorithm is used to calculate the power flow. The scenario with high active power loss rate is defined as scenario type 1. for: (3) in, is the active power loss of the distribution network, N p is the total number of nodes, For Node k Active load power; The scenario where the voltage exceeds the lower limit is scenario type 2, and the expression formula is as follows: (4) in, For Node k The voltage, is the voltage lower limit; The scenario where the voltage exceeds the upper limit is scenario type 3, and the expression formula is as follows: (5) in, The upper voltage limit.