A Battery System Optimization Method Based on Dynamic Prediction

CN122288047BActive Publication Date: 2026-09-01SHAANXI WINDRIDERPOWER CO LTD +3
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202610728167.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-26
Publication Date
2026-09-01
Estimated Expiration
2046-05-26

AI Technical Summary

Technical Problem

这样一来,优化器会在看起来可行的前提下给出计划,但计划下发后又被执行层限功率或裁剪,调度侧看到偏差后容易把它误判为预测不准而频繁纠偏,最终形成计划反复改、执行反复被改的循环,表现为策略抖动、运行状态悄然偏移、目标难以兑现且问题根因难以定位

Benefits of technology

本发明围绕负荷与光伏不确定性导致的调度偏差放大这一核心矛盾,将预测信息、误差规律与电池可调能力在同一决策链条中统一组织:先以近期偏差特征对预测结果进行包络化表达,使调度不再依赖单一路径预测;再通过对预测稳定程度与电池可用调节空间的量化刻画,并经学习模型形成统一的稳健调度尺度,使滚动优化在生成充放电计划时能够主动预留必要的纠偏余量而不过度保守;随后以主执行轨迹与可控修正空间相配合,并通过一致性校核触发受控修正,使实际运行在遇到突发波动时仍能保持调整平滑、指令可执行且不易被保护机制频繁打断。由此,本发明能够在云储能、光伏配储及动力或储能电池的调度场景中有效降低预测偏差连续传导造成的策略突变与运行不稳定,提升充放电安排的可执行性与运行可靠性,并兼顾运行效果与长期可持续运行需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122288047B_ABST
    Figure CN122288047B_ABST
Patent Text Reader

Abstract

This invention discloses a battery system optimization method based on dynamic prediction, specifically relating to the field of battery system scheduling optimization. It addresses the problem of continuous propagation of prediction errors leading to policy abrupt changes and operational instability in existing rolling optimization methods. The method constructs a net load envelope by collecting error characteristics and a prediction update comparison sequence. It then calculates the prediction update disturbance energy ratio index and the bidirectional boundary available adjustable energy coverage index, inputting them into a learning model to generate robust scheduling coefficient adjustment constraints. A rolling optimization model is established to generate a baseline power sequence and separates the remaining adjustment amount for execution. Consistency verification triggers constrained correction, achieving deviation containment and smooth adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of battery system scheduling optimization, and more specifically, to a battery system optimization method based on dynamic prediction. Background Technology

[0002] In practical applications of power batteries or energy storage batteries, power stations often need to dynamically predict based on information such as load changes, renewable energy output fluctuations, and energy consumption strategies, and then generate charging and discharging optimization schemes for a period of time to balance comprehensive objectives such as stable energy supply, operating costs, and equipment safety. Existing technologies, such as the prior art document "Predictive Optimization Method, System, Equipment and Medium for Highway Integrated Energy System" (application number 202311539412.8), have proposed an approach to optimization decision-making based on prediction results. By establishing optimization objectives and outputting corresponding operating strategies, more reasonable energy allocation and scheduling arrangements can be achieved in integrated energy scenarios.

[0003] However, when the aforementioned predictive optimization approach is actually implemented in a battery system, a more subtle and difficult-to-handle key contradiction often arises: the battery constraints upon which the upper-level optimization generates the charge / discharge plan may subtly differ from the actual allowable constraints at the execution level during operation. Because the battery management system (BMS) adjusts its model or parameters during operation to adapt to changes in battery state and safety strategies, it alters the allowable charge / discharge capacity, protection trigger logic, and the criteria for judging battery state. The optimization and scheduling side is often unaware that these changes are still using the old constraints for prediction and solution. As a result, the optimizer may generate a plan that appears feasible, but after the plan is issued, it may be subject to power limiting or pruning at the execution level. The scheduling side, seeing the deviation, may misjudge it as inaccurate prediction and frequently correct it, ultimately creating a cycle of repeated plan and execution changes. This manifests as strategy jitter, subtle shifts in operating state, difficulty in achieving objectives, and difficulty in pinpointing the root cause of the problem.

[0004] To address the aforementioned problems, a technical solution is provided. Summary of the Invention

[0005] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a battery system optimization method based on dynamic prediction. This method constructs a net load envelope by collecting error characteristics and a predicted update comparison sequence. It calculates the predicted update disturbance energy ratio index and the bidirectional boundary available adjustable energy coverage index, inputs them into a learning model to generate robust scheduling coefficient adjustment constraints, establishes a rolling optimization model to generate a baseline power sequence, and executes the remaining adjustment separately. Consistency verification triggers constrained correction, achieving deviation containment and smooth adjustment to solve the problems mentioned in the background art.

[0006] To achieve the above objectives, the present invention provides the following technical solution: S1: Obtain the current operating status parameters of the battery system and the grid-connected power constraints, read the load prediction sequence and photovoltaic output prediction sequence in the prediction time domain, summarize the prediction residual sequence of the previous update cycle to form error characteristics, and retain the load prediction sequence and photovoltaic output prediction sequence of the previous update cycle as prediction update comparison sequences. S2: Based on the error characteristics, the load prediction sequence and the photovoltaic output prediction sequence are shifted in the same direction, and then the shifted sequences are expanded both upwards and downwards to obtain the net load envelope covering the prediction time domain and output the upper and lower bound sequences. S3: Calculate the predicted update disturbance energy ratio index based on the load forecast sequence and the predicted update comparison sequence, and the photovoltaic output forecast sequence and the predicted update comparison sequence. Calculate the bidirectional boundary available adjustable energy band based on the operating state parameters and normalize it relative to the net load envelope energy span to obtain the bidirectional boundary available adjustable energy coverage index. Input the two indices into a pre-trained multilayer perceptron learning model to obtain robust scheduling coefficients. The pre-trained multilayer perceptron learning model includes an input layer, three hidden layers, and an output layer. The input layer receives the predicted update disturbance energy ratio index and the bidirectional boundary available adjustable energy coverage index. The output layer outputs robust scheduling coefficients with values ​​ranging from 0 to 1. Based on this, determine the energy storage state reserve and constraint tightening intensity to establish a rolling optimization model. S4: Solve the rolling optimization model to obtain the baseline power sequence covering the prediction time domain, and summarize the feasible margins of the baseline power sequence under the power boundary and energy boundary as the residual adjustment amount; S5: Execute the current period value of the reference power sequence and calculate the actual net load. Check the consistency with the net load envelope. If it falls within the range, proceed according to the reference power sequence. If it exceeds the range, correct the current period value of the reference power sequence under the remaining adjustment limit, and generate a new prediction residual sequence to update the error characteristics before entering the next update cycle.

[0007] Furthermore, step S1 includes reading the current state of charge, current charging and discharging power, and rated capacity of the battery system in real time from the battery management system; reading the maximum injected power limit and the maximum extracted power limit from the grid-connected scheduling command; reading the load forecast sequence and photovoltaic output forecast sequence in the forecast time domain and calculating the current net load forecast sequence; summarizing the load forecast residual sequence and photovoltaic output forecast residual sequence of the previous update cycle to calculate the deviation direction index and deviation amplitude range index to form an error feature vector; and retaining the load forecast sequence and photovoltaic output forecast sequence of the previous update cycle as the forecast update reference sequence.

[0008] Furthermore, step S2 includes calculating the comprehensive deviation direction index as the load deviation direction index minus the photovoltaic deviation direction index, calculating the offset amplitude base as a preset proportional coefficient multiplied by the sum of the absolute values ​​of the load deviation direction index and the photovoltaic deviation direction index, divided by 2, and then multiplied by the rated power of the battery system. Based on the comprehensive deviation direction index, the load prediction sequence or the photovoltaic output prediction sequence is selected to be added to the offset amplitude base to obtain the offset load prediction sequence and the offset photovoltaic output prediction sequence.

[0009] Furthermore, step S2 also includes calculating the expansion amplitude as the maximum value between the load deviation amplitude range index and the photovoltaic deviation amplitude range index, multiplied by the preset expansion coefficient. The expansion amplitude is added to and subtracted from the offset load prediction sequence and the offset photovoltaic output prediction sequence to obtain the load upper limit sequence, load lower limit sequence, photovoltaic upper limit sequence and photovoltaic lower limit sequence. The upper limit sequence is the load upper limit sequence value minus the photovoltaic lower limit sequence value, and the lower limit sequence is the load lower limit sequence value minus the photovoltaic upper limit sequence value.

[0010] Furthermore, step S3 includes calculating the absolute difference between the current net load forecast sequence and the previous period's net load forecast sequence to form a forecast update difference power sequence, accumulating and multiplying by the time interval to obtain the forecast update disturbance energy, normalizing the accumulated energy of the current net load forecast sequence to obtain the forecast update disturbance energy proportion index, calculating the bidirectional boundary available adjustable energy band and normalizing it with the net load envelope energy span to obtain the bidirectional boundary available adjustable energy coverage index.

[0011] Furthermore, step S3 also includes inputting the predicted updated perturbation energy proportion index and the bidirectional boundary available adjustable energy coverage index into the pre-trained multilayer perceptron learning model to obtain robust scheduling coefficients. The input layer of the pre-trained multilayer perceptron learning model contains two neurons, corresponding to the predicted updated perturbation energy proportion index and the bidirectional boundary available adjustable energy coverage index, respectively. The three hidden layers contain 32, 16, and 8 neurons, respectively, and each hidden layer uses the ReLU activation function. The output layer contains one neuron and uses the Sigmoid activation function to output robust scheduling coefficients with values ​​ranging from 0 to 1. Based on the robust scheduling coefficients, the lower limit of energy storage state reserve and the tightening strength of power constraints are determined. A rolling optimization model is established using the lower limit of energy storage state reserve, the tightening strength of power constraints, the grid-connected power constraints, and the net load envelope.

[0012] Furthermore, step S4 includes solving the rolling optimization model using a commercial solver for solving mixed-integer linear programming models, the commercial solver being either the Gurobi solver or the CPLEX solver; when using the Gurobi solver, version 9.5 or higher is used, the upper limit of the solution time is set to 30 seconds, the relative gap tolerance is 0.01, and the battery charge and discharge power values ​​for each time interval in the prediction time domain are obtained, with positive values ​​representing charging and negative values ​​representing discharging, forming a baseline power sequence.

[0013] Furthermore, step S4 also includes calculating the charging direction margin, discharging direction margin, upward margin conversion value, and downward margin conversion value of the reference power sequence, and taking the minimum value of the four in each time interval to form a residual adjustment vector sequence.

[0014] Furthermore, step S5 includes sending the current time period value of the reference power sequence to the battery controller as an execution command, with positive values ​​indicating charging and negative values ​​indicating discharging. At the same time, the actual load and actual photovoltaic output are collected. The actual net load is the result of subtracting the actual photovoltaic output from the actual load. The results are compared with the current time period values ​​of the upper and lower bound sequences of the net load envelope for consistency verification.

[0015] Furthermore, step S5 also includes consistency verification. When the actual net load falls into the net load envelope, the current time period value of the reference power sequence is continued to be executed. When it exceeds the limit, the direction of the correction increment is opposite to the deviation amount and the magnitude is the minimum value after multiplying the current time period value of the remaining adjustment amount by a preset ratio. The correction power is the result of adding the correction increment to the current time period value of the reference power sequence. The load prediction residual and photovoltaic output prediction residual are added to the historical residual sequence to update the error feature vector.

[0016] The technical effects and advantages of the battery system optimization method based on dynamic prediction of the present invention are as follows: This invention addresses the core contradiction of amplified scheduling deviations caused by load and photovoltaic uncertainties. It unifies forecast information, error patterns, and battery adjustability within the same decision-making chain: First, it encapsulates the forecast results using recent deviation characteristics, freeing scheduling from reliance on single-path predictions. Second, it quantifies the stability of forecasts and the available adjustment space of batteries, forming a unified robust scheduling scale through a learning model. This allows rolling optimization to proactively reserve necessary correction margins without being overly conservative when generating charge / discharge plans. Finally, it combines the main execution trajectory with a controllable correction space, triggering controlled corrections through consistency checks. This ensures that even when encountering sudden fluctuations, actual operation maintains smooth adjustments, executable commands, and is less susceptible to frequent interruptions from protection mechanisms. Therefore, this invention effectively reduces strategy abrupt changes and operational instability caused by continuous propagation of forecast deviations in cloud energy storage, photovoltaic power generation and storage, and power or energy storage battery scheduling scenarios. It improves the executability and reliability of charge / discharge arrangements while considering both operational performance and long-term sustainable operation requirements. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating a battery system optimization method based on dynamic prediction according to the present invention. Detailed Implementation

[0018] 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.

[0019] Example 1: Figure 1 This invention presents a battery system optimization method based on dynamic prediction, comprising: S1: Obtain the current operating status parameters of the battery system and the grid-connected power constraints, read the load prediction sequence and photovoltaic output prediction sequence in the prediction time domain, summarize the prediction residual sequence of the previous update cycle to form error characteristics, and retain the load prediction sequence and photovoltaic output prediction sequence of the previous update cycle as prediction update comparison sequences. S2: Based on the error characteristics, the load prediction sequence and the photovoltaic output prediction sequence are shifted in the same direction, and then the shifted sequences are expanded both upwards and downwards to obtain the net load envelope covering the prediction time domain and output the upper and lower bound sequences. S3: Calculate the predicted update disturbance energy ratio index based on the load forecast sequence and the predicted update comparison sequence, and the photovoltaic output forecast sequence and the predicted update comparison sequence. Calculate the bidirectional boundary available adjustable energy band based on the operating state parameters and normalize it relative to the net load envelope energy span to obtain the bidirectional boundary available adjustable energy coverage index. Input the two indices into a pre-trained multilayer perceptron learning model to obtain robust scheduling coefficients. The pre-trained multilayer perceptron learning model includes an input layer, three hidden layers, and an output layer. The input layer receives the predicted update disturbance energy ratio index and the bidirectional boundary available adjustable energy coverage index. The output layer outputs robust scheduling coefficients with values ​​ranging from 0 to 1. Based on this, determine the energy storage state reserve and constraint tightening intensity to establish a rolling optimization model. S4: Solve the rolling optimization model to obtain the baseline power sequence covering the prediction time domain, and summarize the feasible margins of the baseline power sequence under the power boundary and energy boundary as the residual adjustment amount; S5: Execute the current period value of the reference power sequence and calculate the actual net load. Check the consistency with the net load envelope. If it falls within the range, proceed according to the reference power sequence. If it exceeds the range, correct the current period value of the reference power sequence under the remaining adjustment limit, and generate a new prediction residual sequence to update the error characteristics before entering the next update cycle.

[0020] In application scenarios such as industrial park microgrids, distributed photovoltaic power generation and storage, and cloud energy storage aggregation services, battery systems need to arrange charging and discharging plans based on future load and photovoltaic output forecasts to achieve economic optimization and meet grid connection constraints. However, existing technologies mainly rely on point prediction-driven rolling optimization. When prediction deviations become time-varying and correlated due to sudden weather changes or changes in energy consumption behavior, errors will be continuously propagated through state recursion, leading to tightening of the subsequent decision space, sudden policy changes, and control jitter on the execution side. This invention proposes an optimization method based on dynamic prediction. By introducing an error feature and prediction update comparison mechanism from the data acquisition stage in each update cycle, it lays the foundation for converting point predictions into net load envelopes, quantifying prediction stability, and improving battery regulation capabilities. This suppresses error amplification in the early stages and achieves a more robust and executable charging and discharging strategy. Step S1, as the starting point of the entire technology chain, is responsible for the complete collection and organization of the current state, the latest prediction, historical residuals, and the prediction data from the previous cycle. This ensures that subsequent steps can directly call consistent data objects, avoiding information loss or ambiguity.

[0021] The complete process of step S1: At the beginning of each update cycle of the battery system optimization method, step S1 is executed first. By systematically collecting and organizing multiple data, a comprehensive understanding of the current operating status, the latest prediction information, historical error patterns, and prediction update changes is achieved, providing complete and consistent data support for the subsequent conversion of point predictions into net load envelopes and quantification of uncertainties.

[0022] S101: Obtain the current operating status parameters of the battery system and the grid-connected power constraints.

[0023] The battery system's current operating status parameters, including current state of charge (SOC), current charge / discharge power, and rated capacity, are read in real time from the battery management system (BMS). Simultaneously, grid-connected power constraints, including maximum injected power and maximum extracted power, are read from grid-connected dispatch instructions or contractual constraints. By directly acquiring these real-time parameters from the BMS and dispatch systems, all subsequent calculations are ensured to be based on the actual physical state of the battery system and external hard constraints, avoiding decision-making biases caused by lagging state information. This approach allows the current SOC and charge / discharge power to accurately reflect the battery system's available adjustability at the start of the update cycle, while the grid-connected power constraints clearly define the inviolable boundaries of the battery system's interaction with the grid, thus providing precise initial conditions for subsequent calculations of the bidirectional boundary adjustable energy band.

[0024] S102: Read the load forecast sequence and photovoltaic output forecast sequence within the forecast time domain.

[0025] Based on the preset prediction time domain length, the load forecast sequence and photovoltaic output forecast sequence for the current update cycle are read from the prediction module. The prediction time domain length is typically set to cover the next 24 hours or 96 time intervals with a resolution of 15 minutes. The load forecast sequence contains the load forecast values ​​for each time interval from the next time interval at the current time to the end of the prediction time domain, and the photovoltaic output forecast sequence contains the photovoltaic output forecast values ​​for the corresponding time intervals.

[0026] The current net load forecast sequence is further calculated by subtracting the corresponding photovoltaic output forecast value from the load forecast value for each time interval within the forecast time domain. By uniformly reading the latest sequence from the forecast module and immediately calculating the net load forecast sequence, it is ensured that subsequent envelope construction and optimization decisions are based on the same set of time-aligned forecast data. This avoids time offsets or version inconsistencies between forecast values ​​from different sources, thereby maintaining the integrity and comparability of forecast information throughout the entire processing chain.

[0027] S103: Summarize the predicted residual sequence from the previous update cycle to form error features.

[0028] Extract the load forecast residual sequence and photovoltaic output forecast residual sequence from the previous update cycle from the historical database. Each residual sequence contains residual values ​​for historical time intervals of the forecast time domain length, where each residual value is the actual value minus the corresponding forecast value.

[0029] For the load forecast residual sequence, the deviation direction index is first calculated: the absolute value of each residual value in the sequence is summed to obtain the total absolute residual magnitude; simultaneously, the sign of each residual value is taken, multiplied by its absolute value, and all results are summed to obtain the weighted directional sum; then, the weighted directional sum is divided by the total absolute residual magnitude to obtain the load deviation direction index, which ranges from -1 to +1. A positive value indicates that the recent residuals are generally biased in the positive direction, i.e., a systematic underestimation of the load, while a negative value indicates a systematic overestimation of the load. The deviation direction index of the photovoltaic output forecast residual sequence is calculated in the same way.

[0030] When the total absolute residual magnitude is zero, the corresponding deviation direction index is set to zero to ensure that the error characteristics do not introduce directional bias when there is no effective residual information.

[0031] Calculate the deviation amplitude index: Take the absolute value of each residual value in the residual sequence, and take the largest absolute residual value as the corresponding deviation amplitude index; calculate the load deviation amplitude index and the photovoltaic deviation amplitude index respectively.

[0032] Finally, the load deviation direction index, photovoltaic deviation direction index, load deviation amplitude range index, and photovoltaic deviation amplitude range index are combined to form an error feature vector. By calculating the direction index and amplitude range index separately and combining them into a vector, the systematic bias trend and fluctuation range of the recent forecast residuals can be captured simultaneously. This allows the error characteristics to reflect both the continuous directionality of the deviation and the dynamic range of amplitude changes, thus providing a multi-dimensional representation of the recent error patterns for subsequent determination of the same-direction offset direction and the upward and downward expansion amplitudes, avoiding insufficient deviation coverage or excessive expansion caused by a single index.

[0033] S104: Retain the load forecast sequence and photovoltaic output forecast sequence from the previous update cycle as the forecast update reference sequence.

[0034] The complete load forecast sequence and photovoltaic (PV) output forecast sequence used in the previous update cycle are stored and retained. The load forecast sequence contains the load forecast value of the previous cycle for each time interval within the forecast time domain, and the PV output forecast sequence contains the PV output forecast value of the previous cycle for the corresponding time interval. These sequences are completely consistent with the load forecast sequence and PV output forecast sequence read in the current update cycle in terms of time alignment and time domain length. By fully retaining the forecast sequence of the previous update cycle as a reference, it is ensured that when calculating the differential power sequence of the forecast update, the difference between the current forecast value and the forecast value of the previous cycle can be directly compared time interval by time. This accurately quantifies the degree of change of the forecast model between adjacent update cycles, avoids the problem of being unable to assess forecast stability due to missing forecast versions, and provides a reliable historical reference basis for the calculation of the forecast update disturbance energy proportion index.

[0035] Step S1 systematically collects current operating status parameters, grid-connected power constraints, the latest prediction sequence, error characteristics formed by historical prediction residuals, and the previous cycle prediction sequence as a prediction update reference sequence. This provides the deviation direction and magnitude basis for the net load envelope construction in the subsequent step S2, and provides a complete and directly referable data foundation for the calculation of the prediction update disturbance energy ratio index and the bidirectional boundary available adjustable energy coverage index in step S3. This ensures that the entire optimization chain can achieve advance perception and characterization of prediction uncertainty from the data level.

[0036] Step S1 has completed the collection and organization of current operating status parameters, grid-connected power constraints, current load forecast sequence and photovoltaic output forecast sequence, error feature vector, and forecast update comparison sequence. This data provides a foundation for addressing time-varying deviations in load and photovoltaic output. However, a single point forecast sequence is prone to insufficient coverage due to the systematic bias and fluctuation range of recent residuals, failing to effectively encompass concentrated deviations caused by sudden weather changes or abrupt changes in energy consumption behavior. Therefore, step S2 introduces an envelope processing mechanism. By utilizing the deviation direction index and deviation amplitude range index in the error feature vector, the current load forecast sequence and photovoltaic output forecast sequence are directionally offset and amplitude expanded, transforming the point forecast into a net load envelope with upper and lower bounds. This processing method can proactively encompass the uncertainty range reflected in recent error patterns, preventing subsequent rolling optimization from relying on a single forecast path susceptible to deviation propagation. This enhances the robustness of the strategy to key fluctuations in the early stages, avoiding the tightening of adjustment space and strategy abrupt changes caused by continuous error propagation.

[0037] In one embodiment, when the operator in the microgrid control room of the park starts the update cycle, the current state of charge is read from the battery management system as medium, the current charging and discharging power is zero, and the battery rated capacity. The maximum injected power limit and the maximum extracted power limit are obtained from the grid-connected dispatch system. At the same time, the load forecast sequence for the next 24 hours is loaded from the forecast module to show the evening peak increase and the photovoltaic output forecast sequence to show the midday peak. The realized load and photovoltaic residual sequences of the previous cycle are extracted from the historical database, and the error feature vector is calculated to show that the recent load residual is biased in the positive direction. The load forecast sequence and photovoltaic output forecast sequence of the previous cycle are completely stored as the forecast update comparison sequence. After the operator confirms that all data is aligned and displayed on the screen, the next step is performed.

[0038] The complete process of step S2: Step S2, based on the data acquisition and organization completed in Step S1, directly utilizes the error feature vector, load forecast sequence, and photovoltaic output forecast sequence. Through directional offset and amplitude expansion, the point forecast is transformed into a net load envelope upper and lower bound sequence that encompasses the recent deviation pattern, thereby achieving pre-coverage of forecast uncertainty.

[0039] S201: Determine the equivalent offset direction of the net load based on the deviation direction index in the error feature vector, and achieve unidirectional compensation of the net load forecast by selecting and offsetting the load forecast sequence or photovoltaic output forecast sequence.

[0040] The error feature vector includes load deviation direction index and photovoltaic deviation direction index. Positive values ​​indicate that the recent residuals are generally biased towards the actual value being higher than the predicted value, i.e., systematic underestimation, while negative values ​​indicate that the actual value is lower than the predicted value, i.e., systematic overestimation.

[0041] To compensate for the systematic bias in net load, the comprehensive deviation direction index is first calculated. This is the load deviation direction index minus the photovoltaic deviation direction index. A positive value reflects an overall underestimation tendency of net load, while a negative value reflects an overall overestimation tendency. Next, the offset amplitude base is calculated. This is the result of multiplying a preset proportional coefficient by the sum of the absolute values ​​of the load deviation direction index and the photovoltaic deviation direction index, divided by 2, and then multiplying by the rated power of the battery system. The preset proportional coefficient ranges from 0.1 to 0.3 and is used to convert the direction index into a suitable power dimension.

[0042] If the comprehensive deviation direction index is greater than 0, the predicted value of each time interval in the load forecast sequence is added to the offset amplitude base to obtain the offset load forecast sequence, while keeping the photovoltaic power output forecast sequence unchanged; if the comprehensive deviation direction index is less than 0, the predicted value of each time interval in the photovoltaic power output forecast sequence is added to the offset amplitude base to obtain the offset photovoltaic power output forecast sequence, while keeping the load forecast sequence unchanged; if the comprehensive deviation direction index is equal to 0, the load forecast sequence and the photovoltaic power output forecast sequence are directly retained as the offset sequence.

[0043] By selectively shifting in the same direction based on the comprehensive deviation direction index, the prediction sequence is adjusted to the direction dominated by the recent residuals, compensating for the impact of systematic bias on net load. This makes the shifted load prediction sequence and the shifted photovoltaic output prediction sequence closer to the actual deviation trend, avoiding the amplification of error transmission due to uncompensated bias in the rolling optimization of a single prediction sequence.

[0044] S202: Expand the offset prediction sequence up and down according to the deviation amplitude range index in the error feature vector.

[0045] After completing the same-direction offset, to encompass the dynamic fluctuation range of recent residuals, the load deviation amplitude range index and the photovoltaic deviation amplitude range index in the error eigenvector are used. First, the expansion amplitude is calculated, which is a preset expansion coefficient multiplied by the larger of the load deviation amplitude range index and the photovoltaic deviation amplitude range index. The preset expansion coefficient ranges from 1.2 to 2.0 and is used to control the envelope width to cover residual fluctuations. The larger of the two values ​​is used for the expansion amplitude, ensuring that the net load envelope covers the most unfavorable combination where fluctuations from either side dominate, thus avoiding boundary gaps caused by expanding only one side.

[0046] Then, the load upper limit sequence is obtained by adding the expansion amplitude to the predicted value of each time interval in the offset load prediction sequence, and the load lower limit sequence is obtained by subtracting the expansion amplitude; the photovoltaic upper limit sequence is obtained by adding the expansion amplitude to the predicted value of each time interval in the offset photovoltaic output prediction sequence, and the photovoltaic lower limit sequence is obtained by subtracting the expansion amplitude.

[0047] By uniformly applying a symmetrical expansion amplitude to the offset sequence, it is ensured that the generated upper load sequence, lower load sequence, upper photovoltaic sequence, and lower photovoltaic sequence can encompass the range of recent residual amplitude variations, while maintaining the consistency of the expansion process and the simplicity of calculation. This provides a multidimensional boundary sequence for the subsequent synthesis of the net load envelope, avoiding the actual deviation from the coverage range due to insufficient envelope width.

[0048] S203: Synthesize the net load envelope and output the upper and lower bound sequences.

[0049] Based on the upper and lower bound sequences of load, photovoltaic (PV) load, and photovoltaic (PV) load, the most conservative net load envelope covering all possible combinations of deviations is calculated. In the upper bound sequence, each time interval is represented by the corresponding upper bound sequence value minus the lower bound sequence value of the PV load, reflecting the most unfavorable combination of highest load and lowest PV load. Similarly, in the lower bound sequence, each time interval is represented by the corresponding lower bound sequence value minus the upper bound sequence value of the PV load, reflecting the most unfavorable combination of lowest load and highest PV load. This most conservative combination synthesis method ensures that the upper and lower bound sequences of the net load envelope encompass the most extreme impacts of deviations, directly outputting the upper and lower bound sequences of the net load envelope covering the prediction time domain. This ensures that the envelope boundary has a complete capacity to encompass key fluctuations, avoiding coverage blind spots in optimization decisions when facing sudden deviations.

[0050] Step S2 combines the directional offset driven by the error eigenvector with the amplitude expansion to generate an upper and lower bound sequence of the net load envelope that encompasses the systematic bias and fluctuation span. All bound sequences maintain strict consistency in time domain alignment and dimensions, providing an energy span benchmark for the subsequent calculation of the adjustable energy coverage index for the bidirectional boundary, and providing a deviation coverage boundary for the actual net load consistency verification.

[0051] Step S2 has transformed the point predictions into a net load envelope sequence with upper and lower bounds that encompass recent deviation patterns through envelope processing. However, envelope processing only provides a static coverage range and cannot dynamically reflect the magnitude of changes in the prediction model in adjacent update cycles, nor the actual adjustment margin available to offset deviations under the current battery state. If the prediction sequence is frequently and significantly adjusted within consecutive cycles, even with sufficient envelope width, the optimization model may repeatedly adapt to new prediction paths, amplifying strategy fluctuations. Conversely, if the battery state of charge approaches the boundary, even with limited prediction changes, the actual deviation correction capability will be limited, resulting in insufficient executable space.

[0052] To achieve a precise response to uncertainty, step S3 introduces the quantification of the degree of forecast variation to capture the cumulative proportion of differences in the net load forecast sequences of adjacent cycles, thereby characterizing the stability level of the forecast model. Simultaneously, the quantification of the battery correction space is introduced, characterizing the most unfavorable hedging capability against deviations under the current state through a normalized comparison of the bidirectional available adjustable energy and the envelope energy span. These two quantitative indicators extract complementary information from the forecast source and the physical execution end, respectively; the former highlights the dynamic instability of the forecast itself, while the latter emphasizes the sufficiency of margin under the battery's hard constraints.

[0053] In one embodiment, on the dispatch screen of a distributed photovoltaic (PV) power storage station, based on the positive dominance of the load deviation direction index displayed by the error feature vector, the system shifts the overall load prediction sequence upward by a certain amount, while the PV output prediction sequence remains unchanged. Then, based on the deviation amplitude range index, the offset load prediction sequence and the PV output prediction sequence are uniformly expanded upward and downward by the same amount. Finally, a net load envelope is synthesized, with the upper bound sequence taking the combination of the highest load and the lowest PV load after expansion, and the lower bound sequence taking the combination of the lowest load and the highest PV load. The dispatcher sees the envelope curve wrapping around the point prediction line on the screen, forming a broadband coverage of future time period fluctuations, and then continues operation.

[0054] By inputting these two metrics into the pre-trained learning model to generate a single robust scheduling coefficient, and using this coefficient to pre-adjust the lower limit of energy storage state reserve and the tightening strength of power constraints, the rolling optimization model can automatically balance conservatism and economy before solving, avoiding over- or under-adjustment caused by fixed thresholds, thereby ensuring the smooth execution of the charging and discharging plan under different uncertainty scenarios. The specific processing logic of step S3 is described below.

[0055] The complete processing procedure for step S3: S301: Calculate the predicted update of the perturbation energy percentage index.

[0056] The predicted update perturbation energy ratio index is used to characterize the magnitude of change in the predicted sequence between adjacent update cycles.

[0057] First, calculate the current net load forecast sequence, which is the value of each time interval in the load forecast sequence minus the corresponding value in the photovoltaic output forecast sequence. Then, calculate the previous period's net load forecast sequence, which is the value of each time interval in the previous update period's load forecast sequence minus the corresponding value in the previous update period's photovoltaic output forecast sequence. The value of each time interval in the predicted updated differential power sequence is the absolute difference between the corresponding value in the current net load forecast sequence and the corresponding value in the previous period's net load forecast sequence.

[0058] The predicted update disturbance energy is the sum of all values ​​in the predicted update differential power sequence multiplied by the time interval. The cumulative energy of the current net load forecast sequence is the sum of all absolute values ​​in the current net load forecast sequence multiplied by the time interval. The predicted update disturbance energy proportion index is the result of dividing the predicted update disturbance energy by the sum of the cumulative energy of the current net load forecast sequence and the preset zero-prevention constant.

[0059] By accumulating the absolute differences at each time step and normalizing them with the benchmark energy, the index is ensured to capture both the overall trend and avoid single-point noise interference, thus accurately reflecting the stability of the prediction model in adjacent periods.

[0060] S302: The energy coverage index can be adjusted to calculate the bidirectional boundary.

[0061] The bidirectional boundary can be used to adjust the energy coverage index to assess the battery's ability to offset deviations under its current condition.

[0062] The chargeable usable energy is calculated by multiplying the battery's rated capacity by 1 and subtracting the current state of charge, then multiplying by the charging efficiency. The releaseable usable energy is calculated by multiplying the battery's rated capacity by the current state of charge and dividing by the discharge efficiency. The bidirectional boundary adjustable energy band takes the smaller of the chargeable and releaseable usable energy. The net load envelope energy span is calculated by summing the sum of the differences between the corresponding time intervals of the upper and lower bound sequences of the net load envelope, multiplied by the duration of each time interval.

[0063] The adjustable energy coverage index of the bidirectional boundary is the result of dividing the adjustable energy band of the bidirectional boundary by the sum of the net load envelope energy span and the preset zero-prevention constant.

[0064] By taking a small margin in both directions and normalizing it with the envelope span, we ensure that the index directly represents the battery's hard regulation capability in the most unfavorable direction.

[0065] S303: Input the pre-trained learning model to obtain robust scheduling coefficients.

[0066] The predicted update perturbation energy proportion index and the bidirectional boundary can be jointly input into a pre-trained multilayer perceptron learning model using the adjustable energy coverage index to obtain robust scheduling coefficients. This pre-trained multilayer perceptron learning model is used to map the above two dimensionless indices to robust scheduling coefficients, excluding arbitrary learning models with unrestricted structures.

[0067] In one embodiment, the pre-trained learning model is implemented using a multilayer perceptron (MLP) structure, which takes the predicted update perturbation energy proportion index and the bidirectional boundary available adjustable energy coverage index as input features and outputs robust scheduling coefficients (continuous values ​​ranging from 0 to 1, where a larger value indicates a higher degree of robustness required).

[0068] The learning model is constructed as follows: the input layer contains two neurons, corresponding to two dimensionless exponents; three hidden layers are set: the first hidden layer contains 32 neurons, the second hidden layer contains 16 neurons, and the third hidden layer contains 8 neurons. Each neuron in each layer uses the ReLU activation function to introduce non-linearity; the output layer contains one neuron, and the Sigmoid activation function is used to limit the output to the range of 0 to 1. The total number of neurons in the model is 57, using a fully connected approach, and a Dropout layer (dropout rate of 0.2) is added between each layer to prevent overfitting.

[0069] The training dataset was constructed as follows: At least 12 months of historical operating data from the battery system were collected, including the predicted update perturbation energy ratio index and the bidirectional boundary available adjustable energy coverage index calculated for each update cycle, as well as engineering observations of adverse events such as out-of-bounds corrections, instruction clipping, or protection logic interception within the corresponding cycle. Adverse events were defined as a label value of 1 (requiring high robustness), and the absence of adverse events was defined as a label value of 0 (allowing for conventional scheduling). The labels were smoothed to obtain continuous target values ​​(e.g., if clipping occurs once within a cycle, the target value is 0.8; multiple clippings result in a value close to 1). The final training set contained no fewer than 5000 samples, divided into training, validation, and test sets in an 8:1:1 ratio, and the input features were standardized (mean subtracted, standard deviation divided).

[0070] The model optimization process uses the Adam optimizer with an initial learning rate of 0.001, a batch size of 64, and a maximum of 300 training epochs. The mean squared error (MSE) loss function is used, and the loss is monitored on the validation set. An early stopping mechanism is triggered when the loss shows no improvement after 20 consecutive validation epochs, and the learning rate decays by a factor of 0.5. Training is implemented using the PyTorch framework. After training, the model achieves an MSE of less than 0.02 on the test set, and the correlation coefficient between the output robust scheduling coefficient and actual engineering requirements is greater than 0.90.

[0071] In actual operation, the real-time calculated predicted update perturbation energy ratio index and the bidirectional boundary available adjustable energy coverage index are input into the trained multilayer perceptron model to obtain the robust scheduling coefficients for the current update cycle. These coefficients are then used to determine the lower limit of the energy storage state reserve and the strength of the power constraint tightening. The model structure and parameter settings of this embodiment can achieve high-precision mapping in the comprehensive evaluation of predicted instability and battery correction space, while maintaining low computational overhead (single forward propagation time less than 5 milliseconds), meeting the requirements of real-time rolling optimization.

[0072] S304: Establish a rolling optimization model based on the constraints of robust scheduling coefficient adjustment.

[0073] The lower limit of energy storage state reserve is the result of adding the robust dispatch coefficient to the difference between the economic target state of charge and the physical minimum state of charge. The power constraint tightening strength is the robust dispatch coefficient multiplied by the preset maximum tightening ratio. The adjusted power boundary is the result of multiplying the original power boundary by 1 and subtracting the power constraint tightening strength. Using the lower limit of energy storage state reserve, the adjusted power boundary, grid-connected power constraints, and net load envelope guidance, a rolling optimization model is established with the objective of minimizing economic costs. For example, when the robust dispatch coefficient is 0.72, the lower limit of energy storage state reserve shifts upward, the power boundary tightens accordingly, and the benchmark power sequence obtained after solving the rolling optimization model becomes more conservative, reserving sufficient margin to cope with possible deviations.

[0074] In one embodiment, the rolling optimization model is a mixed-integer linear programming model, solved using a commercial solver for solving mixed-integer linear programming models; the commercial solver is either the Gurobi solver or the CPLEX solver. Preferably, when using the Gurobi solver, version 9.5 or higher is used, with a maximum solution time of 30 seconds and a relative gap tolerance of 0.01, meaning the solution stops when the difference between the optimal solution and the limit is less than one percent. In each update cycle, the model uses the current state as the starting point for rolling optimization, executing only the baseline power for the first time interval, with the remaining time intervals planned as references. Parameter settings include a prediction time domain length of 96, a time interval duration of 0.25 hours, and a degradation cost coefficient fixed at 0.1 yuan per kilowatt-hour based on the battery type.

[0075] The decision variables of the rolling optimization model include the battery charge and discharge power for each time interval in the prediction time domain (positive values ​​indicate charging and negative values ​​indicate discharging), the state of charge for each time interval, and auxiliary binary variables (used to avoid simultaneous charging and discharging; the auxiliary binary variable is set to 1 when the battery charge and discharge power is greater than 0, and 0 otherwise).

[0076] The objective function is defined as minimizing the total cost, which is the sum of the following three terms for all time intervals within the prediction time domain: the first term is the time-of-use electricity purchase price multiplied by the grid-connected power value when it is greater than 0, multiplied by the time interval duration; the second term is the time-of-use electricity sales price multiplied by the absolute value of the grid-connected power when it is less than 0, multiplied by the time interval duration and then negative; the third term is the battery degradation equivalent cost coefficient multiplied by the absolute value of the battery charging and discharging power multiplied by the time interval duration. The grid-connected power is the median sequence of the net load envelope for each time interval plus the battery charging and discharging power. The median sequence of the net load envelope is the sum of the corresponding values ​​of the upper and lower bound sequences of the net load envelope divided by 2. The battery degradation equivalent cost coefficient ranges from 0.05 to 0.15 yuan per kilowatt-hour, the time interval duration is 0.25 hours, and the prediction time domain length is 96.

[0077] The constraints include: 1. Dynamic State of Charge (SOC) Constraint: The SOC of the next time interval equals the SOC of the current time interval plus the product of the battery charging / discharging power multiplied by the time interval duration, the charging efficiency when the auxiliary binary variable is 1, and the discharging efficiency when the auxiliary binary variable is 0, divided by the battery's rated capacity. The initial SOC equals the current SOC, and the charging and discharging efficiencies are between 0.95 and 0.98.

[0078] 2. State of charge boundary constraints: The state of charge in each time interval is greater than or equal to the lower limit of the energy storage state reserve calculated in step S3 and less than or equal to 0.9, wherein the lower limit of the energy storage state reserve is not less than 0.2.

[0079] 3. Power boundary constraint: The battery charging and discharging power is greater than or equal to the battery rated discharge power multiplied by 1 minus the negative value of the power constraint tightening strength calculated in step S3, and less than or equal to the result of the battery rated charging power multiplied by 1 minus the power constraint tightening strength.

[0080] 4. Grid-connected power constraint: The grid-connected power is less than or equal to the maximum upper limit of the maximum power absorbed, and greater than or equal to the negative value of the maximum upper limit of the maximum power injected.

[0081] 5. Avoid simultaneous charging and discharging constraints: This is achieved through the Big M method, using auxiliary binary variables and a sufficiently large constant (twice the rated power of the battery) to limit the sign consistency of the battery's charging and discharging power.

[0082] 6. Net load envelope guiding constraint: The median reference sequence is used to balance economic efficiency.

[0083] The model solution process uses the Gurobi solver (version 9.5 or higher), with a maximum solution time of 30 seconds and a relative gap tolerance of 0.01 (i.e., stopping when the difference between the optimal solution and the limit is less than one percent). In each update cycle, the model uses the current state as the starting point for rolling solution, executing only the baseline power for the first time interval, with the remaining time intervals planned as references. Parameter settings include a prediction time domain length of 96 (15-minute resolution covering 24 hours), a time interval length of 0.25 hours, and a degradation cost coefficient fixed at 0.1 yuan per kilowatt-hour based on the battery type.

[0084] In actual operation, this rolling optimization model is solved on an industrial computer via Python calling the Gurobi interface. A single solution typically takes less than 10 seconds, yielding a smooth baseline power sequence that satisfies all adjusted constraints. This ensures sufficient adjustment margins are reserved when prediction uncertainty is high, while approaching economic optimality under favorable conditions. The model structure and parameter settings of this embodiment enable efficient solutions in cloud energy storage or photovoltaic energy storage scenarios and seamlessly integrate with the robust scheduling coefficients in step S3, improving the overall executability of the strategy.

[0085] Step S3, through the sequential execution of the above four sub-steps, integrates the predicted changes and battery correction capabilities into a robust scheduling coefficient, pre-adjusts and optimizes model constraints, and ensures that the generated charge and discharge plan remains executable and stable under different uncertainty conditions.

[0086] In one embodiment, on the cloud energy storage aggregation service platform, the system calculates the cumulative energy of the hourly absolute difference between the current net load forecast sequence and the previous period's net load forecast sequence, and normalizes it with the current sequence's cumulative energy to obtain the forecast update disturbance energy ratio index; simultaneously, based on the current state of charge, it calculates the bidirectional boundary available adjustable energy band taking the smaller value on both the charging and discharging sides, and normalizes it with the cumulative span of the difference between the upper and lower bounds of the net load envelope to obtain the bidirectional boundary available adjustable energy coverage index; inputting the two indices into the pre-trained learning model, when the output robust scheduling coefficient is high, the lower limit of the energy storage state reserve is moved up and the power boundary is tightened; a rolling optimization model is established based on this adjusted constraint, and the platform displays that the model parameters are updated and waiting for the solution.

[0087] Step S3 has adjusted the lower limit of energy storage state reserve and the tightening intensity of power constraints based on robust scheduling coefficients, establishing a rolling optimization model. This model incorporates dynamic responses to predictive instability and correction space before solution. However, simply generating an optimized plan is insufficient to handle sudden deviations during actual execution. Directly executing the baseline plan without reserving a controllable correction space can easily lead to violations of boundary or rate limits during correction, causing command pruning or control jitter. In step S4, this invention obtains a baseline power sequence as the main execution trajectory by solving the adjusted model. Simultaneously, based on the feasible margins of power and energy boundaries, the remaining adjustment amount is summarized as the upper limit of the amplitude and rate of the constrained correction, ensuring that the correction direction is consistent with the deviation direction. This method of separating the main trajectory and correction space enables the planned power to be conservatively moderate, while providing a smooth and executable correction mechanism for step S5, avoiding sudden policy changes and improving operational reliability.

[0088] The complete processing procedure for step S4: Step S4: Based on the rolling optimization model established in step S3, a reference power sequence is generated by solving the model as the main execution trajectory, and the feasible margin is summarized to form the remaining adjustment amount, thereby realizing the separation control of planning and correction.

[0089] S401: Solve the rolling optimization model to obtain the baseline power sequence.

[0090] The rolling optimization model incorporates the energy storage state reserve lower bound, power constraint tightening strength, and grid-connected power constraint after adjusting the robust scheduling coefficients. It utilizes a commercial solver for solving mixed-integer linear programming models, specifically the Gurobi or CPLEX solver. The commercial solver takes the current operating state parameters of the battery system, the energy storage state reserve lower bound, the adjusted power boundary, the grid-connected power constraint, the median sequence of the net load envelope, the time-of-use tariff, and the battery degradation equivalent cost coefficient as inputs. It uses the battery charge / discharge power and state of charge at each time interval within the prediction time domain as decision variables to solve the objective function and constraints of the rolling optimization model. When using the Gurobi solver, version 9.5 or higher is required. The solution time is capped at 30 seconds, and the relative gap tolerance is set to 0.01. The solution stops once the relative gap tolerance or the solution time cap is reached, and a baseline power sequence covering the prediction time domain is output. The value of each time interval in the reference power sequence represents the battery charging and discharging power; a positive value indicates charging, and a negative value indicates discharging.

[0091] This sequence minimizes economic costs while satisfying all constraints. For example, in a certain update cycle, after the solver completes the calculation, the baseline power sequence shows that the first few time intervals are for small-amplitude charging to take advantage of off-peak electricity prices and avoid violating the tightened power boundary. The baseline power sequence is directly used for subsequent margin calculations and as the main execution instruction for the current time period in step S5.

[0092] S402: Calculate and summarize the remaining adjustment amount.

[0093] After the reference power sequence is generated, in order to quantify its adjustment space relative to the power boundary and energy boundary, the power direction margin is first calculated: the charging direction margin is the value of the rated charging power multiplied by 1 minus the power constraint tightening strength minus the value when the corresponding value of the reference power sequence is greater than 0; the discharging direction margin is the value of the reference power sequence when the corresponding value is less than 0 plus the value of the rated discharging power multiplied by 1 minus the power constraint tightening strength.

[0094] Next, the state-of-charge (POC) trajectory is simulated under the reference power sequence, and the energy directional margin is calculated: the upward margin is 0.9 minus the corresponding POC trajectory value multiplied by the battery's rated capacity; the downward margin is the corresponding POC trajectory value minus the lower limit of the energy storage reserve multiplied by the battery's rated capacity. The upward and downward margins are converted to power dimensions by dividing by the time interval duration. The remaining adjustment is the minimum value among the charging directional margin, discharging directional margin, upward margin conversion value, and downward margin conversion value for each time interval, forming a vector sequence.

[0095] By summarizing the minimum margins in each direction, the remaining adjustment amount is ensured to represent the hard space of the reference power sequence under the most unfavorable adjustment, avoiding corrections that exceed the feasible boundary. For example, when the reference power sequence tends to discharge conservatively, the margins in the discharge direction and downward direction are large, while the margin in the charging direction is small. The summed remaining adjustment amount reflects the limited upward adjustment space, guiding step S5 to prioritize the use of the sufficient side for correction when the deviation directions are consistent.

[0096] Step S4 generates a reference power sequence and a state-of-charge trajectory as the main execution plan by executing the above two sub-steps in sequence, and summarizes the dual margins of power and energy to form the remaining adjustment amount. All data objects are strictly consistent in time domain alignment and dimensions to ensure that the correction action is controlled and executable in amplitude, rate and direction.

[0097] In one embodiment, in the microgrid energy management controller, a commercial solver is started to calculate the adjusted rolling optimization model. The screen displays the output of the reference power sequence after the solution process is completed. The first few periods are for charging during off-peak hours and discharging during the midday photovoltaic peak. Then, the state of charge trajectory under the execution of the reference power sequence is simulated, and the charging direction margin, discharging direction margin, and energy upward and downward margin conversion power value are calculated for each period. The minimum value of the four is taken and summarized to form the remaining adjustment vector sequence. The controller stores this sequence as the current period execution limit and then issues the first period reference power command to the battery inverter.

[0098] Step S4 has generated a reference power sequence as the main execution trajectory and summarized the remaining adjustment amount as a controlled correction space. This separate design allows the plan to reserve margin under forecast uncertainty, but sudden deviations in actual operation may cause the actual net load to exceed the upper or lower bound of the net load envelope sequence. If the reference power sequence is directly enforced or correction is made without restriction, it is easy to cause control jitter or protection interception. To achieve smooth execution and closed-loop feedback, this invention introduces a consistency verification mechanism in step S5: while executing the reference power for the current period, the actual net load is calculated and compared with the net load envelope; if it falls into the envelope, the reference power sequence is directly advanced to ensure economy; if it exceeds the envelope, the power is corrected under the premise of limiting the amplitude and rate of the remaining adjustment amount and keeping the deviation direction consistent to avoid abrupt changes; at the same time, a new prediction residual sequence is generated to update the error characteristics, forming a closed loop. By combining the execution of the main trajectory with restricted correction and feeding back the residual at the end of the cycle, the transformation from passive correction to active inclusion is realized, improving operational stability and long-term adaptability.

[0099] The complete processing procedure for step S5: S501: Execute the current value of the baseline power sequence and calculate the actual net load.

[0100] At the start of the current time period, the current time period value of the reference power sequence is sent to the battery controller as an execution command. A positive value indicates charging, and a negative value indicates discharging. Simultaneously, the actual load and actual photovoltaic output are collected. The actual net load is the result of subtracting the actual photovoltaic output from the actual load; a positive value indicates that additional energy needs to be drawn, and a negative value indicates that there is surplus energy available for injection. For example, in a certain time period, after the controller receives a light discharge command from the reference power sequence, it begins execution. Simultaneously, the data shows that the actual load increases due to concentrated air conditioning startup, while the actual photovoltaic output decreases due to brief cloud cover, resulting in an inflated actual net load. The actual net load is directly used for subsequent verification.

[0101] S502: Perform net load envelope consistency check.

[0102] After the actual net load is calculated, it is compared with the current time values ​​of the upper and lower bound sequences of the net load envelope. If the actual net load is greater than or equal to the current time value of the lower bound sequence and less than or equal to the current time value of the upper bound sequence, it is determined to fall within the net load envelope. If it exceeds the envelope, the deviation is calculated, which is the actual net load minus the current time value of the median sequence of the net load envelope. The current time value of the median sequence is the sum of the current time values ​​of the upper and lower bound sequences divided by 2. A positive deviation indicates that the actual load is higher than expected and additional discharge coverage is needed, while a negative deviation indicates that the actual load is lower than expected and discharge needs to be reduced or charging needs to be increased.

[0103] S503: Advance or correct execution power based on verification results.

[0104] When the consistency check determines that the actual net load falls within the net load envelope, the current value of the reference power sequence continues to be executed until the end of the time period. If the actual net load exceeds the envelope, the sign of the correction increment is determined to be opposite to the sign of the deviation, and the magnitude of the correction increment is set to the smaller of the absolute value of the deviation and the remaining adjustment multiplied by a preset ratio. The correction increment is superimposed on the reference power to obtain the correction power, and after a smooth transition according to the preset maximum power change rate within the current time period, the execution command is output.

[0105] For example, when the deviation is positive and large, the correction increment is the negative value of the remaining regulation value multiplied by 0.8. The correction power is increased accordingly by the discharge amount, and the controller gradually increases the discharge command to smoothly cover the additional demand without exceeding the remaining regulation limit. The final executed power is the current value of the correction power or the reference power sequence.

[0106] S504: Generate new prediction residuals and update error features.

[0107] At the end of the time period, using the actual load, actual photovoltaic output, and the current time period values ​​of the load forecast sequence and photovoltaic output forecast sequence, the load forecast residual is generated as the actual load minus the current time period value of the load forecast sequence, and the photovoltaic output forecast residual is generated as the actual photovoltaic output minus the current time period value of the photovoltaic output forecast sequence. The load forecast residual and photovoltaic output forecast residual are appended to the corresponding historical residual sequences, and the earliest residual term in the sequence is removed to maintain the consistency between the length of the historical residual sequence and the length of the forecast time domain. Then, based on the updated historical residual sequence, the deviation direction index and deviation magnitude index are recalculated to obtain a new error feature vector for use in the next update cycle.

[0108] For example, at the end of the period, the newly generated residuals show a systematic overestimation of the load, and the updated error eigenvector reflects an enhanced negative bias, which is directly used in the next update cycle step S1. This update completes the current cycle and proceeds to the next cycle.

[0109] Step S5 executes the above sub-steps in sequence to achieve the execution of the current value of the reference power sequence and the verification of the actual net load, the direct advancement of the conditional branch or the correction of the opposite direction and limited amplitude, and the generation and updating of new residuals. All data are strictly consistent in time domain alignment and dimensions, ensuring that the operation follows the plan when the deviation falls into the envelope, achieves smooth hedging when it exceeds the envelope, and continuously feeds back the deviation pattern to the error characteristics.

[0110] In one embodiment, after the inverter at the photovoltaic power distribution site receives the discharge command for the current period of the reference power sequence, it begins to execute. At the same time, the sensor collects data on the actual load increasing due to the startup of factory equipment and the actual photovoltaic output decreasing due to cloud cover. The actual net load is calculated to exceed the upper limit of the net load envelope. After verification and judgment, the discharge is increased in the direction of correction increment, with the magnitude limited to 80% of the current value of the remaining adjustment amount. The correction power is gradually applied to gradually increase the inverter discharge to cover the additional demand. At the end of the period, the load prediction residual is positive and the photovoltaic output prediction residual is negative. The error feature vector is updated and the on-site display screen confirms that the cycle is completed and enters the next cycle.

[0111] Specifically, the above are merely preferred embodiments of this application and are not intended to limit this application.

[0112] In the description of this specification, references to terms such as "an embodiment," "example," and "specific example" indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0113] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to any specific implementation. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims

1. A battery system optimization method based on dynamic prediction, characterized in that, Including the following steps: S1: Obtain the current operating status parameters of the battery system and the grid-connected power constraints, read the load prediction sequence and photovoltaic output prediction sequence in the prediction time domain, summarize the prediction residual sequence of the previous update cycle to form error characteristics, and retain the load prediction sequence and photovoltaic output prediction sequence of the previous update cycle as prediction update comparison sequences. S2: Based on the error characteristics, the load prediction sequence and the photovoltaic output prediction sequence are shifted in the same direction, and then the shifted sequences are expanded both upwards and downwards to obtain the net load envelope covering the prediction time domain and output the upper and lower bound sequences. S3: Calculate the absolute difference between the current net load prediction sequence and the previous period's net load prediction sequence to form the prediction update difference power sequence. Accumulate and multiply by the time interval to obtain the prediction update disturbance energy. Normalize the accumulated energy of the current net load prediction sequence to obtain the prediction update disturbance energy ratio index. Calculate the bidirectional boundary available adjustable energy band and normalize it with the net load envelope energy span to obtain the bidirectional boundary available adjustable energy coverage index. Input the prediction update disturbance energy ratio index and the bidirectional boundary available adjustable energy coverage index into the pre-trained multilayer perceptron learning model to obtain robust scheduling coefficients. The input layer of the pre-trained multilayer perceptron learning model contains 2 neurons, and the three hidden layers contain 32, 16, and 8 neurons respectively. Each hidden layer uses the ReLU activation function. The output layer contains 1 neuron and uses the Sigmoid activation function to output robust scheduling coefficients. Determine the lower limit of energy storage state reserve and the tightening strength of power constraints based on the robust scheduling coefficients. Establish a rolling optimization model with the lower limit of energy storage state reserve, the tightening strength of power constraints, the grid-connected power constraints, and the net load envelope. S4: Solve the rolling optimization model to obtain the baseline power sequence covering the prediction time domain, and summarize the feasible margins of the baseline power sequence under the power boundary and energy boundary as the residual adjustment amount; S5: Execute the current period value of the reference power sequence and calculate the actual net load. Check the consistency with the net load envelope. If it falls within the range, proceed according to the reference power sequence. If it exceeds the range, correct the current period value of the reference power sequence under the remaining adjustment limit, and generate a new prediction residual sequence to update the error characteristics before entering the next update cycle.

2. The battery system optimization method based on dynamic prediction according to claim 1, characterized in that: Step S1 includes reading the current state of charge, current charging and discharging power, and rated capacity of the battery system in real time from the battery management system; reading the maximum injected power limit and the maximum extracted power limit from the grid-connected scheduling command; reading the load forecast sequence and photovoltaic output forecast sequence in the forecast time domain and calculating the current net load forecast sequence; summarizing the load forecast residual sequence and photovoltaic output forecast residual sequence of the previous update cycle to calculate the deviation direction index and deviation amplitude range index to form an error feature vector; and retaining the load forecast sequence and photovoltaic output forecast sequence of the previous update cycle as the forecast update reference sequence.

3. The battery system optimization method based on dynamic prediction according to claim 2, characterized in that: Step S2 includes calculating the comprehensive deviation direction index as the load deviation direction index minus the photovoltaic deviation direction index, and calculating the offset amplitude base as a preset proportional coefficient multiplied by the sum of the absolute values ​​of the load deviation direction index and the photovoltaic deviation direction index, divided by 2, and then multiplied by the rated power of the battery system. Based on the comprehensive deviation direction index, the load prediction sequence or the photovoltaic output prediction sequence is selected to be added to the offset amplitude base to obtain the offset load prediction sequence and the offset photovoltaic output prediction sequence.

4. The battery system optimization method based on dynamic prediction according to claim 3, characterized in that: Step S2 further includes calculating the expansion amplitude as the maximum value between the preset expansion coefficient and the load deviation amplitude range index and the photovoltaic deviation amplitude range index. The expansion amplitude is added or subtracted to the offset load prediction sequence and the offset photovoltaic output prediction sequence to obtain the load upper limit sequence, load lower limit sequence, photovoltaic upper limit sequence and photovoltaic lower limit sequence. The upper limit sequence is the load upper limit sequence value minus the photovoltaic lower limit sequence value, and the lower limit sequence is the load lower limit sequence value minus the photovoltaic upper limit sequence value.

5. The battery system optimization method based on dynamic prediction according to claim 4, characterized in that: Step S4 involves solving the rolling optimization model using a commercial solver for solving mixed-integer linear programming models. The commercial solver is either the Gurobi solver or the CPLEX solver. The battery charge and discharge power values ​​for each time interval in the prediction time domain are obtained. Positive values ​​indicate charging and negative values ​​indicate discharging, forming a baseline power sequence.

6. The battery system optimization method based on dynamic prediction according to claim 5, characterized in that: Step S4 also includes calculating the charging direction margin, discharging direction margin, upward margin conversion value, and downward margin conversion value of the reference power sequence, and taking the minimum value of the four in each time interval to form a residual adjustment vector sequence.

7. The battery system optimization method based on dynamic prediction according to claim 6, characterized in that: Step S5 includes sending the current time period value of the reference power sequence to the battery controller as an execution command. Positive values ​​indicate charging and negative values ​​indicate discharging. At the same time, the actual load and actual photovoltaic output are collected. The actual net load is the result of subtracting the actual photovoltaic output from the actual load. The results are compared with the current time period values ​​of the upper and lower bound sequences of the net load envelope for consistency verification.

8. The battery system optimization method based on dynamic prediction according to claim 7, characterized in that: Step S5 also includes consistency verification. When the actual net load falls into the net load envelope, the current time period value of the reference power sequence is continued to be executed. When it exceeds the limit, the direction of the correction increment is opposite to the deviation amount and the magnitude is the minimum value after multiplying the current time period value of the remaining adjustment amount by a preset ratio. The correction power is the result of adding the correction increment to the current time period value of the reference power sequence. The load prediction residual and photovoltaic output prediction residual are added to the historical residual sequence to update the error feature vector.

Citation Information

Patent Citations

  • Expressway integrated energy system prediction optimization method, system, equipment and medium

    CN117611234A

  • Hierarchical collaborative intelligent scheduling method and system for virtual power plant based on multi-objective optimization

    CN121395579A

  • Load prediction and optimal scheduling method and system for multi-energy-storage thermal power generating unit

    CN121710328A