Energy storage system charging and discharging control method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202611155620.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-09
AI Technical Summary
[0003]但是,现有储能调度方式多采用固定时段充放电策略,或者仅根据分时电价进行峰谷套利控制
[0024]本发明实施例的技术方案,通过采集目标电力系统的运行状态数据;基于运行状态数据进行负荷预测,得到未来时段的预测负荷序列;基于预测负荷序列和需量记录数据进行需量风险识别,得到未来时段的需量风险度序列;基于需量记录数据、预测负荷序列和需量风险度序列生成动态需量控制目标;基于预测负荷序列、动态需量控制目标、分时电价数据和储能状态数据构建储能充放电优化模型;对储能充放电优化模型进行求解,得到未来时段的最优充放电功率序列,基于最优充放电功率序列提取首个控制时刻的充放电功率指令,并下发至储能执行设备。基于上述技术方案,通过构建考虑目标电力系统的需量目标进行负荷预测,并进一步构建储能充放电优化模型进行储能系统的充放电控制,实现了在保证电池安全运行的前提下,自适应生成储能充放电功率指令,降低结算周期最大需量及对应需量电费,同时兼顾分时电价套利收益和电池寿命成本,提高储能系统在工商业需量管理场景下的经济性与可实施性。
Smart Images

Figure CN122890508A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of energy storage system control technology, and in particular to a charging and discharging control method, device, electronic device, and storage medium for an energy storage system. Background Technology
[0002] In typical user-side scenarios such as industrial and commercial parks, data centers, charging and battery swapping stations, and integrated energy stations, electricity billing typically includes not only electricity charges but also demand charges based on the maximum demand during the billing period. Once the maximum demand is triggered within the billing period, it significantly increases the user's overall energy costs. Therefore, how to smooth out peak loads and reduce maximum demand through energy storage systems has become a key issue in the economic operation of energy storage.
[0003] However, existing energy storage dispatching methods mostly employ fixed-period charging and discharging strategies, or rely solely on time-of-use pricing for peak-valley arbitrage control. While these methods can reduce electricity costs to some extent, they do not adequately consider the mechanism of demand pricing and struggle to implement refined control over the dynamic risks of maximum demand during the settlement period. Furthermore, actual load exhibits significant uncertainty and volatility, heavily influenced by production schedules, weather conditions, equipment start-up and shutdown, holiday patterns, and temporary production tasks. If energy storage strategies are based solely on offline threshold settings and do not adjust according to current load trends, recorded maximum demand, and changes in available battery capacity, problems such as insufficient peak shaving, premature discharge, subsequent power shortages, or excessive peak shaving leading to decreased economic efficiency are likely to occur. Summary of the Invention
[0004] This invention provides a charging and discharging control method, device, electronic device, and storage medium for an energy storage system. By constructing a load forecast that considers the demand target of the target power system, and further constructing an energy storage charging and discharging optimization model for energy storage system charging and discharging control, it achieves adaptive generation of energy storage charging and discharging power commands while ensuring the safe operation of the battery. This reduces the maximum demand and corresponding demand electricity cost in the settlement cycle, while taking into account the arbitrage benefits of time-of-use pricing and the battery life cost, thereby improving the economy and feasibility of energy storage systems in industrial and commercial demand management scenarios.
[0005] According to one aspect of the present invention, a charging and discharging control method for an energy storage system is provided, comprising:
[0006] Collect operational status data of the target power system, including load power data, distributed generation output data, time-of-use electricity price data, energy storage status data, and demand record data.
[0007] Load forecasting is performed based on operational status data to obtain the predicted load sequence for future periods;
[0008] Demand risk is identified based on the predicted load sequence and demand record data to obtain the demand risk sequence for future periods;
[0009] Dynamic demand control targets are generated based on demand record data, predicted load sequences, and demand risk sequences.
[0010] An energy storage charging and discharging optimization model is constructed based on predicted load sequences, dynamic demand control targets, time-of-use electricity price data, and energy storage status data.
[0011] The optimal charging and discharging power sequence for future time periods is obtained by solving the energy storage charging and discharging optimization model. Based on the optimal charging and discharging power sequence, the charging and discharging power command for the first control moment is extracted and sent to the energy storage execution device.
[0012] According to another aspect of the present invention, a charge / discharge control device for an energy storage system is provided, comprising:
[0013] The data acquisition module is used to collect the operating status data of the target power system. The operating status data includes load power data, distributed generation output data, time-of-use electricity price data, energy storage status data, and demand record data.
[0014] The load sequence determination module is used to perform load forecasting based on operating status data to obtain the load sequence for future periods.
[0015] The demand risk sequence determination module is used to identify demand risk based on the predicted load sequence and demand record data, and obtain the demand risk sequence for future periods.
[0016] The dynamic demand control target determination module is used to generate dynamic demand control targets based on demand record data, predicted load sequences, and demand risk sequences.
[0017] The optimization model building module is used to build an energy storage charging and discharging optimization model based on the predicted load sequence, dynamic demand control target, time-of-use electricity price data and energy storage status data.
[0018] The energy storage device control module is used to solve the energy storage charging and discharging optimization model to obtain the optimal charging and discharging power sequence for future time periods. Based on the optimal charging and discharging power sequence, the charging and discharging power command for the first control moment is extracted and sent to the energy storage execution device.
[0019] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0020] At least one processor; and
[0021] A memory that is communicatively connected to at least one processor; wherein,
[0022] The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to execute the charging and discharging control method of the energy storage system according to any embodiment of the present invention.
[0023] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement the charging and discharging control method of an energy storage system according to any embodiment of the present invention.
[0024] The technical solution of this invention involves: collecting operational status data of the target power system; performing load forecasting based on the operational status data to obtain a predicted load sequence for future periods; identifying demand risk based on the predicted load sequence and demand record data to obtain a demand risk degree sequence for future periods; generating a dynamic demand control target based on the demand record data, the predicted load sequence, and the demand risk degree sequence; constructing an energy storage charging and discharging optimization model based on the predicted load sequence, the dynamic demand control target, time-of-use electricity price data, and energy storage status data; solving the energy storage charging and discharging optimization model to obtain the optimal charging and discharging power sequence for future periods; extracting the charging and discharging power command for the first control moment based on the optimal charging and discharging power sequence and issuing it to the energy storage execution device. Based on the above technical solutions, load forecasting is performed by considering the demand target of the target power system, and further, an energy storage charging and discharging optimization model is constructed to control the charging and discharging of the energy storage system. This enables the adaptive generation of energy storage charging and discharging power commands while ensuring the safe operation of the battery, reducing the maximum demand and corresponding demand electricity cost in the settlement cycle, while taking into account the arbitrage benefits of time-of-use pricing and the battery life cost, thereby improving the economy and feasibility of the energy storage system in industrial and commercial demand management scenarios.
[0025] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a flowchart of a charging and discharging control method for an energy storage system provided in an embodiment of the present invention;
[0028] Figure 2This is a flowchart of a charging and discharging control method for an energy storage system provided in an embodiment of the present invention;
[0029] Figure 3 This is a schematic diagram of the structure of a charging and discharging control device for an energy storage system provided in an embodiment of the present invention;
[0030] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0031] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. 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 should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0033] Figure 1 This is a flowchart illustrating a charging and discharging control method for an energy storage system according to an embodiment of the present invention. This embodiment is applicable to situations where the charging and discharging strategy of the energy storage system is subject to online rolling correction and adaptive optimization by combining load forecasting, demand threshold identification, electricity price information, and battery state constraints. This method can be executed by a charging and discharging control device for the energy storage system, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method specifically includes the following steps:
[0034] S110. Collect the operating status data of the target power system.
[0035] The operational status data includes load power data, distributed generation output data, time-of-use pricing data, energy storage status data, and demand record data. The target power system can be a user-side distribution system such as an industrial or commercial park, data center, or charging / swapping station. Operational status data can be real-time and historical business data. Load power data is the time-series record of the raw power consumption generated by user-side production and office equipment. Distributed generation output data can be understood as the real-time time-series data of distributed photovoltaic power generation in the park. Time-of-use pricing data can be the time-series information of peak-valley time-of-use pricing on the power grid. Energy storage status data includes equipment operating parameters such as battery state of charge, maximum allowable charge / discharge power, and charge / discharge efficiency, used to define the safety operation constraints of energy storage. Demand record data is the historical maximum demand time-series ledger generated within the current electricity billing cycle.
[0036] Specifically, power acquisition terminals are deployed for load power and distributed photovoltaic output. Time-series power values are continuously collected at a unified discrete time step, and load and photovoltaic data within historical sliding windows are stored synchronously. The system also connects to the power grid marketing system to obtain time-of-use pricing files for all time periods and updates pricing standards for each time period. Energy storage status data is read in real-time from the energy storage converter and battery management system, continuously acquiring steady-state parameters such as battery state of charge, rated charge / discharge power, and charge / discharge efficiency. Demand records for the settlement cycle stored in the park's distribution metering system are retrieved, and the maximum demand ledger for the cycle is updated in real-time. After the above data acquisition is completed, the data can be preprocessed. Preprocessing may include time-series alignment and basic cleaning, removing disconnected null values and collecting abnormal jump data. After data preprocessing, the operating status dataset is obtained.
[0037] S120. Based on the operating status data, load forecasting is performed to obtain the predicted load sequence for future periods.
[0038] Load forecasting can be a modeling and computational process that uses machine learning time-series models to numerically extrapolate net load for at least two discrete future time periods. Net load can be understood as the equivalent grid-connected power consumption after deducting distributed photovoltaic output from the user's original load power. The predicted load sequence can be an ordered set of net load forecast values for at least two consecutive future time periods within the prediction time domain.
[0039] Specifically, historical load power and distributed photovoltaic output time-series data are extracted from complete operational status data. These are then concatenated according to a fixed sliding time window rule to construct a predictive input vector, ensuring consistent alignment of time-series step sizes and eliminating invalid time-series samples from periods of interrupted data collection or abnormal jumps. A Long Short-Term Memory (LSTM) network, a temporal convolutional network, or a gradient boosting tree is selected as the predictive kernel. The model is trained and fitted using historical sliding window vectors. The latest constructed input vector is input at the current moment, and the net load prediction values for the next H discrete time periods are derived and output. All predicted values are then combined in an orderly manner to form a complete predicted load sequence. The deviation between the predicted values and the actual historical load is statistically analyzed, and the standard deviation of the prediction error is calculated, serving as a safety margin parameter for the subsequent generation of dynamic demand targets.
[0040] Based on the above technical solution, load forecasting is performed based on operational status data to obtain a predicted load sequence for future periods, including: constructing a prediction input feature vector based on net load power data from at least two historical times prior to the current time; inputting the prediction input feature vector into the load forecasting model to obtain net load forecast values for at least two consecutive future periods; and arranging the net load forecast values for each period in chronological order to generate a predicted load sequence.
[0041] The predicted input feature vector is a standardized time-series vector composed of multiple historical net load segments truncated using a sliding time window. The load forecasting model is any time-series machine learning model with a long short-term memory network, a temporal convolutional network, or a gradient boosting tree structure, used to predict net load values for future time periods. The net load forecast value is the equivalent grid-connected power estimate for a single future time period output by the model. The predicted load sequence is an ordered set of multiple time-period net load forecast values arranged in chronological order.
[0042] Specifically, historical load power and distributed photovoltaic output time-series records are extracted from complete operational status data to calculate continuous historical net load power data. A fixed-length sliding time window is used to extract multiple consecutive segments of historical net load data up to the current moment. The extracted time-series values are normalized into a prediction input feature vector. This constructed feature vector is fed into a pre-trained load prediction model to deduce and output the net load prediction values for all future consecutive time periods within the prediction time domain. Finally, the net load prediction values for all single time periods are sequentially and orderly concatenated according to the chronological order of future time from near to far, forming a time-series predicted load sequence.
[0043] For example, when using LSTM as the load forecasting model, the model takes a fixed-dimensional time-series input vector X_t as input, which is formed by splicing together multiple segments of historical net load time-series data, time-of-use electricity prices, date types, time period labels, and meteorological correlation features after standardization through a sliding time window. The model then passes through an input layer that receives feature vectors, multiple LSTM hidden layers with forget gates, input gates, and output gates to capture the long-term and short-term time-series dependencies of the load, a fully connected transition layer for compressing redundant feature dimensions, and a linearly activated output layer. Finally, it outputs the net load forecast values corresponding to H discrete time periods in the future. Based on this batch of forecast values and the historical real load samples, the standard deviation of the forecast error is calculated. All the net load forecast values for the future time periods are arranged and assembled into a forecast load sequence in chronological order.
[0044] The technical solution of this invention is based on integrating multiple historical net load segments into a standardized feature vector using a sliding time window. It uses a professional time-series machine learning model to batch extrapolate the predicted net load values for multiple time periods and integrates them into a predicted load sequence. This fully explores the time-series correlation between historical load and photovoltaic output, solving the problems of low prediction accuracy and inability to output load trends for multiple time periods at once in traditional single-point load extrapolation methods. It can completely predict the long-term peak load change trend within the settlement period, providing continuous and complete quantitative data for future loads for dynamic demand target generation, demand over-limit risk calculation, and solving of multi-objective charge and discharge optimization models for energy storage. This supports the planning of energy storage peak shaving strategies in advance and reduces the probability of maximum demand exceeding the limit during the settlement period.
[0045] S130. Based on the predicted load sequence and demand record data, demand risk is identified to obtain the demand risk sequence for future periods.
[0046] Demand record data can be understood as the historical maximum demand ledger generated and retained within the current electricity billing cycle. Demand risk identification can be a quantitative calculation process that comprehensively determines the probability of load exceeding limits by combining historical maximum demand, contract control thresholds, forecast error margins, and remaining cycle risk coefficients. Demand risk level can be a numerical indicator used to quantify the risk of load exceeding control demand targets and generating high demand electricity charges in a single period; a value greater than zero indicates the existence of peak shaving control needs. The demand risk level sequence can be an ordered set of values formed by arranging the corresponding demand risk levels for all future periods within the forecast time domain in chronological order.
[0047] Specifically, the process begins by retrieving demand record data to extract the maximum demand that has occurred within the settlement period. Simultaneously, it retrieves the preset contract-based demand control target value and sets a safety margin based on the standard deviation of the forecast error corresponding to the predicted load sequence. Then, it calculates the remaining period peak risk coefficient based on the remaining settlement time and substitutes it with a preset adjustment coefficient to solve for the dynamic demand target. Next, it iterates through the net load forecast values for each future period in the predicted load sequence, performing a difference calculation between the predicted net load for each period and the dynamic demand target to calculate the corresponding demand risk level. If the predicted net load is lower than the dynamic demand target, the risk level is set to zero; otherwise, a positive risk value is retained to represent the magnitude of the over-limit risk. After completing all risk level calculations, the risk level values for each period are arranged sequentially according to future time chronological order to generate a complete time-series demand risk level sequence.
[0048] It should be noted that each control cycle will synchronously update the latest demand record data and predicted load sequence, recalculate the dynamic demand target and the complete set of risk degree sequences, and adapt to various operating conditions such as sudden load changes, halfway through the cycle, and expansion of prediction deviation.
[0049] Based on the above technical solution, demand risk identification is performed based on the predicted load sequence and demand record data to obtain a demand risk sequence for future periods, including: determining the demand control benchmark value based on the maximum demand data and user contract demand data recorded in the current settlement cycle; determining the demand exceedance limit for each period based on the difference between the net load forecast value and the demand control benchmark value for each period in the predicted load sequence; and generating the demand risk sequence based on the demand exceedance limit for each period.
[0050] Demand risk level is positively correlated with demand exceeding the limit. The recorded maximum demand data can be understood as the historical peak load recorded by the distribution metering system within the current electricity billing cycle, used to constrain the lower limit of dynamic control. User contract demand data can be the rated demand control upper limit agreed upon by the power grid and the user in the contract. The demand control benchmark value is the dynamic control threshold calculated by integrating historical peak values, contract limits, prediction error margin, and remaining cycle risk coefficient, used to determine whether the load exceeds the limit risk. The net load forecast value can be understood as the equivalent grid-connected power output for future periods output by the load forecast model. Demand exceeding the limit can be the difference between the net load forecast value for a single period and the demand control benchmark value. Demand risk level can be an indicator used to quantify the severity of demand exceeding the limit for a single period; the larger the exceeding limit, the higher the risk level value. The demand risk level sequence can be a time-series set formed by sorting the demand risk levels for all periods within the prediction time domain in chronological order.
[0051] Specifically, demand record data is retrieved, and the maximum demand generated in the settlement period and the demand limit in user-signed contracts are extracted. Combined with the forecast error standard deviation associated with the forecast load, the peak risk coefficient of the remaining settlement period, and the preset adjustment coefficient, calculations are performed to determine the dynamic demand control benchmark value adapted to the current operating conditions. The net load forecast value for each future period within the forecast load sequence is traversed. The difference between the forecast net load for a single period and the demand control benchmark value is calculated. If the forecast net load is less than the benchmark value, the demand over-limit for that period is set to zero; if the forecast net load is higher than the benchmark value, the difference is retained as the demand over-limit for that period. Following the mapping rule that risk level and over-limit are positively correlated, the demand over-limit for each period is converted into the corresponding demand risk level. A larger over-limit indicates a more severe consequence of exceeding the limit. After completing the risk level conversion for all future periods, all risk level values are organized in chronological order from most recent to oldest, forming a time-series demand risk level sequence.
[0052] The technical solution of this invention integrates historical peak demand and contractual demand constraints to generate a dynamic control benchmark. By predicting the difference between the net load and the benchmark, the extent of demand exceeding the limit is quantified. Based on a positive correlation mapping relationship, a time-series demand risk sequence is generated, which can accurately distinguish the severity of demand exceeding the limit in different time periods. This solves the problem that traditional fixed thresholds can only qualitatively determine whether there is risk but cannot quantify the risk level. It provides differentiated time-segmented demand penalty weights for energy storage optimization models, guiding energy storage to prioritize increasing discharge power during high-risk periods to suppress peak loads, accurately reducing the probability of peak values exceeding contractual limits during the settlement period, and balancing peak shaving effect with the economic efficiency of energy storage operation.
[0053] S140. Generate dynamic demand control targets based on demand record data, predicted load sequences, and demand risk sequences.
[0054] Among them, the dynamic demand control target can be understood as a flexible control threshold that is adjusted in real time according to the progress of the cycle, the deviation of the load forecast, and the peak risk. It is different from the fixed contract demand limit and is used to guide the peak shaving regulation of energy storage in different time periods.
[0055] Specifically, the system extracts the historical maximum demand and contractual base demand limit from demand records for the settlement period. A safety margin is set based on the standard deviation of the forecast error calculated from the predicted load sequence. Then, a peak risk coefficient is calculated based on the remaining duration of the settlement period, and the base threshold is corrected using a preset adjustment coefficient. The system iterates through the demand risk sequence to identify high-risk periods. For intervals with high risk and predicted net load significantly exceeding the base threshold, the dynamic demand control target is appropriately lowered to reserve sufficient space for energy storage discharge regulation. For periods with risk approaching zero and stable load without over-limit risks, the dynamic demand control target is increased to reduce unnecessary energy storage discharge losses. After solving for the target value for a single control period, the dynamic demand control target is synchronously bound to all periods in the forecast time domain, and differentiated control standards are set for high- and low-risk intervals.
[0056] Based on the above technical solution, a dynamic demand control target is generated based on demand record data, predicted load sequence, and demand risk sequence. This includes: determining the basic demand limit based on the maximum demand data and user contract demand data recorded in the current settlement period; determining the peak risk coefficient for the remaining period based on the current position in the settlement period, and determining the standard deviation of the prediction error based on the predicted load sequence; and determining the dynamic demand control target based on the weighted sum of the basic demand limit, peak risk coefficient, and standard deviation of the prediction error.
[0057] The peak risk coefficient can be an adjustment parameter used to characterize the probability of an exceptionally high load peak occurring during the remaining period of the settlement cycle; the shorter the remaining time of the cycle, the larger the coefficient. The predicted load sequence can be understood as a time-series set of net load forecasts for multiple future periods, used to calculate the dispersion of the forecast deviation. The standard deviation of the forecast error is an indicator used to measure the degree of deviation between the load forecast result and the actual historical load. The dynamic demand control target can be a flexible control threshold that integrates the basic limit, cycle risk, and forecast deviation weighted correction.
[0058] Specifically, demand record data is read, and the maximum demand generated in the current period is compared with the contracted demand. The value that matches the business control requirements is taken as the basic demand limit. The current settlement cycle progress is identified, and the proportion of remaining time to the complete settlement cycle is calculated. According to the rule that the later the cycle, the higher the risk, the corresponding peak risk coefficient is matched. At the same time, historical predicted load sequences and actual load samples from the same period are retrieved, and the dispersion of the deviation between the two is statistically analyzed to obtain the standard deviation of the prediction error, quantifying the instability of the prediction model. A preset adjustment weight coefficient is introduced, and the peak risk coefficient and the standard deviation of the prediction error are weighted respectively. The weighted correction term is superimposed with the basic demand limit to complete the summation operation, resulting in a dynamic demand control target adapted to the current operating conditions.
[0059] The technical solution of this invention determines basic control limits based on historical demand and contract standards, combines peak risk coefficients with settlement cycle progress matching, calculates error margins based on load forecast sequences, and completes dynamic threshold correction through weighted summation. This solves the problem of demand exceeding limits caused by traditional fixed thresholds failing to adapt to changes in cycle progress and inaccurate forecasts. It can adaptively adjust the control strictness according to the remaining time and forecast reliability, providing a dynamic constraint benchmark for subsequent multi-objective optimization models of energy storage. While reducing the maximum demand of the cycle and reducing demand electricity costs, it avoids arbitrage revenue loss and accelerated battery life degradation caused by excessive discharge of energy storage.
[0060] S150. An energy storage charging and discharging optimization model is constructed based on the predicted load sequence, dynamic demand control target, time-of-use electricity price data, and energy storage status data.
[0061] The time-of-use (TOU) electricity price data comprises time-series information on electricity prices corresponding to peak, valley, and flat periods in the power grid, used to calculate the purchase and sale costs of electricity generated by energy storage charging and discharging. Energy storage status data includes equipment operating parameters such as battery state of charge, rated charging and discharging power, charging and discharging efficiency, and battery rated capacity, used to define the safe operating boundaries of energy storage equipment. The energy storage charging and discharging optimization model is a multi-objective rolling optimization mathematical model. It constructs an objective function by comprehensively considering three types of costs: demand penalty, electricity cost, and battery life loss, and solves for the optimal energy storage charging and discharging power by combining equipment operating constraints.
[0062] Specifically, the system reads the predicted load sequence and calculates the demand risk cost items corresponding to demand exceeding limits for each time period, based on the dynamic demand control target. Then, it imports time-of-use electricity price data and calculates the electricity cost items corresponding to electricity purchase and sale for each time period based on energy storage charging and discharging behavior. Simultaneously, it retrieves energy storage state data and constructs the lifespan loss cost item due to battery cycling based on the state of charge transition equation, setting weight coefficients to balance the optimization priorities of the three types of costs. The three types of costs are summed to construct an optimization objective function that minimizes the total operating cost. Then, based on the energy storage state data, complete equipment safety constraints are added, including upper and lower limits of maximum charging and discharging power, power ramp-up rate, state of charge operating range, prediction error relaxation margin, and other constraints, forming an energy storage charging and discharging optimization model.
[0063] Based on the above technical solutions, an energy storage charging and discharging optimization model is constructed based on predicted load sequences, dynamic demand control targets, time-of-use electricity price data, and energy storage status data. This includes: determining the demand risk cost item for each time period based on the predicted load sequences and dynamic demand control targets; determining the electricity cost item for each time period based on the predicted load sequences and time-of-use electricity price data; determining the lifetime depreciation cost item for each time period based on the state of charge data and preset optimal operating state of charge values in the energy storage status data; constructing an optimization objective function based on the weighted sum of the demand risk cost item, electricity cost item, and lifetime depreciation cost item for each time period; constructing a set of energy storage operation constraints based on the maximum charging and discharging power data and state of charge data in the energy storage status data; and constructing the energy storage charging and discharging optimization model based on the optimization objective function and the set of energy storage operation constraints.
[0064] The energy cost component represents the net cost of electricity purchased for charging and sold during the energy storage period. Charging during off-peak hours increases costs, while discharging during peak hours reduces costs. State of charge (SOC) data can be the ratio of the battery's current remaining capacity to its rated capacity, determining the degree of battery aging and degradation. The optimal operating SOC value can be the benchmark of the central SOC range that minimizes long-term battery operating losses; deviations from this value will exacerbate degradation. The lifespan degradation cost component can be understood as the equivalent loss cost incurred by the battery deviating from its optimal operating range, used to quantify the economic losses caused by cyclic aging. The optimization objective function can be a weighted summation function oriented towards minimizing total operating costs, balancing the optimization priorities of the three types of costs through weights. The energy storage operation constraint set can be a set of mathematical inequalities that restrict safety boundaries such as charging / discharging power, SOC range, and power ramp-up rate. The energy storage charging / discharging optimization model can be a mathematical programming model that integrates multiple cost objectives and equipment safety constraints.
[0065] Specifically, the net load forecast value for each time period of the predicted load sequence is traversed and compared with the dynamic demand control target to calculate the load exceeding the limit, thus obtaining the corresponding demand risk cost item for that time period, representing the economic loss caused by demand exceeding the limit. Combining the time-of-use electricity price and energy storage charging and discharging behavior logic for each time period, the electricity cost item for each time period is solved based on the electricity revenue and expenditure relationship of charging purchases and discharging feed-back, quantifying the changes in peak-valley arbitrage profits. Real-time battery state-of-charge data is read and compared with the preset optimal operating state-of-charge benchmark; the lifespan depreciation cost item for each time period is calculated based on the degree of deviation between the two, quantifying battery aging losses. Based on preset weight coefficients corresponding to three types of cost items, the three costs for the same time period are weighted and summed to obtain the comprehensive cost for that time period. This is accumulated over all time periods in the prediction time domain to construct a total minimization optimization objective function. Subsequently, parameters such as maximum charging power, maximum discharging power, real-time SOC upper and lower limits, and power ramp-up limits are extracted from the energy storage state data to construct a complete set of energy storage operation constraints, preventing dangerous operating conditions such as overpowering, overcharging, and over-discharging. Finally, the minimization objective function is integrated with all safety constraints to form an energy storage charging and discharging optimization model.
[0066] The technical solution of this invention quantifies three types of economic costs—demand penalty, peak-valley electricity price, and battery loss—in multiple dimensions and constructs a unified optimization objective by weighting them. Simultaneously, it is equipped with full-dimensional safety constraints for energy storage equipment to form a complete optimization model. This solves the shortcomings of existing solutions that only optimize demand reduction or electricity price arbitrage and ignore battery life and equipment operation safety. It can automatically balance multiple conflicting economic objectives without exceeding the operating boundaries of energy storage hardware. It provides the solver with a complete mathematical calculation framework that fits the actual operating conditions of industrial and commercial users, and simultaneously achieves multiple benefits such as reduced demand electricity price, increased peak-valley arbitrage revenue, and extended battery life.
[0067] Based on the above technical solution, a set of energy storage operation constraints is constructed based on the maximum charge / discharge power data and state of charge data in the energy storage state data. This includes: constructing charge / discharge power boundary constraints based on the maximum charge power data and maximum discharge power data in the energy storage state data; constructing upper and lower limit constraints for the state of charge based on the state of charge data in the energy storage state data; constructing power ramp-up rate constraints based on the difference in charge / discharge power between adjacent time periods; constructing constraint relaxation variables based on the prediction reliability parameters of the predicted load sequence, and correcting the charge / discharge power boundary constraints based on the constraint relaxation variables; and integrating the charge / discharge power boundary constraints, upper and lower limit constraints for the state of charge, and power ramp-up rate constraints into a set of energy storage operation constraints.
[0068] Among these, the state of charge (SOC) data can be the ratio of the battery's remaining capacity to its rated capacity, reflecting the battery's remaining charge level. SOC upper and lower limit constraints can be understood as range constraints to prevent overcharging and over-discharging damage to the battery. Power ramp rate constraints are used to limit the amplitude of energy storage power changes between periods, avoiding sudden power surges and drops that could impact power distribution equipment. Prediction reliability parameters can be evaluation indicators calculated based on historical deviations of the predicted load sequence, characterizing the reliability of the load prediction results. Constraint slack variables can be adjustable margin parameters generated based on prediction reliability, used to dynamically relax or tighten power constraints. The energy storage operation constraint set is a complete set of inequality constraints integrating power, SOC, ramp rate, and prediction margin correction rules, limiting all feasible charge and discharge power ranges for energy storage.
[0069] Specifically, the system reads the rated maximum charging and discharging power from the energy storage status data, defines the basic power upper and lower limits, and generates the original charging and discharging power boundary constraints. It extracts the safe upper and lower limits of charge specified by the battery manufacturer and combines them with the real-time state of charge transition equation to construct upper and lower limit constraints of charge state, avoiding overcharging and over-discharging that accelerates battery aging. It sets a threshold for the difference in charging and discharging power between adjacent time periods, and constructs a power ramp-up rate constraint based on the threshold to suppress the impact of drastic power fluctuations on the power distribution system and energy storage converter. It statistically analyzes the historical errors of the predicted load sequence to obtain a prediction reliability parameter; the lower the reliability, the larger the constraint slack variable is generated. The slack variable is used to adaptively correct the charging and discharging power boundary constraints. When the load prediction deviation is large, the power control space is appropriately relaxed; when the prediction is accurate, the constraints are tightened to ensure equipment safety. The corrected charging and discharging power boundary constraints, upper and lower limit constraints of charge state, and power ramp-up rate constraints are then uniformly summarized to form a complete set of energy storage operation constraints.
[0070] The technical solution of this invention establishes basic safety constraints from three dimensions: power amplitude, battery capacity, and power change rate. It also introduces load prediction reliability to generate relaxation variables to dynamically correct the power boundary, forming a complete set of adaptive energy storage operation constraints. This solves the defects of traditional fixed constraints that do not consider prediction deviations and are too rigid, which makes it impossible to timely shaving peak loads when load changes suddenly. It can not only ensure the safe and stable operation of energy storage batteries, converters, and power distribution equipment in the long term, but also release a certain control margin when the prediction error is large, improve the energy storage's response capability to sudden peak loads, and balance the safety of equipment operation with the flexibility of demand control.
[0071] S160. Solve the energy storage charging and discharging optimization model to obtain the optimal charging and discharging power sequence for future time periods. Based on the optimal charging and discharging power sequence, extract the charging and discharging power command for the first control moment and send it to the energy storage execution device.
[0072] The optimal charge / discharge power sequence can be understood as an ordered set of energy storage charge / discharge powers obtained through optimization across all future time periods within the prediction time domain, encompassing a complete long-term control plan. The charge / discharge power command at the first control moment is the power value of the first time period closest to the current moment in the optimal sequence. The energy storage execution device includes an energy storage converter and a battery management system, used to receive power commands and complete battery charging and discharging power regulation.
[0073] Specifically, a mixed-integer linear programming, quadratic programming, or model predictive control-specific solver is selected to load the complete energy storage charge-discharge optimization model. Real-time updated predicted load, dynamic demand targets, time-of-use electricity prices, and energy storage status data are substituted to perform numerical solutions, outputting an optimal charge-discharge power sequence covering the entire prediction time domain. Power commands are sent to the energy storage converter and battery management system via a standardized communication interface. The equipment adjusts its output power according to the commands, with discharge being positive and charging being negative. Real-time data collection and feedback from the equipment execution is transmitted back to the system.
[0074] Based on the above technical solution, the charging and discharging power command of the first control moment is extracted based on the optimal charging and discharging power sequence and sent to the energy storage execution device. This includes: extracting the charging and discharging power value corresponding to the current control moment in the optimal charging and discharging power sequence as the charging and discharging power command for the current period; sending the charging and discharging power command to the energy storage converter or energy management system for execution; and recording the actual charging and discharging power, actual demand value and state of charge for the current period.
[0075] The optimal charge / discharge power sequence is a multi-period energy storage power planning array obtained from the optimization model, encompassing the theoretically optimal output scheme for all long-term periods. The current control time is the first execution period closest to the current sampling point under the rolling optimization process, representing the time window for immediate implementation and control. The charge / discharge power command is a standardized power control quantity for a single period, with discharge power defined as positive and charging power as negative. The energy storage converter is the core hardware for power conversion in the energy storage system, responsible for adjusting battery charge / discharge power according to the command. The energy management system is the upper-level scheduling unit for energy storage, receiving power commands and coordinating the collaborative operation of the battery management system and the converter. The actual charge / discharge power is the actual active power output / absorbed by the energy storage device after executing the command. The actual demand value is the current cycle's peak grid load collected in real-time by the distribution metering device. The state of charge is the ratio of the battery's real-time remaining capacity to its rated capacity.
[0076] Specifically, the optimal charge / discharge power sequence is read sequentially, and the power value corresponding to the first position of the sequence at the current control moment is extracted. After format conversion, standardized charge / discharge power commands are generated, removing planned power for long-term periods and retaining only the commands for the current period. The power commands are then sent to the energy storage converter and the upper-level energy management system via an industrial standardized communication link. Upon receiving the commands, the devices adjust the AC / DC power conversion circuit to complete the battery charging or discharging operation. It should be noted that real-time data from the metering terminal, energy storage converter, and battery management system are continuously collected throughout the control cycle. The system fully stores three types of operational data: actual charge / discharge power, real-time peak demand on the grid side, and real-time battery state of charge, and stores them in a local time-series database. This recorded data will be reused as input material in the next rolling optimization cycle to calculate demand control deviation and load forecasting error, supporting adaptive parameter update logic.
[0077] Based on the above technical solution, the actual demand control deviation and actual load prediction error of the current control cycle are obtained; when the actual demand control deviation is greater than the preset deviation threshold, the weight coefficient of the demand risk cost term in the optimization objective function is increased; when the actual load prediction error is greater than the preset error threshold, the control strength coefficient in the dynamic demand control objective is decreased; when the number of actual demand exceeding the limit increases, the safety margin coefficient in the dynamic demand control objective is increased.
[0078] Among them, the actual demand control deviation is the difference between the dynamic demand control target and the actual maximum grid-connected demand within the period, used to measure the effectiveness of peak shaving control; the actual load forecast error is the deviation between the load forecast value and the actual net load power on site during the same period, reflecting the accuracy of the load forecast model; the preset deviation threshold is a pre-set critical value for allowable deviation of demand control, serving as the judgment boundary for weight adjustment; the weight coefficient of the demand risk cost item is a parameter for adjusting the proportion of demand penalty cost within the objective function of optimization. The larger the coefficient, the more preferentially the model suppresses peak loads; the preset error threshold is the critical deviation standard for judging load forecast distortion, used to trigger the correction of the dynamic demand target; the control intensity coefficient of the dynamic demand control target is a parameter for adjusting the strictness of control. Decreasing the coefficient will lower the dynamic demand threshold and increase the peak shaving force; the number of actual demand exceedances is the cumulative number of periods during which the grid-connected load exceeds the dynamic demand target within the settlement period, characterizing the frequency of demand control failure; the safety margin coefficient of the dynamic demand control target is an adjustment parameter used to superimpose the forecast error buffer. Increasing the coefficient can reserve more control buffer space.
[0079] Specifically, after each control cycle, the system can retrieve the actual maximum demand recorded by the metering system and the actual net load time-series data after energy storage execution. It can then calculate the actual demand control deviation and time-period load prediction error for the current period, and count the cumulative number of load exceedances within the settlement cycle. By comparing the actual demand control deviation with a preset deviation threshold, if the deviation exceeds the allowable range, it indicates insufficient peak shaving by the current energy storage system. The weight of the demand risk cost term in the optimization objective function is automatically increased, allowing the model to prioritize reducing peak loads in subsequent optimization calculations. Similarly, by comparing the actual load prediction error with a preset error threshold, if the prediction deviation exceeds the standard, it indicates low load prediction reliability. The control intensity coefficient corresponding to the dynamic demand control target is automatically reduced, and the control threshold is tightened to cope with unknown load fluctuations. The number of demand exceedances within the cycle is continuously counted. When the frequency of exceedances continues to rise, the safety margin coefficient in the dynamic demand target is simultaneously increased, expanding the prediction deviation buffer zone.
[0080] The technical solution of this invention involves: collecting operational status data of the target power system; performing load forecasting based on the operational status data to obtain a predicted load sequence for future periods; identifying demand risk based on the predicted load sequence and demand record data to obtain a demand risk degree sequence for future periods; generating a dynamic demand control target based on the demand record data, the predicted load sequence, and the demand risk degree sequence; constructing an energy storage charging and discharging optimization model based on the predicted load sequence, the dynamic demand control target, time-of-use electricity price data, and energy storage status data; solving the energy storage charging and discharging optimization model to obtain the optimal charging and discharging power sequence for future periods; extracting the charging and discharging power command for the first control moment based on the optimal charging and discharging power sequence and issuing it to the energy storage execution device. Based on the above technical solutions, load forecasting is performed by considering the demand target of the target power system, and further, an energy storage charging and discharging optimization model is constructed to control the charging and discharging of the energy storage system. This enables the adaptive generation of energy storage charging and discharging power commands while ensuring the safe operation of the battery, reducing the maximum demand and corresponding demand electricity cost in the settlement cycle, while taking into account the arbitrage benefits of time-of-use pricing and the battery life cost, thereby improving the economy and feasibility of the energy storage system in industrial and commercial demand management scenarios.
[0081] In one possible implementation of the present invention Figure 2 This invention provides a flowchart of a charging and discharging control method for an energy storage system, and further describes a technical solution for a data processing and visualization method for a power grid system. Figure 2 As shown, the method includes:
[0082] The method of this invention includes steps such as load data acquisition and forecasting, demand risk identification, dynamic demand target generation, energy storage charging and discharging optimization solution, online rolling correction and adaptive parameter update, as detailed below.
[0083] S1. Load and energy storage status data acquisition and predictive modeling:
[0084] Historical load power, photovoltaic output, time-of-use pricing, battery state of charge, maximum allowable charge / discharge power, and the maximum demand recorded within the settlement period are collected in the user-side power distribution system. Let the discrete time be t, and the time step be Δt, then the original net load is defined as:
[0085] ;
[0086] Where P_n(t) represents the net load power at time t, P_L(t) represents the original load power of the user, and P_PV(t) represents the distributed photovoltaic output.
[0087] A sliding time window is used to construct the prediction input vector X_t, and the net load for the next H time periods is predicted, resulting in:
[0088] ;
[0089] Where hat(P)_n(t+k) represents the net load forecast value for the k-th time period in the future, and f_theta(·) represents the load forecasting model, which can be a long short-term memory network, a temporal convolutional network, or a gradient boosting tree model.
[0090] S2. Construction of Demand Risk Indicators and Generation of Dynamic Demand Targets:
[0091] Let the maximum recorded demand in the current settlement period be D_max^his, and the user contract demand or management target value be D_lim^base.
[0092] Considering the prediction error margin and the remaining cycle risk coefficient, a dynamic demand target D_lim(t) is constructed:
[0093] ;
[0094] Where R(t) represents the peak risk coefficient for the remaining settlement period, sigma(t) represents the standard deviation of the forecast error or safety margin, and lambda_1 and lambda_2 are adjustment coefficients. When the future forecast load shows a tendency to exceed limits, the demand risk level r(t+k) is defined as:
[0095] ;
[0096] When r(t+k) is greater than zero, it indicates that there is a risk of demand exceeding the limit in the k-th time period in the future, and it is necessary to suppress the net load through energy storage discharge.
[0097] S3. Construction of Energy Storage Charging and Discharging Optimization Model:
[0098] Let u(t+k) be the charge / discharge power command for energy storage at time t+k, and define discharge as positive and charging as negative. Then, the grid-connected power after energy storage regulation is:
[0099] ;
[0100] The energy storage charge state satisfies the following state transition equation:
[0101] ;
[0102] Where u^+(t+k)=max{u(t+k),0}, u^-(t+k)=max{-u(t+k),0}, E_B is the rated available energy of the battery, and eta_d and eta_c are the discharge efficiency and charging efficiency, respectively.
[0103] To minimize demand penalty, electricity cost, and lifetime depreciation cost, a rolling optimization objective function is constructed:
[0104] ;
[0105] The demand risk cost C_d(t+k), electricity cost C_e(t+k), and lifetime loss cost C_deg(t+k) are defined as follows:
[0106] ;
[0107] ;
[0108] ;
[0109] Where pi(t+k) is the electricity price for the future period, SOC_ref is the preferred state of charge of the operating center, and alpha, beta, and gamma are the target weight coefficients.
[0110] S4. Constraint Setting and Optimization Solution:
[0111] The optimization model satisfies the following constraints:
[0112] ;
[0113] ;
[0114] ;
[0115] ;
[0116] Where P_c^max and P_d^max are the maximum charging power and maximum discharging power, respectively, R_u is the power ramp-up constraint, and epsilon(t+k) is the relaxation margin automatically generated based on the prediction confidence. The above model is solved using mixed-integer linear programming, quadratic programming, or a model predictive control solver to obtain the optimal power sequence U^*={u^*(t+1),...,u^*(t+H)} in the prediction time domain.
[0117] S5. Online scrolling execution and adaptive parameter correction:
[0118] In each control cycle, only the first control variable u^*(t+1) in the optimal power sequence is executed. Then, the actual load, SOC, and the maximum demand that has occurred are re-acquired at the next time step, and the solution is obtained on a rolling basis based on the latest data. To improve the adaptability to load fluctuations, an adaptive parameter update mechanism is constructed:
[0119] ;
[0120] ;
[0121] ;
[0122] Where e_d(t) represents the demand control deviation, e_f(t) represents the prediction error, mu_1, mu_2, and mu_3 are the adaptive step sizes, and I_(·) is the indicator function. When the system detects an increase in the number of out-of-limit occurrences or an expansion of the prediction error, it automatically increases the demand penalty weight and safety margin; when the system operates smoothly and the SOC margin is sufficient, it appropriately relaxes the control strength to maintain economy.
[0123] S6. Control command issuance and strategy closed-loop evaluation:
[0124] The charging and discharging power commands obtained from the rolling optimization are sent to the energy storage converter or energy management system for execution. At the same time, the current demand reduction value, electricity cost savings, number of cycles and over-limit alarm information are recorded to form a closed-loop evaluation result of demand management, which provides a basis for subsequent parameter tuning and model updates.
[0125] An example is a demand management scenario in an industrial park. An industrial park is equipped with a 500kW / 1000kWh lithium-ion energy storage system, with a settlement period of 30 days and a contract demand target of 1800kW. The control period is set at 15 minutes, i.e., Δt = 0.25h; the rolling forecast time domain is set at H = 8, i.e., the next 2 hours. The initial state of charge (SOC(t)) is 0.60, and the operating boundaries are set at SOC_min = 0.15 and SOC_max = 0.90; the maximum charge and discharge powers are P_c^max = 500kW and P_d^max = 500kW, respectively; and the charge and discharge efficiencies are set at eta_d = 0.95 and eta_c = 0.95, respectively.
[0126] At a certain control moment, the recorded maximum demand is D_max^his = 1720kW, the base demand target is D_lim^base = 1800kW, the remaining cycle risk coefficient is R(t) = 40kW, the standard deviation of the prediction error is sigma(t) = 20kW, and we take lambda_1 = 0.5 and lambda_2 = 0.8. Then, according to the formula, the dynamic demand target can be obtained as follows:
[0127] ;
[0128] The projected net load values for the next eight time periods are 1680kW, 1710kW, 1765kW, 1820kW, 1780kW, 1740kW, 1690kW, and 1650kW, respectively. Therefore, without energy storage regulation, there is a risk of demand exceeding limits in time periods 3 through 5, with the most significant exceedance occurring in time period 4. The exceedance amount is:
[0129] ;
[0130] With target weighting coefficients alpha=0.65, beta=0.25, and gamma=0.10; and lifetime loss parameters c_1=0.015 and c_2=0.010, and combined with electricity price information, the optimal charging and discharging power sequence for the next 8 time periods is approximately obtained through optimization:
[0131] ;
[0132] The system performs discharge during periods 3 to 5 to reduce peak loads, and moderately charges during periods 7 and 8 to restore State of Charge (SOC) during off-peak hours. Therefore, the grid-connected power sequence after energy storage regulation is 1680kW, 1710kW, 1745kW, 1756kW, 1756kW, 1740kW, 1730kW, and 1710kW, indicating that the maximum grid-connected power is limited to near the dynamic demand target.
[0133] Based on a demand-based electricity price of 42 yuan / kW·month, without the method of this invention, the maximum demand could reach 1820kW; with the method of this invention, the maximum demand is controlled at 1756kW, thus reducing the billable demand by 64kW in the current month, resulting in corresponding savings in demand-based electricity costs.
[0134] ;
[0135] Meanwhile, since the control strategy replenishes power during off-peak hours and takes into account time-of-use pricing, the overall daily revenue remains positive after deducting charging and discharging losses and lifespan depreciation costs. If the actual load is detected to be 18kW higher than the predicted value in the next control cycle, epsilon(t) and alpha(t) are increased according to the adaptive update formula, making subsequent rolling optimization more conservative in peak shaving, thereby reducing the risk of exceeding limits again.
[0136] The results show that the method of the present invention can effectively suppress the maximum demand during the settlement cycle without exceeding the constraints of SOC, safe power and ramping, improve the economic operation capability of energy storage in demand management scenarios, and has strong online adaptability.
[0137] This invention integrates the maximum demand during the settlement period, load forecast results, and battery operating status into a unified optimization framework. Compared to fixed-threshold peak shaving methods, it can more accurately identify future demand exceedance risks and respond in advance. By constructing a joint objective function of demand risk cost, electricity cost, and lifespan depreciation cost, it achieves synergistic optimization of demand management and peak-valley arbitrage, avoiding the decline in overall benefits caused by emphasizing only a single indicator. The introduction of dynamic demand targets and adaptive parameter update mechanisms enables real-time correction of control strategies based on maximum demand records, forecast errors, and operational feedback during the settlement period, significantly enhancing adaptability to changes in operating conditions. It can be directly deployed in commercial and industrial energy storage management systems, microgrid control systems, or integrated energy platforms in industrial parks, with a clear implementation path and strong engineering feasibility.
[0138] Figure 3 This is a schematic diagram of the structure of a charge and discharge control device for an energy storage system provided in an embodiment of the present invention. Figure 3 As shown, the device includes: a data acquisition module 310, a predicted load sequence determination module 320, a demand risk sequence determination module 330, a dynamic demand control target determination module 340, an optimization model construction module 350, and an energy storage device control module 360.
[0139] The data acquisition module 310 is used to collect the operating status data of the target power system, including load power data, distributed power output data, time-of-use electricity price data, energy storage status data, and demand record data.
[0140] The load sequence determination module 320 is used to perform load forecasting based on operating status data to obtain the load sequence for future periods.
[0141] The demand risk sequence determination module 330 is used to identify demand risk based on the predicted load sequence and demand record data, and obtain the demand risk sequence for future periods.
[0142] The dynamic demand control target determination module 340 is used to generate dynamic demand control targets based on demand record data, predicted load sequences, and demand risk sequences.
[0143] The optimization model building module 350 is used to build an energy storage charging and discharging optimization model based on the predicted load sequence, dynamic demand control target, time-of-use electricity price data and energy storage status data.
[0144] The energy storage device control module 360 is used to solve the energy storage charging and discharging optimization model to obtain the optimal charging and discharging power sequence for future time periods. Based on the optimal charging and discharging power sequence, the charging and discharging power command for the first control moment is extracted and sent to the energy storage execution device.
[0145] Based on the above technical solution, the predicted load sequence determination module is used to construct a predicted input feature vector based on the net load power data of at least two historical times before the current time; input the predicted input feature vector into the load prediction model to obtain the net load prediction values for at least two consecutive future time periods; and arrange the net load prediction values of each time period in chronological order to generate a predicted load sequence.
[0146] Based on the above technical solution, the demand risk sequence determination module is used to determine the demand control benchmark value based on the maximum demand data and user contract demand data recorded in the current settlement cycle; determine the demand exceedance amount for each period based on the difference between the net load forecast value and the demand control benchmark value for each period in the forecast load sequence; and generate a demand risk sequence based on the demand exceedance amount for each period, wherein the demand risk is positively correlated with the demand exceedance amount.
[0147] Based on the above technical solution, the dynamic demand control target determination module is used to determine the basic demand limit based on the maximum demand data and user contract demand data recorded in the current settlement period; determine the peak risk coefficient of the remaining period based on the current position in the settlement period, and determine the standard deviation of the prediction error based on the predicted load sequence; and determine the dynamic demand control target based on the weighted sum of the basic demand limit, the peak risk coefficient and the standard deviation of the prediction error.
[0148] Based on the above technical solutions, an optimized model construction module is used to determine the demand risk cost item for each time period based on the predicted load sequence and dynamic demand control objectives; determine the electricity cost item for each time period based on the predicted load sequence and time-of-use electricity price data; determine the lifetime depreciation cost item for each time period based on the state of charge data in the energy storage status data and the preset preferred operating state of charge value; construct an optimization objective function based on the weighted sum of the demand risk cost item, electricity cost item, and lifetime depreciation cost item for each time period; construct a set of energy storage operation constraints based on the maximum charge and discharge power data and state of charge data in the energy storage status data; and construct an energy storage charge and discharge optimization model based on the optimization objective function and the set of energy storage operation constraints.
[0149] Based on the above technical solution, the model building module is optimized to construct charge and discharge power boundary constraints based on the maximum charging power data and maximum discharging power data in the energy storage state data; construct upper and lower limit constraints of the state of charge based on the state of charge data in the energy storage state data; construct power ramp-up rate constraints based on the difference in charge and discharge power between adjacent time periods; construct constraint relaxation variables based on the prediction reliability parameters of the predicted load sequence, and correct the charge and discharge power boundary constraints based on the constraint relaxation variables; and integrate the charge and discharge power boundary constraints, upper and lower limit constraints of the state of charge, and power ramp-up rate constraints into a set of energy storage operation constraints.
[0150] Based on the above technical solution, the energy storage device control module is used to extract the charging and discharging power value corresponding to the current control moment in the optimal charging and discharging power sequence, as the charging and discharging power command for the current period; send the charging and discharging power command to the energy storage converter or energy management system for execution, and record the actual charging and discharging power, actual demand value and state of charge for the current period.
[0151] The technical solution of this invention involves: collecting operational status data of the target power system; performing load forecasting based on the operational status data to obtain a predicted load sequence for future periods; identifying demand risk based on the predicted load sequence and demand record data to obtain a demand risk degree sequence for future periods; generating a dynamic demand control target based on the demand record data, the predicted load sequence, and the demand risk degree sequence; constructing an energy storage charging and discharging optimization model based on the predicted load sequence, the dynamic demand control target, time-of-use electricity price data, and energy storage status data; solving the energy storage charging and discharging optimization model to obtain the optimal charging and discharging power sequence for future periods; extracting the charging and discharging power command for the first control moment based on the optimal charging and discharging power sequence and issuing it to the energy storage execution device. Based on the above technical solutions, load forecasting is performed by considering the demand target of the target power system, and further, an energy storage charging and discharging optimization model is constructed to control the charging and discharging of the energy storage system. This enables the adaptive generation of energy storage charging and discharging power commands while ensuring the safe operation of the battery, reducing the maximum demand and corresponding demand electricity cost in the settlement cycle, while taking into account the arbitrage benefits of time-of-use pricing and the battery life cost, thereby improving the economy and feasibility of the energy storage system in industrial and commercial demand management scenarios.
[0152] The charging and discharging control device for the energy storage system provided in this embodiment of the invention can execute the charging and discharging control method for the energy storage system provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0153] Figure 4 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0154] like Figure 4As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from storage unit 18. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0155] At least two components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0156] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the charging and discharging control methods of an energy storage system.
[0157] In some embodiments, the charge / discharge control method of the energy storage system may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or at least two steps of the charge / discharge control method of the energy storage system described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the charge / discharge control method of the energy storage system by any other suitable means (e.g., by means of firmware).
[0158] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or at least two computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0159] Computer programs used to implement the methods of the present invention can be written in any combination of one or at least two programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0160] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include, based on an electrical connection of one or at least two wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0161] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0162] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0163] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0164] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and no limitation is imposed herein.
[0165] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A charging and discharging control method for an energy storage system, characterized in that, include: Collect operational status data of the target power system, wherein the operational status data includes load power data, distributed generation output data, time-of-use electricity price data, energy storage status data, and demand record data; Based on the operational status data, load forecasting is performed to obtain the predicted load sequence for future periods; Demand risk is identified based on the predicted load sequence and the demand record data to obtain a demand risk sequence for future periods; A dynamic demand control target is generated based on the demand record data, the predicted load sequence, and the demand risk sequence. An energy storage charging and discharging optimization model is constructed based on the predicted load sequence, the dynamic demand control target, the time-of-use electricity price data, and the energy storage status data. The energy storage charging and discharging optimization model is solved to obtain the optimal charging and discharging power sequence for future time periods. Based on the optimal charging and discharging power sequence, the charging and discharging power command for the first control moment is extracted and sent to the energy storage execution device.
2. The method according to claim 1, characterized in that, The process of load forecasting based on the operational status data to obtain a predicted load sequence for future periods includes: Construct a predictive input feature vector based on net load power data from at least two historical time points prior to the current time. The predicted input feature vector is input into the load prediction model to obtain net load prediction values for at least two consecutive future time periods; The predicted load sequence is generated by arranging the net load forecast values for each time period in chronological order.
3. The method according to claim 1, characterized in that, The step of identifying demand risk based on the predicted load sequence and the demand record data to obtain a demand risk sequence for future periods includes: Based on the maximum demand data and user contract demand data recorded in the current settlement cycle, determine the demand control baseline value; Based on the difference between the net load forecast value for each time period in the predicted load sequence and the demand control baseline value, the demand exceedance limit for each time period is determined. The demand risk sequence is generated based on the demand exceeding the limit for each time period, wherein the demand risk is positively correlated with the demand exceeding the limit.
4. The method according to claim 3, characterized in that, Based on the demand record data, the predicted load sequence, and the demand risk sequence, a dynamic demand control target is generated, including: Determine the basic demand limit based on the maximum demand data and user contract demand data recorded in the current settlement cycle; Based on the current position in the settlement cycle, the peak risk coefficient for the remaining cycle is determined, and the standard deviation of the prediction error is determined based on the predicted load sequence. The dynamic demand control target is determined by a weighted sum of the basic demand limit, the peak risk coefficient, and the standard deviation of the prediction error.
5. The method according to claim 1, characterized in that, The construction of an energy storage charging and discharging optimization model based on the predicted load sequence, the dynamic demand control target, the time-of-use electricity price data, and the energy storage status data includes: Based on the predicted load sequence and the dynamic demand control target, the demand risk cost item for each time period is determined; Based on the predicted load sequence and the time-of-use electricity price data, determine the electricity cost item for each time period; Based on the state of charge data in the energy storage state data and the preset preferred operating state of charge value, the lifetime depreciation cost item for each time period is determined; An optimization objective function is constructed based on the weighted summation of the demand risk cost item, the electricity cost item, and the lifetime depreciation cost item for each time period; Based on the maximum charge / discharge power data and state of charge data in the energy storage state data, a set of energy storage operation constraints is constructed. Based on the optimization objective function and the set of energy storage operation constraints, the energy storage charging and discharging optimization model is constructed.
6. The method according to claim 5, characterized in that, The energy storage operation constraint set is constructed based on the maximum charge / discharge power data and state of charge data in the energy storage state data, including: Based on the maximum charging power data and maximum discharging power data in the energy storage state data, charge and discharge power boundary constraints are constructed. Based on the state of charge data in the energy storage state data, upper and lower limits of state of charge constraints are constructed. Based on the difference in charging and discharging power between adjacent time periods, a power ramp-up rate constraint is constructed. Based on the prediction confidence parameters of the predicted load sequence, constraint relaxation variables are constructed, and the charging and discharging power boundary constraints are modified based on the constraint relaxation variables. The charging and discharging power boundary constraints, the upper and lower limits of the state of charge constraints, and the power ramp-up rate constraints are integrated into the energy storage operation constraint set.
7. The method according to claim 1, characterized in that, The step of extracting the charge / discharge power command for the first control moment based on the optimal charge / discharge power sequence and issuing it to the energy storage execution device includes: Extract the charge / discharge power value corresponding to the current control moment from the optimal charge / discharge power sequence, and use it as the charge / discharge power command for the current period; The charging and discharging power command is sent to the energy storage converter or energy management system for execution, and the actual charging and discharging power, actual demand value and state of charge for the current cycle are recorded.
8. A charging and discharging control device for an energy storage system, characterized in that, include: The data acquisition module is used to collect the operating status data of the target power system, wherein the operating status data includes load power data, distributed power output data, time-of-use electricity price data, energy storage status data, and demand record data. The load sequence prediction module is used to perform load prediction based on the operating status data to obtain the predicted load sequence for future periods. The demand risk sequence determination module is used to identify demand risk based on the predicted load sequence and the demand record data, and obtain the demand risk sequence for future periods. The dynamic demand control target determination module is used to generate dynamic demand control targets based on the demand record data, the predicted load sequence, and the demand risk sequence. The optimization model building module is used to build an energy storage charging and discharging optimization model based on the predicted load sequence, the dynamic demand control target, the time-of-use electricity price data, and the energy storage status data. The energy storage device control module is used to solve the energy storage charging and discharging optimization model to obtain the optimal charging and discharging power sequence for future time periods, extract the charging and discharging power command for the first control moment based on the optimal charging and discharging power sequence, and send it to the energy storage execution device.
9. An electronic device, the electronic device comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the charging and discharging control method of the energy storage system according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the charging and discharging control method of the energy storage system according to any one of claims 1-7.