Energy internet optimization scheduling method and device
By using deep deterministic strategy gradient algorithm and random noise greedy strategy in energy Internet optimization scheduling, the problem of network in deep reinforcement learning is solved, and efficient optimization scheduling of energy Internet is achieved.
Patent Information
- Application Number
- CN202411101761.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-29
AI Technical Summary
When performing energy Internet optimization scheduling based on deep reinforcement learning, there is a problem that the network cannot converge normally and the training efficiency is inefficient.
By establishing a system model of the target energy Internet, the objective functions and constraints of optimization scheduling are determined, the energy Internet optimization scheduling model is constructed based on the deep deterministic strategy gradient algorithm, and the target scheduling actions output by the target strategy network are determined using random noise and greedy strategies. Perform training to obtain an optimized scheduling scheme.
The network convergence is achieved and the training time is greatly shortened, the training efficiency is improved, and the strategy is optimal.
Smart Images

Figure CN119048276A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of energy scheduling, and in particular to an energy internet optimization scheduling method and device. Background Art
[0002] Energy Internet is based on renewable energy, strengthens the interconnection between different forms of energy, and deeply combines information and communication technology to maximize the role of multiple energy sources. Therefore, with the continuous advancement of energy Internet related construction, the continuous expansion of energy Internet operation models and the increasing number of demonstration projects, research on the optimization and dispatching methods of energy Internet is of great significance for improving energy utilization efficiency, reducing energy costs, improving grid stability and reliability, reducing environmental impact, and promoting energy transformation.
[0003] At present, a large number of scientific research results have been achieved both at home and abroad for the optimization and scheduling problems of the energy Internet. Among them, the traditional mathematical programming method belongs to the classic optimization method. It has a fast calculation speed for convex programming problems and can obtain the global optimal solution, but it often requires a series of assumptions about the system, and it is also difficult to cope with the challenges of dynamic changes in the system. Random optimization methods, robust optimization methods, and heuristic methods are all used to solve the uncertainty problems of sources and loads in the energy Internet, but they all rely on accurate predictions and are difficult to cope with scenarios with variable output and load of new energy. Moreover, due to the complexity of the problem and the dimensionality of the search space, these methods may fall into local optimal solutions during the optimization process, resulting in the inability to reach the global optimal solution.
[0004] In the process of realizing the present invention, the inventors discovered that deep reinforcement learning, due to its characteristics of real-time decision-making and continuous feedback correction, can better cope with the uncertainty of renewable energy output and load demand in the system, and provides a new solution for the optimal scheduling of the energy Internet. However, when optimizing the scheduling of the energy Internet based on deep reinforcement learning, there is currently a problem that the network cannot converge normally and the training efficiency is low. Summary of the invention
[0005] The embodiments of the present invention provide an energy internet optimization scheduling method and device to solve the current problems of network failure to converge normally and low training efficiency when performing energy internet optimization scheduling based on deep reinforcement learning.
[0006] In a first aspect, an embodiment of the present invention provides an energy internet optimization scheduling method, comprising:
[0007] Establish a system model of the target energy Internet and determine the objective function and constraints for optimizing the scheduling of the target energy Internet;
[0008] Based on the system model and the objective function, an energy internet optimization scheduling model is constructed according to a deep deterministic policy gradient algorithm;
[0009] Determine the target scheduling action output by the target strategy network during the training of the energy internet optimization scheduling model according to random noise and greedy strategy, so as to obtain a trained target energy internet optimization scheduling model based on the target scheduling action;
[0010] The target energy internet optimization scheduling model is used to solve the current system state of the target energy internet and the constraints to obtain an optimization scheduling solution under the current system state.
[0011] In a possible implementation, the energy internet optimization scheduling model includes a reward function;
[0012] The target scheduling action output by the target strategy network during the training of the energy internet optimization scheduling model is determined according to the random noise and greedy strategy, including:
[0013] During the training process of the energy internet optimization scheduling model, determining whether the current training process belongs to the early training stage or the late training stage;
[0014] If the current training process belongs to the early stage of training, a set of candidate scheduling actions is randomly generated, and random noise is added to the scheduling actions output by the target policy network to obtain a set of candidate target scheduling actions;
[0015] Selecting the candidate scheduling action and the target scheduling action to be selected according to a greedy strategy;
[0016] If the greedy strategy selects the target scheduling action to be selected, the target scheduling action to be selected is determined as the target scheduling action output by the target strategy network;
[0017] If the greedy strategy selects the candidate scheduling action, the reward value corresponding to the candidate scheduling action is calculated based on the reward function, recorded as the first reward value, and the reward value corresponding to the target scheduling action to be selected is calculated based on the reward function, recorded as the second reward value;
[0018] The scheduling action corresponding to the larger reward value between the first reward value and the second reward value is determined as the target scheduling action output by the target policy network.
[0019] In a possible implementation manner, after determining whether the current training process belongs to the early training stage or the late training stage, the method further includes:
[0020] If the current training process belongs to the late stage of training, random noise is added to the scheduling action output by the target network to obtain the target scheduling action output by the target policy network.
[0021] In a possible implementation manner, the process of determining whether the current training process belongs to the early training stage or the late training stage includes:
[0022] Determine whether the current training process is the first training process;
[0023] If the current training process is the first training process, then the current training process is determined to be the early stage of training;
[0024] If the current training process is not the first training process, determine whether the change in the reward value corresponding to the target scheduling action determined in the previous training process is greater than or equal to the set change threshold;
[0025] According to the judgment result, it is determined whether the current training process belongs to the early training stage or the late training stage.
[0026] In a possible implementation, determining whether the current training process belongs to the early training stage or the late training stage according to the judgment result includes:
[0027] If the change amount is greater than or equal to the set change amount threshold, determining that the current training process is in the early stage of training;
[0028] If the change amount is less than the set change amount threshold, the cumulative number of times the change amount is less than the set change amount threshold is increased by 1, and it is determined whether the cumulative number reaches the set number threshold;
[0029] If the cumulative number of times does not reach the set number of times threshold, the current training process is determined to be in the early stage of training;
[0030] If the accumulated number of times reaches the set number of times threshold, it is determined that the current training process is in the late stage of training.
[0031] In a possible implementation, the random noise is OU noise;
[0032] The greedy strategy is an ε-greedy strategy.
[0033] In a possible implementation, the reward function is:
[0034]
[0035] Among them, r t (s t ,a t ) is the system state s at time t t and the scheduling action a at time t t The reward value of the reward function is: β1 is the penalty coefficient for system operation cost, β2 is the penalty coefficient for violation of constraint conditions, β3 is the penalty coefficient for source-load power imbalance, CE is the cost of purchasing energy, C BES is the depreciation cost of charging and discharging of electric energy storage, C HS is the depreciation cost of charging and discharging of thermal energy storage, F t is the constraint violation penalty at time t, α1 is the constraint violation penalty coefficient for the combined heat and power unit, α2 is the constraint violation penalty coefficient for the electric energy storage unit, α3 is the constraint violation penalty coefficient for the electric boiler, α4 is the constraint violation penalty coefficient for the gas boiler, α is the constraint violation penalty function coefficient, p CHP (t) is the electric power output of the cogeneration unit at time t, p CHP is the electric power limit of the combined heat and power unit output, p BES (t) is the charging / discharging power of the energy storage at time t, p BES is the charge / discharge power limit of the energy storage, h EB (t) is the thermal power output of the electric boiler at time t, h EB is the thermal power limit of the electric boiler output, h GB (t) is the thermal power output of the gas boiler at time t, h GB is the thermal power limit of the gas boiler output, U t is the source-load power imbalance penalty at time t, p VAC (t) is the penalty for imbalance between power supply and demand at time t, h VAC (t) is the thermal power supply and demand imbalance penalty at time t.
[0036] In a possible implementation, the energy internet optimization scheduling model further includes a strategy network, a value network and a target value network;
[0037] Before determining whether the current training process belongs to the early training stage or the late training stage, it also includes:
[0038] Initializing the energy internet optimization scheduling model, and using the initialized system state as the current system state;
[0039] Inputting the current system state into the policy network to obtain the current scheduling action corresponding to the current system state;
[0040] According to the reward function, calculate the current reward value corresponding to the current scheduling action;
[0041] Execute the current scheduling action to obtain the system status at the next moment;
[0042] The current system state, the current scheduling action, the current reward value and the next moment system state are put into the experience replay pool as an experience sample, and the priority of the experience sample is calculated according to the current reward value, the next moment target value function value and the current value function value, wherein the next moment target value function value is the target value function value output after the next moment system state and the next moment target scheduling action are input into the target value network, and the current value function value is the value function value output after the current system state and the current scheduling action are input into the value network;
[0043] The system state at the next moment is taken as the new current system state, and the step of "inputting the current system state into the strategy network to obtain the current scheduling action corresponding to the current system state" and its subsequent steps are re-executed until a preset number of experience samples are obtained.
[0044] In a possible implementation, the step of calculating the priority of the experience sample according to the current reward value, the target value function value at the next moment, and the current value function value includes:
[0045] according to Calculate the priority of the experience sample;
[0046] Among them, p t is the priority of the empirical sample of the system state at time t, δ t is the time difference error, is a very small constant, r t is the system state s at time t t and the scheduling action a at time t t The reward value of the reward function, γ is the discount factor, Q′(s t+1 ,π′(s t+1 |θ π′ )|θ Q′ ) is to set the next moment system state s t+1 and the next target scheduling action π′(s t+1 |θ π′ ) is input into the target value network and then outputs the target value function value at the next moment, Q(s t ,a t |θ Q ) is to convert the current system state s t and the current scheduled action a t The current value function value output after inputting the value network.
[0047] In a second aspect, an embodiment of the present invention provides an energy internet optimization scheduling device, comprising:
[0048] The first model building module is used to establish a system model of the target energy Internet and determine the objective function and constraint conditions for optimizing the scheduling of the target energy Internet;
[0049] A second model building module is used to build an energy Internet optimization scheduling model based on the system model and the objective function according to a deep deterministic policy gradient algorithm;
[0050] A training module, used to determine the target scheduling action output by the target strategy network during the training of the energy internet optimization scheduling model according to random noise and greedy strategy, so as to obtain a trained target energy internet optimization scheduling model based on the target scheduling action;
[0051] The scheduling module is used to utilize the target energy internet optimization scheduling model to solve the current system state of the target energy internet and the constraints to obtain the optimization scheduling plan under the current system state.
[0052] The embodiment of the present invention provides an energy internet optimization scheduling method and device, which first establishes a system model of a target energy internet, and determines the objective function and constraint conditions for optimizing the scheduling of the target energy internet, then constructs an energy internet optimization scheduling model based on the system model and the objective function according to a deep deterministic policy gradient algorithm, and then determines the target scheduling action output by the target policy network during the training of the energy internet optimization scheduling model according to random noise and greedy strategies, so as to obtain a trained target energy internet optimization scheduling model based on the target scheduling action, and finally uses the target energy internet optimization scheduling model to solve under the current system state and constraint conditions of the target energy internet, and obtains an optimization scheduling scheme under the current system state. Thus, by using random noise and greedy strategies, the target scheduling action with the largest reward value is selected for network training in the early stage of training, and in the later stage of training, the target scheduling action obtained after noise exploration is relied on to continue training until the network converges, and the dynamic adjustment strategy of the target scheduling action greatly shortens the training time, improves the training efficiency, and ensures the optimality of the strategy. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 work.
[0054] Figure 1 It is a flow chart of the implementation of the energy internet optimization scheduling method provided by the embodiment of the present invention;
[0055] Figure 2 It is a framework diagram of the energy internet optimization scheduling method provided by an embodiment of the present invention;
[0056] Figure 3 is a curve diagram showing the change of reward value with training rounds during the training of the energy internet optimization scheduling model provided by an embodiment of the present invention;
[0057] Figure 4 It is a structural diagram of the energy Internet optimization scheduling device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0058] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.
[0059] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.
[0060] Figure 1 The implementation flow chart of the energy internet optimization scheduling method provided by the embodiment of the present invention is detailed as follows:
[0061] In step 101, a system model of a target energy internet is established, and an objective function and constraint conditions for optimizing the scheduling of the target energy internet are determined.
[0062] In this embodiment, the system model of the target energy Internet is first established. Figure 2 As shown, the target energy internet system may include, for example, combined heat and power (CHP), electric boiler (EB), gas boiler (GB), photovoltaic array (PV), battery energy storage (BES) and heat storage (HS), as well as common units such as user electric-heat load. Establishing the system model of the target energy internet means establishing the equipment model of each equipment in the target energy internet.
[0063] (1) Equipment model of combined heat and power unit:
[0064] The combined heat and power unit consumes natural gas to generate electricity and heat. The output power of the combined heat and power unit at time t is: p CHP (t) = MCHP (t)η CHP .
[0065] Where: p CHP (t) is the electric power output of the cogeneration unit at time t, M CHP (t) is the natural gas consumption of the cogeneration unit at time t, η CHP It is the electricity conversion efficiency of the combined heat and power unit.
[0066] Thermal power output of the combined heat and power unit h CHP (t) and electric power p CHP (t) have a coupling relationship, which is called "electro-thermal characteristics". Generally, a fixed thermo-electric ratio is used, which is expressed as That is, the thermal power output of the combined heat and power unit h CHP (t) and electric power p CHP The ratio of (t) is a certain value.
[0067] (2) Equipment model of electric boiler:
[0068] The electric boiler consumes electricity to generate heat energy. The heat power output of the electric boiler at time t is: h EB (t) = p EB (t)η EB .
[0069] Where: h EB (t) is the thermal power output of the electric boiler at time t, p EB (t) is the electric power consumed by the electric boiler at time t, η EB is the conversion efficiency of the electric boiler.
[0070] (3) Equipment model of gas boiler:
[0071] The gas boiler consumes natural gas to generate heat energy. The thermal power output of the gas boiler at time t is: h GB (t) = M GB (t)η GB .
[0072] Where: h GB (t) is the thermal power output of the gas boiler at time t, M GB (t) is the natural gas consumption of the gas boiler at time t, η GB It is the conversion efficiency of gas boiler.
[0073] (4) Equipment model of energy storage devices such as electrical energy storage or thermal energy storage:
[0074] The energy storage ratio (State of Charge, SOC) of the energy storage device at time t can be expressed as:
[0075]
[0076] Where: p ES (t) is the charging / discharging power of the energy storage device (i.e., electrical energy storage or thermal energy storage) at time t, p ES (t) is positive when energy is released, p ES When (t) is negative, it indicates stored energy, Q ES is the capacity of the energy storage device, is the SOC of the energy storage device at the initial moment, Δt is the scheduling time scale, η ES is the storage / release energy coefficient of the energy storage device, as shown below:
[0077]
[0078] Where: η ch and η dis are the storage / release energy efficiency of the energy storage device, respectively.
[0079] After establishing the system model of the target energy Internet, the optimization scheduling problem of the target energy Internet is mathematically described, and the objective function and constraints of the optimization scheduling are determined.
[0080] Among them, the objective function of the optimal scheduling of the target energy Internet can be set to minimize the system operation cost, and its mathematical expression can be:
[0081] F=min(C E +C BES +C HS );
[0082] Where: C E is the cost of purchasing energy, C BES is the depreciation cost of charging and discharging of electric energy storage, C HS It is the depreciation cost of charging and discharging thermal energy storage.
[0083] The cost of purchasing energy is:
[0084]
[0085] Where: p grid (t) is the power exchanged between the system and the main grid during period t, p grid (t) is positive, indicating that the system purchases electricity from the main power grid, p grid (t) is negative, indicating that the system is connected to the grid with surplus power, ε e (t) is the electricity price in period t, ε gas (t) is the unit calorific value price of natural gas purchased in time period t, T is the total time period of system scheduling, and Δt is the scheduling time scale or time slot length.
[0086] The depreciation cost of charging and discharging electric energy storage is:
[0087]
[0088] Where: p BES (t) is the charging / discharging power of the energy storage in time period t, p BES (t) is positive, indicating that the energy storage is in the discharge state, p BES (t) is negative, indicating that the energy storage is in a charging state, ρ BES is the depreciation cost coefficient of electric energy storage.
[0089] The depreciation cost of charging and discharging thermal energy storage is:
[0090]
[0091] Where: h HS (t) is the charging / discharging power of the thermal energy storage in time period t, h HS (t) is positive, indicating that the thermal energy storage is in the state of releasing heat, h HS (t) is negative, indicating that the thermal energy storage is in the heat storage state, ρ HS is the depreciation cost coefficient of thermal energy storage.
[0092] The constraints for the optimal scheduling of the target energy Internet may include power balance constraints, interaction power constraints with the main power grid, equipment operation constraints, and equipment ramp constraints.
[0093] Among them, the power balance constraint is:
[0094] p grid (t)+p PV (t)+p BES (t)+p CHP (t)-p EB (t) = p load (t);
[0095] Where: p PV (t) is the photovoltaic output power in period t, p load (t) is the electrical load during time period t.
[0096] h CHP (t)+h GB (t)+h EB (t)+h HS (t) = h load (t);
[0097] Where: h load (t) is the heat load in time period t.
[0098] The interactive power constraints with the main grid, that is, considering the operational stability of the grid side, the main grid has upper and lower limit constraints on the power interaction of the system:
[0099]
[0100] Where: is the lower limit of the interaction power between the system and the main grid, It is the upper limit of the interaction power between the system and the main grid.
[0101] Equipment operation constraints, that is, each device in the target energy internet has an upper and lower operating limit. For the electric power output of the cogeneration unit, the thermal power output of the gas boiler, the thermal power output of the electric boiler, the charging / discharging power of the electric energy storage device, and the charging / discharging power of the thermal energy storage device, they are:
[0102]
[0103]
[0104] Where: is the lower limit of the electric power output of the combined heat and power unit, The upper limit of the electric power output of the combined heat and power unit; is the lower limit of the thermal power output of the gas boiler, The upper limit of the thermal power output of the gas boiler; is the lower limit of the thermal power output of the electric boiler, The upper limit of the thermal power output of the electric boiler; is the lower limit of the charging / discharging power of the electric energy storage device, The upper limit of the charging / discharging power of the electrical energy storage device; is the lower limit of the charging / discharging power of the thermal energy storage device, It is the upper limit of the charging / discharging power of the thermal energy storage device.
[0105] For energy storage equipment, it is also necessary to avoid damage to the energy storage caused by deep charging and discharging. Therefore, the state of charge of the energy storage (i.e. the energy storage ratio of the energy storage) is limited to a certain range:
[0106]
[0107] Where: is the lower limit of the state of charge of the energy storage, The upper limit of the state of charge of the energy storage, SOC BES (t) is the charge state of the energy storage in time period t.
[0108] Equipment ramping constraints, that is, each device in the target energy internet has a constraint range for the equipment operation change rate. For the electric power output of the cogeneration unit, the thermal power output of the gas boiler, and the thermal power output of the electric boiler, they are:
[0109]
[0110] in, To limit the up and down climbing of the CHP unit, To limit the up and down climbing of gas boilers, It is the limit for the electric boiler to climb up and down.
[0111] After establishing the system model of the target energy Internet and determining the objective function and constraints for optimizing the scheduling of the target energy Internet, through the subsequent step 102, an energy Internet optimization scheduling model is constructed according to the deep deterministic policy gradient algorithm to optimize the scheduling of the target energy Internet by training the energy Internet optimization scheduling model.
[0112] In step 102, based on the system model and the objective function, an energy Internet optimization scheduling model is constructed according to a deep deterministic policy gradient algorithm.
[0113] like Figure 2 As shown, in this embodiment, based on the system model and objective function of the target energy Internet, a reinforcement learning framework for the optimization scheduling problem of the target energy Internet can be established, the state space, action space and reward function in reinforcement learning can be designed, and a training network can be built according to the Deep Deterministic Policy Gradient (DDPG) algorithm.
[0114] The state space can include the user's electric load demand, thermal load demand, photovoltaic power generation, the state of charge of the electric energy storage, the action at the last moment, and the scheduling period, that is:
[0115] s t ={p load (t),h load (t),p PV (t),SOC BES (t),a t-1 ,t};
[0116] Among them, each component in the action space can be represented by the output of each device. Specifically, from the device model of each device established in step 101 and the corresponding constraint conditions, it can be known that: CHP (t) After determination h CHP (t) can be determined by calculation, h EB (t) After determining p EB(t) can be determined by calculation, p BES (t) After determining p grid (t) can be determined by calculation, and h GB (t) after, h HS (t) can also be determined by calculation. Therefore, the action space can be expressed as:
[0117] a t ={p CHP (t),p BES (t),h EB (t),h GB (t)};
[0118] Among them, the design reward function can be divided into three parts: system operation cost penalty, constraint violation penalty and source-load power imbalance penalty. Therefore, the reward obtained by the agent in time period t is expressed as:
[0119]
[0120] Among them, r t (s t ,a t ) is the system state s at time t t and the scheduling action a at time t t The reward value of the reward function is: β1 is the penalty coefficient for system operation cost, β2 is the penalty coefficient for violation of constraint conditions, β3 is the penalty coefficient for source-load power imbalance, C E is the cost of purchasing energy, C BES is the depreciation cost of charging and discharging of electric energy storage, C HS is the depreciation cost of charging and discharging of thermal energy storage, F t is the constraint violation penalty at time t, α1 is the constraint violation penalty coefficient for the combined heat and power unit, α2 is the constraint violation penalty coefficient for the electric energy storage unit, α3 is the constraint violation penalty coefficient for the electric boiler, α4 is the constraint violation penalty coefficient for the gas boiler, α is the constraint violation penalty function coefficient, p CHP (t) is the electric power output of the cogeneration unit at time t, p CHP is the electric power limit of the combined heat and power unit output, p BES (t) is the charging / discharging power of the energy storage at time t, p BES is the charge / discharge power limit of the energy storage, h EB (t) is the thermal power output of the electric boiler at time t, h EB is the thermal power limit of the electric boiler output, h GB (t) is the thermal power output of the gas boiler at time t, h GB is the thermal power limit of the gas boiler output, U t is the source-load power imbalance penalty at time t, pVAC (t) is the penalty for imbalance between power supply and demand at time t, h VAC (t) is the thermal power supply and demand imbalance penalty at time t.
[0121] Among them, p CHP The value is shown in the following formula. Similarly, p BES 、h EB and h GB Take the upper and lower limits of the power constraints respectively:
[0122]
[0123] In this embodiment, the absolute value of each device's super constraint is taken as the nonlinear function y=e x In the x value, since y must be greater than 1 when the x value is positive, 1-y is designed to ensure that the corresponding negative value is obtained as the penalty term. The penalty term obtained based on the nonlinear function in this embodiment has a larger penalty value than the penalty term obtained based on the linear function when the device exceeds the limit value, and has a smaller penalty value than the penalty term obtained based on the linear function when the device exceeds the limit value. This avoids the influence of excessive penalty values in the early stage of training and improves the convergence performance of the algorithm in the later stage of training.
[0124] The DDPG algorithm uses two independent deep neural networks to approximate the policy function and the value function, and each network has its own target network, namely the value network (also called the Q network), the policy network (also called the π network), the target value network (also called the Q′ network), and the target policy network (also called the π′ network). The parameters of the policy network are θ π Denote that the parameters of the target policy network are θ π′ The parameters of the value network are represented by θ Q The parameters of the target value network are represented by θ Q′ The input of the policy network is each state s in the state space t , the output is a four-dimensional action a t The input of the value network is each state s in the state space t and the corresponding action a t , the output is the action-value function, i.e. Q(s t ,a t). Therefore, this embodiment constructs each state in the state space with the user's electric load demand, heat load demand, photovoltaic power generation, charge state of electric energy storage, action at the previous moment and the scheduling period, and constructs each group of scheduling actions in the action space with the electric power output of the cogeneration unit, the charging / discharging power of the electric energy storage, the thermal power output of the electric boiler and the thermal power output of the gas boiler, and establishes a value network, a strategy network, a target value network and a target strategy network based on a deep neural network, so as to obtain a target energy Internet optimization scheduling model that meets the requirements by subsequently training the parameters of the value network, the parameters of the strategy network, the parameters of the target value network and the parameters of the target strategy network.
[0125] In step 103, the target scheduling action output by the target strategy network during the training of the energy internet optimization scheduling model is determined according to the random noise and greedy strategy, so as to obtain a trained target energy internet optimization scheduling model based on the target scheduling action.
[0126] Among them, Figure 2 As shown in Figure 1, the training of the energy Internet optimization scheduling model can be divided into the construction of the experience replay pool and the training of the parameters of the value network, the parameters of the policy network, the parameters of the target value network, and the parameters of the target policy network. When training the parameters of the value network, the parameters of the policy network, the parameters of the target value network, and the parameters of the target policy network, a set number of experience samples can be extracted from the experience replay pool as training samples. Each training sample includes the current system state s t , schedule action a at the current moment t , current moment reward value r t (s t ,a t ) and the next moment system state s t+1 Then the current system state s in any training sample is t and the current time scheduling action a t Input the value network to obtain the action-value function corresponding to the training sample. And the next moment system state s in the training sample t+1 Input the target strategy network to obtain the system state s of the training sample at the next moment t+1 Then the next moment system state s in the training sample is t+1 And the next moment target scheduling action is input into the target value network to obtain the system state s of the training sample at the next moment t+1The corresponding target action-value function is obtained. Then, the loss function value is calculated according to the target action-value function and the action-value function, the parameters of the value network are updated according to the loss function value, the parameters of the policy network are updated according to the gradient of the policy network and the gradient of the value network, the target value network is soft-updated according to the parameters of the updated value network, and the target policy network is soft-updated according to the parameters of the updated policy network until the set number of iterations is reached. The training of the energy Internet optimization scheduling model can be completed by constructing multiple experience replay pools and training the value network, policy network, target value network and target policy network to obtain the target energy Internet optimization scheduling model.
[0127] Among them, the next moment system state s in the training sample t+1 Input the target strategy network to obtain the system state s of the training sample at the next moment t+1 When the corresponding target scheduling action at the next moment is taken, the target scheduling action at the next moment output by the target strategy network is determined according to the random noise and greedy strategy.
[0128] Optionally, determining the target scheduling action output by the target strategy network during the training of the energy internet optimization scheduling model according to the random noise and greedy strategy may include:
[0129] During the training process of the energy internet optimization scheduling model, it is determined whether the current training process belongs to the early training stage or the late training stage.
[0130] If the current training process belongs to the early stage of training, a set of candidate scheduling actions is randomly generated, and random noise is added to the scheduling actions output by the target policy network to obtain a set of candidate target scheduling actions.
[0131] The candidate scheduling actions and target scheduling actions are selected according to the greedy strategy.
[0132] If the greedy strategy selects the candidate target scheduling action, the candidate target scheduling action is determined as the target scheduling action output by the target strategy network.
[0133] If the greedy strategy chooses an alternative scheduling action, the reward value corresponding to the alternative scheduling action is calculated based on the reward function, recorded as the first reward value, and the reward value corresponding to the target scheduling action to be selected is calculated based on the reward function, recorded as the second reward value.
[0134] The scheduling action corresponding to the larger reward value of the first reward value and the second reward value is determined as the target scheduling action output by the target policy network.
[0135] Optionally, after determining whether the current training process belongs to the early training stage or the late training stage, the following steps may also be included:
[0136] If the current training process belongs to the late stage of training, random noise is added to the scheduling action output by the target network to obtain the target scheduling action output by the target policy network.
[0137] In this embodiment, considering that in the traditional DDPG training process, Ornstein-Uhlenbeck (OU) noise is usually introduced to increase the DDPG algorithm's ability to explore the environment during interaction, but the temporal correlation of the OU noise causes the actions obtained by its exploration to often have boundary values, resulting in a sparse reward value phenomenon, and even causing the gradient to disappear, making the network unable to converge normally. Therefore, this embodiment uses a dynamic adjustment strategy. In the early stage of training, the selection of actions is not only obtained through noise exploration, but the actions obtained by noise exploration are compared with the actions obtained by the greedy strategy, and the action with the largest corresponding reward value in the two actions is selected for network training. In the later stage of training, that is, after the reward value changes less than the set threshold, training continues until convergence only by relying on the actions after noise exploration. This dynamic adjustment strategy can greatly shorten the training time and ensure the optimality of the strategy.
[0138] For example, suppose an experience sample {s t ,a t ,r t ,s t+1}, then the next moment system state s t+1 After inputting the target strategy network, the system state s at the next moment is output t+1 The corresponding process of the next moment target scheduling action is:
[0139] First determine whether time t+1 belongs to the early or late training stage.
[0140] If time t+1 belongs to the early stage of training, a set of candidate scheduling actions is randomly generated, and random noise is added to the scheduling actions output by the target policy network to obtain a set of candidate target scheduling actions.
[0141] The candidate scheduling actions and target scheduling actions are selected according to the greedy strategy.
[0142] If the greedy strategy is selected as the target scheduling action (that is, the scheduling action output by the target strategy network), the target scheduling action is determined as the system state s at the next moment. t+1 The corresponding target scheduling action at the next moment.
[0143] If the greedy strategy chooses an alternative scheduling action (that is, a randomly generated alternative scheduling action), the reward value corresponding to the alternative scheduling action is calculated, and the reward value corresponding to the target scheduling action is calculated.
[0144] Then compare the reward value corresponding to the alternative scheduling action and the reward value corresponding to the target scheduling action.
[0145] If the reward value corresponding to the alternative scheduling action is large, the alternative scheduling action is determined as the system state s at the next moment t+1 The corresponding target scheduling action at the next moment.
[0146] If the reward value corresponding to the target scheduling action is large, the target scheduling action is determined as the system state s at the next moment t+1 The corresponding target scheduling action at the next moment.
[0147] Combination Figure 3 It can be seen that the agent is unfamiliar with the environment in the early stage of training, and the reward value obtained when the agent makes a scheduling decision is small. As the training progresses, the agent continuously interacts with the environment and accumulates experience to update the network weights, so the reward value of the agent will gradually increase until convergence. Therefore, this embodiment determines the target scheduling action by combining random noise and greedy strategy in the early stage of training, increases the exploration space of the target strategy network during training, and is conducive to the normal convergence of the network. In addition, by selecting a scheduling action with a large reward value as the target scheduling action for network training in the early stage of training, the training speed is accelerated as much as possible, thereby greatly shortening the training time and ensuring the optimality of the strategy.
[0148] Exemplarily, the random noise used in the above process may be OU noise, and the greedy strategy may be an ε-greedy strategy.
[0149] Optionally, determining whether the current training process belongs to the early training stage or the late training stage may include:
[0150] Determine whether the current training process is the first training process.
[0151] If the current training process is the first training process, it is determined that the current training process is the early stage of training.
[0152] If the current training process is not the first training process, it is determined whether the change in the reward value corresponding to the target scheduling action determined in the previous training process is greater than or equal to the set change threshold.
[0153] According to the judgment result, it is determined whether the current training process belongs to the early training stage or the late training stage.
[0154] In this embodiment, during the first training, for example, at time t=1, the current training process is directly determined to be the early stage of training, that is, a group is selected as the target scheduling action from the randomly generated candidate scheduling actions and the target policy network output after adding random noise to the candidate target scheduling action. After selecting the target scheduling action, the change in the reward value corresponding to the target scheduling action can be calculated, and the change can be compared with the set change threshold. If the change is large, for example, the change is greater than or equal to the set change threshold, the next training process still belongs to the early stage of training. If the change is small, for example, less than the set change threshold, it can be considered that the next training process will belong to the late stage of training.
[0155] Optionally, in order to more accurately determine the early stage or the late stage of training, determining whether the current training process belongs to the early stage or the late stage of training according to the judgment result may include:
[0156] If the change amount is greater than or equal to the set change amount threshold, it is determined that the current training process is in the early stage of training.
[0157] If the change amount is less than the set change amount threshold, the cumulative number of times the change amount is less than the set change amount threshold is increased by 1, and it is determined whether the cumulative number reaches the set number threshold.
[0158] If the cumulative number of times does not reach the set number threshold, it is determined that the current training process is in the early stage of training.
[0159] If the cumulative number of times reaches the set number threshold, it is determined that the current training process is in the late stage of training.
[0160] In this embodiment, when determining whether the training process is in the late stage of training, the cumulative number of times the change amount is less than the set change amount threshold can be counted. For example, if the change amount of the reward value corresponding to the target scheduling action determined in the previous training process is less than the set change amount threshold, the cumulative number is recorded as 1. If the change amount of the reward value corresponding to the target scheduling action determined in the current training process is also less than the set change amount threshold, the cumulative number is recorded as 2. Assuming that the set number threshold is 5, since the cumulative number determined in the current training process is 2, which does not reach the set number threshold, it is determined that the next training process is still in the early stage of training. Until the cumulative number reaches 5, it is determined that the next training process is in the late stage of training.
[0161] It should be noted that the set number of times threshold shown in this embodiment is only an example, and the specific value of the set number of times threshold is not limited. The value of the set number of times threshold can be set according to actual needs. By setting a set number of times threshold, this embodiment can avoid frequent fluctuations when determining whether the training process is in the early stage of training or the late stage of training, and more stably and accurately determine whether the training process is in the early stage of training or the late stage of training.
[0162] During the training process of the parameters of the value network, the parameters of the policy network, the parameters of the target value network and the parameters of the target policy network, after the target scheduling action output by the target policy network is determined according to random noise and greedy strategy, the parameters of the value network are updated.
[0163] The value network minimizes the loss function L(θ Q ) to optimize the parameters, as shown in the following formula, E(·) is the expected function, and the network parameters of the value network and the policy network are updated according to the gradient formula, As a direction for action improvement, soft update is used to optimize the parameters in the target value network and the target policy network.
[0164] L(θ Q )=E(y t -Q(s t ,a t |θ Q ));
[0165] y t =r t +γQ′(s t+1 ,π′(s t+1 |θ π′ )|θ Q′ );
[0166] Optionally, before parameter training, that is, before determining whether the current training process belongs to the early training stage or the late training stage, the process of building an experience replay pool is also included, that is:
[0167] The energy Internet optimization scheduling model is initialized, and the initialized system state is used as the current system state.
[0168] Input the current system state into the policy network to obtain the current scheduling action corresponding to the current system state.
[0169] According to the reward function, calculate the current reward value corresponding to the current scheduling action.
[0170] Execute the current scheduling action to obtain the system status at the next moment.
[0171] The current system state, current scheduling action, current reward value and system state at next moment are put into the experience replay pool as an experience sample, and the priority of the experience sample is calculated according to the current reward value, the target value function value at next moment and the current value function value. The target value function value at next moment is the target value function value output after the system state at next moment and the target scheduling action at next moment are input into the target value network, and the current value function value is the value function value output after the current system state and the current scheduling action are input into the value network.
[0172] The system state at the next moment is taken as the new current system state, and the step of "inputting the current system state into the strategy network to obtain the current scheduling action corresponding to the current system state" and its subsequent steps are re-executed until a preset number of experience samples are obtained.
[0173] Among them, the traditional DDPG algorithm adopts the experience replay mechanism in the deep Q network. During training, a small batch of experience samples are randomly extracted from the experience replay pool each time, and the network parameters are updated based on the gradient rule. The experience replay mechanism breaks the correlation between data by randomly sampling historical data, and the reuse of experience also increases the efficiency of data use. However, this embodiment finds that it ignores the importance of different experiences, and there are problems such as low training efficiency and over-learning. Therefore, this embodiment combines the experience replay mechanism with priority into the DDPG method. During the training process, the intelligent agent collects experience samples by interacting with the environment, and then samples the importance of the experience samples according to the priority. The greater the priority, the higher the importance of the experience sample, the more experience can be learned from it, and the greater the probability of being selected.
[0174] For example, according to Calculate the priority of each experience sample.
[0175] Among them, p t is the priority of the empirical sample of the system state at time t, δ t is the time difference error, is a small constant, for example, It can be 0.1 to ensure that each experience sample has a probability of being drawn. t is the system state s at time t t and the scheduling action a at time t t The reward value of the reward function, γ is the discount factor, Q′(s t+1 ,π′(s t+1 |θ π′ )|θ Q′ ) is to set the next moment system state s t+1 and the next target scheduling action π′(s t+1 |θ π′ ) is the target value function value at the next moment after inputting the target value network, Q(s t ,a t |θ Q ) is to convert the current system state s t and the current scheduled action a t The current value function value output after entering the value network.
[0176] In this embodiment, an improved DDPG training network is built. In each round of training, the agent is in the current system state s t Next, execute action a according to the scheduling of the policy network t , calculate the reward value r t And observe the new system state s t+1 , and then the priority is calculated as a historical experience sample and stored in the experience replay pool. Then, the agent samples the experience samples in small batches according to the experience replay mechanism with priority, and updates the policy network and value network. Repeat the above steps until the training is completed, the parameters of the DDPG algorithm obtained by training will be fixed, and the target energy Internet optimization scheduling model will be obtained, which is used to solve the optimization scheduling problem of the target energy Internet. Among them, the target scheduling action is selected using a dynamic adjustment strategy based on random noise and greedy strategies, and the priority experience replay mechanism is combined with the DDPG method to shorten the training time and improve the training efficiency.
[0177] In step 104, the target energy internet optimization scheduling model is used to solve the current system state and constraint conditions of the target energy internet to obtain the optimization scheduling solution under the current system state.
[0178] In this embodiment, after the target energy internet optimization scheduling model is trained, the energy internet optimization scheduling test can be performed according to the current system status s t , use the trained DDPG strategy network to select the scheduling action a t , as the optimal scheduling solution under the current system state, and then execute scheduling action a t And enter the next system state, thereby realizing the optimized scheduling of the energy Internet.
[0179] The embodiment of the present invention first establishes a system model of the target energy Internet, and determines the objective function and constraint conditions for optimizing the scheduling of the target energy Internet. Then, based on the system model and the objective function, the energy Internet optimization scheduling model is constructed according to the deep deterministic policy gradient algorithm. Then, the target scheduling action output by the target policy network during the training of the energy Internet optimization scheduling model is determined according to the random noise and greedy strategy, so as to obtain a trained target energy Internet optimization scheduling model based on the target scheduling action. Finally, the target energy Internet optimization scheduling model is used to solve the current system state and constraint conditions of the target energy Internet, and the optimization scheduling scheme under the current system state is obtained. Thus, random noise and greedy strategies are used to select the target scheduling action with the largest reward value for network training in the early stage of training. In the later stage of training, the target scheduling action obtained after noise exploration is relied on to continue training until the network converges. The dynamic adjustment strategy of the target scheduling action greatly shortens the training time, improves the training efficiency, and ensures the optimality of the strategy.
[0180] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0181] The following is an embodiment of the device of the present invention. For details not described in detail therein, reference may be made to the corresponding method embodiment described above.
[0182] Figure 4 The schematic diagram of the structure of the energy internet optimization scheduling device provided by the embodiment of the present invention is shown. For the convenience of explanation, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:
[0183] like Figure 4 As shown, the energy Internet optimization scheduling device includes: a first model building module 41, a second model building module 42, a training module 43 and a scheduling module 44.
[0184] The first model building module 41 is used to establish a system model of the target energy Internet and determine the objective function and constraint conditions for optimizing the scheduling of the target energy Internet;
[0185] A second model building module 42 is used to build an energy Internet optimization scheduling model based on the system model and the objective function according to a deep deterministic policy gradient algorithm;
[0186] The training module 43 is used to determine the target scheduling action output by the target strategy network during the training of the energy internet optimization scheduling model according to the random noise and the greedy strategy, so as to obtain a trained target energy internet optimization scheduling model based on the target scheduling action;
[0187] The scheduling module 44 is used to use the target energy Internet optimization scheduling model to solve the current system state and constraint conditions of the target energy Internet to obtain the optimal scheduling plan under the current system state.
[0188] The embodiment of the present invention first establishes a system model of the target energy Internet, and determines the objective function and constraint conditions for optimizing the scheduling of the target energy Internet. Then, based on the system model and the objective function, the energy Internet optimization scheduling model is constructed according to the deep deterministic policy gradient algorithm. Then, the target scheduling action output by the target policy network during the training of the energy Internet optimization scheduling model is determined according to the random noise and greedy strategy, so as to obtain a trained target energy Internet optimization scheduling model based on the target scheduling action. Finally, the target energy Internet optimization scheduling model is used to solve the current system state and constraint conditions of the target energy Internet, and the optimization scheduling scheme under the current system state is obtained. Thus, random noise and greedy strategies are used to select the target scheduling action with the largest reward value for network training in the early stage of training. In the later stage of training, the target scheduling action obtained after noise exploration is relied on to continue training until the network converges. The dynamic adjustment strategy of the target scheduling action greatly shortens the training time, improves the training efficiency, and ensures the optimality of the strategy.
[0189] In a possible implementation, the energy internet optimization scheduling model includes a reward function; the training module 43 can be used to determine whether the current training process belongs to the early training stage or the late training stage during the training process of the energy internet optimization scheduling model;
[0190] If the current training process belongs to the early stage of training, a set of candidate scheduling actions is randomly generated, and random noise is added to the scheduling actions output by the target policy network to obtain a set of candidate target scheduling actions;
[0191] Select the candidate scheduling actions and target scheduling actions according to the greedy strategy;
[0192] If the greedy strategy selects the target scheduling action to be selected, the target scheduling action to be selected is determined as the target scheduling action output by the target strategy network;
[0193] If the greedy strategy chooses an alternative scheduling action, the reward value corresponding to the alternative scheduling action is calculated based on the reward function, recorded as the first reward value, and the reward value corresponding to the target scheduling action to be selected is calculated based on the reward function, recorded as the second reward value;
[0194] The scheduling action corresponding to the larger reward value of the first reward value and the second reward value is determined as the target scheduling action output by the target policy network.
[0195] In a possible implementation, the training module 43 may also be used to add random noise to the scheduling action output by the target network if the current training process belongs to the late training stage, so as to obtain the target scheduling action output by the target policy network.
[0196] In a possible implementation, the training module 43 may be used to determine whether the current training process is the first training process;
[0197] If the current training process is the first training process, then the current training process is determined to be the early stage of training;
[0198] If the current training process is not the first training process, determine whether the change in the reward value corresponding to the target scheduling action determined in the previous training process is greater than or equal to the set change threshold;
[0199] According to the judgment result, it is determined whether the current training process belongs to the early training stage or the late training stage.
[0200] In a possible implementation, the training module 43 may be used to determine that the current training process is in the early stage of training if the change amount is greater than or equal to a set change amount threshold;
[0201] If the change is less than the set change threshold, the cumulative number of times the change is less than the set change threshold is increased by 1, and it is determined whether the cumulative number reaches the set number threshold;
[0202] If the cumulative number of times does not reach the set number threshold, the current training process is determined to be in the early stage of training;
[0203] If the cumulative number of times reaches the set number threshold, it is determined that the current training process is in the late stage of training.
[0204] In a possible implementation, the random noise is OU noise; and the greedy strategy is an ε-greedy strategy.
[0205] In one possible implementation, the reward function is:
[0206]
[0207] Among them, r t (s t ,a t ) is the system state s at time t t and the scheduling action a at time t t The reward value of the reward function is: β1 is the penalty coefficient for system operation cost, β2 is the penalty coefficient for violation of constraint conditions, β3 is the penalty coefficient for source-load power imbalance, C E is the cost of purchasing energy, C BES is the depreciation cost of charging and discharging of electric energy storage, C HS is the depreciation cost of charging and discharging of thermal energy storage, F tis the constraint violation penalty at time t, α1 is the constraint violation penalty coefficient for the combined heat and power unit, α2 is the constraint violation penalty coefficient for the electric energy storage unit, α3 is the constraint violation penalty coefficient for the electric boiler, α4 is the constraint violation penalty coefficient for the gas boiler, α is the constraint violation penalty function coefficient, p CHP (t) is the electric power output of the cogeneration unit at time t, p CHP is the electric power limit of the combined heat and power unit output, p BES (t) is the charging / discharging power of the energy storage at time t, p BES is the charge / discharge power limit of the energy storage, h EB (t) is the thermal power output of the electric boiler at time t, h EB is the thermal power limit of the electric boiler output, h GB (t) is the thermal power output of the gas boiler at time t, h GB is the thermal power limit of the gas boiler output, U t is the source-load power imbalance penalty at time t, p VAC (t) is the penalty for imbalance between power supply and demand at time t, h VAC (t) is the thermal power supply and demand imbalance penalty at time t.
[0208] In a possible implementation, the energy internet optimization scheduling model further includes a strategy network, a value network and a target value network; the training module 43 can also be used to initialize the energy internet optimization scheduling model and use the initialized system state as the current system state;
[0209] Input the current system state into the policy network to obtain the current scheduling action corresponding to the current system state;
[0210] According to the reward function, calculate the current reward value corresponding to the current scheduling action;
[0211] Execute the current scheduling action to obtain the system status at the next moment;
[0212] The current system state, the current scheduling action, the current reward value and the next moment system state are put into the experience replay pool as an experience sample, and the priority of the experience sample is calculated according to the current reward value, the next moment target value function value and the current value function value, where the next moment target value function value is the target value function value output after the next moment system state and the next moment target scheduling action are input into the target value network, and the current value function value is the value function value output after the current system state and the current scheduling action are input into the value network;
[0213] The system state at the next moment is taken as the new current system state, and the step of "inputting the current system state into the strategy network to obtain the current scheduling action corresponding to the current system state" and its subsequent steps are re-executed until a preset number of experience samples are obtained.
[0214] In a possible implementation, the training module 43 may be used to Calculate the priority of the experience sample;
[0215] Among them, pt is the priority of the empirical sample of the system state at time t, δ t is the time difference error, is a very small constant, r t is the system state s at time t t and the scheduling action a at time t t The reward value of the reward function, γ is the discount factor, Q′(s t+1 ,π′(s t+1 |θ π′ )|θ Q′ ) is to set the next moment system state s t+1 and the next target scheduling action π′(s t+1 |θ π′ ) is the target value function value at the next moment after inputting the target value network, Q(s t ,a t |θ Q ) is to convert the current system state s t and the current scheduled action a t The current value function value output after entering the value network.
[0216] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0217] Those of ordinary skill in the art will appreciate that the templates, units, and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0218] If the module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned various energy Internet optimization scheduling method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal and software distribution medium.
[0219] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. An energy internet optimization scheduling method, characterized in that: include: Establish a system model of the target energy Internet and determine the objective function and constraints for optimizing the scheduling of the target energy Internet; Based on the system model and the objective function, an energy internet optimization scheduling model is constructed according to a deep deterministic policy gradient algorithm; Determine the target scheduling action output by the target strategy network during the training of the energy internet optimization scheduling model according to random noise and greedy strategy, so as to obtain a trained target energy internet optimization scheduling model based on the target scheduling action; The target energy internet optimization scheduling model is used to solve the current system state of the target energy internet and the constraints to obtain an optimization scheduling solution under the current system state.
2. The energy internet optimization scheduling method according to claim 1 is characterized in that: The energy internet optimization scheduling model includes a reward function; The target scheduling action output by the target strategy network during the training of the energy internet optimization scheduling model is determined according to the random noise and greedy strategy, including: During the training process of the energy internet optimization scheduling model, determining whether the current training process belongs to the early training stage or the late training stage; If the current training process belongs to the early stage of training, a set of candidate scheduling actions is randomly generated, and random noise is added to the scheduling actions output by the target policy network to obtain a set of candidate target scheduling actions; Selecting the candidate scheduling action and the target scheduling action to be selected according to a greedy strategy; If the greedy strategy selects the target scheduling action to be selected, the target scheduling action to be selected is determined as the target scheduling action output by the target strategy network; If the greedy strategy selects the candidate scheduling action, the reward value corresponding to the candidate scheduling action is calculated based on the reward function, recorded as the first reward value, and the reward value corresponding to the target scheduling action to be selected is calculated based on the reward function, recorded as the second reward value; The scheduling action corresponding to the larger reward value between the first reward value and the second reward value is determined as the target scheduling action output by the target policy network.
3. The energy internet optimization scheduling method according to claim 2 is characterized in that: After determining whether the current training process belongs to the early training stage or the late training stage, it also includes: If the current training process belongs to the late stage of training, random noise is added to the scheduling action output by the target network to obtain the target scheduling action output by the target policy network.
4. The energy internet optimization scheduling method according to claim 2 is characterized in that: The process of determining whether the current training process belongs to the early training stage or the late training stage includes: Determine whether the current training process is the first training process; If the current training process is the first training process, then the current training process is determined to be the early stage of training; If the current training process is not the first training process, determine whether the change in the reward value corresponding to the target scheduling action determined in the previous training process is greater than or equal to the set change threshold; According to the judgment result, it is determined whether the current training process belongs to the early training stage or the late training stage.
5. The energy internet optimization scheduling method according to claim 4 is characterized in that: The determining, according to the judgment result, whether the current training process belongs to the early training stage or the late training stage comprises: If the change amount is greater than or equal to the set change amount threshold, determining that the current training process is in the early stage of training; If the change amount is less than the set change amount threshold, the cumulative number of times the change amount is less than the set change amount threshold is increased by 1, and it is determined whether the cumulative number reaches the set number threshold; If the cumulative number of times does not reach the set number of times threshold, the current training process is determined to be in the early stage of training; If the accumulated number of times reaches the set number of times threshold, it is determined that the current training process is in the late stage of training.
6. The energy internet optimization scheduling method according to claim 2 is characterized in that: The random noise is OU noise; The greedy strategy is an ε-greedy strategy.
7. The energy internet optimization scheduling method according to claim 2 is characterized in that: The reward function is: Among them, r t (s t ,a t ) is the system state s at time t t and the scheduling action a at time t t The reward value of the reward function is: β1 is the penalty coefficient for system operation cost, β2 is the penalty coefficient for violation of constraint conditions, β3 is the penalty coefficient for source-load power imbalance, C E is the cost of purchasing energy, C BES is the depreciation cost of charging and discharging of electric energy storage, C HS is the depreciation cost of charging and discharging heat storage, Ft is the penalty for violating constraints at time t, α1 is the penalty coefficient for violating constraints of the combined heat and power unit, α2 is the penalty coefficient for violating constraints of the electric energy storage, α3 is the penalty coefficient for violating constraints of the electric boiler, α4 is the penalty coefficient for violating constraints of the gas boiler, α is the penalty function coefficient for violating constraints, p CHP (t) is the electric power output of the cogeneration unit at time t, p CHP is the electric power limit of the combined heat and power unit output, p BES (t) is the charging / discharging power of the energy storage at time t, p BES is the charge / discharge power limit of the energy storage, h EB (t) is the thermal power output of the electric boiler at time t, h EB is the thermal power limit of the electric boiler output, h GB (t) is the thermal power output of the gas boiler at time t, h GB is the thermal power limit of the gas boiler output, U t is the source-load power imbalance penalty at time t, p VAC (t) is the penalty for imbalance between power supply and demand at time t, h VAC (t) is the thermal power supply and demand imbalance penalty at time t.
8. The energy internet optimization scheduling method according to claim 2 is characterized in that: The energy internet optimization scheduling model also includes a strategy network, a value network and a target value network; Before determining whether the current training process belongs to the early training stage or the late training stage, it also includes: Initializing the energy internet optimization scheduling model, and using the initialized system state as the current system state; Inputting the current system state into the policy network to obtain the current scheduling action corresponding to the current system state; According to the reward function, calculate the current reward value corresponding to the current scheduling action; Execute the current scheduling action to obtain the system status at the next moment; The current system state, the current scheduling action, the current reward value and the next moment system state are put into the experience replay pool as an experience sample, and the priority of the experience sample is calculated according to the current reward value, the next moment target value function value and the current value function value, wherein the next moment target value function value is the target value function value output after the next moment system state and the next moment target scheduling action are input into the target value network, and the current value function value is the value function value output after the current system state and the current scheduling action are input into the value network; The system state at the next moment is taken as the new current system state, and the step of "inputting the current system state into the policy network to obtain the current scheduling action corresponding to the current system state" and its subsequent steps are re-executed until a preset number of experience samples are obtained.
9. The energy internet optimization scheduling method according to claim 8 is characterized in that: The step of calculating the priority of the experience sample according to the current reward value, the target value function value at the next moment, and the current value function value includes: according to Calculate the priority of the experience sample; Among them, pt is the priority of the empirical sample of the system state at time t, δt is the time difference error, is a small constant, rt is the reward value of the reward function under the system state st at time t and the scheduling action at time t, γ is the discount factor, Q′(st +1 ,π′(st +1 θ π′ )θ Q′ ) is to set the next system state st +1 and the next target scheduling action π′(st +1 θ π′ ) is input into the target value network and then outputs the target value function value at the next moment, Q(st,atθ Q ) is the current value function value output after the current system state st and the current scheduling action at are input into the value network.
10. An energy internet optimization and scheduling device, characterized in that: include: The first model building module is used to establish a system model of the target energy Internet and determine the objective function and constraint conditions for optimizing the scheduling of the target energy Internet; A second model building module is used to build an energy Internet optimization scheduling model based on the system model and the objective function according to a deep deterministic policy gradient algorithm; A training module, used to determine the target scheduling action output by the target strategy network during the training of the energy internet optimization scheduling model according to random noise and greedy strategy, so as to obtain a trained target energy internet optimization scheduling model based on the target scheduling action; The scheduling module is used to utilize the target energy internet optimization scheduling model to solve under the current system state of the target energy internet and the constraints to obtain an optimized scheduling solution under the current system state.
Citation Information
Cited By
Method and equipment for optimizing steelmaking process in steel industry and storage medium
CN119940656A
Building energy control method and system
CN120972706A
