Power distribution network voltage reactive power optimization method based on deep learning stochastic programming
Through the deep learning stochastic planning method, combined with CVAE algorithm and Monte Carlo sampling, the traditional method has solved the shortcomings in considering the time change of renewable energy output, achieving more accurate voltage reactive power optimization, and improving system stability and operation Cost optimization.
Patent Information
- Application Number
- CN202411446150.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-01-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional stochastic planning methods ignore the latent changes in time when considering the uncertainty of renewable energy output, and rely on the accuracy of prediction data, making it difficult to obtain a reasonable voltage reactive power optimization strategy; artificial intelligence technology in voltage reactive power optimization China has not fully paid attention to the potential correlation of photovoltaic output in the time dimension, and the optimization range is relatively narrow.
Using a stochastic planning method based on deep learning, deep learning models are trained through CVAE algorithm, and a scene set is generated by combining Monte Carlo sampling and backward methods to build a two-stage coordinated planning distribution network voltage reactive power optimization model, considering the control of long and short time scales Objective function, optimize mechanical equipment action instructions and voltage regulation strategies.
A more accurate real scenario is generated, the system voltage stability is improved, and the distribution network is optimized on long-term scales of operation.
Smart Images

Figure CN119324532A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent distribution networks, and in particular to a distribution network voltage and reactive power optimization method based on deep learning stochastic programming. Background Art
[0002] With the growth of global energy demand and the increasing attention to environmental protection, the use of renewable energy has gradually become an important way to solve energy problems and reduce carbon emissions. This advantage has led to an increase in the capacity proportion of renewable energy in distribution networks year by year. Especially in the power sector, the access of a high proportion of renewable energy will become the main trend of future power system development. Compared with traditional reactive power optimization devices such as capacitor banks and on-load tap-changing transformers, renewable energy has stronger power regulation capabilities, faster regulation speeds, shorter time scales and more flexibility, but it also has the characteristics of large fluctuations, highly random and difficult to predict power generation output, and existing reactive power control methods have certain limitations. In this new energy context, the voltage and reactive power control of distribution networks faces new challenges and problems.
[0003] Traditional distribution network design mainly focuses on static optimization of voltage and reactive power to meet load demand and system stability. However, with the access of renewable energy, the dynamic characteristics and scale of the power system will change significantly. Due to the intermittent and uncertain output of renewable energy, voltage fluctuations, power quality problems and increased risk of system instability may occur. Therefore, in order to better utilize renewable energy and organically combine it with the regulation strategy of traditional reactive power optimization equipment, it is necessary to conduct a deeper study on the voltage and reactive power behavior of the distribution network.
[0004] Since there are mechanical equipment and power electronic equipment that can participate in regulation in the distribution network, the use of active distribution network for coordinated control has become the mainstream solution at present, and existing research is mostly based on multi-time scale optimization. Among the multi-time scale optimization strategies, the model predictive control method has received more attention because it can achieve the optimality of multiple time sections. In addition, with the rise of artificial intelligence technology, many studies have also been carried out in this regard, using deep learning or model prediction technology to predict the output of new energy to varying degrees.
[0005] However, the current common control methods have two shortcomings:
[0006] a) Traditional stochastic programming methods usually add a simple beta random distribution or Gaussian distribution to a given PV prediction curve to take into account the uncertainty of renewable energy output. This ignores the potential temporal variation of PV output and is highly dependent on the accuracy of the prediction data. It is difficult to obtain a reasonable voltage and reactive power optimization strategy when the given prediction value cannot correctly describe the real scenario.
[0007] b) The current work on voltage and reactive power optimization using artificial intelligence technology focuses more on the optimization strategy itself, fails to pay attention to the potential correlation of photovoltaic output in the time dimension, and the optimization scope considered is relatively narrow. Summary of the invention
[0008] In view of the above problems existing in the prior art, the present invention is proposed.
[0009] Therefore, the prior art problem to be solved by the present invention is that the traditional stochastic programming method usually adds a simple beta random distribution or Gaussian distribution on the basis of a given photovoltaic prediction curve to consider the uncertainty of renewable energy output. This ignores the potential variation law of photovoltaic output over time and is highly dependent on the accuracy of the prediction data. It is difficult to obtain a reasonable voltage and reactive power optimization strategy when the given prediction value cannot correctly describe the real scene.
[0010] The current work on voltage and reactive power optimization using artificial intelligence technology focuses more on the optimization strategy itself, fails to pay attention to the potential correlation of photovoltaic output in the time dimension, and the optimization scope considered is relatively narrow.
[0011] In order to solve the above technical problems, the present invention provides the following technical solutions: A distribution network voltage reactive power optimization method based on deep learning random programming, which includes initializing the starting time T1=1, T2=1 and giving the number of time periods N included in each hour k =4;
[0012] Obtain historical DG output forecast data and real data sets and train deep learning models based on them;
[0013] Obtain the given PV prediction curve under the condition of unknown DG real output;
[0014] Input the given prediction value into the trained deep learning model to generate the DG random output curve, and complete the scenario reduction through the Monte Carlo sampling method and the back-off method to obtain the set of constraint scenarios for solving;
[0015] Build a linear Distflow power flow topology model for distribution network;
[0016] Build a two-stage coordinated planning distribution network voltage and reactive power optimization model;
[0017] Confirm the long time scale control objective function: min J1;
[0018] According to the current hourly mechanical equipment action instructions combined with the constraint scenario set, the DG output instruction of the T2 period within the T1 hour is obtained;
[0019] Determine whether the current period T2 is the last period N of the current hour k If yes, then determine whether the current hour T1 is the last hour in the optimization cycle. If yes, end. Otherwise, set T2 to 1, T1 = T1 + 1, and confirm the short-time scale control objective function: minJ2;
[0020] Determine whether the current hour T1 is the last hour in the optimization cycle. If so, end. Otherwise, set T2 to 1, T1 = T1 + 1, and confirm the long-time scale control objective function: min J1.
[0021] As a preferred solution of the method for optimizing voltage and reactive power of distribution network based on deep learning stochastic programming described in the present invention, the deep learning model adopts the CVAE algorithm, and its structure includes three parts: an encoder, a decoder and an implicit distribution network. The encoder encodes the input data x to generate a hidden variable z, and the decoder regenerates the data by learning the mapping relationship between the hidden variable z and the input data distribution p(x). The model uses the joint prior distribution p of the input data x and the hidden variable z θ (z, x) and the joint posterior distribution The minimum KL divergence (Kullback-LeiblerDivergence) between them is the training goal, so the target loss function of its training is:
[0022]
[0023] The following formula can be obtained by replacing the joint probability density function with the conditional probability density function and removing the constant term:
[0024] L=E x~p(x) [E z~p(z|x) [-ln q(x|z)]+KL(p(z|x)||q(z))].
[0025] As a preferred solution of the method for optimizing voltage and reactive power of distribution network based on deep learning stochastic programming described in the present invention, the scenario generation and reduction method comprises the following steps:
[0026] The Monte Carlo sampling method was used to generate 2000 DG random output scenarios;
[0027] Set the confidence interval to 95% and reduce the highest and lowest 2.5% of all DG output scenarios respectively;
[0028] Based on the back-off method, valid scenes are further extracted, and finally a new representative scene set containing the expected number is obtained.
[0029] As a preferred solution of the method for optimizing voltage and reactive power of distribution network based on deep learning stochastic programming described in the present invention, wherein: Represents N+1 buses, and assumes that bus 0 is the reference bus (balance node). For each bus Represents the square of the bus voltage amplitude, p i and q i represents the active and reactive power injection on the bus, and the set L represents the set of all branches, r ij and x ij Represents the resistance and reactance of the branch, P ij and Q ij represents the active power and reactive power flowing from node i to node j, It represents the square of the current amplitude flowing from node i to node j. The power flow of each branch can be described by the Distflow model:
[0030]
[0031] in and are the active and reactive power generated by the DG inverter on node j, and are the active and reactive power required by the load, The reactive power injected by the capacitor bank (CB) at this node.
[0032] Convert it into a second-order cone inequality constraint to achieve constraint convexity, as shown in the following formula:
[0033]
[0034] As a preferred solution of the distribution network voltage and reactive power optimization method based on deep learning stochastic programming described in the present invention, wherein: the distribution network voltage and reactive power optimization model of the two-stage coordinated planning further includes a coordinated optimization scheme of long and short time scales.
[0035] As a preferred solution of the distribution network voltage and reactive power optimization method based on deep learning stochastic programming described in the present invention, the medium and long time scale control objective function minJ1 is expressed as follows:
[0036]
[0037] One of the long time scale forecasts contains N p hours of data, and each hour contains N k time periods (short time scale), n tap With n care the position vectors of OLTC and CB, P loss,s With P cur,s are the network power loss and DG active power reduction under scenario s, ρ s is the probability of scenario s occurring, c tap , c c , c p are the cost parameters of OLTC, CB and active power loss, ω mec With ω p are the weight coefficients of mechanical equipment adjustment cost and power loss cost respectively.
[0038] As a preferred solution of the distribution network voltage and reactive power optimization method based on deep learning stochastic programming described in the present invention, the MINLP problem is converted into a MILP problem by ignoring the smaller quadratic loss term, and the linear Distflow power flow calculation model formula is obtained as follows:
[0039]
[0040] V i -V j =r ij P ij +x ij Q ij .
[0041] As a preferred solution of the method for optimizing voltage and reactive power of distribution network based on deep learning stochastic programming described in the present invention, the linear Distflow power flow calculation model is rewritten into a form that changes with time periods and scenarios, and the gear adjustment climbing limit of OLTC and CB is taken into consideration, and the following constraints can be obtained:
[0042]
[0043] V i,s (k)-V j,s (k) = r ij P ij,s (k)+x ij Q ij,s (k)
[0044] V1=V0(1+n tap (k)Δtap)
[0045] V min ≤V i,s (k)≤V max
[0046]
[0047] q c (k) = nc (k)Δq c
[0048]
[0049] 0≤p g,s (k)≤P max,s (k)
[0050] P cur,s (k) = P max,s (k)-p g,s (k)
[0051]
[0052] The first six formulas represent the system power flow constraints, V min With V max represents the upper and lower limits of the voltage amplitude, the 7th and 8th formulas represent the operating constraints of the OLTC, the 9th formula models the CB as a discretely changing pure reactive power source, and the 10th and 11th formulas represent the operating constraints of the CB. and They represent the upper and lower limits of regulation and the upper and lower limits of ramping of OLTC and CB respectively. The 12th and 13th formulas are the constraints for the operation of DG inverter. max,s Indicates the maximum available active power of DG in the scenario, p g,s and q g,s represents the actual active and reactive output of DG in the scenario, P cur,s represents the active power reduction of DG in the scenario, S g is the DG capacity, the reactive power output and active power reduction of DG are the decision variables of the entire optimization problem. For any scenario, q g,s and P cur,s Each takes the same value, and the resulting n tap (k) and n c (k) is the mechanical equipment action instruction that needs to be obtained.
[0053] As a preferred solution of the distribution network voltage reactive power optimization method based on deep learning stochastic programming described in the present invention, wherein: the short-time scale control objective function minJ2 is expressed as follows
[0054]
[0055] Where P loss,s With P cur,s are the network power loss and DG active power reduction under scenario s, ρ s is the probability of scene s occurring, ω p is the weight coefficient of power loss cost, c pis the cost parameter of active power loss.
[0056] As a preferred solution of the distribution network voltage reactive power optimization method based on deep learning random programming described in the present invention, wherein: the constraint scenario set is jointly solved to obtain the specific formula of the DG output instruction operation in the T2th period within the T1 hour, and the n in the formula tap (k) and n c (k) are all constant values, and the reactive power output and active power reduction of DG, which are not decision variables that need to be solved, are still used as decision variables of the entire optimization problem.
[0057] Beneficial effects of the present invention:
[0058] (1) The method for optimizing voltage and reactive power of distribution network based on deep learning random programming provided by the present invention improves the traditional random programming method, solves the problem that the random programming method cannot consider time correlation by using beta distribution, and combines the CVAE deep learning algorithm for random programming, which reasonably considers the uncertain fluctuation of renewable energy output in the time dimension. Different from only using standard deviation to consider possible real scenarios, the method provided by the present invention generates more accurate possible real scenarios by means of deep learning, thereby making the system voltage more stable;
[0059] (2) The voltage and reactive power optimization method of the distribution network based on deep learning stochastic programming provided by the present invention comprehensively considers the long-term optimal power flow distribution of the distribution network, and constructs a two-stage distribution network collaborative optimization operation control strategy model with multi-scenario joint constraints based on the model predictive control method, thereby achieving the optimal distribution network operation cost on a long time scale. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0061] Figure 1 This is a flow chart of the voltage and reactive power optimization method for distribution network based on deep learning stochastic programming;
[0062] Figure 2 This is the framework diagram of the CVAE algorithm used in the voltage and reactive power optimization method of the distribution network based on deep learning stochastic programming;
[0063] Figure 3 This is a typical distribution network power flow topology diagram used in the distribution network voltage and reactive power optimization method based on deep learning stochastic programming;
[0064] Figure 4 A two-time-scale control framework diagram proposed for the voltage-reactive power optimization method of distribution network based on deep learning stochastic programming. DETAILED DESCRIPTION
[0065] In order to make the above-mentioned objects, features and advantages of the present invention more clearly understood, the specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings.
[0066] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0067] Example 1
[0068] Reference Figure 1 , Figure 2 , which is the first embodiment of the present invention, and provides a distribution network voltage reactive power optimization method based on deep learning stochastic programming, characterized in that it includes the following steps:
[0069] S1: Initialize the time to the starting time T1=1, T2=1 and give the number of time periods N included in each hour k =4;
[0070] S2: Obtain the historical DG output prediction data and real data sets and train the deep learning model based on them;
[0071] The deep learning model uses the CVAE algorithm, which is improved from the traditional VAE. Its structure includes three parts: encoder, decoder and implicit distribution network. The encoder and decoder are usually multi-layer neural networks, which fit the distribution information of the data through deep learning. First, the encoder encodes the input data x to generate the hidden variable z, which is usually stored in the implicit distribution network in the form of a normal distribution containing mean and variance information. The decoder regenerates the data by learning the mapping relationship between the hidden variable z and the input data distribution p(x). The model uses the joint prior distribution p of the input data x and the hidden variable z as the input prior distribution p. θ (z, x) and the joint posterior distribution The training goal is to minimize the KL divergence between them, that is, as the training progresses, we hope that the model can learn a probability distribution that is closer to the real data distribution so that the generated data has a higher similarity with the sample data. Therefore, the target loss function of its training can be expressed as:
[0072]
[0073] The following formula can be obtained by replacing the joint probability density function with the conditional probability density function and removing the constant term:
[0074] L=E x~p(x) [E z~p(z|x) [-ln q(x|z)]+KL(p(z|x)||q(z))]
[0075] The first term is the reconstruction loss, which means that the output y reconstructed by the model based on the latent variable z must be as similar as possible to the input sample x to ensure the validity of the generated data. The second term requires the model to minimize the KL divergence between p(z|x) and q(z) to ensure that the latent variable z learns the true distribution information of the sample data.
[0076] On the basis of the above, the present invention first performs some preprocessing on the input samples, and then adds conditional information to them before inputting them into the encoder neural network for fitting. This can guide the key direction of deep learning in a targeted manner, and distinguish the distribution of latent variables according to the given conditional information. When sampling, it is possible to obtain generated samples with expected characteristics according to the given expected conditions. The framework is as follows Figure 2 shown.
[0077] Specifically, the training input is set to a 3×96 matrix, the first row of the matrix is the actual DG output value of 96 time periods in a day, the second row is the corresponding photovoltaic prediction value, and the third row is set to zero. After that, this matrix is convolved with a 3×3 convolution kernel and input into the encoder and decoder composed of a multi-layer neural network for training. This can guide the neural network to learn the potential correlation of photovoltaic output values in similar time and make more reasonable and accurate predictions for real scenes. After the model training is completed, the implicit distribution network has the distribution information of the sample data. At this time, it is only necessary to give the expected conditional label (in the present invention, it is a given photovoltaic prediction curve) and perform random sampling under this condition to restore multiple DG output scene information that meets the expected characteristics through the decoder neural network.
[0078] S3: Obtain the given PV prediction curve under the condition of unknown DG real output;
[0079] S4: Input the given prediction value into the trained model to generate the DG random output curve, and complete the scenario reduction through the Monte Carlo sampling method and the back-off method to obtain the constrained scenario set for solution;
[0080] The scenario generation and reduction method includes the following steps. First, the Monte Carlo sampling method is used to generate 2000 DG random output scenarios. Then, the confidence interval is set to 95%, and the highest and lowest 2.5% of all DG output scenarios are reduced respectively. Finally, the effective scenarios are further extracted based on the back-off method while maintaining a good approximation of the original scenario set. The basic idea is to select the scenario with the smallest probability and the shortest distance to other scenarios in the scenario set, and then remove the selected scenario from the set and represent it with the closest scenario, and the probability of occurrence is also included in the scenario, so as to obtain a new scenario set that lacks one scene. This process is repeated continuously, and finally a new representative scenario set containing the desired number is obtained. Through this series of methods, the original set of 2000 scenarios is reduced to a set of 190 scenarios.
[0081] S5: Build a linear Distflow power flow topology model for distribution network;
[0082] The typical N+1 node radial distribution network structure is as follows: Figure 3 As shown, using the collection Represents N+1 buses, and assumes that bus 0 is the reference bus (balance node). For each bus Represents the square of the bus voltage amplitude, p j and q j represents the active and reactive power injection on the bus. Set L represents the set of all branches, r ij and x ij Represents the resistance and reactance of the branch, P ij and Q ij represents the active power and reactive power flowing from node i to node j, Represents the square of the current amplitude flowing from node i to node j. The power flow of each branch can be described by the Distflow model:
[0083]
[0084] in and are the active and reactive power generated by the DG inverter on node j, and are the active and reactive power required by the load, The reactive power injected by the capacitor bank (CB) at this node.
[0085] In the optimization problem, since the fourth equation involves quadratic terms, it cannot be directly solved by calling the currently common commercial solvers such as Cplex. Therefore, it needs to be converted into a second-order cone inequality constraint to achieve constraint convexity, as shown in the following equation:
[0086]
[0087] S6: Build a two-stage coordinated planning distribution network voltage and reactive power optimization model;
[0088] The two-stage coordinated planning distribution network voltage and reactive power optimization model includes two time scale coordinated optimization schemes, which divide a day into 96 time periods. The long time scale interval is 1 hour, and each interval includes 4 time periods; the short time scale interval is 15 minutes, and it is assumed that the power flow data of the power grid remains unchanged within each 15 minutes, such as Figure 4 As shown in the figure. In the long time scale, the dispatching instructions of mechanical equipment such as OLTC (on load tap changer, OLTC) and CB are determined only by overall optimization of the forecast data of 16 periods in the next 4 hours, and then issued as the pre-control conditions of the short time scale, and updated every hour; in the short time scale, the output dispatching plan of the renewable energy inverter is obtained by the optimal power flow calculation based on the dispatching instructions of the mechanical equipment given in the long time scale, and the data curve is updated every 15 minutes (1 period) to recalculate the new output plan.
[0089] S7: Confirm the long time scale control objective function: minJ1;
[0090] The long-time scale control objective function minJ1 is expressed as follows:
[0091]
[0092] One of the long time scale forecasts contains N p hours of data, and each hour contains N k time periods (short time scale), n tap With n c are the position vectors of OLTC and CB, P loss,s With P cur,s are the network power loss and DG active power reduction under scenario s, ρ s is the probability of scenario s occurring, c tap , c c , c p are the cost parameters of OLTC, CB and active power loss, ω mec With ω p are the weight coefficients of mechanical equipment adjustment cost and power loss cost respectively.
[0093] S8: Convert the MINLP problem into a MILP problem, and solve it jointly with the constraint scenario set obtained in S4 to obtain the mechanical equipment action instructions for T1 hours;
[0094] The transformation of the MINLP problem into the MILP problem is achieved by ignoring the smaller quadratic loss term. That is, the quadratic loss term in the first three formulas given in claim 4 is ignored, and the linear Distflow power flow calculation model formula is obtained as follows:
[0095]
[0096] V i -V j =r ij P ij +x ij Q ij
[0097] It is worth noting that since the quadratic loss term is ignored, a small modeling error of about 1% will be introduced into the model. However, correspondingly, since the second-order cone inequality constraint given at the end of claim 4 is no longer required and the entire model no longer involves l ij This will greatly improve the efficiency of solving the entire optimization problem, so this approach is very common and reasonable in related research work.
[0098] In step S8, the constraint scenario set obtained in S4 is combined for joint solution to obtain the mechanical equipment action instruction operation of T1 hour as follows. The linear Distflow model mentioned in claim 7 is rewritten into a form that changes with time period and scenario, and the gear adjustment climbing limit of OLTC and CB is taken into consideration, and the following constraints can be obtained:
[0099]
[0100] V i,s (k)-V j,s (k) = r ij P ij,s (k)+x ij Q ij,s (k)
[0101] V1=V0(1+n tap (k)Δtap)
[0102] V min ≤V i,s (k)≤V max
[0103]
[0104] q c (k) = n c (k)Δq c
[0105]
[0106] 0≤p g,s (k)≤P max,s (k)
[0107] P cur,s (k) = P max,s (k)-p g,s (k)
[0108]
[0109] The first six formulas represent the system power flow constraints, V min With V max Indicates the upper and lower limits of the voltage amplitude. The 7th and 8th formulas represent the operating constraints of OLTC, the 9th formula models CB as a pure reactive power source with discrete changes, and the 10th and 11th formulas represent the operating constraints of CB. and They represent the upper and lower limits of regulation and the upper and lower limits of ramping of OLTC and CB respectively. The 12th and 13th formulas are the constraints for the operation of DG inverters. max,s Indicates the maximum available active power of DG in the scenario, p g,s and q g,s represents the actual active and reactive output of DG in the scenario, P cur,s represents the active power reduction of DG in the scenario, S g is the DG capacity. It is worth mentioning here that the reactive power output and active power reduction of DG are the decision variables of the entire optimization problem, which means that for any scenario, Q g,s and P cur,s Each takes the same value. Solve for the resulting n tap (k) and n c (k) is the mechanical equipment action instruction that needs to be obtained.
[0110] S9: Confirm the short time scale control objective function: minJ2;
[0111] The short-time scale control objective function minJ2 is expressed as follows
[0112]
[0113] The probability of scenario s occurring, ω p is the weight coefficient of power loss cost, c p is the cost parameter of active power loss.
[0114] S10: Solve the current hourly mechanical equipment action command obtained in S8 in combination with the constraint scenario set obtained in S4 to obtain the DG output command for the T2 period within the T1 hour;
[0115] The constraint scenario set obtained in S4 is combined to perform a joint solution to obtain the DG output command operation formula for the T2th period within the T1 hour. The specific formula is consistent with the formula given in step S8, but the n in the formula is tap (k) and n c (k) are all constant values calculated in step S8, rather than decision variables that need to be solved. Similarly, the reactive power output and active power reduction of DG are still decision variables of the entire optimization problem, which means that for any scenario, q g,s and P cur,s Each takes the same value.
[0116] S11: Determine whether the current time period T2 is the last time period Nk of the current hour. If so, go to step S12. Otherwise, T2=T2+1, then go to step S9.
[0117] S12: Determine whether the current hour T1 is the last hour 24 in the optimization cycle (one day). If so, end. Otherwise, set T2 to 1, T1=T1+1, and go to step S7.
[0118] The present invention has been described in detail according to the preferred embodiments. Those skilled in the art should understand that the technical solutions of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the invention, which should be included in the scope of the claims of the present invention.
Claims
1. A distribution network voltage and reactive power optimization method based on deep learning stochastic programming, characterized by: include, The initialization time is the starting time T1=1, T2=1 and the number of time periods N included in each hour is given k =4; Obtain historical DG output forecast data and real data sets and train deep learning models based on them; Obtain the given PV prediction curve under the condition of unknown DG actual output; Input the given prediction value into the trained deep learning model to generate the DG random output curve, and complete the scenario reduction through the Monte Carlo sampling method and the back-off method to obtain the set of constraint scenarios for solving; Build a linear Distflow power flow topology model for distribution network; Build a two-stage coordinated planning distribution network voltage and reactive power optimization model; Confirm the long time scale control objective function: minJ1; According to the current hourly mechanical equipment action instructions combined with the constraint scenario set, the DG output instruction of the T2 period within the T1 hour is obtained; Determine whether the current period T2 is the last period N of the current hour k If yes, then determine whether the current hour T1 is the last hour in the optimization cycle. If yes, end. Otherwise, set T2 to 1, T1 = T1 + 1, and confirm the short-time scale control objective function: minJ2; Determine whether the current hour T1 is the last hour in the optimization cycle. If so, end. Otherwise, set T2 to 1, T1 = T1 + 1, and confirm the long-time scale control objective function: minJ1.
2. A distribution network voltage and reactive power optimization method based on deep learning stochastic programming as claimed in claim 1, characterized in that: The deep learning model adopts the CVAE algorithm, and its structure includes three parts: encoder, decoder and implicit distribution network. The encoder encodes the input data x to generate the hidden variable z, and the decoder regenerates the data by learning the mapping relationship between the hidden variable z and the input data distribution p(x). The model uses the joint prior distribution p of the input data x and the hidden variable z θ (z, x) and the joint posterior distribution The minimum KL divergence (Kullback-Leibler Divergence) between them is the training goal, so the target loss function of its training is: The following formula can be obtained by replacing the joint probability density function with the conditional probability density function and removing the constant term: L=E x~p(x) [E z~p(z|x) [-ln q(x|z)]+KL(p(z|x)||q(z))]。 3. The method for optimizing voltage and reactive power of a distribution network based on deep learning stochastic programming according to claim 1, characterized in that: The scene generation and reduction method comprises the following steps: The Monte Carlo sampling method was used to generate 2000 DG random output scenarios; Set the confidence interval to 95% and reduce the highest and lowest 2.5% of all DG output scenarios respectively; Based on the back-off method, valid scenes are further extracted, and finally a new representative scene set containing the expected number is obtained.
4. The method for optimizing voltage and reactive power of a distribution network based on deep learning stochastic programming according to claim 1, characterized in that: The collection Represents N+1 buses, and assumes that bus 0 is the reference bus (balance node). For each bus Represents the square of the bus voltage amplitude, p j and q j represents the active and reactive power injection on the bus, and the set L represents the set of all branches, r ij and x ij Represents the resistance and reactance of the branch, P ij and Q ij represents the active power and reactive power flowing from node i to node j, It represents the square of the current amplitude flowing from node i to node j. The power flow of each branch can be described by the Distflow model: in and are the active and reactive power generated by the DG inverter on node j, and are the active and reactive power required by the load, is the reactive power injection from the capacitor bank (CB) at the node, Convert it into a second-order cone inequality constraint to achieve constraint convexity, as shown in the following formula:
5. The method for optimizing voltage and reactive power of a distribution network based on deep learning stochastic programming according to claim 1, characterized in that: The two-stage coordinated planning distribution network voltage and reactive power optimization model further includes coordinated optimization schemes for long and short time scales.
6. A distribution network voltage and reactive power optimization method based on deep learning stochastic programming as claimed in claim 5, characterized in that: The medium and long time scale control objective function minJ1 is expressed as follows: One of the long time scale forecasts contains N p Hours of data, each hour contains N k time periods (short time scale), n tap With n c are the position vectors of OLTC and CB, P loss,s With P cur,s are the network power loss and DG active power reduction under scenario s, ρ s is the probability of scenario s occurring, c tap , c c , c p are the cost parameters of OLTC, CB and active power loss, ω mec With ω p are the weight coefficients of mechanical equipment adjustment cost and power loss cost respectively.
7. A method for optimizing voltage and reactive power of a distribution network based on deep learning stochastic programming according to claim 6, characterized in that: The MINLP problem is transformed into the MILP problem by ignoring the smaller quadratic loss term, and the linear Distflow power flow calculation model formula is obtained as follows: V i -V j =r ij P ij +x ij Q ij 。 8. The method for optimizing voltage and reactive power of a distribution network based on deep learning stochastic programming according to claim 3, characterized in that: The linear Distflow power flow calculation model is rewritten into a form that changes with time periods and scenarios, and the gear adjustment climbing restrictions of OLTC and CB are taken into consideration, and the following constraints can be obtained: V i,s (k)-V j,s (k)=r ij P ij,s (k)+x ij Q ij,s (k) V1=V0(1+n tap (k)Δtap) V min ≤V i,s (k)≤V max q c (k)=n c (k)Δq c 0≤p g,s (k)≤P max,s (k) P cur,s (k)=P max,s (k)-p g,s (k) The first six formulas represent the system power flow constraints, V min With V max represents the upper and lower limits of the voltage amplitude, the 7th and 8th formulas represent the operating constraints of the OLTC, the 9th formula models the CB as a discretely changing pure reactive power source, and the 10th and 11th formulas represent the operating constraints of the CB. and They represent the upper and lower limits of regulation and the upper and lower limits of ramping of OLTC and CB respectively. The 12th and 13th formulas are the constraints for the operation of DG inverter. max,s Indicates the maximum available active power of DG in the scenario, p g,s and q g,s represents the actual active and reactive output of DG in the scenario, P cur,s represents the active power reduction of DG in the scenario, S g is the DG capacity, the reactive power output and active power reduction of DG are the decision variables of the entire optimization problem. For any scenario, q g,s and P cur,s Each takes the same value and solves for the resulting n tap (k) and n c (k) is the mechanical equipment action instruction that needs to be obtained.
9. A distribution network voltage and reactive power optimization method based on deep learning stochastic programming as claimed in claim 8, characterized in that: The short-time scale control objective function minJ2 is expressed as follows Where P loss,s With P cur,s are the network power loss and DG active power reduction under scenario s, ρ s is the probability of scene s occurring, ω p is the weight coefficient of power loss cost, c p is the cost parameter for active power loss.
10. A distribution network voltage and reactive power optimization method based on deep learning stochastic programming as claimed in claim 9, characterized in that: Solve the constraint scenario set jointly to obtain the specific formula for the DG output command operation in the T2th period within the T1 hour. tap (k) and n c (k) are all constant values, and the reactive power output and active power reduction of DG, which are not decision variables that need to be solved, are still used as decision variables of the entire optimization problem.