Microgrid energy management method and system
By using deep reinforcement learning networks and day-ahead scheduling optimization models, the problems of source-load imbalance and real-time decision-making in microgrid energy management systems are solved. This improves the friendliness of microgrids to the public grid and optimizes energy storage backup capacity, reduces operating costs, and meets real-time scheduling requirements.
Patent Information
- Application Number
- CN202610472499.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-10
- Publication Date
- 2026-08-25
AI Technical Summary
Existing microgrid or virtual power plant energy management systems suffer from a lack of grid-friendly mechanisms, rudimentary configuration of operating reserve capacity, and difficulty in meeting the needs of high-frequency rolling real-time decision-making during the day when a high proportion of renewable energy is integrated. This leads to internal source-load power imbalance and increased operating costs.
By employing a deep reinforcement learning network combined with a day-ahead scheduling optimization model, a prediction algorithm is used to generate the net load prediction range and prediction deviation, thereby determining the required operating reserve capacity of the energy storage system. Real-time scheduling control commands are then generated based on the deep reinforcement learning network to achieve optimized energy scheduling of the microgrid and meet tie-line power point tracking requirements.
It effectively reduces the overall operating cost of microgrids, improves the compatibility between microgrids and the public power grid, optimizes the utilization efficiency of energy storage backup capacity, enables rapid generation and response of control commands, and adapts to the technical requirements of virtual power plants participating in frequency regulation and real-time spot markets.
Smart Images

Figure CN122639293A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power system technology, and in particular to a microgrid energy management method and system. Background Technology
[0002] With the advancement of dual-carbon goals, the penetration rate of distributed renewable energy sources such as wind and solar power in power distribution networks is continuously increasing. Due to the strong randomness and intermittency of wind and solar power output, microgrids with a high proportion of renewable energy often face the severe challenge of internal source-load power imbalance when operating in grid-connected mode.
[0003] Existing microgrid or virtual power plant energy management systems suffer from several drawbacks in actual operation, including a lack of grid-friendly mechanisms, rudimentary configuration of operating reserve capacity, and difficulty in meeting the real-time decision-making requirements of high-frequency rolling within the day using traditional algorithms. Summary of the Invention
[0004] In view of this, this application provides a microgrid energy management method and system to achieve reasonable allocation of energy storage reserve capacity, linkage optimization of day-ahead and intraday scheduling, and realize real-time intraday scheduling decision through deep reinforcement learning. Under the premise of ensuring the safety of microgrid operation and meeting tie-line power tracking requirements, it effectively reduces the overall operating cost of microgrid and improves the real-time performance and feasibility of the solution.
[0005] In a first aspect, this application provides a microgrid energy management method, comprising: Acquire microgrid operating data; Based on the operational data, a prediction algorithm is used to generate the net load prediction range and corresponding prediction deviation for the target scheduling period. Based on the net load prediction range, the prediction deviation, and the charging and discharging capacity constraints of the energy storage system, the required operating reserve capacity of the energy storage system is determined. Using a day-ahead scheduling optimization model, with the goal of minimizing the overall operating cost of the microgrid and the operating reserve capacity as a constraint, the day-ahead tie-line power plan is obtained. Using an intraday rolling optimization decision model, a real-time scheduling control command is generated based on a deep reinforcement learning network, enabling the actual tie-line power to track the day-ahead tie-line power plan. The real-time scheduling and control commands are sent to the distributed power source, the energy storage system, and the flexible load to complete the optimized scheduling of microgrid energy.
[0006] Optionally, the intraday rolling optimization decision model is an intraday rolling optimization decision model constructed through a Markov decision process. The generation of real-time scheduling and control instructions based on a deep reinforcement learning network using the intraday rolling optimization decision model includes: Real-time acquisition of multi-dimensional operating parameters of microgrid; construction of state space of intraday rolling optimization decision model based on the multi-dimensional operating parameters; generation of state vector; the state vector is used to characterize the operating state of microgrid. The types of scheduling operations that can be executed by the deep reinforcement learning network are determined, the action space of the intraday rolling optimization decision model is constructed based on the types of scheduling operations, and an action vector matching the state vector is generated. Based on the mapping relationship between the state vector and the action vector, the state transition rules of the intraday rolling optimization decision model are determined. The state transition rules are used to clarify the evolution logic of the microgrid operating state corresponding to the state vector after the action vector is executed. Based on the state vector, action vector, and state transition rules, a reward function for the intraday rolling optimization decision model is constructed. The reward function is used to quantify the microgrid operating cost and constraint compliance, and guide the deep reinforcement learning algorithm to optimize towards minimizing operating cost and ensuring constraint compliance. Based on a deep reinforcement learning network, and guided by the optimization of the reward function of the intraday rolling optimization decision model, real-time scheduling and control instructions are generated with the goal of maximizing the cumulative expected reward.
[0007] Optionally, the real-time acquisition of multi-dimensional operating parameters of the microgrid, the construction of the state space of the intraday rolling optimization decision model based on the multi-dimensional operating parameters, and the generation of state vectors include: Real-time acquisition of multi-dimensional operating parameters of the microgrid, including at least one of the following: net load forecast value, net load forecast interval boundary, real-time electricity price, expected power ratio corresponding to the expected power curve, real-time state of charge of energy storage system, historical cumulative interactive power of tie lines, day-ahead tie line power planning reference value, and available response capacity of flexible load. Based on the multi-dimensional operating parameters, the state space of the intraday rolling optimization decision model is constructed, and a state vector for deep reinforcement learning decision-making is generated.
[0008] Optionally, determining the types of scheduling operations that the deep reinforcement learning network can execute, constructing the action space of the intraday rolling optimization decision model based on the scheduling operation types, and generating action vectors that match the state vectors includes: The types of scheduling operations that can be performed by the deep reinforcement learning network are determined, including energy storage system charging and discharging power regulation and flexible load response power regulation; Based on the scheduling operation type, an action space for an intraday rolling optimization decision model is constructed, and an action vector matching the state vector is generated. The action vector includes the charging and discharging power parameters of the energy storage system. Based on the power reserve boundary in the operational reserve capacity, the action space is constrained and truncated so that the charging and discharging power parameters of the energy storage system in the action vector are limited to the range after deducting the corresponding power reserve from the maximum charging and discharging power.
[0009] Optionally, the reward function for constructing the intraday rolling optimization decision model includes: Obtain the daily operating cost corresponding to a single-step scheduling, wherein the daily operating cost includes electricity purchase and sale cost, energy storage charging and discharging loss depreciation cost, and flexible load response compensation cost; Construct a multi-dimensional penalty item, which includes a power deviation penalty item, an over-limit penalty item, and a reserve insufficiency penalty item; The reward function of the intraday rolling optimization decision model is constructed by setting the single-step reward value to the negative of the sum of the intraday operating cost and the multi-dimensional penalty items.
[0010] Optionally, the real-time scheduling control instructions generated based on the deep reinforcement learning network, according to the optimization guidance of the reward function of the intraday rolling optimization decision model, with the objective of maximizing the cumulative expected reward, include: When performing the offline training phase of the intraday rolling optimization decision model, an experience replay pool containing the microgrid's historical state vectors, historical action vectors, and corresponding reward values is constructed based on the state space, action space, and reward function. Randomly sample batches of historical experience data from the experience replay pool, and use the historical experience data to train a policy neural network of deep reinforcement learning network for the continuous action space requirements of microgrid intraday scheduling. With the reward function of the intraday rolling optimization decision model as the optimization objective, the network parameters are iteratively updated by gradient descent until the cumulative expected reward output by the network tends to stabilize, thereby achieving the convergence of the policy neural network. When the online operation phase of the intraday rolling optimization decision model is executed, the multi-dimensional operating parameters of the microgrid collected in real time are converted into state vectors, and the state vectors are input into the training converged strategy neural network. The policy neural network generates real-time scheduling and control instructions adapted to the action space, wherein the real-time scheduling and control instructions are specific scheduling operation values corresponding to the action vector.
[0011] Optionally, the operational data includes historical data on distributed power sources and uncontrollable loads. The step of generating a net load prediction interval and corresponding prediction deviation for the target scheduling period based on the operational data using a prediction algorithm includes: Based on the historical data of distributed power sources and the historical data of uncontrollable loads in the operation data, the difference between the predicted value of uncontrollable loads and the predicted value of distributed power output is calculated to obtain the predicted net load of the microgrid. A deep feedforward network prediction algorithm is used to extract features and fit intervals to the predicted net load, and output the lower and upper boundary values of the net load prediction interval for the target scheduling period. The lower limit deviation and upper limit deviation of the prediction deviation are determined based on the difference between the lower boundary value and the predicted net load, and the difference between the upper boundary value and the predicted net load, respectively.
[0012] Optionally, determining the required operating reserve capacity of the energy storage system based on the net load forecast range, the forecast deviation, and the charging and discharging capacity constraints of the energy storage system includes: In conjunction with the charging and discharging capacity constraints of the energy storage system, a maximum reserve constraint condition is preset. The maximum reserve constraint condition is used to limit the upper limit of power reserve, so that the sum of the maximum value of the lower limit deviation and the maximum value of the upper limit deviation of the prediction deviation is not greater than the smaller value between the maximum discharge power and the maximum charging power of the energy storage system. Based on the fluctuation range of the net load prediction interval, the upper and lower limit deviation ranges of the prediction deviation are determined. Combined with the maximum reserve constraint, the discharge power reserve and charging power reserve of the energy storage system are determined. Based on the preset scheduling time step and the total capacity of the energy storage system, the corresponding power reserve is calculated as the energy reserve, which is the product of the scheduling time step and the corresponding power reserve divided by the total capacity of the energy storage system. By integrating the discharge power reserve, charging power reserve, and energy reserve, the operating reserve capacity of the energy storage system is obtained.
[0013] Optionally, the step of obtaining the day-ahead tie-line power plan through the day-ahead scheduling optimization model, with the goal of minimizing the overall operating cost of the microgrid and the operating reserve capacity as a constraint, includes: An optimization objective function is constructed to minimize the comprehensive daily operating cost of the microgrid, which includes the cost of purchasing and selling electricity, the depreciation cost of charging and discharging losses of the energy storage system, and the cost of flexible load response compensation. A variance penalty term for tie-line power fluctuation cost is introduced into the optimization objective function to form a day-ahead scheduling optimization model that takes into account tie-line power smoothing. The power reserve in the operating reserve capacity is used as a constraint and applied to the operating boundary of the energy storage system during the first scheduling period. An optimization algorithm is used to solve the day-ahead scheduling optimization model, and the day-ahead tie-line power plan corresponding to each scheduling period that satisfies the constraints is output.
[0014] Secondly, this application provides a microgrid energy management system, including a server, distributed power sources, energy storage systems, flexible loads, and interconnection lines for interaction with the public power grid. The server is communicatively connected to the distributed power sources, energy storage systems, flexible loads, and the public power grid. The server includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the microgrid energy management method provided in the embodiments of this application.
[0015] The microgrid energy management method provided in this application breaks through the limitations of traditional microgrids that only focus on economic arbitrage. By introducing a day-ahead scheduling optimization model as a dense reward signal for the deep reinforcement learning network, the power curve of the microgrid tie line significantly approximates the expected shape of the public grid, greatly improving smoothness and significantly enhancing the grid-friendliness of microgrid grid integration. Furthermore, the microgrid energy management method uses a deep feedforward network to extract probability intervals to define dynamic reserves, and uses this as a mandatory physical safety boundary for the action space of the deep reinforcement learning network agent. While ensuring no load shedding occurs, it effectively reduces idle reserve capacity and optimizes the utilization efficiency of energy storage reserve capacity. Moreover, the microgrid energy management method enables rapid generation and response of control commands, thus effectively adapting to the technical requirements of virtual power plants participating in frequency regulation and real-time spot markets. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of the steps of the microgrid energy management method provided in the embodiments of this application; Figure 2 This is a schematic diagram illustrating the calculation steps for predicted net load and prediction deviation provided in an embodiment of this application; Figure 3 This is a schematic diagram illustrating the calculation steps for the operating reserve capacity of an energy storage system provided in an embodiment of this application; Figure 4 This is a schematic diagram of the solution steps for the day-ahead tie line power plan provided in an embodiment of this application; Figure 5 This is a schematic diagram illustrating the construction steps of the day-ahead rolling optimization decision model provided in the embodiments of this application; Figure 6 This is a schematic diagram illustrating the steps for constructing the state vector of the day-ahead rolling optimization decision model provided in this application embodiment; Figure 7 This is a schematic diagram illustrating the steps for constructing the action vector of the day-ahead rolling optimization decision model provided in this application embodiment; Figure 8 This is a schematic diagram illustrating the steps for constructing the reward function of the day-ahead rolling optimization decision model provided in this application embodiment; Figure 9 This is a schematic diagram of the output steps of the real-time scheduling and control command provided in the embodiments of this application; Figure 10 This is a schematic diagram of the microgrid energy management system provided in the embodiments of this application; Figure 11 This is a schematic diagram illustrating the interaction between the microgrid energy management system and the public power grid provided in this application embodiment.
[0018] Explanation of reference numerals in the attached diagram: 400-Microgrid energy management system, 401-Server, 402-Distributed power source, 403-Energy storage system, 404-Flexible load, 500-Public power grid. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0021] In this document, references to "embodiment" or "implementation" mean that a particular feature, structure, or characteristic described in connection with an embodiment or implementation may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0022] Before introducing the technical solution of this application, let's go over the technical issues in related technologies in detail.
[0023] With the advancement of dual-carbon goals, the penetration rate of distributed renewable energy sources such as wind and solar power in power distribution networks is continuously increasing. Due to the strong randomness and intermittency of wind and solar power output, microgrids with a high proportion of renewable energy integration often face the severe challenge of internal source-load power imbalance during grid-connected operation. Existing microgrid or virtual power plant energy management systems (EMS) have the following three major shortcomings in actual operation: First, the lack of grid-friendly mechanisms exacerbates the peak-shaving burden on the main grid. Traditional microgrid day-ahead dispatching often prioritizes minimizing its own operating costs, and its interaction with the main grid typically relies solely on time-of-use pricing mechanisms. This simplistic "price response" not only fails to effectively mitigate power fluctuations along tie lines but also easily triggers a "herding effect," further worsening the peak-to-valley difference along tie lines and seriously threatening the safe and stable operation of the distribution network.
[0024] Secondly, the configuration of operational reserve capacity is rudimentary, resulting in low resource utilization. To cope with short-term power forecasting errors, existing microgrids often use fixed capacity or fixed proportion methods to configure the operational reserve of energy storage systems. This static and rudimentary reserve configuration cannot dynamically adapt to changes in uncertainty over different time periods, easily leading to excessive redundancy or insufficient reserve capacity in the energy storage system.
[0025] Third, traditional algorithms struggle to meet the real-time decision-making requirements of high-frequency rolling within a day. Multi-objective optimization scheduling models, considering battery degradation, variance penalties, and various types of flexible loads, exhibit typical high-dimensional nonlinearity and strong coupling characteristics. Traditional mathematical solvers based on mixed-integer nonlinear programming consume considerable computation time, typically several minutes, when performing intraday rolling corrections, making it difficult to meet the millisecond to second-level real-time response requirements of microgrids or virtual power plants to cope with drastic fluctuations in source and load.
[0026] In view of this, to solve the above problems, this application provides a microgrid energy management method, applied to a server 401 of a microgrid energy management system 400. The microgrid energy management system 400 includes the server 401, a distributed power source 402, an energy storage system 403, flexible loads 404, and a tie line for interaction with the public power grid 500. The server 401 is communicatively connected to the distributed power source 402, the energy storage system 403, the flexible loads 404, and the public power grid 500. Please refer to [link to relevant documentation]. Figure 1 The microgrid energy management method includes the following steps: S10. Obtain the microgrid's operating data.
[0027] Optionally, the microgrid refers to a small-scale integrated power generation and distribution system composed of distributed power sources 402, energy storage system 403, loads, and control and protection devices. It can operate in grid-connected or islanded operation modes. In this embodiment, the microgrid is preferably a grid-connected microgrid, capable of bidirectional power interaction and power optimization with the public power grid 500 via a tie line. The server 401 can be a control computer for microgrid energy management.
[0028] Optionally, the microgrid can be an industrial park microgrid, a campus microgrid, a community microgrid, a commercial building microgrid, or a microgrid in a remote area.
[0029] Optionally, the operating data includes time-series operating data and basic equipment parameter data within the microgrid, including microgrid operating status information, such as historical output time-series data, real-time output data, and output-related meteorological data of distributed power source 402; historical electricity consumption data and real-time electricity consumption data of uncontrollable loads on the load side; available response capacity and response cost parameters of flexible load 404; rated capacity, maximum charge and discharge power, real-time state of charge and other operating parameters of energy storage system 403; time-of-use electricity price, day-ahead market price, and tie-line power grid connection assessment rules on the public grid 500 side; and full time-series data of the microgrid's historical operation.
[0030] S20. Based on the operational data, generate the net load prediction interval and corresponding prediction deviation for the target scheduling period using a prediction algorithm; determine the required operational reserve capacity of the energy storage system based on the net load prediction interval, the prediction deviation, and the charging and discharging capacity constraints of the energy storage system.
[0031] Optionally, the prediction algorithm is a feedforward deep neural network.
[0032] Optionally, the target scheduling period is the 24-hour scheduling cycle corresponding to the day-ahead scheduling, and the scheduling time step can be set to 15 minutes or 5 minutes, consistent with the standard step of day-ahead scheduling in the power industry.
[0033] Optionally, the net load forecast interval refers to a numerical range covering the range of net load fluctuations at a set confidence level, used to quantify the random uncertainty of the output of distributed power source 402 and user load. The forecast deviation refers to the difference between the net load forecast value and the upper and lower boundaries of the forecast interval, including the lower limit deviation and the upper limit deviation, used to characterize the maximum fluctuation of the net load relative to the forecast value.
[0034] Optionally, the charge / discharge capacity constraint of the energy storage system 403 refers to the inherent physical operating boundaries of the energy storage device, such as the maximum charging power, maximum discharging power, rated total capacity, upper and lower limits of state of charge, and charge / discharge cycle efficiency of the energy storage system 403. Operating reserve capacity refers to the power and energy reserves reserved by the energy storage system 403 to cover random fluctuations in net load, specifically including discharge power reserves, charging power reserves, and corresponding energy reserves, used to ensure real-time power balance of the microgrid and stable tie-line power.
[0035] S30. Using the day-ahead scheduling optimization model, with the goal of minimizing the overall operating cost of the microgrid and the operating reserve capacity as a constraint, the day-ahead tie line power plan is obtained. Using the intraday rolling optimization decision model, real-time scheduling control commands are generated based on a deep reinforcement learning network to make the actual tie line power track the day-ahead tie line power plan.
[0036] Optionally, the day-ahead scheduling optimization model refers to the mathematical programming model used for optimizing the day-ahead 24-hour scheduling plan of a microgrid. The comprehensive operating cost of a microgrid refers to the full-dimensional operating cost of the microgrid within a complete scheduling cycle, such as the electricity purchase and sale cost between the microgrid and the public grid 500, the depreciation cost of the energy storage system 403 charging and discharging losses, and the response compensation cost of flexible loads 404.
[0037] Optionally, the day-ahead tie-line power plan refers to the target value of the interaction power between the microgrid and the public grid 500 during each time period within the dispatch cycle, which is the core tracking target for intraday rolling dispatch. The operating reserve capacity serves as a rigid constraint condition for the model, used to limit the charging and discharging power operating boundaries of the energy storage system 403 during each time period, ensuring that sufficient safety redundancy is reserved during the day-ahead planning stage to cope with random fluctuations in source and load during the day.
[0038] Optionally, the intraday rolling optimization decision model refers to a sequential decision model for minute-level real-time scheduling, built on a Markov decision process, and adapted to the rapid response requirements of microgrid real-time scheduling. Deep reinforcement learning networks refer to reinforcement learning networks oriented towards continuous action spaces, such as the dual-delay deep deterministic policy gradient (TD3) algorithm network and the Soft Actor-Critic (SAC) algorithm network, which can achieve millisecond-level solution output for real-time scheduling commands.
[0039] Optionally, real-time dispatch control commands refer to specific execution commands for each controlled device, including distributed power source output adjustment commands 402, energy storage system charging and discharging power commands 403, and flexible load response control commands 404. Actual tie-line power tracking refers to controlling the deviation between the actual tie-line power and the day-ahead tie-line power plan within a preset range through closed-loop adjustment of real-time dispatch commands, thereby meeting the grid connection assessment requirements of the public power grid 500.
[0040] S40. Send the real-time scheduling and control command to the distributed power source, the energy storage system and the flexible load to complete the optimized scheduling of microgrid energy.
[0041] Optionally, sending real-time dispatch control commands refers to the process by which server 401 sends the generated dispatch commands to the corresponding controlled devices through the power industry standard communication protocol. Optimal dispatch of microgrid energy refers to the core dispatch objective of minimizing overall operating costs and ensuring stable and controllable tie-line power, while ensuring the safe and stable operation of the microgrid.
[0042] In summary, the microgrid energy management method provided in this application overcomes the limitations of traditional microgrids that only engage in economic arbitrage. By introducing a day-ahead scheduling optimization model as a dense reward signal for the deep reinforcement learning network, the power curve of the microgrid tie line significantly approximates the expected shape of the public grid 500, greatly improving smoothness and significantly enhancing the grid 500 friendliness of the microgrid's grid connection. Furthermore, the microgrid energy management method uses a deep feedforward network to extract probability intervals to define dynamic reserves, and uses this as a mandatory physical safety boundary for the action space of the deep reinforcement learning network agent. While ensuring no load shedding occurs, it effectively reduces idle reserve capacity, maximizes the effective depth of energy storage participation in arbitrage, and optimizes the utilization efficiency of energy storage reserve capacity. Thus, the microgrid energy management method accurately quantifies source-load uncertainty through net load interval prediction, scientifically configures energy storage operation reserve capacity, and achieves deep linkage between day-ahead scheduling and intraday rolling scheduling. While ensuring the operational safety of the microgrid and meeting tie line power tracking requirements, it effectively reduces the overall operating cost of the microgrid and enables rapid generation and response of control commands, thereby effectively adapting to the technical requirements of virtual power plants participating in frequency regulation and the real-time spot market.
[0043] Please see Figure 2 The operational data includes historical data on distributed power sources and uncontrollable loads. The step of generating a net load prediction interval and corresponding prediction deviation for the target scheduling period based on the operational data using a prediction algorithm includes the following steps: S21. Based on the historical data of distributed power sources and the historical data of uncontrollable loads in the operation data, calculate the difference between the predicted value of uncontrollable loads and the predicted value of distributed power output to obtain the predicted net load of the microgrid.
[0044] Optionally, the historical data for distributed power sources (402) refers to the historical time-series output data of renewable energy units such as photovoltaic power stations and small wind turbine generators within the microgrid. Historical data for uncontrollable loads refers to the historical time-series electricity consumption data of loads within the microgrid that lack demand response capabilities, such as residential electricity consumption and industrial infrastructure electricity consumption.
[0045] Optionally, the uncontrollable load forecast value refers to the load power forecast value corresponding to each scheduling step within the target scheduling period obtained by using a time-series forecasting algorithm based on historical uncontrollable load data; the distributed power source 402 output forecast value refers to the power generation output forecast value corresponding to each scheduling step within the target scheduling period obtained by using a time-series forecasting algorithm based on historical data of distributed power source 402 and weather forecast data.
[0046] Optionally, the predicted net load characterizes the power gap or surplus that the microgrid needs to balance through energy storage charging and discharging, and power purchase and sale with the public grid during the target scheduling period. The core calculation formula for the predicted net load is: ; in, To predict net load, These are uncontrollable load forecast values. and These are the projected output values for photovoltaic and wind power, respectively.
[0047] Optionally, when the calculation result is positive, it indicates that there is a power gap in the microgrid, which needs to be supplemented by energy storage discharge or grid purchase; when the calculation result is negative, it indicates that there is a power surplus in the microgrid, which needs to be absorbed by energy storage charging or selling electricity to the grid.
[0048] S22. Using a deep feedforward network prediction algorithm, feature extraction and interval fitting are performed on the predicted net load, and the lower and upper boundary values of the net load prediction interval for the target scheduling period are output.
[0049] Optionally, the feature extraction and interval fitting process is as follows: First, feature engineering is performed on the time series data corresponding to the predicted net load to extract multi-dimensional input features, including daily cycle features, weekly cycle features, trend features, meteorological correlation features, and date type features; then, a deep feedforward network model with dual output heads is constructed, and the two output heads are fitted to the upper and lower quantiles of the net load sequence, respectively; finally, the extracted multi-dimensional features are input into the trained deep feedforward network model, and the lower and upper boundary values of the net load prediction interval corresponding to each scheduling step within the target scheduling period are output, where the lower boundary value represents the minimum possible net load within the step, and the upper boundary value represents the maximum possible net load within the step.
[0050] S23. Based on the difference between the lower boundary value and the predicted net load, and the difference between the upper boundary value and the predicted net load, determine the lower limit deviation and the upper limit deviation of the prediction deviation, respectively.
[0051] Optionally, the lower limit deviation represents the maximum possible range by which the actual net load is lower than the predicted net load, corresponding to the maximum value of the microgrid power surplus, and is the basis for configuring the energy storage charging reserve capacity; the upper limit deviation represents the maximum possible range by which the actual net load is higher than the predicted net load, corresponding to the maximum value of the microgrid power deficit, and is the basis for configuring the energy storage discharging reserve capacity.
[0052] Specifically, the calculation formulas for the lower limit deviation and the upper limit deviation are as follows: ; Where ΔL is the lower limit deviation and ΔU is the upper limit deviation. and Here, represents the lower and upper boundary values of the prediction interval, respectively, and t1 represents the t1th scheduling period. The net load is predicted for the t1 time period.
[0053] Optionally, the lower and upper deviations calculated by the above formulas are both non-negative values, corresponding to the maximum downward and upward fluctuations of the net load, respectively, thereby effectively covering the two-way uncertainty range of random fluctuations in the source load.
[0054] As can be seen, compared with the traditional deterministic point prediction method, in this embodiment of the application, the microgrid energy management method fully quantifies the uncertainty of source load fluctuations through interval prediction, accurately characterizes the bidirectional fluctuation boundary of net load, and provides accurate and reliable quantitative basis for the scientific allocation of subsequent energy storage operation reserve capacity and the reasonable formulation of day-ahead dispatching plans, thus ensuring the safety and economy of microgrid dispatching schemes from the source.
[0055] Please see Figure 3 The determination of the required operational reserve capacity of the energy storage system based on the net load forecast range, the forecast deviation, and the charging and discharging capacity constraints of the energy storage system includes the following steps: S24. Based on the charging and discharging capacity constraints of the energy storage system, a maximum reserve constraint condition is preset. The maximum reserve constraint condition is used to limit the upper limit of power reserve, so that the sum of the maximum value of the lower limit deviation and the maximum value of the upper limit deviation of the prediction deviation is not greater than the smaller value between the maximum discharge power and the maximum charging power of the energy storage system.
[0056] Optionally, the charging and discharging capacity constraints of the energy storage system 403 specifically include the rated maximum charging power, rated maximum discharging power, rated total capacity, charge and discharge cycle efficiency, and upper and lower operating limits of the energy storage system 403.
[0057] Optionally, the core calculation logic for the maximum spare constraint is as follows: ; in, This represents the lower limit of the prediction deviation and the maximum deviation within the target scheduling period. The upper limit deviation is the maximum value. This represents the maximum discharge power of the 403 energy storage system. This represents the maximum charging power of the energy storage system 403. Additionally, `min` is a function that selects the smaller of the maximum discharge power and the maximum charging power of the energy storage system, ensuring that the total power reserve does not exceed the limitation of the bidirectional charging and discharging capability of the energy storage system.
[0058] For example, if the rated maximum charging power and rated maximum discharging power of the energy storage system 403 are both 200kW, the maximum lower limit deviation of the prediction deviation during the target scheduling period is 50kW and the maximum upper limit deviation is 60kW, and the sum of the two is 110kW, which is less than 200kW, thus satisfying the maximum reserve constraint condition; if the sum of the two is 220kW, it exceeds the physical regulation capacity of the energy storage, and the reserve capacity configuration needs to be optimized and adjusted.
[0059] S25. Based on the fluctuation range of the net load prediction interval, determine the upper and lower limit deviation ranges of the prediction deviation, and in conjunction with the maximum reserve constraint, determine the discharge power reserve and charging power reserve of the energy storage system.
[0060] Optionally, the fluctuation range of the net load forecast interval refers to the maximum difference between the upper and lower boundaries of the net load forecast interval corresponding to all scheduling steps within the target scheduling period. The range of forecast deviation refers to the extreme value range of the upper and lower limit deviations corresponding to all scheduling steps within the target scheduling period.
[0061] Optionally, the rules for determining the discharge power reserve and the charging power reserve are as follows: the minimum configuration value of the discharge power reserve shall not be lower than the maximum value of the upper limit deviation, ensuring that it can fully cover the power gap caused by the unexpected increase in net load; the minimum configuration value of the charging power reserve shall not be lower than the maximum value of the lower limit deviation, ensuring that it can fully absorb the power surplus caused by the unexpected decrease in net load; at the same time, the sum of the discharge power reserve and the charging power reserve shall meet the preset maximum reserve constraint conditions, and shall not exceed the maximum discharge power and maximum charging power limits of the energy storage system 403 respectively.
[0062] Specifically, the calculation formulas for discharge power reserve and charging power reserve are as follows:
[0063] in, Reserved for charging power. Reserved for discharge power.
[0064] S26. Based on the preset scheduling time step and the total capacity of the energy storage system, calculate the energy reserve corresponding to the power reserve. The energy reserve is the product of the scheduling time step and the corresponding power reserve divided by the total capacity of the energy storage system.
[0065] Optionally, the scheduling time step is consistent with the day-ahead scheduling step.
[0066] Optionally, the core calculation formula for the energy reserve is: ; in, Reserved for maximum energy. Reserved for lower limit energy. For the total energy storage capacity, The time step is used to represent the calculation results as a percentage, corresponding to the reserved proportion of the 403 state of charge of the energy storage system.
[0067] S27. Integrate the discharge power reserve, charging power reserve, and energy reserve to obtain the operating reserve capacity of the energy storage system.
[0068] Optionally, during the integration process, the discharge power reserve, charging power reserve, discharge energy reserve, and charging energy reserve need to be verified a second time to ensure that all parameters meet the maximum reserve constraint and the energy storage system 403 charge and discharge capacity constraint, and can fully cover the fluctuation range of the net load prediction interval. After the verification is passed, the above parameters are integrated into a standardized set of operating reserve capacity parameters and output to the subsequent scheduling optimization stage.
[0069] As can be seen, in the embodiments of this application, the microgrid energy management method not only accurately matches the reserve demand of random fluctuations in source load through the net load forecast interval, avoiding the risk of power exceeding the limit caused by insufficient reserve capacity, but also locks the feasibility of reserve capacity through energy storage physical constraints, preventing the decline in economy caused by reserve redundancy. At the same time, it takes into account both the two dimensions of instantaneous power adjustment and continuous power support, providing rigid and reasonable safety constraints for subsequent day-ahead scheduling plan formulation and intraday real-time scheduling decisions, thereby effectively balancing the operational safety and economy of the microgrid.
[0070] Please see Figure 4 The day-ahead scheduling optimization model, with the goal of minimizing the overall operating cost of the microgrid and using the operating reserve capacity as a constraint, is used to solve for the day-ahead tie-line power plan, including the following steps: S31. Construct an optimization objective function to minimize the comprehensive daily operating cost of the microgrid, whereby the comprehensive daily operating cost includes the cost of purchasing and selling electricity, the depreciation cost of energy storage system charging and discharging losses, and the cost of flexible load response compensation.
[0071] Optionally, the day-ahead scheduling optimization model is a mixed-integer linear programming model for the microgrid's future 24-hour scheduling cycle, with the scheduling time step consistent with the target scheduling period step. The optimization objective function focuses on minimizing the comprehensive daily operating cost of the microgrid, covering all dimensions of economic cost throughout the entire scheduling cycle of the microgrid.
[0072] Optionally, a positive tie-line power indicates that the microgrid purchases electricity from the grid, incurring electricity purchase costs; a negative tie-line power indicates that the microgrid sells electricity to the grid, generating revenue. The depreciation cost of the energy storage system 403 (charging and discharging losses) is calculated based on the energy storage charging and discharging power, charging and discharging cycle efficiency, and the lifetime depreciation factor per unit charging and discharging capacity for each time period. Higher charging and discharging power and more cycles result in higher depreciation costs. The response compensation cost of the flexible load 404 refers to the user-side compensation cost incurred by calling upon the flexible load 404 to participate in day-ahead scheduling optimization. It is calculated based on the response power of the flexible load 404 for each time period and the unit power response compensation price. Higher response power results in higher compensation costs.
[0073] S32. Introduce a variance penalty term for tie-line power fluctuation cost into the optimization objective function to form a day-ahead scheduling optimization model that takes into account tie-line power smoothing.
[0074] Optionally, the variance penalty term for tie-line power fluctuation costs is a penalty cost term set for large fluctuations in tie-line power between adjacent scheduling periods. This is used to guide the optimization model to output a stable tie-line power plan, avoiding grid connection assessment risks caused by drastic power fluctuations, and reducing the tracking difficulty of intraday real-time scheduling. The value of the variance penalty term is positively correlated with the sum of the squares of the differences in tie-line power between adjacent periods. The greater the power fluctuation, the higher the penalty term value, and the higher the corresponding comprehensive daily operating cost. The optimization model will prioritize scheduling schemes with smaller power fluctuations.
[0075] Specifically, the core calculation expression for the variance penalty term is: ; in, To mitigate the cost penalty of power smoothing in the tie line, Here, T represents the fluctuation penalty coefficient, and T represents the total number of day-ahead scheduling periods. The actual interconnection power in time period t is... Let be the expected curve for time period t, Δt be the scheduling time step, and Σ be the sum of squares of the differences between adjacent time periods within the entire scheduling cycle.
[0076] Alternatively, the variance penalty term can be added to the original objective function to form a new objective, achieving the dual objectives of minimizing operating costs and smoothing tie-line power.
[0077] S33. The power reserve in the operating reserve capacity is used as a constraint condition and applied to the operating boundary of the first scheduling period of the energy storage system.
[0078] Optionally, the constraint application logic is as follows: the maximum executable charging power of the energy storage system 403 during the first scheduling period is obtained by subtracting the charging power reserve from the rated maximum charging power of the energy storage system; the maximum executable discharging power of the energy storage system 403 during the first scheduling period is obtained by subtracting the discharging power reserve from the rated maximum discharging power of the energy storage system. At the same time, the energy storage state of charge during the first scheduling period must meet the energy reserve requirements determined above, that is, the initial state of charge must be higher than the lowest state of charge corresponding to the discharge energy reserve, and lower than the highest state of charge after deducting the charging energy reserve from the rated total capacity.
[0079] Optionally, in addition to the core operating reserve capacity constraint, the day-ahead dispatch optimization model also simultaneously supplements the microgrid power balance constraint, the energy storage system 403 all-time charging and discharging power constraint, the energy storage state of charge upper and lower limit constraint, the flexible load 404 response capacity constraint, and the tie line power upper and lower limit constraint to ensure that the dispatch plan obtained meets the requirements for safe operation of the microgrid.
[0080] Optionally, the constraint condition can be expressed as follows: ;
[0081] ; in, , These represent the charging power and discharging power of the energy storage system 403 during time period t1, respectively. , These are the rated maximum charging power and rated maximum discharging power of the energy storage system 403, respectively. , These are the backup charging power and backup discharging power for the energy storage system 403, respectively. This is a binary variable representing the energy storage charging state, used to implement mutual exclusion of charging and discharging actions; The state of charge of energy storage system 403 during time period t1; , These are the lower and upper limits of the state-of-charge operation of the energy storage system 403, respectively. , These are the backup energy for discharging and the backup energy for charging in the energy storage system 403, respectively.
[0082] Solving the day-ahead scheduling optimization model outputs the day-ahead tie-line power plan for the microgrid. .
[0083] S34. The day-ahead scheduling optimization model is solved using an optimization algorithm, and the day-ahead tie-line power plan corresponding to each scheduling period that satisfies the constraints is output.
[0084] Optionally, the optimization solution algorithm includes, but is not limited to, Gurobi and Cplex, and open-source optimization solvers such as Ipopt can also be used to quickly solve high-dimensional linear programming models and output a globally optimal solution that satisfies all constraints. After the solution is completed, the model synchronously outputs the complete scheduling plan for each scheduling period of the entire scheduling cycle. The core includes the day-ahead tie-line power plan, the energy storage system 403 charging and discharging plan, and the flexible load 404 response plan for each period. Among them, the day-ahead tie-line power plan is the core tracking target for intraday rolling optimization scheduling.
[0085] As can be seen, in this embodiment, the optimization objective function is first constructed with minimizing the overall daily operating cost of the microgrid as the core. Then, a tie-line power fluctuation variance penalty term is introduced to achieve power smoothing optimization. Subsequently, the energy storage operation reserve capacity is applied as a rigid constraint to the energy storage operation boundary. Finally, a compliant day-ahead tie-line power plan is output through the optimization solution algorithm. In this way, economic optimization of the entire microgrid scheduling cycle is achieved, tie-line power fluctuations are smoothed through the variance penalty term, and the pre-emptive reserve constraint ensures deep linkage between the day-ahead plan and intraday reserve demand. This solves the problems of disconnect between traditional day-ahead and intraday scheduling and poor plan executability, and provides a clear and compliant tracking target for intraday rolling optimization scheduling, thereby effectively optimizing the economy, stability, and security of microgrid scheduling.
[0086] Please see Figure 5 The intraday rolling optimization decision model is an intraday rolling optimization decision model constructed using a Markov decision process. The process of generating real-time scheduling and control instructions based on a deep reinforcement learning network using this intraday rolling optimization decision model includes the following steps: S35. Collect multi-dimensional operating parameters of the microgrid in real time, construct the state space of the intraday rolling optimization decision model based on the multi-dimensional operating parameters, and generate a state vector. The state vector is used to characterize the operating state of the microgrid.
[0087] Optionally, the multi-dimensional operating parameters specifically include: the net load forecast value for the target scheduling period, the upper and lower boundaries of the net load forecast interval, the real-time electricity price of the grid, the expected power ratio corresponding to the expected power curve, the real-time state of charge of the energy storage system 403, the cumulative interactive power of the tie line in the historical period, the planned reference value of the day-ahead tie line power in the current period, and the available response capacity of the flexible load 404.
[0088] In one optional embodiment of this application, the state space S represents the agent in The constantly observed characteristics of the microgrid environment. State vector. The formula for expressing it is: ; The above formula includes the current net load forecast and its upper and lower boundaries. Real-time electricity price The expected power ratio at the current moment Real-time state of charge of energy storage Historical cumulative interactive power and the reference value of the current plan. .
[0089] S36. Determine the types of scheduling operations that the deep reinforcement learning network can execute, construct the action space of the intraday rolling optimization decision model based on the types of scheduling operations, and generate an action vector that matches the state vector.
[0090] Optionally, the scheduling operation type refers to the category of scheduling and control actions that the deep reinforcement learning agent can perform on the controlled equipment within the microgrid, such as: energy storage system 403 charging and discharging power regulation, flexible load 404 response power regulation, distributed power source 402 output regulation, etc.
[0091] Optionally, the action vector includes the charging and discharging power values of the energy storage system 403, the response power values of the flexible load 404, etc., wherein the charging and discharging power is represented by positive values for charging and negative values for discharging.
[0092] In one optional implementation of this application, the action space A represents the real-time scheduling instructions issued by the agent. A continuous action vector is defined. for: ; in, The charging and discharging power of the energy storage system 403 is represented by positive values for charging power and negative values for discharging power. This is the response power of the flexible load 404.
[0093] In a preferred embodiment of this application, the action space must be strictly truncated by the dynamically available boundary calculated above, that is: ; in, For the charging and discharging power of energy storage system 403, , These are the rated maximum charging power and rated maximum discharging power of the energy storage system 403, respectively. Reserved for charging power. Reserved for discharge power. By strictly trunculating through dynamic reserve boundaries, it is ensured that the actions output by the deep reinforcement learning network always have physical backup capabilities to withstand uncertainties.
[0094] S37. Based on the mapping relationship between the state vector and the action vector, determine the state transition rules of the intraday rolling optimization decision model. The state transition rules are used to clarify the evolution logic of the microgrid operating state corresponding to the state vector after the action vector is executed.
[0095] Optionally, the state transition rule is used to define the probability distribution and evolution logic of the microgrid's operating state transitioning from the current state vector to the next state vector after the agent executes a certain action vector.
[0096] Specifically, the state transition rules are divided into the update logic of external environmental parameters and the evolution logic of internal equipment states. External environmental parameters include environmental characteristics that change dynamically over time, such as net load forecast and real-time electricity price. Internal equipment states include equipment characteristics that change with scheduling actions, such as the state of charge of the energy storage system (403), the available response capacity of the flexible load (404), and the cumulative interactive power of the tie line.
[0097] In one optional embodiment of this application, the state transition rule describes the actions performed by the environment. How did it evolve to External environmental variables are updated on a rolling time-series basis, such as electricity prices, photovoltaic power, and load. The internal physical state, i.e., the state of charge (SOC) of energy storage, transitions according to the following formula: ; in, , These represent the energy storage state of charge in time period t and time period t+1, respectively. and These represent charge and discharge efficiencies, This is the charging power extraction function. Let C be the discharge power extraction function, Δt be the scheduling time step, and C be the discharge power extraction function. B This is the rated total capacity of energy storage system 403.
[0098] For example, if the real-time state of charge of energy storage system 403 in the current state vector is 50%, the energy storage charging power in the action vector is 100kW, and the scheduling time step is 1 minute, then the state of charge of energy storage system 403 at the next moment can be calculated according to the state transition rule, thus completing the evolution mapping of the microgrid's operating state.
[0099] S38. Based on the state vector, action vector and state transition rules, construct the reward function of the intraday rolling optimization decision model. The reward function is used to quantify the microgrid operating cost and constraint compliance, and guide the deep reinforcement learning algorithm to optimize in the direction of minimizing operating cost and ensuring constraint compliance.
[0100] Optionally, the value of the reward function is jointly determined by the microgrid single-step dispatch operation cost and the constraint compliance penalty item. The operation cost includes the cost of purchasing and selling electricity, the depreciation cost of energy storage charging and discharging losses, and the cost of flexible load 404 response compensation. The constraint compliance penalty item includes tie line power deviation penalty item, equipment operation exceeding limit penalty item, and insufficient reserve capacity penalty item.
[0101] For example, if the microgrid's single-step operating cost is lower and the constraint compliance is better after executing the action vector, the reward function output value will be higher; conversely, if the operating cost is higher and problems such as equipment exceeding limits or excessive power deviation occur, the reward function output value will be lower, or even negative.
[0102] In one specific embodiment of this application, the reward function aims to guide the agent to achieve the dual objectives of optimal economy and minimum connection variance. A single-step reward is set. The intraday operating costs and penalties are negative values: ; in, For single-step rewards, For economic cost items, For electricity purchase and sale costs, This refers to the depreciation cost of energy storage charging and discharging losses. This is a joint penalty term for variance and bias. ω1, ω2, and ω3 are the penalty terms for exceeding the limit, and ω1, ω2, and ω3 are the weight coefficients.
[0103] Furthermore, the joint penalty term for variance and bias The formula for expressing it is: ; in, This is the penalty coefficient for fluctuations in the desired power curve. This is the penalty coefficient for deviation from the current plan. The actual interconnection power in time period t is... Let be the expected power ratio for time period t. This is the estimated total interactive power consumption over the entire cycle. This is the reference value for the day-ahead tie-line power plan in time period t. The joint penalty term for variance and bias forces the agent to both conform to the expected curve of the large power grid to achieve 500% grid friendliness and to track the day-ahead plan to prevent default.
[0104] Furthermore, penalties for exceeding limits This can be understood as a maximum negative constant penalty imposed when an action causes a physical constraint to be exceeded.
[0105] S39. Based on a deep reinforcement learning network, and according to the optimization guidance of the reward function of the intraday rolling optimization decision model, real-time scheduling control instructions are generated with the goal of maximizing the cumulative expected reward.
[0106] Optionally, the deep reinforcement learning network includes a policy neural network and an evaluation neural network. The policy neural network is used to output the scheduled action vector, and the evaluation neural network is used to evaluate the value of the action and guide the policy network iteration.
[0107] Optionally, the cumulative expected reward refers to the expected value of the cumulative sum of the single-step rewards obtained by the agent in performing continuous scheduling actions within a complete scheduling cycle, which is used to measure the long-term overall benefit of the scheduling strategy.
[0108] Specifically, during the offline training phase, the deep reinforcement learning network aims to maximize the cumulative expected reward by iteratively updating network parameters using gradient descent until the network converges to obtain the optimal scheduling strategy. During the online operation phase, the real-time collected state vectors are input into the trained network, and the optimal real-time scheduling control commands are generated through a single forward propagation. By optimizing the network with the goal of maximizing the cumulative expected reward, the deep reinforcement learning network outputs an optimal scheduling strategy that considers long-term overall benefits, rather than a suboptimal solution in a local, single step, thus ensuring optimal operational performance of the microgrid throughout the entire scheduling cycle.
[0109] In one specific embodiment of this application, the deep reinforcement learning network employs a Soft Actor-Critic (SAC) for continuous action space or a dual-delay deep deterministic policy gradient (TD3) algorithm.
[0110] When training offline, historical multi-timescale data forms an experience pool (Replay Buffer). This is used to construct the Actor neural network. and Critic Neural Network Maximize the cumulative expected reward through gradient descent. To update network parameters and .in, This represents the current state of the microgrid. The output action is γ, which is the discount factor. This represents the single-step reward value for the (t+k)th time period.
[0111] When under online control, the current microgrid status will be monitored during actual daily operation. The input is fed into a trained Actor neural network, which, after one forward pass, directly outputs the optimal control command within milliseconds. For example, it can output the optimal control command within a time of less than 10ms. This command is then translated into specific inverter and switching signals and sent to the underlying physical devices for execution, completing one intraday dynamic closed-loop control cycle.
[0112] As can be seen, in the embodiments of this application, the microgrid energy management method completely maps the intraday rolling optimization process of the microgrid into a standard Markov decision process, realizing the full definition of scheduling environment, executable actions, state evolution, and optimization objectives. This provides a complete and standardized model framework for the training and decision-making of deep reinforcement learning networks, effectively improving the rationality and optimality of real-time scheduling control commands, and providing core support for the accurate execution of intraday rolling optimization of the microgrid.
[0113] Please see Figure 6 The real-time acquisition of multi-dimensional operating parameters of the microgrid, and the construction of the state space of the intraday rolling optimization decision model based on these parameters, generating a state vector, includes the following steps: S351. Real-time acquisition of multi-dimensional operating parameters of the microgrid, wherein the multi-dimensional operating parameters include at least one of the following: net load forecast value, net load forecast interval boundary, real-time electricity price, expected power ratio corresponding to the expected power curve, real-time state of charge of the energy storage system, historical cumulative interactive power of tie lines, day-ahead tie line power planning reference value, and available response capacity of flexible load.
[0114] Optionally, the net load forecast value refers to the difference between the microgrid's uncontrollable load forecast value and the distributed power source 402 output forecast value within the target scheduling period; the net load forecast interval boundary includes the upper and lower boundary values of the net load forecast interval, used to quantify the random fluctuation range of the net load in the current period; the real-time electricity price refers to the time-of-use electricity purchase price and sales price of the public grid 500 in the current period; the expected power ratio corresponding to the expected power curve refers to the power ratio requirement corresponding to the current period in the daily expected kWh power curve issued by the public grid 500; the real-time state of charge of the energy storage system 403 refers to the real-time state of charge of the energy storage system 403. 3. The ratio of the current remaining power to the rated total capacity is used to characterize the available charging and discharging capacity of the energy storage system 403; the historical tie-line cumulative interaction power refers to the cumulative value of the actual interaction power of the tie-line during the executed period within the current scheduling cycle, which is used to judge the current power completion progress in conjunction with the day-ahead plan; the day-ahead tie-line power plan reference value refers to the tie-line power target value corresponding to the current period obtained by solving the day-ahead scheduling optimization model; the available response capacity of the flexible load 404 refers to the maximum load reduction or transfer amount that the flexible load 404 can participate in adjusting within the current period, which is used to characterize the adjustable resource capacity on the user side.
[0115] S352. Construct the state space of the intraday rolling optimization decision model based on the multi-dimensional operating parameters, and generate a state vector for deep reinforcement learning decision-making.
[0116] Optionally, the process of generating the state vector specifically includes: firstly, preprocessing the collected multi-dimensional operating parameters, including outlier removal, missing value completion, and normalization, to eliminate the dimensional differences of different parameters; then concatenating the preprocessed parameters of each dimension according to a preset feature order to generate a one-dimensional state vector that matches the dimension of the input layer of the deep reinforcement learning network.
[0117] As can be seen, in this embodiment, the microgrid energy management method first comprehensively collects multi-dimensional operating parameters covering all aspects of the microgrid's operational characteristics. Then, through data preprocessing and feature concatenation, a standardized state space is constructed, and a state vector adapted to the deep reinforcement learning network is generated. This provides the deep reinforcement learning network with comprehensive and accurate environmental feature input, ensuring that the network can fully perceive the microgrid's operational status and decision boundaries, effectively improving the accuracy, rationality, and adaptability of subsequent scheduling decisions.
[0118] Please see Figure 7 The process of determining the types of scheduling operations that the deep reinforcement learning network can execute, constructing the action space of the intraday rolling optimization decision model based on the scheduling operation types, and generating action vectors that match the state vectors includes the following steps: S361. Determine the types of scheduling operations that the deep reinforcement learning network can execute, wherein the types of scheduling operations include energy storage system charging and discharging power regulation and flexible load response power regulation.
[0119] Optionally, the charging and discharging power regulation of the energy storage system 403 refers to the operation of bidirectional continuous regulation of the charging and discharging power of the energy storage system 403, absorbing the power surplus in the microgrid through charging and filling the power gap in the microgrid through discharging; the response power regulation of the flexible load 404 refers to the operation of regulating the power consumption of the flexible load 404, including two core forms: load reduction and load transfer. By participating in the power balance of the microgrid through the flexible regulation of the user-side load, the energy storage regulation pressure and the microgrid power purchase cost can be effectively reduced.
[0120] S362. Based on the scheduling operation type, construct the action space of the intraday rolling optimization decision model, and generate an action vector that matches the state vector. The action vector includes the charging and discharging power parameters of the energy storage system.
[0121] Optionally, the energy storage system 403 charging and discharging power parameters in the action vector are represented by positive values to indicate energy storage charging power and negative values to indicate energy storage discharging power, with the magnitude of the parameter corresponding to the specific amplitude of power adjustment; the action vector may also simultaneously include the flexible load 404 response power parameters, with positive values to indicate load reduction and negative values to indicate load transfer.
[0122] For example, if the determined scheduling operation types are energy storage system 403 charging and discharging power adjustment and flexible load 404 response power adjustment, the constructed action space is a two-dimensional continuous action space, and the corresponding generated action vector is a two-dimensional vector. The first dimension is the charging and discharging power parameter of energy storage system 403, and the second dimension is the response power parameter of flexible load 404. This action vector is time-synchronized and dimensionally adapted with the state vector, and can be output and executed by a deep reinforcement learning network.
[0123] S363. Based on the power reserve boundary in the operating reserve capacity, the action space is constrained and truncated so that the charging and discharging power parameters of the energy storage system in the action vector are limited to the range after deducting the corresponding power reserve from the maximum charging and discharging power.
[0124] Optionally, the power reserve boundary in the operating reserve capacity refers to the charging power reserve and discharging power reserve of the energy storage system 403, determined based on the net load prediction range and prediction deviation. Constraint truncation refers to rigidly limiting the upper and lower limits of the action space, eliminating inactive action ranges that would occupy the operating reserve capacity, and ensuring from the model level that the scheduling instructions output by the deep reinforcement learning network always conform to the reserve capacity constraints.
[0125] Specifically, the calculation logic for constraint truncation is as follows: the maximum charging power that the energy storage system 403 can execute = the rated maximum charging power of energy storage - the charging power reserve; the maximum discharging power that the energy storage system 403 can execute = the rated maximum discharging power of energy storage - the discharging power reserve. This range is used as the effective value range of the energy storage charging and discharging power parameters in the action space.
[0126] As can be seen, in this embodiment, the core scheduling operation types of the microgrid intraday dispatch are first clearly defined, and the executable operation range of the deep reinforcement learning network is delineated. Then, a standardized action space is constructed based on the scheduling operation types, and action vectors that precisely match the state vectors are generated to ensure that the instructions output by the network can be directly executed. Finally, the action space is constrained and truncated based on the power reserve boundary of the operating reserve capacity, locking the safe and compliant range of the dispatch instructions from the model level. In this way, a complete and executable action decision framework is constructed for the deep reinforcement learning network, and the pre-constraints ensure that the dispatch instructions always meet the energy storage operation reserve requirements, taking into account the economy, executability, and operational safety of intraday dispatch.
[0127] Please see Figure 8 The reward function for constructing the intraday rolling optimization decision model includes the following steps: S381. Obtain the daily operating cost corresponding to a single-step scheduling, wherein the daily operating cost includes the cost of purchasing and selling electricity, the depreciation cost of energy storage charging and discharging losses, and the cost of flexible load response compensation.
[0128] Optionally, single-step scheduling refers to the scheduling execution process within a single scheduling time step corresponding to the intraday rolling optimization decision model; the intraday operating cost corresponding to single-step scheduling refers to the full-dimensional economic cost generated by the microgrid within that scheduling step after executing the single-step scheduling action.
[0129] Optionally, the power purchase and sale cost refers to the cost incurred by the microgrid in exchanging power with the public grid 500 through the tie line; the energy storage charging and discharging loss depreciation cost refers to the life loss depreciation cost incurred by the energy storage system 403 in performing charging and discharging operations; the flexible load 404 response compensation cost refers to the user compensation cost incurred by calling the flexible load 404 to participate in power regulation, which is calculated based on the actual response power of the flexible load 404 within this step and the unit power response compensation unit price.
[0130] S382. Construct a multi-dimensional penalty term, which includes a power deviation penalty term, an over-limit penalty term, and a reserve shortage penalty term.
[0131] Optionally, the power deviation penalty is a penalty item set for the deviation between the actual interactive power of the tie line and the planned power of the tie line in the day-ahead. Specifically, it is the square of the difference between the actual power and the planned power of the tie line within the scheduling step, multiplied by a preset deviation penalty coefficient. The larger the deviation, the higher the penalty item value. This is used to guide the scheduling instructions output by the network to achieve accurate tracking of the planned power of the tie line in the day-ahead and to smooth out tie line power fluctuations. The limit violation penalty is a penalty item set for the equipment operating parameters exceeding the safety boundary. This includes penalties for the charging and discharging power of the energy storage system 403 exceeding the limit, the state of charge exceeding the limit, the response capacity of the flexible load 404 exceeding the limit, and the tie line power exceeding the limit. As long as any parameter exceeds the limit, the corresponding penalty value is triggered. The larger the limit exceeds, the higher the penalty item value. This is used to constrain the scheduling instructions to conform to the physical operating boundary of the equipment. The insufficient reserve penalty is a penalty item set for the available reserve capacity of the energy storage system 403 not meeting the preset requirements. When the actual reserved charging and discharging power reserve of the energy storage system 403 is lower than the operating reserve capacity requirement, a high penalty is triggered. This is used to ensure that the microgrid always reserves sufficient safety redundancy to cope with random fluctuations in source and load.
[0132] S383. Set the single-step reward value to the negative of the sum of the intraday operating cost and the multi-dimensional penalty items to complete the construction of the reward function of the intraday rolling optimization decision model.
[0133] Optionally, the single-step reward value is the immediate feedback obtained after the deep reinforcement learning network performs a single-step scheduling action. Specifically, the single-step reward value is set as the negative of the sum of the daily operating cost and multi-dimensional penalty items. The core logic is that the core objective of microgrid scheduling is to minimize operating costs and ensure compliance with constraints. Therefore, the higher the operating cost and the larger the penalty item value, the lower the corresponding single-step reward value, or even a high negative value; conversely, the lower the operating cost and the absence of violation penalty items, the higher the corresponding single-step reward value.
[0134] As can be seen, in this embodiment, the full-dimensional operating costs corresponding to a single-step scheduling are first decomposed to clarify the economic evaluation criteria for scheduling actions; then, a multi-dimensional penalty term covering power tracking, equipment constraints, and safety reserves is constructed to define the compliance boundaries of scheduling actions; finally, through negative value mapping, the costs and penalty terms are integrated into a single-step reward value, completing the construction of the reward function. In this way, the economic optimization objective and safety operation constraints of microgrid intraday scheduling are deeply integrated into the core optimization guide of the deep reinforcement learning network. This guides the network to minimize operating costs while preventing unauthorized and excessive scheduling actions from the feedback mechanism level, achieving a balance between the economy and safety of microgrid scheduling. This provides a core evaluation system to support the convergence optimization and accurate decision-making of the deep reinforcement learning network.
[0135] Please see Figure 9 The method, based on a deep reinforcement learning network and guided by the reward function of the intraday rolling optimization decision model, aims to maximize the cumulative expected reward and generates real-time scheduling control instructions, including the following steps: S391. When performing the offline training phase of the intraday rolling optimization decision model, an experience replay pool containing the microgrid's historical state vector, historical action vector, and corresponding reward value is constructed based on the state space, action space, and reward function.
[0136] Optionally, the offline training phase refers to the phase in which the microgrid performs intensive iterative optimization of the deep reinforcement learning network based on historical operating data.
[0137] Optionally, the historical experience data stored in the experience playback pool are all from scheduling samples that conform to the Markov decision process during the historical operation of the microgrid. Each set of samples includes the historical state vector at the corresponding scheduling time, the historical action vector output by the network, and the corresponding reward value calculated by the reward function after the action is executed.
[0138] S392. Randomly sample batches of historical experience data from the experience playback pool. Using the historical experience data to train a policy neural network of deep reinforcement learning network for the continuous action space requirements of microgrid intraday scheduling, with the goal of maximizing the cumulative expected reward set by the reward function of the intraday rolling optimization decision model, the network parameters are iteratively updated by gradient descent until the cumulative expected reward output by the network tends to stabilize, thereby achieving the convergence of the policy neural network.
[0139] Optionally, the policy neural network is used to fit the mapping relationship between the microgrid's operating state and the optimal scheduling action. The network input is the state vector, and the output is the action vector. It can directly output power regulation parameters within a continuous numerical range to meet the continuous action space requirements of the microgrid's intraday scheduling.
[0140] Optionally, the cumulative expected reward refers to the expected value of the sum of the single-step reward values obtained by the network in executing continuous scheduling actions within a complete intraday scheduling cycle. Since the single-step reward value is the negative of the sum of the operating cost and the penalty term, the process of maximizing the cumulative expected reward is essentially the process of minimizing the microgrid's full-cycle operating cost and maximizing constraint compliance. The gradient descent method uses a gradient descent optimizer adapted to the power dispatching scenario to iteratively update the weight parameters of the policy neural network along the direction of reward value increase during training, gradually approaching the optimal scheduling policy.
[0141] In one optional embodiment of this application, the criterion for determining network convergence is: in 100 consecutive complete intraday scheduling cycle training rounds, the fluctuation range of the cumulative expected reward output by the network is less than a preset threshold and no longer shows a continuous upward trend, indicating that the network has learned the optimal scheduling strategy adapted to the microgrid operation scenario and has completed convergence.
[0142] S393. When executing the online operation phase of the intraday rolling optimization decision model, the multi-dimensional operating parameters of the microgrid collected in real time are converted into state vectors, and the state vectors are input into the training converged strategy neural network.
[0143] Optionally, the online operation phase refers to the actual operation phase in which the microgrid performs intraday rolling scheduling and generates real-time control commands based on real-time operation data.
[0144] Optionally, the multi-dimensional operating parameters collected in real time are transformed into a state vector. Specifically, this means performing preprocessing operations on the parameters collected in real time that are completely consistent with those in the offline training phase, including outlier removal, missing value completion, and normalization, and then concatenating them according to the feature order of the training phase into a state vector that matches the dimension of the network input layer.
[0145] S394. Generate real-time scheduling control instructions adapted to the action space through the policy neural network, wherein the real-time scheduling control instructions are specific scheduling operation values corresponding to the action vector.
[0146] Optionally, the generation process of real-time dispatch control commands is a single forward propagation inference process of the policy neural network, which does not require complex iterative solutions and can complete the calculation and output in milliseconds, thereby effectively adapting to the response speed requirements of microgrid real-time dispatch at the minute level. Furthermore, the generated real-time dispatch control commands are adapted to the action space and are quantified values of specific dispatch operations corresponding to the action vectors. Specifically, these include the charging and discharging power commands of the energy storage system 403 and the response power commands of the flexible load 404. The command values are strictly limited to the effective range of the action space and can be directly sent to the corresponding controlled equipment for execution via the power communication protocol.
[0147] As can be seen, in this embodiment, an experience replay pool is first constructed based on the core elements of the Markov decision process during the offline training phase. Iterative training of the policy neural network is completed using historical experience data until the network converges to obtain the optimal scheduling strategy. Then, during the online operation phase, real-time operating parameters are transformed into matching state vectors and input to the converged network. Through rapid inference, real-time scheduling control commands adapted to the action space are generated. Thus, this two-stage separation design of offline training and online operation solves the problems of slow solution speed and poor real-time performance of traditional mathematical programming methods. Furthermore, the use of sufficient historical data training ensures the optimality and stability of the scheduling strategy, enabling rapid response, accurate decision-making, and compliant execution of microgrid intraday real-time scheduling. This provides core algorithmic support for the closed-loop implementation of microgrid energy optimization scheduling.
[0148] Please see Figure 10 and Figure 11 This application also provides a microgrid energy management system 400, including a server 401, a distributed power source 402, an energy storage system 403, a flexible load 404, and a connection line for interaction with a public power grid 500. The server 401 is communicatively connected to the distributed power source 402, the energy storage system 403, the flexible load 404, and the public power grid 500. The server 401 includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the microgrid energy management method provided in any of the above embodiments of this application.
[0149] Optionally, server 401 can be an industrial-grade microgrid dedicated control server with a built-in microgrid energy management system 400, integrating a data acquisition unit, optimization calculation unit, inference unit, and instruction issuance unit, used to perform operations such as operation data preprocessing, interval prediction calculation, optimization model solving, reinforcement learning inference, and scheduling instruction issuance.
[0150] Optionally, the distributed power source 402 can be a renewable energy power generation unit such as a photovoltaic power station, a small wind turbine generator, or a distributed gas turbine, installed on the user side of the microgrid, and can provide clean power output.
[0151] Optionally, the energy storage system 403 can be an electrochemical energy storage device with bidirectional charge and discharge capabilities, such as a lithium battery energy storage system or a flow battery energy storage system, which can realize rapid power regulation and be used to smooth source-load fluctuations and optimize grid interaction power.
[0152] Optionally, the flexible load 404 can be a user-side load with demand response capabilities, such as an interruptible load, a transferable load, or an adjustable load, which can participate in the microgrid's optimized dispatch through power regulation. The tie line is a two-way power exchange channel between the microgrid and the public grid 500, used to realize power exchange and power trading between the microgrid and the main grid.
[0153] In this embodiment, the microgrid energy management system 400 overcomes the limitations of traditional microgrids that only engage in economic arbitrage. By introducing a day-ahead scheduling optimization model as a dense reward signal for the deep reinforcement learning network, the power curve of the microgrid tie line significantly approximates the expected shape of the public grid 500, greatly improving smoothness and significantly enhancing the grid-friendliness of microgrid grid connection. Furthermore, the microgrid energy management system 400 uses a deep feedforward network to extract probability intervals to define dynamic reserves, and uses this as a mandatory physical safety boundary for the action space of the deep reinforcement learning network agent. While ensuring no load shedding occurs, it effectively reduces idle reserve capacity and optimizes the utilization efficiency of energy storage reserve capacity. Simultaneously, the microgrid energy management system 400 can achieve rapid generation and response of control commands, thus effectively adapting to the technical requirements of virtual power plants participating in frequency regulation and the real-time spot market.
[0154] In this application, the terms "embodiment" and "implementation" mean that a specific feature, structure, or characteristic described in connection with an embodiment can be included in at least one embodiment of this application. The appearance of these phrases in various locations throughout the specification does not necessarily refer to the same embodiment, nor are they independent or alternative embodiments mutually exclusive with other embodiments. Those skilled in the art will understand, explicitly and implicitly, that the embodiments described in this application can be combined with other embodiments. Furthermore, it should be understood that the features, structures, or characteristics described in the various embodiments of this application can be arbitrarily combined to form another embodiment that does not depart from the spirit and scope of the technical solution of this application, provided there is no contradiction between them.
[0155] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to the above preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions to the technical solutions of this application should not depart from the spirit and scope of the technical solutions of this application.
Claims
1. A microgrid energy management method, characterized in that, include: Acquire microgrid operating data; Based on the operational data, a prediction algorithm is used to generate the net load prediction range and corresponding prediction deviation for the target scheduling period. Based on the net load prediction range, the prediction deviation, and the charging and discharging capacity constraints of the energy storage system, the required operating reserve capacity of the energy storage system is determined. Using the day-ahead scheduling optimization model, with the minimization of the overall operating cost of the microgrid as the optimization objective and the operating reserve capacity as the constraint, the day-ahead tie-line power plan is obtained. By using an intraday rolling optimization decision model, real-time scheduling and control instructions are generated based on a deep reinforcement learning network, enabling the actual tie-line power to track the day-ahead tie-line power plan. The real-time scheduling and control commands are sent to distributed power sources, the energy storage system, and flexible loads to achieve optimized scheduling of microgrid energy.
2. The microgrid energy management method as described in claim 1, characterized in that, The intraday rolling optimization decision model is an intraday rolling optimization decision model constructed using a Markov decision process. The generation of real-time scheduling and control instructions based on a deep reinforcement learning network using this intraday rolling optimization decision model includes: Real-time acquisition of multi-dimensional operating parameters of microgrid; construction of state space of intraday rolling optimization decision model based on the multi-dimensional operating parameters; generation of state vector; the state vector is used to characterize the operating state of microgrid. The types of scheduling operations that can be executed by the deep reinforcement learning network are determined, the action space of the intraday rolling optimization decision model is constructed based on the types of scheduling operations, and an action vector matching the state vector is generated. Based on the mapping relationship between the state vector and the action vector, the state transition rules of the intraday rolling optimization decision model are determined. The state transition rules are used to clarify the evolution logic of the microgrid operating state corresponding to the state vector after the action vector is executed. Based on the state vector, action vector, and state transition rules, a reward function for the intraday rolling optimization decision model is constructed. The reward function is used to quantify the microgrid operating cost and constraint compliance, and guide the deep reinforcement learning algorithm to optimize towards minimizing operating cost and ensuring constraint compliance. Based on a deep reinforcement learning network, and guided by the optimization of the reward function of the intraday rolling optimization decision model, real-time scheduling and control instructions are generated with the goal of maximizing the cumulative expected reward.
3. The microgrid energy management method as described in claim 2, characterized in that, The system collects multi-dimensional operating parameters of the microgrid in real time, constructs the state space of the intraday rolling optimization decision model based on these parameters, and generates a state vector, including: Real-time acquisition of multi-dimensional operating parameters of the microgrid, including at least one of the following: net load forecast value, net load forecast interval boundary, real-time electricity price, expected power ratio corresponding to the expected power curve, real-time state of charge of energy storage system, historical cumulative interactive power of tie lines, day-ahead tie line power planning reference value, and available response capacity of flexible load. Based on the multi-dimensional operating parameters, the state space of the intraday rolling optimization decision model is constructed, and a state vector for deep reinforcement learning decision-making is generated.
4. The microgrid energy management method as described in claim 2, characterized in that, The process of determining the types of scheduling operations that the deep reinforcement learning network can execute, constructing the action space of the intraday rolling optimization decision model based on the types of scheduling operations, and generating action vectors that match the state vectors includes: The types of scheduling operations that can be performed by the deep reinforcement learning network are determined, including energy storage system charging and discharging power regulation and flexible load response power regulation; Based on the scheduling operation type, an action space for an intraday rolling optimization decision model is constructed, and an action vector matching the state vector is generated. The action vector includes the charging and discharging power parameters of the energy storage system. Based on the power reserve boundary in the operational reserve capacity, the action space is constrained and truncated so that the charging and discharging power parameters of the energy storage system in the action vector are limited to the range after deducting the corresponding power reserve from the maximum charging and discharging power.
5. The microgrid energy management method as described in claim 2, characterized in that, The reward function for constructing the intraday rolling optimization decision model includes: Obtain the daily operating cost corresponding to a single-step scheduling, wherein the daily operating cost includes electricity purchase and sale cost, energy storage charging and discharging loss depreciation cost, and flexible load response compensation cost; Construct a multi-dimensional penalty item, which includes a power deviation penalty item, an over-limit penalty item, and a reserve insufficiency penalty item; The reward function of the intraday rolling optimization decision model is constructed by setting the single-step reward value to the negative of the sum of the intraday operating cost and the multi-dimensional penalty items.
6. The microgrid energy management method as described in claim 2, characterized in that, The process involves using a deep reinforcement learning network, guided by the optimization of the reward function of the intraday rolling optimization decision model, to generate real-time scheduling and control instructions with the objective of maximizing the accumulated expected reward. This includes: When performing the offline training phase of the intraday rolling optimization decision model, an experience replay pool containing the microgrid's historical state vectors, historical action vectors, and corresponding reward values is constructed based on the state space, action space, and reward function. Randomly sample batches of historical experience data from the experience replay pool, and use the historical experience data to train a policy neural network of deep reinforcement learning network for the continuous action space requirements of microgrid intraday scheduling. With the reward function of the intraday rolling optimization decision model as the optimization objective, the network parameters are iteratively updated by gradient descent until the cumulative expected reward output by the network tends to stabilize, thereby achieving the convergence of the policy neural network. When the online operation phase of the intraday rolling optimization decision model is executed, the multi-dimensional operating parameters of the microgrid collected in real time are converted into state vectors, and the state vectors are input into the training converged strategy neural network. The policy neural network generates real-time scheduling and control instructions adapted to the action space, wherein the real-time scheduling and control instructions are specific scheduling operation values corresponding to the action vector.
7. The microgrid energy management method as described in claim 1, characterized in that, The operational data includes historical data on distributed power sources and uncontrollable loads. The step of generating a net load prediction interval and corresponding prediction deviation for the target scheduling period based on the operational data using a prediction algorithm includes: Based on the historical data of distributed power sources and the historical data of uncontrollable loads in the operation data, the difference between the predicted value of uncontrollable loads and the predicted value of distributed power output is calculated to obtain the predicted net load of the microgrid. A deep feedforward network prediction algorithm is used to extract features and fit intervals to the predicted net load, and output the lower and upper boundary values of the net load prediction interval for the target scheduling period. The lower limit deviation and upper limit deviation of the prediction deviation are determined based on the difference between the lower boundary value and the predicted net load, and the difference between the upper boundary value and the predicted net load, respectively.
8. The microgrid energy management method as described in claim 7, characterized in that, The determination of the required operational reserve capacity of the energy storage system based on the net load forecast range, the forecast deviation, and the charging and discharging capacity constraints of the energy storage system includes: In conjunction with the charging and discharging capacity constraints of the energy storage system, a maximum reserve constraint condition is preset. The maximum reserve constraint condition is used to limit the upper limit of power reserve, so that the sum of the maximum value of the lower limit deviation and the maximum value of the upper limit deviation of the prediction deviation is not greater than the smaller value between the maximum discharge power and the maximum charging power of the energy storage system. Based on the fluctuation range of the net load prediction interval, the upper and lower limit deviation ranges of the prediction deviation are determined. Combined with the maximum reserve constraint, the discharge power reserve and charging power reserve of the energy storage system are determined. Based on the preset scheduling time step and the total capacity of the energy storage system, the corresponding power reserve is calculated as the energy reserve, which is the product of the scheduling time step and the corresponding power reserve divided by the total capacity of the energy storage system. By integrating the discharge power reserve, charging power reserve, and energy reserve, the operating reserve capacity of the energy storage system is obtained.
9. The microgrid energy management method as described in claim 8, characterized in that, The day-ahead scheduling optimization model, with the goal of minimizing the overall operating cost of the microgrid and constrained by the operating reserve capacity, yields the day-ahead tie-line power plan, including: An optimization objective function is constructed to minimize the comprehensive daily operating cost of the microgrid, which includes the cost of purchasing and selling electricity, the depreciation cost of charging and discharging losses of the energy storage system, and the cost of flexible load response compensation. A variance penalty term for tie-line power fluctuation cost is introduced into the optimization objective function to form a day-ahead scheduling optimization model that takes into account tie-line power smoothing. The power reserve in the operating reserve capacity is used as a constraint and applied to the operating boundary of the energy storage system during the first scheduling period. An optimization algorithm is used to solve the day-ahead scheduling optimization model, and the day-ahead tie-line power plan corresponding to each scheduling period that satisfies the constraints is output.
10. A microgrid energy management system, characterized in that, The system includes a server, distributed power sources, an energy storage system, flexible loads, and interconnection lines for interaction with the public power grid. The server is communicatively connected to the distributed power sources, the energy storage system, the flexible loads, and the public power grid. The server includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the microgrid energy management method as described in any one of claims 1 to 9.