Microgrid dual-layer dispatching method and system for renewable energy generation and energy storage
By introducing a two-layer scheduling model and deep reinforcement learning algorithm in the microgrid, combining time-sharing electricity price and interrupt compensation strategy, the scheduling strategy of the microgrid is optimized, and the problem of low prediction accuracy of distributed renewable energy in the microgrid is solved, and the problem of low prediction accuracy of distributed renewable energy in the microgrid is improved. Economicality and stability of scheduling.
Patent Information
- Application Number
- CN202210258202.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-16
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2042-03-16
AI Technical Summary
The recent prediction accuracy of distributed renewable energy in the microgrid is low, which leads to a large deviation from the actual optimal result based on the recent prediction data, which affects the economic and stability of the scheduling.
Adopting a microgrid dual-layer scheduling method for new energy power generation and energy storage, by establishing a day-to-day scheduling model and intraday scheduling model, combining time-sharing electricity price strategy and interrupt compensation strategy, the particle swarm algorithm and deep reinforcement learning algorithm are used to optimize the scheduling strategy, and improve the Economicality and stability of scheduling.
It significantly improves the economic and stability of microgrid scheduling. Compared with the traditional single-layer scheduling model, it has higher cost-effectiveness and more accurate scheduling strategies.
Smart Images

Figure CN114723230B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power grid optimization and dispatching, and more specifically, relates to a microgrid double-layer dispatching method and system for renewable energy power generation and energy storage. Background Art
[0002] At present, with the increasing prominence of environmental and energy issues, environmentally friendly distributed renewable energy has been continuously developed. Microgrids combine distributed power sources, flexible loads, energy storage devices and converters into a controllable unit, providing an effective way to utilize renewable energy. However, large-scale access to renewable energy will bring challenges to the operation and scheduling of microgrids. In order to reduce the impact of renewable energy fluctuations, energy storage systems and demand response solutions have been widely used in microgrids.
[0003] The dispatching problem of microgrids is the core of their safe and efficient operation. Due to the different characteristics of dispatchable resources in microgrids and the volatility of renewable energy and loads, the optimal dispatching of microgrids is relatively complex. With the continuous promotion of microgrid technology, how to properly manage the operation of distributed power sources, flexible loads and energy storage systems in microgrids to maximize economic, technical and environmental benefits has become an important research direction. At present, most studies only consider the day-ahead dispatching of microgrids. However, the day-ahead prediction accuracy of the output of distributed renewable energy in microgrids is low, so the dispatching results based on the day-ahead prediction data deviate greatly from the actual optimal results, affecting the economy and stability of the dispatching. Summary of the invention
[0004] In view of the above defects or improvement needs of the prior art, the present invention provides a microgrid double-layer scheduling method and system for renewable energy power generation and energy storage, which aims to improve the economy and stability of microgrid scheduling.
[0005] To achieve the above object, according to one aspect of the present invention, a microgrid dual-layer scheduling method for renewable energy generation and energy storage is provided, comprising:
[0006] Establishing a day-ahead dispatching model, the day-ahead dispatching model introduces a time-of-use electricity price strategy and constructs a first dispatching cost based on the time-of-use electricity price, and taking the lowest first dispatching cost as the day-ahead objective function, the first dispatching cost includes the power supply cost of the power supply equipment and the power purchase cost of the excess load;
[0007] Establishing an intraday dispatching model, the intraday dispatching model introduces an interruption compensation strategy and constructs a second dispatching cost, and takes the lowest second dispatching cost as the intraday objective function, the second dispatching cost includes the power supply cost of each power supply equipment, the power purchase cost of the excess load, and the interruption compensation cost;
[0008] Obtaining conventional forecast information and inputting it into the day-ahead scheduling model, solving the day-ahead objective function, obtaining a preliminary scheduling strategy for each power supply device in each scheduling time period in the next cycle as a day-ahead reference value, and determining the time-of-use electricity price in the corresponding cycle, wherein the conventional forecast information includes the power generation power of renewable energy in each scheduling time period in the next cycle and the conventional load demand for implementing a fixed electricity price;
[0009] Predicting the daily load of each dispatching time period in the corresponding cycle according to the time-of-use electricity price;
[0010] The day-ahead reference value and the intraday forecast load of the current scheduling period are input into the intraday scheduling model, the intraday objective function is solved, and the final scheduling strategy for the adjustable resources in the current scheduling period is output.
[0011] In one embodiment, in the day-ahead dispatch model, the relationship between load and electricity price is constructed as follows:
[0012]
[0013] Among them, L i is the day-ahead forecast load for the i-th period in the day-ahead dispatch, is the conventional load demand in the i-th period in the conventional forecast information, p0 is the conventional electricity price before the implementation of time-of-use electricity price, Δp i is the increment of the time-of-use electricity price in the i-th period compared with the conventional electricity price, ε ii is the impact coefficient of the change in electricity price in the i-th period on the load in the i-th period, ε ij is the impact coefficient of the electricity price change in the i-th period on the load in the j-th period, and m is the number of time-of-use electricity price divisions within the cycle.
[0014] In one embodiment, the microgrid is connected to an upper power grid and includes renewable energy, power supply equipment and loads, wherein the power supply equipment and loads are dispatchable resources, the power purchase cost of excess load in the kth dispatching time period is equal to the time-of-use electricity price in the corresponding time period multiplied by the excess load, and the excess load in the kth dispatching time period is equal to the load that changes with the electricity price in the corresponding time period minus the power generation power of renewable energy and the power generation power of the power supply equipment.
[0015] In one embodiment, in the intraday scheduling model, the calculation formula of the interruption compensation cost is:
[0016] C IDR =μ C ·|ΔP IDR |
[0017] Among them, C IDR is the interruption compensation cost, ΔP IDR is the amount of load that is interrupted during the day's dispatch compared to the day's forecasted load, μC is the set compensation coefficient.
[0018] In one embodiment, in the intraday scheduling model, the second scheduling cost function also includes the adjustment cost of the power supply equipment.
[0019]
[0020] Among them, C Δ is the adjustment cost, n is the number of power supply equipment, P g.ref is the power supply power of the gth power supply equipment in the day-ahead scheduling, P g is the power supply power of the gth power supply equipment in the intraday scheduling, α g The adjusted cost factor is set.
[0021] In one of the embodiments, a particle swarm algorithm is used to solve the objective function of the day-ahead scheduling model.
[0022] In one embodiment, a deep reinforcement learning algorithm is used to solve the objective function of the intraday scheduling model, including:
[0023] Build a deep reinforcement learning network: Build a deep reinforcement learning network based on the Markov decision process {S, A, R}, where S, A, and R represent the state space, action space, and reward function, respectively. The state space S includes the predicted renewable energy power generation, the intraday forecast load, the scheduling time period, the operating status of the microgrid in the previous scheduling period, and the day-ahead reference value of the current scheduling period.
[0024] Obtain training samples: obtain multiple sets of historical conventional forecast information and input them into the day-ahead dispatch model to obtain multiple sets of corresponding day-ahead reference values and intraday forecast loads, and use the power generation of renewable energy in the historical conventional forecast information, and the day-ahead reference values and intraday forecast loads obtained based on the historical conventional forecast information as training samples;
[0025] Training network: using the training samples to strengthen the deep neural network to obtain a network with optimal decision-making ability so as to minimize the second scheduling cost;
[0026] Output result: The predicted power generation of renewable energy in the current scheduling period, the predicted load during the day, and the day-ahead reference value of the current scheduling period are input into the trained deep reinforcement neural network to obtain the final scheduling strategy for adjustable resources in the current scheduling period.
[0027] In one embodiment, obtaining the training sample specifically includes:
[0028] Obtain multiple sets of historical conventional forecast information;
[0029] Calculate the difference between renewable energy generation function and load demand to obtain the power deficit, so as to reduce the historical forecast information from multi-dimensional data to one-dimensional data;
[0030] The K-means clustering method is used to reduce the scene of the sample one-dimensional data to obtain simplified data;
[0031] The training samples are obtained based on the simplified data.
[0032] In one of the embodiments, the period predicted by the day-ahead scheduling model is one day, and the duration of each scheduling time period is 15 minutes.
[0033] According to another aspect of the present invention, a microgrid dual-layer dispatching system for renewable energy generation and energy storage is provided, comprising:
[0034] A day-ahead dispatching unit, configured to generate a day-ahead reference value within the next cycle and a time-of-use electricity price within the corresponding cycle by using a day-ahead dispatching model, wherein the day-ahead reference value includes a preliminary dispatching strategy for each power supply device in each dispatching time period, wherein the day-ahead dispatching model introduces a time-of-use electricity price strategy and takes the lowest first dispatching cost as the day-ahead objective function, wherein the first dispatching cost includes the power supply cost of each power supply device and the power purchase cost of excess load;
[0035] An intraday scheduling unit, used to determine the final scheduling strategy for the adjustable resources in the current scheduling time period by using an intraday scheduling model, wherein the intraday scheduling model introduces an interruption compensation strategy and takes the lowest second scheduling cost as the intraday objective function, wherein the second scheduling cost includes the power supply cost of each power supply device and the interruption compensation cost;
[0036] A conventional prediction unit, used to generate conventional prediction information for each scheduling time period in the next cycle and the intraday forecast load after the implementation of the time-of-use electricity price, wherein the conventional prediction information includes the power generation of renewable energy and the conventional load demand for the implementation of a fixed electricity price;
[0037] A control unit is used to input the conventional forecast information of the next cycle into the day-ahead scheduling model, input the time-of-use electricity price generated by the day-ahead scheduling model into the conventional forecast unit, and input the day-ahead reference value of the current scheduling time period generated by the day-ahead scheduling model and the intraday forecast load of the current scheduling time period generated by the conventional forecast unit into the intraday scheduling model to obtain the final scheduling strategy for the adjustable resources in the current scheduling time period.
[0038] The present invention integrates the time-of-use electricity price strategy and the interruption compensation strategy, proposes a day-ahead scheduling model and an intraday scheduling model, first uses the day-ahead scheduling model to predict the scheduling strategies of all scheduling time periods in the next cycle, and then based on the reference value output by the day-ahead mobilization model, uses the intraday scheduling model to optimize the reference value in each scheduling time period, and outputs the final scheduling strategy. Among them, the day-ahead scheduling model determines the appropriate time-of-use electricity price in the next cycle with the lowest scheduling cost and predicts the scheduling strategy of each power supply equipment as a day-ahead reference. After determining the time-of-use electricity price, a mature prediction system is used to predict the load of each time period under the time-of-use electricity price. In each scheduling time period, the corresponding day-ahead reference and intraday predicted load are input into the intraday scheduling model. The intraday model considers introducing the interruption compensation strategy to calculate the scheduling cost, and determines the final scheduling strategy with the lowest scheduling cost. Experiments have shown that the present invention combines the two-layer scheduling model of day-ahead scheduling and intraday scheduling, and its economy and stability are greatly improved compared with the traditional single-layer scheduling model. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A flowchart of the steps of a microgrid double-layer scheduling method according to an embodiment;
[0040] Figure 2 A schematic diagram of a microgrid system topology structure according to an embodiment;
[0041] Figure 3 A schematic diagram of a microgrid double-layer dispatching framework according to an embodiment;
[0042] Figure 4 A schematic diagram of the basic process of a particle swarm algorithm according to an embodiment;
[0043] Figure 5 A schematic diagram of the performance of a particle swarm algorithm according to an embodiment;
[0044] Figure 6 A day-ahead time-of-use electricity price scheme and load curve of an embodiment;
[0045] Figure 7 A schematic diagram of a Markov process for deep reinforcement learning according to an embodiment;
[0046] Figure 8 A load deficit curve before and after scene reduction in one embodiment;
[0047] Fig. 9 A reward function curve for deep reinforcement learning according to an embodiment;
[0048] Fig.10 A schematic diagram of a micro power source scheduling result according to an embodiment;
[0049] Fig.11 Schematic diagram of energy storage charge state change according to an embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0051] like Figure 1 As shown, in one embodiment, a two-layer scheduling method for a microgrid for renewable energy generation and energy storage includes the following steps:
[0052] Step S100: Establish a day-ahead scheduling model and an intra-day scheduling model.
[0053] First, determine the structure of the microgrid. Figure 2 Taking the microgrid shown in the figure as an example, the example microgrid is connected to the upper power grid. It contains wind turbines, photovoltaic arrays, micro-gas turbines, fuel cells, energy storage systems and loads. The loads include non-adjustable rigid loads and adjustable flexible loads. The configuration parameters of the microgrid are shown in Table 1. Among them, wind turbines and photovoltaic arrays are renewable energy sources. Renewable energy is affected by the environment and cannot be dispatched. Its power generation power needs to be predicted based on environmental factors such as weather forecasts. Micro-gas turbines, fuel cells, and energy storage systems are power supply equipment. Power supply equipment and flexible loads are dispatchable resources and are controlled by the energy dispatch center. When the power supply of renewable energy is insufficient, the power supply equipment needs to be operated to meet the load demand as much as possible. Therefore, considering the predicted power generation power of renewable energy, a dispatching strategy for dispatchable resources is formulated.
[0054] Table 1 Microgrid configuration parameters
[0055] category model quantity Total Power Wind power 10kW 20 200kW Photovoltaic 200W 1250 250kW Micro gas turbine 65kW 5 325kW Fuel Cells 40kW 5 200kW Energy Storage System 25kW 5 500kW·h
[0056] Secondly, a load demand response strategy needs to be set.
[0057] In the dispatching method of the present invention, the flexible load participates in the regulation of the microgrid by means of demand response. Demand response strategies are divided into two types: price-based demand response and incentive-based demand response. Price-based demand response is to encourage consumers to adjust their electricity consumption behavior according to the signal of price changes. Incentive-based demand response is to formulate certain policies, such as load reduction compensation, to encourage load adjustment. That is, the present invention sets two load demand response strategies, namely:
[0058] The time-of-use electricity price strategy aims to encourage customers to shift their electricity consumption from peak to off-peak periods, thereby reducing the difference between peak and valley periods. The time-of-use electricity price is announced one day in advance and updated once a day, and users will actively adjust their electricity consumption according to the electricity price.
[0059] The interruption compensation strategy is to sign an incentive-based interruption load contract with consumers in advance to determine the compensation price, interruption time, etc. The dispatch center will actively interrupt the load according to the dispatch strategy and give users response compensation.
[0060] Based on the above demand response strategies, a day-ahead dispatch model and an intraday dispatch model are established, and the microgrid dispatch process is divided into two layers: day-ahead dispatch and intraday rolling dispatch.
[0061] Among them, the day-ahead dispatch model introduces the time-of-use electricity price strategy and constructs the first dispatch cost based on the time-of-use electricity price. The lowest first dispatch cost is taken as the day-ahead objective function. The first dispatch cost includes the power supply cost of each power supply equipment and the power purchase cost of the excess load.
[0062] Based on the microgrid structure introduced above, the day-ahead objective function is introduced in detail.
[0063] 1) Operating cost of micro gas turbine C MT and the fuel cell operating cost C FC for:
[0064]
[0065]
[0066] Among them, LHV ng is the lower calorific value of natural gas; P MT is the output of the micro-turbine, P FC is the output of the fuel cell; η FC , η MT are the efficiencies of micro-turbine and fuel cell respectively; C ng is the unit purchase cost of natural gas.
[0067] 2) Cost of energy storage system C ESS for:
[0068]
[0069] Among them C init is the investment cost of the energy storage system, P ESS is the output power of the energy storage system, N is the number of available cycles of the energy storage system, E ESS is the rated capacity of the energy storage system.
[0070] 3) The cost of purchasing electricity for excess load C grid for:
[0071] C grid =C′*ΔP′
[0072] Among them, C′ represents the time-of-use electricity price in the current period, and ΔP′ represents the excess load in the current period, which is equal to the scheduled load minus the power supply power of the power supply equipment and the power supply power of renewable energy, that is, the charge that the microgrid itself cannot bear and needs to purchase electricity from the upper-level power grid.
[0073] Among them, in the day-ahead dispatch model, the change of load with electricity price after time-of-use electricity price is usually described by the demand price elasticity coefficient, which represents the sensitivity of electricity consumption to electricity prices in different periods. The load after applying time-of-use electricity price can be expressed as:
[0074]
[0075] Among them, L i is the day-ahead forecast load for the i-th period in the day-ahead dispatch, is the conventional load demand in the i-th period in the conventional forecast information, p0 is the conventional electricity price before the implementation of time-of-use electricity price, Δp i is the increment of the time-of-use electricity price in the i-th period compared with the conventional electricity price, ε ii is the impact coefficient of the change in electricity price in the i-th period on the load in the i-th period, ε ij is the load impact coefficient of the change in electricity price in the i-th period on the j-th period, ε ii and ε ij is a known coefficient, which can be determined based on experience and multiple tests, and m is the number of time periods in the cycle. When the cycle is one day, m=24 can be taken, that is, one day is divided into 24 time-of-use electricity prices. There is a mature calculation method for the association between the time-of-use electricity price and the load that changes accordingly. In other embodiments, other methods can also be used to calculate the law of load changes with electricity prices, which is not limited here.
[0076] In the day-ahead scheduling model, the excess charge in the i-th period is equal to L i Subtract the power supplied by the power supply equipment and renewable energy in the current period.
[0077] Based on the costs of each part listed in the previous step, the optimization goal of the day-ahead scheduling model can be established. The objective function of the day-ahead scheduling is:
[0078] min F DA =C MT +C FC +C ESS +C grid
[0079] The objective function is related to the setting of time-of-use electricity prices and the scheduling of power supply equipment and the parameter determination.
[0080] For the construction of the intraday dispatch model, an interruption compensation strategy is introduced, that is, the intraday dispatch takes the initiative to interrupt the load to improve the economic efficiency of power supply. Therefore, the intraday dispatch model introduces the interruption compensation strategy and constructs the second dispatch cost function. The second dispatch cost is taken as the lowest intraday objective function. The second dispatch cost includes the power supply cost of each power supply equipment, the power purchase cost of the excess load, and the interruption compensation cost. That is, the intraday dispatch cost also includes the interruption compensation cost C IDR .
[0081] Cost of interrupting load C IDR for:
[0082] C IDR =μ C ·|ΔP IDR |
[0083] Among them, C IDR is the interruption compensation cost, ΔP IDR is the amount of load that is interrupted when the daily dispatch load is lower than the daily forecast load, μ C is the set compensation coefficient.
[0084] In one embodiment, the intraday dispatching cost also includes the adjustment cost of the power supply equipment. In order to maintain long-term economic efficiency, the intraday dispatching adds the adjustment cost C on the basis of economic and environmental costs. Δ The adjustment cost reflects the difference in the dispatch results of the energy storage system, micro-turbines and fuel cells in the two dispatch models, which can be expressed as:
[0085] C Δ =C ΔSOC +C ΔMT +C ΔFC
[0086] Among them, C ΔSOC , C ΔMT , C ΔFC is the adjustment cost of the energy storage system, micro-turbine and fuel cell, among which,
[0087] C ΔSOC =α SOC (P SOC -P SOC.ref ) 2
[0088] C ΔMT =α MT (P MT -P MT.ref ) 2
[0089] CΔFC =α FC (P FC -P FC.ref ) 2
[0090] Among them, α SOC , α MT , α FC are the adjustment cost coefficients of the energy storage system, micro-turbine and fuel cell, which are also determined in advance through multiple tests; P SOC , P MT , P FC is the intraday dispatch load determined by the intraday dispatch model; P SOC.ref , P MT.ref , P FC.ref They are respectively the day-ahead forecast loads calculated based on time-of-use electricity prices in the day-ahead dispatch model.
[0091] Therefore, the objective function of intraday scheduling is:
[0092] min F ID =C MT +C FC +C ESS +C grid +C IDR +C Δ
[0093] The objective function takes the scheduling of adjustable resources such as the operation of power supply equipment and load interruption as the parameters to be determined.
[0094] Through the above analysis, the construction of the day-ahead scheduling model and the intraday scheduling model is completed.
[0095] Next, we will use the built model to obtain the scheduling strategy, which may include:
[0096] Step S200: Obtain conventional forecast information and input it into the day-ahead scheduling model, solve the day-ahead objective function, obtain the preliminary scheduling strategy for each power supply device in each scheduling time period in the next cycle as a day-ahead reference value, and determine the time-of-use electricity price in the corresponding cycle.
[0097] Among them, conventional forecast information can be output through the microgrid data forecasting system. The forecasting system can predict the power supply of renewable energy in the microgrid and the approximate demand of users for load according to weather and other conditions. It is relatively mature and will not be described in detail here. In this application, the conventional forecast information input into the day-ahead scheduling model includes the power generation of renewable energy in each scheduling time period in the next cycle and the conventional load demand for implementing a fixed electricity price.
[0098] Taking a cycle of 24 hours and a scheduling period of 15 minutes as an example, the microgrid scheduling process is divided into two layers: day-ahead scheduling and intraday rolling scheduling:
[0099] 1) Day-ahead dispatch: It is carried out once every 24 hours with a resolution of 15 minutes. 24 hours are divided into 96 dispatching time periods. The day-ahead dispatching model predicts the dispatching of each dispatching time period in the next 24 hours. The conventional forecast information input into the day-ahead dispatching model is the power generation of renewable energy in each dispatching time period in the next 24 hours and the conventional load demand for the implementation of a fixed electricity price. Among them, the conventional load demand is mainly used to estimate the day-ahead forecast load after the time-of-use electricity price. Then, the dispatching and power purchase demand of the microgrid power supply equipment are calculated based on the day-ahead forecast load and the estimated value of renewable energy power generation, and the day-ahead objective function min F is solved with the lowest comprehensive cost. DA , get the preliminary dispatching strategy for each power supply equipment in each dispatching time period in the next 24 hours (for example, which power supply equipment is running and how much is the running power), and determine the time-of-use electricity price in the next 24 hours. Among them, the preliminary dispatching strategy for each power supply equipment is used as the day-ahead reference value, which will be input into the intraday model for optimization later, and the time-of-use electricity price is used as the determined plan, and the time-of-use electricity price determined by the day-ahead dispatching model will be actually implemented in the next 24 hours.
[0100] 2) Intraday scheduling: It is carried out every 15 minutes with a resolution of 15 minutes. This layer obtains the scheduling instructions for interrupted loads and various power supply equipment based on the day-ahead reference. The specific process is described in detail later.
[0101] In one embodiment, the objective function within a day is solved to determine the time-of-use electricity price and the dispatching strategy of each power supply device. Since there are many optimization variables in the day-ahead dispatching, 96 points in 24 hours need to be optimized at a time, so the particle swarm optimization algorithm with simple operation and fast convergence speed is selected.
[0102] Particle swarm algorithm is an adaptive optimization method that simulates the process of bird flocks searching for food. The algorithm is suitable for solving nonlinear problems such as microgrid scheduling. The basic process of particle swarm algorithm is as follows: Figure 4 As shown in the figure, the particle swarm is initialized first, the objective function of each particle is calculated according to the day-ahead target, the group optimal and individual optimal are found and the optimal scheduling scheme is updated, and the speed and position of the particle are updated repeatedly until the convergence condition is met and the day-ahead scheduling scheme is output.
[0103] More specifically, a particle swarm algorithm program can be written in Matlab to obtain the optimal solution for day-ahead scheduling in a typical scenario. Figure 5 As shown in the figure. During the iteration process, the objective function gradually decreases and remains stable after 200 iterations, indicating that the algorithm has reached convergence. The obtained day-ahead time-of-use electricity price scheme and load curve are shown in the figure. Figure 6 As shown in the figure, it can be seen that after setting the time-of-use electricity price based on price-based demand response, the peak-to-valley difference of the load is reduced, that is, the load under the time-of-use electricity price fluctuates less than the load under the fixed electricity price. In addition to the time-of-use electricity price, other optimization variables will be used as input values of the intraday scheduling model to provide guidance for intraday scheduling, which can shorten the network training time and improve the robustness of scheduling.
[0104] Step S300: predicting the daily load for each scheduling time period in the corresponding cycle according to the time-of-use electricity price.
[0105] In this application, the time-of-use electricity price determined by the day-ahead dispatch model is used as the actual time-of-use electricity price scheme. Therefore, the microgrid data prediction system can be used to predict the intraday load of each dispatching time period under the time-of-use electricity price. The prediction system is relatively mature and its prediction results are relatively reliable. The intraday predicted load obtained in this step is mainly used for the calculation of compensation cost in the intraday dispatch model.
[0106] Step S400: input the day-ahead reference value and the intraday forecast load of the current scheduling period into the intraday scheduling model, solve the intraday objective function, and output the final scheduling strategy for the adjustable resources in the current scheduling period.
[0107] The day-ahead scheduling in the previous article is to obtain the reference value of 96 scheduling periods in the next 24 hours at one time, while the intraday scheduling in this step is to determine the scheduling strategy for one scheduling period at a time. By optimizing the day-ahead reference value of the current scheduling period, the final scheduling strategy for the current scheduling period is obtained, that is, which power supply equipment to operate and which flexible loads to interrupt, so as to minimize the comprehensive cost and improve the economy of the microgrid while ensuring the stability of the microgrid.
[0108] In one embodiment, considering the high frequency of intraday scheduling and the short time of scheduling calculation, the calculation speed is required to be fast enough for instantaneous control, and it should also be able to adapt to environmental fluctuations. Therefore, a deep reinforcement learning algorithm that can call the network instantly after training is selected. Of course, the present application is not limited to this solution. When constructing the objective function and determining the constraints, other methods can also be used for solving. It should be noted that for the solution of intraday scheduling and day-ahead scheduling, appropriate constraints can be set as needed, such as power balance constraints, rated power constraints, climbing constraints, tie line constraints, and energy storage charge state constraints. These constraints are conventional constraints in microgrid scheduling and will not be introduced in detail here.
[0109] The deep reinforcement learning algorithm is a data-driven intelligent algorithm that has both the perception ability of deep learning and the decision-making ability of reinforcement learning. It is suitable for dynamic decision-making problems that are difficult to accurately model. In addition, due to the fast forward propagation speed of neural networks, deep reinforcement learning can achieve excellent performance in instant decision-making. Reinforcement learning is a learning mechanism in which an intelligent agent continuously interacts with the environment, usually represented by a Markov decision process. In the present invention, the intelligent agent is a microgrid dispatching center, and the environment is a microgrid, such as Figure 7 As shown in the figure. When the agent observes the state of the environment, its internal policy network will select actions for it and update the environment. After that, the environment will return a reward value, and the agent will update its own strategy based on the reward. By continuously looping the above process, the optimal strategy to achieve the goal can be finally obtained.
[0110] In this embodiment, a deep reinforcement learning algorithm of Markov decision is specifically used for solving. Before solving, the network needs to be trained. Therefore, using the deep reinforcement learning algorithm to solve the objective function of the intraday scheduling model includes the following sub-steps:
[0111] Step S410: Build a deep reinforcement learning network based on the Markov decision process {S, A, R}.
[0112] Among them, S, A, and R represent the state space, action space, and reward function, respectively.
[0113] 1) State space S:
[0114] The state space refers to the observations and required data of the dispatch center. Factors that affect the dispatch should be considered as much as possible, including the predicted renewable energy generation power of the current dispatch period, the intraday forecast load, the dispatch time period, the operating status of the microgrid in the previous dispatch period, and the day-ahead reference value of the current dispatch period. Among them, the time span of the forecast data can be appropriately increased, for example, it can include the intraday forecast values of renewable energy generation and load for the next 4 hours.
[0115] 2) Action space A:
[0116] The action space is the decision variable of the model. After observing the state of the environment, the agent selects an action in the action space according to its own strategy. The action space of the microgrid consists of the output power of each device and the load participating in the incentive-based demand response.
[0117] 3) Reward function R:
[0118] The goal of deep reinforcement learning is to maximize the reward function, so it can be defined as the negative value of the total cost. On this basis, a penalty function is added to impose constraints, and the reward function can be expressed as:
[0119] r(t)=-(F ID +D p )
[0120] Where D p is the penalty function of the tie line power constraint.
[0121] Step S420: Acquire multiple sets of historical conventional forecast information and input them into the day-ahead scheduling model to obtain multiple sets of corresponding day-ahead reference values and intra-day forecast loads, and use the power generation power of renewable energy in the historical conventional forecast information, as well as the day-ahead reference values and intra-day forecast loads obtained based on the historical conventional forecast information as training samples.
[0122] This step is mainly to collect training samples. It can be understood that the training samples are based on historical data.
[0123] Microgrids containing renewable energy are usually equipped with data prediction systems to predict the fluctuating wind power, photovoltaic, and load data in the microgrid. The shorter the prediction time scale, the higher the prediction accuracy, but the time to implement dispatch control is also shorter. In this embodiment, historical forecast data of different time scales can be obtained, for example, forecast data for the next 4 hours (updated every 15 minutes) and forecast data for the next 24 hours (updated daily). Optimizing the microgrid model using forecast data of different time scales can reduce the impact of forecast errors on dispatch and further improve the global dispatch economy. All historical forecast data within one year are put into the data set for optimization of the dispatch model in subsequent steps.
[0124] In one embodiment, after obtaining one year of historical forecast data, the amount of data is large. In order to improve the efficiency of scheduling model training, the data set can be simplified. First, the load deficit is obtained by subtracting the total power of renewable energy generation from the load, that is, reducing the three-dimensional data to one-dimensional data. Then, the K-means clustering method is used to reduce the load deficit scenario. The K-means clustering method is a common scenario reduction method, which uses the average value of the samples in each cluster as the cluster center. For a given sample set, the sample set is divided into K clusters according to the distance between the samples, and the center of each cluster is obtained according to the mean value of all the samples therein. The clustering goal is to minimize the cluster sum of squares of the points in the cluster. For a given data set X containing n samples and the total number of categories K, the goal of K-means clustering can be expressed as:
[0125]
[0126] Where J is the Euclidean distance between two vectors, x i is the i-th given sample, u k is the cluster center of the kth class.
[0127] K-means clustering is an iterative process. The algorithm is divided into four steps:
[0128] 1) Select K samples in the data set as the initial centers, each sample represents a cluster center;
[0129] 2) Calculate the Euclidean distance of each sample cluster center and divide them into the class corresponding to the cluster center with the smallest Euclidean distance;
[0130] 3) Take the mean of all samples in each category as the new cluster center and calculate the value of the objective function;
[0131] 4) According to 2), determine whether the category of the sample has changed. If it remains unchanged, output the result; if it changes, reclassify the category.
[0132] Take three cluster centers as an example to solve the problem. Figure 8 The load shortage scenarios before and after scenario reduction. The three load shortage curves obtained by the K-means method are the scenarios after reduction. Using the simplified data set for scheduling calculation can greatly improve the calculation efficiency.
[0133] After reducing the scenarios of one year's historical data, the day-ahead scheduling model mentioned above is input to obtain the day-ahead reference value and time-of-use electricity price corresponding to the historical data, and the intraday load is predicted based on the time-of-use electricity price to obtain the intraday forecast load. The power generation of renewable energy in the historical conventional forecast information, as well as the day-ahead reference value and intraday forecast load obtained based on the historical conventional forecast information are used as training samples.
[0134] Step S430: Use the training samples to deeply strengthen the neural network to obtain a network with optimal decision-making ability to minimize the second scheduling cost.
[0135] The offline training process of the reinforcement learning model for microgrid intraday dispatch control is shown in Table 2.
[0136] Table 2 Microgrid intraday dispatch model training process
[0137]
[0138] In one embodiment, based on Python language and tensorflow framework, the three sets of intraday forecast data after scenario reduction are sequentially input into the deep reinforcement learning network for training. The curve of the reward function changing with the number of iterations is as follows: Fig. 9 As shown in the figure, it can be seen that during the training process, environmental exploration and random actions will cause small oscillations, but the performance of the model becomes better and better, and finally reaches a more stable state.
[0139] In the above embodiment, the reduced typical historical scenes are used as training sets to train the deep reinforcement learning network, and the algorithm can explore different environmental states to adapt to fluctuations within a certain range. Although the actual environmental data is different from the training set, the algorithm can directly perceive the state of the microgrid and make accurate decisions. In addition, as the predicted data in the microgrid database is continuously updated, the deep reinforcement learning network will also regularly sample data and update the internal network. This means that even if the microgrid is upgraded and renovated, resulting in major environmental changes, the algorithm can adapt to this change and make reasonable decisions.
[0140] Step S440: Input the predicted power generation of renewable energy in the current scheduling period, the predicted load during the day, and the day-ahead reference value of the current scheduling period into the trained deep reinforcement neural network to obtain the final scheduling strategy for the adjustable resources in the current scheduling period.
[0141] Update prediction data of different time scales in real time, apply trained models online and obtain dispatch instructions to control the operation of each micro power source, energy storage, and flexible load in the microgrid.
[0142] Based on the steps in the previous article, the real-time updated prediction data can be extracted from the microgrid data prediction system and input into the established model to directly obtain the control instructions for online scheduling. The model was tested using a typical scenario, and the time to obtain the results through the reinforcement learning network was within 2ms each time. The scheduling results of each micro-power source are shown in the figure below. Fig.10 As shown, the energy storage charge state Fig.11 As shown in the figure. Observing the scheduling results, we can see that the fuel cell with lower cost remains on, while the micro-turbine with higher cost is only turned on during the peak load period. In addition, the microgrid purchases electricity during off-peak hours and sells electricity during peak hours to achieve economic scheduling. The energy storage system is continuously charged during the low load period and is basically in a discharging state during the peak load period of 8:00-16:00.
[0143] In order to illustrate the effectiveness of the proposed scheduling method, different methods are used to control the microgrid for 10 consecutive days, and the scheduling costs are shown in Table 3. It can be seen from Table 3 that the cost of two-layer scheduling is about 21% lower than that of single-layer scheduling. This is because the day-ahead prediction error requires expensive automatic power generation control units to participate in power regulation. By comparing the third and fourth columns, it can be seen that using deep reinforcement learning algorithms in two-layer scheduling is more economical than using traditional mathematical solvers. Because deep reinforcement learning algorithms do not rely on specific models, they improve their adaptability to uncertainty. In addition, in terms of computing time, the time required to calculate each point using traditional methods ranges from seconds to minutes. Although the deep reinforcement learning algorithm requires a certain amount of time to train the network offline, when it is in online scheduling, the trained network can be directly called to obtain scheduling instructions, and the time required is at the millisecond level.
[0144] Table 3 Microgrid dispatching costs under different dispatching models
[0145]
[0146]
[0147] Accordingly, the present application also relates to a microgrid two-layer dispatching system for renewable energy power generation and energy storage, which is used to implement the above dispatching method. Specifically, the dispatching system includes:
[0148] The day-ahead dispatching unit is used to generate the day-ahead reference value in the next cycle and the time-of-use electricity price in the corresponding cycle by using the day-ahead dispatching model. The day-ahead reference value includes the preliminary dispatching strategy for each power supply device in each dispatching time period. The day-ahead dispatching model introduces the time-of-use electricity price strategy and takes the lowest first dispatching cost as the day-ahead objective function. The first dispatching cost includes the power supply cost of each power supply device and the power purchase cost of the excess load.
[0149] An intraday scheduling unit, used to determine the final scheduling strategy for adjustable resources in the current scheduling period by using an intraday scheduling model, wherein the intraday scheduling model introduces an interruption compensation strategy and takes the lowest second scheduling cost as the intraday objective function, and the second scheduling cost includes the power supply cost of each power supply device and the interruption compensation cost;
[0150] A conventional forecasting unit is used to generate conventional forecasting information for each scheduling period in the next cycle and the intraday forecast load after the implementation of the time-of-use electricity price. The conventional forecasting information includes the power generation of renewable energy and the conventional load demand for the implementation of a fixed electricity price;
[0151] A control unit is used to input the conventional forecast information of the next cycle into the day-ahead dispatching model, input the time-of-use electricity price generated by the day-ahead dispatching model into the conventional forecasting unit, and input the day-ahead reference value of the current dispatching time period generated by the day-ahead dispatching model and the intraday forecast load of the current dispatching time period generated by the conventional forecasting unit into the intraday dispatching model to obtain the final dispatching strategy for the adjustable resources in the current dispatching time period.
[0152] It can be understood that the scheduling system is used to execute the above scheduling method. Its specific functional details refer to the introduction of the above scheduling method and will not be repeated here.
[0153] In summary, the microgrid two-layer scheduling method for renewable energy power generation and energy storage systems provided by the present invention first creates a two-layer scheduling model for the microgrid, which takes the minimum scheduling cost as the day-ahead optimization target, the sum of the scheduling cost and the adjustment cost as the intraday optimization target, and the control instructions of each micro power source, energy storage, and flexible load as the optimization variable; collects historical prediction data of renewable energy and load in the microgrid, and uses the scenario reduction method to obtain the typical operation scenario of the microgrid; based on the two-layer scheduling model and the reduced scenario data, makes full use of the prediction data of different time scales, and adopts the particle swarm algorithm and deep reinforcement learning algorithm to realize two-stage optimization; applies the trained model online and obtains the scheduling instructions, which can improve the economy and stability of the scheduling.
[0154] It will be easily understood by those skilled in the art that the above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A two-layer dispatching method for microgrids for renewable energy generation and energy storage, characterized in that: include: Establishing a day-ahead dispatching model, the day-ahead dispatching model introduces a time-of-use electricity price strategy and constructs a first dispatching cost based on the time-of-use electricity price, and taking the lowest first dispatching cost as the day-ahead objective function, the first dispatching cost includes the power supply cost of the power supply equipment and the power purchase cost of the excess load; Establishing an intraday dispatching model, the intraday dispatching model introduces an interruption compensation strategy and constructs a second dispatching cost, and takes the lowest second dispatching cost as the intraday objective function, the second dispatching cost includes the power supply cost of each power supply equipment, the power purchase cost of excess load and the interruption compensation cost; Obtaining conventional forecast information and inputting it into the day-ahead scheduling model, solving the day-ahead objective function, obtaining a preliminary scheduling strategy for each power supply device in each scheduling time period in the next cycle as a day-ahead reference value, and determining the time-of-use electricity price in the corresponding cycle, wherein the conventional forecast information includes the power generation power of renewable energy in each scheduling time period in the next cycle and the conventional load demand for implementing a fixed electricity price; Predicting the daily load of each dispatching time period in the corresponding cycle according to the time-of-use electricity price; The day-ahead reference value and the intraday forecast load of the current scheduling period are input into the intraday scheduling model, the intraday objective function is solved, and the final scheduling strategy for the adjustable resources in the current scheduling period is output.
2. The microgrid double-layer dispatching method according to claim 1, characterized in that: In the day-ahead dispatch model, the relationship between load and electricity price is constructed as follows: Among them, L i is the day-ahead forecast load for the i-th period in the day-ahead dispatch, is the conventional load demand in the i-th period in the conventional forecast information, p0 is the conventional electricity price before the implementation of time-of-use electricity price, Δp i is the increment of the time-of-use electricity price in the i-th period compared with the conventional electricity price, ε ii is the impact coefficient of the change in electricity price in the i-th period on the load in the i-th period, ε ij is the impact coefficient of the electricity price change in the i-th period on the load in the j-th period, and m is the number of time-of-use electricity price division periods within the cycle.
3. The microgrid double-layer dispatching method according to claim 1, characterized in that: The microgrid is connected to the upper power grid and includes renewable energy, power supply equipment and loads, among which the power supply equipment and loads are dispatchable resources. The power purchase cost of the excess load in the kth dispatching time period is equal to the time-of-use electricity price in the corresponding time period multiplied by the excess load. The excess load in the kth dispatching time period is equal to the load that changes with the electricity price in the corresponding time period minus the power generation power of renewable energy and the power generation power of the power supply equipment.
4. The microgrid double-layer dispatching method according to claim 1, characterized in that: In the intraday scheduling model, the calculation formula for the interruption compensation cost is: C IDR =μ C ·|ΔP IDR | Among them, C IDR is the interruption compensation cost, ΔP IDR is the amount of load that is interrupted during the day's dispatch compared to the day's forecasted load, μ C is the set compensation coefficient.
5. The microgrid double-layer dispatching method according to claim 1, characterized in that: In the intraday dispatch model, the second dispatch cost function also includes the adjustment cost of the power supply equipment Among them, C Δ is the adjustment cost, n is the number of power supply equipment, P g.ref is the power supply power of the g-th power supply equipment obtained by scheduling on the previous day, P g is the power supply power of the gth power supply equipment in the intraday scheduling, α g The adjusted cost factor is set.
6. The microgrid double-layer dispatching method according to claim 1, characterized in that: The particle swarm algorithm is used to solve the objective function of the day-ahead scheduling model.
7. The microgrid double-layer dispatching method according to claim 1, characterized in that: The deep reinforcement learning algorithm is used to solve the objective function of the intraday scheduling model, including: Build a deep reinforcement learning network: Build a deep reinforcement learning network based on the Markov decision process {S, A, R}, where S, A, and R represent the state space, action space, and reward function, respectively. The state space S includes the predicted renewable energy power generation, the intraday forecast load, the scheduling time period, the operating status of the microgrid in the previous scheduling period, and the day-ahead reference value of the current scheduling period; Obtain training samples: obtain multiple sets of historical conventional forecast information and input them into the day-ahead dispatch model to obtain multiple sets of corresponding day-ahead reference values and intraday forecast loads, and use the power generation of renewable energy in the historical conventional forecast information, and the day-ahead reference values and intraday forecast loads obtained based on the historical conventional forecast information as training samples; Training network: using the training samples to train the deep reinforcement learning network to obtain a network with optimal decision-making ability, so as to minimize the second scheduling cost; Output results: The predicted power generation of renewable energy in the current scheduling period, the intraday forecast load and the day-ahead reference value of the current scheduling period are input into the trained deep reinforcement learning network to obtain the final scheduling strategy for adjustable resources in the current scheduling period.
8. The microgrid double-layer dispatching method according to claim 7, characterized in that: Obtaining training samples specifically includes: Obtain multiple sets of historical conventional forecast information; Calculate the difference between renewable energy generation function and load demand to obtain the power deficit, so as to reduce the historical forecast information from multi-dimensional data to one-dimensional data; The K-means clustering method is used to reduce the scene of the sample one-dimensional data to obtain simplified data; The training samples are obtained based on the simplified data.
9. The microgrid double-layer dispatching method according to any one of claims 1 to 8, characterized in that: The prediction period of the day-ahead scheduling model is one day, and the duration of each scheduling time period is 15 minutes.
10. A microgrid dual-layer dispatching system for renewable energy generation and energy storage, characterized in that: include: A day-ahead dispatching unit, configured to generate a day-ahead reference value within the next cycle and a time-of-use electricity price within the corresponding cycle by using a day-ahead dispatching model, wherein the day-ahead reference value includes a preliminary dispatching strategy for each power supply device in each dispatching time period, wherein the day-ahead dispatching model introduces a time-of-use electricity price strategy and takes the lowest first dispatching cost as the day-ahead objective function, wherein the first dispatching cost includes the power supply cost of each power supply device and the power purchase cost of excess load; An intraday scheduling unit, used to determine the final scheduling strategy for the adjustable resources in the current scheduling time period by using an intraday scheduling model, wherein the intraday scheduling model introduces an interruption compensation strategy and takes the lowest second scheduling cost as the intraday objective function, wherein the second scheduling cost includes the power supply cost of each power supply device and the interruption compensation cost; A conventional prediction unit, used to generate conventional prediction information for each scheduling time period in the next cycle and the intraday forecast load after the implementation of the time-of-use electricity price, wherein the conventional prediction information includes the power generation of renewable energy and the conventional load demand for the implementation of a fixed electricity price; A control unit is used to input the conventional forecast information of the next cycle into the day-ahead scheduling model, input the time-of-use electricity price generated by the day-ahead scheduling model into the conventional forecast unit, and input the day-ahead reference value of the current scheduling time period generated by the day-ahead scheduling model and the intraday forecast load of the current scheduling time period generated by the conventional forecast unit into the intraday scheduling model to obtain the final scheduling strategy for the adjustable resources in the current scheduling time period.
