Power distribution network distributed photovoltaic voltage reactive power control method based on MASAC algorithm
By converting the voltage and reactive power control problem of the distribution network into a Markov game model and constructing a neural network, decentralized photovoltaic inverter regulation is achieved and the dependence and communication requirements of voltage regulation in large-scale power systems are solved. , improving the stability and applicability of the power grid and avoiding complexity and instability.
Patent Information
- Application Number
- CN202410467035.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-18
- Publication Date
- 2024-08-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies are difficult to effectively regulate distribution network voltage in large-scale power systems, especially under low load conditions. Due to dependence on system parameters and communication requirements, traditional decentralized control methods have difficulties in practical applications. .
The distribution network distributed photovoltaic voltage and reactive power control method based on the MASAC algorithm is used to transform the distribution network voltage and reactive power decentralized control problem into a Markov game model. By constructing Actor and Critic neural networks, decentralized control is achieved. Photovoltaic inverter regulation, reducing communication requirements and increasing system efficiency.
It can reduce communication requirements and computational burden in large-scale power systems, improve grid voltage stability, has wide applicability and does not rely on system modeling, avoids potential complexity and instability problems, and enhances the stability and stability of the algorithm. reliability.
Smart Images

Figure CN118554555A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of power system automation technology and artificial intelligence reinforcement learning, and specifically relates to a distributed photovoltaic voltage reactive power control method for a distribution network based on a MASAC algorithm. Background Art
[0002] As the penetration of distributed energy resources, especially PV (photovoltaic), continues to increase, they are becoming increasingly important for meeting the growing electricity demand and protecting the environment. However, the unpredictability and volatility of these resources pose many technical challenges to system operators. In particular, the overvoltage problem caused by reverse current caused by excessive PV penetration is of particular concern under low load conditions. In order to improve the voltage profile of the distribution network, reactive voltage control (VVC) is an effective tool that can be used to control the reactive power set point of traditional reactive sources or newly added inverters to regulate the voltage of the distribution network. The VVC method regulates the voltage by utilizing the reactive power absorption / injection capabilities of capacitor banks and smart inverters. From the perspective of control strategies, voltage regulation methods can be divided into four categories: centralized control, local control, distributed control, and decentralized control. Centralized control requires the establishment of fast communication channels, which is costly; local control and distributed control are subject to the need for coordination between agents, which may not be feasible in many applications. Finally, decentralized control combines the advantages of distributed and centralized control methods and utilizes partition control and interval coordination. Traditional decentralized control models require system topology and parameters, which are difficult to obtain in actual distribution systems, especially when a large number of indoor photovoltaic units are popular. Therefore, developing a decentralized control method that does not rely on the precise parameters of the distribution network will overcome the above challenges.
[0003] Deep reinforcement learning, as one of the most commonly used machine learning-based methods, has attracted widespread attention because they can learn optimal control strategies. In deep reinforcement learning methods, the correlation between actions and states is obtained through continuous interaction with the environment. Therefore, it reduces the dependence on obtaining complete information about system parameters. A well-trained deep reinforcement learning agent can provide adaptable actions for any new dynamics in the real world. Studies have used reactive voltage control frameworks based on deep reinforcement learning for voltage regulation in distribution networks. However, these methods require communication links and centralized processing to make decisions based on system states, so they may not be suitable for large-scale power grids with thousands of PVs. A multi-agent deep reinforcement learning (MADRL) method was proposed, which uses the multi-agent deep deterministic policy gradient (MADDPG) algorithm for voltage regulation. This method is only performed in the centralized training phase, while the decentralized execution phase reduces the necessity of real-time communication between numerous distributed resources. However, they have poor exploration efficiency and are not suitable for solving multi-agent decision-making scenarios in large-scale power systems. Summary of the invention
[0004] In view of the problems existing in the prior art, the present invention provides a distributed photovoltaic voltage reactive power control method for a distribution network based on a MASAC algorithm, which is better applied to photovoltaic regulation of large-scale power systems.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: a distributed photovoltaic voltage reactive power control method for distribution network based on MASAC algorithm, comprising the following steps:
[0006] S1. Construct a decentralized control framework for voltage and reactive power of distribution network with distributed photovoltaics, and transform the problem of decentralized control of voltage and reactive power of distribution network into a Markov game model.
[0007] The framework of decentralized control of voltage and reactive power of distribution network includes: minimizing the active power loss of distribution network within a period of time as the goal, using distributed photovoltaic inverters as decision variables, and using a preset voltage range as a constraint;
[0008] The Markov game model includes: state space: a set of local observation values consisting of the net injection of active / reactive power of the photovoltaic inverters and the voltage amplitude of the photovoltaic inverters included in each agent, action space: a set of actions consisting of the reactive output of the photovoltaic inverters controlled by all agents; reward function: constructed by the active loss cost and the voltage limit penalty; state transition process: the state of the agent follows the power flow calculation constraints of the distribution network and is updated according to the state transition probability distribution;
[0009] S2. Construct the MASAC algorithm to solve the Markov game model, and construct Actor and Critic neural networks for each agent. The Actor neural network determines the strategy of the agent, and the Critic neural network is used to determine the value of the strategy.
[0010] The neural network is trained in a centralized training manner to obtain a distributed photovoltaic voltage reactive control model for the distribution network. This model is then used to realize online control of the distribution network voltage and achieve decentralized regulation of the photovoltaic inverter.
[0011] Furthermore, in the aforementioned step S1, the objective is to minimize the active power loss of the distribution network within a period of time, and specifically, the objective function is constructed as follows:
[0012]
[0013] Where T represents the optimization time period, P loss (t) represents the active network loss at time t.
[0014] Furthermore, in the aforementioned step S1, the constraint condition is:
[0015]
[0016] Among them, V k (t) is the voltage of the photovoltaic inverter k at time t, V and They are the preset voltage lower and upper limits respectively.
[0017] Furthermore, in the aforementioned step S1, the state space S is the local observation value s of all photovoltaic inverters at time t i,t A collection of i,t is the local observation value of agent i at time t, s i,t =(p i ,q i ,v i ), p i ,q i and v i They represent the net injection amount of active / reactive power and the node voltage amplitude of the photovoltaic inverter where the intelligent agent i is located;
[0018] The action space A is the action a composed of the reactive output of the photovoltaic inverter controlled by all agents at time t i,t The collection of Q PV,i,t is the reactive output of the PV inverter controlled by agent i at time t.
[0019] Furthermore, in the aforementioned step S1, the reward function is as follows:
[0020]
[0021] Where R(t) is the reward value at time t, P loss (t) is the active power loss at time t, function is a 0-1 discriminant function. When the voltage V k (t)Satisfy the upper and lower limits V , When the function f is 0, otherwise it is 1, σ1 is the unit active power loss cost, and σ2 is the voltage limit penalty factor.
[0022] Furthermore, in the aforementioned step S1, the state transfer process uses the PYPOWER power flow calculation tool to establish the distribution network environment, uses the runpf function to perform power flow calculation, and the power flow calculation constraints include power balance constraints and power flow constraints; the state transfer probability distribution of the intelligent agent is P(s′|s,a), which means that the intelligent agent changes according to the current state S t Take action a t After that, the environment is in action a t Under the action of S t Transfer to S' t probability.
[0023] Furthermore, the aforementioned step S2 includes the following sub-steps:
[0024] S201. Construct an actor network of each agent based on the Actor network. The strategy of the actor network of each agent is as follows:
[0025]
[0026] in, For each agent’s action at a specific time point t, Determined by the Actor network; i represents the index of the agent, and the state vector of agent i at time t is expressed as The strategy of each agent is denoted as It is a strategy based on compressed Gaussian distribution;
[0027] S202, each agent is iteratively updated based on maximizing the expected return and the entropy of the strategy, and the joint strategy π(a t |s t ) is as follows:
[0028]
[0029] In the formula, H(π i ) is the entropy of each local strategy, representing the randomness of the strategy and quantifying the uncertainty in the system; N is the number of agents;
[0030] S203, in the strategy evaluation stage, train the Critic network parameter θ to reduce the Bellman residual:
[0031]
[0032] J Q (θ) is the objective function of the Critic network parameter θ, which trains the network parameters by minimizing this function; Represents the expectation of the state-action pair generated by the current strategy, which is in the current state s t and action a t The distribution of is calculated under, D is the experience replay buffer, which stores the previous ones for training; Q(s t ,a t ) represents the action value function, γ is the discount factor used to calculate the present value of future rewards, and its value is between 0 and 1; r(s t ,a t ) is in state s t Take action a t The instant reward obtained; V θ is the value function parameterized by the parameter θ for the next state s t+1 The value estimate of ; α represents the temperature parameter which is the entropy regularization coefficient, which weighs the relationship between reward and entropy to encourage exploration.
[0033] The parameters of the Critic network are optimized using stochastic policy gradient as follows:
[0034]
[0035] Where:
[0036]
[0037] Among them, r is the immediate reward value, φ i For each agent’s policy parameters,
[0038] S204, strategy formulation phase, the Actor network objective function is as follows:
[0039]
[0040] In the formula, represents the best joint strategy, Q(s t ,a t ) represents the action value function, α represents the temperature parameter; π′ is the target strategy;
[0041] S205. The strategy of each agent is trained by minimizing the expected entropy of the actions produced by its actor network, as shown in the following formula:
[0042]
[0043] Use stochastic gradient descent to update the policy parameter φ of each agent i , α is updated as follows:
[0044]
[0045] Where H' is the target entropy, which is an equivalent vector composed of hyperparameters;
[0046] Compared with the prior art, the beneficial technical effects of the present invention using the above technical solution are as follows:
[0047] 1. Reduce communication requirements and computational burden: The multi-agent deep reinforcement learning method of the present invention can be executed in a decentralized manner, significantly reducing the communication requirements between agent networks. Especially in complex power systems containing a large number of distributed energy resources, this advantage reduces the computational burden brought by centralized methods, thereby improving the overall efficiency and reliability of the system.
[0048] 2. Improve grid voltage stability: By coordinating and controlling the reactive power set point of the photovoltaic inverter, the present invention effectively improves the voltage curve of the distribution network and enhances the voltage stability of the grid. This is particularly important for dealing with the instability and volatility of solar power generation.
[0049] 3. Wide applicability and flexibility: The present invention does not rely on system modeling, which enables it to be flexibly applied to a variety of distribution network configurations without the need for detailed understanding of system topology or parameters. This increases the scope of application of the method, especially for distribution networks where it is difficult to obtain accurate system data.
[0050] 4. Optimization of reinforcement learning algorithm: The developed MASAC algorithm has a strong exploration capability and can effectively find the best action plan for the intelligent agent. Compared with the traditional maximum entropy-based soft Q learning method, this invention avoids the potential complexity and instability problems and enhances the stability and reliability of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 The present invention is a flow chart of the method.
[0052] Figure 2 A schematic diagram of the training results of the MASAC algorithm provided by an embodiment.
[0053] Figure 3A schematic diagram of test results of a MASAC algorithm provided by an embodiment.
[0054] Figure 4 A schematic diagram of reactive power and voltage control robustness test results provided by an embodiment.
[0055] Figure 5 A schematic diagram of the effect of reactive voltage control on all node voltages provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0056] In order to better understand the technical content of the present invention, specific embodiments are given and described as follows in conjunction with the accompanying drawings.
[0057] Various aspects of the invention are described herein with reference to the accompanying drawings, in which many illustrative embodiments are shown. The embodiments of the invention are not limited to those described in the accompanying drawings. It should be understood that the invention is implemented by any of the various concepts and embodiments described above, as well as the concepts and embodiments described in detail below, because the concepts and embodiments disclosed in the invention are not limited to any implementation. In addition, some aspects disclosed in the invention may be used alone or in any appropriate combination with other aspects disclosed in the invention.
[0058] like Figure 1 As shown, the present invention provides a distributed photovoltaic voltage reactive power control method for a distribution network based on a MASAC algorithm, comprising the following steps:
[0059] S1. Construct a decentralized control framework for voltage and reactive power of distribution network with distributed photovoltaics, and transform the problem of decentralized control of voltage and reactive power of distribution network into a Markov game model.
[0060] The framework of decentralized control of voltage and reactive power of distribution network includes: minimizing the active power loss of distribution network within a period of time as the goal, using distributed photovoltaic inverters as decision variables, and using a preset voltage range as a constraint;
[0061] The Markov game model includes: state space: a set of local observation values consisting of the net injection of active / reactive power of the photovoltaic inverters included in each intelligent agent and the voltage amplitude of the photovoltaic inverter; action space: a set of actions consisting of the reactive output of the photovoltaic inverters controlled by all intelligent agents; reward function: constructed by the active loss cost and the voltage limit penalty; state transfer process: the state of the intelligent agent follows the power flow calculation constraints of the distribution network and is updated according to the state transfer probability distribution.
[0062] (1) Objective function: The goal of voltage and reactive power control is to minimize the active power loss of the distribution network within a period of time while ensuring that the node voltage does not exceed the limit. The objective function is as follows:
[0063]
[0064] Where T represents the optimization time period, P loss (t) represents the active network loss at time t.
[0065] (2) Decision variables: The voltage and reactive power decentralized control object of the distribution network is the distributed PV inverter. By adjusting the reactive power output Q of the distributed PV inverter PV To achieve decentralized control of the distribution network.
[0066] (3) Constraints: The most important factor in the decentralized control of voltage and reactive power in distribution networks is the node voltage constraint. During the control process, it is necessary to ensure that the node voltage is within the specified limit range. V and Inside.
[0067] (4) State space: The state space S represents the state of all agents at time t, and s i,t represents the local observation value of agent i at time t, s i,t =(p i ,q i ,v i ), here p i ,q i and v i They represent the net injection of active / reactive power and the node voltage amplitude of the local node where the intelligent agent i is located, and S is the set of all node states.
[0068] (5) Action space: The action space A represents the set of actions of all agents at time t, a i,t represents the reactive output Q of the PV inverter controlled by agent i at time t PV,i,t .
[0069] (6) Reward function: The reward function equation is used to measure the actions taken by the agent. All agents share the same reward function, which consists of two parts: active power loss cost and voltage limit penalty, as follows:
[0070]
[0071] In the above formula, R(t) is the reward value at time t, P loss (t) is the active power loss at time t, function is a 0-1 discriminant function. When the voltage V k (t)Satisfy the upper and lower limits V , The function f is 0 when the voltage is exceeded, otherwise it is 1. The upper and lower limits of the voltage amplitude are set to 1.05 and 0.95, σ1 is the unit active power loss cost, and σ2 is the voltage limit penalty factor.
[0072] (7) State transition process: The state transition process after the action of the intelligent agent is sent into the environment must strictly follow the power flow calculation constraints of the distribution network, including power balance constraints and power flow constraints. The present invention uses the PYPOWER power flow calculation tool to build the distribution network environment, and uses the runpf function to perform power flow calculation. This function automatically satisfies the power balance constraints and power flow constraints when calculating the power flow. The state transition probability distribution of the intelligent agent is represented by P(s′|s,a), which represents the intelligent agent according to the current state S t Take action a t After that, the environment is in action a t Under the action of S t Transfer to S' t probability.
[0073] S2. Construct the MASAC algorithm to solve the Markov game model, and construct Actor and Critic neural networks for each agent. The Actor neural network determines the strategy of the agent, and the Critic neural network is used to determine the value of the strategy.
[0074] The neural network is trained in a centralized training manner to obtain a distributed photovoltaic voltage reactive control model for the distribution network. This model is then used to realize online control of the distribution network voltage and achieve decentralized regulation of the photovoltaic inverter.
[0075] In the present invention, the main innovation of multi-agent MASAC lies in its centralized training and decentralized execution process. In the training phase, the Critic network is centrally trained by using global information, while in the execution phase, each agent uses its local observations as individual inputs to formulate its own control strategy in a decentralized manner, that is, using a compressed Gaussian distribution function to generate continuous actions. In the method proposed in the present invention, the strategy is trained as a trade-off between maximizing entropy and expected returns. This helps to avoid the problem of premature convergence, which is necessary to achieve global optimality. The strategy of the actor network of each agent in the MASAC framework can be expressed as follows:
[0076]
[0077] in, For each agent’s action at a specific time point t, Determined by the Actor network; i represents the index of the agent, and the state vector of agent i at time t is expressed as The strategy of each agent is denoted as It is a strategy based on compressed Gaussian distribution.
[0078] Each agent has its own independent policy, which is updated in each iteration to maximize the trade-off between expected reward and the entropy of the policy. The entropy of the policy represents the randomness of the policy and is a quantification of the uncertainty in the system. The joint policy π(a t |s t ) can be expressed as follows:
[0079]
[0080] In the formula, H(π i ) is the entropy of each local strategy, N is the number of agents;
[0081] In the strategy evaluation phase, the Critic network parameters θ are trained to reduce the Bellman residual:
[0082]
[0083] In the formula, J Q (θ) is the objective function of the Critic network parameter θ, which trains the network parameters by minimizing this function; Represents the expectation of the state-action pair generated by the current strategy, which is in the current state s t and action a t The distribution of is calculated under, D is the experience replay buffer, which stores previous experience (state, action, reward, etc.) for training; Q(s t ,a t ) represents the action value function, γ is the discount factor used to calculate the present value of future rewards, and its value is between 0 and 1; r(s t ,a t ) is in state s t Take action a t The instant reward obtained; V θ is the value function parameterized by the parameter θ for the next state s t+1 The value estimate of ; α represents the temperature parameter which is the entropy regularization coefficient, which weighs the relationship between reward and entropy to encourage exploration.
[0084] During the optimization process, the stochastic policy gradient is used to optimize the parameters of the Critic network:
[0085]
[0086] Where:
[0087]
[0088] In the formula, r is the immediate reward value, φ i For each agent’s policy parameters,
[0089] In the strategy formulation phase, the Actor network goal of the MASAC algorithm can be expressed as:
[0090]
[0091] Where π′ is the target strategy, represents the best joint strategy, Q(s t ,a t ) represents the action value function, α represents the temperature parameter, and the strategy of each agent is parameterized as φ i , aims to reduce the expected entropy through training.
[0092] Specifically, each agent’s policy is trained with the objective of minimizing the expected entropy of actions produced by its actor network, as shown below:
[0093]
[0094] Use stochastic gradient descent to update the policy parameter φ of each agent i , finally, α can be updated as follows:
[0095]
[0096] Where H' is the target entropy, which is an equivalent vector composed of hyperparameters. Actor and Critic neural networks are trained for all agents, and the minimum value of the Q function is considered in the objective function to minimize the overestimation of the state value.
[0097] The MASAC method proposed in this paper aims to optimize the reactive power output of the agent to adjust the voltage of the distribution network node, and treats each PV as an agent for control. In the training phase, the action of each agent is provided to the centralized Critic network to calculate the reward and send it to the agent for strategy update. The offline training process is shown in the following table:
[0098]
[0099] Step 4: Deploy the reinforcement learning agent trained in step 3, and use distributed execution to complete the online control of the distribution network voltage, thereby achieving decentralized control of each PV.
[0100] When the agents are properly trained, they only take local states as input and take actions without communicating with a centralized controller. The following table shows the decentralized distributed online execution process:
[0101]
[0102]
[0103] In order to evaluate the performance of the proposed voltage control framework, simulation experiments on a modified IEEE 34 bus test system were conducted. Twelve aggregated PV inverters were added at different nodes with a total generation capacity of 1576kW. Since the maximum load demand was 1756kW, the maximum solar PV power generation accounted for about 90% of the total peak load. The performance of the decentralized agent was tested under different load and PV curves than the training dataset. In addition, the reactive power of the inverter was controlled to ensure that its operating power factor was not less than 0.9 recommended by the manufacturer. As a power flow solver, PYPOWER was used, connected with a Python interface as a learning and testing environment.
[0104] Each agent is trained for 500 episodes to learn the optimal control strategy to find the optimal behavior to deal with the voltage violation scenario. Both the Actor network and the Critic network are composed of a fully connected neural network, which consists of an input layer, an output layer, and a hidden layer. Its parameters are shown in the following table.
[0105]
[0106] In the early stages of training, individuals randomly explore the decision space of the environment, and eventually Figure 2 As shown, it converges and provides the optimal action after a specific event occurs. After the training phase, each trained agent only needs its local state to provide the optimal action to solve the voltage regulation problem. Through these simulation experiments, the present invention verifies the effectiveness and adaptability of decentralized agents under different load and photovoltaic curve conditions.
[0107] Figure 3 The voltage fluctuation at a node of the test system in the training model and the base case is described. It can be observed that in the base case scenario, there is a voltage violation according to the voltage standard limit, while there is no voltage violation under the control of the proposed MASAC algorithm. In addition, in the base case, the voltage variation is larger than that of the proposed training model.
[0108] Figure 4 The voltage fluctuation of the nodes tested under the training model and basic scenarios is shown. The results show that the proposed method has good performance. Figure 5 The voltage variations of all 34 nodes at minute 20 are depicted. The results show that the proposed trained model has better voltage distribution in terms of voltage variations and violations than the base case.
[0109] Although the present invention has been described above with preferred embodiments, it is not intended to limit the present invention. A person skilled in the art of the present invention may make various modifications and improvements without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be determined by the definition of the claims.
Claims
1. A distributed photovoltaic voltage reactive power control method for distribution network based on MASAC algorithm, characterized in that: The steps include: S1. Construct a decentralized control framework for voltage and reactive power of distribution network with distributed photovoltaics, and transform the problem of decentralized control of voltage and reactive power of distribution network into a Markov game model. The framework of decentralized control of voltage and reactive power of distribution network includes: minimizing the active power loss of distribution network within a period of time as the goal, using distributed photovoltaic inverters as decision variables, and using a preset voltage range as a constraint; The Markov game model includes: state space: a set of local observation values consisting of the net injection of active / reactive power of the photovoltaic inverters and the voltage amplitude of the photovoltaic inverters included in each agent, action space: a set of actions consisting of the reactive output of the photovoltaic inverters controlled by all agents; reward function: constructed by the active loss cost and the voltage limit penalty; state transition process: the state of the agent follows the power flow calculation constraints of the distribution network and is updated according to the state transition probability distribution; S2. Construct the MASAC algorithm to solve the Markov game model, and construct Actor and Critic neural networks for each agent. The Actor neural network determines the strategy of the agent, and the Critic neural network is used to determine the value of the strategy. The neural network is trained in a centralized training manner to obtain a distributed photovoltaic voltage reactive control model for the distribution network. This model is then used to realize online control of the distribution network voltage and achieve decentralized regulation of the photovoltaic inverter.
2. According to the MASAC algorithm-based distributed photovoltaic voltage reactive power control method for distribution network according to claim 1, it is characterized in that: In step S1, the goal is to minimize the active power loss of the distribution network within a period of time. Specifically, the objective function is constructed as follows: Where T represents the optimization time period, P loss (t) represents the active network loss at time t.
3. The method for controlling the voltage and reactive power of distributed photovoltaic power in a distribution network based on the MASAC algorithm according to claim 1, characterized in that: In step S1, the constraints are: Among them, V k (t) is the voltage of the photovoltaic inverter k at time t, V and They are the preset voltage lower and upper limits respectively.
4. The method for controlling the voltage and reactive power of distributed photovoltaic power in a distribution network based on the MASAC algorithm according to claim 1, characterized in that: In step S1, the state space S is the local observation value s of all photovoltaic inverters at time t i,t A collection of i,t is the local observation value of agent i at time t, s i,t =(p i ,q i ,v i ), p i ,q i and v i They represent the net injection amount of active / reactive power and the node voltage amplitude of the photovoltaic inverter where the intelligent agent i is located; The action space A is the action a composed of the reactive output of the photovoltaic inverter controlled by all agents at time t i,t The collection of Q PV,i,t is the reactive output of the PV inverter controlled by agent i at time t.
5. The method for controlling voltage and reactive power of distributed photovoltaic power in distribution network based on MASAC algorithm according to claim 1, characterized in that: In step S1, the reward function is as follows: Where R(t) is the reward value at time t, P loss (t) is the active power loss at time t, function is a 0-1 discriminant function. When the voltage V k (t)Satisfy the upper and lower limits V , When the function f is 0, otherwise it is 1, σ1 is the unit active power loss cost, and σ2 is the voltage limit penalty factor.
6. The method for controlling the voltage and reactive power of distributed photovoltaic power in a distribution network based on the MASAC algorithm according to claim 1, characterized in that: In step S1, the state transfer process uses the PYPOWER power flow calculation tool to establish the distribution network environment, and uses the runpf function to perform power flow calculation. The power flow calculation constraints include power balance constraints and power flow constraints; the state transfer probability distribution of the intelligent agent is P(s′|s,a), which means that the intelligent agent changes according to the current state S t Take action a t After that, the environment is in action a t Under the action of S t Transfer to S' t probability.
7. The method for controlling the voltage and reactive power of distributed photovoltaic power in a distribution network based on the MASAC algorithm according to claim 1, characterized in that: Step S2 includes the following sub-steps: S201. Construct an actor network of each agent based on the Actor network. The strategy of the actor network of each agent is as follows: in, For each agent’s action at a specific time point t, Determined by the Actor network; i represents the index of the agent, and the state vector of agent i at time t is expressed as The strategy of each agent is denoted as It is a strategy based on compressed Gaussian distribution; S202, each agent is iteratively updated based on maximizing the expected return and the entropy of the strategy, and the joint strategy π(a t |s t ) is as follows: In the formula, H(π i ) is the entropy of each local strategy, representing the randomness of the strategy and quantifying the uncertainty in the system; N is the number of agents; S203, in the strategy evaluation stage, train the Critic network parameter θ to reduce the Bellman residual: J Q (θ) is the objective function of the Critic network parameter θ, which trains the network parameters by minimizing this function; Represents the expectation of the state-action pair generated by the current strategy, which is in the current state s t and action a t The distribution of is calculated under, D is the experience replay buffer, which stores the previous ones for training; Q(s t ,a t ) represents the action value function, γ is the discount factor used to calculate the present value of future rewards, and its value is between 0 and 1; r(s t ,a t ) is in state s t Take action a t The instant reward obtained; V θ is the value function parameterized by the parameter θ for the next state s t+1 The value estimate of ; α represents the temperature parameter which is the entropy regularization coefficient, which weighs the relationship between reward and entropy to encourage exploration; The parameters of the Critic network are optimized using stochastic policy gradient as follows: Where: Among them, r is the immediate reward value, φ i For each agent’s policy parameters, S204, strategy formulation phase, the Actor network objective function is as follows: In the formula, represents the best joint strategy, Q(s t ,a t ) represents the action value function, α represents the temperature parameter; π′ is the target strategy; S205. The strategy of each agent is trained by minimizing the expected entropy of the actions produced by its actor network, as shown in the following formula: Use stochastic gradient descent to update the policy parameter φ of each agent i , α is updated as follows: Where H' is the target entropy, which is an equivalent vector composed of hyperparameters; S206: Train the Actor and Critic neural networks for all agents, and take the minimum value of the Q function in the objective function.
Citation Information
Patent Citations
Power distribution network voltage autonomous optimization control method and device
CN113872213A
Power distribution network multi-region cooperative reactive power optimization method based on multi-agent reinforcement learning
CN115483703A
Power distribution system voltage control method based on self-organizing mapping neural network deep reinforcement learning
CN117200213A
Cited By
Power distribution network voltage control method based on multi-agent deep reinforcement learning
CN120582137A
