Optimal scheduling method for integrated energy system based on variable time constant gradient algorithm
By adopting the gradient algorithm based on variable time constants in the integrated energy system, real-time update time constants and soft update target networks solve the problems of low algorithm efficiency and low experience utilization efficiency in the existing technology, and achieve a more efficient energy system. Optimized scheduling and cost reduction.
Patent Information
- Application Number
- CN202410931964.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-07-12
AI Technical Summary
Existing technologies have problems with low algorithm efficiency, low experience utilization efficiency, and fixed time constants in integrated energy system optimization scheduling, resulting in a waste of computing resources and high model training costs.
The gradient algorithm based on variable time constants is adopted. By updating the time constant and soft update target network in real time, gradient descent and delayed learning algorithms are used to optimize agent training, improve the model convergence speed and effectively utilize experience.
It significantly reduces the operating cost of the integrated energy system, improves the convergence speed and experience utilization efficiency of the model, and is suitable for different seasons and load demand changes.
Smart Images

Figure CN118469104B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of new energy technology and relates to energy scheduling optimization, and specifically to an integrated energy system optimization scheduling method based on a variable time constant gradient algorithm. Background Art
[0002] An integrated energy system integrates multiple energy sources within a region, including coal, oil, natural gas, electricity, and thermal energy, to achieve coordinated planning, optimized operation, collaborative management, interactive response, and complementary support among various heterogeneous energy subsystems. For a relatively stable integrated energy system, while meeting diverse energy demands within the system, it must effectively improve energy efficiency and promote sustainable energy development.
[0003] Dynamic programming is currently the most commonly used model for optimizing and scheduling integrated energy systems. When the model structure is simple, using a dynamic programming algorithm can significantly improve solution efficiency. However, when the integrated energy system model is more complex, using dynamic programming to solve the model is time-consuming. Compared to dynamic programming algorithms, genetic algorithms can obtain calculation results more quickly and can be used in integrated energy systems with more complex models. However, the solution of genetic algorithms is significantly affected by parameters such as the crossover rate and mutation rate, the selection of which is largely based on experience. In addition, genetic algorithms are also somewhat dependent on the selection of the initial population. Therefore, genetic algorithms still have certain limitations in solving the optimization and scheduling problems of integrated energy systems.
[0004] Compared to the traditional scheduling methods mentioned above, reinforcement learning, a subfield of machine learning, optimizes decision-making by using feedback from interactive learning training between intelligent agents and their environments. Using reinforcement learning algorithms for optimized scheduling of integrated energy systems can effectively reduce operating costs. However, with the increasing diversity of units and complexity of energy coupling, reinforcement learning algorithms based on discrete control will inevitably suffer from the "curse of dimensionality" brought about by the exponential increase in action discreteness. While continuous action reinforcement learning algorithms can avoid the shortcomings of discrete action reinforcement learning algorithms when optimizing integrated energy systems, they also suffer from problems such as overestimation and low execution efficiency.
[0005] In practical applications, people often only focus on how to improve algorithms to reduce system operating costs, usually simplifying or even avoiding the issue of model training efficiency, resulting in a large waste of computing resources, which is not conducive to maximizing the operating benefits and model training costs of the integrated energy system under fixed hardware configuration conditions. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this paper proposes a method for optimizing and scheduling integrated energy systems based on a variable time constant gradient algorithm. This method sets a time constant that updates in real time with environmental feedback, allowing the updated weights of the target network to be flexibly adjusted based on the current system state, accelerating the model's convergence. This method also assesses the quality of past experience, effectively addressing the inefficient use of effective experience when using a double-delayed deep deterministic policy gradient algorithm for optimizing and scheduling integrated energy systems.
[0007] The integrated energy system optimization scheduling method based on the variable time constant gradient algorithm, after determining the system objective function, the training of the intelligent agent includes the following steps:
[0008] Step 1: Establish an integrated energy system model, describe the optimization scheduling process for the model as a Markov decision process, initialize the neural network parameters and fill the experience pool using exploratory initialization.
[0009] Step 2: Use the gradient descent algorithm to update the value network parameters.
[0010] Step 3: Set up a policy network based on delayed learning The update frequency is less than that of the value network , using the gradient ascent algorithm to update the policy network.
[0011] Step 4: Based on the reward value of the current round Compared with the reward value in the previous round of soft update Compare and set variable time constant :
[0012]
[0013] in The variable time constant used in the previous update round, =0.005, is the time constant change. t represents the target network’s current update time, and t-3 represents the target network’s previous update time.
[0014] Variable time constant according to the current round Update the target strategy network and target value network.
[0015] Step 5. Continuously iteratively train the agent according to steps 2 to 4 so that it learns how to make the best decisions in different situations to maximize the reward function.
[0016] Step 6: Use the trained intelligent agent to schedule the integrated energy system within a day, so as to achieve the optimal economic cost operation of the integrated energy system.
[0017] The present invention has the following beneficial effects:
[0018] 1. A method for determining effective experience during soft updates of the target network is proposed. The reward value during a soft update is compared with the reward value during the previous soft update. The target network parameter with the larger reward value is considered effective experience for integrated energy system scheduling. This method reduces the use of low-quality experience and increases the use of high-quality experience in the target network. This effectively addresses the low efficiency of effective experience utilization when using a double-delayed deep deterministic policy gradient algorithm for integrated energy system optimization scheduling.
[0019] 2. A real-time scheduling method for an integrated energy system with a soft update method with a variable time constant is proposed. This improves the problem of fixed time constants during soft updates in the traditional network training process, enables the time constants to be updated in real time with environmental feedback, and enables the updated weights of the target network to be flexibly adjusted according to the current system state, thereby accelerating the convergence of the model.
[0020] 3. Considering seasonal load demand variations, a four-component integrated energy system operating cost model is proposed, which is more consistent with practical applications. Using trained agents for intraday scheduling of integrated energy systems can significantly reduce the operating costs of integrated energy systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 A schematic diagram of the structure of the integrated energy system for scheduling in the embodiment;
[0022] Figure 2 Schematic diagram of the process of initializing the neural network and experience pool;
[0023] Figure 3 Flowchart for soft update of variable time constant;
[0024] Figure 4 Flowchart for model training;
[0025] Figure 5 This is the convergence performance test result of the model in the embodiment. DETAILED DESCRIPTION
[0026] The present invention will be further explained below with reference to the accompanying drawings;
[0027] The integrated energy system optimization scheduling method based on the variable time constant gradient algorithm sets the objective function as the operating cost of each unit. The integrated energy system selected in this embodiment includes photovoltaic power generation devices, cogeneration units, gas boilers, electric boilers, power storage systems, heat storage systems and other energy supply, energy storage and energy consumption units, and is connected to the main power grid. The overall structure is as follows Figure 1 As shown. The following optimization objective function is established for this integrated energy system:
[0028]
[0029] in 、 、 、 They are The electricity purchase cost, cogeneration cost, energy storage system, and gas boiler operating cost at the moment, in $; is the number of time steps in a single scheduling cycle.
[0030] During operation, the integrated energy system must meet the corresponding equipment and external energy supply constraints of the system. These constraints include: electric power balance constraints, thermal power balance constraints, cogeneration unit operation constraints, power storage system operation constraints, heat storage system operation constraints, main grid power purchase constraints, electric boiler constraints, and gas boiler constraints.
[0031] Assume that the scheduling cycle of the integrated energy system is 24 hours and the scheduling period is 1 hour. The above integrated energy system is scheduled according to the following steps:
[0032] Step 1: Describe the optimization scheduling reinforcement learning framework of the integrated energy system as a Markov decision process, and define the agent at each moment The state space set , action space set In each state Take action Reward value obtained .
[0033] Each state is the state space exist All elements of the moment, every action Action space exist All elements of the moment:
[0034]
[0035] in for Photovoltaic unit output at all times, for User power load at all times, for The user's heat load at any given moment, Real-time electricity prices, for The current storage status, for Heat storage status at all times, for The electric power output of the cogeneration unit at all times.
[0036]
[0037] for Electric boiler output power at all times, Discharge power of the energy storage system at all times, for Heat storage system heat release power at all times, for Gas boiler output power at all times.
[0038] The agent takes maximizing the reward value as the basis of its action. In the problem of economic dispatch of integrated energy system, the goal is to minimize the system cost. Therefore, the reward value function is defined as the negative of the objective function. At the same time, the economic impact caused by the loss of constraint is added to the reward value function as a penalty function to establish the reward function. :
[0039]
[0040] in Represents each scheduling period The sum of all costs, Represents the system in each scheduling period The total cost of unconstrained and The coefficients of the cost function and penalty function are set to 1 and 0.5 respectively.
[0041] Initialize neural network parameters and experience pool: Put the policy network , First Value Network and the second value network Parameters 、 、 Randomly initialized to 、 and , and assign it to the target policy network , First Target Value Network and the second target value network Parameters 、 、 The experience pool is a quadruple , used to store the state generated by the interaction between the agent and the environment ,action ,award and the next state .
[0042] Use exploratory initialization to fill the experience pool and provide the agent with diverse initial experience. Define the action selection as:
[0043]
[0044] in is the exploration probability, which is initially set to 1 and gradually decreases with time t to ensure that a variety of experiences can be collected in the initial stage. Initialize the neural network structure and experience pool as follows Figure 2 shown.
[0045] Step 2: Randomly select a set of data from the experience pool , using the target policy network The network calculates the state to be The corresponding action :
[0046]
[0047] Direction Action Noise needs to be added to make the network more stable:
[0048]
[0049] in is the action noise, the initial size is set to 0.999, and gradually decreases to 0 with the number of training rounds. The value of the action noise cannot exceed the maximum value of the action: .
[0050] Calculate TD_target :
[0051]
[0052] Represents two target value networks and The minimum value of the output, is the weight coefficient, which is set to 0.99 in this embodiment.
[0053] Calculate two value networks and The output of The sum of the mean squared errors is used as the loss function :
[0054]
[0055] The parameters of the two value networks are updated using the gradient descent algorithm.
[0056] Step 3: Use delayed learning to set up the policy network The update frequency is less than that of the value network To ensure that the estimation error is reduced before the strategy is updated, this embodiment sets the value network to be updated 3 times during the network training process. Update the policy network once .
[0057] Policy Network According to the current status Output new action :
[0058]
[0059] Through the value network Calculate new actions The value of :
[0060]
[0061] Calculate the mean of the two value network outputs and take the inverse as the loss function of the policy network :
[0062]
[0063] Finally, the gradient ascent algorithm is used to complete the policy network Updates.
[0064] Step 4: Convert the reward value in the Markov decision process As a measurement indicator in the economic dispatch of integrated energy systems It represents the opposite of the total scheduling cost of this round. The larger it is, the lower the scheduling cost is, which means the decision made by the agent in this round is better. Before soft updating the target network, the reward value of the current round is and the reward value during the previous soft update For comparison, if the reward of the current round If the value is large, the target network parameter of the current round is set to effective experience, and the weight of effective experience is increased during soft update. According to the size of the reward value, set the variable time constant :
[0065]
[0066] t represents the update time of the target network in the current round, and t-3 represents the update time of the target network in the previous round; The variable time constant used in the previous update, with an initial value of 0.005, The time constant is set to 0.0001. satisfy:
[0067]
[0068] in is 0.01, is 0.0001.
[0069] According to the variable time constant Update the target strategy network and target value network, such as Figure 3 As shown:
[0070]
[0071]
[0072] Step 5. Repeat steps 2 to 4 to continuously iterate and train the agent so that it can learn how to make the best decisions in different situations to maximize the reward function. The model training flow chart is as follows: Figure 4 shown.
[0073] Step 6: Save the trained intelligent agent model and use it to perform intraday scheduling of the integrated energy system, thereby achieving optimal economic cost operation of the integrated energy system.
[0074] To verify the effectiveness of this method, 7 summer working days and 4 summer holidays, a total of 11 days, were randomly selected for scheduling simulation experiments. The results are shown in Table 1:
[0075] ;
[0076] Table 1
[0077] Seven winter working days and four winter holidays, totaling 11 days, were randomly selected for scheduling simulation experiments. The results are shown in Table 2:
[0078] ;
[0079] Table 2
[0080] The table above shows the operating costs of optimizing the integrated energy system using this method and traditional methods in different seasons, weather conditions, and electricity usage scenarios. This shows that this method can effectively save system operating costs in different seasons and weather conditions, and is also applicable to different load demands on weekdays and holidays.
[0081] Taking the reward value during training as the evaluation target, the convergence effects of the traditional method and this method were compared under the same environment. Figure 5As shown in Table 3, the number of rounds at which this method begins to converge is lower than that of the traditional method, and the final reward value is also higher than that of the traditional method. To avoid accidental results, the above experiment was repeated several times, and the number of rounds at which the two methods began to converge was recorded. The results are shown in Table 3:
[0082] ;
[0083] Table 3
[0084] From the data in Table 3, it can be seen that this method can reach convergence with fewer rounds in multiple experiments, and the effect is significant.
Claims
1. An integrated energy system optimization scheduling method based on a variable time constant gradient algorithm is established. An integrated energy system model is established and the optimization scheduling process for the model is described as a Markov decision process, which is characterized by: With the goal of minimizing the operating cost of the integrated energy system, the double-delayed deep deterministic policy gradient algorithm is used to train the neural network. Before soft updating the target network, the reward value r of the current round is calculated. t Compared with the reward value r in the previous round of soft update t-3 For comparison, set the variable time constant τ t : where τ t-3 is the variable time constant used in the previous round of updates, τ0=0.005, ρ is the change in the time constant; t represents the update time of the target network in the current round, and t-3 represents the update time of the target network in the previous round; According to the variable time constant τ t Update the target strategy network and target value network: f' t =t t f' t-3 +(1-t t )f' t I will i_t =t t I will i_t-3 +(1-t t )i' i_t Among them, φ' t ,θ' i_t Respectively represent the target strategy network parameters and target value network parameters after the current round of update, φ' t-3 ,θ' i_t-3 They represent the target strategy network parameters and target value network parameters updated in the previous round respectively; The trained neural network is used for intraday scheduling of the integrated energy system, thereby achieving optimal economic cost operation of the integrated energy system.
2. The method for optimizing and dispatching an integrated energy system based on a variable time constant gradient algorithm according to claim 1, characterized in that: The objective function is set as the operating cost of each unit, and the following optimization objective function is established: Among them C E (t), C CHP (t), C ESS (t), C GB (t) are the electricity purchase cost, cogeneration cost, energy storage system, and gas boiler operating cost at time t, in $; T is the number of time steps in a single scheduling cycle; The constraints include electric power balance constraints, thermal power balance constraints, cogeneration unit operation constraints, power storage system operation constraints, heat storage system operation constraints, main grid power purchase constraints, electric boiler constraints and gas boiler constraints.
3. The method for optimizing and dispatching an integrated energy system based on a variable time constant gradient algorithm as claimed in claim 1, characterized in that: The optimization scheduling process of the integrated energy system is described as a Markov decision process, which defines the state space set S(t), action space set A(t) of the intelligent agent at each time t, and the action space set A(t) at each state s t Take action a t The reward value r t : S(t)={P PV (t),P Load (t),H Load (t),t,c Grid (t),SOC(t),SOT(t),P CHP (t)} A(t)={P CHP (t),H EB (t),P ESS (t),H TSS (t),H GB (t)} r t =-β c C(t)-β g G(t) Where P PV (t) is the output of the photovoltaic unit at time t, P Load (t) is the user's electrical load at time t, H Load (t) is the heat load of the user at time t, c Grid (t) is the real-time electricity price, SOC(t) is the power storage state at time t, SOT(t) is the heat storage state at time t, P CHP (t) is the power output of the cogeneration unit at time t; H EB (t) is the output power of the electric boiler at time t, P ESS (t) The discharge power of the power storage system at time t, H TSS (t) is the heat release power of the heat storage system at time t, H GB (t) is the output power of the gas boiler at time t; C(t) represents the sum of all costs in each scheduling period t, G(t) represents the sum of the unconstrained costs of the system in each scheduling period t, β c and β g are the coefficients of the cost function and the penalty function.
4. The method for optimizing and scheduling an integrated energy system based on a variable time constant gradient algorithm according to claim 1 or 3, characterized in that: Initialize the parameters of the policy network π(s|φ), the first value network Q(s,a|θ1), and the second value network Q(s,a|θ2), and assign them to the target network; Set a quadruple (s t ,a t ,r t ,s t+1 ), used to store the state s generated by the interaction between the agent and the environment t 、Action a t , Reward t and the next state s t+1 ; Use exploratory initialization to fill the experience pool and define the action selection method as: Where μ is the exploration probability, which is initially set to 1 and gradually decreases with time t.
5. The method for optimizing and dispatching an integrated energy system based on a variable time constant gradient algorithm as claimed in claim 4, characterized in that: Update the value network 3 times during network training Then update the policy network π(s|φ) once.
6. The method for optimizing and dispatching an integrated energy system based on a variable time constant gradient algorithm as claimed in claim 5, characterized in that: The update method of the value network is: Randomly select a set of data (s) from the experience pool t ,a t ,r t ,s t+1 ), using the target policy network π'(s|φ') the network calculates the state to be s t+1 The corresponding action a t+1 : a t+1 =π'(s t+1 |φ') Toward action a t+1 Noise needs to be added: a t+1 =a t+1 +e Where ε is the action noise, whose value does not exceed the maximum value of the action and gradually decreases to 0 with the number of training rounds; Calculate two value networks and The sum of the mean square error between the output of and y is used as the loss function Q loss : y=r t +γmin i=1,2 Q i '(s t+1 ,a t+1 |θ i ') Among them, min i=1,2 Q i '(s t+1 ,a t+1 |θ i ') represents two target value networks Q1'(s t+1 ,a t+1 |θ1') and Q'2(s t+1 ,a t+1 |θ2') output, γ is the weight coefficient; the parameters of the two value networks are updated using the gradient descent algorithm.
7. The method for optimizing and dispatching an integrated energy system based on a variable time constant gradient algorithm as claimed in claim 5, characterized in that: The update method of the policy network is: The policy network π(s|φ) is based on the current state s t Output new action a t+1 : a t+1 =π(s t |f) Through the value network Calculate the new action a t+1 The value of q i_t+1 : q i_t+1 =Q i (s t ,a t+1 |θ i ) Calculate the mean of the two value network outputs and take the inverse as the loss function π of the policy network loss : Use the gradient ascent algorithm to update the policy network π(s|φ).
Citation Information
Patent Citations
Intelligent scheduling method for wind-light-water complementary system based on deep reinforcement learning
CN116345450A
Multi-unmanned aerial vehicle auxiliary calculation migration method based on dual delay depth deterministic strategy gradient algorithm
CN117149434A
Scheduling decision model establishment method based on SumTree-TD3 algorithm
CN117291390A
Supply and demand coordinated regulation and control system and method for comprehensive energy system
CN117394461A
Control method based on combination of double-delay depth deterministic strategy gradient algorithm and active disturbance rejection controller
CN118151537A
