A reinforcement learning optimization scheduling method and system considering scheduling experience
By using the reinforcement learning method and POMDP model in the power system, combined with the SAC algorithm and the GRU algorithm, the problems of low dispatch efficiency and energy waste in the power system are solved, and the intelligent and adaptive dispatch of the power system is realized to adapt to complex and high-voltage conditions. Deterministic operating environment.
Patent Information
- Application Number
- CN202410911380.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-07-09
AI Technical Summary
Existing power system dispatching methods have problems such as low dispatching efficiency, serious energy waste, and difficulty in coping with high uncertainty and complex operating environments. Especially with the rapid development of renewable energy, traditional optimal dispatching based on optimization methods is difficult to meet the needs of complex operating environments. Changing operating environment.
Using methods based on reinforcement learning, especially the reinforcement learning optimal dispatching method that considers dispatching experience, by building a partially observable Markov decision process (POMDP) model and combining the SAC algorithm and the GRU algorithm, a reinforcement learning optimal dispatch model is constructed to realize the power grid Optimize scheduling.
It realizes intelligent and adaptive dispatching of the power system, improves dispatching efficiency, reduces energy waste, and can effectively cope with complex and highly uncertain operating environments.
Smart Images

Figure CN118504417B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric power dispatching, and in particular to a reinforcement learning optimization dispatching method and system taking dispatching experience into consideration. Background Art
[0002] At present, the proportion of renewable energy such as wind energy and solar energy in the power system is gradually increasing. The intermittent and uncertain nature of these energy sources has brought greater challenges to the dispatch of the power system. Therefore, developing an intelligent method that can adaptively adjust and optimize dispatch is of great significance to improving the operating efficiency of the power system, reducing energy consumption, and promoting sustainable development.
[0003] As an intelligent decision-making technology, the existing reinforcement learning method has certain application potential in the optimal dispatching of power systems. Reinforcement learning methods do not need to establish an accurate power system model in advance, but perceive and adapt to various changes, including load fluctuations, uncertainty in energy supply, etc., through interaction with the environment. This enables reinforcement learning methods to quickly respond and optimize dispatching strategies in real-time dispatching, and improve the flexibility and robustness of the power system. At the same time, reinforcement learning methods have the ability of online learning, which can collect and process the operating data of the power system in real time and dynamically adjust the dispatching strategy according to real-time information. This enables it to respond to changes in the power system in real time and quickly adapt to new operating conditions. Summary of the invention
[0004] In view of the above problems, the present invention provides a reinforcement learning optimization scheduling method considering scheduling experience, the method comprising:
[0005] Step S1, determining the grid operation optimization dispatching target and setting the grid operation optimization constraint conditions based on the renewable energy curtailment, load shedding and power generation cost;
[0006] Step S2: building a reinforcement learning operation environment model for power grid operation optimization scheduling with uncertain source and load based on the power grid operation optimization scheduling target and the constraint conditions;
[0007] Step S3: constructing a reinforcement learning optimization scheduling model based on the SAC algorithm based on the reinforcement learning operating environment model;
[0008] Step S4: Use the reinforcement learning optimization scheduling model to achieve power grid optimization scheduling.
[0009] Optionally, in step S1, the power grid operation optimization scheduling target is:
[0010]
[0011] Where N is the total number of scheduling times, subscript t is the tth scheduling time, is the power generation cost of the thermal power unit at time t, is the energy storage depreciation cost at time t, is the penalty item for abandoning renewable energy electricity at time t, is the load shedding penalty term at time t.
[0012] Optionally, in step S1, the constraints for optimizing the operation of the power grid include power balance constraints, upper and lower limit constraints on unit output, and ramp constraints on thermal power units;
[0013] The power balance constraints include:
[0014]
[0015] in, is the total photovoltaic power generation in the region, is the total wind power generation in the region, is the power of the energy storage system in the region. When the power value of the energy storage system in the region is positive, it is the discharge power of the energy storage system. When the power value of the energy storage system in the region is negative, it is the charging power of the energy storage system. is the total power generated by thermal power units in the region, is the total power of the load in the area;
[0016] The unit processing upper and lower limit constraints include:
[0017]
[0018]
[0019]
[0020]
[0021]
[0022] in, , is the upper and lower limits of the output of the corresponding unit, is the discharge power of the energy storage system, is the charging power of the energy storage system;
[0023] The thermal power unit climbing constraints include:
[0024]
[0025] in, is the lower limit of the climbing rate of the thermal power unit, It is the upper limit of the ramp rate of thermal power units.
[0026] Optionally, in step S2, the reinforcement learning operating environment model includes: state space s, action space a, transition probability t, reward function r, observation space o, and observation probability z.
[0027] Optionally, in step S2, building a reinforcement learning operation environment model for optimal dispatching of power grid operation with uncertain source and load based on the power grid operation optimal dispatching target and the constraint condition includes:
[0028] Modeling the optimal scheduling environment based on POMDP includes:
[0029] S21. The optimization scheduling observation space model includes:
[0030]
[0031] in, is the observation space at the tth scheduling moment, represents the output of thermal power units 1, 2, ...n at the dispatching time t, is the charging and discharging power of the energy storage at the scheduling time t, is the output of the wind turbine at the dispatching time t, is the output of photovoltaic at the dispatching time t, is the load demand at dispatch time t;
[0032] S22, the optimization scheduling action space model includes:
[0033]
[0034] in, is a set of scheduling action vectors at the tth scheduling time, is the output power of thermal power units, energy storage systems, wind turbines, photovoltaics and loads at time t;
[0035] S23, the optimization scheduling reward function includes:
[0036]
[0037] in, Rewards for dispatching and operating thermal power units. Rewards for energy storage system dispatch and operation, Rewards for renewable energy power generation operations, Run rewards for load dispatch.
[0038] Optionally, in step S3, constructing a reinforcement learning optimization scheduling model based on the SAC algorithm based on the reinforcement learning operating environment model specifically includes:
[0039] S31. Construct a simulation environment module based on the reinforcement learning operating environment model;
[0040] S32. Based on the simulation environment module, a reinforcement learning optimization scheduling model is constructed using a SAC algorithm.
[0041] Optionally, in S31, the process of constructing the simulation environment module includes:
[0042] The GRU algorithm is used to extract hidden states in the historical data of optimized scheduling. The data fusion method is combined with the strategy of simulated environment training to approximate the strategy of actual environment training and build a simulated environment module.
[0043] The present invention also discloses a reinforcement learning optimization scheduling system considering scheduling experience, the system comprising:
[0044] Data preprocessing module, used to determine the optimization dispatching target of power grid operation and set the constraint conditions for power grid operation optimization based on the amount of renewable energy abandoned, load shedding and power generation cost;
[0045] An environment extraction module, used to build a reinforcement learning operation environment model for power grid operation optimization scheduling with uncertain source and load based on the power grid operation optimization scheduling target and the constraint conditions;
[0046] A scheduling model building module, used to build a reinforcement learning optimization scheduling model based on the SAC algorithm based on the reinforcement learning operating environment model;
[0047] A power grid optimization dispatching module is used to implement power grid optimization dispatching using the reinforcement learning optimization dispatching model.
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] The present invention solves the problems existing in the existing power system dispatching methods, such as low dispatching efficiency, serious energy waste, and difficulty in coping with complex operating environments with high uncertainty. Due to the rapid development of renewable energy, the operating environment of the power system is becoming more and more complex. The traditional optimization dispatching method based on the optimization method requires accurate modeling of the power system equipment. However, with the large-scale access of virtual power plants, electric vehicles and demand-side response, the traditional model-based optimization dispatching method is difficult to meet the complex and changeable operating environment.
[0050] In order to solve the problem of modeling difficulties in traditional methods, reinforcement learning methods provide new ideas for power system optimization and dispatching. Reinforcement learning methods do not need to model complex power system equipment. They interact with the power system dispatching environment through trial and error, gradually improve the dispatching strategy, and finally achieve economic optimality, and realize the intelligent and adaptive optimization and dispatching of power systems. The existing power system dispatching method based on reinforcement learning uses Markov decision process (Markov Decision Process, MDP) to model the environment, and the state space mainly includes unit output, energy storage charging and discharging, new energy output and load. However, in actual power dispatching, dispatchers need to comprehensively consider the production conditions of each task and judge the safe and stable operation of the power system. At the same time, the access of a high proportion of new energy leads to a complex operating environment of the power system and increased uncertainty, which makes the existing modeling method of the environment only contain part of the state information of the power system, and the MDP assumption requires that the current state contains all relevant historical information. It is difficult to establish. Therefore, the present invention uses a partially observable Markov decision process (Partially Observable Markov Decision Process, POMDP) to model the power system operating environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0052] Figure 1 This is a diagram of the steps of the method according to the embodiment of the present invention;
[0053] Figure 2 This is a structural diagram of a real environment simulation module according to an embodiment of the present invention;
[0054] Figure 3 This is an operation flow chart of the real environment simulation module according to an embodiment of the present invention;
[0055] Figure 4 Actor network structure diagram considering scheduling experience in an embodiment of the present invention;
[0056] Figure 5 4 is a structural diagram of a Q-Critic network according to an embodiment of the present invention. DETAILED DESCRIPTION
[0057] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0058] Embodiment 1
[0059] The present invention provides a reinforcement learning optimization scheduling method taking scheduling experience into consideration, such as Figure 1 As shown, the method includes:
[0060] Step S1, based on the amount of new energy abandoned, load shedding and power generation cost, determine the grid operation optimization scheduling target and set the grid operation optimization constraint conditions. In this embodiment, the grid operation optimization scheduling target is determined based on minimizing the amount of new energy abandoned, minimizing the load shedding and optimizing the power generation cost, and the grid operation optimization constraint conditions are set.
[0061] In step S1, the grid operation optimization scheduling target is:
[0062]
[0063] Where N is the total number of scheduling times, subscript t is the tth scheduling time, is the power generation cost of the thermal power unit at time t, is the energy storage depreciation cost at time t, is the penalty item for abandoning renewable energy electricity at time t, is the load shedding cost at time t.
[0064] In step S1, the constraints for optimizing the operation of the power grid include power balance constraints, upper and lower limit constraints of unit output, and thermal power unit ramp constraints;
[0065] The power balance constraints include:
[0066]
[0067] in, is the total photovoltaic power generation in the region, is the total wind power generation in the region, is the power of the energy storage system in the region. When the power value of the energy storage system in the region is positive, it is the discharge power of the energy storage system. When the power value of the energy storage system in the region is negative, it is the charging power of the energy storage system. is the total power generated by thermal power units in the region, is the total power of the load in the area;
[0068] The upper and lower limits of the unit output constraints include:
[0069]
[0070]
[0071]
[0072]
[0073]
[0074] in, , is the upper and lower limits of the output of the corresponding unit, is the discharge power of the energy storage system, is the charging power of the energy storage system;
[0075] The thermal power unit climbing constraints include:
[0076]
[0077] in, is the lower limit of the climbing rate of the thermal power unit, It is the upper limit of the ramp rate of thermal power units.
[0078] Step S2: building a reinforcement learning operation environment model for optimal dispatching of power grid operation with uncertain source and load based on the power grid operation optimal dispatching target and the constraint conditions.
[0079] Due to the rapid development of new energy, the power system has high uncertainty and high volatility, making it difficult to obtain all the information about the power system operating environment. POMDP can model the optimization scheduling environment where only part of the state can be observed. The POMDP-based reinforcement learning operating environment mainly includes state space s, action space a, transition probability t, reward function r, observation space o, and observation probability z. Among them, s, t, and z are hidden in the environment and need to be learned through trial and error. The agent interacts with the environment continuously to obtain observations and rewards, and at the same time infers the unknown state information of the optimized scheduling based on the existing observation information.
[0080] The present invention models the optimization scheduling environment based on POMDP, and the specific modeling is as follows:
[0081] (1) The optimized scheduling observation space is:
[0082]
[0083] in, is the observation space at the tth scheduling moment, represents the output of thermal power units 1, 2, ...n at the dispatching time t, is the discharge (charge) power of the energy storage at the dispatching time t, is the output of the wind turbine at the dispatching time t, is the output of photovoltaic at the dispatching time t, is the load demand at dispatch time t.
[0084] (2) The optimization scheduling action space is:
[0085]
[0086] in, is a set of scheduling action vectors at the tth scheduling time, is the output power of thermal power unit, energy storage system, wind turbine, photovoltaic and load at time t.
[0087] (3) The optimal scheduling reward function is:
[0088]
[0089] in, Rewards for dispatching and operating thermal power units. Rewards for energy storage system dispatch and operation, Rewards for renewable energy power generation operations, It is the load dispatching operation reward. The specific calculation method is as follows:
[0090]
[0091]
[0092]
[0093]
[0094] in, , , is the power generation cost coefficient of thermal power units, is the energy storage system loss cost coefficient, , is the penalty coefficient for machine and load shedding.
[0095] Step S3: construct a reinforcement learning optimization scheduling model based on the SAC algorithm based on the reinforcement learning operating environment model.
[0096] In step S3, constructing a reinforcement learning optimization scheduling model based on the SAC algorithm based on the reinforcement learning operating environment model specifically includes:
[0097] S31, build real environment simulation module, Actor network considering scheduling experience, and Q-Critic network;
[0098] The observed state in POMDP only involves part of the state of the environment. If we only use the strategy trained based on the observed state, The selection of scheduling actions will be consistent with the strategy trained in the actual environment To reduce and In order to reduce the impact of the deviation, the present invention introduces a real environment simulation module, uses the GRU (Gated Recurrent Unit) algorithm to extract the hidden state h in the optimization scheduling history data, adopts data fusion, and combines the hidden state h and the observed state o features to train the simulated state z strategy. To approximate , reducing the error of the training strategy. This module will store the historical observation state in a buffer with a length of 80. In extreme cases, when the observation state data is missing, the historical observation state in the buffer is called to predict the missing data, effectively avoiding the problem that the optimization scheduling algorithm cannot run due to the lack of state information in reinforcement learning. The structure of this module is as follows Figure 2 As shown in the figure, the operation process of the module is as follows Figure 3 shown.
[0099] The reinforcement learning agent gradually improves and optimizes the dispatching strategy by continuously interacting with the environment. However, in the early stages of training, the reinforcement learning algorithm will take a large number of random actions to explore the environment, making it increasingly difficult for the power system to operate stably. The present invention proposes an Actor network that takes dispatching experience into account. Unlike reinforcement learning agents that only rely on the current operating state of the power grid to take dispatching actions, this network combines the LSTM neural network, inputs historical decision information and the current observation state, and makes decisions with reference to dispatching experience information. In the early stages of reinforcement learning training, dispatching decisions are guided by dispatching experience to enable the dispatching strategy to converge quickly. The network structure is as follows: Figure 4 shown.
[0100] Actor network uses Gaussian distribution to fit action probability :
[0101]
[0102] Among them, a t is the scheduling action at time t, z t is the simulation state at time t, To consider the parameters of the Actor network for scheduling experience, is the mean value of the Gaussian distribution, is the standard deviation of the Gaussian distribution.
[0103] Construct a Q-Critic network, the network structure is as follows Figure 5 The network takes as input state-action values and estimates the value of a given state-action pair.
[0104] S32. Based on the simulation environment module, a reinforcement learning optimization scheduling model is constructed using a SAC algorithm.
[0105] Use the SAC algorithm to update parameters. The specific steps are as follows:
[0106] The SAC (Soft Actor-Critic) algorithm is an off-policy algorithm in the Actor-Critic architecture. The concept of entropy is added to the reward of the SAC algorithm. The purpose of introducing entropy is to increase exploration and achieve a balance between utilization and exploration. In the SAC algorithm, the optimal strategy is defined as:
[0107] π * = * a r g m a x π ∑ t E ( z t , a t ) ~ ρ π [ r ( z t , a t ) + α H ( π ( ⋅ | z t ) ) ]
[0108] The SAC algorithm has two main parameters: soft Q function Parameters in and strategies Parameters in After the introduction of entropy, the soft state value function is:
[0109] V ( s t ) = E a t ~ π [ Q ( z t , a t ) − α l o g π ( a t | z t ) ]
[0110] According to the Bellman equation, the value function of the current state can be combined with the value function of the next state to update the value function of the current state. Define soft Q value:
[0111] Q k+ 1 ( z t , a t ) = r ( z t , a t ) + γ E z t + 1 ~ p [ V ( z t + 1 )]
[0112] In the policy improvement step, we update the policy to the exponential of the new soft Q function. The policy parameters can be learned by minimizing the expected KL divergence. :
[0113]
[0114] in, For the optimized strategy, is the current strategy. is the KL divergence of the distribution, is the Q value of the current strategy, is the partition function, which normalizes the distribution.
[0115] In the value function estimation, the convergence of the function can be determined by minimizing the residual of the Bellman equation. The optimization function is as follows:
[0116] J Q ( θ ) = E ( z t , a t ) ~ D [ 1 2 ( Q θ ( z t , a t ) − ( r ( z t , a t ) + γ E z t + 1 ~ p [ V θ ¯ ( z t + 1 ) ] ) ) 2 ]
[0117] After finding the gradient formula, the parameters of the Q function are updated using the gradient descent algorithm. :
[0118]
[0119] Among them, the parameters Obtained using exponential moving average.
[0120] The strategy is to minimize the function To optimize the strategy:
[0121] J π ( ϕ ) = E z t ∼ D [ E a t ∼ π ϕ [ α l o g π ϕ ( a t | z t ) − Q θ ( z t , a t ) ] ]
[0122] Initialize the SAC algorithm parameters, use the real environment simulation module to process the information hidden in the historical optimization scheduling data, and fuse the features of the hidden information h with the features of the partially observable environment o into the simulated environment z. The Actor uses the current strategy to interact with the simulated environment, generates a certain number of (z, a, r, z') quadruplets and stores them in the experience replay pool. After a certain number of quadruplets are stored in the experience replay pool, during model training, a small batch of quadruplets is sampled from the experience replay pool to update the parameters of the Actor network and the Q-Critic network. Use soft updates to regularly update the parameters of the target value network, and ensure stability during training by slowly updating the parameters of the target value network to the parameters of the current value network.
[0123] S33. Repeat step S32 until the convergence criterion is met.
[0124] Step S4: Use the reinforcement learning optimization scheduling model to achieve power grid optimization scheduling.
[0125] The reinforcement learning optimization scheduling model based on the SAC algorithm is used for optimization scheduling:
[0126] The reinforcement learning optimization scheduling model based on the SAC algorithm adopts an offline training mode, obtains data from the running environment, and uses the real environment simulation module to generate a simulated environment. The information of the simulated environment and the historical scheduling experience are input into the intelligent agent. The intelligent agent interacts with the environment based on the information of the simulated environment and the historical scheduling experience, obtains the scheduling strategy, and updates the intelligent agent scheduling experience module according to the scheduling strategy. The (z, a, r, z') quadruple generated by the scheduling strategy is stored in the experience replay pool. When the number of quadruple in the experience replay pool reaches a certain number, the intelligent agent can learn through the quadruple in the experience replay pool.
[0127] The agent updates its strategy by interacting with the environment and replaying experience until the convergence requirement is met. At this point, the reinforcement learning optimization scheduling model based on the SAC algorithm is used to optimize the scheduling and obtain a feasible scheduling strategy.
[0128] Embodiment 2
[0129] A reinforcement learning optimization scheduling system considering scheduling experience, the system comprising:
[0130] The data preprocessing module is used to determine the grid operation optimization scheduling target and set the grid operation optimization constraint conditions based on the renewable energy power abandonment, load shedding and power generation cost. In this embodiment, the grid operation optimization scheduling target is determined and the grid operation optimization constraint conditions are set based on minimizing renewable energy power abandonment, minimizing load shedding and optimizing power generation cost.
[0131] The optimization scheduling objectives are:
[0132]
[0133] Where N is the total number of scheduling times, subscript t is the tth scheduling time, is the power generation cost of the thermal power unit at time t, is the energy storage depreciation cost at time t, is the penalty item for abandoning renewable energy electricity at time t, is the load shedding cost at time t.
[0134] The constraints include:
[0135] Power balance constraints:
[0136]
[0137] in, is the total photovoltaic power generation in the region, is the total wind power generation in the region, is the power of the energy storage system in the area. When the value is positive (negative), it is the discharge (charge) power of the energy storage system. is the total power generated by thermal power units in the region, is the total power of the load in the area.
[0138] Unit output upper and lower limit constraints:
[0139]
[0140]
[0141]
[0142]
[0143]
[0144] in, , is the upper and lower limits of the output of the corresponding unit, is the discharge power of the energy storage system, is the charging power of the energy storage system.
[0145] Thermal power unit climbing constraints
[0146]
[0147] in, Set the lower limit of the unit ramp rate for thermal power. Set an upper limit on the ramp rate of thermal power units.
[0148] An environment extraction module is used to build a reinforcement learning operation environment model for optimal dispatching of power grid operation with uncertain source and load based on the power grid operation optimal dispatching target and the constraint conditions.
[0149] Due to the rapid development of new energy, the power system has high uncertainty and high volatility, making it difficult to obtain all the information about the power system operating environment. POMDP can model the optimization scheduling environment where only part of the state can be observed. The POMDP-based reinforcement learning operating environment mainly includes state space s, action space a, transition probability t, reward function r, observation space o, and observation probability z. Among them, s, t, and z are hidden in the environment and need to be learned through trial and error. The agent interacts with the environment continuously to obtain observations and rewards, and at the same time infers the state information of unknown optimization scheduling based on the existing observation information.
[0150] The present invention models the optimization scheduling environment based on POMDP, and the specific modeling is as follows:
[0151] (1) The optimized scheduling observation space is:
[0152]
[0153] in, is the observation space at the tth scheduling moment, represents the output of thermal power units 1, 2, ...n at the dispatching time t, is the discharge (charge) power of the energy storage at the dispatching time t, is the output of the wind turbine at the dispatching time t, is the output of photovoltaic at the dispatching time t, is the load demand at dispatch time t.
[0154] (2) The optimization scheduling action space is:
[0155]
[0156] in, is a set of scheduling action vectors at the tth scheduling time, is the output power of thermal power unit, energy storage system, wind turbine, photovoltaic and load at time t.
[0157] (3) The optimal scheduling reward function is:
[0158]
[0159] in, Rewards for dispatching and operating thermal power units. Rewards for energy storage system dispatch and operation, Rewards for renewable energy power generation operations, It is the load dispatching operation reward. The specific calculation method is as follows:
[0160]
[0161]
[0162]
[0163]
[0164] in, , , is the power generation cost coefficient of thermal power units, is the energy storage system loss cost coefficient, , is the penalty coefficient for machine and load shedding.
[0165] The scheduling model construction module is used to construct a reinforcement learning optimization scheduling model based on the SAC algorithm based on the reinforcement learning operating environment model.
[0166] Step A: Build a real environment simulation module, an Actor network that considers scheduling experience, and a Q-Critic network. The SAC algorithm mainly includes the following network structures:
[0167] The observed state in POMDP only involves part of the state of the environment. If we only use the strategy trained based on the observed state, The selection of scheduling actions will be consistent with the strategy trained in the actual environment To reduce and In order to reduce the impact of the deviation, the present invention introduces a real environment simulation module, uses the GRU (Gated Recurrent Unit) algorithm to extract the hidden state h in the optimization scheduling history data, adopts data fusion, and combines the hidden state h and the observed state o features to train the simulated state z strategy. To approximate , reducing the error of the training strategy. This module will store the historical observation state in a buffer with a length of 80. In extreme cases, when the observation state data is missing, the historical observation state in the buffer is called to predict the missing data, effectively avoiding the problem that the optimization scheduling algorithm cannot run due to the lack of state information in reinforcement learning. The structure of this module is as follows Figure 2 As shown in the figure, the operation process of the module is as follows Figure 3 shown.
[0168] The reinforcement learning agent gradually improves and optimizes the dispatching strategy by continuously interacting with the environment. However, in the early stages of training, the reinforcement learning algorithm will take a large number of random actions to explore the environment, making it increasingly difficult for the power system to operate stably. The present invention proposes an Actor network that takes dispatching experience into account. Unlike reinforcement learning agents that only rely on the current operating state of the power grid to take dispatching actions, this network combines the LSTM neural network, inputs historical decision information and the current observation state, and makes decisions with reference to dispatching experience information. In the early stages of reinforcement learning training, dispatching decisions are guided by dispatching experience to enable the dispatching strategy to converge quickly. The network structure is as follows: Figure 4 shown.
[0169] Actor network uses Gaussian distribution to fit action probability :
[0170]
[0171] Among them, a t is the scheduling action at time t, z t is the simulation state at time t, To consider the parameters of the Actor network for scheduling experience, is the mean value of the Gaussian distribution, is the standard deviation of the Gaussian distribution.
[0172] Construct a Q-Critic network, the network structure is as follows Figure 5 The network takes as input state-action values and estimates the value of a given state-action pair.
[0173] Step B: Update parameters using the SAC algorithm. The specific steps are as follows:
[0174] The SAC algorithm is an off-policy algorithm in the Actor-Critic architecture. The concept of entropy is added to the reward of the SAC algorithm. The purpose of introducing entropy is to increase exploration and achieve a balance between utilization and exploration. In the SAC algorithm, the optimal strategy is defined as:
[0175] π * = * a r g m a x π ∑ t E ( z t , a t ) ~ ρ π [ r ( z t , a t ) + α H ( π ( ⋅ | z t ) ) ]
[0176] The SAC algorithm has two main parameters: soft Q function Parameters in and strategies Parameters in After the introduction of entropy, the soft state value function is:
[0177] V ( s t ) = E a t ~ π [ Q ( z t , a t ) − α l o g π ( a t | z t ) ]
[0178] According to the Bellman equation, the value function of the current state can be combined with the value function of the next state to update the value function of the current state. Define soft Q value:
[0179] Q k+ 1 ( z t , a t ) = r ( z t , a t ) + γ E z t + 1 ~ p [ V ( z t + 1 )]
[0180] In the policy improvement step, we update the policy to the exponential of the new soft Q function. The policy parameters can be learned by minimizing the expected KL divergence. :
[0181]
[0182] in, For the optimized strategy, is the current strategy. is the KL divergence of the distribution, is the Q value of the current strategy, is the partition function, which normalizes the distribution.
[0183] In the value function estimation, the convergence of the function can be determined by minimizing the residual of the Bellman equation. The optimization function is as follows:
[0184] J Q ( θ ) = E ( z t , a t ) ~ D [ 1 2 ( Q θ ( z t , a t ) − ( r ( z t , a t ) + γ E z t + 1 ~ p [ V θ ¯ ( z t + 1 ) ] ) ) 2 ]
[0185] After finding the gradient formula, the parameters of the Q function are updated using the gradient descent algorithm. :
[0186]
[0187] Among them, the parameters Obtained using exponential moving average.
[0188] The strategy is to minimize the function To optimize the strategy:
[0189] J π ( ϕ ) = E z t ∼ D [ E a t ∼ π ϕ [ α l o g π ϕ ( a t | z t ) − Q θ ( z t , a t ) ] ]
[0190] Initialize the SAC algorithm parameters, use the real environment simulation module to process the information hidden in the historical optimization scheduling data, and fuse the features of the hidden information h with the features of the partially observable environment o into the simulated environment z. The Actor uses the current strategy to interact with the simulated environment, generates a certain number of (z, a, r, z') quadruplets and stores them in the experience replay pool. After a certain number of quadruplets are stored in the experience replay pool, during model training, a small batch of quadruplets is sampled from the experience replay pool to update the parameters of the Actor network and the Q-Critic network. Use soft updates to regularly update the parameters of the target value network, and ensure stability during training by slowly updating the parameters of the target value network to the parameters of the current value network.
[0191] Step C: Repeat step B until the convergence criterion is met.
[0192] The power grid optimization dispatching module is used to implement power grid optimization dispatching using the reinforcement learning optimization dispatching model. The optimization dispatching is performed using the reinforcement learning optimization dispatching model based on the SAC algorithm:
[0193] The reinforcement learning optimization scheduling model based on the SAC algorithm adopts an offline training mode, obtains data from the running environment, and uses the real environment simulation module to generate a simulated environment. The information of the simulated environment and the historical scheduling experience are input into the intelligent agent. The intelligent agent interacts with the environment based on the information of the simulated environment and the historical scheduling experience, obtains the scheduling strategy, and updates the intelligent agent scheduling experience module according to the scheduling strategy. The (z, a, r, z') quadruple generated by the scheduling strategy is stored in the experience replay pool. When the number of quadruple in the experience replay pool reaches a certain number, the intelligent agent can learn through the quadruple in the experience replay pool.
[0194] The agent updates its strategy by interacting with the environment and replaying experience until the convergence requirement is met. At this point, the reinforcement learning optimization scheduling model based on the SAC algorithm is used to optimize the scheduling and obtain a feasible scheduling strategy.
[0195] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A reinforcement learning optimization scheduling method considering scheduling experience, It is characterized in that The method comprises: Step S1, determining the grid operation optimization dispatching target and setting the grid operation optimization constraint conditions based on the renewable energy curtailment, load shedding and power generation cost; Step S2: building a reinforcement learning operation environment model for power grid operation optimization scheduling with uncertain source and load based on the power grid operation optimization scheduling target and the constraint conditions; Modeling the optimal scheduling environment based on POMDP includes: S21. The optimization scheduling observation space model includes: in, is the observation space at the tth scheduling moment, represents the output of thermal power units 1, 2, ...n at the dispatching time t, is the charging and discharging power of the energy storage at the scheduling time t, is the output of the wind turbine at the dispatching time t, is the output of photovoltaic at the dispatching time t, is the load demand at dispatch time t; S22, the optimization scheduling action space model includes: in, is a set of scheduling action vectors at the tth scheduling time, is the output power of thermal power units, energy storage systems, wind turbines, photovoltaics and loads at time t; S23, the optimization scheduling reward function includes: in, Rewards for dispatching and operating thermal power units. Rewards for energy storage system dispatch and operation, Rewards for renewable energy power generation operations, Provide incentives for load dispatch operations; In step S2, the reinforcement learning operating environment model includes: state space s, action space a, transition probability t, reward function r, observation space o, and observation probability z; Step S3: constructing a reinforcement learning optimization scheduling model based on the SAC algorithm based on the reinforcement learning operating environment model, specifically including: S31. Construct a simulation environment module based on the reinforcement learning operation environment model; In S31, the process of constructing the simulation environment module includes: The GRU algorithm is used to extract the hidden state in the historical data of the optimized scheduling. The data fusion method is used to combine the strategy of simulated environment training to approximate the strategy of actual environment training and build a simulated environment module. S32. Based on the simulation environment module, a reinforcement learning optimization scheduling model is constructed using the SAC algorithm; Step S4: Use the reinforcement learning optimization scheduling model to achieve power grid optimization scheduling.
2. According to the reinforcement learning optimization scheduling method considering scheduling experience according to claim 1, It is characterized in that In step S1, the grid operation optimization scheduling target is: Where N is the total number of scheduling times, subscript t is the tth scheduling time, is the power generation cost of the thermal power unit at time t, is the energy storage depreciation cost at time t, is the penalty item for abandoning renewable energy electricity at time t, is the load shedding penalty term at time t.
3. The reinforcement learning optimization scheduling method considering scheduling experience according to claim 1, It is characterized in that In step S1, the constraints for optimizing the operation of the power grid include power balance constraints, upper and lower limit constraints of unit output, and thermal power unit ramp constraints; The power balance constraints include: in, is the total photovoltaic power generation in the region, is the total wind power generation in the region, is the power of the energy storage system in the region. When the power value of the energy storage system in the region is positive, it is the discharge power of the energy storage system. When the power value of the energy storage system in the region is negative, it is the charging power of the energy storage system. is the total power generated by thermal power units in the region, is the total power of the load in the area; The unit processing upper and lower limit constraints include: in, , is the upper and lower limits of the output of the corresponding unit, is the discharge power of the energy storage system, is the charging power of the energy storage system; The thermal power unit climbing constraints include: in, is the lower limit of the climbing rate of the thermal power unit, It is the upper limit of the ramp rate of thermal power units.
4. A reinforcement learning optimization scheduling system considering scheduling experience, the system is used to implement the reinforcement learning optimization scheduling method according to any one of claims 1 to 3, It is characterized in that The system comprises: Data preprocessing module, used to determine the optimization dispatching target of power grid operation and set the constraint conditions for power grid operation optimization based on the amount of renewable energy abandoned, load shedding and power generation cost; An environment extraction module, used to build a reinforcement learning operation environment model for power grid operation optimization scheduling with uncertain source and load based on the power grid operation optimization scheduling target and the constraint conditions; A scheduling model building module, used to build a reinforcement learning optimization scheduling model based on the SAC algorithm based on the reinforcement learning operating environment model; A power grid optimization dispatching module is used to implement power grid optimization dispatching using the reinforcement learning optimization dispatching model.
