Energy storage station charging and discharging strategy optimization method and system

By constructing a profit-maximizing optimization model and a rolling calculation mechanism, the problem of balancing revenue and equipment protection in the charging and discharging strategy of energy storage stations is solved, and a forward-looking response and strategy optimization for dynamic changes in electricity prices are achieved.

CN123180448APending Publication Date: 2026-11-27JIANGSU ELECTRIC POWER INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611437258.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-16
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing energy storage site charging and discharging strategies fail to effectively balance maximizing revenue and protecting equipment, and are difficult to adapt to dynamic changes in electricity prices, resulting in strategy response delays and misjudgments.

Method used

An optimization model with profit maximization as the objective function is constructed. Combining multiple physical and economic constraints, the optimal charging and discharging scheme is automatically searched and a charging and discharging strategy is generated through rolling calculations and daily rolling progress.

Benefits of technology

Significantly improves peak-valley arbitrage returns for energy storage sites, enhances the adaptability and robustness of the strategy under fluctuating electricity prices, and avoids human lag and misjudgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123180448A_ABST
    Figure CN123180448A_ABST
Patent Text Reader

Abstract

The application discloses an energy storage station charging and discharging strategy optimization method and system, and the method comprises the following steps: acquiring electricity price time series data, energy storage station parameter data and strategy constraint condition configuration data, preprocessing the acquired data to obtain a processed data set; based on the processed data set, a charging and discharging management model is constructed with the maximum benefit as a target function and preset charging and discharging strategy constraint conditions as a constraint set; based on the charging and discharging management model, rolling calculation processing is performed; and according to the charging and discharging plan details of each calculation day, a charging and discharging strategy output result is generated. The application can automatically search for an optimal charging and discharging scheme by constructing an optimization model with the maximum benefit as a target function and fusing multiple physical and economic constraints, replace traditional artificial experience decision, effectively improve peak-valley arbitrage benefit, and avoid artificial lag and misjudgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power system energy storage, specifically a method and system for optimizing the charging and discharging strategy of energy storage stations. Background Technology

[0002] With the rapid growth of new energy power generation capacity, energy storage systems are becoming increasingly important as a key component supporting the stable operation of new power systems. Energy storage stations generate revenue through peak-valley arbitrage by charging during periods of low electricity prices and discharging during periods of high electricity prices. The quality of the charging and discharging strategy directly determines the economic benefits and equipment lifespan of the energy storage station.

[0003] Existing strategies do not adequately consider the constraints of the charging and discharging process. The charging and discharging of energy storage systems are subject to multiple physical and economic constraints, including constraints on battery state of charge, depth of charge / discharge, duration of charge / discharge, number of daily charge / discharge cycles, and total daily charge / discharge volume. Existing methods either ignore some constraints, rendering the strategy infeasible, or simply hard-code the constraints, lacking flexibility and making it difficult to strike a balance between maximizing revenue and protecting equipment. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for optimizing the charging and discharging strategy of energy storage stations. By constructing an optimization model with the objective function of maximizing profits and integrating multiple physical and economic constraints, it replaces traditional manual experience-based decision-making, can automatically search for the optimal charging and discharging scheme, effectively improve peak-valley arbitrage profits, and avoid human lag and misjudgment.

[0005] The objective of this invention is achieved through the following technical solution: A method for optimizing the charging and discharging strategy of an energy storage station, characterized by the following steps: S01. Obtain electricity price time-series data, energy storage station parameter data, and strategy constraint configuration data. Preprocess the acquired data to obtain the processed dataset. S02. Based on the processed dataset, a charging and discharging management model is constructed with maximizing profits as the objective function and preset charging and discharging strategy constraints as the constraint set. S03. Based on the charging and discharging management model, perform rolling calculation processing. On day n, calculate the charging and discharging plans for day n+1 and day n+2 based on the electricity price time series data of day n+1 and day n+2. Take the charging and discharging plan of day n+1 as the actual execution plan, and use the remaining electricity after execution on day n+1 as the initial electricity for calculation on day n+2 to participate in the constraint calculation. In this way, the process is rolled forward day by day to obtain the charging and discharging plan details for each calculation day. S04. Based on the charging and discharging plan details for each calculation day, generate the charging and discharging strategy output results.

[0006] Furthermore, the process of obtaining the processed dataset in step S01 includes the following steps: S11. Perform data format verification, missing value detection and abnormal electricity price identification on the electricity price time series data. Align the verified electricity price time series data according to time granularity to generate standardized electricity price time series data. S12. Perform mandatory field verification and parameter range verification on the energy storage station parameter data, which includes rated power, rated capacity, system efficiency, and depth of discharge. S13. Perform an integrity check on the strategy constraint configuration data, which includes the calculation cycle length, charge / discharge cycle parameters, and constraint switch configuration. S14. The verified electricity price time-series data, energy storage station parameter data, and strategy constraint configuration data are associated and merged to form a processed dataset.

[0007] Furthermore, the construction of the charge / discharge management model in step S02 includes the following steps: S21. Based on the electricity price time series data and energy storage station parameter data in the processed dataset, construct a revenue function with the objective of maximizing the total revenue within the calculation period. The calculation factors of the revenue function include the charging electricity cost expenditure and the discharging electricity cost revenue for each time period. S22. Obtain preset charging and discharging strategy constraints, which include battery state of charge constraints, charging and discharging duration constraints, daily charging and discharging frequency constraints, daily total charging and discharging constraints, and discharge price constraints. S23. Using the profit function as the optimization objective and the charging and discharging strategy constraints as the constraint set, construct a charging and discharging management model.

[0008] The constraints of the charging and discharging strategy include: S221. Battery state of charge constraints, including initial charge constraints, final charge constraints, and intermediate end-of-day charge constraints. The initial charge and final charge are zero within a calculation period, while the charge at the end of any intermediate day is allowed to be non-zero. S222, Charge / discharge duration constraint: The duration of each charge or discharge is at least two or four consecutive preset time units, and the duration of each charge / discharge must be completed within the same day. S223. Daily charge / discharge cycle constraint: The number of times a person enters the charging state from other states is less than or equal to three times per day, and the number of times a person enters the discharging state from other states is less than or equal to three times per day. The daily total charge and discharge limit is that the ratio of the sum of the daily charge and discharge capacity to the rated capacity is less than or equal to two. S224. Discharge price constraint: The discharge price must be greater than the maximum charging price corresponding to the current charge in the battery.

[0009] Furthermore, the rolling calculation process based on the charge / discharge management model in step S03 includes the following steps: S31. On day n, obtain the electricity price time series data for day n+1 and day n+2, and obtain the initial electricity on day n+1. The initial electricity on day n+1 is the remaining electricity after the charging and discharging plan is executed on day n. S32. Substitute the initial electricity of the (n+1)th day into the charging and discharging management model, take the profit function as the objective and the charging and discharging strategy constraints as the constraint set, and calculate the charging and discharging plans for the (n+1)th day and the (n+2)th day. S33. Extract the charging and discharging plan for day n+1 from the calculation results as the actual execution plan for day n+1; S34. After executing the charging and discharging plan for day n+1, record the remaining power at the end of day n+1, and use the remaining power as the initial power calculated for day n+2, for the calculation of the discharge price constraint for day n+2. S35. Let n = n + 1, repeat the above steps, and proceed daily until the charging and discharging plan calculation for all calculation days is completed.

[0010] The calculation of the charge / discharge plan for day n+1 and day n+2 specifically includes: When there are multiple low-price periods in a day, the charging priority is sorted according to the time sequence of each low-price period. If there are consecutive low-price periods, the consecutive low-price periods are merged and then processed for continuous charging. When there are multiple high-price periods in a day, the discharge priority is sorted according to the time sequence of each high-price period. If there are consecutive high-price periods, the consecutive high-price periods are merged and then continuously discharged. Based on the charging priority ranking results and the discharging priority ranking results, and combined with the charging and discharging strategy constraints, charging and discharging plans for day n+1 and day n+2 are generated.

[0011] Furthermore, the output results of the charging and discharging strategy also include statistical index data, which are based on the charging and discharging plan details of each calculation day, and statistically analyze the average charging and discharging price, average daily charging and discharging hours, number of charging and discharging cycles, and total cycle revenue. Export the charge / discharge plan details and the statistical data as a file in a specified format.

[0012] The output of the charging and discharging strategy includes charging and discharging identifier, start time, end time, charging and discharging capacity, and charging and discharging cost information.

[0013] Furthermore, the method also includes historical data backtesting processing, including: Obtain historical electricity price time-series data, input the historical electricity price time-series data into the charging and discharging management model, and perform backtesting calculations according to the rolling calculation processing method to obtain historical backtesting charging and discharging plans; Based on the historical backtesting charge and discharge plans, backtesting key indicators are generated, including average charge and discharge price, average daily charge and discharge hours, number of charge and discharge cycles, and cumulative revenue. The backtesting key indicators are compared and analyzed with the actual test results to generate a strategy verification report.

[0014] A system for implementing an optimization method for charging and discharging strategies of energy storage stations, comprising: The data processing module is used to acquire electricity price time-series data, energy storage station parameter data, and strategy constraint configuration data. It performs verification and standardization preprocessing on the acquired data to obtain a standardized input dataset. The model management module is used to construct a charging and discharging management model based on the standardized input dataset, with the objective function of maximizing profits and the constraint set of preset charging and discharging strategy conditions. The rolling calculation module is used to perform rolling calculation processing based on the charging and discharging management model. On the nth day, it calculates the charging and discharging plans for the (n+1)th and (n+2)th days based on the electricity price time series data of the (n+1)th and (n+2)th days. The charging and discharging plan of the (n+1)th day is taken as the actual execution plan, and the remaining electricity after the execution of the (n+1)th day is used as the initial electricity for the (n+2)th day to participate in the constraint calculation. The process is rolled forward day by day to obtain the charging and discharging plan details for each calculation day. The data output module is used to generate charge and discharge strategy output results based on the charge and discharge plan details for each calculation day.

[0015] The beneficial effects of this invention are as follows: 1. This invention constructs a charging and discharging strategy optimization model with profit maximization as the objective function and introduces multiple constraints as a constraint set, thereby achieving automated and intelligent optimization of charging and discharging strategies. This overcomes the shortcomings of traditional manual experience-based decision-making, such as slow response and difficulty in adapting to dynamic changes in electricity prices. By driving strategy optimization through the objective function, the optimal charging and discharging scheme can be automatically searched under the premise of satisfying various physical and economic constraints, significantly improving the peak-valley arbitrage revenue level of energy storage stations.

[0016] 2. This invention employs a rolling calculation mechanism, calculating the charging and discharging plans for days n+1 and n+2 on day n and executing the results from day n+1. Simultaneously, the remaining electricity after execution is used as the initial electricity for the next day's calculation, participating in the constraint calculation. This ensures the strategy's forward-looking response to electricity price changes and achieves dynamic correction through daily rolling advancement. It effectively solves the technical problems of traditional single-day independent optimization strategies failing to handle the continued impact of cross-day electricity consumption and suboptimal global returns, thus improving the strategy's adaptability and robustness in scenarios with fluctuating electricity prices. Attached Figure Description

[0017] Figure 1 This is a flowchart of the energy storage station charging and discharging strategy optimization method in this invention.

[0018] Figure 2 This is a flowchart of the process of preprocessing the acquired data to obtain the processed dataset.

[0019] Figure 3 This is a flowchart for constructing a charge and discharge management model.

[0020] Figure 4 This is a flowchart of rolling calculation processing based on the charge and discharge management model.

[0021] Figure 5 This is a flowchart for backtesting historical data. Detailed Implementation

[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the 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.

[0023] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Example 1

[0024] A method for optimizing the charging and discharging strategy of an energy storage station includes the following steps: S01. Obtain electricity price time-series data, energy storage site parameter data, and strategy constraint configuration data. Preprocess the acquired data to obtain the processed dataset, such as... Figure 2 As shown, the specific steps are as follows: S11. Perform data format verification, missing value detection and abnormal electricity price identification on the electricity price time series data. Align the verified electricity price time series data according to the time granularity to generate standardized electricity price time series data. S12. Perform mandatory field verification and parameter range verification on the parameter data of the energy storage station. The parameter data of the energy storage station includes rated power, rated capacity, system efficiency and depth of discharge. S13. Perform integrity verification on the strategy constraint configuration data, which includes the calculation cycle length, charge / discharge cycle parameters, and constraint switch configuration. S14. The verified electricity price time series data, energy storage station parameter data, and policy constraint configuration data are associated and merged to form a processed dataset.

[0025] Specifically, the system performs data format validation on the acquired electricity price time-series data, checking whether the timestamp format conforms to the preset standard (e.g., "YYYY-MM-DD HH:MM:SS"), whether the electricity price values ​​are valid floating-point or integer types, and whether the data records are arranged in chronological order. Based on this, it performs missing value detection to identify whether there are data gaps or null records in the time series. Missing values ​​can be handled using linear interpolation, forward imputation, or deletion of abnormal records. Simultaneously, the system also performs abnormal electricity price identification processing, marking and removing or correcting abnormal electricity price data using a preset reasonable price range threshold or an outlier detection algorithm based on statistical methods. For the validated electricity price time-series data, the system performs time axis alignment processing according to a preset time granularity (e.g., 15 minutes) to ensure that all electricity price data are neatly arranged on a unified time grid, without time offset or granularity inconsistencies, ultimately generating standardized electricity price time-series data.

[0026] Secondly, regarding the preprocessing of energy storage site parameter data, the system performs mandatory field validation on the input energy storage site parameters, checking whether key parameters such as rated power, rated capacity, system efficiency, and depth of discharge are all filled in and not empty. Simultaneously, it performs parameter range validation to determine whether the values ​​of each parameter are within a reasonable physical or engineering range; for example, rated power and rated capacity should be greater than zero, system efficiency should be between 0 and 1, and depth of discharge should be between 0 and 100%. For parameters that fail validation, the system generates corresponding error messages, requiring the user to correct and resubmit.

[0027] Secondly, regarding the preprocessing of the strategy constraint configuration data, the system performs integrity checks on the calculation cycle length, charge / discharge cycle parameters (such as 20 days or 2 days), and various constraint switch configurations (such as daily charge / discharge frequency limit switch, capacity ratio limit switch, etc.) to confirm that all configuration items have been correctly set and their values ​​are valid. For missing or invalid configuration items, the system uses default values ​​to complete them or prompts the user to supplement the configuration.

[0028] The calculation cycle length refers to the time range covered by the charge / discharge management model in a single optimization calculation, that is, the length of the time window during which the model makes unified optimization decisions. For example, if the calculation cycle length is set to 2 days, the model will simultaneously optimize the charge / discharge plans for each time period within the next 2 days in a single calculation. Its purpose is to provide the model with a global optimization time perspective, enabling the model to coordinate charge / discharge behavior over a longer time frame and avoid short-sighted decisions.

[0029] Charge-discharge cycle parameters refer to the specific operating parameters involved in a complete "charge-discharge" cycle of an energy storage device. These include the minimum duration of a single continuous charge or discharge (e.g., 30 minutes, 60 minutes), the maximum allowed number of charge-discharge cycles per day (e.g., no more than 3 times), and the daily total charge-discharge limit (e.g., no more than twice the rated capacity). Their function is to constrain the specific behavioral characteristics of each charge-discharge operation, ensuring that the charge-discharge plan meets the actual operating requirements of the energy storage device.

[0030] Finally, the system performs a correlation and merging process on the validated electricity price time-series data, energy storage site parameter data, and strategy constraint configuration data. Specifically, using the time axis as a unified index, the standardized electricity price time-series data is bound to the site parameters (such as rated capacity used to calculate the absolute value of charging and discharging capacity), while the strategy constraint configuration is used as the parameter input for the optimization model. These three elements together constitute a complete data structure or dataset for subsequent use by the charging and discharging strategy optimization model. This results in a processed dataset that can be directly used by the model.

[0031] S02. Based on the processed dataset, with profit maximization as the objective function and preset charging and discharging strategy constraints as the constraint set, a charging and discharging management model is constructed, such as... Figure 3 As shown, the specific steps are as follows: S21. Based on the electricity price time series data and energy storage station parameter data in the processed dataset, construct a revenue function with the objective of maximizing the total revenue within the calculation period. The calculation factors of the revenue function include the charging electricity cost expenditure and the discharging electricity cost revenue for each time period. S22. Obtain the preset charging and discharging strategy constraints, which include battery state of charge constraints, charging and discharging duration constraints, daily charging and discharging frequency constraints, daily total charging and discharging constraints, and discharge price constraints. S23. Using the profit function as the optimization objective and the charging and discharging strategy constraints as the constraint set, construct a charging and discharging management model.

[0032] The charging and discharging strategy constraints include: S221. Battery state of charge constraints, including initial charge constraints, final charge constraints, and intermediate end-of-day charge constraints. The initial charge and final charge are zero within a calculation period, while the charge at the end of any intermediate day is allowed to be non-zero. S222, Charge / discharge duration constraint: The duration of each charge or discharge is at least two or four consecutive preset time units, and the duration of each charge / discharge must be completed within the same day. S223. Daily charge / discharge cycle constraint: The number of times a person enters the charging state from other states is less than or equal to three times per day, and the number of times a person enters the discharging state from other states is less than or equal to three times per day. The daily total charge and discharge limit is that the ratio of the sum of the daily charge and discharge capacity to the rated capacity is less than or equal to two. S224. Discharge price constraint: The discharge price must be greater than the maximum charging price corresponding to the current charge in the battery.

[0033] Specifically, the electricity price time-series data is sliced ​​according to a preset time granularity (e.g., one data point every 15 minutes). The electricity price value, charge / discharge state (charging, discharging, or idle), and current battery state of charge at each time point constitute the basic unit of the decision variables. The energy storage site parameter data provides the basic physical constraints boundary of the model, including rated power determining the maximum charge / discharge rate at each time point, rated capacity determining the upper limit of the battery's total energy storage, system efficiency used to correct for energy loss during charge / discharge, and depth of discharge limiting the range of usable battery state of charge.

[0034] For each time point, if it is determined to be in a discharging state, the electricity revenue is calculated by multiplying the electricity price at that time by the amount of electricity discharged; if it is determined to be in a charging state, the electricity expenditure is calculated by multiplying the electricity price at that time by the amount of electricity charged. The net profit for the measurement period is obtained by subtracting the total charging expenditure from the total discharging revenue at all time points. The model aims to maximize this net profit by optimizing the charging / discharging state and power at each time point while satisfying all constraints.

[0035] Subsequently, the state of charge (SOC) at the next time point is equal to the current SOC plus the amount of charge (multiplied by the charging efficiency) minus the amount of discharge (divided by the discharge efficiency). Simultaneously, the SOC is forced to be zero at the beginning and end of the entire calculation cycle, while the SOC at the end of any intermediate date is allowed for free optimization, serving only as the initial condition for rolling iteration. When determining a charging state at a given time point, the model must ensure that the continuous duration of that charging state reaches at least two or four preset time granularities (corresponding to 30 minutes or 60 minutes), and this continuous charging process must not cross midnight. The same applies to the discharging state. The daily charge / discharge frequency constraint is achieved by counting the number of state transitions each day; that is, the number of transitions from a non-charging state to a charging state does not exceed three, and the number of transitions from a non-discharging state to a discharging state does not exceed three. The model needs to record state transition points and limit their number during optimization. The daily total charge / discharge constraint limits the sum of the absolute values ​​of daily charge and discharge to less than two (the sum of the absolute values ​​of daily charge and discharge divided by the rated capacity). This constraint ensures that the total throughput of the battery in a day does not exceed the device's safe operating threshold. The discharge price constraint is the most complex constraint: when the model decides to discharge at a certain point in time, the system needs to backtrack the charging records corresponding to the current battery charge and take the maximum charging price as a threshold. The discharge decision is only allowed if the price at the discharge point is greater than the threshold value; otherwise, the discharge cannot be performed at that point in time.

[0036] Solving the charge / discharge management model falls under the category of mixed-integer linear programming (MILP) problems. The model's decision variables include the charge / discharge state at each time period (0-1 integer variables representing charging, discharging, or idle) and the charge / discharge amount at each time period (continuous variables). The objective function (maximizing total revenue) is a linear function, and all constraints (battery state of charge constraints, charge / discharge duration constraints, daily charge / discharge frequency constraints, etc.) can be transformed into linear constraints.

[0037] The basic solution process is as follows: Model linearization: For some nonlinear constraints (such as mutual exclusion constraints of charging and discharging states, backtracking judgments in discharge price constraints, etc.), the Big-M Method is used to transform them into linear constraints.

[0038] Call the solver: Input the linearized MILP model into a mature commercial solver (such as Gurobi, CPLEX, etc.) for solving.

[0039] Solution output: Under the premise of satisfying all constraints, the solver searches for the combination of charging and discharging states and charging and discharging amounts in each time period that maximizes the objective function (total profit) and outputs the optimal charging and discharging plan.

[0040] Finally, taking the above-mentioned profit function as the optimization objective, and combining the mathematical expressions of all constraints, a complete charging and discharging management model is formed.

[0041] S03. Based on the charging and discharging management model, perform rolling calculation processing. On day n, calculate the charging and discharging plans for day n+1 and day n+2 based on the electricity price time series data of day n+1 and day n+2. Take the charging and discharging plan of day n+1 as the actual execution plan, and use the remaining electricity after execution on day n+1 as the initial electricity for calculation on day n+2 to participate in the constraint calculation. In this way, the process is rolled forward day by day to obtain the charging and discharging plan details for each calculation day. The above embodiments are based on a charge / discharge management model and perform rolling calculation processing, such as... Figure 4 As shown, it includes the following steps: S31. On day n, obtain the electricity price time series data for day n+1 and day n+2, and obtain the initial electricity on day n+1. The initial electricity on day n+1 is the remaining electricity after the charging and discharging plan is executed on day n. S32. Substitute the initial electricity on day n+1 into the charging and discharging management model, take the profit function as the objective and the charging and discharging strategy constraints as the constraint set, and calculate the charging and discharging plans for day n+1 and day n+2. S33. Extract the charging and discharging plan for day n+1 from the calculation results as the actual execution plan for day n+1; S34. After executing the charging and discharging plan for day n+1, record the remaining electricity at the end of day n+1. Use the remaining electricity as the initial electricity for day n+2 and use it for calculating the discharge electricity price constraint on day n+2. S35. Let n = n + 1, repeat the above steps, and proceed daily until the charging and discharging plan calculation for all calculation days is completed.

[0042] Furthermore, the charging and discharging plans for day n+1 and day n+2 are calculated, specifically including: When there are multiple low-price periods in a day, the charging priority is sorted according to the time sequence of each low-price period. If there are consecutive low-price periods, the consecutive low-price periods are merged and then processed for continuous charging. When there are multiple high-price periods in a day, the discharge priority is sorted according to the time sequence of each high-price period. If there are consecutive high-price periods, the consecutive high-price periods are merged and then continuously discharged. Based on the charging priority ranking results and the discharging priority ranking results, combined with the charging and discharging strategy constraints, the charging and discharging plans for day n+1 and day n+2 are generated.

[0043] S04. Based on the charging and discharging plan details for each calculation day, generate the charging and discharging strategy output results, which include charging and discharging identifier, start time, end time, charging and discharging capacity, charging and discharging electricity cost information, and statistical indicator data.

[0044] The statistical indicators are based on the charging and discharging plan details for each calculation day, and include the average charging and discharging price, average daily charging and discharging hours, number of charging and discharging cycles, and total revenue per cycle. The charging and discharging plan details and statistical indicators are then exported as a file in a specified format. Example 2

[0045] Based on the historical data backtesting process described in Example 1 above, this example is as follows: Figure 5 As shown, it includes: Acquire historical electricity price time-series data, input the historical electricity price time-series data into the charging and discharging management model, perform backtesting calculations in a rolling calculation manner, and obtain historical backtesting charging and discharging plans; Based on historical backtesting charging and discharging plans, key backtesting metrics are generated, including average charging and discharging price, average daily charging and discharging hours, number of charging and discharging cycles, and cumulative revenue. The backtesting key metrics are compared and analyzed with the actual test results to generate a strategy verification report.

[0046] Specifically, in the data preparation phase, the system first retrieves electricity price time-series data within a specified historical time range from the database. This data must be consistent with the data format used in real-time calculations, including electricity price information at preset time intervals (e.g., 15 minutes). The system performs the same verification and standardization processing on the acquired historical electricity price time-series data as in real-time calculations, including data format verification, missing value detection and imputation, and abnormal electricity price identification and correction, ensuring the integrity and accuracy of the historical data. Simultaneously, the system acquires the site parameter data (rated power, rated capacity, system efficiency, depth of discharge, etc.) and policy constraint configuration data corresponding to the tested energy storage site, constructing a standardized input dataset completely consistent with the real-time calculations.

[0047] "System efficiency" is a comprehensive efficiency parameter at the energy storage site level, used for macroscopic simplification calculations. It is usually assigned a fixed value (e.g., 0.85~0.95) to comprehensively reflect the energy loss of the entire energy storage system during charging and discharging. In practical engineering applications, to simplify the model and reduce computational complexity, system efficiency is often used as a uniform conversion factor.

[0048] "Charging efficiency" and "discharging efficiency" are detailed efficiency parameters at the battery level, reflecting the energy conversion losses during charging and discharging, respectively. Due to the asymmetry in the charging and discharging processes of lithium-ion batteries, charging efficiency and discharging efficiency may differ. When calculating the battery's state of charge (SOC) for a later period, both charging efficiency and discharging efficiency should be used. During charging: SOC t+1 =SOC t +(Charging power × η) ch ) / Rated capacity; During discharge: SOC t+1 =SOC t -(Discharge capacity / η) dch ) / Rated capacity.

[0049] Where η ch For charging efficiency, η dch This refers to the discharge efficiency.

[0050] The relationship between the two: System efficiency can be considered a combination of charging efficiency and discharging efficiency. If the charging efficiency and discharging efficiency are approximately equal, then the system efficiency ≈ η. ch =η dch If the two are not equal, the system efficiency is an equivalent combined value. In actual SOC calculation, charging efficiency and discharging efficiency should be used separately.

[0051] "Zero charge" means that the battery's state of charge (SOC) is 0%, meaning that the battery's actual remaining capacity is zero. In the actual operation of energy storage stations, SOC reflects the percentage of the battery's currently available capacity relative to its rated capacity.

[0052] In the charge / discharge management model, this constraint means that the battery's SOC at the beginning of the calculation cycle is a preset initial value (usually set to 0% or other specified value), and the battery's SOC is forced to zero (or return to a preset termination value) at the end of the calculation cycle. The SOC at the end of any intermediate date is allowed to be non-zero. This design is precisely to support the continuous transfer of daily charge / discharge status in daily rolling calculations—the remaining charge / discharge capacity after the previous day's charge / discharge plan (i.e., the charge / discharge capacity corresponding to the SOC at the end of the current day) will be used as the initial charge / discharge capacity for the next round of rolling calculations.

[0053] It should be noted that in actual engineering, for safety reasons, the SOC of energy storage devices usually will not actually drop to 0% (the Depth of Discharge (DOD) limit will set a lower limit, such as 10% or 20%). The "zero charge" in the model refers to the boundary condition at the optimization calculation level, and will be protected by the depth of discharge constraint in actual execution.

[0054] During the backtesting calculation execution phase, the system inputs the standardized input dataset mentioned above into the charge / discharge management model and executes the backtesting calculation according to the same processing logic as the real-time rolling calculation. Specifically, starting from the first day of historical data, the system simulates acquiring historical electricity price data for days n+1 and n+2 on day n. With the goal of maximizing revenue, and under the premise of satisfying various charging / discharge strategy constraints, it calculates the charging / discharge plans for days n+1 and n+2. The charging / discharge plan for day n+1 is taken as the simulated execution plan for that day, and the remaining electricity after execution is recorded as the initial electricity for the next day's calculation. This process is repeated day by day until the charging / discharge plan calculation for the entire historical time range is completed. Throughout the backtesting calculation process, the system completely simulates the real decision-making environment and information availability. That is, each day in the backtesting can only use the electricity price data available on that day and before for decision-making, and does not use future electricity price information, thereby ensuring that the backtesting results can truly reflect the performance of the strategy in actual historical operation.

[0055] During the backtesting results statistics phase, the system automatically generates several key evaluation indicators based on the daily charge / discharge plan details generated from the backtesting calculations. The average charge / discharge price is calculated as follows: the weighted average electricity price for all discharge periods is used as the average discharge price, and the weighted average electricity price for all charging periods is used as the average charging price. A comprehensive charge / discharge price difference can also be calculated. The average daily charge / discharge hours are calculated by calculating the arithmetic mean of the total charging and discharging times for each day within the measurement period. The number of charge / discharge cycles is calculated by counting the cumulative number of times a user enters the charging state from other states and the cumulative number of times a user enters the discharging state from other states within the measurement period, and the average daily number of charge / discharge cycles can be further calculated. The cumulative revenue is calculated by subtracting the sum of electricity expenses for all charging periods from the sum of electricity revenue for all discharge periods, where the electricity cost for each period is the product of the electricity price for that period and the amount of electricity charged / discharged. The calculation results of the above indicators are stored in a structured data table for easy viewing and export later.

[0056] During the comparative analysis and report generation phase, the system compares the key indicators calculated from the backtest with the measured results from the same period. The measured results are derived from the actual operational data of the energy storage sites during that historical period, including the actual executed charge / discharge plans, actual charge / discharge volumes, and actual revenue. The system conducts comparative analysis from multiple dimensions, including deviation rate, correlation, and stability. Specifically, this includes calculating the deviation rate between backtest revenue and actual revenue to verify the model's accuracy; comparing the number of backtest charge / discharge cycles with the actual number of cycles to assess the strategy's executability; and analyzing the matching degree between the distribution of backtest charge / discharge periods and the actual execution periods to determine the alignment between the strategy and actual electricity price trends. Furthermore, the system also displays visual information from the backtest results, such as detailed charge / discharge plans, and the overlay trend chart of the electricity price curve and charge / discharge curve, alongside the measured data, providing a clear visual representation of the strategy's advantages and disadvantages in historical scenarios. Based on the above comparative analysis, the system automatically generates a structured strategy verification report. The report includes a backtest overview (time range, data source, site information), a summary table of key indicators, comparative analysis charts of backtest and actual results, consistency assessment conclusions, and strategy optimization suggestions.

[0057] The following two application examples illustrate this: This application example is used to verify the feasibility of the energy storage station charging and discharging strategy optimization method of the present invention in generating charging and discharging plans under the condition of continuous electricity price time series data, and to analyze the output results of the charging and discharging strategy by statistically analyzing indicators such as charging price, discharging price, charging and discharging price difference and daily charging and discharging duration.

[0058] This application example uses electricity price time-series data from January 1, 2026 to January 31, 2026 to calculate the charging and discharging strategy. The electricity price time-series data is divided into 15-minute time granularities. Using the same data preprocessing method, charging and discharging management model, charging and discharging strategy constraints, and daily rolling calculation method as in the previous examples, charging and discharging plans are calculated for the data corresponding to Example 1 and Example 2, respectively. The energy storage site parameter data and strategy constraint configuration data are set according to the previous examples.

[0059] First, the electricity price time series data, energy storage site parameter data, and strategy constraint configuration data are preprocessed to obtain the processed dataset. Then, the processed dataset is input into the charge and discharge management model, with the optimization objective of maximizing the total revenue within the calculation period. The charging and discharge status and charge and discharge amount are limited by battery state of charge constraints, charge and discharge duration constraints, daily charge and discharge frequency constraints, daily charge and discharge total constraints, and discharge price constraints.

[0060] Based on this, the charging and discharging plan for each calculation day is generated according to the daily rolling calculation method. On the nth day, the charging and discharging plans for the (n+1)th and (n+2)th days are calculated simultaneously, and the charging and discharging plan for the (n+1)th day is used as the actual execution plan. The remaining power after execution is transferred to the next round of rolling calculation until the charging and discharging plan calculation for the entire test time range is completed.

[0061] In Example 1, charging will be performed continuously from 13:30 to 14:00 on January 1, 2026. The price at the time of 13:30 to 13:45 is 117.4 yuan / MWh, and the price at the time of 13:45 to 14:00 is 154.2 yuan / MWh. Discharging will be performed continuously from 17:45 to 18:15. The price at the time of 17:45 to 18:00 is 312 yuan / MWh, and the price at the time of 18:00 to 18:15 is 315 yuan / MWh.

[0062] Based on the statistical results of the entire calculation period, the average charging price of Case 1 is 27.080095 yuan / MWh, the average discharging price is 393.287619 yuan / MWh, the charging and discharging price difference is 366.207524 yuan / MWh, and the average daily charging and discharging hours are 1.7384 hours.

[0063] In Example 2, charging will be performed continuously from 13:30 to 14:00 on January 1, 2026. The price at the time of 13:30 to 13:45 is 142.9 yuan / MWh, and the price at the time of 13:45 to 14:00 is 175.3 yuan / MWh. Discharging will be performed continuously from 17:45 to 18:15. The price at the time of 17:45 to 18:00 is 342 yuan / MWh, and the price at the time of 18:00 to 18:15 is 345 yuan / MWh.

[0064] Based on the statistical results of the entire calculation period, the average charging price of Example 2 is 23.232099 yuan / MWh, the average discharging price is 403.630761 yuan / MWh, the charging and discharging price difference is 380.398663 yuan / MWh, and the average daily charging and discharging hours are 1.6093 hours.

[0065] As can be seen from the above results, the method of the present invention can generate specific charging and discharging periods and corresponding charging and discharging plans based on continuous electricity price time series data, and can further generate statistical results such as average charging price, average discharging price, charging and discharging price difference, and average daily charging and discharging hours.

[0066] The main difference between the two application examples lies in the input electricity price time-series data:

[0067] The energy storage site parameters and strategy constraints remain consistent in both application examples, and are set according to the aforementioned embodiments. These two application examples aim to demonstrate that, under the same energy storage device parameters and strategy constraints, and facing different electricity price time-series data, the method of this invention can automatically generate reasonable charge-discharge plans and produce corresponding statistical results, thereby verifying the method's versatility and adaptability. The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for optimizing the charging and discharging strategy of an energy storage station, characterized in that, Includes the following steps: S01. Obtain electricity price time-series data, energy storage station parameter data, and strategy constraint configuration data. Preprocess the acquired data to obtain the processed dataset. S02. Based on the processed dataset, a charging and discharging management model is constructed with maximizing profits as the objective function and preset charging and discharging strategy constraints as the constraint set. S03. Based on the charging and discharging management model, perform rolling calculation processing. On day n, calculate the charging and discharging plans for day n+1 and day n+2 based on the electricity price time series data of day n+1 and day n+2. Take the charging and discharging plan of day n+1 as the actual execution plan, and use the remaining electricity after execution on day n+1 as the initial electricity calculated on day n+2 to participate in the constraint calculation. In this way, the process is rolled forward day by day to obtain the charging and discharging plan details for each calculation day. S04. Based on the charging and discharging plan details for each calculation day, generate the charging and discharging strategy output results.

2. The method for optimizing the charging and discharging strategy of an energy storage station according to claim 1, characterized in that, The processed dataset obtained in step S01 includes the following steps: S11. Perform data format verification, missing value detection and abnormal electricity price identification on the electricity price time series data. Align the verified electricity price time series data according to time granularity to generate standardized electricity price time series data. S12. Perform mandatory field verification and parameter range verification on the energy storage station parameter data, which includes rated power, rated capacity, system efficiency, and depth of discharge. S13. Perform an integrity check on the strategy constraint configuration data, which includes the calculation cycle length, charge / discharge cycle parameters, and constraint switch configuration. S14. The verified electricity price time-series data, energy storage station parameter data, and strategy constraint configuration data are associated and merged to form a processed dataset.

3. The method for optimizing the charging and discharging strategy of an energy storage station according to claim 1, characterized in that, The construction of the charge / discharge management model in step S02 includes the following steps: S21. Based on the electricity price time series data and energy storage station parameter data in the processed dataset, construct a revenue function with the objective of maximizing the total revenue within the calculation period. The calculation factors of the revenue function include the charging electricity cost expenditure and the discharging electricity cost revenue for each time period. S22. Obtain preset charging and discharging strategy constraints, which include battery state of charge constraints, charging and discharging duration constraints, daily charging and discharging frequency constraints, daily total charging and discharging constraints, and discharge price constraints. S23. Using the profit function as the optimization objective and the charging and discharging strategy constraints as the constraint set, construct a charging and discharging management model.

4. The method for optimizing the charging and discharging strategy of an energy storage station according to claim 3, characterized in that, The constraints of the charging and discharging strategy include: S221. Battery state of charge constraints, including initial charge constraints, final charge constraints, and intermediate end-of-day charge constraints. The initial charge and final charge are zero within a calculation period, while the charge at the end of any intermediate day is allowed to be non-zero. S222, Charge / discharge duration constraint: The duration of each charge or discharge is at least two or four consecutive preset time units, and the duration of each charge / discharge must be completed within the same day. S223. Daily charge / discharge cycle constraint: The number of times a person enters the charging state from other states is less than or equal to three times per day, and the number of times a person enters the discharging state from other states is less than or equal to three times per day. The daily total charge and discharge limit is that the ratio of the sum of the daily charge and discharge capacity to the rated capacity is less than or equal to two. S224. Discharge price constraint: The discharge price must be greater than the maximum charging price corresponding to the current charge in the battery.

5. The method for optimizing the charging and discharging strategy of an energy storage station according to claim 1, characterized in that, The step S03, which involves performing rolling calculations based on the charge / discharge management model, includes the following steps: S31. On day n, obtain the electricity price time series data for day n+1 and day n+2, and obtain the initial electricity on day n+1. The initial electricity on day n+1 is the remaining electricity after the charging and discharging plan is executed on day n. S32. Substitute the initial electricity of the (n+1)th day into the charging and discharging management model, take the profit function as the objective and the charging and discharging strategy constraints as the constraint set, and calculate the charging and discharging plans for the (n+1)th day and the (n+2)th day. S33. Extract the charging and discharging plan for day n+1 from the calculation results as the actual execution plan for day n+1; S34. After executing the charging and discharging plan for day n+1, record the remaining power at the end of day n+1, and use the remaining power as the initial power calculated for day n+2, for the calculation of the discharge price constraint for day n+2. S35. Let n = n + 1, repeat the above steps, and proceed daily until the charging and discharging plan calculation for all calculation days is completed.

6. The method for optimizing the charging and discharging strategy of an energy storage station according to claim 5, characterized in that, The calculation of the charge / discharge plan for day n+1 and day n+2 specifically includes: When there are multiple low-price periods in a day, the charging priority is sorted according to the time sequence of each low-price period. If there are consecutive low-price periods, the consecutive low-price periods are merged and then processed for continuous charging. When there are multiple high-price periods in a day, the discharge priority is sorted according to the time sequence of each high-price period. If there are consecutive high-price periods, the consecutive high-price periods are merged and then continuously discharged. Based on the charging priority ranking results and the discharging priority ranking results, and combined with the charging and discharging strategy constraints, charging and discharging plans for day n+1 and day n+2 are generated.

7. The method for optimizing the charging and discharging strategy of an energy storage station according to claim 1, characterized in that, In step S04, the output results of the charging and discharging strategy include statistical index data, which are based on the charging and discharging plan details of each calculation day, and statistically analyze the average charging and discharging price, average daily charging and discharging hours, number of charging and discharging cycles, and total cycle revenue. Export the charge / discharge plan details and the statistical data as a file in a specified format.

8. The method for optimizing the charging and discharging strategy of an energy storage station according to claim 7, characterized in that, The output of the charging and discharging strategy also includes charging and discharging identifier, start time, end time, charging and discharging capacity, and charging and discharging cost information.

9. The method for optimizing the charging and discharging strategy of an energy storage station according to claim 1, characterized in that, The method also includes historical data backtesting processing, including: Obtain historical electricity price time-series data, input the historical electricity price time-series data into the charging and discharging management model, and perform backtesting calculations according to the rolling calculation processing method to obtain historical backtesting charging and discharging plans; Based on the historical backtesting charge and discharge plans, backtesting key indicators are generated, including average charge and discharge price, average daily charge and discharge hours, number of charge and discharge cycles, and cumulative revenue. The backtesting key indicators are compared and analyzed with the actual test results to generate a strategy verification report.

10. A system for implementing the energy storage station charging and discharging strategy optimization method according to any one of claims 1-9, characterized in that, include: The data processing module is used to acquire electricity price time-series data, energy storage station parameter data, and strategy constraint configuration data. It performs verification and standardization preprocessing on the acquired data to obtain a standardized input dataset. The model management module is used to construct a charging and discharging management model based on the standardized input dataset, with the objective function of maximizing profits and the constraint set of preset charging and discharging strategy conditions. The rolling calculation module is used to perform rolling calculation processing based on the charging and discharging management model. On the nth day, it calculates the charging and discharging plans for the (n+1)th and (n+2)th days based on the electricity price time series data of the (n+1)th and (n+2)th days. The charging and discharging plan of the (n+1)th day is taken as the actual execution plan, and the remaining electricity after the execution of the (n+1)th day is used as the initial electricity for the (n+2)th day to participate in the constraint calculation. The process is rolled forward day by day to obtain the charging and discharging plan details for each calculation day. The data output module is used to generate charge and discharge strategy output results based on the charge and discharge plan details for each calculation day.