Energy storage optimization configuration method and system considering power grid peak regulation risk

CN122553310APending Publication Date: 2026-08-11HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-21
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

然而,传统火电机组因其运行灵活性受限,在应对负荷波动和新能源波动时存在较大的局限性,导致电网调峰能力不足风险显著增加

Benefits of technology

1. 本发明构建双层储能优化配置模型并采用元启发式寻优算法实现双层模型结果的迭代,其中,规划层模型对储能配置方案进行决策,运行层模型则以储能配置方案作为边界条件,对该储能配置方案下的运行方案进行决策,并将决策结果反馈给规划层模型继续迭代,通过规划层与运行层的迭代求解,可以在复杂环境下快速得到最优的结果,最终得到最优储能配置方案。其次,本发明在设置模型的优化目标时,引入了系统调峰不足风险成本,系统调峰不足风险成本包括采用条件风险价值理论量化向上调峰不足的条件风险价值和向下调峰不足的条件风险价值,基于条件风险价值理论量化调峰能力不足导致的尾部风险并将其纳入优化目标中,可以综合考虑储能配置的成本以及调峰能力,实现储能系统的经济高效配置并提升电网运行的安全可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122553310A_ABST
    Figure CN122553310A_ABST
Patent Text Reader

Abstract

This invention belongs to the technical field of electrical engineering and discloses a method and system for optimizing energy storage configuration considering grid peak-shaving risks. The method includes: constructing a two-layer model, wherein the planning layer model determines the energy storage configuration scheme with the goal of minimizing the comprehensive cost, which includes the energy storage configuration cost, system operation cost, and system peak-shaving insufficiency risk cost; the operation layer model determines the optimal operation scheme among the selected energy storage configuration schemes with the goal of minimizing the system operation cost and system peak-shaving insufficiency risk cost; and a metaheuristic optimization algorithm is used to solve the model to obtain the optimal energy storage configuration scheme. This invention, through iterative solutions at the planning and operation layers, can quickly obtain optimal results in complex environments. Furthermore, by quantifying the tail risk caused by insufficient peak-shaving capacity based on conditional value at risk theory and incorporating it into the optimization objective, it can achieve economical and efficient configuration of energy storage systems and improve the safety and reliability of grid operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of electrical engineering, and more specifically, relates to a method and system for optimizing energy storage configuration that takes into account the risk of power grid peak shaving. Background Technology

[0002] With the increasing proportion of new energy power generation, the volatility and intermittency of renewable energy sources such as wind and solar power in the power system place higher demands on the grid's peak-shaving capacity. However, traditional thermal power units, due to their limited operational flexibility, have significant limitations in coping with load fluctuations and new energy fluctuations, leading to a significant increase in the risk of insufficient grid peak-shaving capacity. Insufficient grid peak-shaving capacity may not only lead to a decrease in the utilization rate of renewable energy sources such as wind and solar curtailment, but may also cause increased system operating costs and reduced power supply reliability. Furthermore, a decrease in grid frequency may lead to generator damage and large-scale power source disconnection, resulting in widespread power outages.

[0003] Therefore, there is an urgent need for an energy storage optimization configuration method that can take into account the grid peak-shaving risks, so as to achieve economical and efficient configuration of energy storage systems and improve the safety and reliability of grid operation. Summary of the Invention

[0004] In view of the above-mentioned defects or improvement needs of the existing technology, the present invention provides an energy storage optimization configuration method and system that takes into account the peak shaving risk of the power grid, the purpose of which is to achieve economical and efficient configuration of energy storage system and improve the safety and reliability of power grid operation.

[0005] To achieve the above objectives, the present invention is proposed.

[0006] According to a first aspect of the present invention, an energy storage optimization configuration method considering grid peak-shaving risks is provided, comprising: A two-layer energy storage optimization configuration model is constructed, consisting of a planning layer model and an operation layer model. The planning layer model aims to minimize the overall cost and decide on the energy storage configuration scheme for each node of the power grid, considering the energy storage power and capacity. The overall cost includes the energy storage configuration cost, system operation cost, and system peak shaving insufficiency risk cost. The operation layer model aims to minimize the system operation cost and system peak shaving insufficiency risk cost and decide on the optimal operation scheme under the selected energy storage configuration scheme. The system peak shaving insufficiency risk cost includes the conditional risk value of insufficient upward peak shaving and insufficient downward peak shaving, quantified using conditional risk value theory. A metaheuristic optimization algorithm is used to solve the planning layer model. In the metaheuristic optimization algorithm, the position of each individual represents an energy storage configuration scheme. In each iteration of the metaheuristic optimization algorithm, the energy storage configuration scheme currently represented by each individual is used as the boundary condition input to the operation layer model to obtain the optimal operation scheme under the energy storage configuration scheme and calculate the corresponding minimum energy storage configuration cost and system peak shaving insufficiency risk cost. The comprehensive cost of the energy storage configuration scheme is obtained and used as the fitness of the corresponding individual. Based on the fitness of each individual, the position is updated and the next iteration is entered. After the iteration is completed, the optimal energy storage configuration scheme is output.

[0007] According to a second aspect of the present invention, an energy storage optimization configuration system considering grid peak shaving risk is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the energy storage optimization configuration method considering grid peak shaving risk as described above.

[0008] According to a third aspect of the invention, a computer-readable storage medium is provided having a computer program stored thereon, wherein when the computer program is executed by a processor, it implements the steps of the energy storage optimization configuration method considering grid peak-shaving risks as described in any of the preceding claims.

[0009] In summary, compared with the prior art, the technical solutions conceived in this invention have the following main advantages: 1. This invention constructs a two-layer energy storage optimization configuration model and employs a metaheuristic optimization algorithm to iterate the results of the two-layer model. The planning layer model makes decisions on energy storage configuration schemes, while the operation layer model uses the energy storage configuration scheme as boundary conditions to make decisions on the operation scheme under that scheme, feeding the decision results back to the planning layer model for further iteration. Through iterative solutions at the planning and operation layers, optimal results can be quickly obtained in complex environments, ultimately leading to the optimal energy storage configuration scheme. Secondly, this invention introduces the risk cost of insufficient system peak shaving when setting the model's optimization objective. This risk cost includes quantifying the conditional risk value of insufficient upward peak shaving and insufficient downward peak shaving using conditional value of risk theory. By quantifying the tail risk caused by insufficient peak shaving capacity based on conditional value of risk theory and incorporating it into the optimization objective, the cost of energy storage configuration and peak shaving capacity can be comprehensively considered, achieving economical and efficient configuration of the energy storage system and improving the safety and reliability of grid operation.

[0010] 2. Furthermore, in a specific embodiment, the operation layer model also introduces frequency security constraints. The frequency security constraints of the power system with energy storage participation are constructed from three indicators: frequency change rate, frequency minimum point, and quasi-steady-state frequency. Based on these frequency security constraints, the frequency security of the system can be ensured when power disturbances occur.

[0011] 3. Furthermore, in a specific embodiment, the gray wolf optimization algorithm is used to solve the model, and by introducing a nonlinear convergence factor, the solution efficiency of the algorithm can be effectively improved, achieving rapid optimization. Attached Figure Description

[0012] Figure 1 This is a flowchart of the steps of an energy storage optimization configuration method considering grid peak-shaving risks in one embodiment of the present invention; Figure 2 This is a flowchart of the gray wolf optimization algorithm in one embodiment of the present invention. Detailed Implementation

[0013] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0014] Example 1 This invention first provides a method for optimizing energy storage configuration that considers the risk of power grid peak shaving, such as... Figure 1 The diagram shown is a flowchart of the steps of an energy storage optimization configuration method considering grid peak-shaving risk in one embodiment of the present invention. The following is a summary of the steps. Figure 1 This method is described in detail.

[0015] S1. Construct a two-layer energy storage optimization configuration model, which includes a planning layer model and an operation layer model. The planning layer model aims to minimize the comprehensive cost and make decisions on the energy storage power and capacity of each node in the power grid. The comprehensive cost includes the energy storage configuration cost, system operation cost, and system peak shaving insufficiency risk cost. The operation layer model aims to minimize the system operation cost and system peak shaving insufficiency risk cost and make decisions on the optimal operation scheme of the selected energy storage configuration scheme. The system peak shaving insufficiency risk cost is quantified using the conditional value at risk theory to determine the risk caused by insufficient upward and downward peak shaving capabilities.

[0016] The components of a power system include the power grid, tie lines, thermal power units, wind power units, and energy storage units. Before building a model, it is necessary to obtain the relevant parameters of the power grid.

[0017] Specifically, the relevant parameters of the power system include: 1) Number of power grid nodes (B) and active power load at each node Shedding load penalty factor System load damping coefficient The system allows for a maximum frequency change rate. The maximum permissible frequency deviation of the system Maximum permissible frequency deviation in quasi-steady state of the system ; 2) Number of AC power grid lines Line start and end node numbers, maximum allowable transmission capacity matrix L, and maximum energy storage power connected to nodes. Maximum energy storage capacity of nodes ; 3) Node number of the thermal power unit, and upper and lower limits of its technical output. and Maximum climbing power and Minimum start-up time of thermal power units Minimum downtime Thermal power operating cost coefficient Inertial time constant of thermal power units ; Primary frequency regulation power gain coefficient of thermal power units ; 4) Node numbers of wind and solar power units, and power output of wind and solar power units. , Wind and solar curtailment penalty coefficient , Virtual primary frequency regulation power gain coefficient of wind turbine Virtual inertial time constant of wind turbine ; 5) Energy storage life cycle Discount rate Energy storage unit capacity investment cost Energy storage unit power investment cost Maximum charge and discharge power of energy storage , Energy storage charging and discharging efficiency , ; Energy storage virtual primary frequency regulation power gain coefficient Virtual inertial time constant for energy storage .

[0018] Subsequently, a two-layer energy storage optimization configuration model was established, comprising a planning layer model and an operation layer model. The essence of modeling is to determine the optimization objective, constraints, and decision-making objects.

[0019] The planning layer model aims to minimize the overall cost by deciding on energy storage configuration schemes for the power and capacity of each node in the power grid. The overall cost includes energy storage configuration costs, system operation costs, and the cost of insufficient system peak shaving. The planning layer model is described in detail below.

[0020] Specifically, the optimization objective of the planning layer model can be as follows: (1); In the formula, For overall cost, Cost of configuring energy storage; , To cover system operating costs and the risk of insufficient peak shaving, , It needs to be calculated by calling the runtime model.

[0021] Energy storage configuration cost It can be calculated using the following formula: (2); In the formula, the subscript j represents the index of the node, and B is the number of nodes in the power grid. , Configuration cost per unit energy storage capacity, configuration cost per unit energy storage power. , The energy storage capacity and energy storage power configured for the j-th node, r is the energy storage discount rate; Y is the lifespan of the energy storage device.

[0022] In one embodiment, the planning layer model is further provided with constraints, including upper and lower limits for energy storage capacity and upper and lower limits for energy storage power at each node, which can be specifically expressed as follows: (3); (4); In the formula, , The maximum configured energy storage capacity and maximum configured energy storage power of the j-th node.

[0023] The operation layer model aims to minimize system operating costs and the risk cost of insufficient peak shaving in the system by determining the optimal operation scheme for the selected energy storage configuration. The operation layer model is described in detail below.

[0024] Specifically, the optimization objective of the runtime model can be expressed as: (5); In the formula, The sum of system operating costs and the risk costs of insufficient system peak shaving. , These are the system operating costs and the costs associated with insufficient peak shaving.

[0025] System operating costs The calculation formula is: (6); (7); (8); (9); (10); In the formula, , , , These are the costs of curtailing solar power, wind power, thermal power unit generation, and load shedding. , , , These are the curtailment penalty coefficient, wind curtailment penalty coefficient, thermal power unit power generation cost coefficient, and load shedding penalty coefficient, respectively. , , B represents the number of photovoltaic units, wind turbine units, thermal power units, and grid nodes, respectively. Let be the maximum output power of the j-th photovoltaic unit during time period t; Let j be the maximum output power of the j-th wind turbine during time period t; , , , These represent the actual output power of the j-th photovoltaic unit, the actual output power of the j-th wind turbine, the output power of the j-th thermal power unit, and the load shedding power of the j-th node, respectively, with H being the number of scheduling moments within the scheduling cycle.

[0026] The power grid's peak-shaving capacity includes both upward and downward peak-shaving capacity. This upward and downward peak-shaving capacity is provided by thermal power units and energy storage. Insufficient peak-shaving capacity carries risks and costs. The calculation formula is: (11); In the formula, , These are the conditional value of risk for insufficient upward peak shaving and the conditional value of risk for insufficient downward peak shaving, respectively.

[0027] This invention employs conditional value at risk (CVaR) theory to quantify the risk arising from insufficient upward and downward peak-shaving capabilities. CVaR evaluates the probability and magnitude of system losses, thus overcoming the shortcomings of value at risk (VaR) theory, such as its inability to reflect "tail risk" and its failure to satisfy subadditivity. This ensures that the optimization results do not drastically change due to slight perturbations in the simulated scenario, resulting in more accurate and stable solutions.

[0028] Quantifying the conditional value at risk of insufficient upscaling using CVaR Conditional Value at Risk (VaR) and Insufficient Downshaving The specific calculation formula is as follows: (12); (13); In the formula, , Conditional value of risk for insufficient upward peak shaving and conditional value of risk for insufficient downward peak shaving; , These are auxiliary decision variables for insufficient upward peak adjustment and insufficient downward peak adjustment in time period t, belonging to the decision variables of the operational layer model. , This represents the system's upward and downward peak-shaving demand during time period t; , These represent the upward and downward peak shaving capabilities that the system can provide at time interval t, respectively. This indicates insufficient peak-shaving power deficit; This indicates insufficient downward peak shaving and power deficit. The confidence level.

[0029] Among them, the upward peak shaving capability that the system can provide in time period t With downward peak-shaving capability This can be determined by establishing a system peak-shaving capacity supply model, specifically: (14); (15); In the formula, This represents the number of thermal power units. The number of energy storage devices configured. , These represent the upward peak shaving capacity that the i-th thermal power unit and the j-th energy storage device can provide during time period t, respectively. , These represent the downward peak shaving capacity that the i-th thermal power unit and the j-th energy storage device can provide during time period t.

[0030] The peak-shaving capacity provided by thermal power units is constrained by the unit's ramp-up capability and the difference between the current output and the unit's upper and lower output limits; the peak-shaving capacity provided by energy storage is limited by its charging and discharging power limits and the maximum / minimum energy storage capacity; the expressions for the peak-shaving capacity provided by thermal power units and energy storage in time period t are as follows: (16); (17); In the formula, The scheduling time interval is typically 1 hour. , Let be the upward and downward ramp rates of the i-th thermal power unit during time period t; Let be the active power output of the i-th thermal power unit at time t; , These are the upper and lower limits of the output of the i-th thermal power unit; , Let be the charging and discharging power of the j-th energy storage device at time t; , Let these be the upper and lower limits of the energy storage capacity of the j-th energy storage device; , This represents the upper limit of the charging and discharging power of the j-th energy storage device; , The charging and discharging efficiency of energy storage.

[0031] A system peak-shaving demand model can be established using the annual net load curve to determine the system's upward and downward peak-shaving demands during time period t. , : (18) (19) In the formula: The net load power during time period t; The load power during time period t; Let t be the wind power output during time period t; Let t be the photovoltaic output power during time period t; This represents the upward and downward peak-shaving demand for time period t. When, it means that the system has an upward peak adjustment demand in time period t; When, it means that the system has a downward peak-shaving demand in time period t.

[0032] In one embodiment, the operation layer model is further provided with constraints, including: power balance constraints, DC power flow constraints, thermal power unit operation constraints, new energy output constraints, and energy storage operation constraints.

[0033] (1) Power balance constraint: (20); In the formula, , , , B represents the number of photovoltaic units, wind turbine units, thermal power units, the number of configured energy storage devices, and the number of grid nodes, respectively. , , , , , and , respectively, represent the actual output power of the j-th photovoltaic unit, the actual output power of the j-th wind turbine, the output power of the j-th thermal power unit, and the load shedding power of the j-th grid node during time period t. , These are the energy storage charging power and energy storage discharging power of the j-th energy storage device, respectively.

[0034] (2) DC power flow constraint: (twenty one); In the formula, , , , , These represent the power transfer distribution factors of the nodes where photovoltaic units, wind turbines, thermal power units, energy storage, and loads are located, respectively; L is the upper limit matrix of the maximum allowable transmission capacity of the line.

[0035] (3) Operating constraints of thermal power units: (twenty two); (twenty three); (twenty four); In the formula, , Let be the upper and lower limits of the output of the j-th thermal power unit. A Boolean variable representing the start-up and shutdown status of the j-th thermal power unit during time period t: "1" indicates start-up, "0" indicates shutdown; , These represent the maximum upward and downward climbing power of the thermal power unit. A Boolean variable to indicate whether the j-th thermal power unit is shut down in time period t: "0" represents that it is not shut down in time period t, and "1" represents that it is shut down in time period t; A Boolean variable to indicate whether the j-th thermal power unit is turned on during time period t: "0" represents not being turned on during time period t, and "1" represents being turned on during time period t. , These are the minimum start-up time and minimum shutdown time for thermal power units.

[0036] (4) Constraints on new energy output: (25); In the formula, , Let represent the maximum output of the j-th photovoltaic unit and the maximum output of the j-th wind turbine unit during time period t, respectively.

[0037] (5) Energy storage operation constraints: (26); (27); (28); (29); (30); In the formula, , This is a binary variable. A value of 1 indicates that the energy storage is charging or discharging; a value of 0 indicates that the mobile energy storage is not charging or discharging.

[0038] (5) Frequency security constraints.

[0039] In one embodiment, in order to ensure the frequency security of the system after receiving a disturbance, additional frequency security constraints are set.

[0040] Specifically, when the system experiences power disturbances, in order to ensure its frequency safety, this embodiment introduces three indicators: frequency change rate, frequency minimum point, and quasi-steady-state frequency. Based on these three indicators, frequency safety constraints for the power system with energy storage participation are constructed.

[0041] Energy storage devices can provide virtual inertia and primary frequency response reserve capacity when participating in grid frequency regulation. Assume the power system at time... Subject to active power disturbance The change of the system frequency deviation over time after the disturbance can be described by the following equation: (31); In the formula, Let be the primary frequency regulation response power of the i-th thermal power unit; Let the virtual primary frequency regulation power gain coefficient be the j-th wind turbine unit; This refers to the system frequency deviation. Let be the virtual primary frequency regulation power gain coefficient for the k-th energy storage device; A Boolean variable representing the start-up and shutdown status of the i-th thermal power unit during time period t: "1" indicates that the unit is on, and "0" indicates that the unit is off. Let be the inertial time constant of the i-th thermal power unit; , Let be the virtual inertial time constant of the j-th wind turbine and the k-th energy storage device; The system frequency change rate; This represents the system load damping coefficient.

[0042] At this time, the rate of change of the system's frequency reaches its maximum value. The primary frequency response power of the system is 0. Relying solely on the inertial response of thermal power units and the virtual inertial response of wind power units and energy storage to provide power support will , Substituting into equation (31), the maximum achievable frequency change rate of the system can be calculated. This maximum achievable frequency change rate must be less than the maximum allowable frequency change rate of the system. Therefore, frequency security constraints include frequency change rate constraints, which can be specifically expressed as: (32); In the formula, This represents the maximum allowable rate of frequency change for the system.

[0043] When the system's primary frequency modulation response enters a quasi-steady state... When the system frequency deviation tends to stabilize, the system frequency change rate... The achievable quasi-steady-state frequency deviation of the system must be less than the maximum permissible quasi-steady-state frequency deviation. Therefore, frequency security constraints include quasi-steady-state frequency constraints, which can be specifically expressed as: (33); In the formula, Let be the primary frequency regulation power gain coefficient of the i-th thermal power unit, when hour, , This represents the maximum permissible quasi-steady-state frequency deviation of the system.

[0044] Assume the maximum permissible frequency deviation of the system is ,like When the system frequency drops to the minimum allowable value, there is: , Substituting into equation (31), we can obtain the safety constraint at the lowest point of system frequency: (34); In the formula, The primary frequency regulation response power of the thermal power unit when the system frequency drops to the minimum allowable value can be approximated by the linearized frequency deviation method, as shown in equation (35).

[0045] (35); (36); In the formula, Let be the response time constant of the thermal power unit speed governor. To represent the i-th thermal power unit in A Boolean variable indicating the start / stop status at any given time. The system's equivalent inertial time constant.

[0046] The above completes the construction of the dual-layer energy storage optimal configuration model.

[0047] S2. A metaheuristic optimization algorithm is used to solve the planning layer model. The position of each individual in the metaheuristic optimization algorithm represents an energy storage configuration scheme. In each iteration of the metaheuristic optimization algorithm, the energy storage configuration scheme currently represented by each individual is used as the boundary condition input to the operation layer model to obtain the optimal operation scheme under the energy storage configuration scheme and calculate the corresponding minimum energy storage configuration cost and system peak shaving insufficiency risk cost. The comprehensive cost of the energy storage configuration scheme is obtained and used as the fitness of the corresponding individual. Based on the fitness of each individual, the position is updated and the next iteration is entered. After the iteration is completed, the optimal energy storage configuration scheme is output.

[0048] Specifically, the metaheuristic optimization algorithm can be selected from any one of the gray wolf optimization algorithm, genetic algorithm, and particle swarm optimization algorithm.

[0049] In this embodiment, the Grey Wolf optimization algorithm is preferred. Figure 2 This is a flowchart of the gray wolf optimization algorithm in one embodiment of the present invention.

[0050] Specifically, the Grey Wolf Optimization Algorithm is used to solve the planning layer model, obtaining the energy storage power and capacity configuration schemes for each node of the power grid, which are then input into the operation layer model as boundary conditions. Each Grey Wolf represents an energy storage configuration scheme. The Grey Wolf Optimization Algorithm iteratively updates the Grey Wolf positions and outputs the optimal energy storage configuration scheme after each iteration. In each iteration, after updating the Grey Wolf positions, the fitness of each Grey Wolf needs to be calculated using the operation layer model. The fitness function of each Grey Wolf is the comprehensive cost function of the planning layer model. The operation layer model is a MILP model, which can be solved using the commercial solver GUROBI on the MATLAB platform. This yields the system operating cost and peak-shaving risk cost under a specific energy storage configuration scheme, which are then fed back into the planning layer model for iterative solution.

[0051] The Gray Wolf Optimization Algorithm is a hierarchical algorithm related to the population, which is divided into four levels: α wolves, β wolves, δ wolves, and ω wolves. α wolves are the highest-level leaders, the most intelligent and decisive individuals in the pack, primarily responsible for making decisions regarding group activities. Following them are β wolves, in the second tier of the hierarchy, who assist α wolves in making decisions, communicate these decisions to the pack, and provide feedback on the pack members' execution. When an α wolf is no longer suitable as a leader, the best individual among the β wolves will replace it, becoming the new leader—a process that reflects the iterative renewal of the alpha wolf. The third tier of the hierarchy is the δ wolf pack, composed of guard wolves, scout wolves, and wolves with rich hunting experience, responsible for executing specific tasks. At the bottom are ω wolves, who belong to other tiers of the pack. Although their role may seem smaller, they play a crucial role in maintaining the balance within the pack, preventing chaos caused by internal strife.

[0052] The hunting process of a wolf pack, i.e., the solution process of the gray wolf algorithm, is generally divided into multiple stages. Tracking the prey under the leadership of the alpha wolf is the core of the hunt, while subsequent encirclement, attack, and search behaviors further demonstrate the organization and characteristics of the hunting process based on predetermined parameters. The solution process of the gray wolf algorithm is as follows: First, let the wolf pack size be N, typically between 30 and 50. The individual gray wolves are then searched for optimal positions in a d-dimensional space. The location of an individual gray wolf can be determined using... Let ω represent different energy storage configurations, with different locations indicating different locations. The three wolves with the best adaptability are labeled as follows: the optimal solution α wolf, the second optimal solution β wolf, and the third optimal solution δ wolf. As the alpha wolf, they possess the strongest prey-finding ability and dominate the entire optimization process. The remaining ω wolves then follow α, β, and δ wolves to search for prey, ensuring the pack's hunting proceeds smoothly. When prey is successfully found, it indicates that the optimization process has reached the global optimum.

[0053] Then, led by the alpha wolf, the gray wolf pack approaches and surrounds the prey (the optimal solution) to hunt it. The expression is as follows: (37); (38); (39); (40); (41); In the formula, Indicates the distance between the prey and each individual gray wolf; The movement coefficient of the prey; The vector representing the direction of movement of the prey; This indicates the position of the individual gray wolf in the s-th iteration; For the wolf pack search coefficient vector: when At that time, the gray wolf population searches for a local optimum within a narrowed search area; when At that time, the gray wolf population searches for the global optimum within a larger search area; The convergence factor decreases linearly to 0 as the number of algorithm iterations increases; , The variable is a random number in the range [0,1]; s is the current iteration number. This represents the maximum number of iterations.

[0054] During the optimization process, the positions of alpha, β, and δ wolves are recorded at the end of each iteration. These three alpha wolves, with optimal adaptability, guide the other individuals in the pack towards the target through their positions. Individual gray wolves update their positions based on the positions of alpha, β, and δ wolves as they approach the prey, thus achieving overall group optimization. The position update expression is shown below: (42); (43); (44); In the formula, , , Let represent the distances between α, β, and δ wolves and other individual gray wolves, respectively. , , Indicates the current positions of α, β, and δ wolves; , , Let be a random vector representing the influence of the gray wolf's position on its prey; This indicates the current position of the individual gray wolf.

[0055] During the hunt, the alpha, β, and δ alpha wolves first analyze and judge the approximate location of the prey. The other members of the wolf pack, guided by the optimal alpha, β, and δ wolves, gradually approach the prey and update their positions around the prey randomly with each iteration.

[0056] When the gray wolf confirms that the prey is no longer moving, the algorithm enters the attack phase, at which point the parameters... The value of d ... And so it changes. The value is in the interval Internal fluctuations, continuous iteration to obtain the optimal solution.

[0057] In the gray wolf optimization algorithm, the convergence factor The selection of the convergence factor has a significant impact on the algorithm's local and global search capabilities. However, due to the complexity of the Grey Wolf algorithm's optimization search process, using a linear adjustment of the convergence factor often leads to a decrease in the algorithm's solution efficiency. Therefore, this embodiment introduces a nonlinear convergence factor, which can effectively improve the algorithm's solution efficiency. The following mathematical expression is used: (45).

[0058] Set a maximum number of iterations, and end the iteration after reaching the maximum number of iterations. Use the location of the optimal individual as the final energy storage configuration scheme.

[0059] Overall, this invention proposes an energy storage optimization configuration method that considers grid peak-shaving risks. By constructing a two-layer optimization model, it comprehensively evaluates the effect of energy storage systems on improving grid peak-shaving capacity and quantifies the risks caused by insufficient peak-shaving capacity. Specifically, it collects the economic and technical parameters of various grid components and constructs a two-layer energy storage optimization configuration model. The optimization objective incorporates a grid peak-shaving risk assessment index, quantifying the tail risk caused by insufficient peak-shaving capacity based on conditional value-at-risk theory. Furthermore, it constructs grid frequency security constraints involving energy storage, characterizing the supporting effectiveness of the energy storage system in maintaining grid frequency security. An optimization algorithm is used to solve the planning layer model to determine the energy storage power and capacity configuration scheme, which serves as the boundary condition input to the operation layer model. A commercial solver is used to solve the operation layer model, obtaining the system operating cost and the cost of insufficient peak-shaving risk, which are then fed back to the planning layer model. Through iterative solutions at the planning and operation layers, the optimal energy storage configuration scheme is finally obtained, achieving economical and efficient configuration of the energy storage system and significantly improving the grid's peak-shaving capacity and operational reliability.

[0060] Example 2 The present invention also relates to an energy storage optimization configuration system that takes into account the risk of grid peak shaving, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the method described above.

[0061] This energy storage optimization configuration system, which considers grid peak-shaving risks, can be installed in computing devices such as desktop computers, laptops, handheld computers, and cloud servers. The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The memory can be used to store computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and by accessing data stored in the memory.

[0062] Example 3 The present invention also relates to a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.

[0063] Specifically, the memory may include high-speed random access memory, as well as non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart media cards (SMC), secure digital (SD) cards, flash cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.

[0064] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. It should be noted that the terms "in one embodiment," "for example," and "again" are intended to illustrate the present invention and are not intended to limit the present invention.

[0065] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention.

Claims

1. A method for optimizing configuration of energy storage considering risks of grid peak shaving, characterized in that, include: A two-layer energy storage optimization configuration model is constructed, comprising a planning layer model and an operation layer model. The planning layer model aims to minimize the overall cost by deciding on the energy storage configuration schemes for each node of the power grid, considering the energy storage power and capacity. The overall cost includes energy storage configuration cost, system operation cost, and system peak shaving insufficiency risk cost. The operation layer model aims to minimize the system operation cost and system peak shaving insufficiency risk cost by deciding on the optimal operation scheme under the selected energy storage configuration scheme. The system peak shaving insufficiency risk cost includes the conditional risk value of insufficient upward peak shaving and insufficient downward peak shaving, quantified using conditional value of risk theory. The planning layer model is solved using a metaheuristic optimization algorithm. In the metaheuristic optimization algorithm, the position of each individual represents an energy storage configuration scheme. In each iteration of the metaheuristic optimization algorithm, the energy storage configuration scheme currently represented by each individual is used as a boundary condition input to the operation layer model to obtain the optimal operation scheme under the energy storage configuration scheme and calculate the corresponding minimum energy storage configuration cost and system peak shaving insufficiency risk cost. The comprehensive cost of the energy storage configuration scheme is obtained and used as the fitness of the corresponding individual. Based on the fitness of each individual, the position is updated and the next iteration is entered. After the iteration is completed, the optimal energy storage configuration scheme is output. 2.The method of claim 1, wherein, The formulas for quantifying the conditional value at risk (VaR) for insufficient upward peak shaving and insufficient downward peak shaving using the conditional VaR theory are as follows: ; ; In the formula, , The conditional value of risk for insufficient upward peak adjustment and insufficient downward peak adjustment in time period t; , For time period t, there are auxiliary decision variables for insufficient upward peak adjustment and insufficient downward peak adjustment. , This represents the system's upward and downward peak-shaving demand during time period t; , These represent the system's upward and downward peak-shaving capabilities at time interval t, respectively. This indicates insufficient peak-shaving power deficit; This indicates insufficient downward peak shaving and power deficit. The confidence level. 3.The method of claim 1, wherein, The optimization objective of the planning layer model is: ; In the formula, is the comprehensive cost, is the energy storage configuration cost; , is the system operation cost and the risk cost of insufficient peak shaving; The optimization objective of the runtime model is: ; ; In the formula, The sum of system operating costs and the risk costs of insufficient system peak shaving. , These are the system operating costs and the costs associated with insufficient peak shaving. , , , These are respectively the costs of curtailing solar power, curtailing wind power, generating costs of thermal power units, and load shedding costs. 4.The method of claim 1, wherein, The planning layer model has constraints, specifically including upper and lower limits for energy storage capacity and upper and lower limits for energy storage power at each node. 5.The method of claim 1, wherein, The operational layer model has constraints, specifically including power balance constraints, DC power flow constraints, thermal power unit operation constraints, new energy output constraints, and energy storage operation constraints. 6.The method of claim 5, wherein, The constraints of the runtime model also include frequency security constraints, which include: Frequency change rate constraint: ; Quasi-steady-state frequency constraints: ; Safety constraints at the lowest frequency point: ; ; ; In the formula, The active power disturbance received by the system. , , These are the number of wind turbine units, the number of thermal power units, and the number of energy storage devices configured. A Boolean variable representing the start-up and shutdown status of the i-th thermal power unit during time period t: 1 indicates start-up, 0 indicates shutdown. , , These are the power transfer distribution factors for the j-th wind turbine, the ith thermal power unit, and the k-th energy storage device, respectively. The maximum allowable rate of frequency change of the system. This represents the primary frequency regulation power gain coefficient of the i-th thermal power unit. Let j be the virtual primary frequency regulation power gain coefficient of the j-th wind turbine. Let be the virtual primary frequency regulation power gain coefficient for the k-th energy storage device. This represents the maximum permissible quasi-steady-state frequency deviation of the system. This refers to the primary frequency regulation response power of the thermal power unit when the system frequency drops to the minimum allowable value. The moment when the system frequency drops to the minimum permissible value. This is the maximum permissible frequency deviation value of the system. The system load damping coefficient is... Let be the response time constant of the speed governor of the i-th thermal power unit. The system's equivalent inertial time constant. 7.The method of claim 1, wherein, The metaheuristic optimization algorithm is selected from the Grey Wolf Algorithm, Genetic Algorithm, and Particle Swarm Optimization Algorithm. 8.The method of claim 1, wherein, The metaheuristic optimization algorithm is the Grey Wolf Optimization Algorithm. The position of each Grey Wolf represents an energy storage configuration scheme. In each iteration of the Grey Wolf Optimization Algorithm, the energy storage configuration scheme currently represented by each Grey Wolf is used as a boundary condition input to the operating layer model to obtain the optimal operating scheme under that energy storage configuration scheme and calculate the corresponding minimum energy storage configuration cost and system peak shaving insufficiency risk cost. The comprehensive cost of the energy storage configuration scheme is obtained and used as the fitness of the corresponding Grey Wolf. Based on the fitness of each Grey Wolf, non-dominated sorting, leader selection, and position update are performed before entering the next iteration. After the iteration ends, the optimal energy storage configuration scheme is output. The formula for updating the alpha wolf's position is as follows: ; ; ; ; ; In the formula, Indicates the distance between the prey and the individual gray wolf; The movement coefficient of the prey; The vector representing the direction of movement of the prey; This represents the position of the individual gray wolf in the t-th iteration; For the wolf pack search coefficient vector: when At that time, the gray wolf population searches for a local optimum within a narrowed search area; when At that time, the gray wolf population searches for the global optimum within a larger search area; The convergence factor decreases linearly to 0 as the number of algorithm iterations increases; , The variable is a random number in the range [0,1]; s is the current iteration number. This represents the maximum number of iterations.

9. An energy storage optimal configuration system considering grid peak shaving risk, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps in the energy storage optimization configuration method considering grid peak-shaving risk as described in any one of claims 1 to 8.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program, which is executed by a processor, implements the steps of the method for optimizing configuration of energy storage considering risks of grid peak shaving according to any one of claims 1 to 8.