Optical storage and charging power distribution network optimization decision-making method based on interpretable safety reinforcement learning

Through the optimization decision-making method of photovoltaic storage, charging and distribution network based on explainable security reinforcement learning, the Markov decision process and MIP-CDQN algorithm are constructed to solve the problem of voltage and power of distribution network when facing the connection of photovoltaic and electric vehicles to the grid. Uncertainty problems are solved, real-time constraint satisfaction and flexible regulation are achieved, and the carrying capacity of the distribution network is improved.

CN118734929APending Publication Date: 2024-10-01SOUTHEAST UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410782769.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

When the distribution network is faced with large-scale distributed photovoltaics and electric vehicles connected to the grid, problems such as node voltage exceeding limits, power loss increasing, and transformer overloading are difficult to solve. Traditional optimization methods are expensive to invest in resources and cannot adapt to environmental changes, making it difficult to meet real-time constraints. .

Method used

An optical storage, charging and distribution network optimization decision-making method based on explainable and secure reinforcement learning is adopted. By constructing a Markov decision process and MIP-CDQN algorithm, a deep neural network is trained, and the action selection process is transformed into a mixed integer nonlinear programming model, which satisfies The real-time operation constraints of the distribution network are optimized online.

Benefits of technology

It achieves good decision-making solutions in the face of PV and EV power uncertainty, meets the real-time constraints of the distribution network, improves the flexible regulation capability and new energy carrying capacity of the distribution network, and ensures the feasibility of the strategy in real-time operation. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118734929A_ABST
    Figure CN118734929A_ABST
Patent Text Reader

Abstract

The invention discloses an optical storage and charging power distribution network optimization decision-making method based on interpretable safety reinforcement learning, and the method comprises the steps: constructing a Markov decision-making process MDP of the active / reactive power optimization decision of an optical storage and charging power distribution network and an uncertain operation environment of the power distribution network; according to the constructed MDP, training a DRL intelligent agent through an MIP-CDQN algorithm, firstly collecting an experience track, then updating parameters of the actor deep neural network and the critic deep neural network, and finally storing the trained critic deep neural network; an action selection process of the trained critic deep neural network is converted into a solvable mixed integer nonlinear programming model; and deploying the model into the power distribution network for online optimization, and performing online solution on the model according to the actual operation state of the power distribution network to obtain an optimal control strategy meeting the constraint. According to the method, a good decision-making scheme can be provided for the uncertainty of PV and EV power, and the real-time constraint of the operation of the power distribution network can be met in the execution stage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent distribution network control and artificial intelligence decision-making technology, and specifically relates to a photovoltaic storage charging and distribution network optimization decision-making method based on explainable security reinforcement learning. Background Art

[0002] The connection of large-scale distributed photovoltaic (PV) and electric vehicles (EV) to the grid will change the operation mode of the distribution network, resulting in a series of problems such as frequent node voltage limit violations, increased power loss, and transformer overload. The strong uncertainty of the power generation and consumption of new "sources" and "loads" such as PV and EV makes it more difficult to solve the active / reactive optimization problem of the distribution network. Specifically, it is difficult to estimate the flow state transfer, and the solution dimension increases significantly. At the same time, it also brings huge challenges to the service life of traditional on-load tap-changing transformers, shunt capacitors and other equipment. In this context, relying on the fast and continuous active / reactive regulation capabilities of grid-side photovoltaic, storage and charging stations, considering the uncertainty of new "source" and "load" power, and developing safe and efficient active / reactive online optimization decision methods is the key to solving a series of problems in the distribution network and improving the carrying capacity of new energy.

[0003] The solution idea of ​​traditional model-based stochastic optimization methods is to model the distribution network optimization problem into a linear or nonlinear mathematical model, and then solve it with the help of commercial solvers such as GUROBI or CPLEX. However, with the increasing complexity and uncertainty of the optimization problem, the development of such methods requires expensive resource investment, and inappropriate physical models or inaccurate parameters may lead to performance degradation or unrealistic solutions. Model-free deep reinforcement learning (DRL) methods have received widespread attention in recent years. DRL can continuously learn and adjust strategies directly in the process of interacting with the environment, and use parameterized deep neural networks (DNNs) to approximate high-dimensional complex nonlinear systems. Compared with random programming and robust optimization methods, it can better adapt to changes and uncertainties in the environment. When making optimization decisions for high-penetration distribution networks with photovoltaic-storage-charging, the feasibility of the strategy is crucial and should be theoretically verified. In the online execution stage, finding the best strategy considering the real-time operation constraints of the distribution network is a key challenge facing the DRL algorithm.

[0004] Based on the above analysis, this case was created to solve the distribution network optimization problem with gradually increasing uncertainty and complexity. Summary of the invention

[0005] The purpose of this invention is to provide a photovoltaic storage charging and distribution network optimization decision-making method based on explainable and secure reinforcement learning, which can not only give a good decision-making plan when facing the uncertainty of PV and EV power, but also meet the real-time constraints of distribution network operation in the execution stage.

[0006] In order to achieve the above object, the solution of the present invention is:

[0007] A method for optimizing decision-making of a photovoltaic storage charging and distribution network based on explainable secure reinforcement learning includes the following steps:

[0008] Step 1: Construct the Markov decision process MDP for active / reactive power optimization decision of the photovoltaic storage charging and distribution network and the uncertain operation environment of the distribution network, where the Markov decision process MDP includes state space, action space, reward function and state transition probability distribution;

[0009] Step 2: According to the constructed MDP, the DRL agent is trained through the MIP-CDQN algorithm. First, the experience trajectory is collected, then the parameters of the actor deep neural network and the critic deep neural network are updated, and finally the trained critic deep neural network is saved.

[0010] Step 3, converting the action selection process of the trained critic deep neural network into a solvable mixed integer nonlinear programming model, wherein the model includes real-time operation constraints of the distribution network;

[0011] Step 4: deploy the mixed integer nonlinear programming model to the distribution network for online optimization, and solve the model online according to the actual operating status of the distribution network to obtain the best control strategy that meets the constraints.

[0012] In step 1 above, the state space of the Markov decision process MDP is Contains several states t ,s t =(P i,t ,Q i,t ,V i,t ,SOC k,t ), is the state observed by the agent at time t, which respectively represents the net active power injection, net reactive power injection and node voltage amplitude of all nodes, as well as the charge SOC state of the energy storage BSS, is the number of nodes in the distribution network, is the number of energy storage BSS;

[0013] Action Space Contains the reactive power output of all PV and electric vehicle charging stations EVCS in the distribution network and the active power output of energy storage BSS, is a continuous action space, and Represent the reactive and active outputs of PV, EVCS and BSS respectively;

[0014] Reward Function The following formula represents:

[0015]

[0016] Among them, r t is the reward function at time t; P t loss is the active power loss of the distribution network at time t, C P is the cost of active power loss, σ1, σ2, σ3 are penalty weights, and the penalty function at time t and Defined as:

[0017]

[0018] In the above formula, V j,t ,I ij,t and Respectively represent the node voltage, branch current and power of the upper grid interaction at time t; V max and V min is the upper and lower limits of the node voltage, I max is the branch current limit, The active power limit introduced from the upper power grid is The power limit for feeding back to the upper grid;

[0019] State transition probability distribution The state transition probability function is defined as in Represents the agent taking action a at time t t When the state changes from s t Transfer to t +1 probability, Represents the transfer process of the power flow state.

[0020] The above action space middle, and Subject to the constraints defined below,

[0021]

[0022] in, is the active output of BSS at node j at time t, and They represent the lower and upper limits of BSS charging and discharging power respectively; is the reactive output of PV at node j at time t, is the installed capacity of the PV, is the active output of PV at node j at time t; is the reactive power output of EVCS at node j at time t, is the installed capacity of the EVCS, is the active output of EVCS at node j at time t.

[0023] In step 2 above, the specific process of training the DRL agent through the MIP-CDQN algorithm is:

[0024] Self-experienced trajectory pool Randomly sample a small batch of experience trajectories B for updating the neural network parameters, let B be half of the capacity; the neural network parameters include the action value network Q θ The parameters θ, the policy network parameters ω and the target network Q θtarget The parameter θ target ;

[0025] Update the action value network Q according to the following formula θ Parameter θ;

[0026]

[0027] Among them, r t,i represents the reward function of the i-th experience trajectory at time t; γ represents the discount factor, Q θ (s t+1,i ,a) represents the action value network with parameter θ, represents the action space, Q θtarget (·) indicates that the parameter is θ target The target action value network, s t+1,i represents the state of the ith experience trajectory at t+1, s t,i represents the state of the ith experience trajectory;

[0028] By formula Update the policy network parameters ω; where, represents the gradient calculation, π ω(st) represents the policy network with parameter ω, and B represents the empirical trajectory obtained by sampling;

[0029] Through the formula θ target ←ξθ+(1-ξ)θ target Update the target network parameters Q θtarget ; Among them, ξ is the soft update coefficient, which represents the lag factor of the target network update.

[0030] The above experience trajectory pool contains L empirical trajectories τ1,…,τ L , the method to obtain it is,

[0031] At the current time t, t=1,…,L, sample the noisy action a according to the policy network π t ~π ω (s t )+ε, ε is noise; where the initial state of the distribution network is set to s0;

[0032] Execute action a t , and get the reward r of feedback from the environment t and the new state is the state transition probability distribution, Indicates that the agent takes action a at time t t When the state changes from s t Transfer to t +1 probability, Represents the transfer process of the tidal current state;

[0033] The experience trajectory τ obtained at the current time t t =(s t ,a t ,r t ,s t+1 ) is stored in the experience track pool middle;

[0034] Repeat the above steps until L empirical trajectories τ1,…,τ corresponding to t=1,…,L are obtained L .

[0035] In step 3 above, the mixed integer nonlinear programming model is expressed as follows,

[0036] Objective function:

[0037]

[0038] In the formula, is the action space, x represents the input of the neuron, s is an auxiliary variable used to assist in representing the output of the neuron, z is a binary 0-1 variable, K represents the number of layers of the neural network, and n represents the number of neurons; is the input of the jth neuron in the kth layer of the neural network, which is also the output of the jth neuron in the k-1th layer of the neural network; and represents the cost coefficient of the neuron; the relationship between the above parameters satisfies the following constraints;

[0039]

[0040] Where n k is the number of neurons in the k-th layer of the neural network, is the input of the jth neuron in the k-1th layer of the neural network; is a binary variable, is an auxiliary variable, when w k-1 x k-1 +b k-1 When s is a positive number, k =0, then x k =w k-1 x k-1 +b k-1 is the output of the ReLU function; conversely, s k =-(w k-1 x k-1 +b k-1 ) represents the negative value of the neuron, and the weight and bias is a fixed parameter;

[0041] For the input layer of the neural network, that is, k = 0, and represents the input constraints of the Q network, namely s and a;

[0042] n0 is the number of neurons in the input layer;

[0043] and Represents the input of neurons in the hidden layer of the neural network The lower and upper limits of and Represent auxiliary variables The lower and upper limits of

[0044] v j,t and l ij,t Represent the node voltage and branch current square at time t, V max and V min is the upper and lower limits of the node voltage, I max It is branch current limiting;

[0045] The active power limit introduced from the upper power grid is is the power limit for feeding back to the upper grid, P t grid Represents the power interacting with the upper grid at time t; represents the SOC state of the i-th BSS at time t, η B,i is the charge and discharge efficiency of the i-th BSS, represents the charge and discharge power of the i-th BSS, Δt is the unit charge and discharge time, is the capacity of the BSS, is the number of energy storage BSS; and are the upper and lower limits of SOC of the i-th BSS respectively.

[0046] The specific process of step 4 above is:

[0047] Extract the trained DRL agent action value network Q θ ;

[0048] Get the real-time operating status of the distribution network t ;

[0049] The real-time safety constraints are obtained according to the real-time operation status of the distribution network, and the safety constraints are input into the mixed integer nonlinear programming model for solution;

[0050] The actions that satisfy the constraints are obtained and input into the distribution network to complete the online optimization.

[0051] This paper proposes a MIP-CDQN algorithm to optimize the active / reactive decision-making problem of a high-penetration distribution network of photovoltaic storage and charging. The algorithm can strictly enforce the distribution network operation constraints related to the action space and ensure the feasibility of the agent's strategy in real-time operation. To this end, the Max-Q process of the DRL action value function (a DNN) is expressed as a mixed integer programming model, and the operation constraints of the distribution network are further added to the model for solution, so as to perform an interpretable optimization solution to the DRL action selection process.

[0052] After adopting the above scheme, the present invention realizes the active / reactive power optimization decision of the photovoltaic storage and charging high penetration distribution network through an interpretable safe reinforcement learning algorithm. Compared with the existing active / reactive power optimization decision method, the proposed scheme takes into account the complementary characteristics of photovoltaic storage and charging equipment, and further improves the flexible regulation capability of the distribution network. Compared with other DRL methods, the proposed scheme uses the state transition probability distribution to describe the uncertainty of the distribution network flow transfer, so as to deal with the multivariate uncertainty variables of the distribution network. At the same time, the proposed MIP-CDQN algorithm can strictly enforce the distribution network operation constraints related to the action space and provide an interpretable proof. The algorithm ensures the feasibility of the intelligent agent's strategy in real-time operation, and can still ensure the satisfaction of the constraints even when the load power consumption or PV power generation is large. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 It is a schematic diagram of the process of the present invention;

[0054] Figure 2 It is a framework diagram of active and reactive power optimization of distribution network based on MIP-CDQN algorithm provided by one embodiment of the present invention;

[0055] Figure 3is an evolution diagram of the average cumulative discounted reward per round during the DRL algorithm training process provided by an embodiment of the present invention;

[0056] Figure 4 It is the active power loss situation on the test set under different schemes provided by an embodiment of the present invention;

[0057] Figure 5 1 is a graph showing four solutions provided by an embodiment of the present invention and voltage curves of nodes 7, 14, 17 and 32 on a test day without any measures. DETAILED DESCRIPTION

[0058] The technical solutions and beneficial effects of the present invention will be described in detail below with reference to the accompanying drawings.

[0059] like Figure 1 As shown, the present invention provides a method for optimizing decision-making of a photovoltaic storage charging and distribution network based on explainable safety reinforcement learning, comprising the following steps:

[0060] Step 1: Construct a Markov decision process (MDP) for active / reactive power optimization decision-making in the photovoltaic storage charging and distribution network and the uncertain operation environment of the distribution network, where the MDP includes state space, action space, reward function and state transition probability distribution;

[0061] State Space In the framework studied by this invention, the state s t reflects the DRL agent’s perception of the distribution network operation status at time t, s t =(P i,t ,Q i,t ,V i,t ,SOC k,t ), is the state observed by the agent at time t, which respectively represents the net active power injection, net reactive power injection and node voltage amplitude of all nodes, as well as the charge (SOC) state of the energy storage (BSS), is the number of nodes in the distribution network, is the number of BSS;

[0062] Action space A: The actions of the agent include the reactive power output of all PV and electric vehicle charging stations (EVCS) in the distribution network and the active power output of BSS. is a continuous action space, where and represents the reactive and active output of PV, EVCS and BSS, and their upper and lower limits follow the constraints defined in equations (1), (2) and (3), which can be directly satisfied by setting the boundaries of the agent's action space.

[0063]

[0064]

[0065]

[0066] In the formula, is the active output of BSS at node j at time t, and They represent the lower and upper limits of BSS charging and discharging power respectively; is the reactive output of PV at node j at time t, is the installed capacity of the PV, is the active output of PV at node j at time t; is the reactive power output of EVCS at node j at time t, is the installed capacity of the EVCS, is the active output of EVCS at node j at time t;

[0067] Reward Function The main purpose of the present invention is to minimize the energy loss during operation while satisfying the operation constraints of the distribution network. Therefore, the reward function at time t is:

[0068]

[0069] Where P t loss is the active power loss of the distribution network at time t, C P is the cost of active power loss, σ in the above formula is the penalty weight, and the penalty function at time t is and Can be defined as:

[0070]

[0071] In the above formula, V j,t ,I ij,t and P t grid Respectively represent the node voltage, branch current and power of the upper grid interaction at time t; V max and V min is the upper and lower limits of the node voltage, I max is the branch current limit, The active power limit introduced from the upper power grid is The power limit for feeding back to the upper grid.

[0072] State transition probability distribution In an MDP, the state transition probability function is usually defined as in Represents the agent taking action a at time t t When the state changes from s t Transfer to t In the framework of active and reactive power optimization of the distribution network studied in this embodiment, The transfer process representing the power flow state is also the core of the DRL algorithm in dealing with this type of problem.

[0073] Distribution network simulation operation environment: The purpose of building a simulation operation environment is to allow the DRL agent to learn the best strategy in the process of interacting with it, so as to optimize the current distribution network. This embodiment uses the PYPOWER toolkit to build a distribution network environment. At each decision step, the distribution network will inject variables (These electrical quantities can be obtained through SCADA). These random variables also lead to changes in active network loss and voltage and current. t Take corresponding actions t Input into the distribution network simulation environment, and then perform power flow calculation to obtain s t+1 The DRL algorithm captures the random evolution of system power flow through the constructed environment and historical operation data, and then learns the optimal adaptive control strategy.

[0074] Step 2: According to the constructed MDP, the DRL agent is trained through the MIP-CDQN algorithm. First, the experience trajectory is collected, then the parameters of the actor deep neural network and the critic deep neural network are updated, and finally the trained critic network is saved.

[0075] In the DQN algorithm, the action value function Q π (S t ,A t ) is defined as a t Next take a t The estimated value of the expected cumulative return that can be obtained, Q of the DQN algorithm π (S t ,A t ) can be expressed as:

[0076]

[0077] The Bellman optimality principle states that the optimal action-value function of an MDP follows the expected cumulative return of the optimal strategy, which is expressed as follows:

[0078]

[0079] The optimal Bellman equation of formula (9) is usually solved using the temporal difference algorithm. In order to find the optimal estimate, the DQN algorithm iterative solution follows the following update rule:

[0080]

[0081] In the above formula, Q(·) is a function approximator, which is used to estimate the optimal action value α∈(0,1) is the learning rate. Q(·) in the DQN algorithm is replaced by a DNN with a parameter θ, which can be expressed as Q θ (·), the update iterative process of equation (10) can be regarded as a regression problem, the purpose of which is to estimate the parameters θ of the DNN by stochastic gradient ascent. At the same time, the DQN algorithm uses the value r t +γmax Q θtarget (s t ,a t ) to update Q θ , here Q θtarget Represents a target value network. Under such a design, the parameter θ can be iteratively obtained by minimizing a loss function in the historical experience trajectory of a small batch. Therefore, the loss function used to train DQN can be defined as the mean square Bellman error:

[0082]

[0083] In the formula, r t,i represents the reward function of the i-th experience trajectory at time t; γ represents the discount factor, Q θ (s t+1,i ,a) represents the action value network with parameter θ, A represents the action space, Q θtarget (·) indicates that the parameter is θ target The target action value network, s t+1,i represents the state of the ith experience trajectory at t+1, s t,i represents the state of the t-th experience trajectory.

[0084] The process of updating the action value network parameters of the MIP-CDQN algorithm proposed in this invention is the same as that of the traditional DQN algorithm. However, the traditional DQN algorithm is designed for discrete action spaces and uses a*=argmax Q in the execution phase. θ (s,a) greedily enumerates the action with the largest Q value (i.e., Max-Q problem), but for continuous actions, it is unrealistic to enumerate infinite Q values. Therefore, the MIP-CDQN algorithm of the present invention uses a parameterized deterministic strategy network π ω To explore continuous actions, but after training only the action value network Q is retained θ , while discarding the strategy network πω , the proposed algorithm does not use the exhaustive Q value method when selecting actions after training the network, but combines the subsequent steps to transform the Max-Q problem into a mathematical model to solve it. The proposed algorithm obtains good quality in iteration After that, at time step t and state s t Next, the optimal action a t According to Q θ (·) is selected from the optimal strategy, which can be expressed as:

[0085]

[0086] The training process of the MIP-CDQN algorithm proposed in the present invention is as follows:

[0087] 1) Self-experience trajectory pool Randomly sample a small batch of experience trajectories B for updating the neural network parameters, let B be half of the capacity; the neural network parameters include the action value network Q θ The parameters θ, the policy network parameters ω and the target network Q θtarget The parameter θ target ;

[0088] 2) Update the action value network Q according to formula (11) θ Parameter θ;

[0089] By formula Update the policy network parameters ω; where, represents the gradient calculation, π ω(st) represents the policy network with parameter ω, and B represents the empirical trajectory obtained by sampling;

[0090] Through the formula θ target ←ξθ+(1-ξ)θ target Update the target network parameters Q θtarget ; Among them, ξ is the soft update coefficient, which represents the lag factor of the target network update.

[0091] Among them, the experience trajectory pool contains L empirical trajectories τ1,…,τ L , the method to obtain it is,

[0092] a. At the current time t, t = 1, ..., L, sample the noisy action a according to the policy network π t ~π ω (s t )+ε, ε is noise; where the initial state of the distribution network is set to s0;

[0093] b. Execute action a t , and get the reward r of feedback from the environmentt and the new state is the state transition probability distribution, Indicates that the agent takes action a at time t t When the state changes from s t Transfer to t +1 probability, Represents the transfer process of the tidal current state;

[0094] c. The experience trajectory τ obtained at the current time t t =(s t ,a t ,r t ,s t+1 ) is stored in the experience trajectory pool D;

[0095] d. Repeat the above steps ac until L empirical trajectories τ1,…,τ corresponding to t=1,…,L are obtained L .

[0096] Step 3, the Max-Q process of the critic network when selecting actions is expressed as a mixed integer programming (MIP) model, and the real-time operation constraints of the distribution network are added to the MIP model, thereby converting the action selection process into a solvable mixed integer nonlinear programming model;

[0097] As described in step 2, any state s can be obtained by solving the Max-Q problem in equation (12) t The action a with the largest value under t For the action value network Q obtained through training θ For example, it consists of K+1 layers from 0 to K, the 0th layer is the input of the DNN, and the Kth layer is the output of the DNN. Each layer k∈{0,1,…,K} consists of n k neurons, numbered from 1 to n k , in this embodiment, UNIT(j,k) represents the jth neuron in the kth layer. Let x k is the output vector of the kth layer, that is, x k By UNIT(j,k)(j=1,…,n k ). For each layer of DNN:

[0098] x k =h(W k-1 x k-1 +b k-1 ) (13)

[0099] Where W k-1 and b k-1are the weight and bias parameters of the neural network, h(·) is the activation function. This embodiment uses the linear rectifier function (ReLU) as the activation function. For a real vector y: ReLU(y): = max{0,y}. For a DNN with a fixed parameter θ, the ReLU function can be modeled by a binary indicator constraint z, and then expressed as a MIP model. Therefore, a binary variable is used for each neuron UNIT(j,k) Activate, then DNN can be restated as a MIP model. The purpose of this process is to solve the maximum action value Q under a specific s, and the decision variable is a. Then in the process of solving the optimal action, the distribution network voltage, current and gateway power constraints related to the action are added to the MIP model for interpretable solution to obtain a safe action that meets the constraints. The mixed integer nonlinear programming model is as follows.

[0100] Objective function:

[0101]

[0102] In the formula, is the action space, x represents the input of the neuron, s is an auxiliary variable used to assist in representing the output of the neuron, z is a binary 0-1 variable, K represents the number of layers of the neural network, and n represents the number of neurons; is the input of the jth neuron in the kth layer of the neural network, that is, the output of the jth neuron in the k-1th layer of the neural network, and is the variable to be solved; and represents the cost coefficient of the neuron, which is a constant; the relationship between the above parameters satisfies the following constraints:

[0103]

[0104] In the above formula, n k is the number of neurons in the k-th layer of the neural network, is the input of the jth neuron in the k-1th layer of the neural network; is an introduced binary variable, is an auxiliary variable, when w k-1 x k-1 +b k-1 When s is a positive number, k =0, then x k =w k-1 x k-1 +b k-1 is the output of the ReLU function; conversely, s k =-(w k-1 x k-1 +b k-1) represents the negative part of the neuron, and the weight and bias is a fixed parameter (constant); Equations (16) and (17) define the upper and lower bounds of the variable. For the input layer of the neural network (k = 0), lb j k and represents the input limits of the Q network, i.e., s and a, and for k ≥ 1, these bounds can be defined based on fixed parameters; n0 is the number of neurons in the input layer; and Represents the input of neurons in the hidden layer of the neural network The lower and upper limits of and Represent auxiliary variables The lower and upper limits of the distribution network; Equations (18) to (22) represent the operation constraints of the distribution network, v j,t and l ij,t Represent the node voltage and branch current square at time t, V max and V min is the upper and lower limits of the node voltage, I max It is branch current limiting; The active power limit introduced from the upper power grid is is the power limit for feeding back to the upper grid, P t grid Represents the power interacting with the upper grid at time t; represents the SOC state of the i-th BSS at time t, η B,i is the charge and discharge efficiency of the i-th BSS, represents the charge and discharge power of the i-th BSS, Δt is the unit charge and discharge time, is the capacity of the BSS, is the number of energy storage BSS; and are the upper and lower limits of SOC of the i-th BSS respectively.

[0105] Step 4: deploy the mixed integer nonlinear programming model to the distribution network for online optimization, and solve the model online according to the actual operating status of the distribution network to obtain the best control strategy that meets the constraints.

[0106] Figure 2The framework and process of active and reactive power optimization of distribution network based on MIP-CDQN algorithm are demonstrated. In the online execution stage, the DRL algorithm is combined with MIP, the trained action value network Q is retained, and it is converted into a MIP model for solution. In this process, according to the nonlinear mapping relationship between decision variables and power flow constraints, the distribution network operation constraints are added to the MIP model to ensure that the DRL algorithm meets the safety constraints of the distribution network when executing the active and reactive power optimization decision of the distribution network online. The online execution process of the MIP-CDQN algorithm is as follows:

[0107] 1) Extract the trained action value network Q θ ;

[0108] 2) Obtain the real-time operating status of the distribution network t ;

[0109] 3) Obtaining real-time safety constraints according to the real-time operating status of the distribution network, and inputting the safety constraints into the mixed integer nonlinear programming model for solution;

[0110] 4) Obtain actions that satisfy the constraints and input them into the distribution network to complete online optimization.

[0111] Reference Figures 2 to 5 , which is an embodiment of the present invention, provides a photovoltaic storage charging and distribution network optimization decision-making method based on explainable security reinforcement learning. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through experiments.

[0112] The effectiveness of the proposed MIP-CDQN method was verified using the IEEE33 node test system. Figure 2 As shown. In the IEEE33 node system, three PV cluster stations are at nodes 14, 25, and 32, two EVCS are at nodes 7 and 24, and two grid-side BSS are connected to nodes 17 and 32. Each node aggregates a certain amount of power load, including residential and industrial users. The PV, EVCS, and load data used in this embodiment are collected from real operating scenarios. According to the IEEE1547 grid specification, we design the capacity of each PV and EVCS inverter to be 120% of its maximum active power. The capacity of the two BSSs in this embodiment is 3MW, the maximum charge and discharge power is 0.5MW, the upper and lower limits of SOC are [0.2, 0.8], and the charge and discharge efficiency is 0.95.

[0113] The DRL agent is trained for 1000 rounds, and each round randomly selects one day's data from the training set for interaction, including 480 decision steps, and the timestamp of each decision step is 3 minutes, corresponding to the data resolution. The present invention sets the upper and lower limits of node voltage to [0.95, 1.05], the upper limit of branch current amplitude to 500A, and the gateway active power to -1~4MW (negative numbers represent reverse power to the superior power grid). Due to the presence of large industrial loads and EVCS in the distribution network, serious undervoltage conditions are prone to occur, so the voltage of the head-end transformer node is increased to 1.025pu. The hyperparameter settings of the proposed algorithm are shown in Table 1.

[0114] Table 1 Hyperparameter settings of the proposed MIP-CDQN algorithm

[0115]

[0116] The proposed MIP-CDQN algorithm, soft actor-critic (SAC) algorithm and secure reinforcement learning constrained policy gradient (CPO) algorithm are trained on the same training dataset to compare their effects. The same reward function is set for MIP-CDQN and SAC, while the reward function in the CPO training process only retains the network loss cost to solve the constrained MDP. For fairness, the same hyperparameters are set for the policy network and value network of all algorithms. Figure 3 The average cumulative discounted reward values ​​of the three DRL algorithms after 1000 rounds of training are shown. Figure 3 It can be seen that the rewards of the DRL agent are low and unstable in the early stage of training. This is the result of the random initialization of the neural network parameters, which leads to poor actions of the agent. The reward function of the CPO algorithm does not contain a penalty term, so the reward value in the initial stage of training is higher than that of the other two algorithms. With the continuous update of network parameters, MIP-CDQN and SAC also learn good actions that meet the operation constraints of the distribution network and obtain higher round average rewards.

[0117] To further verify the effectiveness of the proposed method, the trained DRL algorithm was executed online on the test set. The test day was a typical summer day with large PV power generation. In addition to the DRL algorithm, a solution based on the SOCP model was also compared. This solution assumes that the test data has been perfectly predicted and is solved through continuous iteration by the solver, so the result can be regarded as an ideal solution. Figure 4The network loss comparison of the four solutions on the test day is shown. It can be seen that the proposed MIP-CDQN method and the ideal solution set obtained by SOCP show similar performance. Compared with the two solution methods of SAC and CPO, the average network loss of each decision step is reduced by 55.5kW and 6kW. Since the safety reinforcement learning CPO method can ignore the penalty items caused by violating the operating constraints during training, it can focus on the goal of minimizing network loss. The proposed MIP-CDQN method has better performance than the CPO algorithm, thanks to the maximum Q value solution when selecting actions. The performance of the SAC algorithm in network loss optimization is weak, which may be due to the excessive reactive power output to meet the voltage requirements, which in turn causes greater network losses.

[0118] Furthermore, the constraint execution capability of the proposed MIP-CDQN algorithm in solving the operation optimization problem of the high-penetration distribution network with solar-storage-charging is analyzed. Figure 5 The voltage curves of nodes 7, 14, 17 and 32 on the test day are shown in four solutions and without any measures. As can be seen from the figure, due to the large basic power load and EV load at night on the test day, all four nodes have serious low voltage problems, and there is an overvoltage problem caused by the large PV power generation at noon. As expected, the MIP-CDQN algorithm can strictly constrain the voltage within the restricted range. In contrast, although the safety reinforcement learning CPO algorithm can also significantly reduce the risk of voltage over-limit, it cannot enforce voltage constraints in several time periods with large loads or large PV power generation (19:00-23:00 and 11:00-13:00). At the same time, it can be seen from the figure that the SAC algorithm based on the random strategy is not as stable as the MIP-CDQN algorithm that solves the maximum Q value when executing actions, and the actions are too conservative. Although the voltage optimization effect is good, the excessive reactive actions lead to greater active network losses.

[0119] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The schemes in the embodiments of the present invention may be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.

[0120] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0121] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0122] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0123] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0124] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for optimizing decision-making of photovoltaic storage charging and distribution network based on explainable security reinforcement learning, characterized by: The following steps are included: Step 1: Construct the Markov decision process MDP for active / reactive power optimization decision of the photovoltaic storage charging and distribution network and the uncertain operation environment of the distribution network, where the Markov decision process MDP includes state space, action space, reward function and state transition probability distribution; Step 2: According to the constructed MDP, the DRL agent is trained through the MIP-CDQN algorithm. First, the experience trajectory is collected, then the parameters of the actor deep neural network and the critic deep neural network are updated, and finally the trained critic deep neural network is saved. Step 3, converting the action selection process of the trained critic deep neural network into a solvable mixed integer nonlinear programming model, wherein the model includes real-time operation constraints of the distribution network; Step 4: deploy the mixed integer nonlinear programming model to the distribution network for online optimization, and solve the model online according to the actual operating status of the distribution network to obtain the best control strategy that meets the constraints.

2. The method according to claim 1, characterized in that: In step 1, the state space S of the Markov decision process MDP contains several states s t , is the state observed by the agent at time t, which respectively represents the net active power injection, net reactive power injection and node voltage amplitude of all nodes, as well as the charge SOC state of the energy storage BSS, is the number of nodes in the distribution network, is the number of energy storage BSS; Action Space Contains the reactive power output of all PV and electric vehicle charging stations EVCS in the distribution network and the active power output of energy storage BSS, is a continuous action space, and Represent the reactive and active outputs of PV, EVCS and BSS respectively; Reward Function The following formula represents: Among them, r t is the reward function at time t; P t loss is the active power loss of the distribution network at time t, C P is the cost of active power loss, σ1, σ2, σ3 are penalty weights, and the penalty function at time t and Defined as: In the above formula, V j,t ,I ij,t and P t grid Respectively represent the node voltage, branch current and power of the upper grid interaction at time t; V max and V min is the upper and lower limits of the node voltage, I max is the branch current limit, The active power limit introduced from the upper power grid is The power limit for feeding back to the upper grid; State transition probability distribution The state transition probability function is defined as in Represents the agent taking action a at time t t When the state changes from s t Transfer to t +1 probability, Represents the transfer process of the power flow state.

3. The method according to claim 2, characterized in that: The action space middle, and Subject to the constraints defined below, in, is the active output of BSS at node j at time t, and They represent the lower and upper limits of BSS charging and discharging power respectively; is the reactive output of PV at node j at time t, is the installed capacity of the PV, is the active output of PV at node j at time t; is the reactive power output of EVCS at node j at time t, is the installed capacity of the EVCS, is the active output of EVCS at node j at time t.

4. The method according to claim 1, characterized in that: In step 2, the specific process of training the DRL agent by the MIP-CDQN algorithm is: Self-experienced trajectory pool Randomly sample a small batch of experience trajectories B for updating the neural network parameters, let B be half of the capacity; the neural network parameters include the action value network Q θ The parameters θ, the policy network parameters ω and the target network Q θtarget The parameter θ target ; Update the action value network Q according to the following formula θ Parameter θ; Among them, r t,i represents the reward function of the i-th experience trajectory at time t; γ represents the discount factor, Q θ (s t+1,i ,a) represents the action value network with parameter θ, represents the action space, Q θtarget (·) indicates that the parameter is θ target The target action value network, s t+1,i represents the state of the ith experience trajectory at t+1, s t,i represents the state of the ith experience trajectory; By formula Update the policy network parameters ω; where, represents the gradient calculation, π ω(st) represents the policy network with parameter ω, and B represents the sampled empirical trajectory; Through the formula θ target ←ξθ+(1-ξ)θ target Update the target network parameters Q θtarget ; Among them, ξ is the soft update coefficient, which represents the lag factor of the target network update.

5. The method according to claim 4, characterized in that: The experience trajectory pool contains L empirical trajectories τ1,…,τ L , the method to obtain it is, At the current time t, t=1,…,L, sample the noisy action a according to the policy network π t ~π ω (s t )+ε, ε is noise; where the initial state of the distribution network is set to s0; Execute action a t , and get the reward r of feedback from the environment t and the new state is the state transition probability distribution, Indicates that the agent takes action a at time t t When the state changes from s t Transfer to t +1 probability, Represents the transfer process of the tidal current state; The experience trajectory τ obtained at the current time t t =(s t ,a t ,r t ,s t+1 ) is stored in the experience track pool middle; Repeat the above steps until L empirical trajectories τ1,…,τ corresponding to t=1,…,L are obtained L .

6. The method according to claim 1, characterized in that: In step 3, the mixed integer nonlinear programming model is expressed as follows: Objective function: In the formula, is the action space, x represents the input of the neuron, s is an auxiliary variable used to assist in representing the output of the neuron, z is a binary 0-1 variable, K represents the number of layers of the neural network, and n represents the number of neurons; is the input of the jth neuron in the kth layer of the neural network, which is also the output of the jth neuron in the k-1th layer of the neural network; and represents the cost coefficient of the neuron; the relationship between the above parameters satisfies the following constraints; Where n k is the number of neurons in the k-th layer of the neural network, is the input of the jth neuron in the k-1th layer of the neural network; is a binary variable, is an auxiliary variable, when w k-1 x k-1 +b k-1 When s is a positive number, k =0, then x k =w k-1 x k-1 +b k-1 is the output of the ReLU function; conversely, s k =-(w k-1 x k-1 +b k-1 ) represents the negative part of the neuron, and the weight and bias is a fixed parameter; For the input layer of the neural network, that is, k = 0, and represents the input constraints of the Q network, namely s and a; n0 is the number of neurons in the input layer; and Represents the input of neurons in the hidden layer of the neural network The lower and upper limits of and Represent auxiliary variables The lower and upper limits of v j,t and l ij,t Represent the node voltage and branch current square at time t, V max and V min is the upper and lower limits of the node voltage, I max It is the branch current limit; The active power limit introduced from the upper power grid is is the power limit for feeding back to the upper grid, P t grid Represents the power interacting with the upper grid at time t; represents the SOC state of the i-th BSS at time t, η B,i is the charge and discharge efficiency of the i-th BSS, represents the charge and discharge power of the i-th BSS, Δt is the unit charge and discharge time, is the capacity of the BSS, is the number of energy storage BSS; and are the upper and lower limits of SOC of the i-th BSS respectively.

7. The method according to claim 1, characterized in that: The specific process of step 4 is: Extract the trained DRL agent action value network Q θ ; Get the real-time operating status of the distribution network t ; The real-time safety constraints are obtained according to the real-time operation status of the distribution network, and the safety constraints are input into the mixed integer nonlinear programming model for solution; The actions that satisfy the constraints are obtained and input into the distribution network to complete the online optimization.

Citation Information

Patent Citations

  • Power distribution network reactive power optimization method based on depth deterministic strategy gradient algorithm

    CN116207750A