A shared energy storage double-time-scale scheduling algorithm based on lyapunov optimization

CN122931897APending Publication Date: 2026-10-16QINGHAI UNIVERSITY +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610955207.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-30
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

其一,长、短时间尺度的决策结果存在紧密耦合关系:长时间尺度上的能量套利与调频容量申报结果决定了秒级调频响应的边界,而短时间尺度上的调频动作又决定着储能的收益与,进而影响后续时段的申报

Benefits of technology

[0010] The beneficial effects that the above-mentioned technical solution can achieve are: it can eliminate time coupling constraints, significantly reduce computational complexity, and has high computational efficiency without the need to predict future information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122931897A_ABST
    Figure CN122931897A_ABST
Patent Text Reader

Abstract

The application provides a shared energy storage double-time scale scheduling algorithm based on Lyapunov optimization, first, a double-time scale optimization scheduling model is constructed, and a spot market declaration and frequency modulation capacity updating problem is modeled as a time average random optimization problem, and a decision result thereof is used as a feasible region boundary of a short-time scale decision; on the short-time scale, a frequency modulation deviation penalty and a battery incremental aging cost are considered, and a real-time frequency modulation response power is decided; secondly, an online algorithm based on a Lyapunov optimization framework is provided, the algorithm uses statistical distribution characteristics of an AGC signal to replace accurate prediction on the long-time scale, and according to different relations between frequency modulation up and frequency modulation down signals and a station charging and discharging baseline, an optimal frequency modulation response strategy is derived on the short-time scale, the algorithm significantly reduces the calculation complexity, and does not need to make accurate prediction on future information of uncertainty, and is suitable for the frequency modulation scene which has a high requirement on a solution speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a shared energy storage scheduling algorithm, and more specifically to a shared energy storage dual-timescale scheduling algorithm, belonging to the field of new energy technology. Background Technology

[0002] The randomness and volatility of a high proportion of renewable energy have exacerbated the pressure on the power grid's energy balance and frequency regulation during intraday operation. Shared energy storage, as a flexible adjustment resource, is widely used to provide both leasing and ancillary services. During the day-ahead phase, shared energy storage has completed the allocation of leasing and frequency regulation capacity to wind farms. During intraday operation, wind farms update their charging and discharging needs for energy storage based on ultra-short-term power forecasts, releasing some reserved capacity. To further improve operational profitability, energy storage operators participate in the energy market and dynamically adjust their frequency regulation market bids based on the latest spot market electricity prices. Specifically, on a long-term timescale, the bid capacity for participating in the frequency regulation and spot markets is updated every 15 minutes; on a short-term timescale, the response power to system AGC commands is decided in real time every 2 seconds. It is important to emphasize that shared energy storage does not simply follow instructions across the board after receiving AGC signals. This is because: firstly, frequent charging and discharging accelerates the aging of electrochemical energy storage; secondly, frequency regulation causes dynamic changes in the state of charge of the energy storage. Since the charging and discharging of the site has the highest physical priority, it is necessary to assess whether current frequency regulation actions will lead to future inability to meet the site's needs. In the above scenario, the intraday optimal scheduling problem of shared energy storage mainly faces two challenges. First, there is a close coupling between long-term and short-term decision-making results: energy arbitrage and frequency regulation capacity application results on a long-term timescale determine the boundary of the second-level frequency regulation response, while frequency regulation actions on a short-term timescale determine the benefits of energy storage and... This can affect subsequent application periods. Secondly, AGC commands are issued at a rate of seconds and cannot be accurately predicted, making it difficult to adopt optimization methods such as model predictive control and dynamic programming, which require prior knowledge of future information or have long computation times, in engineering. How to characterize the coupling relationship between decisions on two time scales? Frequent charging and discharging require shared energy storage to consider the nonlinear aging cost related to the state of charge, resulting in temporal coupling and making it difficult to solve. Due to the short frequency regulation response decision interval and the difficulty in predicting AGC signals, offline or prediction-based optimization methods cannot be used. How to propose an online scheduling algorithm that does not rely on future information and has high computational efficiency? To solve the above problems, it is necessary to establish an optimization model that considers the coupling characteristics of dual time scale decisions and propose a shared energy storage frequency regulation online scheduling method that can be solved quickly. Summary of the Invention

[0003] To address the aforementioned technical problems, this invention provides a dual-timescale scheduling algorithm for shared energy storage based on Lyapunov optimization. This algorithm eliminates time coupling constraints, significantly reduces computational complexity, and does not require prediction of future information, thus exhibiting high computational efficiency.

[0004] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:

[0005] A shared energy storage dual-time-scale scheduling algorithm based on Lyapunov optimization is proposed, with the following steps:

[0006] Step 1: Construct a daily dual-timescale optimization scheduling model for shared energy storage

[0007] Using the capacity leased to the power station as the boundary, and considering the coupling characteristics of energy arbitrage with the power station's charging / discharging and frequency regulation services: On a long time scale, the decision-making process for spot market declaration and frequency regulation capacity update is modeled as a time-averaged stochastic optimization problem to determine the feasible region of the short-time scale response strategy; On a short time scale, the decision-making process for the actual frequency regulation response power is implemented, and frequency regulation deviation penalties and incremental battery aging costs caused by charging / discharging actions are introduced to reflect the impact of short-time decisions on operating revenue.

[0008] Step 2: Propose an online scheduling algorithm based on Lyapunov optimization.

[0009] Over long timescales, the statistical distribution of AGC signals in the next time period is utilized to reduce the need for precise forecasting. Over short timescales, the current frequency modulation signal, the charging and discharging requirements of the power station, and energy storage are considered. The algorithm provides an explicit expression of the optimal frequency regulation response strategy, which takes into account both the operational benefits of energy storage and the health status of the battery. The algorithm reduces the computational complexity by relaxing the time-duration coupling constraint into a time-averaged constraint, and solves the optimization problem on two time scales online.

[0010] The beneficial effects that the above-mentioned technical solution can achieve are: it can eliminate time coupling constraints, significantly reduce computational complexity, and has high computational efficiency without the need to predict future information. Attached Figure Description

[0011] Figure 1 is a diagram of the new energy-side shared energy storage operation mode of the present invention;

[0012] Figure 2 is a schematic diagram of the dual-timescale decision-making proposed in this invention. Detailed Implementation

[0013] Depend on Figure 1 and Figure 2 As shown, a shared energy storage dual-time-scale scheduling algorithm based on Lyapunov optimization is presented, with the following steps:

[0014] Step 1: Construct a daily dual-timescale optimization scheduling model for shared energy storage

[0015] During the day-ahead phase, wind farms lease storage and power capacity from energy storage providers, and shared energy storage providers submit hourly frequency regulation capacity requests to the grid. During the intraday phase, wind farms determine their actual charging and discharging needs for leased energy storage based on ultra-short-term wind power forecasts, releasing some reserved capacity. To obtain higher daily operating revenue, energy storage operators need to modify their submitted values ​​in the energy market and frequency regulation market during the intraday phase, based on the latest charging and discharging needs of the wind farms and spot market electricity prices. Simultaneously, shared energy storage affects battery health during frequency regulation and charging / discharging, requiring consideration of aging and loss costs incurred from actual operations. It should be noted that actions following frequency regulation signals occur on a second-level timescale, while arbitrage and providing charging / discharging services to wind farms operate on a scale ranging from minutes to hours. The secondary frequency regulation market typically operates on a dual-timescale model, with service providers submitting regulation capacity bids on a longer timescale and adjusting their power output based on AGC signals on a shorter timescale. Therefore, this invention considers the intraday and real-time operation of shared energy storage to address the challenges posed by different decision-making timescales for multiple services. The decision-making results at the two scales are coupled: the capacity application results at a long time scale will affect the feasible region of frequency regulation decision, while the frequency regulation response results at a short time scale will affect the actual frequency regulation benefits and aging costs of energy storage power stations.

[0016] Specifically, setting a long time interval Each long time interval is composed of It consists of short time intervals, at the beginning of each long time interval t, that is, each At the beginning of each short time slot, shared energy storage operators make application decisions, including energy purchased from the grid. and the energy sold to the grid To engage in peak-valley arbitrage, and at the same time modify the capacity declaration for providing frequency regulation services, it is about to... Change to ,Decide Frequency modulation capability during each short period After receiving the AGC signal from the grid, the shared energy storage determines the actual response power of frequency regulation, and the secondary frequency regulation response power is denoted as... ,in This indicates an upward frequency modulation response. This indicates a downward frequency adjustment response. Based on electricity market rules, this invention sets the long time scale to 15 minutes and the short time scale to 2 seconds. Figure 2 This illustrates the relationship between long-term and short-term decision-making.

[0017] Decisions at both time scales jointly affect battery dynamics, and the impact of multiple services on battery operation must be considered, as shown in Equation (1). Decisions at long and short time scales, including the power of shared energy storage participating in the spot market to purchase / sell electricity to the grid and the frequency regulation response power, will affect the charging and discharging strategies of battery energy storage.

[0018] (1)

[0019] Once the frequency modulation capacity under a long time interval t is determined, each short time slot within that interval... The feasible region of the frequency modulation response is fixed, as shown in equation (2):

[0020] (2)

[0021] The energy level of a shared energy storage battery changes over time, and its energy dynamics can be expressed by the following equation (3):

[0022] (3)

[0023] Although the frequency regulation capacity and frequency regulation response power are not present in (1) or (3), their impact on the shared energy storage state is still explained. Long- and short-term timescale decisions constrain the battery's charging and discharging power through equations (1) and inequality (2), thereby affecting the battery's energy dynamics through the charging and discharging power.

[0024] Furthermore, in frequency regulation services, the decision-making results at two time scales jointly affect this portion of the revenue. The frequency regulation capacity declaration results at the long time scale affect both capacity revenue and mileage revenue, as shown in equation (4a). At the same time, the accuracy of frequency regulation directly affects the frequency regulation performance score, which can be simplified as assessing the deviation between the actual response power and the commanded value, as shown in equation (4b). This, in turn, affects the actual frequency regulation revenue of shared energy storage.

[0025] (4a)

[0026] (4b)

[0027] 1) Long-term optimization model

[0028] As mentioned earlier, the problem of optimizing the operation of shared energy storage within a single day is broken down into two time scales. In the optimization over a longer time scale, shared energy storage operators consider the "declaration" issue, deciding on the capacity to provide frequency regulation services based on frequency regulation prices and spot market prices, i.e., the declared value for the current day. Change to At the same time, determine the energy purchased from the grid. and the energy sold to the grid Since there is a coupling relationship between decisions at different time scales, the following aspects need to be considered when constructing a long-term optimization model: On the one hand, the frequency modulation response strategy at short time scales. This will affect the actual frequency regulation benefits and aging costs of energy storage power stations, and needs to be considered in the objective function of the long-term optimization model; on the other hand, the application results on a long-term scale will affect the feasible region of the frequency regulation response strategy, and thus affect the energy dynamics on a short-term scale, so it is necessary to ensure that the application results are accurate and timely. It can simultaneously satisfy two time scales Safety constraints.

[0029] Specifically, in the declaration model, the shared energy storage capacity is declared in the frequency regulation market before the adjustment date, and participates in peak-valley arbitrage based on the spot electricity price, with the goal of maximizing the expected return, as shown in equation (5), where, These include revenue from the electricity market, revenue from frequency regulation services, costs associated with frequency regulation applications and adjustments, penalties for non-responsive frequency regulation, and costs due to battery aging and depreciation. The calculation methods for each of these revenue and cost categories are explained below.

[0030] (5)

[0031] The revenue from shared energy storage in the spot energy market is mainly obtained through "low-charge, high-discharge" arbitrage. Electricity is purchased and stored in energy storage when prices are low, and then sold to the grid when prices are high, as shown in equation (6). Let t represent the arbitrage profit of shared energy storage during time period t, where a positive value represents the revenue from electricity sales and a negative value represents the cost of purchasing electricity. The spot market electricity price; For the shared energy storage power sold and purchased during time period t,

[0032] (6)

[0033] According to current market rules in my country, the revenue from shared energy storage in the frequency regulation ancillary services market is settled based on frequency regulation performance. Over a long time scale, the revenue is divided into two parts: capacity revenue and mileage revenue, as shown in equation (7). The first term is the revenue from providing frequency regulation capacity. It is the price per unit of frequency regulation capacity during time period t. Price per unit of FM mileage The average frequency regulation mileage during time period t is the absolute value of the frequency regulation signal variation amplitude, reflecting the actual frequency regulation action. It should be noted that failure to follow the AGC signal will affect the frequency regulation performance score of shared energy storage; the resulting assessment cost will be listed separately and not included in the overall assessment. middle,

[0034] (7)

[0035] Equation (8) calculates the penalty for the deviation between intraday ancillary services market capacity bids and day-ahead market clearing results. This represents the day-ahead market clearing result for the frequency modulation market during time period t. Bidding within the day for period t; The penalty coefficient for the application adjustment:

[0036] (8)

[0037] To characterize the loss of frequency modulation gains when shared energy storage responds to frequency-modulated signals to varying degrees, the accuracy of the frequency modulation response is first calculated. As a key indicator of the frequency modulation performance score, it represents the deviation between the AGC command and the actual output power. The loss caused by the energy storage failing to respond to the frequency modulation signal can be simply referred to as the frequency modulation deviation penalty. This item is related to the frequency modulation response power of the shared energy storage. The response power is close to the command value. The higher the frequency modulation accuracy, the better the corresponding frequency modulation performance and the lower the loss of benefits. For real-time AGC signals; The penalty coefficient for not responding to the FM signal can be taken as... It should be noted that, It is each short time slot All cost items that require decision-making include short-timescale decision variables. In the problem of frequency regulation, the expected value of the frequency regulation deviation penalty is estimated by using the scenario method. This effectively characterizes the coupling characteristics of the two time scales and incorporates the impact of the actual frequency regulation response strategy on the operational benefits every 2 seconds into the optimization of the problem of frequency regulation.

[0038] (9)

[0039] Because frequent charge-discharge cycles in electrochemical energy storage can lead to battery degradation, this cost must be considered in long-term application filings to avoid overly aggressive filing strategies. for Battery degradation cost per time slot Loss coefficient:

[0040] (10)

[0041] The operational constraints of the long-term reporting problem for shared energy storage include the dynamic equation of energy quantity, power balance constraints, and frequency regulation reporting constraints, as shown in equations (11a)-(11i):

[0042] (11a)

[0043] (11b)

[0044] (11c)

[0045] (11d)

[0046] (11e)

[0047] (11f)

[0048] (11g)

[0049] (11h)

[0050] (11i)

[0051] in, These are the sum of the charging and discharging power reported by the lower-level wind farm and the charging and discharging power of wind farm n, obtained at the beginning of time period t. This refers to the energy stored over a long timescale. This refers to the charging and discharging power over a long time scale, and its definition does not consider the frequency modulation output power over a short time scale. These are the upper and lower limits of shared energy storage capacity, the maximum value of energy storage charging power, and the upper limit of the maximum transmission power of the distribution network. , For charge and discharge efficiency; The frequency modulation energy loss coefficient,

[0052] Equation (11a) is the energy dynamic equation. The energy dynamic equation on a long time scale is derived from the charging and discharging power. and frequency modulation energy loss It was jointly decided that, for actual AGC signals, self-balancing is generally not possible within an hour, and a suitable [method / approach] can be selected. To ensure that long-term decision-making can meet the safety boundaries of the energy storage's state of charge, equations (11b)-(11c) represent power balance constraints, equation (11d) specifies that the sum of the power participating in frequency regulation and charging / discharging services does not exceed the rated power, equations (11e)-(11h) represent the safe range of energy storage, the range of charging power, and the maximum transmission power limit of the distribution network, and equation (11e) specifies that energy storage cannot be charged and discharged simultaneously. It should be emphasized that the optimized value at time t... , for t to The electricity output obtained after 450 short-timescale decision-making actions within these 15 minutes is not necessarily equal to the output calculated in the previous calculation. The solution obtained in long-term optimization Based on constants The calculated value is a probabilistic result, while its final value is determined by the actual AGC signal received on a short time scale and the corresponding frequency modulation action.

[0053] In addition, the output power of real-time frequency modulation response needs to be considered in capacity application. This ensures that the reporting strategy for time period t produces feasible results during real-time operation. Therefore, long-term reporting problems require consideration of the actual frequency modulation response. Optimization should also satisfy the short-time-scale dynamic equations of charge, power balance constraints, maximum charge and discharge power constraints, and frequency modulation output range constraints, as shown in equations (12a)-(12e).

[0054] (12a)

[0055] (12b)

[0056] (12c)

[0057] (12d)

[0058] (12e)

[0059] in, For sharing energy storage charging and discharging power over short timescales; For short-term energy storage, Number the scene.

[0060] 2) Short-timescale optimization model

[0061] The frequency regulation capacity declared for shared energy storage is determined by long-term optimization and remains fixed within t = 15 minutes. In actual operation, the grid sends an AGC signal to the operator every two seconds. The operator needs to adjust the output power of its shared energy storage in real time according to this instruction. During this process, the active power output should be within... Within a dynamic range, to maximize operational efficiency, frequency regulation response decisions must simultaneously consider both battery aging and degradation levels and frequency regulation gains. Precisely following AGC signals, which leads to frequent charge-discharge cycles, accelerates battery lifespan degradation but simultaneously improves frequency regulation performance scores, thereby increasing frequency regulation gains. Therefore, it is necessary to consider each... The frequency modulation response decision is constructed using the following short-time-scale optimization model:

[0062] (13a)

[0063] (13b)

[0064] (13c)

[0065] (13d)

[0066] (13e)

[0067] (13f)

[0068] (13g)

[0069] (13h)

[0070] It should be noted that aging costs The main consideration is the cyclic aging of the battery, which is related to the depth of discharge and the number of discharge cycles. Shared energy storage undergoes frequent charging and discharging following the frequency modulation signal, resulting in significant cyclic aging. Therefore, it is necessary to model this aging process to optimize the frequency modulation response strategy. This invention employs an incremental aging model:

[0071] (14)

[0072] Aging costs Indicates shared energy storage from Discharge to Recharge to The cost of this cycle, therefore, the loss incurred in one cycle between 𝑥 and 𝑦 is This model defines that incremental aging costs are incurred only during the discharge process and are only related to t. f The initial and final states of charge during the time period are related. The 𝐶 in the model... N pass The incremental aging cost is further expressed as follows: For investment costs, for Fitting coefficients:

[0073] (15)

[0074] Under short-term timescale operational constraints, The stored energy is shared at the beginning of each AGC signal issuance; The actual charging and discharging power of shared energy storage is composed of arbitrage power, station charging and discharging power, and frequency regulation output power. Joint decision; The AGC signal interval is 2 seconds in this invention. Equation (13b) is the dynamic equation for energy storage capacity on a short time scale; Equation (13c) is the energy boundary for safe operation; Equation (13d) is the power balance constraint on a short time scale, clarifying the relationship between the frequency modulation response value, the energy market declaration value, and the station demand; Equations (13e)-(13f) stipulate that the range of frequency modulation response power does not exceed the requirements of the frequency modulation signal, and the direction is the same as the signal direction, i.e. Respond to charging in real time. Discharge response is performed; Equations (13g)-(13h) constrain the charge and discharge power on a short timescale and ensure that charging and discharging do not occur simultaneously.

[0075] Step 2: Online Algorithm Based on Dual-Time-Scale Lyapunov Optimization

[0076] To solve the original dual-timescale optimization problem within the Lyapunov optimization framework, the original problem is first transformed into a long-term average optimization problem. The long-term and short-term optimization problems are transformed into the following forms, where 𝒳 is the original set of decision variables. The original objective function is:

[0077] (16a)

[0078] (16b)

[0079] Taking a short-timescale problem as an example, we present a method to minimize the offline objective function. Convert to Minimize The derivation of the time average:

[0080] (17a)

[0081] (17b)

[0082] (17c)

[0083] (17d)

[0084] (17e)

[0085] (17f)

[0086] (17g)

[0087] (17h)

[0088] Treating the frequency modulation signal as a random variable, the above equation optimizes the expected value under a random frequency modulation signal. Equations (17b)-(17c) represent the time-period recursive constraints on the stored energy capacity, where the value at time t... The status is changed by Frequency modulation during a specific time period The constraints are jointly determined and involve time-varying factors, requiring them to be transformed into time-averaged constraints that are easier to solve online.

[0089] Will The left and right sides of the dynamic equation are summed, and the middle time interval is... The states are canceled out, resulting in:

[0090] (18)

[0091] Taking the limit of its expected value, since the energy is always finite, we can obtain:

[0092] (19)

[0093] Thus, the original optimization problem (13) is transformed into a time-averaged optimization problem (20):

[0094] (20a)

[0095] (20b)

[0096] (20c)

[0097] (20d)

[0098] (20e)

[0099] (20f)

[0100] (20g)

[0101] Essentially, constraint (20b) is the result of relaxing constraints (17b)-(17c), and the feasible solution of the original problem is also feasible in the new problem.

[0102] 1) Online solution algorithm based on Lyapunov optimization

[0103] Lyapunov optimization was first introduced into the optimal management of queuing systems, aiming to achieve a balance between system performance and queue backlog. For energy storage optimization scheduling problems, the depth of discharge of a battery can be considered a queue backlog. The goal of Lyapunov optimization-based control strategies is to achieve a balance between the depth of discharge of energy storage and immediate energy gain. To incorporate the dual-timescale optimization scheduling problem into the Lyapunov optimization framework, a virtual queue is first defined. and ,

[0104] (21a)

[0105] (21b)

[0106] in, , Control parameters for long-duration reporting issues and short-duration frequency modulation response issues, respectively:

[0107] (22a)

[0108] (22b)

[0109] The following section uses a short-time-scale optimization problem as an example to explain in detail the definitions of virtual queues and Lyapunov functions. (Queue backlog) At the level of energy storage capacity An offset is superimposed on the basis, so it has a similar dynamic equation to the charge, as shown in equation (23). In a physical sense, the charging process of the battery is similar to the "arrival" process of a virtual queue, which increases the queue backlog, while the discharging process corresponds to the "departure" process, which decreases the queue backlog.

[0110] (twenty three)

[0111] Introducing the concept of "queue stability," the average stability of a queue is defined as shown in equation (24), indicating that the queue backlog does not grow indefinitely over time. The growth rate is less than The rate of increase:

[0112] (twenty four)

[0113] If this condition is not met, the queue will monotonically tend towards infinity, corresponding to the continuous accumulation or depletion of battery energy levels in the energy storage scheduling problem, violating physical constraints. Battery energy constraint. It is a time-series hard constraint. By using the average stability constraint of the queue, it is transformed into a queue stability problem that can be directly handled by the Lyapunov optimization framework.

[0114] Apply the queue equation (23) to By accumulating the time intervals, calculating the expected value, and then taking the time limit, we can obtain:

[0115] (25a)

[0116] (25b)

[0117] Therefore, when When the condition for a stable average rate of the queue is met, we have:

[0118] (26)

[0119] It can be seen that the time-averaged form of energy dynamics (20b) can be derived from the queue average stability condition (24), thus ensuring the feasibility of the time-averaged optimization problem (20).

[0120] Based on the classic Lyapunov optimization framework, define the Lyapunov function. and queue drift function :

[0121] (27a)

[0122] (27b)

[0123] The main reason for using the quadratic Lyapunov function is that when calculating When the time frame changes from one period to the next, the resulting queue backlog after unfolding With charge and discharge power The product term precisely reflects the impact of scheduling decisions (ultimately manifested as charging / discharging decisions) on queue stability. The queue drift function describes the change of the Lyapunov function over a time interval. To satisfy the queue stability condition, this can be achieved by minimizing the function... To ensure,

[0124] set up Prove the drift function for each time period. Both have an upper bound:

[0125] (28a)

[0126] (28b)

[0127] (28c)

[0128] (28d)

[0129] (28e)

[0130] (28f)

[0131] right By scaling down the charging and discharging power, we can obtain (29). Therefore, we can obtain the queue backlog of the current time period through a constant and the queue backlog of the current time period. describe The upper bound of the queue further offsets the queue in the next time step. This eliminates the influence of time-phase coupling.

[0132] (29)

[0133] The goal of Lyapunov optimization is to achieve the following in each time period: To achieve a balance between "immediate costs" and "queue backlog," a higher total operating benefit is achieved in the long run. To this end, a drift plus penalty function is constructed as shown in equation (30), aiming to minimize the weighted sum of queue drift and immediate costs given the current queue backlog, where... It is a weight parameter.

[0134] (30a)

[0135] (30b)

[0136] (30c)

[0137] (30d)

[0138] (30e)

[0139] (30f)

[0140] (30g)

[0141] However, due to the objective function The item needs to pass through the queue backlog at the next time step. Obtain, this is in the current Since the time frame is unknown, the optimization problem cannot be solved directly. Based on the above proof of the upper bound of the drift, the optimization problem can be transformed into an online optimization scheduling problem (31), which is obtained by minimizing the upper bound of the drift penalty instead of minimizing the drift penalty term. The optimal strategy at any given time.

[0142] (31a)

[0143] (31b)

[0144] (31c)

[0145] (31d)

[0146] (31e)

[0147] (31f)

[0148] (31g)

[0149] The Lyapunov optimization method controls charging and discharging decisions to ensure queue stability by minimizing the drift penalty term at each time interval. The physical meaning of battery energy is relative to reference level The offset when The larger the value, the higher the current battery energy is than the reference level. This compresses the subsequent charging capacity and narrows the scheduling space. In this case, the existence of a drift term will cause the optimization result to favor the battery's energy level. This means prioritizing discharge; conversely, if the battery energy is too low, the optimization result will favor charging. In this way, the boundedness of the queue within a specific range can directly guarantee the energy storage capacity. Always satisfy physical constraints; on the other hand, penalty terms. The optimization results should be guided to pursue economic efficiency. The larger the value, the more emphasis is placed on economy, focusing on minimizing immediate costs. Smaller queues place greater emphasis on queue stability.

[0150] To ensure the algorithm satisfies the safety constraints of the energy storage state of charge while also considering operational economy, appropriate control parameters V and F need to be selected. Parameter F serves as a reference threshold for the energy storage state of charge, primarily used to adjust the queue length. Parameter V reflects the trade-off between queue stability and economic objectives; generally, a smaller value indicates that the algorithm prioritizes the stability of the virtual queue, ensuring that the energy storage truly meets the requirements. Safety constraints may be imposed, but this could lead to decreased returns; conversely, a larger V prioritizes minimizing operating costs, resulting in online decisions that are closer to the offline optimum, but this could increase the likelihood of violations. Risks of constraints.

[0151] Here, parameters are used on a short time scale. , For example, first give Select the range, then give The maximum value, let The sum of the long-term energy storage application results and the total power demand for charging and discharging at the power station will be used as... express,

[0152] The upper limit is:

[0153] (32)

[0154] The lower limit is:

[0155] (33)

[0156] Taking into account both upper and lower bound constraints, Must meet:

[0157] (34)

[0158] Pick:

[0159] (35)

[0160] Next The maximum value is derived when... At that time, it was assumed that shared energy storage should refuse to discharge, resulting in queue backlog. for:

[0161] (36)

[0162] The derivative of the objective function is:

[0163] (37)

[0164] Rejection of discharge request exist Location:

[0165] (38)

[0166] Substitution ,right After scaling, we get:

[0167] (39)

[0168] Solution:

[0169] (40)

[0170] 2) Intraday dual-timescale online optimization method for shared energy storage

[0171] Building upon the method introduced in the previous section, this section proposes a dual-timescale online algorithm based on Lyapunov optimization. Both timescales solve a drift-penalty minimization problem, thereby eliminating time coupling constraints, significantly reducing computational complexity, and eliminating the need to predict future information. In long-term decision-making, the current electricity market price is obtained... FM price With the charging and discharging needs of the station Then, by solving problem (41), the optimal application strategy is obtained. :

[0172] (41a)

[0173] (41b)

[0174] (41c)

[0175] (41d)

[0176] (41e)

[0177] (41f)

[0178] (41g)

[0179] (41h)

[0180] (41i)

[0181] (41j)

[0182] (41k)

[0183] (41l)

[0184] (41m)

[0185] It needs to be explained that, The initial energy storage capacity at time t has been observed during the decision-making process, and the queue length is... These are known, deterministic quantities during the solution process. Furthermore, in long-term optimization, the expected cost of short-term frequency modulation decisions needs to be considered. Specifically, based on the scenario method, it is assumed that the AGC signal will be used in the following time intervals... By taking a finite number of values, only the statistical distribution of the AGC signal is needed, thus allowing the frequency modulation response strategy and expected cost to be calculated for each signal scenario, avoiding the requirement for accurate prediction. In this way, long-term optimization problems can be solved online via a solver for rapid computation.

[0186] The application results for time period t are obtained. Then, the short-timescale frequency modulation response optimization problem takes this as its boundary, and at each interval... Run it once, and observe the AGC signal in After obtaining the actual value at time, the short-timescale frequency modulation response decision problem becomes a deterministic convex optimization problem for a single time period, which can be solved quickly online:

[0187] (42a)

[0188] (42b)

[0189] (42c)

[0190] (42d)

[0191] (42e)

[0192] (42f)

[0193] (42g)

[0194] For the short-timescale frequency modulation response problem (42), an analytical solution for the optimal response can be given. Taking the following frequency modulation signal as an example, when There should be At this time, the charging and discharging state of energy storage changes from The positive or negative decision needs to be discussed in two cases.

[0195] like At this time, the energy storage is in a discharging state, and the charging and discharging powers are respectively Substituting into the original objective function, with the charging term being zero, the objective function simplifies to:

[0196] (43)

[0197] After unfolding, we get:

[0198] (44)

[0199] The optimal frequency modulation response power at this point is [value], and it needs to be verified whether it meets the requirements. :

[0200] (45)

[0201] like The energy storage is in a discharging state, with Substituting into the objective function and simplifying the constant term, we get:

[0202] (46)

[0203] Regarding the above objective function After differentiation and simplification, the optimal frequency modulation response power is obtained, and it needs to be verified whether it meets the requirements. ,

[0204] (47).

[0205] In summary, the complete logic of this dual-timescale online optimization algorithm can be summarized as follows: At the beginning of each 15-minute period, the long-term timescale problem is first solved based on the currently known information to formulate a market declaration strategy; then, within that 15-minute period, the frequency modulation response problem is solved every 2 seconds based on the actual AGC signal, using the declaration results as the boundary condition; after all short-term timescale decisions are completed within this period, the energy storage capacity is updated. and queue length This is then used as the initial state for the next 15-minute optimization report, and this process continues iteratively until the end of the running day.

[0206] .

Claims

1. A shared energy storage dual-time-scale scheduling algorithm based on Lyapunov optimization, characterized in that, The steps are as follows: Step 1: Construct a daily dual-timescale optimization scheduling model for shared energy storage Taking the capacity leased to the station as the boundary, and considering the coupling characteristics of energy arbitrage with station charging and discharging and frequency regulation services: the profit maximization problem is modeled as a time-averaged stochastic optimization problem in the long-term decision-making spot market declaration and frequency regulation capacity update, so as to determine the feasible region of the short-term response strategy. In order to determine the actual frequency modulation response power on a short time scale, the frequency modulation deviation penalty and the incremental battery aging cost caused by charging and discharging operations are introduced to reflect the impact of short-time decision on operating benefits. Step 2: Propose an online scheduling algorithm based on Lyapunov optimization. Over long timescales, the statistical distribution of AGC signals in the next time period is utilized to reduce the need for precise forecasting. Over short timescales, the current frequency modulation signal, the charging and discharging requirements of the power station, and energy storage are considered. The algorithm provides an explicit expression of the optimal frequency regulation response strategy, which takes into account both the operational benefits of energy storage and the health status of the battery. The algorithm reduces the computational complexity by relaxing the time-duration coupling constraint into a time-averaged constraint, and solves the optimization problem on two time scales online.

2. The shared energy storage dual-time-scale scheduling algorithm based on Lyapunov optimization according to claim 1, characterized in that, Step one is as follows: Set long time interval Each long time interval is composed of It consists of short time intervals, at the beginning of each long time interval t, that is, each At the beginning of each short time slot, shared energy storage operators make application decisions, including energy purchased from the grid. and the energy sold to the grid To engage in peak-valley arbitrage, and simultaneously modify the capacity declaration for providing frequency regulation services, which is about to be implemented. Change to ,Decide Frequency modulation capability during each short period After receiving the AGC signal from the grid, the shared energy storage determines the actual response power of frequency regulation, and the secondary frequency regulation response power is denoted as... ,in This indicates an upward frequency modulation response. This indicates a downward frequency adjustment response, with a long time scale set at 15 minutes and a short time scale at 2 seconds, in accordance with electricity market rules. Decisions at both time scales jointly affect battery dynamics, and the impact of multiple services on battery operation must be considered, as shown in Equation (1). Decisions at long and short time scales, including the power of shared energy storage participating in the spot market to purchase / sell electricity to the grid and the frequency regulation response power, will affect the charging and discharging strategies of battery energy storage. (1) Once the frequency modulation capacity under a long time interval t is determined, each short time slot within that interval... The feasible region of the frequency modulation response is fixed, as shown in equation (2): (2) The energy level of a shared energy storage battery changes over time, and its energy dynamics can be expressed by the following equation (3): (3) The results of long-term frequency regulation capacity declarations will affect capacity and mileage benefits, as shown in equation (4a). At the same time, the accuracy of frequency regulation will directly affect the frequency regulation performance score, which can be simplified as assessing the deviation between the actual response power and the commanded value, as shown in equation (4b). This will further affect the actual frequency regulation benefits of shared energy storage. (4a) (4b) 1) Long-term optimization model In the declaration model, the shared energy storage capacity is declared in the frequency regulation market before the adjustment date, and participates in peak-valley arbitrage based on the spot electricity price. The goal is to maximize the expected return, as shown in equation (5), where, These include revenue from the electricity market, revenue from frequency regulation services, costs associated with frequency regulation applications and adjustments, penalties for non-responsive frequency regulation, and costs due to battery aging and depreciation. The calculation methods for each of these revenue and cost categories are explained below. (5) The revenue from shared energy storage in the spot energy market is mainly obtained through "low-charge, high-discharge" arbitrage. Electricity is purchased and stored in energy storage when prices are low, and then sold to the grid when prices are high, as shown in equation (6). Let t represent the arbitrage profit of shared energy storage during time period t, where a positive value represents the revenue from electricity sales and a negative value represents the cost of purchasing electricity. The spot market electricity price; For the shared energy storage power sold and purchased during time period t, (6) According to current market rules in my country, the revenue from shared energy storage in the frequency regulation ancillary services market is settled based on frequency regulation performance. Over a long time scale, the revenue is divided into two parts: capacity revenue and mileage revenue, as shown in equation (7). The first term is the revenue from providing frequency regulation capacity. It is the price per unit of frequency regulation capacity during time period t. Price per unit of FM mileage The average frequency modulation mileage during time period t. (7) Equation (8) calculates the penalty for the deviation between intraday ancillary services market capacity bids and day-ahead market clearing results. This represents the day-ahead market clearing result for the frequency modulation market during time period t. Bidding within the day for period t; Penalty coefficient for the application adjustment: (8) To characterize the loss of frequency modulation gains when shared energy storage responds to frequency-modulated signals to varying degrees, the accuracy of the frequency modulation response is first calculated. As a key indicator of the frequency modulation performance score, it represents the deviation between the AGC command and the actual output power. The loss caused by the energy storage system's failure to respond to the frequency modulation signal can be simply referred to as the frequency modulation deviation penalty. For real-time AGC signals; The penalty coefficient for not responding to the FM signal can be taken as... The impact of the actual frequency modulation response strategy every 2 seconds on operational benefits is incorporated into the optimization of the reporting problem: (9) for Battery degradation cost per time slot Loss coefficient: (10) The operational constraints of the long-term reporting problem for shared energy storage include the dynamic equation of energy quantity, power balance constraints, and frequency regulation reporting constraints, as shown in equations (11a)-(11i): (11a) (11b) (11c) (11d) (11e) (11f) (11g) (11h) (11i) in, These are the sum of the charging and discharging power reported by the lower-level wind farm and the charging and discharging power of wind farm n, obtained at the beginning of time period t. This refers to the energy stored over a long timescale. This refers to the charging and discharging power over a long time scale, and its definition does not consider the frequency modulation output power over a short time scale. These are the upper and lower limits of shared energy storage capacity, the maximum value of energy storage charging power, and the upper limit of the maximum transmission power of the distribution network. , For charge and discharge efficiency; The frequency modulation energy loss coefficient, Equation (11a) is the energy dynamic equation. The energy dynamic equation on a long time scale is derived from the charging and discharging power. and frequency modulation energy loss Together, equations (11b)-(11c) define power balance constraints; equation (11d) specifies that the sum of power participating in frequency regulation and charging / discharging services shall not exceed the rated power; equations (11e)-(11h) define the safe range of energy storage, the range of charging power, and the maximum transmission power limit of the distribution network; and equation (11e) stipulates that energy storage shall not be charged or discharged simultaneously. Long-term reporting issues require actual frequency modulation response. Optimization should also satisfy the short-time-scale dynamic equations of charge, power balance constraints, maximum charge and discharge power constraints, and frequency modulation output range constraints, as shown in equations (12a)-(12e). (12a) (12b) (12c) (12d) (12e) in, For sharing energy storage charging and discharging power over short timescales; For short-term energy storage, Number the scene. 2) Short-timescale optimization model The frequency regulation capacity declared for shared energy storage is determined by long-term optimization and remains fixed within t = 15 minutes. The frequency modulation response decision is constructed using the following short-time-scale optimization model: (13a) (13b) (13c) (13d) (13e) (13f) (13g) (13h) Incremental aging model adopted: (14) Aging costs Indicates shared energy storage from Discharge to Recharge to The cost of this cycle, and the loss incurred in one cycle between 𝑥 and 𝑦, is The 𝐶 in the model N pass The incremental aging cost is further expressed as follows: For investment costs, 𝛼0 is Fitting coefficients: (15) Under short-term timescale operational constraints, The stored energy is shared at the beginning of each AGC signal issuance; The actual charging and discharging power of shared energy storage is composed of arbitrage power, station charging and discharging power, and frequency regulation output power. Joint decision; The AGC signal interval is 2 seconds in this invention. Equation (13b) is the dynamic equation for energy storage capacity on a short time scale; Equation (13c) is the energy boundary for safe operation; Equation (13d) is the power balance constraint on a short time scale, clarifying the relationship between the frequency modulation response value, the energy market declaration value, and the station demand; Equations (13e)-(13f) stipulate that the range of frequency modulation response power does not exceed the requirements of the frequency modulation signal, and the direction is the same as the signal direction, i.e. Respond to charging in real time. Discharge response is performed; Equations (13g)-(13h) constrain the charge and discharge power on a short timescale and ensure that charging and discharging do not occur simultaneously.

3. The shared energy storage dual-time-scale scheduling algorithm based on Lyapunov optimization according to claim 1, characterized in that, Step two is as follows: First, the original optimization problem is transformed into a long-run average optimization problem. The optimization problems on both long and short time scales are transformed into the following forms, where 𝒳 is the original set of decision variables. The original objective function is: (16a) (16b) Minimize the offline objective function Convert to Minimize The derivation of the time average: (17a) (17b) (17c) (17d) (17e) (17f) (17g) (17h) Treating the frequency modulation signal as a random variable, the above equation optimizes the expected value under a random frequency modulation signal. Equations (17b)-(17c) represent the time-period recursive constraints on the stored energy capacity, where the value at time t... The status is changed by Frequency modulation during a specific time period The constraints are jointly determined and involve time-varying factors, requiring them to be transformed into time-averaged constraints that are easier to solve online. Will The left and right sides of the dynamic equation are summed, and the middle time interval is... The states are canceled out, resulting in: (18) Taking the limit of its expected value, since the energy is always finite, we can obtain: (19) Thus, the original optimization problem (13) is transformed into a time-averaged optimization problem (20): (20a) (20b) (20c) (20d) (20e) (20f) (20g) Essentially, constraint (20b) is the result of relaxing constraints (17b)-(17c), and the feasible solution of the original problem is also feasible in the new problem. 1) Online solution algorithm based on Lyapunov optimization Lyapunov optimization was first introduced into the optimal management of queuing systems, aiming to achieve a balance between system performance and queue backlog. For energy storage optimization scheduling problems, the depth of discharge of a battery can be considered a queue backlog. The goal of Lyapunov optimization-based control strategies is to achieve a balance between the depth of discharge of energy storage and immediate energy gain. To incorporate the dual-timescale optimization scheduling problem into the Lyapunov optimization framework, a virtual queue is first defined. and , (21a) (21b) in, , Control parameters for long-duration reporting issues and short-duration frequency modulation response issues, respectively: (22a) (22b) Queue backlog At the level of energy storage capacity An offset is superimposed on the basis, as shown in equation (23). In a physical sense, the charging process of the battery is similar to the "arrival" process of a virtual queue, which increases the queue backlog, while the discharging process corresponds to the "departure" process, which decreases the queue backlog. (23) Introducing the concept of "queue stability," the average stability of a queue is defined as shown in equation (24), indicating that the queue backlog does not grow indefinitely over time. The growth rate is less than The rate of increase: (24) Battery energy constraints , The constraint is a time-series hard constraint. By using the average stability constraint of the queue, it is transformed into a queue stability problem that can be directly handled by the Lyapunov optimization framework. Apply the queue equation (23) to [0, By accumulating the time intervals, calculating the expected value, and then taking the time limit, we can obtain: (25a) (25b) Therefore, when When the condition for a stable average rate of the queue is met, we have: (26) It can be seen that the time-averaged form of energy dynamics (20b) can be derived from the queue average stability condition (24), thus ensuring the feasibility of the time-averaged optimization problem (20). Based on the classic Lyapunov optimization framework, define the Lyapunov function. and queue drift function : (27a) (27b) set up Prove the drift function for each time period. Both have an upper bound: (28a) (28b) (28c) (28d) (28e) (28f) right By scaling down the charging and discharging power, we can obtain (29). Therefore, we can obtain the queue backlog of the current time period through a constant and the queue backlog of the current time period. describe The upper bound of the queue further offsets the queue in the next time step. This eliminates the influence of time-phase coupling. (29) The goal of Lyapunov optimization is to achieve the following in each time period: To achieve a balance between "immediate cost" and "queue backlog," a drift plus penalty function is constructed as shown in equation (30). The goal is to minimize the weighted sum of queue drift and immediate cost given the current queue backlog. It is a weight parameter. (30a) (30b) (30c) (30d) (30e) (30f) (30g) Based on the above proof of the upper bound of drift, the optimization problem can be transformed into an optimization scheduling problem that is easy to solve online (31). By minimizing the upper bound of the drift penalty, we can obtain... The optimal strategy at any given time. (31a) (31b) (31c) (31d) (31e) (31f) (31g) The Lyapunov optimization method controls charging and discharging decisions to ensure queue stability by minimizing the drift penalty term at each time interval. The physical meaning of battery energy is relative to reference level The offset when The larger the value, the higher the current battery energy is than the reference level. This compresses the subsequent charging capacity and narrows the scheduling space. In this case, the existence of a drift term will cause the optimization result to favor the battery's energy level. This means prioritizing discharge; conversely, if the battery energy is too low, the optimization result will favor charging. In this way, the boundedness of the queue within a specific range can directly guarantee the energy storage capacity. Always satisfy physical constraints; on the other hand, penalty terms. The optimization results should be guided to pursue economic efficiency. The larger the value, the more emphasis is placed on economy, focusing on minimizing immediate costs. Smaller queues place greater emphasis on queue stability. First, give Select the range, then give The maximum value, let The sum of the long-term energy storage application results and the total power demand for charging and discharging at the power station will be used as... express, The upper limit is: (32) The lower limit is: (33) Taking into account both upper and lower bound constraints, Must meet: (34) Pick: (35) Next The maximum value is derived when... At that time, it was assumed that shared energy storage should refuse to discharge, resulting in queue backlog. for: (36) The derivative of the objective function is: (37) Rejection of discharge request exist Location: (38) Substitution ,right After scaling, we get: (39) Solution: (40) 2) Intraday dual-timescale online optimization method for shared energy storage In long-term decision-making, based on the current market price of electricity... FM price With the charging and discharging needs of the station Then, by solving problem (41), the optimal application strategy is obtained. : (41a) (41b) (41c) (41d) (41e) (41f) (41g) (41h) (41i) (41j) (41k) (41l) (41m) The application results for time period t are obtained. Then, the short-timescale frequency modulation response optimization problem takes this as its boundary, and at each interval... Run it once, and observe the AGC signal in After obtaining the actual value at time, the short-timescale frequency modulation response decision problem becomes a deterministic convex optimization problem for a single time period, which can be solved quickly online: (42a) (42b) (42c) (42d) (42e) (42f) (42g) For the short-timescale frequency modulation response problem (42), an analytical solution for the optimal response can be given. Taking the following frequency modulation signal as an example, when There should be At this time, the charging and discharging state of energy storage changes from The positive or negative decision needs to be discussed in two cases. like At this time, the energy storage is in a discharging state, and the charging and discharging powers are respectively Substituting into the original objective function, with the charging term being zero, the objective function simplifies to: (43) After unfolding, we get: (44) The optimal frequency modulation response power at this point is [value], and it needs to be verified whether it meets the requirements. : (45) like The energy storage is in a discharging state, with Substituting into the objective function and simplifying the constant term, we get: (46) Regarding the above objective function After differentiation and simplification, the optimal frequency modulation response power is obtained, and it needs to be verified whether it meets the requirements. , (47)。