A micro-grid-oriented energy storage battery control method and system
By using an adaptive sliding window weighted regression model and a multi-dimensional dynamic risk assessor, combined with a discrete empirical risk minimization strategy, the problems of prediction lag and insufficient scheduling strategies in the microgrid energy management system are solved, achieving more efficient energy storage battery control and improving the operational stability and power supply reliability of the microgrid.
Patent Information
- Application Number
- CN202611213290.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-11
- Publication Date
- 2026-11-03
AI Technical Summary
Existing microgrid energy management systems suffer from delayed response of prediction models, lack of time propagation perspective in risk assessment, and insufficient adaptability of scheduling strategies. As a result, the regulation potential of energy storage batteries has not been fully realized, and no special risk assessment and scheduling decision-making mechanism has been designed for the operating characteristics of energy storage batteries.
The Adaptive Sliding Window Weighted Regression (ASWF-W) model is used for net load forecasting. Combined with a multi-dimensional dynamic risk assessor and a discrete empirical risk minimization (D-ERM) strategy generation mechanism, an online closed-loop correction mechanism is constructed to improve forecast accuracy and scheduling strategy adaptability.
It improves the speed and accuracy of short-term prediction response, identifies risks of voltage overruns, SOC overruns and power shortages in advance, reduces the number of deep charge and discharge cycles of energy storage batteries, and forms a closed loop of prediction, evaluation, scheduling and correction, thereby improving the operational stability and power supply reliability of the microgrid.
Smart Images

Figure CN123034474A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of microgrid and energy storage control technology, specifically relating to a control method and system for energy storage batteries in microgrids. Background Technology
[0002] As the main form of distributed energy access to the distribution network, the operational stability and power supply reliability of microgrids are highly dependent on the coordinated control among power generation, grid, load and storage.
[0003] Energy storage batteries (such as lithium-ion batteries and aqueous organic flow batteries) are gradually becoming key devices for medium- and long-term energy regulation in microgrids due to their advantages such as fast response speed and flexible adjustment. However, existing microgrid energy management systems have the following shortcomings in their upper-level scheduling methods: (1) Lagging response of prediction model: Traditional time series prediction methods (such as ARIMA and fixed window regression) are slow to respond to sudden fluctuations in photovoltaic output and rapid load transitions, resulting in large power gap prediction errors and mismatch between energy storage charging and discharging commands and actual supply and demand.
[0004] (2) Risk assessment lacks a time propagation perspective: Most methods make decisions based only on the net load or SOC point estimate at the current moment, without considering the cumulative propagation effect of prediction uncertainty over multiple future periods, making it difficult to quantify the probabilistic risks of voltage overruns, frequency deviations, and power supply shortages.
[0005] (3) The scheduling strategy is passive and lacks adaptability: conventional rule scheduling or single optimization strategy cannot adjust the model parameters and decision weights online based on historical execution results and prediction error distribution. The performance degrades significantly in environments with continuously changing weather and load.
[0006] Furthermore, none of the above methods have designed a specific risk assessment and scheduling decision-making mechanism for the operating characteristics of energy storage batteries (such as SOC safety range constraints, upper limits of charge and discharge power, charge and discharge efficiency, etc.), resulting in the energy storage battery's regulation potential not being fully realized.
[0007] Therefore, there is an urgent need for a closed-loop energy management method that can proactively predict power deficits, quantify risks propagating across multiple time periods, and adapt to the operating characteristics of energy storage batteries. Summary of the Invention
[0008] This invention aims to overcome the shortcomings of existing microgrid energy management technologies in terms of prediction accuracy, comprehensive risk assessment, and adaptive scheduling strategies, and provides a control system and method for energy storage batteries in microgrids. Specific objectives include: 1) Proposing an Adaptive Sliding Window Weighted Regression (ASWF-W) model, which improves the tracking ability of power surges through dynamic weight vectors and forgetting factors, while outputting the prediction standard deviation to quantify uncertainty. 2) Constructing a multi-dimensional dynamic risk assessor, which propagates prediction uncertainty to voltage, frequency, SOC, and power shortage risks over multiple future time periods, and uses dimensionless indices to achieve weighted synthesis of various risks. 3) Designing a strategy generation mechanism based on Discrete Empirical Risk Minimization (D-ERM), which integrates historical experience and current predictions to select the scheduling command with the minimum comprehensive risk in a discrete space composed of charge / discharge power levels and reserve levels. 4) Establishing an online closed-loop correction mechanism, which uses actual operating residuals to update prediction model parameters and risk weights, enabling the system to adapt to long-term changes in operating conditions. The method of this invention is applicable to various types of energy storage batteries, especially electrochemical energy storage systems with clearly defined operating characteristics such as SOC safety range constraints and charge / discharge efficiency.
[0009] To achieve the above objectives, the present invention adopts the following technical solution: According to a first aspect of the present invention, a method for controlling energy storage batteries for microgrids is provided, comprising the following steps: Collect microgrid operation data, including photovoltaic output, load power, and state of charge of energy storage batteries; The net load of the system is calculated based on the photovoltaic output and load power, and state-based features are constructed using the net load of the system and the state of charge. An adaptive sliding window weighted regression model is used to predict the system net load for multiple future forecast periods based on the state-defined features, and outputs the predicted mean and standard deviation of the system net load for each forecast period. The adaptive sliding window weighted regression model uses an online-updated adaptive weight vector to differentially weight each component in the state-defined features. Calculate the comprehensive risk value for multiple future time periods based on the predicted mean and standard deviation of the system net load. Based on the discrete empirical risk minimization criterion, the strategy that minimizes the weighted objective function is selected as the optimal energy storage scheduling strategy from the predefined discrete strategy space; the weighted objective function is composed of historical empirical risk, the comprehensive risk value, and operating cost weighted together. The optimal energy storage scheduling strategy is parsed into energy storage charging and discharging commands and issued for execution; and the model parameters of the adaptive sliding window weighted regression model and the risk weight coefficients in the comprehensive risk value are updated online based on the residual between the actual collected system net load and the predicted mean of the system net load.
[0010] Furthermore, the collected microgrid operation data also includes: common coupling point voltage, common coupling point frequency, upper limit of rechargeable power and upper limit of dischargeable power of energy storage batteries, and meteorological data.
[0011] Furthermore, the method for constructing the stateful features includes: Calculate the difference between the net load at the current moment and the net load at the previous moment to obtain the change in net load; A smooth memory vector is constructed, which is a weighted sum of the multidimensional feature vector at the current moment and the smooth memory vector at the previous moment according to a preset smoothing coefficient; wherein, the multidimensional feature vector is composed of the system net load, the state of charge of the energy storage battery and meteorological data.
[0012] Furthermore, the method of using an adaptive sliding window weighted regression model to predict net load for multiple future time periods based on the state-defined features, and simultaneously outputting the net load prediction mean and prediction standard deviation for each prediction period, specifically includes: Construct a sliding time window of length L, and use the historical state-based feature vectors within the window to form the input matrix; The adaptive weight vector is used to perform an element-wise weighted transformation on each feature in the input matrix, and then a weighted feature vector is obtained by passing it through a nonlinear activation function. The adaptive weight vector is updated online using a gradient descent rule with a forgetting factor. In the weighted feature space, the mean and standard deviation of net load forecasts for multiple future periods are calculated simultaneously through a linear regression layer.
[0013] Furthermore, the adaptive sliding window weighted regression model also defines the power gap for each future period as the difference between the net load forecast mean and the maximum adjustable power limit estimate of the energy storage battery under the current state of charge, based on the net load forecast mean and the maximum adjustable power limit estimate. The maximum adjustable power limit is determined linearly in segments according to the safe range of the state of charge: when the state of charge is within the safe range, the maximum adjustable power limit is the rated power; when the state of charge is below the lower limit of the safe range, only charging is allowed and the available charging power decreases linearly; when the state of charge is above the upper limit of the safe range, only discharging is allowed and the available discharging power decreases linearly.
[0014] Furthermore, the comprehensive risk value is a weighted sum of the risks of voltage exceeding limits, frequency deviation, energy storage battery state of charge exceeding limits, and insufficient power supply over multiple future time periods. Each risk is a dimensionless value, and the sum of the weight coefficients corresponding to each risk is 1.
[0015] Furthermore, the upper limit of the predicted net load is defined as the sum of the predicted mean and the predicted standard deviation of the system net load multiplied by a preset coefficient; voltage over-limit risk. and frequency deviation risk Dimensionless normalization is performed in the following way: in, : in the The upper limit of voltage offset is estimated based on the predicted upper limit of net load over a future time period; Voltage over-limit start threshold; Voltage safety limits; : in the The upper bound of frequency offset is obtained based on the net load estimate of the predicted upper bound over a future time period; Frequency deviation start threshold; Frequency safety limits; Risk of out-of-charge state Dimensionless normalization is performed in the following way: in, In candidate strategies Next, the Predicted state of charge for a future time period; This is the safe range for the state of charge; Risk of insufficient power supply Dimensionless normalization is performed in the following way: in, Rated power of the microgrid; : No. Power gap in the future period.
[0016] Furthermore, the predefined discrete strategy space is composed of multiple charging power levels, multiple discharging power levels, and multiple reserve capacity levels. In the weighted objective function, the historical experience risk is calculated based on the average comprehensive risk of the corresponding strategy actually executed in the past multiple scheduling cycles. The operating cost is positively correlated with the square of the charging and discharging power. The weight coefficient of the historical experience risk in the weighted objective function is the balance coefficient, the weight coefficient of the comprehensive risk value is one minus the balance coefficient, and the weight coefficient of the operating cost is the risk-cost balance coefficient.
[0017] Furthermore, parsing the optimal energy storage scheduling strategy into energy storage charging and discharging commands and issuing them for execution specifically includes: parsing the optimal strategy into energy storage charging and discharging power commands, reserve capacity settings, and grid-connected or off-grid operation mode suggestions, and issuing them to the microgrid energy management system; The step of updating the model parameters of the adaptive sliding window weighted regression model and the risk weight coefficients in the comprehensive risk value online based on the residuals between the actual operating data and the predicted values specifically includes: using the residuals between the actual operating data and the predicted values to perform gradient updates on the weight vector and regression coefficients of the adaptive sliding window weighted regression model; simultaneously, using a proportional-integral rule, dynamically adjusting the weight coefficients corresponding to each risk in the comprehensive risk value based on the deviation between the actual number of times the energy storage battery's state of charge exceeds the target number of times it exceeds the limit within the current observation window, and normalizing all the adjusted weight coefficients.
[0018] According to a second aspect of the present invention, a microgrid-oriented energy storage battery control system is also provided for implementing the method of the first aspect, comprising: The data acquisition module is used to collect the operating data of the microgrid, including photovoltaic output, load power, and state of charge of the energy storage battery; A state-based feature construction module is used to calculate the system net load based on the photovoltaic output and load power, and to construct state-based features using the system net load and the state of charge. The adaptive prediction module is used to predict the net load for multiple future time periods based on the state-defined features using an adaptive sliding window weighted regression model, and outputs the predicted mean and standard deviation of the system net load for each prediction period; the adaptive sliding window weighted regression model uses an online-updated adaptive weight vector to differentially weight the input features. The risk assessment module is used to calculate the comprehensive risk value for multiple forecast periods in the future based on the predicted mean and standard deviation of the system net load. The strategy generation module is used to select the strategy that minimizes the weighted objective function as the optimal energy storage scheduling strategy from a predefined discrete strategy space based on the discrete empirical risk minimization criterion; the weighted objective function is composed of historical empirical risk, the comprehensive risk value, and operating cost weighted together. The instruction issuance and correction module is used to parse the optimal energy storage scheduling strategy into energy storage charging and discharging instructions and issue them for execution; and to update the model parameters of the adaptive sliding window weighted regression model and the risk weight coefficients in the comprehensive risk value online based on the residual between the actual collected system net load and the predicted mean of the system net load.
[0019] According to a third aspect of the present invention, an electronic device is also provided, comprising: a processor, a memory, and a system bus; the processor and the memory are connected via the system bus; the memory is used to store one or more programs, the one or more programs including instructions, which, when executed by the processor, cause the processor to perform the steps of the method described in the second aspect.
[0020] Compared with the prior art, the present invention achieves the following beneficial effects: 1. Improved short-term forecast response speed and accuracy: Compared to the fixed-window ARIMA model, the net load forecast MAE is reduced by approximately 18%.
[0021] 2. Risk assessment expands from point judgment to multi-period propagation: the early identification rate (risk exceeds the alarm threshold at least one control cycle before the event occurs) is improved by approximately 12%, 15%, and 20% for voltage over-limit, SOC over-limit, and power supply under-limit, respectively.
[0022] 3. The scheduling strategy has been changed from passive compensation to active planning: the number of deep charge and discharge cycles of the SOC has been reduced by about 65%.
[0023] 4. Forming a closed loop of prediction, evaluation, scheduling, and correction: Under seasonal switching conditions, the prediction error converges to a steady state after several online adaptive scheduling cycles.
[0024] It should be understood that the description in the Summary of the Invention is not intended to limit the key or essential features of the embodiments of the present invention, nor is it intended to restrict the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0025] The above and other features, advantages, and aspects of the various embodiments of the present invention will become more apparent from the accompanying drawings and the following detailed description. The drawings are provided for a better understanding of the invention and are not intended to limit the invention. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein: Figure 1 A flowchart of an energy storage battery control method for microgrids according to an embodiment of the present invention is shown; Figure 2 This is a schematic diagram of the overall structure of the control system according to an embodiment of the present invention; Figure 3 This is a flowchart of the ASWF-W model prediction process according to an embodiment of the present invention; Figure 4 This is a flowchart of the risk assessment and D-ERM decision-making process according to an embodiment of the present invention; Figure 5 A schematic diagram of a module of an energy storage battery control system for microgrids according to an embodiment of the present invention is shown. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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.
[0027] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0028] Example 1: Figure 1 A flowchart of an energy storage battery control method for microgrids according to an embodiment of the present invention is shown; Figure 2 This is a schematic diagram of the overall structure of the control system according to an embodiment of the present invention. The present invention provides a control method and system for energy storage batteries in microgrids, applicable to energy management and optimized scheduling of microgrids including distributed photovoltaics, uncertain loads, and energy storage batteries. The control object of the present invention is the coordinated operation and energy management of source-grid-load-storage at the microgrid level, and does not involve the voltage, frequency, and synchronization control loops within the grid-connected converter. The method includes the following steps: S1: Collect microgrid operation data, including photovoltaic output, load power, and state of charge of energy storage batteries; Step S1 is used to collect microgrid operating data. The collected microgrid operating data includes: actual photovoltaic output, actual load power, microgrid point-of-compatibility voltage and frequency, energy storage battery state of charge, maximum rechargeable power, and maximum dischargeable power, and meteorological data. Specifically: Photovoltaic power output (Unit: kW) Load power (Unit: kW) Microgrid common coupling point voltage (Unit: V), Frequency (Unit: Hz); State of charge of flow battery (dimensionless, Maximum rechargeable power (Unit: kW) Maximum discharge power (Unit: kW) Meteorological data (light intensity, temperature, etc.) .
[0029] S2: Calculate the system net load based on the photovoltaic output and load power, and construct state-based features using the system net load and the state of charge; Furthermore, the method for constructing state-based features includes: calculating the difference between the net load at the current moment and the net load at the previous moment to obtain the net load change; constructing a smoothed memory vector, wherein the smoothed memory vector is a weighted sum of the multidimensional feature vector at the current moment and the smoothed memory vector at the previous moment according to a preset smoothing coefficient; wherein the multidimensional feature vector is composed of the system net load, the state of charge of the energy storage battery, and meteorological data. Specifically, as follows: First, define the system net load. : Then, construct the state increment. With smooth memory items : in, The change in net load between two adjacent moments is the difference between the current net load and the previous net load, expressed in kW. For the reason Multidimensional feature vectors with equal variable combinations This is the smoothing coefficient (default value is 0.3). It is a smooth memory vector.
[0030] Thus, the state-defined feature vector at the current time t is obtained. : The above operations transform the original time series into a stateful feature vector containing trend and abrupt change information. This stateful feature vector integrates the current net load value, change trend, smoothing historical information, energy storage status, and environmental factors, serving as input for subsequent prediction models.
[0031] S3: Using an adaptive sliding window weighted regression model, the net load for multiple future forecast periods is predicted based on the state-defined features, outputting the system net load forecast mean and standard deviation for each forecast period. The adaptive sliding window weighted regression model uses an online-updated adaptive weight vector to differentially weight each component in the state-defined features. Step S3 implements short-term net load forecasting and power gap calculation based on the adaptive sliding window weighted regression (ASWF-W) model. Specific process: Construct a sliding time window of length L, and use the historical state-defined feature vectors within the window to form an input matrix; use the adaptive weight vector to perform element-wise weighted transformation on each feature in the input matrix, and obtain a weighted feature vector through a nonlinear activation function; use a gradient descent rule with a forgetting factor to update the adaptive weight vector online; in the weighted feature space, simultaneously calculate the net load forecast mean and standard deviation for multiple future forecast periods through a linear regression layer. Details are as follows: Build length is A sliding time window is used to construct the input matrix from the historical state-based feature vectors within the window. for: in, It is a stateful feature vector. The window length (default 96 sampling points, corresponding to 24 hours, sampling period 15 minutes).
[0032] The ASWF-W model proposed in this invention uses adaptive weight vectors. ( for (dimensionality) Perform an element-wise weighted transformation (Hadamard product) and then pass it through a nonlinear activation function σ(·) to obtain the weighted feature vector. : in, For element-wise multiplication, This is a non-linear activation function (either ReLU or tanh). This operation does not change the vector dimension and is designed to assign differentiated real-time weights to different features.
[0033] Weight vector Using a forgetting factor Gradient descent rule update: in, This is the forgetting factor (value range 0.7~0.95, default 0.85). The learning rate (default 0.01). Here is the loss function. The loss function is in the form of a weighted mean squared error: here This represents the batch sample size. For the first The actual net load value of each sample For predicted values, Weights that increase over time (recent samples have higher weights, for example) ).
[0034] In the weighted feature space, a linear regression layer is used to simultaneously predict the future. Mean and standard deviation of net load for each time period: in, This is the regression coefficient matrix. The projected average net load for the first future time period (i.e., the next control cycle) is expressed in kW. This is an estimate of the standard deviation of the net load forecast uncertainty for the first future period, in kW.
[0035] The initial value is obtained by looking at the past The exponentially weighted root mean square estimate of the residuals for each time period is set as follows: in, The initial value of the predicted standard deviation, calculated using the weighted root mean square of historical residuals, is used to initialize the regression coefficients at the k-th future time period. The output is expressed in kW. To initialize the window length (default 96 periods, or 24 hours). This is the forgetting factor (consistent with the value used in weight updates). This initial value... Used for setting The output, subsequent It adapts and adjusts automatically during the online update process.
[0036] Furthermore, the adaptive sliding window weighted regression model defines the power gap for each future period as the difference between the net load forecast mean and the estimated maximum adjustable power limit of the energy storage battery under the current state of charge, based on the net load forecast mean and the maximum adjustable power limit estimate. The maximum adjustable power limit is determined piecewise linearly according to the safe range of the state of charge: when the state of charge is within the safe range, the maximum adjustable power limit is the rated power; when the state of charge is below the lower limit of the safe range, only charging is allowed, and the available charging power decreases linearly; when the state of charge is above the upper limit of the safe range, only discharging is allowed, and the available discharging power decreases linearly. Specifically: Define power gap : here This is an estimate of the maximum adjustable power limit (in kW) under the current SOC boundary conditions, used to measure the system's regulation capability, and is independent of the actual charge and discharge power executed by each candidate strategy in step four. This limit is calculated based on the piecewise linear rule of SOC: SOC within the safe range... (e.g., within 0.3 to 0.8) the usable power is the rated value. (e.g., 100kW); SOC lower than Charging is only permitted at this time, and the available charging power decreases linearly; when the SOC is higher than [the specified value], the charging power is [not specified]. Discharge is only permitted at this time, and similar treatment applies.
[0037] Relative tolerance of power deficit (Descriptive indicators, not directly used for risk summation): For a very small positive number (such as Prevent division by zero. This is a mathematical function that takes the larger of two parameters.
[0038] S4: Calculate the comprehensive risk value for multiple forecast periods based on the predicted mean and standard deviation of the system net load; S4 is used to implement predictive risk propagation assessment.
[0039] The comprehensive risk value is the weighted sum of the risks of voltage exceeding limits, frequency deviation, energy storage battery state of charge exceeding limits, and insufficient power supply over multiple future time periods. All risks are dimensionless values, and the sum of the weight coefficients corresponding to each risk is 1.
[0040] All risk items are dimensionless, and their range of values is defined. Defining the Future Comprehensive risk in each period : in: For risk weighting coefficients, satisfying The initial default values are 0.2, 0.2, 0.3, and 0.3. : No. Voltage over-limit risk value for a future time period, dimensionless, range of values. ; : No. Frequency deviation risk value for a future time period, dimensionless, range of values. ; : No. The SOC out-of-bounds risk value for a future time period, dimensionless, with a range of values. ; : No. The power shortage risk value for a future time period, dimensionless, with a range of values. .
[0041] Each risk item , , , The specific calculations are as follows: ① Risk of voltage exceeding limits : Use the upper bound of the prediction (mean) A conservative estimate is made using multiple standard deviations. Choose 1 or 2. Define the upper bound of the predicted net load as the sum of the predicted mean and predicted standard deviation of the system net load multiplied by a preset coefficient. The formula for calculating the upper bound of the predicted net load is as follows: in, : in the Over a future time period, the upper bound of the net load forecast is equal to the forecast mean. Plus Multiple of the prediction standard deviation , unit kW.
[0042] Voltage offset estimated using a linear sensitivity model: in, : in the The upper limit of voltage offset, in V, is the estimated upper limit of net load over a future time period based on the predicted upper limit of net load. Voltage sensitivity coefficient for offline calibration (unit: In this example, 0.02V / kW is used (for a 380V low-voltage microgrid). The voltage over-limit risk is normalized as follows: in, Voltage over-limit start threshold, in V (e.g., 0.95 times the rated voltage). Voltage safety limit, in volts (e.g., 1.05 times the rated voltage).
[0043] ② Frequency deviation risk Similarly, in, Frequency sensitivity coefficient (unit: (The example uses 0.005 Hz / kW). The frequency deviation risk is: in, : in the The upper bound of frequency offset, in Hz, is the estimated net load based on the predicted upper bound over a future time period. Frequency deviation start-up threshold, in Hz; Frequency safety limit, in Hz.
[0044] ③ Risk of exceeding the state of charge (SOC) limit for energy storage batteries In the candidate strategy When conducting risk assessment, the strategy Corresponding charging and discharging power , Substituting into the SOC recursive formula: in, This represents the charge / discharge efficiency (dimensionless, default 0.92). Rated capacity of the battery (unit: kWh). The control period is defined as (unit: hours, 0.25 hours for the example). SOC out-of-bounds risk is defined as: in, This is the SOC safety range (0.3 to 0.8 in this example). In candidate strategies Next, the The predicted state of charge for a future time period, dimensionless (0~1). The maximum value among the three parameters (0 and two risk components) is taken as the mathematical function of SOC out-of-bounds risk.
[0045] ④ Risk of insufficient power supply Dimensionless processing: here The rated power of the microgrid is given in kW (100 kW for the example).
[0046] S5: Based on the Discrete Empirical Risk Minimization (D-ERM) criterion, the strategy that minimizes the weighted objective function is selected as the optimal energy storage scheduling strategy in the predefined discrete strategy space; the weighted objective function is composed of historical empirical risk, the comprehensive risk value, and operating cost weighted together. Step S5 is used to generate a risk-driven energy storage strategy based on D-ERM.
[0047] Define the discrete policy space It consists of a combination of multiple charging power levels, multiple discharging power levels, and multiple reserve capacity levels. Number of charging power levels (Including 0 gear), number of discharge gears (Including level 0), number of standby capacity levels In the standard implementation of charge-discharge mutual exclusion, the number of effective strategies is... for: For example, Therefore, the effective strategy number is 27. In another optional embodiment, if the aqueous organic flow battery allows simultaneous charging and discharging, the strategy number is... .
[0048] This invention employs Discrete Empirical Risk Minimization (D-ERM): In the weighted objective function, historical empirical risk is calculated based on the average comprehensive risk of the corresponding strategy actually executed over multiple past scheduling cycles, and the operating cost is positively correlated with the square of the charging and discharging power. Specifically: For each candidate strategy Calculate the weighted objective: in, The candidate strategy that minimizes the weighted objective function is the optimal energy storage scheduling strategy. Risk-cost balance coefficient (default 0.05), dimensionless. Based on the past The actual execution strategy for each scheduling cycle The historical average of composite risk (statistical empirical risk) over time. The length of the history window (range of values) (Default 10). The balance coefficient between historical experience and current predictions (0~1, default 0.2). To execute the strategy in the current prediction scenario in step S3 The comprehensive risks of the future; This is the risk-cost balance factor (default 0.05). This is a dimensionless operating cost function, such as the ratio of the sum of the squares of the charge and discharge power to the square of the rated power. This is used to suppress the reduction in battery life caused by high-power charging and discharging.
[0049] S6: Parse the optimal energy storage scheduling strategy into energy storage charging and discharging commands and issue them for execution; and based on the residual between the actual collected system net load and the predicted mean of the system net load, update the model parameters of the adaptive sliding window weighted regression model and the risk weight coefficient in the comprehensive risk value online.
[0050] Step S6 is used to implement instruction issuance and closed-loop rolling correction.
[0051] Parsing the optimal energy storage scheduling strategy into energy storage charging and discharging commands and issuing them for execution specifically includes: parsing the optimal strategy into energy storage charging and discharging power commands, reserve capacity settings, and grid-connected or off-grid operation mode suggestions, and issuing them to the microgrid energy management system. Details are as follows: The optimal strategy Parsing into specific instructions: (1) Energy storage charging and discharging power command ;in, Optimal Strategy The parsed energy storage charging power command, in kW. Optimal Strategy The energy storage discharge power command obtained from the analysis, in kW.
[0052] (2) Reserve capacity setting (such as adjusting the lower limit of SOC).
[0053] (3) Recommendations for parallel / offline operation modes.
[0054] The instructions are issued from the microgrid energy management system to the grid converter and energy storage battery management system.
[0055] Furthermore, based on the residual between the collected system net load and the predicted mean of the system net load, the online updating of the model parameters of the adaptive sliding window weighted regression model and the risk weight coefficients in the comprehensive risk value specifically includes: using the residual between the actual collected system net load and the predicted mean of the system net load to perform gradient updates on the weight vector and regression coefficients of the adaptive sliding window weighted regression model; simultaneously, using a proportional-integral rule, based on the deviation between the actual number of times the energy storage battery's state of charge exceeds the target number of times it exceeds the limit, the weight coefficients corresponding to each risk in the comprehensive risk value are dynamically adjusted, and all adjusted weight coefficients are normalized. Specifically, as follows: In the next control cycle, collect actual values. Compared with the predicted value residual Using the residuals to weight the ASWF-W and regression coefficients Perform small-step gradient updates (along the negative gradient direction of the loss function). : No. Actual measured value at any given time (e.g., actual system net load or actual power), in kW. : No. The predicted value at time (the predicted net system load output by the ASWF-W model), in kW. : No. The prediction residual at time t, in kW.
[0056] At the same time, risk weights Adaptive adjustment is performed using a proportional-integral rule (with... (For example) in: For proportional and integral coefficients (default 0.1 and 0.05); Current observation window The number of actual SOC out-of-bounds events within 24 hours; The target number of out-of-bounds violations (e.g., no more than once per day); the scoring item is only applied to the most recent violations. Accumulate within a window to prevent points from saturating. : in the The number of SOC out-of-bounds events that actually occur within each observation window is dimensionless. : Length of the observation window (e.g., 24 hours), in hours.
[0057] After the update, all ownership rights will be unified to ensure... Similar rules apply to other risk weights.
[0058] Through the above mechanism, a closed loop of prediction, evaluation, decision-making, and correction is formed as the operational data iterates.
[0059] Example 2: This second embodiment uses a set of actual microgrid parameters as an example to illustrate the implementation process of the present invention in detail.
[0060] (a) Microgrid configuration: 1. Energy storage battery (taking aqueous organic flow battery as an example): rated power 100kW, rated capacity 400kWh, charge and discharge efficiency 92%, SOC safety range [0.3, 0.8].
[0061] 2. Distributed photovoltaic: peak power 200kWp.
[0062] 3. Load: Typical residential / commercial mixed load, with a daily peak-to-valley difference of approximately 80kW.
[0063] 4. Rated power of microgrid The grid connection point voltage is 380V and the frequency is 50Hz.
[0064] (II) Control Parameter Settings: Control cycle Hour (15 minutes), prediction time domain (Next hour).
[0065] Sliding window length (24-hour data).
[0066] ASWF-W model: Forgetting factor Learning rate Activation function ReLU is used, and the recent weights in the weighted MSE loss function increase linearly. ).
[0067] Prediction uncertainty coefficient (One standard deviation).
[0068] Voltage sensitivity (For 380V systems), voltage threshold (0.95 pu) 399 V (1.05 pu).
[0069] Frequency sensitivity Frequency threshold , .
[0070] Initial value of risk weight .
[0071] Strategy Space: Charging Levels (Including setting 0: 0, 25, 50, 75, 100% rated power), discharge settings (Symmetrical), standby level (Low: SOC lower limit 30%, Medium: 35%, High: 40%). Charge and discharge are mutually exclusive, effective strategy number (5+5-1)×3=27.
[0072] D-ERM parameters: history window (2.5 hours), balance coefficient Risk-cost balance coefficient Cost function .
[0073] Adaptive Risk Weights: Observation Window Hours, SOC crosses the boundary target Times / day, PI coefficient , .
[0074] (III) Example of the operation process (taking 10:00 AM on a cloudy day as an example): 1. The system reads data from the past 24 hours, including photovoltaic power, load, and SOC, and constructs a state-based feature vector. .
[0075] 2. The ASWF-W model outputs the average net load for the next hour. and standard deviation Assuming the current net load is approximately 30kW, and a predicted sudden drop in photovoltaic power due to cloud cover in the next 0.5 hours, the net load will jump to 70kW, with a standard deviation of 10kW.
[0076] 3. Calculate the upper limit of the prediction: 70 + 10 = 80 kW. Substitute this into the voltage sensitivity to obtain... The voltage risk is 0 as it is below the 361 V threshold. The current SOC is 0.65. Enumerating the SOC trajectory for each candidate strategy, the charging strategy will cause the SOC to rise to around 0.8, triggering the SOC risk; the discharging strategy will alleviate the power supply gap but reduce the SOC.
[0077] 4. Risk of insufficient power supply: If the available discharge power is 80 kW, the gap is very small, and Risk_supply≈0.
[0078] 5. D-ERM iterates through 27 policies and calculates the cost of each policy. Historical experience shows that the medium-power discharge strategy has the lowest risk in similar past scenarios, and current forecasts also support the discharge. Ultimately, a strategy with a discharge power of 50 kW and a reserve level (35% lower SOC) was selected.
[0079] 6. The command is sent to the EMS, and the converter performs a discharge. In the next control cycle, the actual net load is 68kW, and the predicted residual is -2kW, which is used for updating. Simultaneously, it counts one instance of SOC exceeding the limit (equal to the target) in the past 24 hours, with a weight. It remains unchanged.
[0080] In a 30-day rolling simulation, compared with the fixed-window ARIMA + threshold rule, this embodiment reduced the number of SOC deep charge / discharge cycles (<20% or >90%) by 65%, verifying the effectiveness of the present invention.
[0081] Figure 5A schematic diagram of a module of an energy storage battery control system for microgrids, according to an embodiment of the present invention, is shown. Figure 5 As shown, the system includes: The data acquisition module 210 is used to collect the operating data of the microgrid, including photovoltaic output, load power and the state of charge of the energy storage battery; The state-based feature construction module 220 is used to calculate the system net load based on the photovoltaic output and load power, and to construct state-based features using the system net load and the state of charge. The adaptive prediction module 230 is used to predict the net load for multiple future prediction periods based on the state-defined features using an adaptive sliding window weighted regression model, and outputs the predicted mean and standard deviation of the system net load for each prediction period; the adaptive sliding window weighted regression model uses an online-updated adaptive weight vector to differentially weight the input features. The risk assessment module 240 is used to calculate the comprehensive risk value for multiple future time periods based on the predicted mean and predicted standard deviation of the system net load. The strategy generation module 250 is used to select the strategy that minimizes the weighted objective function as the optimal energy storage scheduling strategy in a predefined discrete strategy space based on the discrete empirical risk minimization criterion; the weighted objective function is composed of historical empirical risk, the comprehensive risk value, and operating cost weighted together. The instruction issuance and correction module 260 is used to parse the optimal energy storage scheduling strategy into energy storage charging and discharging instructions and issue them for execution; and to update the model parameters of the adaptive sliding window weighted regression model and the risk weight coefficient in the comprehensive risk value online based on the residual between the actual collected system net load and the predicted mean of the system net load.
[0082] The energy storage battery control system for microgrids provided in this embodiment of the invention can execute the energy storage battery control method for microgrids provided in any of the above embodiments of the invention, and has the corresponding functions and beneficial effects of executing the method. For details, please refer to the relevant operations of the energy storage battery control method for microgrids in the foregoing embodiments.
[0083] Furthermore, embodiments of this application also provide an electronic device, including: a processor, a memory, and a system bus; the processor and the memory are connected via the system bus; the memory is used to store one or more programs, the one or more programs including instructions, which, when executed by the processor, cause the processor to perform any of the methods described above.
[0084] Furthermore, this application also provides a computer program product that, when run on a terminal device, causes the terminal device to execute any of the methods described above.
[0085] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0086] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0087] It should also be noted that, in the embodiments of this application, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0088] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined in the embodiments of this application may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown in this application, but is to be accorded the widest scope consistent with the principles and novel features disclosed in the embodiments of this application.
Claims
1. A control method for energy storage batteries in microgrids, characterized in that, Includes the following steps: Collect microgrid operation data, including photovoltaic output, load power, and state of charge of energy storage batteries; The net load of the system is calculated based on the photovoltaic output and load power, and state-based features are constructed using the net load of the system and the state of charge. An adaptive sliding window weighted regression model is used to predict the system net load for multiple future forecast periods based on the state-defined features, and outputs the predicted mean and standard deviation of the system net load for each forecast period. The adaptive sliding window weighted regression model uses an online-updated adaptive weight vector to differentially weight each component in the state-defined features. Based on the predicted mean and standard deviation of the system net load, calculate the comprehensive risk value for multiple future forecast periods; Based on the discrete empirical risk minimization criterion, the strategy that minimizes the weighted objective function is selected as the optimal energy storage scheduling strategy from the predefined discrete strategy space; the weighted objective function is composed of historical empirical risk, the comprehensive risk value, and operating cost weighted together. The optimal energy storage scheduling strategy is parsed into energy storage charging and discharging commands and then issued for execution. Based on the residual between the actual collected system net load and the predicted mean of the system net load, the model parameters of the adaptive sliding window weighted regression model and the risk weight coefficients in the comprehensive risk value are updated online.
2. The energy storage battery control method for microgrids according to claim 1, characterized in that, The collected microgrid operation data also includes: common coupling point voltage, common coupling point frequency, upper limit of rechargeable power and upper limit of dischargeable power of energy storage batteries, and meteorological data.
3. The energy storage battery control method for microgrids according to claim 1 or 2, characterized in that, The method for constructing the stateful features includes: Calculate the difference between the current system net load and the previous system net load to obtain the change in system net load; A smooth memory vector is constructed, which is a weighted sum of the multidimensional feature vector at the current moment and the smooth memory vector at the previous moment according to a preset smoothing coefficient; wherein, the multidimensional feature vector is composed of the system net load, the state of charge of the energy storage battery and meteorological data.
4. The energy storage battery control method for microgrids according to claim 1, characterized in that, The method of using an adaptive sliding window weighted regression model to predict the system net load for multiple future forecast periods based on the state-defined features, and outputting the predicted mean and standard deviation of the system net load for each forecast period, specifically includes: Construct a sliding time window of length L, and use the historical state-based feature vectors within the window to form the input matrix; The adaptive weight vector is used to perform an element-wise weighted transformation on each feature in the input matrix, and then a weighted feature vector is obtained by passing it through a nonlinear activation function. The adaptive weight vector is updated online using a gradient descent rule with a forgetting factor. In the weighted feature space, the mean and standard deviation of the system net load forecast for multiple future forecast periods are calculated simultaneously through a linear regression layer.
5. The energy storage battery control method for microgrids according to claim 4, characterized in that, The adaptive sliding window weighted regression model further defines the power gap for each future period as the difference between the system net load forecast mean and the maximum adjustable power limit estimate of the energy storage battery under the current state of charge, based on the system net load forecast mean and the maximum adjustable power limit estimate. The maximum adjustable power limit is determined by a piecewise linear calculation based on the safe range of the state of charge: when the state of charge is within the safe range, the maximum adjustable power limit is the rated power; when the state of charge is below the lower limit of the safe range, only charging is allowed and the available charging power decreases linearly; when the state of charge is above the upper limit of the safe range, only discharging is allowed and the available discharging power decreases linearly.
6. The energy storage battery control method for microgrids according to claim 5, characterized in that, The comprehensive risk value is a weighted sum of the risks of voltage exceeding limits, frequency deviation, energy storage battery state of charge exceeding limits, and insufficient power supply over multiple predicted periods in the future. Each risk is a dimensionless value, and the sum of the weight coefficients corresponding to each risk is 1.
7. The energy storage battery control method for microgrids according to claim 6, characterized in that, The upper limit of the predicted net load is defined as the sum of the predicted mean and the predicted standard deviation of the system net load multiplied by a preset coefficient. Voltage over-limit risk and frequency deviation risk Dimensionless normalization is performed in the following way: in, : in the The upper limit of voltage offset is estimated based on the predicted upper limit of net load over a future time period; Voltage over-limit start threshold; Voltage safety limits; : in the The upper bound of frequency offset is obtained based on the net load estimate of the predicted upper bound over a future time period; Frequency deviation start threshold; Frequency safety limits; Risk of out-of-charge state Dimensionless normalization is performed in the following way: in, In candidate strategies Next, the Predicted state of charge for a future time period; This is the safe range for the state of charge; Risk of insufficient power supply Dimensionless normalization is performed in the following way: in, Rated power of the microgrid; : No. Power gap in the future period.
8. The energy storage battery control method for microgrids according to claim 1, characterized in that, The predefined discrete strategy space is composed of multiple charging power levels, multiple discharging power levels, and multiple reserve capacity levels. In the weighted objective function, the historical experience risk is calculated based on the average comprehensive risk of the corresponding strategy actually executed in the past multiple scheduling cycles. The operating cost is positively correlated with the square of the charging and discharging power. The weight coefficient of the historical experience risk in the weighted objective function is the balance coefficient, the weight coefficient of the comprehensive risk value is one minus the balance coefficient, and the weight coefficient of the operating cost is the risk-cost balance coefficient.
9. The energy storage battery control method for microgrids according to claim 1, characterized in that, The process of parsing the optimal energy storage scheduling strategy into energy storage charging and discharging commands and issuing them for execution specifically includes: parsing the optimal strategy into energy storage charging and discharging power commands, reserve capacity settings, and grid-connected or off-grid operation mode suggestions, and issuing them to the microgrid energy management system. The step of updating the model parameters of the adaptive sliding window weighted regression model and the risk weight coefficients in the comprehensive risk value online based on the residual between the actual collected system net load and the predicted mean of the system net load specifically includes: using the residual between the actual collected system net load and the predicted mean of the system net load to perform gradient updates on the weight vector and regression coefficients of the adaptive sliding window weighted regression model; simultaneously, using a proportional-integral rule, dynamically adjusting the weight coefficients corresponding to each risk in the comprehensive risk value based on the deviation between the actual number of times the energy storage battery's state of charge exceeds the target number of times it exceeds the limit within the current observation window, and normalizing all the adjusted weight coefficients.
10. A battery storage control system for microgrids, characterized in that, For implementing the method of any one of claims 1 to 9, comprising: The data acquisition module is used to collect the operating data of the microgrid, including photovoltaic output, load power, and state of charge of the energy storage battery; A state-based feature construction module is used to calculate the system net load based on the photovoltaic output and load power, and to construct state-based features using the system net load and the state of charge. An adaptive prediction module is used to predict the system net load for multiple future prediction periods based on the state-defined features using an adaptive sliding window weighted regression model, and outputs the predicted mean and standard deviation of the system net load for each prediction period; the adaptive sliding window weighted regression model uses an online-updated adaptive weight vector to differentially weight each component in the state-defined features. The risk assessment module is used to calculate the comprehensive risk value for multiple forecast periods in the future based on the predicted mean and standard deviation of the system net load. The strategy generation module is used to select the strategy that minimizes the weighted objective function as the optimal energy storage scheduling strategy from a predefined discrete strategy space based on the discrete empirical risk minimization criterion; the weighted objective function is composed of historical empirical risk, the comprehensive risk value, and operating cost weighted together. The instruction issuance and correction module is used to parse the optimal energy storage scheduling strategy into energy storage charging and discharging instructions and issue them for execution; and to update the model parameters of the adaptive sliding window weighted regression model and the risk weight coefficients in the comprehensive risk value online based on the residual between the actual collected system net load and the predicted mean of the system net load.
