Energy management method for hydrogen-electricity coupling multi-microgrid system based on improved DDPG
Through the improved DDPG algorithm and energy management model, the problems of repeated energy deployment and low efficiency in the hydrogen-electricity coupled multi-microgrid system are solved, achieving more efficient energy management and reducing operating costs.
Patent Information
- Application Number
- CN202410934104.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-07-12
AI Technical Summary
Traditional energy management algorithms for hydrogen-electricity coupled multi-microgrid systems based on deep reinforcement learning are difficult to effectively solve decision-making problems in continuous spaces such as energy storage charging and discharging, hydrogen storage tank charging and discharging, etc., resulting in repeated energy deployment with low efficiency and high cost.
Using the improved DDPG algorithm, we establish an energy management model including Actor neural network and Critic neural network, and use historical data to train the model to output time-related energy management strategies to avoid unnecessary energy management actions and reduce operating costs.
It effectively avoids unnecessary energy management actions of hydrogen-electricity coupled multi-microgrids, reduces operating costs, and improves operating efficiency.
Smart Images

Figure CN118739432A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an energy management method for a hydrogen-electricity coupled multi-microgrid system based on an improved DDPG, and belongs to the technical field of microgrid system energy management. Background Art
[0002] In recent years, with the continuous increase in installed capacity of new energy, the problem of new energy consumption such as abandoned solar and wind power has also become prominent. The explosive growth of new energy represented by photovoltaic power generation and the continuous improvement of the penetration rate of new energy in the power grid have greatly increased the complexity of power grid operation and the pressure of new energy consumption. While the installed capacity of new energy power generation has grown on a large scale, the proportion of residential electricity consumption such as the tertiary industry and electric vehicle charging has continued to increase, the peak-to-valley difference of system load has further increased, and the peak-to-valley pressure of the power grid and the difficulty of transmission in local areas have also become prominent. On the other hand, the promotion and application of user-side flexible loads such as electric vehicle charging piles, battery energy storage, and electrolysis hydrogen production have provided potential flexible adjustment resources for power grid dispatching and operation. As a regional energy aggregation model for the intensive construction and orderly management of new energy power generation and flexible loads, the hydrogen-electricity coupled microgrid can achieve orderly control of new energy power generation and flexible load systems such as photovoltaic power generation, battery energy storage, and electric vehicle charging piles through supporting communication technology and coordinated control strategies, and access to the power grid operation and market transactions in the form of microgrids. It is one of the important solutions for the integration and utilization of multiple energy facilities in the new power system.
[0003] Traditional energy management based on reinforcement learning, such as the DQN algorithm, requires the discretization of the action space, which leads to the problem of too large action space dimension and suboptimal solution. Therefore, the DQN learning algorithm is difficult to apply to decision-making problems in continuous spaces such as energy storage charging and discharging, and hydrogen storage tank charging and discharging. In addition, the improved DDPG algorithm is based on this. Since the hydrogen-electricity coupled microgrid can receive limited information on hydrogen storage tank capacity, battery status, and charging (hydrogen) station load, and lacks previous "memory", energy management can only rely on the current status of the hydrogen-electricity coupled multi-microgrid, resulting in the planned energy management strategy being too tortuous, and there are repeated and redundant energy allocation problems, which seriously affect the operating efficiency and cost of the hydrogen-electricity coupled multi-microgrid.
[0004] The above problems are issues that should be considered and solved in the energy management process of hydrogen-electricity coupled multi-microgrid systems improved based on deep reinforcement learning. Summary of the invention
[0005] The purpose of the present invention is to provide an energy management method for a hydrogen-electricity coupled multi-microgrid system based on an improved DDPG to solve the problems of repeated and redundant energy allocation, low operating efficiency and high cost of the hydrogen-electricity coupled multi-microgrid in the prior art.
[0006] The technical solution of the present invention is: An energy management method for a hydrogen-electricity coupled multi-microgrid system based on improved DDPG comprises the following steps: S1. Obtain historical data of the hydrogen-electricity coupled multi-microgrid system including historical input states and historical actions; S2. Establish an energy management model for hydrogen-electricity coupled multi-microgrid system based on improved DDPG. The energy management model for hydrogen-electricity coupled multi-microgrid system based on improved DDPG includes Actor neural network and Critic neural network. The Actor neural network includes two strategy networks with the same structure, namely the current strategy network and the target strategy network. The current strategy network is used to input the state s t And output action a t , the target policy network is used to input the next state and output the next action; the Critic neural network includes two Q networks with the same structure, namely the current Q network and the target Q network. The current Q network is used to input the state s t and action a t And output about state a t With action a t The Q value of the target Q network is used to input the next state s t+1 and the next action a t+1 And output about the next state s t+1 and the next action a t+1 Q value; S3. Establish the objective function and constraints of the energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG; S4, initializing the operating environment of the energy management system intelligent agent; S5. Use the historical data of step S1 to train the energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG algorithm to obtain the trained energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG algorithm; S6. Based on the current input state of the hydrogen-electricity coupled multi-microgrid system, an energy management strategy is obtained through the trained energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG algorithm.
[0007] Furthermore, in step S1, the historical input status includes the photovoltaic power generation power, charging power, hydrogen charging power, hydrogen amount in the hydrogen storage tank, and the charge state of the energy storage system in each hydrogen-electricity coupled microgrid in each time period; the historical actions include the electrolyzer hydrogen production power, photovoltaic power generation power, energy storage charging and discharging power, and electricity purchase price in each hydrogen-electricity coupled microgrid in each time period.
[0008] Furthermore, in step S2, each strategy network includes a first long short-term memory network, i.e., a first LSTM network, and two first fully connected layers. The first LSTM network processes the received input state of the hydrogen-electricity coupled microgrid, and then the two fully connected layers process and output the action of the microgrid.
[0009] Furthermore, in step S2, each Q network includes a second LSTM network, a second fully connected layer and a third fully connected layer. When the Critic neural network receives the input state and action of the hydrogen-electricity coupled multi-microgrid system, the input state is processed by the second LSTM network, the action is processed by the second fully connected layer, and the output results of the second LSTM network and the second fully connected layer are processed by the third fully connected layer to output the Q value of the state and action.
[0010] Furthermore, in step S3, the objective function of the energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG is established. f : (1) Where: T is the total number of time periods corresponding to the time period; N is the number of microgrids in the hydrogen-electricity coupled multi-microgrid system; △t is the unit time; They are the electricity purchase cost, charging income, and hydrogen charging income of the hydrogen-electricity coupled multi-microgrid system in period t; are the purchased power and purchased price of the hydrogen-electricity coupled microgrid system during period t, respectively; are the charging power, charging price, hydrogen charging power, and hydrogen charging price of the i-th hydrogen-electricity coupled microgrid during period t; The constraints include: (1) Power balance constraints: (2) Where: is the photovoltaic power generation power of the i-th hydrogen-electricity coupled microgrid in period t; , , is the hydrogen production power of the electrolyzer, the photovoltaic power generation power, the energy storage charging and discharging power, and the power load power of the station in the i-th hydrogen-electricity coupled microgrid during period t; (2) Operation constraints of photovoltaic power generation system: (3) Where: , are the minimum and maximum photovoltaic output power of the i-th hydrogen-electricity coupled microgrid in period t, respectively; (3) Operation constraints of the electrolysis hydrogen production system: a. Operation constraints of electrolyzer: (4) Where: and are the lower and upper limits of the power consumed by the electrolyzer in the ith hydrogen-electricity coupled microgrid during period t during normal operation; b. Fuel cell operation constraints: (5) Where: is the operating power of the fuel cell in the i-th hydrogen-electric coupled microgrid during period t; and It is the lower and upper limits of the power consumed by the fuel cell during normal operation; c. Hydrogen storage tank operation constraints: (6) Where: represents the amount of hydrogen in the hydrogen storage tank of the i-th hydrogen-electricity coupled microgrid during period t; and Indicates the upper and lower limits of the storage capacity of the hydrogen storage tank; (4) Electrochemical energy storage operation constraints: (7) (8) Where: and The upper and lower limits of the charging and discharging power of the energy storage system; The state of charge of the energy storage system is the amount of hydrogen in the hydrogen storage tank of the i-th hydrogen-electric coupled microgrid during period t; and The upper and lower limits of the state of charge of the energy storage system; (5) Charging / hydrogen system operation constraints: a. Charging / Hydrogen Load Constraints: (9) (10) Where: is the initial charging load requirement; is the dispatchable charging load demand; It is the non-dispatchable charging load demand; is the initial hydrogen charging load requirement; It is the dispatchable hydrogen filling load demand; It is the non-dispatchable hydrogen filling load demand; b. Charging / hydrogen pile operation constraints: (11) (12) Where: is the rated power of the charging pile, is the rated power of the hydrogen charging pile.
[0011] Furthermore, in step S4, the operating environment of the energy management system agent is initialized, specifically, S41, input the energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG into the operating environment; S42. Define the state signal space and the action signal space, and set the penalty function and the reward function.
[0012] Further, step S42 is specifically, The state signal space S of the intelligent agent of the hydrogen-electricity coupled multi-microgrid system is defined as: (13) Where: are the photovoltaic power generation power, charging power, hydrogen charging power, hydrogen volume in the hydrogen storage tank, and the state of charge of the hydrogen volume energy storage system in the i-th hydrogen-electricity coupled microgrid during period t; The action signal space A of the intelligent agent in the hydrogen-electricity coupled multi-microgrid system is defined as: (14) Where: are the hydrogen production power of the electrolyzer, the photovoltaic power generation power, the energy storage charging and discharging power of the i-th hydrogen-electricity coupled microgrid in period t; is the electricity purchase price of the hydrogen-electricity coupled multi-microgrid system during period t; Define the reward function R of deep reinforcement learning as (15) Where: C Rewards for the Hydrogen-Electricity Coupled Multi-Microgrid System: (16) Where: T is the total number of time periods corresponding to the time period; N is the number of microgrids in the hydrogen-electricity coupled multi-microgrid system; is the unit time; are the purchased power and purchased price of the hydrogen-electricity coupled microgrid system during period t, respectively; are the charging power, charging price, hydrogen charging power, and hydrogen charging price of the i-th hydrogen-electricity coupled microgrid during period t; D is the penalty function: (17) Where: Penalties for unbalanced electricity in the power system; is the penalty for over-discharge or over-charge of the energy storage system; λ is the penalty coefficient; is the unbalanced amount of power system at the i-th moment; is the over-discharge or over-charge amount of the energy storage system at the i-th moment.
[0013] Furthermore, in step S5, the energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG is trained, specifically, S51, initialize the Actor neural network, Critic neural network and experience pool, set parameters, and initialize the current round number; S52, the state of coupling hydrogen electricity to multi-microgrid system s t Input the current policy network to get a t , perform the action a t , and calculate the reward r t and the next state s t+1 ;Will( s t , a t , r t , s t+1 ) are stored in the experience pool, and the experience pool is used to train the Critic neural network and the Actor neural network; S53, use the minimized loss function to update the Critic neural network, and the policy gradient to update the Actor neural network; S54, compare the current round number with the set maximum round number to see if they are consistent. If they are not consistent, increase the current round number by one and go to step S52; otherwise, save the trained neural network parameters and end the training.
[0014] The beneficial effects of the present invention are as follows: the energy management method of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG adopts the energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG. The action of the hydrogen-electricity coupled microgrid is not only controlled by the current state of the microgrid, but also by the previous state of the microgrid. It can make the action of the microgrid have time correlation, effectively avoid unnecessary energy management actions, effectively reduce the operating cost of the hydrogen-electricity coupled multi-microgrid, and improve the operating efficiency of the hydrogen-electricity coupled multi-microgrid. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a flow chart of an energy management method for a hydrogen-electricity coupled multi-microgrid system based on improved DDPG according to an embodiment of the present invention; Figure 2 is a schematic diagram of an energy management model of a hydrogen-electricity coupled multi-microgrid system in an embodiment of the present invention; Figure 3 is the deep reinforcement learning process of the DDPG algorithm in the embodiment; Figure 4 Schematic diagrams of the improved Actor neural network and Critic neural network in the DDPG algorithm in the embodiment, wherein (a) is a schematic diagram of the policy network of the Actor neural network, and (b) is a schematic diagram of the Critic neural network. DETAILED DESCRIPTION
[0016] The preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0017] The embodiment provides an energy management method for a hydrogen-electricity coupled multi-microgrid system based on an improved DDPG, such as Figure 1 , including the following steps, S1. Obtain historical data of the hydrogen-electricity coupled multi-microgrid system including historical input states and historical actions.
[0018] In step S1, the schematic diagram of the hydrogen-electricity coupled multi-microgrid system is as follows: Figure 2 The historical input states include photovoltaic power generation, charging power, hydrogen charging power, hydrogen volume in the hydrogen storage tank, and the state of charge of the energy storage system in each period of each hydrogen-electricity coupled microgrid; the historical actions include electrolyzer hydrogen production power, photovoltaic power generation, energy storage charging and discharging power, and electricity purchase price in each period of each hydrogen-electricity coupled microgrid.
[0019] S2. Establish an energy management model for hydrogen-electricity coupled multi-microgrid system based on improved DDPG. The energy management model for hydrogen-electricity coupled multi-microgrid system based on improved DDPG includes Actor neural network and Critic neural network, such as Figure 3 The Actor neural network includes two policy networks with the same structure, namely the current policy network and the target policy network. The current policy network is used to input the state s t And output action a t , the target policy network is used to input the next state and output the next action; the Critic neural network includes two Q networks with the same structure, namely the current Q network and the target Q network. The current Q network is used to input the state s t and action a t And output about state a t With action a t The Q value of the target Q network is used to input the next state s t+1 and the next action a t+1And output about the next state s t+1 and the next action a t+1 Q value.
[0020] In step S2, the LSTM network is introduced into the Actor neural network and the Critic neural network, such as Figure 4 (a), each strategy network of the Actor neural network includes a first long short-term memory network, namely, a first LSTM network and two first fully connected layers. The first LSTM network processes the input state s of the hydrogen-electricity coupled microgrid, and then processes it through two fully connected layers to output the action a of the microgrid. Figure 4 (b), each Q network of the Critic neural network includes a second LSTM network, a second fully connected layer and a third fully connected layer. When the Critic neural network receives the input state s and action a of the hydrogen-electricity coupled multi-microgrid system, the input state s is processed by the second LSTM network, and the action a is processed by the second fully connected layer. The output results of the second LSTM network and the second fully connected layer are processed by the third fully connected layer and then the Q value of the state s and the action a is output.
[0021] Both the Actor neural network and the Critic neural network of DDPG adopt the structure of LSTM and fully connected layers. In the Actor neural network, the first layer is LSTM, and the first fully connected layer is replaced by the first LSTM network. The second layer is a fully connected layer with 400 nodes, and the third layer is a fully connected layer with 300 nodes. ReLU is used as the activation function of the fully connected layer, and a Batch Norm layer is added after each layer to ensure the stability of the algorithm. In the Critic neural network, the fully connected layer that processes the state is replaced by the second LSTM network. The state is input to the LSTM layer, and the action is input to the fully connected layer of 400 nodes, and then processed by the fully connected layer of 300 nodes. ReLU is also used as the activation function of the fully connected layer.
[0022] S3. Establish the objective function and constraints of the energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG.
[0023] The energy management of hydrogen-electricity coupled multi-microgrid is to coordinate the output of each unit in the system and minimize the energy cost of hydrogen-electricity coupled multi-microgrid under the premise of meeting technical constraints. The total energy cost of hydrogen-electricity coupled multi-microgrid is mainly composed of the operation and maintenance costs of distributed energy facilities such as the power purchase cost of the power grid (photovoltaic power generation, hydrogen fuel cells, hydrogen production equipment), as shown below: (1) In step S3, the objective function of the energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG is established. f : (1) Where: T is the total number of time periods corresponding to the time period; N is the number of microgrids in the hydrogen-electricity coupled multi-microgrid system; △t is the unit time; is the electricity purchase cost of the hydrogen-electricity coupled multi-microgrid system during period t; is the charging benefit of the hydrogen-electricity coupled multi-microgrid system during period t; is the hydrogen charging income of the hydrogen-electricity coupled multi-microgrid system during period t; is the power purchase power and power purchase price of the hydrogen-electricity coupled microgrid system during period t; is the charging power and charging price of the i-th hydrogen-electricity coupled microgrid in period t; is the hydrogen charging power and hydrogen charging price of the i-th hydrogen-electricity coupled microgrid during period t; (2) Power balance constraints: (2) Where: is the photovoltaic power generation power of the i-th hydrogen-electricity coupled microgrid in period t; is the hydrogen production power of the electrolyzer in the i-th hydrogen-electricity coupled microgrid during period t; is the photovoltaic power storage charging and discharging power of the i-th hydrogen-electricity coupled microgrid during period t (discharging is positive and charging is negative); is the station power load power of the i-th hydrogen-electricity coupled microgrid in period t.
[0024] (3) Operation constraints of photovoltaic power generation system: (3) Where: , are the minimum and maximum photovoltaic output powers of the i-th hydrogen-electricity coupled microgrid in period t, respectively.
[0025] (4) Operation constraints of hydrogen electrolysis system a. Operation constraints of electrolyzer: (4) Where: and are the lower and upper limits of the power consumed by the electrolyzer in the ith hydrogen-electricity coupled microgrid during period t during normal operation; b. Fuel cell operation constraints: (5) Where: is the operating power of the fuel cell in the i-th hydrogen-electric coupled microgrid during period t; and It is the lower and upper limits of the power consumed by the fuel cell during normal operation; c. Hydrogen storage tank operation constraints: (6) Where: represents the amount of hydrogen in the hydrogen storage tank of the i-th hydrogen-electricity coupled microgrid during period t; and Indicates the upper and lower limits of the storage capacity of the hydrogen storage tank; (5) Electrochemical energy storage operation constraints: (7) (8) Where: and The upper and lower limits of the charging and discharging power of the energy storage system; The state of charge of the energy storage system is the amount of hydrogen in the hydrogen storage tank of the i-th hydrogen-electric coupled microgrid during period t; and The upper and lower limits of the state of charge of the energy storage system; (6) Charging / hydrogen system operation constraints: a. Charging / Hydrogen Load Constraints: (9) (10) Where: is the initial charging load requirement; is the dispatchable charging load demand; It is the non-dispatchable charging load demand; is the initial hydrogen charging load requirement; It is the dispatchable hydrogen filling load demand; It is the non-dispatchable hydrogen filling load demand; b. Charging / hydrogen pile operation constraints: (11) (12) Where: is the rated power of the charging pile, that is, the charging power of the charging pile is within its rated power range; is the rated power of the hydrogen charging pile, that is, the hydrogen charging rate of the hydrogen charging pile is within its rated rate range.
[0026] S4. Initialize the operating environment of the energy management system intelligent body. Specifically, S41, input the energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG into the operating environment; S42, define the state signal space and action signal space, and set the penalty function and reward function. Specifically, The state signal space S of the intelligent agent of the hydrogen-electricity coupled multi-microgrid system is defined as: (13) Where: are the photovoltaic power generation power, charging power, hydrogen charging power, hydrogen volume in the hydrogen storage tank, and the state of charge of the hydrogen volume energy storage system in the i-th hydrogen-electricity coupled microgrid during period t; The action signal space A of the intelligent agent in the hydrogen-electricity coupled multi-microgrid system is defined as: (14) Where: are the hydrogen production power of the electrolyzer, the photovoltaic power generation power, the energy storage charging and discharging power of the i-th hydrogen-electricity coupled microgrid in period t; is the electricity purchase price of the hydrogen-electricity coupled multi-microgrid system during period t; Define the reward function R of deep reinforcement learning as (15) Where: C Rewards for the Hydrogen-Electricity Coupled Multi-Microgrid System: (16) Where: T is the total number of time periods corresponding to the time period; N is the number of microgrids in the hydrogen-electricity coupled multi-microgrid system; is the unit time; are the purchased power and purchased price of the hydrogen-electricity coupled microgrid system during period t, respectively; are the charging power, charging price, hydrogen charging power, and hydrogen charging price of the i-th hydrogen-electricity coupled microgrid during period t; D is the penalty function: (17) Where: Penalties for unbalanced electricity in the power system; is the penalty for over-discharge or over-charge of the energy storage system; λ is the penalty coefficient; is the unbalanced amount of power system at the i-th moment; is the over-discharge or over-charge amount of the energy storage system at the i-th moment.
[0027] S5. Use the historical data of step S1 to train the energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG algorithm to obtain the trained energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG algorithm.
[0028] S51, initialize the Actor neural network, Critic neural network and experience pool, set parameters, and initialize the current number of rounds.
[0029] In step S51, the setting parameters include the experience pool capacity D, the maximum number of training rounds , discount rate γ, learning rate α, current critic network weight parameter Q, target critic network weight 、Current Critic Network , Target Critic Network , target network parameter update interval C , greedy probability ε, training batch k, LSTM sequence length H .
[0030] S52, the state of coupling hydrogen electricity to multi-microgrid system s t Input the current policy network to get a t , perform the action a t , and calculate the reward r t and the next state s t+1 ;Will( s t , a t , r t , s t+1 ) are stored in the experience replay pool, and the experience replay pool is used to train the Critic neural network and the Actor neural network.
[0031] In step S52, the experience pool is used to train the Critic neural network and the Actor neural network. Specifically, in each round, the noise is initialized to obtain an initial state s t , the current policy network maps the current state to the action according to the policy a t ; Execute action a t , get rewarded r t and environmental status s t+1 , and the data ( s t , a t , r t , s t+1 ) is stored in the experience replay pool D; when the data in the experience replay pool reaches the training threshold, a set number of multi-bit arrays ( s i ,a i , r i , s i+1 ) is used to train the parameters of the Critic neural network and the Actor neural network.
[0032] S53, use the minimized loss function to update the Critic neural network, and the policy gradient to update the Actor neural network; specifically, Actor neural network updates network parameters through policy gradient :
[0033] Where: J is the expected return value; E is the expectation; β is the random strategy; ρ is the state transition probability distribution under the random strategy; Fitting function for Critic network evaluation; is the Critic network parameter; is the fitting function of the state-action mapping relationship.
[0034] The Critic neural network updates the network parameters by minimizing the loss function L :
[0035] Where: r t For reward; E is the expectation; β is the random strategy; ρ is the state transition probability distribution under the random strategy; y t is an estimate of the Q function value.
[0036] The target network will fix the parameters in the network for a certain period of time, thereby eliminating the model oscillation caused by the same parameters between the current network and the target network. The update mechanism of the target network usually adopts the soft update method. Soft update makes small adjustments to the target network parameters at each step, so that the target network parameters gradually approach the main network parameters. The formula for soft update is:
[0037] Where: is the Critic target network parameter; is the Actor target network parameter; τ is the soft update coefficient, which is usually small, such as 0.001.
[0038] S54, compare the current round number with the set maximum round number to see if they are consistent. If they are not consistent, increase the current round number by one and go to step S52; otherwise, save the trained neural network parameters and end the training.
[0039] S6. Based on the current input state of the hydrogen-electricity coupled multi-microgrid system, an energy management strategy is obtained through the trained energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG algorithm.
[0040] This energy management method of the hydrogen-electricity coupled multi-microgrid system based on improved DDPG adopts the energy management model of the hydrogen-electricity coupled multi-microgrid system based on improved DDPG. The action of the hydrogen-electricity coupled microgrid is not only controlled by the current state of the microgrid, but also by the previous state of the microgrid. It can make the action of the microgrid have time correlation, effectively avoid unnecessary energy management actions, effectively reduce the operating cost of the hydrogen-electricity coupled multi-microgrid, and improve the operating efficiency of the hydrogen-electricity coupled multi-microgrid.
[0041] This energy management method for hydrogen-electricity coupled multi-microgrid system based on improved DDPG, in order to solve the shortcomings of the traditional DDPG algorithm in energy management, optimizes the DDPG network structure by introducing LSTM to accelerate network training, and establishes an energy management model for hydrogen-electricity coupled multi-microgrid system based on improved DDPG with the goal of minimizing the energy cost of hydrogen-electricity coupled multi-microgrid from the perspective of coordinating the output of each unit in the hydrogen-electricity coupled multi-microgrid system and the safe and economical operation of the system, which can efficiently realize the energy management of hydrogen-electricity coupled multi-microgrid.
[0042] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. An energy management method for a hydrogen-electricity coupled multi-microgrid system based on improved DDPG, characterized by: The following steps are included: S1. Obtain historical data of the hydrogen-electricity coupled multi-microgrid system including historical input states and historical actions; S2. Establish an energy management model for hydrogen-electricity coupled multi-microgrid system based on improved DDPG. The energy management model for hydrogen-electricity coupled multi-microgrid system based on improved DDPG includes Actor neural network and Critic neural network. The Actor neural network includes two strategy networks with the same structure, namely the current strategy network and the target strategy network. The current strategy network is used to input the state s t And output action a t , the target policy network is used to input the next state and output the next action; the Critic neural network includes two Q networks with the same structure, namely the current Q network and the target Q network. The current Q network is used to input the state s t and action a t And output about state a t With action a t The Q value of the target Q network is used to input the next state s t+1 and the next action a t+1 And output about the next state s t+1 and the next action a t+1 Q value; S3. Establish the objective function and constraints of the energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG; S4, initializing the operating environment of the energy management system intelligent agent; S5. Use the historical data of step S1 to train the energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG algorithm to obtain the trained energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG algorithm; S6. Based on the current input state of the hydrogen-electricity coupled multi-microgrid system, an energy management strategy is obtained through the trained energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG algorithm.
2. The energy management method of the hydrogen-electricity coupled multi-microgrid system based on improved DDPG as claimed in claim 1, characterized in that: In step S1, the historical input status includes the photovoltaic power generation power, charging power, hydrogen charging power, hydrogen amount in the hydrogen storage tank, and the charge state of the energy storage system in each hydrogen-electricity coupled microgrid in each time period; the historical actions include the electrolyzer hydrogen production power, photovoltaic power generation power, energy storage charging and discharging power, and electricity purchase price in each hydrogen-electricity coupled microgrid in each time period.
3. The energy management method of hydrogen-electricity coupled multi-microgrid system based on improved DDPG as claimed in claim 1, characterized in that: In step S2, each strategy network includes a first long short-term memory network, i.e., a first LSTM network, and two first fully connected layers. The first LSTM network processes the received input state of the hydrogen-electricity coupled microgrid, and then the two fully connected layers process and output the action of the microgrid.
4. The energy management method of the hydrogen-electricity coupled multi-microgrid system based on improved DDPG as claimed in claim 1, characterized in that: In step S2, each Q network includes a second LSTM network, a second fully connected layer and a third fully connected layer. When the Critic neural network receives the input state and action of the hydrogen-electricity coupled multi-microgrid system, the input state is processed by the second LSTM network, the action is processed by the second fully connected layer, and the output results of the second LSTM network and the second fully connected layer are processed by the third fully connected layer to output the Q value of the state and action.
5. The energy management method of a hydrogen-electricity coupled multi-microgrid system based on improved DDPG according to any one of claims 1 to 4, characterized in that: In step S3, the objective function of the energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG is established. f : (1) Where: T is the total number of time periods corresponding to the time period; N is the number of microgrids in the hydrogen-electricity coupled multi-microgrid system; △t is the unit time; They are the electricity purchase cost, charging income, and hydrogen charging income of the hydrogen-electricity coupled multi-microgrid system in period t; are the purchased power and purchased price of the hydrogen-electricity coupled microgrid system during period t, respectively; are the charging power, charging price, hydrogen charging power, and hydrogen charging price of the i-th hydrogen-electricity coupled microgrid during period t; The constraints include: (1) Power balance constraints: (2) Where: is the photovoltaic power generation power of the i-th hydrogen-electricity coupled microgrid in period t; , , is the hydrogen production power of the electrolyzer, the photovoltaic power generation power, the energy storage charging and discharging power, and the power load power of the station in the i-th hydrogen-electricity coupled microgrid during period t; (2) Operation constraints of photovoltaic power generation system: (3) Where: , are the minimum and maximum photovoltaic output power of the i-th hydrogen-electricity coupled microgrid in period t, respectively; (3) Operation constraints of the electrolysis hydrogen production system: a. Operation constraints of electrolyzer: (4) Where: and are the lower and upper limits of the power consumed by the electrolyzer in the ith hydrogen-electricity coupled microgrid during period t during normal operation; b. Fuel cell operation constraints: (5) Where: is the operating power of the fuel cell in the i-th hydrogen-electric coupled microgrid during period t; and It is the lower and upper limits of the power consumed by the fuel cell during normal operation; c. Hydrogen storage tank operation constraints: (6) Where: represents the amount of hydrogen in the hydrogen storage tank of the i-th hydrogen-electricity coupled microgrid during period t; and Indicates the upper and lower limits of the storage capacity of the hydrogen storage tank; (4) Electrochemical energy storage operation constraints: (7) (8) Where: and The upper and lower limits of the charging and discharging power of the energy storage system; The state of charge of the energy storage system is the amount of hydrogen in the hydrogen storage tank of the i-th hydrogen-electric coupled microgrid during period t; and The upper and lower limits of the state of charge of the energy storage system; (5) Charging / hydrogen system operation constraints: a. Charging / Hydrogen Load Constraints: (9) (10) Where: is the initial charging load requirement; is the dispatchable charging load demand; It is the non-dispatchable charging load demand; is the initial hydrogen charging load requirement; It is the dispatchable hydrogen filling load demand; It is the non-dispatchable hydrogen filling load demand; b. Charging / hydrogen pile operation constraints: (11) (12) Where: is the rated power of the charging pile, is the rated power of the hydrogen charging pile.
6. The energy management method of a hydrogen-electricity coupled multi-microgrid system based on improved DDPG according to any one of claims 1 to 4, characterized in that: In step S4, the operating environment of the energy management system agent is initialized, specifically, S41, input the energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG into the operating environment; S42. Define the state signal space and the action signal space, and set the penalty function and the reward function.
7. The energy management method of the hydrogen-electricity coupled multi-microgrid system based on improved DDPG as claimed in claim 6, characterized in that: Step S42 is specifically, The state signal space S of the intelligent agent of the hydrogen-electricity coupled multi-microgrid system is defined as: (13) Where: are the photovoltaic power generation power, charging power, hydrogen charging power, hydrogen volume in the hydrogen storage tank, and the state of charge of the hydrogen volume energy storage system in the i-th hydrogen-electricity coupled microgrid during period t; The action signal space A of the intelligent agent in the hydrogen-electricity coupled multi-microgrid system is defined as: (14) Where: are the hydrogen production power of the electrolyzer, the photovoltaic power generation power, the energy storage charging and discharging power of the i-th hydrogen-electricity coupled microgrid in period t; is the electricity purchase price of the hydrogen-electricity coupled multi-microgrid system during period t; Define the reward function R of deep reinforcement learning as (15) Where: C Rewards for the Hydrogen-Electricity Coupled Multi-Microgrid System: (16) Where: T is the total number of time periods corresponding to the time period; N is the number of microgrids in the hydrogen-electricity coupled multi-microgrid system; is the unit time; are the purchased power and purchased price of the hydrogen-electricity coupled microgrid system during period t, respectively; are the charging power, charging price, hydrogen charging power, and hydrogen charging price of the i-th hydrogen-electricity coupled microgrid during period t; D is the penalty function: (17) Where: Penalties for unbalanced electricity in the power system; is the penalty for over-discharge or over-charge of the energy storage system; λ is the penalty coefficient; is the unbalanced amount of power system at the i-th moment; is the over-discharge or over-charge amount of the energy storage system at the i-th moment.
8. The energy management method of a hydrogen-electricity coupled multi-microgrid system based on improved DDPG according to any one of claims 1 to 4, characterized in that: In step S5, the energy management model of the hydrogen-electricity coupled multi-microgrid system based on the improved DDPG is trained, specifically, S51, initialize the Actor neural network, Critic neural network and experience pool, set parameters, and initialize the current round number; S52, the state of coupling hydrogen electricity to multi-microgrid system s t Input the current policy network to get a t , perform the action a t , and calculate the reward r t and the next state s t+1 ;Will( s t , a t , r t , s t+1 ) are stored in the experience pool, and the experience pool is used to train the Critic neural network and the Actor neural network; S53, use the minimized loss function to update the Critic neural network, and the policy gradient to update the Actor neural network; S54, compare the current round number with the set maximum round number to see if they are consistent. If they are not consistent, increase the current round number by one and go to step S52; otherwise, save the trained neural network parameters and end the training.
Citation Information
Patent Citations
Optimized dispatching method and system for electricity-hydrogen coupling system based on DDPG
CN117318031A
Wind, light, diesel, hydrogen and storage micro-grid multi-target double-layer optimization method and system
CN117650580A
Environment-friendly micro-grid optimization scheduling method and system based on deep reinforcement learning
CN117726143A
Cited By
Hydrogen-containing energy storage micro-grid dispatching optimization method combining ARIMA-LSTM and DDPG
CN119419815A
Real-time optimization operation method of electricity-hydrogen coupling island micro-grid
CN120710110A
A real-time optimization operation method of an electricity-hydrogen coupling island microgrid
CN120710110B
