Unit combination deep reinforcement learning solving method
By adaptively handling wind power uncertainties through deep reinforcement learning, optimizing unit combination decisions, and solving the impact of wind power prediction errors in unit combination problems, an economical and efficient dispatch scheme is achieved.
Patent Information
- Application Number
- CN202311096902.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-29
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-08-29
AI Technical Summary
Existing technologies fail to effectively consider the uncertainties of renewable energy, especially wind power output prediction errors, when dealing with unit combination problems, resulting in uneconomical unit combination schemes and difficulty in coping with system uncertainties.
A deep reinforcement learning approach is adopted to establish a Markov decision process model by receiving unit parameters and network topology. The model is trained using real historical wind power data to adaptively learn the impact of wind power uncertainties and optimize the unit combination decision scheme.
It effectively reduces computation time, improves the economy and adaptability of unit combination schemes, and can provide optimized scheduling schemes under wind power prediction errors, avoiding the precise description of the distribution of random variables and the influence of subjective factors in traditional methods.
Smart Images

Figure CN117117989B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power grid unit combination technology, and specifically to a deep reinforcement learning solution method for unit combination. Background Technology
[0002] Generator unit allocation is a classic problem in power system operation. It requires determining generator start-up and shutdown schemes to meet power demand and minimize costs. Since thermal power units can start up or shut down in several hours, these schemes typically need to be determined several hours or even a day in advance to maintain stable system operation. In recent years, with the increasing penetration of renewable energy into traditional power grids, the high utilization rate of renewable energy needs to be considered when formulating generator unit allocation schemes. Furthermore, the uncertainty caused by renewable energy power forecasting errors presents new challenges to system operators, necessitating the development of reliable and economical generator dispatching schemes to address system uncertainties.
[0003] Traditional deterministic unit commissioning problems are typically formulated as convex optimization problems, solvable by numerical methods, but computation time increases exponentially. As a branch of machine learning, reinforcement learning aims to derive approximations of optimal decision strategies to maximize system performance. Reinforcement learning algorithms are powerful tools for finding optimal solutions to complex problems and have shown impressive results in the gaming field in recent years, where agents can outperform human experts without prior knowledge. Current literature utilizes reinforcement learning to solve unit commissioning problems, significantly reducing solution time. The conventional approach first constructs a mathematical model of unit commissioning with the objective function of minimizing generation costs, constrained by power balance, unit output limits, and minimum start-up / shutdown times. Then, the unit commissioning problem is described within the reinforcement learning framework, defining the state space, action space, and reward function. Finally, a deep Q-network algorithm is used to train the model to solve the unit commissioning problem.
[0004] The above work is limited to solving deterministic unit combination problems and does not take into account the uncertainties of the power system, such as wind power output prediction errors. Summary of the Invention
[0005] To address the problems existing in the prior art, this invention provides a deep reinforcement learning solution method for unit combination. This method uses historical wind power data to train the parameters of the deep reinforcement learning model, adaptively learning the impact of wind power uncertainty on the scheduling scheme, thereby making the optimal unit combination decision scheme.
[0006] To achieve the above objectives, the present invention adopts the following solution:
[0007] This invention provides a deep reinforcement learning solution method for unit combination, comprising the following steps:
[0008] S1: Receive unit parameters and network topology, and establish a unit combination model based on traditional optimization;
[0009] S2: Modeling Markov decision process based on traditional optimized unit combination model;
[0010] S3: Improve the unit combination Markov decision process to take into account wind power uncertainties;
[0011] S4: Build a deep reinforcement learning model for solving Markov decision processes;
[0012] S5: Receive historical wind power and load data to train the parameters of the deep reinforcement learning model;
[0013] S6: The trained deep reinforcement learning model is used to solve the unit combination problem considering wind power uncertainty, and then the unit combination scheduling scheme is obtained.
[0014] In some embodiments, the present invention further includes the following technical features:
[0015] In step S1, the unit combination model based on traditional optimization includes an objective function, unit operation constraints, and power system constraints;
[0016] The objective function expression is:
[0017] In the formula, T is the scheduling period, N is the number of generating units, and u i,t P represents the start / stop status of the i-th unit during time period t. i,t It represents the output of the i-th unit during time period t. It is the unit's fuel cost function. It is the unit start-up and shutdown cost function.
[0018] The fuel cost function expression for the unit is:
[0019]
[0020] In the formula, α i ,β i ,γ i It is a parameter of the quadratic function curve of unit cost; P i,t It refers to the output power of the generator unit;
[0021] The power system constraints include unit capacity constraints, unit minimum start-up and shutdown time constraints, and ramp rate constraints.
[0022] The unit operation constraints include system power balance constraints and spinning reserve constraints.
[0023] The unit capacity constraint represents the upper and lower limits of the unit's output in each time period. The expression for the unit capacity constraint is:
[0024]
[0025] In the formula, P i It is the lower limit of the unit's output. It is the upper limit of the unit's output, u i,t It indicates the unit's start-up and shutdown status;
[0026] The minimum start-up and shutdown time constraint represents the minimum duration required for the unit to remain in a start-up or shutdown state. Generally, the larger the unit capacity, the longer the required time. The expression for the minimum start-up and shutdown time constraint is:
[0027]
[0028]
[0029] In the formula, TS i It is the minimum continuous shutdown time of the unit, TO i Minimum continuous start-up time of the unit;
[0030] The ramp rate constraint represents the limitation on the amount of power output that a generator can increase or decrease over a certain period of time; the expression for the ramp rate constraint is:
[0031]
[0032]
[0033] In the formula, P up,i It is the unit's ramp rate, P down,i It is the unit's downhill ramp rate, P shut,i This is the maximum permissible power output of the unit;
[0034] The power balance constraint expression is:
[0035]
[0036] In the formula, P D,t It is the aggregate load of the system in time period t;
[0037] To ensure stable system operation, spinning reserve is typically set at 10% of the system load. The spinning reserve constraint expression is as follows:
[0038]
[0039] In the formula, R t It is the system's spinning reserve capacity during time period t.
[0040] In step S2, the Markov decision process includes a state space, action space, reward function, environment transition probability, and a discount factor quintuple. Constructing the quintuple and converting the unit combination model into a Markov decision process specifically includes the following steps:
[0041] S201: Constructing the Action Space: A t =[a 1,t ,…,a N,t ],a n,t ∈{0,1}
[0042] In the formula, a n,t It is a binary vector whose length is the number of units N, and its value is 0 or 1. n,t =1 means that the nth unit will be turned on at time t+1 and will remain on during that time period, a n,t =0 The nth unit will be shut down at time t+1 and remain shut down during that period. The action space dimension of the entire Markov decision process is 2. N ;
[0043] S202: Constructing the state space: s t =(b i ,d t+1 ,w t+1 ,τ i,t ,t)
[0044] In the formula, t is the current scheduling period, and vector b is... i It includes basic information about unit i, such as minimum start-up and shutdown time, start-up cost, and parameters of the secondary fuel curve; d t+1 This is the load forecast value for t+1, w t+1 This is the predicted wind power generation value for t+1, τ i,t It represents the number of time periods during which unit i has been turned on / off at the current time t;
[0045] S203: Construct a reward function, which is a scalar returned by the environment to the agent. This scalar reflects the quality of the state-action mapping relationship currently taken by the agent and is used to guide the agent to adjust its current decision-making strategy based on the magnitude of the reward value. The expression of the reward function is:
[0046]
[0047] In the formula, It is the unit's fuel cost. It is the unit startup cost. It is a load reduction penalty; the expression for the load reduction penalty is as follows:
[0048]
[0049] In the formula, c voll ζ is the unit cost per megawatt-hour of load reduction capacity, and ζ is the load reduction resolution, which is generally taken as 0.1% of the load. The load reduction penalty penalizes the agent to avoid taking bad behaviors that lead to load reduction and helps the agent actively explore feasible solutions.
[0050] S204: Calculate the environment transition probability:
[0051]
[0052] In the formula, the environment transition probability is determined by the environment transition function, which changes the current state of the system from s... t Convert to s t+1 The environment transfer function should strictly limit illegal actions, such as start-up and shutdown actions that violate unit start-up and shutdown constraints, and return the reward value r.
[0053] The environmental transition probability includes the transition of unit operating status, the transition of wind power forecast value, and the transition of load forecast value. Among them, the transition of wind power forecast value and the transition of load forecast value are both data that update the forecast value to the next time period.
[0054] The expression for the unit's operating state transition function is as follows:
[0055]
[0056] In the formula, τ i,t This refers to the current operating / downtime of the unit, depending on the different actions taken by the agent.
[0057] The transition of this state is deterministic.
[0058] S205: Determine the discount factor: The discount factor represents the agent's emphasis on long-term and short-term rewards, and its value ranges from [0,1].
[0059] In some embodiments, the discount factor is 0.9.
[0060] Step S3 specifically includes the following steps:
[0061] S301: Use real wind power data for strategy learning;
[0062] To leverage the data-driven nature of model-free reinforcement learning methods and avoid the complex randomness of power system modeling, policy learning is employed using real historical data, specifically wind power data collected from the real world to learn the agent's policy. During training, the variation patterns between predicted and measured wind energy values are learned, and based on understanding their distribution characteristics, an optimal scheduling scheme that can adapt to the actual testing environment is proposed.
[0063] S302: Employ a Markov decision process based on state perturbation;
[0064] In a Markov decision process based on state perturbation, during the corrected state transition between actual and predicted wind power, the agent's perturbation state observation is defined as the predicted wind power, enabling the agent to take corresponding actions according to a stochastic policy. Meanwhile, the environment still transitions from the real state to the next state, and the agent's reward is calculated based on the actual wind power value. The actions performed by the agent under the original policy learned from the predicted state may be suboptimal, thus the reward is reduced accordingly. Actions with lower rewards in the predicted state will be less frequently used during the exploration process.
[0065] S303: Adopt an improved state space; the state space should consider factors that affect decision-making as much as possible; when defining the state space, consider the temporal correlation problem, add the changes in wind power forecast values between adjacent periods to the state space, and represent it in the form of a first-order difference between two adjacent wind power periods;
[0066] The expression for the change in the predicted wind power value between adjacent periods is as follows:
[0067]
[0068] In the formula, P w,t-1 P is the predicted power output of wind power in the time period t-1. w,t This is the predicted power output of wind power in time period t;
[0069] The expression for the change in the predicted wind power value between adjacent periods is as follows:
[0070]
[0071] In the formula, P w,t-1 P is the predicted power output of wind power in the time period t-1. w',t-1 It is the measured power output of wind power during time period t;
[0072] Therefore, the improved state-space expression is as follows:
[0073]
[0074] In step S5, the training includes the following steps:
[0075] S501: Receives historical wind power and load data for training. The historical wind power data needs to include both wind power prediction data and wind power measured data.
[0076] S502: The action network interacts with the environment and stores the key information it obtains in the experience replay pool; the output of the action network is the scheduling scheme of the crew combination for the next time period, and the output of the evaluation network is the state value; during the training process, the agent interacts with the crew combination reinforcement learning environment in the order of time periods. The agent obtains the environment state defined in step S302 and outputs an action. The crew combination reinforcement learning environment calculates the scalar reward value defined in step S203 and assigns it to the agent; the state, action and reward value of each time period in the entire scheduling cycle are stored in the experience pool.
[0077] S503: Evaluate the computational state value and discounted reward of the network, use the calculation results to further solve the advantage function, and update the network weights of the evaluation network;
[0078] S504: The importance sampling ratio is calculated through the sampling network to update the weights of the action network; the sampling network and the action network share the same weights, but the weight parameters of the sampling network are updated later than those of the action network.
[0079] In step S4, the deep reinforcement learning model is a policy-based proximal policy optimization model;
[0080] The proximal policy optimization model is based on an actor-critic framework, featuring an action network and an evaluation network. It is also a policy-based deep reinforcement learning algorithm. Its characteristics include: approximating and optimizing the policy function by maximizing the policy objective function; the final optimized policy represents the probability distribution of the agent's actions; the optimal policy in policy-based methods generates actions with a certain probability, and even if the observations are the same, the results may differ; the policy objective function evaluates the quality of the current policy, and its expression is as follows:
[0081]
[0082] In the formula, In the current strategy π θ The probability that the system environment is in state s, π θ (s,a) represents the agent's value based on the current policy π. θ The probability of taking action a after observing state s. It is a reward value;
[0083] Furthermore, the expression for the near-end strategy optimization model is as follows:
[0084]
[0085]
[0086] In the formula, KL(θ,θ') is the KL divergence describing probability distributions θ and θ', and A θ' (s t ,a t ) is the advantage function under policy θ'; the near-end policy optimization model directly incorporates the KL divergence into the objective function to be optimized, thus allowing the gradient ascent algorithm to maximize the objective function.
[0087] The proximal policy optimization model needs to be applicable to a discrete action space. The steps for discretizing the proximal policy optimization model are as follows: In the original evaluation network, the Q-value function takes the state and action as input and outputs a Q-value, because there are infinitely many possible actions; in the crew combination Markov decision process, the action space is limited to 2. N There are several actions, so they can be mapped to a vector containing the Q-value of each action; for the action network, the action network no longer needs to output the mean and covariance of the continuous action distribution; instead, the action will directly output the classification distribution of all actions in the action space; in this invention, the softmax function is applied to the last network layer to ensure an effective probability distribution between 0 and 1.
[0088] The beneficial effects of this invention are:
[0089] 1. The method proposed in this invention can adaptively consider wind power uncertainty. By reflecting the impact of wind power output prediction error on the scheduling scheme in the reward function, this method only needs to use historical data to complete the learning of uncertainty, thereby avoiding the need for precise description of the distribution of random variables and manual selection of uncertainty budgets, as required by traditional robust optimization algorithms / stochastic optimization algorithms, and avoiding the influence of subjective factors.
[0090] 2. The method proposed in this invention significantly reduces solution time by deploying a large amount of computation time offline during the training phase and using the trained model parameters for scheduling. This ensures that the solution is accurate and approximates the optimal solution while greatly reducing the solution time. Compared to traditional optimization algorithms, this method directly outputs a decision scheme through a trained deep reinforcement learning agent, eliminating the need for a solver. Attached Figure Description
[0091] Figure 1 This is a schematic diagram of the overall process of the present invention;
[0092] Figure 2 This is a schematic diagram of the Markov decision-making process for unit combination established in this invention;
[0093] Figure 3This is a schematic diagram of the state transition process considering the uncertainties of wind power established in this invention;
[0094] Figure 4 This describes the training process of the action network and evaluation network of the near-end policy optimization algorithm in this invention.
[0095] Figure 5 This is a schematic diagram of the scheduling results of a 5-unit system under wind power uncertainty in the embodiment;
[0096] Figure 6 This is a comparison chart of the calculation results obtained by deep reinforcement learning model and two-stage robust optimization solution in the embodiment. Detailed Implementation
[0097] To make the technical solutions and advantages of the present invention clearer, the technical solutions of the embodiments of the present invention will be fully described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0098] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0099] The following is a detailed explanation of the deep reinforcement learning solution method for unit combination disclosed in this embodiment:
[0100] I. Test Conditions for the Example
[0101] Taking a traditional 5-unit system as an example, this system includes 5 thermal power units, and wind power generation uncertainties are also incorporated into the test system. The unit operating parameters are shown in Table 1. Parameters 1, 2, and 3 represent the coefficients of the unit's secondary fuel cost function.
[0102] Table 1. Unit parameters of the example
[0103]
[0104]
[0105] II. Model Establishment, Transformation, and Solution
[0106] like Figure 1 The present invention specifically includes the following process:
[0107] S1: Receive unit parameters and network topology, and establish a unit combination model based on traditional optimization;
[0108] S2: Modeling Markov decision process based on traditional optimized unit combination model;
[0109] S3: Improve the unit combination Markov decision process to take into account wind power uncertainties;
[0110] S4: Build a deep reinforcement learning model for solving Markov decision processes;
[0111] S5: Receive historical wind power and load data to train the parameters of the deep reinforcement learning model;
[0112] S6: The trained deep reinforcement learning model is used to solve the unit combination problem considering wind power uncertainty, and then the unit combination scheduling scheme is obtained.
[0113] The following is a detailed explanation:
[0114] S1. The traditional unit combination problem is transformed into a mixed integer quadratic optimization problem, and the established model is as follows:
[0115] The unit combination model includes the objective function, unit operating constraints, and power system constraints;
[0116] The objective function expression is:
[0117] In the formula, T is the scheduling period, N is the number of generating units, and u i,t It refers to the unit status, P. i,t It's the generator unit that's producing power. It is the unit's fuel cost function. It is the unit start-up and shutdown cost function.
[0118] The fuel cost function expression for the unit is:
[0119]
[0120] In the formula, α i ,β i ,γ i It is a parameter of the quadratic function curve of unit cost; P i,t It refers to the output power of the generator unit;
[0121] The unit operation constraints include unit capacity constraints, minimum start-up and shutdown time constraints, and ramp-up rate constraints. The unit capacity constraint represents the upper and lower limits of unit output for each time period, and its expression is as follows:
[0122]
[0123] In the formula, P i It is the lower limit of the unit's output. It is the upper limit of the unit's output, u i,t It indicates the unit is in start-up or shutdown status.
[0124] The minimum start-up and shutdown time constraint represents the minimum duration required for the unit to remain in a start-up or shutdown state. Generally, the larger the unit capacity, the longer the required time. The expression for the minimum start-up and shutdown time constraint is:
[0125]
[0126]
[0127] In the formula, TS i It is the minimum continuous shutdown time of the unit, TO i Minimum continuous start-up time of the unit.
[0128] The ramp rate represents the finite amount of power output a generator can increase or decrease over a given period. This constraint is related to the generator's start-up and shutdown states at different times, making it a time-dependent dynamic constraint. It has long been one of the most difficult constraints to handle in large-scale unit combination problems (affecting the solution efficiency of unit combination models). The expression for the ramp rate constraint is:
[0129]
[0130]
[0131] In the formula, P up,i It is the unit's ramp rate, P down,i It is the unit's downhill ramp rate, P shut,i This is the maximum permissible power output of the unit.
[0132] The power system constraints include system power balance constraints and spinning reserve constraints.
[0133] The power balance constraint expression is:
[0134]
[0135] In the formula, P D,t It is the aggregate load of the system in time period t.
[0136] To ensure stable system operation, spinning reserve is typically set at 10% of the system load. The spinning reserve constraint expression is as follows:
[0137]
[0138] In the formula, Rt It is the system's spinning reserve capacity during time period t.
[0139] S2. Transform the unit combination model into a Markov decision process. The Markov decision process includes a quintuple of state, action, environment transition probability, reward, and discount factor. Constructing the quintuple includes the following steps:
[0140] S201: Motion Space: A t =[a 1,t ,…,a N,t ],a n,t ∈{0,1}
[0141] In the formula, a n,t It is a binary vector whose length is the number of units N, and its value is 0 or 1. n,t =1 means that the nth unit will be turned on at time t+1 and will remain on during that time period, a n,t =0 The nth unit will be shut down at time t+1 and remain shut down during that period. The action space dimension of the entire Markov decision process is 2. N ;
[0142] S202: State space: s t =(b i ,d t+1 ,w i+1 ,τ i,t ,t)
[0143] In the formula, t is the current scheduling period, and vector b is... i It includes basic information about unit i, such as minimum start-up and shutdown time, start-up cost, and parameters of the secondary fuel curve; d t+1 This is the load forecast value for t+1, w t+1 This is the predicted wind power generation value for t+1, τ i,t It represents the number of time periods during which unit i has been turned on / off at the current time t;
[0144] S203: The reward function is a scalar returned by the environment to the agent. This scalar reflects the quality of the state-action mapping relationship currently taken by the agent and is used to guide the agent to adjust its current decision-making strategy based on the magnitude of the reward value. The expression for the reward function is:
[0145]
[0146] In the formula, It is the unit's fuel cost. It is the unit startup cost. This is a load reduction penalty. The expression for the load reduction penalty is as follows:
[0147]
[0148] In the formula, c voll ζ is the unit cost per megawatt-hour of load reduction capacity, and ζ is the load reduction resolution, typically taken as 0.1% of the load. The load reduction penalty penalizes the agent to prevent it from taking undesirable actions that lead to load reduction, thus helping the agent actively explore feasible solutions.
[0149] S204: Probability of environmental transition:
[0150]
[0151] In the formula, the environment transition probability is determined by the environment transition function, which changes the current state of the system from s... t Convert to s t+1 The environment transfer function should strictly limit illegal actions, such as start-up and shutdown actions that violate unit start-up and shutdown constraints, and return the reward value r.
[0152] The environmental transition probability includes unit operating status transition, wind power forecast value transition, and load forecast value transition: both wind power forecast value transition and load forecast value transition update the forecast value to the data of the next time period;
[0153] The expression for the unit's operating state transition function is as follows:
[0154]
[0155] In the formula, τ i,t This refers to the current operating / downtime of the unit, depending on the different actions taken by the agent.
[0156] The transition of this state is deterministic.
[0157] like Figure 3 During state transitions, the agent's perturbation state observation is defined as the predicted wind power, enabling the agent to execute corresponding actions according to a stochastic policy. Simultaneously, the environment transitions from its current true state to the next, calculating the agent's reward based on the actual wind power. It's important to note that since the agent initially learns its policy based on the predicted state, its actions may be suboptimal, leading to a reduced reward. During exploration, actions yielding lower rewards under predicted wind power will be less frequently selected, thus taking into account wind power uncertainty.
[0158] S205: Determine the discount factor: The discount factor represents the agent's emphasis on long-term and short-term rewards, and its value ranges between [0,1]. Here, the discount factor is 0.9.
[0159] S3. Improve the Markov decision process for unit combination to take into account wind power uncertainties;
[0160] S301: Use real wind power data for strategy learning;
[0161] In existing reinforcement learning methods for handling uncertainty, the uncertainty of wind power is often artificially modeled, for example, by assuming it follows a certain probability distribution. The policy learned in this artificially designed environment of uncertainty is then transferred to the test environment. Even if wind power output is randomly generated within a predefined range, it is essentially a uniform sampling. However, the environment composed of artificially assumed wind power probability distributions is not entirely the same as the real wind power output scenario. If the learned policy is not robust to such modeling errors, this gap often leads to unsuccessful transfers. To leverage the data-driven nature of model-free reinforcement learning methods and avoid the complex randomness of power system modeling, this paper proposes a policy learning approach using real historical data, specifically wind power data collected from the real world. During training, the paper learns the variation patterns between predicted and measured wind energy values. Based on understanding its distribution characteristics, an optimal scheduling scheme adaptable to the actual test environment is presented.
[0162] S302: Employ a Markov decision process based on state perturbation;
[0163] The Markov decision process with state perturbation is similar to the state-versus-Markov decision process, which assumes that uncertainty stems from unavoidable sensor errors or inherent inaccuracies in the equipment. Using the Markov decision process with state perturbation, the corrected state transition process between actual and predicted wind power can be... Figure 2 To illustrate, the perturbation state observation of the agent is defined as predicting wind power, enabling the agent to take corresponding actions according to a stochastic strategy. Meanwhile, the environment still transitions from the real state to the next state, and the reward obtained by the agent is calculated based on the actual wind power value. Since the actual wind power output may differ from the predicted wind power output, the actions performed by the agent under the original strategy learned based on the predicted state may be suboptimal, thus reducing the reward accordingly (i.e., the unit combination cost caused by the scheduling scheme is higher). Therefore, actions with lower rewards in the predicted state will be less frequently used during the exploration process.
[0164] S303: An improved state space is adopted; the state space should consider factors affecting decision-making as much as possible; because wind power has time-series correlation, the change of its predicted value is closely related to the time step t of each scheduling cycle; this means that the wind power prediction value at a single point cannot be used to determine the strategy for the entire scheduling cycle; therefore, the time-series correlation problem must be considered when defining the state space, otherwise it will affect the convergence of the algorithm; for this reason, the change of wind power prediction value between adjacent periods is added to the state space, and represented by the first-order difference form of wind power between two adjacent time periods;
[0165] The expression for the change in the predicted wind power value between adjacent periods is as follows:
[0166]
[0167] In the formula, P w,t-1 P is the predicted power output of wind power in the time period t-1. w,t This is the predicted power output of wind power in time period t;
[0168] The expression for the change in the predicted wind power value between adjacent periods is as follows:
[0169]
[0170] In the formula, P w,t-1 P is the predicted power output of wind power in the time period t-1. w',t-1 It is the measured power output of wind power during time period t;
[0171] Therefore, the improved state-space expression is as follows:
[0172]
[0173] S4. Select a deep reinforcement learning algorithm to solve the Markov decision process of unit combination. The algorithm needs to be able to solve the discrete action space and have the ability to converge to the stochastic optimal policy. The policy-based proximal policy optimization algorithm can well meet the above two requirements.
[0174] Specifically, the generator set combination Markov decision process is an environment consisting of a continuous state space (wind power variables, load variables, etc.) and a discrete action space (generator start-up and shutdown variables). Value-based algorithms, such as deep Q-learning, while suitable for the state and action space settings of generator set combination problems, inherently overestimate the value function, leading to suboptimal strategies. Furthermore, value-based methods eventually converge to deterministic actions, thus learning deterministic strategies. Therefore, these methods are typically used for deterministic generator set combination problems, where the strategy (generator set combination) is deterministic due to fixed prediction values. However, when considering wind power uncertainty, value-based deep reinforcement learning methods are clearly unsuitable. Specifically, under the predicted wind power values, the prediction error of wind power is unobservable a day-ahead, therefore there is no deterministic optimal generator set scheduling scheme based on actual wind power output. Deterministic strategies would yield the same actions under the same state observations. However, in our problem setting, even with the same wind power prediction observed, due to the uncertainty of wind power, we cannot definitively give the same scheduling scheme. Therefore, we adopt a policy-based approach to solve the unit combination problem, with the aim of improving the economy of the scheduling scheme while ensuring its safety.
[0175] This invention patent employs a proximal policy optimization algorithm based on an actor-critic framework, incorporating an action network and an evaluation network. It is also a policy-based deep reinforcement learning algorithm. Its characteristics include: approximating and optimizing the policy function by maximizing the policy objective function rather than optimizing the value function; the final optimized policy represents the probability distribution of the agent's actions. In policy-based methods, the optimal policy generates actions with a certain probability, and even if the observations are the same, the results may differ. The policy objective function evaluates the quality of the current policy, and its expression is as follows:
[0176]
[0177] In the formula, In the current strategy π θ The probability that the system environment is in state s, π θ (s,a) represents the agent's value based on the current policy π. θ The probability of taking action a after observing state s. It's a reward value.
[0178] Furthermore, the expression for the near-end strategy optimization algorithm is as follows:
[0179]
[0180]
[0181] In the formula, KL(θ,θ') is the KL divergence describing probability distributions θ and θ', and A θ' (s t ,a t ) is the advantage function under policy θ'. The proximal policy optimization algorithm directly incorporates the KL divergence into the objective function to be optimized, thus allowing the gradient ascent algorithm to maximize the objective function.
[0182] Furthermore, the proximal policy optimization algorithm needs to be applicable to a discrete action space. The steps of discretizing the proximal policy optimization model are as follows: In the original evaluation network, the Q-value function takes the state and action as input and outputs a Q-value, because there are infinitely many possible actions. In the crew combination Markov decision process, the action space is limited to 2^ ... N There are several actions, which can therefore be mapped to a vector containing the Q-value of each action. For action networks, there is no longer a need to output the mean and covariance of the continuous action distribution. Instead, the action network directly outputs the classification distribution of all actions in the action space. In this invention, a softmax function is applied to the last network layer to ensure an effective probability distribution between 0 and 1.
[0183] S5. Training the network parameters for the near-end policy optimization algorithm includes the following steps;
[0184] S501: Select historical wind power and load data for training. In order to implement the features described in step S301, the historical wind power needs to include both wind power prediction data and wind power measured data.
[0185] S502: The action network interacts with the environment and stores the key information it obtains in the experience replay pool; the output of the action network is the scheduling scheme for the next crew combination, and the output of the evaluation network is the state value. During training, the agent interacts with the crew combination reinforcement learning environment in time-period order. The agent obtains the environment state defined in step S302 and outputs an action. The crew combination reinforcement learning environment calculates the scalar reward value defined in step S203 and assigns it to the agent. The state, action, and reward value for each time period of the entire scheduling cycle are stored in the experience pool.
[0186] S503: Evaluate the computational state value and discounted reward of the network, use the calculation results to further solve the advantage function (the advantage of a certain action relative to the average) and update the network weights of the evaluation network;
[0187] S504: The importance sampling ratio is calculated through the sampling network, thereby updating the weights of the action network. The sampling network and the action network share the same weights, but the weight parameters of the sampling network are updated later than those of the action network.
[0188] like Figure 4 During training, the action network has multiple trainable hidden layers responsible for generating the probability distribution of possible actions the agent might take given a state. The evaluation network takes the state and corresponding actions as input and outputs a state-action value to estimate the agent's expected reward in the long run. These two networks are trained interactively within a unified framework: the actions output by the action network are executed in the environment to generate new states and rewards, which are then used to update the evaluation network and further guide the action network's policy optimization through a loss function.
[0189] S6. Use a trained deep reinforcement learning model to solve the unit combination problem considering wind power uncertainty, and then obtain the unit combination scheduling scheme.
[0190] The output results of each generator unit after solving using the deep reinforcement learning model are as follows: Figure 5 As shown, Figure 5 During the 24-hour scheduling period, Unit 1 is the main power supply unit. Meanwhile, to meet intraday wind power fluctuations, Units 2 and 4, as peak-shaving units, are started and stopped during certain periods. Figure 5 It can be seen that:
[0191] 1) At different times of the scheduling day, the predicted wind power output deviates from the actual value to varying degrees; in the face of wind power prediction errors, the deep reinforcement learning agent adaptively provides a scheduling scheme to avoid the loss of wind curtailment and load reduction.
[0192] Table 2 summarizes the computation time (in seconds) of the deep reinforcement learning model and the two-stage robust optimization algorithm in the experimental test over 7 scheduling days. The computation time of the near-term policy optimization algorithm was consistently 0.01 seconds, while the computation time of the two-stage robust optimization algorithm varied with different test days, and the longest time required was more than 8 seconds.
[0193] Table 2. Computational time consumption of deep reinforcement learning model and two-stage robust optimization algorithm in the embodiments.
[0194]
[0195]
[0196] As can be seen from Table 2:
[0197] 1) By shifting a significant amount of computational time to offline training, deep reinforcement learning algorithms can provide a decision-making solution for the wind turbine in a very short time. In contrast, traditional two-stage robust optimization algorithms exhibit large fluctuations in solution time across different wind power scenarios, and their computational time far exceeds that of deep reinforcement learning algorithms.
[0198] The computational results of deep reinforcement learning models and two-stage robust optimization solutions are compared to, for example... Figure 6 As shown, there are seven test days in total. The actual cost of the unit combination scheduling scheme obtained by the deep reinforcement learning algorithm is basically at the optimal level within seven days. At the same time, the scheduling cost of the traditional two-stage robust optimization algorithm is always higher than the actual cost of the scheduling scheme it provides. Figure 6 It can be seen that:
[0199] 1) The unit combination scheduling scheme obtained by the deep reinforcement learning algorithm is significantly more economical than the traditional two-stage robust optimization algorithm; in actual scheduling, the deep reinforcement learning algorithm is better able to adapt to the impact of wind power prediction errors, thus providing a more economical scheduling scheme.
[0200] In the description of this specification, references to terms such as "an embodiment" and "example" refer to specific features, structures, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms are not necessarily intended to refer to corresponding embodiments or examples in a suitable manner.
[0201] It must be pointed out that the above description of the embodiments is not intended to limit the invention but only to help understand the core idea of the invention. For those skilled in the art, any improvements to the invention and equivalent alternatives made to the invention without departing from the principle of the invention are also within the scope of protection of the claims of the invention.
Claims
1. A deep reinforcement learning solution method for unit combination, characterized in that, Includes the following steps: S1: Receive unit parameters and network topology, and establish a unit combination model based on traditional optimization; S2: Modeling Markov decision process based on traditional optimized unit combination model; S3: Improve the unit combination Markov decision process to take into account wind power uncertainties; S4: Build a deep reinforcement learning model for solving Markov decision processes; S5: Receive historical wind power and load data to train the parameters of the deep reinforcement learning model; S6: The trained deep reinforcement learning model is used to solve the unit combination problem considering wind power uncertainty, and then the unit combination scheduling scheme is obtained. In step S1, the unit combination model based on traditional optimization includes an objective function, unit operation constraints, and power system constraints; The objective function expression is: The objective function expression is: In the formula, It is the scheduling period. It refers to the number of generating units. This represents the start / stop status of the i-th unit during time period t. It represents the output of the i-th unit during time period t. It is the unit's fuel cost function. It is the unit start-up and shutdown cost function. The fuel cost function expression for the unit is: In the formula, These are the parameters of the quadratic function curve of the unit cost; It refers to the output power of the generator unit; The unit operation constraints include unit capacity constraints, unit minimum start-up and shutdown time constraints, and ramp rate constraints. The power system constraints include system power balance constraints and spinning reserve constraints. In step S2, the Markov decision process includes a state space, action space, reward function, environment transition probability, and a discount factor quintuple. Constructing the quintuple and converting the unit combination model into a Markov decision process specifically includes the following steps: S201: Constructing the Action Space: In the formula, It is a binary vector whose length is the number of units. The value is , Representing the Each unit The time slot will be turned on and will remain on during that time period. No. Each unit The action space dimension of the entire Markov decision process is [missing information]. The action space will be closed at a certain time and will remain closed during that time period. ; S202: Constructing the state space: In the formula, It is the current scheduling period, vector Includes generator sets Basic information such as minimum start-stop time, start-up cost, and parameters of the secondary fuel curve; yes The load forecast value, yes The predicted value of wind power generation, It is a generator set At the present moment The number of time periods that have been turned on / off; S203: Construct a reward function, which is a scalar returned by the environment to the agent. This scalar reflects the quality of the state-action mapping relationship currently taken by the agent and is used to guide the agent to adjust its current decision-making strategy based on the magnitude of the reward value. The expression of the reward function is: In the formula, It is the unit's fuel cost. It is the unit startup cost. It is a load reduction penalty; the expression for the load reduction penalty is as follows: In the formula, It is the unit cost per megawatt-hour of reduced load capacity. It is the load reduction resolution, which is generally 0.1% of the load. The load reduction penalty punishes the agent to avoid taking bad behaviors that lead to load reduction and helps the agent actively explore feasible solutions. S204: Calculate the environment transition probability: In the formula, the environment transition probability is determined by the environment transition function, which changes the current state of the system from... Switch to The environment transfer function should strictly limit illegal actions, such as start-up and shutdown actions that violate unit start-up and shutdown constraints, and return the reward value r. The environmental transition probability includes the transition of unit operating status, the transition of wind power forecast value, and the transition of load forecast value. Among them, the transition of wind power forecast value and the transition of load forecast value are both data that update the forecast value to the next time period. The expression for the unit's operating state transition function is as follows: In the formula, It is the current operating / shutdown time of the unit. Depending on the different actions taken by the agent, the transition of this state is deterministic. S205: Determine the discount factor: The discount factor represents the agent's emphasis on long-term and short-term rewards, and its value ranges from [0,1]. In step S4, the deep reinforcement learning model is a policy-based proximal policy optimization model; The proximal policy optimization model is based on an actor-critic framework, featuring an action network and an evaluation network. It is also a policy-based deep reinforcement learning algorithm. Its characteristics include: approximating and optimizing the policy function by maximizing the policy objective function; the final optimized policy represents the probability distribution of the agent's actions; the optimal policy in policy-based methods generates actions with a certain probability, and even if the observations are the same, the results may differ; the policy objective function evaluates the quality of the current policy, and its expression is as follows: In the formula, In the current strategy The probability that the system environment is in state s. It is the agent based on the current policy The probability of taking action a after observing state s. It is a reward value; Furthermore, the expression for the near-end strategy optimization model is as follows: In the formula, It describes the probability distribution and probability distribution KL divergence, In strategy The dominant function is used in the near-end policy optimization model, which directly incorporates the KL divergence into the objective function to be optimized, thus allowing the gradient ascent algorithm to maximize the objective function. .
2. The deep reinforcement learning solution method for unit combination according to claim 1, characterized in that, The unit capacity constraint represents the upper and lower limits of the unit's output in each time period. The expression for the unit capacity constraint is: In the formula, It is the lower limit of the unit's output. This is the upper limit of the unit's output. It indicates the unit's start-up and shutdown status; The minimum start-up and shutdown time constraint represents the minimum duration required for the unit to remain in a start-up or shutdown state. Generally, the larger the unit capacity, the longer the required time. The expression for the minimum start-up and shutdown time constraint is: In the formula, It is the minimum continuous shutdown time of the unit. Minimum continuous start-up time of the unit; The ramp rate constraint represents the limitation on the amount of power output that a generator can increase or decrease over a certain period of time; the expression for the ramp rate constraint is: In the formula, It is the unit's ramp rate. It is the unit's downhill / climbing rate. This is the maximum permissible power output of the unit; The power balance constraint expression is: In the formula, It is the aggregate load of the system in time period t; To ensure stable system operation, spinning reserve is typically set at 10% of the system load. The spinning reserve constraint expression is as follows: In the formula, Rt is the system's spinning reserve capacity during time period t.
3. The deep reinforcement learning solution method for unit combination according to claim 1, characterized in that, The discount factor is set to 0.
9.
4. The deep reinforcement learning solution method for unit combination according to claim 1, characterized in that, Step S3 specifically includes the following steps: S301: Use real wind power data for strategy learning; To leverage the data-driven nature of model-free reinforcement learning methods and avoid the complex randomness of power system modeling, policy learning is employed using real historical data, specifically wind power data collected from the real world to learn the agent's policy. During training, the variation patterns between predicted and measured wind energy values are learned, and based on understanding their distribution characteristics, an optimal scheduling scheme that can adapt to the actual testing environment is proposed. S302: Employ a Markov decision process based on state perturbation; In a Markov decision process based on state perturbation, during the corrected state transition between actual and predicted wind power, the agent's perturbation state observation is defined as the predicted wind power, enabling the agent to take corresponding actions according to a stochastic policy. Meanwhile, the environment still transitions from the real state to the next state, and the agent's reward is calculated based on the actual wind power value. The actions performed by the agent under the original policy learned from the predicted state may be suboptimal, thus the reward is reduced accordingly. Actions with lower rewards in the predicted state will be less frequently used during the exploration process. S303: Adopt an improved state space; the state space should consider factors that affect decision-making as much as possible; when defining the state space, consider the temporal correlation problem, add the changes in wind power forecast values between adjacent periods to the state space, and represent it in the form of a first-order difference between two adjacent wind power periods; The expression for the change in the predicted wind power value between adjacent periods is as follows: In the formula, Is it wind power? The predicted power output for the time period, This is the predicted power output of wind power in time period t; The expression for the change in the predicted wind power value between adjacent periods is as follows: In the formula, Is it wind power? The predicted power output for the time period, It is the measured power output of wind power during time period t; Therefore, the improved state-space expression is as follows: 。 5. The deep reinforcement learning solution method for unit combination according to claim 3, characterized in that, In step S5, the training includes the following steps: S501: Receives historical wind power and load data for training. The historical wind power data needs to include both wind power prediction data and wind power measured data. S502: The action network interacts with the environment and stores the key information it obtains in the experience replay pool; the output of the action network is the scheduling scheme of the crew combination for the next time period, and the output of the evaluation network is the state value; during the training process, the agent interacts with the crew combination reinforcement learning environment in the order of time periods. The agent obtains the environment state defined in step S302 and outputs an action. The crew combination reinforcement learning environment calculates the scalar reward value defined in step S203 and assigns it to the agent; the state, action and reward value of each time period in the entire scheduling cycle are stored in the experience pool. S503: Evaluate the computational state value and discounted reward of the network, use the calculation results to further solve the advantage function, and update the network weights of the evaluation network; S504: The importance sampling ratio is calculated through the sampling network, thereby updating the weights of the action network; The sampling network and the action network share the same weights, but the weight parameters of the sampling network are updated later than those of the action network.
6. The deep reinforcement learning solution method for unit combination according to claim 1, characterized in that, The proximal policy optimization model needs to be applicable to a discrete action space. The steps for discretizing the proximal policy optimization model are as follows: In the original evaluation network, the Q-value function takes the state and action as input and outputs a Q-value, because there are infinitely many possible actions; in the crew combination Markov decision process, the action space is restricted to... There are several actions, so they can be mapped to a vector containing the Q-value of each action; for action networks, action networks no longer need to output the mean and covariance of the continuous action distribution; instead, action networks will directly output the classification distribution of all actions in the action space; a softmax function is applied to the last network layer to ensure an effective probability distribution between 0 and 1.
