A hybrid prediction-based microgrid energy storage control method and system
Patent Information
- Application Number
- CN202610939321.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-10-20
AI Technical Summary
传统的微电网控制系统难以在储能控制充放电和购电之间进行平衡,对于微电网储能控制的预测准确度低,导致微电网在峰时的电量储能不足,需要向大电网大量购电,增加购电成本,以及在谷时的电量过剩,导致无意义的充放电循环,额外消耗电池寿命
通过处理得到下一个采样周期的发电预测曲线和功率预测曲线,结合电价数据曲线构建储能控制模型,并在每个时间步长内输出相应的储能控制指令,能够有效平衡微电网在下一个采样周期的购电成本、用电功率和发电功率,降低微电网的购电成本,使微电网内的储能电池合理充电,保护电池寿命。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of power control, and in particular to a microgrid energy storage control method and system based on hybrid prediction. Background Technology
[0002] A microgrid is a small-scale power distribution system composed of distributed power sources and energy storage devices. Current microgrids typically use renewable energy sources such as solar and wind power for generation and employ energy storage devices such as lithium-ion and lead-acid batteries to provide electricity to nearby residential areas, shopping malls, factories, and other power-consuming areas. Microgrids are also connected to the main power grid (i.e., the national grid), allowing them to purchase electricity from the main grid when generation cannot keep up with demand, and to transmit electricity back to the main grid when generation exceeds demand and the energy storage devices are saturated.
[0003] The periods of high electricity consumption in a region are called peak hours, and the periods of low electricity consumption are called off-peak hours. Microgrids pay for electricity from the main grid based on the purchase price per unit and electricity consumption efficiency. The purchase price per unit is divided into peak and off-peak prices, with higher prices during peak hours and lower prices during off-peak hours. Traditional microgrid control systems struggle to balance energy storage control charging and discharging with electricity purchases. Low prediction accuracy for microgrid energy storage control leads to insufficient energy storage during peak hours, necessitating large-scale electricity purchases from the main grid, increasing purchase costs. Conversely, excess energy during off-peak hours results in meaningless charge-discharge cycles, further shortening battery life. Summary of the Invention
[0004] To address the problems in the prior art, this invention discloses a microgrid energy storage control method based on hybrid prediction, applied to a microgrid, wherein a sampling period is preset for the microgrid; The microgrid energy storage control method includes: Step S1: The control unit of the microgrid collects the operating condition data, power consumption data and power generation data of the microgrid in the current sampling period, and obtains the meteorological data of the microgrid in the next sampling period. Step S2: The control unit inputs the operating condition data into a pre-trained first prediction model to output a first prediction sequence, and inputs the meteorological data into a pre-trained second prediction model to output a power generation prediction curve. The electricity consumption data and the power generation data are input into a pre-trained third prediction model to output a second prediction sequence; Step S3: The control unit processes the first prediction sequence and the second prediction sequence to obtain the power prediction curve of the microgrid in the next sampling period; Step S4: The control unit acquires the electricity price data curve of the microgrid in the next sampling period, and constructs the energy storage control model of the microgrid in the next sampling period based on the electricity price data curve, the power prediction curve and the power generation prediction curve. The energy storage control model is used to determine the energy storage control commands issued by the control unit to the microgrid at each time step in the next sampling period; The electricity price data curve is predicted based on the historical electricity price data of the microgrid. The historical electricity price data includes the historical electricity price of the microgrid within a first threshold interval and the historical electricity price within a second threshold interval. The historical electricity price within the first threshold interval is higher than the historical electricity price within the second threshold interval.
[0005] Preferably, the first prediction model and the second prediction model are trained based on the XGBoost model.
[0006] Preferably, the third prediction model is trained based on the Transformer model.
[0007] Preferably, the power prediction curve is calculated in step S3 using the following formula:
[0008] in, The power prediction curve; The preset first calculation weight; This is the first predicted sequence; The second calculation weight is preset; This is the second predicted sequence.
[0009] Preferably, step S4 includes: Step S41: The control unit determines the power demand data within the corresponding time step based on the power generation prediction data corresponding to the power generation prediction curve in each time step of the next sampling period and the power prediction data corresponding to the power prediction curve in each time step of the next sampling period. Step S42: The control unit processes the demand power data in each time step within the next sampling period to obtain the corresponding power purchase data and energy storage loss data within the time step. Step S43: Based on the minimum cost rule, the control unit processes the electricity price data, the electricity purchase data, and the energy storage loss data corresponding to the electricity price data curve in each time step of the next sampling period to obtain the energy storage control command for the microgrid in each time step of the next sampling period.
[0010] Preferably, the energy storage control command includes either a charging command or a discharging command; The minimum cost rule is expressed by the following formula:
[0011] in, T represents a sampling period, and t represents a single time step within the sampling period; The electricity price data within the t-th time step; The electricity purchase data within the t-th time step; The energy storage loss data within the t-th time step; This is a preset loss constant; The charging power of the charging command within the t-th time step; This is the preset charging efficiency constant; The discharge power of the discharge command within the t-th time step; This is the preset discharge efficiency constant; This is the preset maximum energy storage capacity.
[0012] Preferably, after obtaining the energy storage control command within one time step, the following steps are used to predict the state of charge of the microgrid within the next time step: Step A1: Collect the state of charge of the microgrid within the current time step; Step A2: Predict the state of charge for the next time step based on the state of charge within the current time step, the preset energy storage control efficiency, the preset maximum battery capacity, and the energy storage control command within the current time step.
[0013] Preferably, step A2 calculates the state of charge for the next time step using the following formula:
[0014] in, The state of charge within the (t+1)th time step; The state of charge within the t-th time step; The length of a time step; This is the preset maximum battery capacity.
[0015] This invention discloses a microgrid energy storage control system, applied to a microgrid, employing the energy storage control method described above; A preset sampling period is set for the microgrid; The microgrid energy storage control system is integrated within the microgrid's control unit and includes: The information acquisition module is used to collect the microgrid's operating condition data, power consumption data, and power generation data in the current sampling period, and to acquire the microgrid's meteorological data in the next sampling period. The prediction module, connected to the information acquisition module, is used to output a first prediction sequence based on the operating condition data, output a power generation prediction curve based on the meteorological data, and output a second prediction sequence based on the electricity consumption data and the power generation data. A curve fitting module, connected to the prediction module, is used to process the first prediction sequence and the second prediction sequence to obtain the power prediction curve of the microgrid for the next sampling period; The model building module connects the prediction module and the curve fitting module, and is used to obtain the electricity price data curve of the microgrid in the next sampling period, and construct the energy storage control model of the microgrid in the next sampling period based on the electricity price data curve, the power prediction curve and the power generation prediction curve; An energy storage control module, connected to the model building module, is used to determine the energy storage control commands to be issued to the microgrid in each time step within the next sampling period using the energy storage control model; The electricity price data curve is predicted based on the historical electricity price data of the microgrid. The historical electricity price data includes the historical electricity price of the microgrid within a first threshold interval and the historical electricity price within a second threshold interval. The historical electricity price within the first threshold interval is higher than the historical electricity price within the second threshold interval.
[0016] The following beneficial effects can be obtained by using the present invention: By processing the generation and power prediction curves for the next sampling period, and combining them with the electricity price data curve, an energy storage control model is constructed. The corresponding energy storage control commands are output at each time step, which can effectively balance the electricity purchase cost, power consumption and generation power of the microgrid in the next sampling period, reduce the electricity purchase cost of the microgrid, and enable the energy storage batteries in the microgrid to be charged reasonably and protect the battery life. Attached Figure Description
[0017] Figure 1 This is a schematic flowchart of the energy storage control method of the present invention; Figure 2 This is a schematic diagram illustrating the process of outputting charging and discharging commands according to the present invention. Figure 3 This is a schematic diagram of the process for calculating the state of charge in the next time step according to the present invention. Figure 4 This is a schematic diagram of the energy storage control system of the present invention.
[0018] In the attached image: 1. Information acquisition module; 2. Prediction module; 3. Curve fitting module; 4. Model building module; 5. Energy storage control module. 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 some embodiments of the present invention, and not all embodiments. 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] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0021] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but this is not intended to limit the scope of the invention.
[0022] This invention discloses an energy storage control method applied to microgrids; Preset the sampling period for the microgrid; like Figure 1 As shown, the energy storage control method includes: Step S1: Collect the microgrid's operating condition data, power consumption data, and power generation data in the current sampling period, and obtain the microgrid's meteorological data for the next sampling period; Step S2: Input the operating condition data into the pre-trained first prediction model to output the first prediction sequence; input the meteorological data into the pre-trained second prediction model to output the power generation prediction curve; and The electricity consumption data and power generation data are input into a pre-trained third prediction model to output a second prediction sequence; Step S3: Process the first and second prediction sequences to obtain the power prediction curve of the microgrid for the next sampling period; Step S4: Obtain the electricity price data curve of the microgrid in the next sampling period, and construct the energy storage control model of the microgrid in the next sampling period based on the electricity price data curve, power prediction curve and power generation prediction curve. The energy storage control model outputs energy storage control commands to the microgrid at preset time steps.
[0023] The electricity price data curve is predicted based on the historical electricity price data of the microgrid. The historical electricity price data includes the historical electricity price of the microgrid in the first threshold interval and the historical electricity price in the second threshold interval. The historical electricity price in the first threshold interval is higher than the historical electricity price in the second threshold interval.
[0024] The microgrid in this invention is a new energy microgrid, which uses new energy sources such as photovoltaic and wind power for power generation.
[0025] In one embodiment, the sampling period is preset to 1 day, that is, the operating condition data, power consumption data and power generation data of the day are collected through the instrument panel of the working equipment in the microgrid, and the meteorological data of the next day is obtained through weather forecast.
[0026] Electricity prices fluctuate throughout the day, and a price curve is generated by directly obtaining the purchase price of electricity from the main power grid at different times. Generally, the purchase price is high in the first threshold range (corresponding to peak hours) and low in the second threshold range (corresponding to off-peak hours). If the purchase price changes, the price curve in the next sampling period will also change accordingly.
[0027] The data collected on the day is processed to build the energy storage control model for the next day. The energy storage control model outputs the corresponding charging or discharging command at each preset time step on the second day.
[0028] In one embodiment, the time step is preset to 15 minutes.
[0029] Specifically, operating data is used to represent the three-phase current, three-phase voltage, active power, and scheduling of all working devices in the microgrid.
[0030] The three-phase current and three-phase voltage generated during the current sampling period are collected by the current sensor and voltage sensor on each working device.
[0031] Active power is the actual operating power of the working equipment.
[0032] The scheduling plan includes the pre-defined operating status of the equipment at each time step in the next sampling cycle.
[0033] The electricity consumption data represents the load power of the microgrid during the current sampling period.
[0034] Meteorological data includes the solar irradiance and wind speed received by the new energy power generation equipment in the next sampling period.
[0035] The power generation data includes the power generation of photovoltaic power generation data and the power generation of wind power generation data generated by new energy power generation equipment.
[0036] In one embodiment, electricity consumption data, power generation data, and meteorological data are sampled at 1-minute intervals.
[0037] Furthermore, after collecting three-phase current, three-phase voltage, active power, load power, meteorological data, and power generation data, preprocessing is performed separately. Each type of data is organized according to time sequence, forming corresponding curves with preset step sizes. It is then checked whether the node corresponding to each step size exhibits a change exceeding a preset threshold compared to its two adjacent nodes. If such a change occurs, the node is considered a bad node and removed. A filling node is then generated using linear interpolation combined with the remaining normal nodes to fill the gap left by the removed bad node.
[0038] For each type of preprocessed data, discrete normalization is performed using a preset step size. For example, preprocessed data such as three-phase current, three-phase voltage, active power, load power, meteorological data, and power generation data are extracted with a step size of one minute. A maximum and minimum value are set for each type of data, and normalization is performed using the following formula:
[0039] in, Normalized values for each data type; This is the preprocessed data; This represents the minimum value for each data type. This represents the maximum value for each data type.
[0040] The scheduling plan uses integers to indicate whether a shift is scheduled: 1 indicates a shift is scheduled, and 0 indicates no shift is scheduled.
[0041] All normalized data of three-phase current, three-phase voltage, active power, load power, meteorological data, power generation data, and shift schedule are aligned according to the step size in the discrete normalization process described above. For example, in the first minute of the current sampling period, the three-phase current is 0.8, the three-phase voltage is 0.6, the meteorological data is 0.4, the power generation data is 0.8, and the shift schedule is 1.
[0042] Align the three-phase current, three-phase voltage, active power, and shift schedule according to the above step size and input them into the pre-trained first prediction model to output the first prediction sequence; Meteorological data is input into a second prediction model to output a power generation prediction curve, and The load power and power generation data are input into a pre-trained third prediction model to output a second prediction sequence.
[0043] The first forecast sequence is the load forecast sequence, used to predict the raw electricity consumption for the next sampling period. The second forecast sequence is the fluctuation forecast sequence, used to predict the electricity consumption fluctuations for the next sampling period.
[0044] The first and second prediction sequences are aligned according to the sampling interval and processed to obtain the power prediction curve for the next sampling period, which is used to represent the power consumption of the microgrid in the next sampling period.
[0045] The power consumption consists of the microgrid's own charging power, discharging power, and the power purchased from the main grid.
[0046] Furthermore, constraints are established based on electricity price data curves, power prediction curves, and generation prediction curves. An energy storage control model is constructed with the goal of minimizing costs. This model outputs corresponding energy storage control commands at each time step of the next sampling period, enabling the microgrid to balance its overall power generation, power consumption, and power purchase in the next sampling period. This achieves peak shaving and valley filling, reduces the microgrid's power purchase cost, and protects the lifespan of the energy storage batteries within the microgrid.
[0047] The microgrid converts the output charging or discharging commands into a unified standard protocol format through a built-in protocol module, integrates it into the microgrid's EMS (Energy Management System), and then sends the commands to the corresponding working devices for execution.
[0048] In a preferred embodiment of the present invention, the first prediction model and the second prediction model are trained based on the XGBoost model.
[0049] Specifically, the first prediction model is based on the XGBoost model's multi-level gradient boosting decision tree. It is trained using historical data on three-phase current, three-phase voltage, active power, and shift schedules to obtain the first prediction model in this invention. It can capture the features between the input data and output the load prediction sequence for the next sampling period.
[0050] The second prediction model is based on the XGBoost model and is trained using historical light intensity and wind speed. Therefore, it can output the power generation prediction curve for the next sampling period, including the photovoltaic power generation curve and the wind power generation curve, based on the meteorological data of the next sampling period obtained from the meteorological forecast.
[0051] In a preferred embodiment of the present invention, the third prediction model is trained based on the Transformer model.
[0052] Specifically, the third prediction model captures data correlation based on the self-attention mechanism of the Transformer model, and is trained using historical load power and power generation data to obtain the third prediction model in this invention.
[0053] In a preferred embodiment of the present invention, step S3 uses the following formula to calculate the power prediction curve:
[0054] in, Power prediction curve; The preset first calculation weight; This is the first predicted sequence; The second calculation weight is preset; This is the second predicted sequence.
[0055] Specifically, a training set is established using historical 30-day operating condition data and electricity consumption data. Error backpropagation or Bayesian optimization is used to train the training set with minimizing the root mean square error as the training objective function, thereby obtaining the first and second calculated weights.
[0056] Furthermore, the first and second forecast sequences are aligned in minute increments. At each increment, a weighted average is calculated based on the load forecast data from the first forecast sequence and the fluctuation forecast data from the second forecast sequence to obtain the power forecast data for that minute. A power forecast curve is then plotted based on the minute-by-minute power forecast data.
[0057] In each sampling period of the microgrid's operation, the actual power consumption of the microgrid is collected. The power consumption error is obtained by comparing the predicted power data in each time step with the actual power consumption. When the power consumption error in three consecutive time steps is greater than the preset error threshold, the training set is retrained to obtain the adjusted first and second computational weights.
[0058] In a preferred embodiment of the present invention, such as Figure 2 As shown, step S4 includes: Step S41: The control unit determines the power demand data within the corresponding time step based on the power generation prediction data corresponding to the power generation prediction curve within each time step in the next sampling period and the power prediction data corresponding to the power prediction curve within each time step in the next sampling period. Step S42: The control unit processes the demand power data for each time step in the next sampling period to obtain the corresponding power purchase data and energy storage loss data for that time step. Step S43: Based on the minimum cost rule, the control unit processes the electricity price data, electricity purchase data, and energy storage loss data corresponding to each time step in the next sampling period to obtain the energy storage control command for the microgrid in each time step in the next sampling period.
[0059] Specifically, the energy storage control model is a MILP (Mixed-Integer Linear Programming) model. The objective function is constructed using the minimum cost rule, and the MILP model is built by combining this with the corresponding constraints.
[0060] The objective function is expressed by the following formula:
[0061] in, T represents a sampling period, and t represents a single time step within the sampling period; This refers to the electricity price data within the t-th time step; This refers to the electricity purchase data within the t-th time step; This represents the energy storage loss data within the t-th time step. This is a preset loss constant; The charging power of the charging command within the t-th time step; This is the preset charging efficiency constant; Let be the discharge power of the discharge command within the t-th time step; This is the preset discharge efficiency constant; This is the preset maximum energy storage capacity.
[0062] In one embodiment, the loss constant is calculated to be 12.1 based on historical equipment loss data.
[0063] In one embodiment, both the charging efficiency constant and the discharging efficiency constant are preset to 0.95.
[0064] In one embodiment, the constraints include energy storage control command constraints and power balance constraints.
[0065] Specifically, the energy storage control command constraint means that within a time step, charging commands and discharging commands cannot exist simultaneously.
[0066] Integer variables of 0 and 1 are introduced to represent charging commands, discharging commands, and energy storage control command constraints:
[0067] in, An integer variable representing the charging command within time step t; An integer variable representing the discharge command within time step t.
[0068] The following formula is used as the condition for power balance constraints:
[0069] in, The photovoltaic power generation within the t-th time step is obtained from the photovoltaic power generation curve. The wind power generation capacity within the t-th time step is obtained from the wind power generation curve. The power purchased within the t-th time step; Let be the discharge power within the t-th time step; This represents the power consumption corresponding to the predicted curve within the t-th time step. Let be the charging power within the t-th time step.
[0070] In the above formula, only one of the charging power and discharging power will exist within the same time step.
[0071] The charging power and discharging power must also meet the requirement of not exceeding the preset maximum energy storage power.
[0072] In one embodiment, the objective function also includes a penalty cost, which is calculated using the following formula:
[0073] in, The penalty cost for time step t; This is the preset penalty coefficient; This is the set of time steps within the pre-input penalty time period.
[0074] A sampling period includes multiple time steps. A penalty period is preset for the sampling period, and all time steps within the penalty period are input into the MILP model to form a time step set. When the time step being calculated belongs to the penalty period, the penalty cost is calculated according to the above formula and added to the objective function. If the time step being calculated does not belong to the penalty period, no penalty cost is generated.
[0075] Taking a sampling period of 1 day as an example, the daytime hours from 8:00 to 18:00 are used as the penalty period, with a time step of 15 minutes. Then t=1 represents 0:00 to 0:15. The time step set between 32 and 71 is input into the MILP model as the time step set of the penalty period.
[0076] The MILP model calculates the power demand data for each time step within the next sampling period. This power demand data characterizes the power consumption required by the microgrid at that time step. The power consumption is obtained by combining the power purchased from the main grid with the charging and discharging power used by the microgrid for energy storage control.
[0077] Furthermore, since only one type of charging command and discharging command exists within a single time step, only either charging power or discharging power will be generated within that time step, which will be considered as energy storage power. Combining the corresponding electricity price data and energy storage losses, the electricity purchase data and energy storage loss data are obtained based on the purchased power and energy storage power. The MILP model, using the formulas of the objective function and constraints, balances the electricity purchase data and energy storage loss data with the goal of minimizing cost, outputting either the charging command or discharging command within the corresponding time step.
[0078] In a preferred embodiment of the present invention, such as Figure 3 As shown, after obtaining the energy storage control command within one time step, the following steps are used to predict the state of charge of the microgrid in the next time step: Step A1: Collect the state of charge of the microgrid within the current time step; Step A2: Predict the state of charge for the next time step based on the current state of charge within the current time step, the preset energy storage control efficiency, the preset maximum battery capacity, and the energy storage control command within the current time step.
[0079] Specifically, the state of charge is used to represent the battery capacity of the energy storage batteries in a microgrid.
[0080] The state of charge is calculated using the following formula:
[0081] Specifically, This represents the charged state at the (t+1)th time step; The state of charge at time step t; The length of the time step; This is the preset maximum battery capacity.
[0082] The state of charge of the first time step is based on the initial charge of the energy storage battery at the start of that time step.
[0083] Furthermore, the state of charge (SOC) is used as a constraint to construct the MILP model. It needs to satisfy that the SOC is between the preset minimum energy storage capacity and the preset maximum energy storage capacity, and that the difference between the SOCs of two adjacent time steps does not exceed a preset SOC threshold.
[0084] When the charging power and discharging power are obtained by MILP processing, if the calculated state of charge for the next time step is not between the preset minimum energy storage capacity and the maximum energy storage capacity or exceeds the preset charge threshold, the charging power and discharging power need to be recalculated to ensure that the state of charge for the next time step meets the above requirements. This is to prevent the battery capacity from being too large or too small, or the battery capacity from being charged and discharged too much in a short period of time, which could damage the energy storage batteries in the microgrid.
[0085] This invention discloses a microgrid energy storage control system, applied to a microgrid, which uses the above-mentioned energy storage control method to output energy storage control commands for controlling the microgrid; Preset the sampling period for the microgrid; The microgrid energy storage control system is integrated into the microgrid's control unit, such as... Figure 4 As shown, it includes: Information acquisition module 1 is used to collect the microgrid's operating condition data, power consumption data, and power generation data in the current sampling period, as well as to acquire the microgrid's meteorological data in the next sampling period; Prediction module 2, connected to information acquisition module 1, is used to output a first prediction sequence based on operating condition data, output a power generation prediction curve based on meteorological data, and output a second prediction sequence based on electricity consumption data and power generation data. Curve fitting module 3, connected to prediction module 2, is used to process the first prediction sequence and the second prediction sequence to obtain the power prediction curve of the microgrid for the next sampling period. Model building module 4 connects prediction module 2 and curve fitting module 3. It is used to obtain the electricity price data curve of the microgrid in the next sampling period, and to build the energy storage control model of the microgrid in the next sampling period based on the electricity price data curve, power prediction curve and power generation prediction curve. The energy storage control module 5 is connected to the model building module 4 and is used to determine the energy storage control commands to be issued to the microgrid in each time step within the next sampling period using the energy storage control model. The electricity price data curve is predicted based on the historical electricity price data of the microgrid. The historical electricity price data includes the historical electricity price of the microgrid in the first threshold interval and the historical electricity price in the second threshold interval. The historical electricity price in the first threshold interval is higher than the historical electricity price in the second threshold interval.
[0086] The above description is merely a preferred embodiment of the present invention and does not limit the implementation and protection scope of the present invention. Those skilled in the art should realize that any equivalent substitutions and obvious changes made based on the description and illustrations of the present invention should be included within the protection scope of the present invention.
Claims
1. A microgrid energy storage control method based on hybrid prediction, applied to microgrids, characterized in that, A preset sampling period is set for the microgrid; The microgrid energy storage control method includes: Step S1: The control unit of the microgrid collects the operating data, power consumption data and power generation data of the microgrid in the current sampling period, and obtains the meteorological data of the microgrid in the next sampling period. Step S2: The control unit inputs the operating condition data into a pre-trained first prediction model to output a first prediction sequence, and inputs the meteorological data into a pre-trained second prediction model to output a power generation prediction curve. The electricity consumption data and the power generation data are input into a pre-trained third prediction model to output a second prediction sequence; Step S3: The control unit processes the first prediction sequence and the second prediction sequence to obtain the power prediction curve of the microgrid in the next sampling period; Step S4: The control unit acquires the electricity price data curve of the microgrid in the next sampling period, and constructs the energy storage control model of the microgrid in the next sampling period based on the electricity price data curve, the power prediction curve and the power generation prediction curve. The energy storage control model is used to determine the energy storage control commands issued by the control unit to the microgrid at each time step in the next sampling period; The electricity price data curve is predicted based on the historical electricity price data of the microgrid. The historical electricity price data includes the historical electricity price of the microgrid within a first threshold interval and the historical electricity price within a second threshold interval. The historical electricity price within the first threshold interval is higher than the historical electricity price within the second threshold interval.
2. The microgrid energy storage control method according to claim 1, characterized in that, The first prediction model and the second prediction model are trained based on the XGBoost model.
3. The microgrid energy storage control method according to claim 1, characterized in that, The third prediction model is trained based on the Transformer model.
4. The microgrid energy storage control method according to claim 1, characterized in that, The power prediction curve is calculated in step S3 using the following formula: ; in, The power prediction curve; The preset first calculation weight; This is the first predicted sequence; The second calculation weight is preset; This is the second predicted sequence.
5. The microgrid energy storage control method according to claim 1, characterized in that, Step S4 includes: Step S41: The control unit determines the power demand data within the corresponding time step based on the power generation prediction data corresponding to the power generation prediction curve in each time step of the next sampling period and the power prediction data corresponding to the power prediction curve in each time step of the next sampling period. Step S42: The control unit processes the demand power data in each time step within the next sampling period to obtain the corresponding power purchase data and energy storage loss data within the time step. Step S43: Based on the minimum cost rule, the control unit processes the electricity price data, the electricity purchase data, and the energy storage loss data corresponding to the electricity price data curve in each time step of the next sampling period to obtain the energy storage control command for the microgrid in each time step of the next sampling period.
6. The microgrid energy storage control method according to claim 5, characterized in that, The energy storage control command includes either a charging command or a discharging command. The minimum cost rule is expressed by the following formula: ; in, T represents a sampling period, and t represents a single time step within the sampling period; The electricity price data within the t-th time step; The electricity purchase data within the t-th time step; The energy storage loss data within the t-th time step; This is a preset loss constant; The charging power of the charging command within the t-th time step; This is the preset charging efficiency constant; The discharge power of the discharge command within the t-th time step; This is the preset discharge efficiency constant; This is the preset maximum energy storage capacity.
7. The microgrid energy storage control method according to claim 1, characterized in that, After obtaining the energy storage control command within one time step, the following steps are used to predict the state of charge of the microgrid within the next time step: Step A1: Collect the state of charge of the microgrid within the current time step; Step A2: Predict the state of charge for the next time step based on the state of charge within the current time step, the preset energy storage control efficiency, the preset maximum battery capacity, and the energy storage control command within the current time step.
8. The microgrid energy storage control method according to claim 7, characterized in that, Step A2 calculates the state of charge for the next time step using the following formula: ; in, The state of charge within the (t+1)th time step; The state of charge within the t-th time step; The length of a time step; This is the preset maximum battery capacity.
9. A microgrid energy storage control system, applied to a microgrid, characterized in that, The microgrid energy storage control method described in any one of claims 1-8 is adopted; A preset sampling period is set for the microgrid; The energy storage control system is integrated into the control unit of the microgrid, including: The information acquisition module is used to collect the microgrid's operating condition data, power consumption data, and power generation data in the current sampling period, and to acquire the microgrid's meteorological data in the next sampling period. The prediction module, connected to the information acquisition module, is used to output a first prediction sequence based on the operating condition data, output a power generation prediction curve based on the meteorological data, and output a second prediction sequence based on the electricity consumption data and the power generation data. A curve fitting module, connected to the prediction module, is used to process the first prediction sequence and the second prediction sequence to obtain the power prediction curve of the microgrid for the next sampling period; The model building module connects the prediction module and the curve fitting module, and is used to obtain the electricity price data curve of the microgrid in the next sampling period, and construct the energy storage control model of the microgrid in the next sampling period based on the electricity price data curve, the power prediction curve and the power generation prediction curve; An energy storage control module, connected to the model building module, is used to determine the energy storage control commands to be issued to the microgrid in each time step within the next sampling period using the energy storage control model; The electricity price data curve is predicted based on the historical electricity price data of the microgrid. The historical electricity price data includes the historical electricity price of the microgrid within a first threshold interval and the historical electricity price within a second threshold interval. The historical electricity price within the first threshold interval is higher than the historical electricity price within the second threshold interval.