Energy storage optimization configuration method for power flexibility supply and demand balance in extreme weather

By establishing a collection of wind and light output scenarios in extreme weather and a balance model of power flexibility supply and demand in power systems, the insufficient energy storage configuration of the power system in extreme weather is solved, more efficient power scheduling and energy storage optimization are achieved, and the stability and economics of the system are improved.

CN120109858APending Publication Date: 2025-06-06GUIZHOU POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411854394.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The existing power system energy storage configuration technology is not representative in the construction of wind and light output scenarios under extreme weather, the quantitative model of power flexibility supply and demand balance is unclear, and the energy storage optimization configuration model fails to fully consider the impact of extreme weather, making it difficult to achieve the expected optimization effect in actual applications.

Method used

By establishing a collection of wind and light output scenarios in extreme weather based on historical scenery output and meteorological data, defining power flexibility supply and demand balance, establishing a quantitative model of supply and load-side flexibility, and establishing a system power supply and demand flexibility evaluation index system, as well as an energy storage double-layer optimization configuration model that considers the power flexibility supply and demand balance in extreme weather.

Benefits of technology

The system's regulation capability and response speed in extreme weather has been improved, the safety and stability of power supply has been ensured, the energy storage configuration and power scheduling strategies have been optimized, and the overall benefits of the system have been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120109858A_ABST
    Figure CN120109858A_ABST
Patent Text Reader

Abstract

The invention discloses an energy storage optimization configuration method for power flexibility supply and demand balance in extreme weather, and relates to the technical field of power system energy storage optimization configuration, comprising the following steps: establishing a wind and light output scene set in extreme weather according to historical wind and light output and meteorological data; defining power flexibility supply-demand balance, and establishing a supply aspect and load side flexibility quantification model; and establishing a system power supply and demand flexibility evaluation index system, and establishing an energy storage double-layer optimization configuration model considering power flexibility supply and demand balance under extreme weather. According to the method, a basis is provided for subsequent power flexibility adjustment and energy storage optimization, the pre-judgment capability and adaptability of the system are improved, a necessary decision basis is provided for intelligent power grid dispatching and power market transaction, the adjustment capability and response speed of the system are effectively improved, the safety and stability of power supply are guaranteed, and the method is suitable for popularization and application. The energy storage configuration and the power dispatching strategy are optimized, and the comprehensive benefits of the system are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power system energy storage optimization configuration, and specifically to an energy storage optimization configuration method for balancing power supply and demand flexibility under extreme weather conditions. Background Art

[0002] With the global emphasis on the use of renewable energy, wind power and photovoltaic power generation have become important forms of green energy, especially in electricity supply, accounting for an increasingly large proportion. However, due to the intermittent, volatile and seasonal nature of wind and photovoltaic power generation, how to ensure the stability and flexibility of the power system has become a major challenge in the energy field. In recent years, with the development of energy storage technology, especially the application of battery energy storage systems (BESS) and pumped storage technology, it has been widely used to regulate the supply and demand balance of the power grid. At the same time, the refined application of meteorological data and the development of big data analysis technology have continuously improved the prediction accuracy of wind and solar power generation, which in turn has promoted research on power flexibility and system balance regulation capabilities.

[0003] However, most current studies focus on conventional weather conditions and fail to fully consider the impact of extreme meteorological conditions on wind and solar output. Existing technologies still have many shortcomings. When constructing wind and solar output scenarios under extreme weather conditions, existing studies often fail to fully consider the relationship between historical meteorological data and actual output, resulting in low accuracy of scenario sets. When defining the balance of power flexibility supply and demand, existing technologies lack in-depth research on the quantitative models of supply-side and load-side flexibility, which limits the regulation capacity of power systems under extreme weather. Existing studies have not yet established a complete system power supply and demand flexibility evaluation index system, as well as a two-layer optimization configuration model for energy storage that considers the balance of power flexibility supply and demand under extreme weather conditions, resulting in difficulty in achieving the expected optimization effect in practical applications. Summary of the invention

[0004] In view of the above-mentioned problems, the present invention is proposed.

[0005] Therefore, the technical problems solved by the present invention are: the existing power system energy storage configuration technology has insufficient representativeness in constructing a set of wind and solar output scenarios under extreme weather conditions, the quantitative model of power flexibility supply and demand balance is unclear, the energy storage optimization configuration model fails to fully consider the impact of extreme weather, and how to achieve efficient energy storage optimization configuration for power flexibility supply and demand balance under extreme weather conditions.

[0006] To solve the above technical problems, the present invention provides the following technical solutions: a method for optimizing the configuration of energy storage for flexible supply and demand of electricity under extreme weather conditions, comprising establishing a set of wind and solar output scenarios under extreme weather conditions based on historical wind and solar output and meteorological data; defining the balance of flexible supply and demand of electricity, and establishing a quantitative model of supply-side and load-side flexibility; establishing a system power supply and demand flexibility evaluation index system, and establishing a two-layer optimization configuration model for energy storage that takes into account the balance of flexible supply and demand of electricity under extreme weather conditions.

[0007] As a preferred solution of the energy storage optimization configuration method for balancing the flexible supply and demand of electricity under extreme weather conditions described in the present invention, the establishment of a set of wind and solar power output scenarios under extreme weather conditions includes preprocessing of historical wind and solar power output and meteorological data, including interpolation, dimensionality reduction, scalarization and smoothing.

[0008] Define the low output thresholds of wind power and photovoltaic power to determine whether a certain day is a low output day of wind and photovoltaic power. This includes calculating the average daily output of wind power and photovoltaic power according to the 8760-hour wind and photovoltaic output curves of historical years, taking the daily wind power and photovoltaic output as samples, and statistically analyzing the frequency distribution f(P w ), f(P v ), according to the frequency distribution, cubic spline interpolation is used, and the negative values ​​that may be included after interpolation are set to zero, and the empirical probability distribution PDF (P w )、PDF(P v ) and calculate the cumulative probability distribution CDF (P w )、CDF(P v ), select CDF(P w ) and CDF(P v ) is equal to 0.2, take the corresponding P w and P v The values ​​are used as the low output thresholds of wind power and photovoltaic power, respectively denoted as P w,low and P v,low .

[0009] As a preferred scheme of the energy storage optimization configuration method for balancing the flexible supply and demand of electricity under extreme weather conditions described in the present invention, the establishment of a set of wind and solar output scenarios under extreme weather conditions also includes defining the conditions of extremely hot windless days and extremely cold and lightless days, and identifying extremely hot zoneless days and extremely cold and lightless days in historical data.

[0010] The date that meets condition A in the historical data is an extremely hot and windless day, and the 24-hour wind power and photovoltaic output curves of that day are included in the extremely hot and windless scenario set ψ w,low .

[0011] Condition A includes the average daily wind power output on that day being lower than the wind power low output threshold Pw,low , the maximum temperature of the day is not less than 38℃, the average wind speed of the day is level 1 or below, the weather is sunny or a little cloudy, and the photovoltaic output should not be lower than the photovoltaic low output threshold P ν,low .

[0012] The date that meets condition B in the historical data is an extremely cold and dark day, and the wind power and photovoltaic output curves of the day 241 are included in the extremely cold and dark scene set ψ ν,low .

[0013] Condition B includes the average daily output of photovoltaic power on that day being lower than the photovoltaic low output threshold P v,low , the lowest temperature of the day is not higher than 0℃, and the weather on the day is cloudy, rainy or snowy.

[0014] Extremely hot and windless scene set ψ w,low and the collection of extremely cold and lightless scenes ψ ν,low The curves in the figure are clustered by kmeans to obtain the typical wind and solar output scene sets under extremely hot and windless extreme weather conditions. Typical wind and solar output scenarios under extremely cold and dark weather conditions

[0015] As a preferred solution of the energy storage optimization configuration method for balancing the supply and demand of power flexibility under extreme weather conditions described in the present invention, wherein: the establishment of the supply-side and load-side flexibility quantitative model includes defining a flexibility quantitative model of a thermal power unit, and the thermal power unit includes an upward flexibility supply and a downward flexibility supply, which is expressed as:

[0016]

[0017] in, Provide flexibility for thermal power units to increase their capacity. is the downward flexibility supply of thermal power units, τ represents the dispatch time scale, is the maximum output of the thermal power unit, is the minimum output of the thermal power unit, is the upward climbing rate of the thermal power unit, is the downward climbing rate of the thermal power unit, P T (t) is the actual output active power of the thermal power unit during the period t.

[0018] The flexibility quantitative model of hydropower units is defined. The hydropower units include upward flexibility supply and downward flexibility supply, which can be expressed as:

[0019]

[0020] in, Provide flexibility for the upward adjustment of hydropower units. Provide flexibility for hydropower units to adjust downward. is the maximum output of the hydroelectric unit, is the minimum output of the hydropower unit, is the upward climbing rate of the hydropower unit, is the downward climbing rate, P H (t) is the actual output active power of the hydropower unit during the period t.

[0021] Define the flexibility quantification model of energy storage. Energy storage includes upward flexibility supply and downward flexibility supply, which can be expressed as:

[0022]

[0023] in, Provides flexibility for energy storage. Provides flexibility for energy storage downtime. is the rated charging power of the energy storage, is the rated discharge power of the energy storage, E ESS is the rated capacity of the energy storage, is the maximum state of charge of the energy storage, is the minimum state of charge of the energy storage, SOC(t) is the state of charge of the energy storage in the t period, is the charging efficiency of energy storage, is the discharge efficiency of energy storage.

[0024] As a preferred solution of the energy storage optimization configuration method for balancing the supply and demand of power flexibility under extreme weather conditions described in the present invention, wherein: the establishment of the supply-side and load-side flexibility quantitative models also includes defining a load flexibility quantitative model, and the load includes an upward flexibility demand and a downward flexibility demand, which is expressed as:

[0025]

[0026] in, To meet the demand for load flexibility, is the load down-regulation flexibility requirement, P M is the net load of the system, P load is the actual load of the system, P u is the wind power output of the system, P v The photovoltaic output of the system.

[0027] As a preferred solution of the energy storage optimization configuration method for balancing the supply and demand of power flexibility under extreme weather conditions described in the present invention, the establishment of a system power supply and demand flexibility evaluation index system includes calculating a system flexibility margin index, which is used to characterize the upward and downward flexibility margins that the system can provide within a certain period of time. The system flexibility margin index is equal to the difference between the system flexibility supply and the flexibility demand within a certain period of time. The larger the flexibility margin, the higher the system flexibility, which is expressed as:

[0028]

[0029] in, is the upward flexibility margin of the system in period t, is the downward flexibility margin of the system in period t;

[0030] The probability index of insufficient system flexibility is calculated to characterize the probability of insufficient system flexibility. The probability index of insufficient system flexibility is equal to the ratio of the number of time periods in which the system has insufficient flexibility to the total number of time periods within the scheduling cycle, expressed as:

[0031]

[0032] Among them, f uE is the comprehensive probability of insufficient system flexibility, The probability of insufficient upward flexibility of the system, is the probability of insufficient downward flexibility of the system, is the number of periods in which the system has insufficient upward flexibility during the scheduling cycle, N is the number of periods in which the system has insufficient downward flexibility during the scheduling period. T is the total number of time periods in the scheduling cycle, ζ up is the weight coefficient of insufficient upward flexibility, ζ dowπ is the weight coefficient for insufficient downward flexibility.

[0033] As a preferred scheme of the energy storage optimization configuration method for balancing the flexible supply and demand of electricity under extreme weather conditions described in the present invention, the two-layer optimization configuration model for energy storage that considers the flexible supply and demand of electricity under extreme weather conditions includes taking the minimization of the annual comprehensive operating cost of the system as the goal, and the capacity and power of the energy storage equipment as the decision variables, to establish the objective function and constraints of the upper-level planning model.

[0034] The objective function of the upper-level planning model includes minimizing the system's annual comprehensive operating cost. The system's annual comprehensive operating cost includes system operating cost, annual investment cost of energy storage, energy storage operation and maintenance cost, and penalty cost for insufficient flexibility, which can be expressed as:

[0035]

[0036] Among them, F l is the upper objective function, C ws is the system operating cost, is the annual investment cost of energy storage, is the energy storage operation and maintenance cost, C FI Penalize costs for lack of flexibility.

[0037] Calculate system operating cost C sys , expressed as:

[0038]

[0039] in, is the coal consumption cost of thermal power, is the start-up and shutdown cost of thermal power, The environmental cost of thermal power generation is additional. For the operation and maintenance costs of thermal power, The operation and maintenance costs of hydropower.

[0040] Calculate the annual investment cost of energy storage It is expressed as:

[0041]

[0042] Among them, N ESS is the number of energy storage devices, is the fixed investment cost of energy storage equipment, c g is the cost per unit capacity of energy storage equipment, c p is the unit power cost of energy storage equipment, σ CRF is the annual capital recovery rate, R is the discount rate, and Y is the useful life of the energy storage equipment.

[0043] Calculating Energy Storage Operation and Maintenance Costs It is expressed as:

[0044]

[0045] Among them, μ OM is the operation and maintenance cost coefficient.

[0046] Calculate the penalty cost of insufficient flexibility C FL , expressed as:

[0047]

[0048] in, For the system upward flexibility shortage, The system's downward flexibility is insufficient. Penalize the system for insufficient upward flexibility. N is the penalty cost for insufficient downward flexibility of the system,typicel The number of typical days.

[0049] The constraints of the upper-level planning model include energy storage investment capacity constraints, energy storage investment cost constraints, and power balance constraints, which can be expressed as:

[0050]

[0051] Among them, E ESS,max is the maximum capacity of energy storage investment. It is the maximum annual investment and construction cost of energy storage.

[0052] The daily operation simulation is carried out on the established set of typical extreme weather days of extremely hot and windless weather and extremely cold and lightless weather. The flexibility index of power supply and demand and the optimization of economy of the system under multiple types of extreme weather scenarios are taken as the goal. The output of each unit in the system and the charging and discharging status of energy storage are taken as decision variables, and the objective function and constraint conditions of the lower-level typical day optimization operation model are established.

[0053] The objective function of the lower typical day optimization operation model includes the optimization of the system power supply and demand flexibility index and economic efficiency under multiple types of extreme weather scenarios, including maximizing the power supply and demand flexibility index of extreme weather typical days and minimizing the operation cost of extreme weather typical days, which is expressed as:

[0054]

[0055] Among them, N Dpical is the number of typical days, is the operating cost in the nth typical day, ω 1 is the weight coefficient of the power supply and demand flexibility index, ω 2 is the weight coefficient of typical daily operating cost, ξ l , 2 and 3 They are the flexibility margin index, the probability index of insufficient flexibility and the normalized coefficient of typical daily operating cost respectively.

[0056] The constraints of the lower-level typical day optimization operation model include upper and lower output limits of thermal power and hydropower, minimum start and shutdown time constraints of thermal power, ramp rate constraints of thermal power and hydropower, energy storage charging and discharging state constraints, energy storage charging and discharging power constraints, energy storage charge state constraints, and power balance constraints.

[0057] The upper and lower limits of thermal power and hydropower output are expressed as:

[0058]

[0059] The minimum start-stop time constraint of thermal power is expressed as:

[0060]

[0061]

[0062] Among them, u T,k (t) is the state of thermal power unit k in the tth period, with 1 and 0 indicating the running and shutdown states respectively. and are the minimum continuous operation time and shutdown time allowed for thermal power unit k respectively.

[0063] The ramp rate constraint of thermal power is expressed as:

[0064]

[0065] The ramp rate constraint of hydropower is expressed as:

[0066]

[0067] The charge and discharge state constraints of energy storage are expressed as:

[0068] u ESS,k (t)∈[-1,0,1]

[0069] Among them, u ESS,k (t) is the state of the energy storage k at the tth time period, with 1, 0 and -1 representing the charging, silent and discharging states respectively.

[0070] The charging and discharging power constraints of energy storage are expressed as:

[0071]

[0072] The state of charge constraint of energy storage is expressed as:

[0073]

[0074] The system power balance constraint is expressed as:

[0075]

[0076] The model is solved. The upper planning model is solved by the particle swarm optimization algorithm. The lower typical day optimization operation model is solved by commercial solvers such as CPLEX or Gurobi. This includes generating initial particles. The particle coordinates are the capacity and power of the energy storage device. For each particle, the lower model is called to solve according to the decision variable value. The annual comprehensive operating cost of the system is obtained as the particle fitness. The individual optimal position of each particle and the group optimal position of all particles are recorded. The speed and position of each particle are updated, which is expressed as:

[0077]

[0078] Among them, ν i (j) and X i (j) are the velocity and position of the ith particle in the jth iteration, X Pbest,i (j) is the individual optimal position of the i-th particle in the j-th iteration process, X Gbest (j) is the optimal position of the group in the jth generation process, is the inertia coefficient, c 1 and c 2 are the individual learning factor and the group learning factor, r 1 (j) and r 2 (j) are random numbers between 0 and 1 generated in the jth generation process. The speed and position of each particle are repeatedly updated until the preset convergence condition is reached or the number of iterations reaches the upper limit. Finally, the optimal solution is output as the final planning value of the capacity and power of the energy storage device.

[0079] Another object of the present invention is to provide an energy storage optimization configuration system for balancing the flexible supply and demand of electricity under extreme weather conditions. The system can establish a system power supply and demand flexibility evaluation index system, and establish a two-layer energy storage optimization configuration model that takes into account the flexible supply and demand of electricity under extreme weather conditions. This solves the problems of the current power system energy storage optimization configuration technology that lacks comprehensive consideration of extreme weather conditions and is difficult to balance flexibility and economy.

[0080] As a preferred solution of the energy storage optimization configuration system for balancing the flexible supply and demand of electricity under extreme weather conditions described in the present invention, it includes: a collection establishment module, a flexibility quantification module, and a two-layer optimization module.

[0081] The set establishment module is used to establish a set of wind and solar power output scenarios under extreme weather conditions based on historical wind and solar power output and meteorological data; the flexibility quantification module is used to define the balance of power flexibility supply and demand, and establish a supply-side and load-side flexibility quantification model; the two-layer optimization module is used to establish a system power supply and demand flexibility evaluation index system, and establish a two-layer optimization configuration model for energy storage that takes into account the power flexibility supply and demand balance under extreme weather conditions.

[0082] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of a method for optimizing energy storage configuration to balance the supply and demand of electricity flexibility under extreme weather conditions.

[0083] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for optimizing energy storage configuration to balance the supply and demand of electricity flexibility under extreme weather conditions.

[0084] Beneficial effects of the invention: The energy storage optimization configuration method for power flexibility supply and demand balance under extreme weather conditions provided by the invention establishes a set of wind and solar output scenarios under extreme weather conditions based on historical wind and solar output and meteorological data, providing a basis for subsequent power flexibility regulation and energy storage optimization, and being able to consider the impact of extreme weather on supply and demand balance in advance during system design, thereby improving the system's predictive ability and adaptability, defining power flexibility supply and demand balance, and establishing a quantitative model of supply-side and load-side flexibility, providing data support for subsequent configuration optimization of energy storage systems, and providing the necessary decision-making basis for smart grid dispatching and power market transactions, effectively improving the system's regulation capability and response speed , ensuring the security and stability of power supply, establishing a system power supply and demand flexibility evaluation index system, and establishing a two-layer energy storage optimization configuration model that considers the power flexibility supply and demand balance under extreme weather conditions. By considering the flexibility margin and the probability of insufficient flexibility, the system can identify possible supply and demand imbalance problems in advance and respond quickly, thereby avoiding the risks of insufficient flexibility in the system, improving the emergency response capability and economy of the power system in extreme meteorological events, optimizing the energy storage configuration and power dispatching strategy, and improving the overall benefits of the system. The present invention has achieved better results in power system flexibility regulation, extreme weather response capabilities, and energy storage optimization configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0086] Figure 1 An overall flow chart of a method for optimizing energy storage configuration for balancing flexible supply and demand of electricity under extreme weather conditions provided in the first embodiment of the present invention.

[0087] Figure 2 A double-layer optimization model diagram of a method for optimizing energy storage configuration for balancing flexible supply and demand of electricity under extreme weather conditions provided in the second embodiment of the present invention.

[0088] Figure 3 A workflow diagram of a method for optimizing energy storage configuration for balancing electricity flexible supply and demand under extreme weather conditions is provided for the second embodiment of the present invention.

[0089] Figure 4 An overall flow chart of an energy storage optimization configuration system for balancing electricity flexible supply and demand under extreme weather conditions provided in the third embodiment of the present invention. DETAILED DESCRIPTION

[0090] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0091] Example 1, reference Figure 1 , which is an embodiment of the present invention, provides an energy storage optimization configuration method for balancing power supply and demand flexibility under extreme weather conditions, comprising:

[0092] S1: Based on historical wind and solar power output and meteorological data, a set of wind and solar power output scenarios under extreme weather conditions is established.

[0093] Furthermore, establishing a set of wind and solar power output scenarios under extreme weather conditions includes preprocessing of historical wind and solar power output and meteorological data, including interpolation, dimensionality reduction, scalarization and smoothing.

[0094] Define the low output thresholds of wind power and photovoltaic power to determine whether a certain day is a low output day of wind and photovoltaic power. This includes calculating the average daily output of wind power and photovoltaic power according to the 8760-hour wind and photovoltaic output curves of historical years, taking the daily wind power and photovoltaic output as samples, and statistically analyzing the frequency distribution f(P w ), f(P v ), according to the frequency distribution, cubic spline interpolation is used, and the negative values ​​that may be included after interpolation are set to zero, and the empirical probability distribution PDF (P w )、PDF(P v ) and calculate the cumulative probability distribution CDF (P w )、CDF(P v ), select CDF(P w ) and CDF(P v ) is equal to 0.2, take the corresponding P w and P v The values ​​are used as the low output thresholds of wind power and photovoltaic power, respectively denoted as P w,low and P v,low .

[0095] It should be noted that establishing a set of wind and solar power output scenarios under extreme weather conditions also includes defining the conditions for extremely hot windless days and extremely cold days without light, and identifying extremely hot windless days and extremely cold days without light in historical data.

[0096] The date that meets condition A in the historical data is an extremely hot and windless day, and the 24-hour wind power and photovoltaic output curves of that day are included in the extremely hot and windless scenario set ψ w,low.

[0097] Condition A includes the average daily wind power output on that day being lower than the wind power low output threshold P w,low , the maximum temperature of the day is not less than 38℃, the average wind speed of the day is level 1 or below, the weather is sunny or a little cloudy, and the photovoltaic output should not be lower than the photovoltaic low output threshold P v,low .

[0098] The date that meets condition B in the historical data is an extremely cold and dark day, and the wind power and photovoltaic output curves of the day 241 are included in the extremely cold and dark scene set ψ v,low .

[0099] Condition B includes the average daily output of photovoltaic power on that day being lower than the photovoltaic low output threshold P v,low , the lowest temperature of the day is not higher than 0℃, and the weather on the day is cloudy, rainy or snowy.

[0100] Extremely hot and windless scene set ψ w,low and the collection of extremely cold and lightless scenes ψ v,low The curves in the figure are clustered by kmeans to obtain the typical wind and solar output scene sets under extremely hot and windless extreme weather conditions. Typical wind and solar output scenarios under extremely cold and dark weather conditions

[0101] It should also be noted that by performing a series of preprocessing operations on historical wind and solar power output data and meteorological data, such as interpolation, dimensionality reduction, standardization and smoothing, the noise and errors in the data are eliminated, and the quality and availability of the data are improved. By adopting the cubic spline interpolation method, the empirical probability distribution of wind and solar power output is established, which makes the output fluctuations of wind power and photovoltaic power in extreme weather have high accuracy, thereby providing accurate basic data for subsequent flexibility adjustment and energy storage optimization. Through forward-looking data analysis and scenario construction, a more reliable scheduling basis is provided for the power system, avoiding the risk of power shortages caused by insufficient prediction of extreme weather scenarios. The system can achieve refined management of wind and solar power output, and can still maintain efficient supply and demand balance and flexible scheduling capabilities in the face of unpredictable extreme weather.

[0102] S2: Define the balance between supply and demand of electricity flexibility and establish a quantitative model for supply-side and load-side flexibility.

[0103] Furthermore, establishing the quantitative model of supply-side and load-side flexibility includes defining the quantitative model of thermal power unit flexibility, which includes upward flexibility supply and downward flexibility supply, expressed as:

[0104]

[0105] in, Provide flexibility for thermal power units to increase their capacity. is the downward flexibility supply of thermal power units, τ represents the dispatch time scale, is the maximum output of the thermal power unit, is the minimum output of the thermal power unit, is the upward climbing rate of the thermal power unit, is the downward climbing rate of the thermal power unit, P T (t) is the actual output active power of the thermal power unit during the period t.

[0106] The flexibility quantitative model of hydropower units is defined. The hydropower units include upward flexibility supply and downward flexibility supply, which can be expressed as:

[0107]

[0108] in, Provide flexibility for the upward adjustment of hydropower units. Provide flexibility for hydropower units to adjust downward. is the maximum output of the hydroelectric unit, is the minimum output of the hydropower unit, is the upward climbing rate of the hydropower unit, is the downward climbing rate, P H (t) is the actual output active power of the hydropower unit during the period t.

[0109] Define the flexibility quantification model of energy storage. Energy storage includes upward flexibility supply and downward flexibility supply, which can be expressed as:

[0110]

[0111] in, Provides flexibility for energy storage. Provides flexibility for energy storage downtime. is the rated charging power of the energy storage, is the rated discharge power of the energy storage, E ESS is the rated capacity of the energy storage, is the maximum state of charge of the energy storage, is the minimum state of charge of the energy storage, SOC(t) is the state of charge of the energy storage in the t period, is the charging efficiency of energy storage, is the discharge efficiency of energy storage.

[0112] It should be noted that establishing the supply-side and load-side flexibility quantitative models also includes defining the load flexibility quantitative model. The load includes upward flexibility demand and downward flexibility demand, which are expressed as:

[0113]

[0114] in, To meet the demand for load flexibility, is the load down-regulation flexibility requirement, P M is the net load of the system, P load is the actual load of the system, P u is the wind power output of the system, P v The photovoltaic output of the system.

[0115] It should also be noted that by establishing a quantitative flexibility model on the supply and load sides, the specific contribution of various types of power resources (such as thermal power, hydropower, energy storage, and load) to the system's supply and demand balance is clarified, ensuring the comprehensiveness and accuracy of flexibility regulation. Through the establishment of the model, the power system can respond more flexibly to changes in power demand and supply, especially in extreme weather conditions, and can efficiently allocate various types of power resources. The flexibility quantitative model makes power dispatch no longer rely on experience and manual adjustment, but accurately controls the supply and demand balance through quantitative means, which not only improves the system's emergency response speed, but also improves the stability and reliability of the power system in complex situations such as extreme weather. At the same time, the model provides data support for the optimal allocation of resources and power transactions in the power market, improving the economy of the system.

[0116] S3: Establish a system evaluation index system for power supply and demand flexibility, and establish a two-layer optimization configuration model for energy storage that considers the power supply and demand balance under extreme weather conditions.

[0117] Furthermore, the establishment of a system power supply and demand flexibility evaluation index system includes calculating the system flexibility margin index, which is used to characterize the upward and downward flexibility margins that the system can provide within a certain period of time. The system flexibility margin index is equal to the difference between the system flexibility supply and flexibility demand within a certain period of time. The larger the flexibility margin, the higher the system flexibility, which is expressed as:

[0118]

[0119] in, is the upward flexibility margin of the system in period t, is the downward flexibility margin of the system in period t.

[0120] The probability index of insufficient system flexibility is calculated to characterize the probability of insufficient system flexibility. The probability index of insufficient system flexibility is equal to the ratio of the number of time periods in which the system has insufficient flexibility to the total number of time periods within the scheduling cycle, expressed as:

[0121]

[0122] Among them, f uEis the comprehensive probability of insufficient system flexibility, The probability of insufficient upward flexibility of the system, is the probability of insufficient downward flexibility of the system, is the number of periods in which the system has insufficient upward flexibility during the scheduling cycle, N is the number of periods in which the system has insufficient downward flexibility during the scheduling period. T is the total number of time periods in the scheduling cycle, ζ up is the weight coefficient of insufficient upward flexibility, ζ dowπ is the weight coefficient for insufficient downward flexibility.

[0123] It should be noted that the establishment of a two-layer optimization configuration model for energy storage that takes into account the flexible supply and demand balance of electricity under extreme weather conditions includes taking the minimization of the system's annual comprehensive operating cost as the goal, using the capacity and power of the energy storage equipment as decision variables, and establishing the objective function and constraints of the upper-level planning model.

[0124] The objective function of the upper-level planning model includes minimizing the system's annual comprehensive operating cost. The system's annual comprehensive operating cost includes system operating cost, annual investment cost of energy storage, energy storage operation and maintenance cost, and penalty cost for insufficient flexibility, which can be expressed as:

[0125]

[0126] Among them, F l is the upper objective function, C ws is the system operating cost, is the annual investment cost of energy storage, is the energy storage operation and maintenance cost, C FI Penalize costs for lack of flexibility.

[0127] Calculate system operating cost C sys , expressed as:

[0128]

[0129] in, is the coal consumption cost of thermal power, is the start-up and shutdown cost of thermal power, The environmental cost of thermal power generation is additional. For the operation and maintenance costs of thermal power, The operation and maintenance costs of hydropower.

[0130] Calculate the annual investment cost of energy storage It is expressed as:

[0131]

[0132] Among them, N ESS is the number of energy storage devices, is the fixed investment cost of energy storage equipment, c g is the cost per unit capacity of energy storage equipment, c p is the cost per unit power of energy storage equipment, σ CRF is the annual capital recovery rate, R is the discount rate, and Y is the useful life of the energy storage equipment;

[0133] Calculating Energy Storage Operation and Maintenance Costs It is expressed as:

[0134]

[0135] Among them, μ OM is the operation and maintenance cost coefficient.

[0136] Calculate the penalty cost of insufficient flexibility C FL , expressed as:

[0137]

[0138] in, For the system upward flexibility shortage, The system's downward flexibility is insufficient. Penalize the system for insufficient upward flexibility. N is the penalty cost for insufficient downward flexibility of the system, typicel The number of typical days.

[0139] The constraints of the upper-level planning model include energy storage investment capacity constraints, energy storage investment cost constraints, and power balance constraints, which can be expressed as:

[0140]

[0141] Among them, E ESS,max is the maximum capacity of energy storage investment. It is the maximum annual investment and construction cost of energy storage.

[0142] The daily operation simulation is carried out on the established set of typical extreme weather days of extremely hot and windless weather and extremely cold and lightless weather. The flexibility index of power supply and demand and the optimization of economy of the system under multiple types of extreme weather scenarios are taken as the goal. The output of each unit in the system and the charging and discharging status of energy storage are taken as decision variables, and the objective function and constraint conditions of the lower-level typical day optimization operation model are established.

[0143] The objective function of the lower typical day optimization operation model includes the optimization of the system power supply and demand flexibility index and economic efficiency under multiple types of extreme weather scenarios, including maximizing the power supply and demand flexibility index of extreme weather typical days and minimizing the operation cost of extreme weather typical days, which is expressed as:

[0144]

[0145] Among them, N Dpical is the number of typical days, is the operating cost in the nth typical day, ω 1 is the weight coefficient of the power supply and demand flexibility index, ω 2 is the weight coefficient of typical daily operating cost, ξ l , 2 and 3 They are the flexibility margin index, the flexibility deficiency probability index and the normalized coefficient of typical daily operating cost respectively.

[0146] The constraints of the lower-level typical day optimization operation model include upper and lower output limits of thermal power and hydropower, minimum start and shutdown time constraints of thermal power, ramp rate constraints of thermal power and hydropower, energy storage charging and discharging state constraints, energy storage charging and discharging power constraints, energy storage charge state constraints, and power balance constraints.

[0147] The upper and lower limits of thermal power and hydropower output are expressed as:

[0148]

[0149] The minimum start-stop time constraint of thermal power is expressed as:

[0150]

[0151] Among them, u T,k (t) is the state of thermal power unit k in the tth period, with 1 and 0 indicating the running and shutdown states respectively. and are the minimum continuous operation time and shutdown time allowed for thermal power unit k respectively.

[0152] The ramp rate constraint of thermal power is expressed as:

[0153]

[0154] The ramp rate constraint of hydropower is expressed as:

[0155]

[0156] The charge and discharge state constraints of energy storage are expressed as:

[0157] u ESS,k (t)∈[-1,0,1]

[0158] Among them, u ESS,k (t) is the state of the energy storage k at the tth time period, with 1, 0 and -1 representing the charging, silent and discharging states respectively.

[0159] The charging and discharging power constraints of energy storage are expressed as:

[0160]

[0161] The state of charge constraint of energy storage is expressed as:

[0162]

[0163] The system power balance constraint is expressed as:

[0164]

[0165] The model is solved. The upper planning model is solved by the particle swarm optimization algorithm. The lower typical day optimization operation model is solved by commercial solvers such as CPLEX or Gurobi. This includes generating initial particles. The particle coordinates are the capacity and power of the energy storage device. For each particle, the lower model is called to solve according to the decision variable value. The annual comprehensive operating cost of the system is obtained as the particle fitness. The individual optimal position of each particle and the group optimal position of all particles are recorded. The speed and position of each particle are updated, which is expressed as:

[0166]

[0167] Among them, v i (j) and X i (j) are the velocity and position of the ith particle in the jth iteration, X Pbest,i (j) is the individual optimal position of the i-th particle in the j-th iteration process, X Gbest (j) is the optimal position of the group in the jth generation process, is the inertia coefficient, c 1 and c 2 are the individual learning factor and the group learning factor, r 1 (j) and r 2 (j) are random numbers between 0 and 1 generated in the jth generation process. The speed and position of each particle are repeatedly updated until the preset convergence condition is reached or the number of iterations reaches the upper limit. Finally, the optimal solution is output as the final planning value of the capacity and power of the energy storage device.

[0168] It should also be noted that the two-layer optimization configuration model improves the configuration and utilization efficiency of energy storage equipment. The upper planning model optimizes the configuration of energy storage by minimizing the system's comprehensive operating costs and the penalty cost of insufficient flexibility. The lower typical day optimization operation model achieves the optimal ratio between power supply and demand balance and economy under extreme weather conditions by accurately dispatching parameters such as energy storage charging and discharging status and unit output. Through the two-layer optimization model, the power system can not only ensure stable power supply in the face of extreme weather, but also minimize system operating costs, effectively solving the problem of insufficient response to extreme weather in traditional technologies. The introduction of the flexibility evaluation index system enables the power system to identify the risk of insufficient flexibility in advance and adjust strategies in a timely manner. The application of the energy storage two-layer optimization configuration model ensures the efficient configuration and scientific dispatch of energy storage equipment, reduces the system risk caused by insufficient flexibility, and improves the economy and operation efficiency of the system under extreme weather. While ensuring the stability and economy of the power system, it also improves the system's ability to respond to extreme meteorological events, providing strong technical support for the development of future smart grids.

[0169] Example 2, reference Figure 2-Figure 3 , which is an embodiment of the present invention, provides a method for optimizing energy storage configuration for balancing power supply and demand flexibility under extreme weather conditions. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.

[0170] First, historical wind and photovoltaic data of a certain region (assuming it is region A) are collected. These data cover the average daily output curves of wind power and photovoltaic power for 8760 hours in the past five years, and meteorological data in different seasons and extreme weather conditions. These meteorological data include the highest and lowest daily temperatures, the average daily wind speed, and the weather type (sunny, cloudy, rainy, etc.). Figure 2 It is a two-layer optimization model diagram. Figure 3The following is the workflow diagram. Based on historical data, data preprocessing is first performed, including cubic spline interpolation, dimensionality reduction, scalarization and smoothing. After interpolation, the empirical probability distribution of historical wind power and photovoltaic output is obtained. On this basis, the low output thresholds of wind power and photovoltaic are calculated using frequency distribution. By identifying the conditions of extremely hot windless days and extremely cold and lightless days, the corresponding dates are identified, and the wind power and photovoltaic output curves of these dates are included in the extreme weather scene set. Through K-means clustering analysis, typical wind and solar output scenarios under two types of extreme weather are obtained. The extremely hot windless scene set and the extremely cold and lightless scene set are clustered to obtain 10 typical wind and solar output scenarios. According to the defined quantitative models of the flexibility of thermal power units, hydropower units and energy storage, a quantitative model of flexibility supply and demand balance is constructed, and the regulation capacity of thermal power units is measured, taking into account factors such as the upward flexibility supply, downward flexibility supply, maximum / minimum output, and climbing rate of thermal power units. The flexibility demand of the load is also quantified based on the wind and solar output forecast results of historical data, and the flexibility of the system is defined. on this basis, the upper-level planning model and the lower-level typical day optimization operation model are used to optimize the configuration and scheduling of the energy storage equipment, with the goal of minimizing the system's annual comprehensive operating cost while ensuring the flexibility of electricity supply and demand. The particle swarm optimization algorithm is used to solve the problem, and the optimal energy storage capacity and power configuration are obtained through iterative calculation. Through running simulations, the optimal capacity configuration of energy storage equipment and the regulation strategies of wind power, photovoltaic power and thermal power under various types of extreme weather scenarios are obtained. During the experiment, key indicators such as the system's operating cost, flexibility margin, probability of insufficient flexibility, and wind and solar power output fluctuations are collected, and performance comparison and data analysis are carried out based on these data. It can be seen from the experimental results that the present invention can reduce the system's operating cost, increase flexibility margin, and reduce the risk of insufficient flexibility by reasonably configuring energy storage equipment and optimizing the flexibility supply and demand balancing strategy, thereby providing a more reliable and efficient solution for the power system, which not only has advantages in terms of economy, but also effectively improves the flexibility and stability of the power system under extreme weather conditions.

[0171] Example 3, reference Figure 4 , which is an embodiment of the present invention, provides an energy storage optimization configuration system for balancing the supply and demand of electricity flexibility under extreme weather conditions, including a collection establishment module, a flexibility quantification module, and a two-layer optimization module.

[0172] The set establishment module is used to establish a set of wind and solar output scenarios under extreme weather conditions based on historical wind and solar output and meteorological data; the flexibility quantification module is used to define the balance of power flexibility supply and demand, and to establish a supply-side and load-side flexibility quantification model; the two-layer optimization module is used to establish a system power supply and demand flexibility evaluation index system, and to establish a two-layer optimization configuration model for energy storage that takes into account the power flexibility supply and demand balance under extreme weather conditions.

[0173] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0174] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0175] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.

[0176] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc. It should be noted that the above embodiments are only used to illustrate the technical solution of the present invention and are not limited. Although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.

[0177] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for optimizing energy storage configuration for power supply and demand balance under extreme weather conditions, characterized in that: include: Based on historical wind and solar output and meteorological data, a set of wind and solar output scenarios under extreme weather conditions is established; Define the balance between power supply and demand flexibility and establish a quantitative model for supply-side and load-side flexibility; Establish a system electricity supply and demand flexibility evaluation index system, and establish a two-layer energy storage optimization configuration model that takes into account the electricity flexibility supply and demand balance under extreme weather conditions.

2. The energy storage optimization configuration method for balancing power supply and demand flexibility under extreme weather conditions as claimed in claim 1, characterized in that: The establishment of a set of wind and solar power output scenarios under extreme weather conditions includes preprocessing historical wind and solar power output and meteorological data, including interpolation, dimensionality reduction, normalization and smoothing; Define the low output thresholds of wind power and photovoltaic power to determine whether a certain day is a low output day of wind and photovoltaic power. This includes calculating the average daily output of wind power and photovoltaic power according to the 8760-hour wind and photovoltaic output curves of historical years, taking the daily wind power and photovoltaic output as samples, and statistically analyzing the frequency distribution f(P w ), f(P v ), according to the frequency distribution, cubic spline interpolation is used, and the negative values ​​that may be included after interpolation are set to zero, and the empirical probability distribution PDF (P w )、PDF(P v ) and calculate the cumulative probability distribution CDF (P w )、CDF(P v ), select CDF(P w ) and CDF(P v ) is equal to 0.2, take the corresponding P w and P v The values ​​are used as the low output thresholds of wind power and photovoltaic power, respectively denoted as P w,low and P v,low .

3. The energy storage optimization configuration method for balancing power supply and demand flexibility under extreme weather conditions as claimed in claim 2, characterized in that: The establishment of a set of wind and solar output scenarios under extreme weather conditions also includes defining conditions for extremely hot windless days and extremely cold and sunless days, and identifying extremely hot windless days and extremely cold and sunless days in historical data; The date that meets condition A in the historical data is an extremely hot and windless day, and the 24-hour wind power and photovoltaic output curves of that day are included in the extremely hot and windless scenario set ψ w,low ; Condition A includes the average daily wind power output on that day being lower than the wind power low output threshold P w,low , the maximum temperature of the day is not less than 38℃, the average wind speed of the day is level 1 or below, the weather is sunny or a little cloudy, and the photovoltaic output should not be lower than the photovoltaic low output threshold P ν,low ; The date that meets condition B in the historical data is an extremely cold and dark day, and the wind power and photovoltaic output curves of the day 241 are included in the extremely cold and dark scene set ψ ν,low ; Condition B includes the average daily output of photovoltaic power on that day being lower than the photovoltaic low output threshold P v,low , the lowest temperature of the day is not higher than 0℃, the weather on that day is cloudy, rainy or snowy; Extremely hot and windless scene set ψ w,low and the collection of extremely cold and lightless scenes ψ v,low The curves in the figure are clustered by kmeans to obtain the typical wind and solar output scene sets under extremely hot and windless extreme weather conditions. Typical wind and solar output scenarios under extremely cold and dark weather conditions 4. The energy storage optimization configuration method for balancing power supply and demand flexibility under extreme weather conditions as claimed in claim 3 is characterized by: The establishment of the supply-side and load-side flexibility quantitative model includes defining a flexibility quantitative model for thermal power units, where the thermal power units include upward flexibility supply and downward flexibility supply, expressed as: in, Provide flexibility for thermal power units to increase their capacity. is the downward flexibility supply of thermal power units, τ represents the dispatch time scale, is the maximum output of the thermal power unit, is the minimum output of the thermal power unit, is the upward climbing rate of the thermal power unit, is the downward climbing rate of the thermal power unit, P T (t) is the actual output active power of the thermal power unit during the period t; The flexibility quantitative model of hydropower units is defined. The hydropower units include upward flexibility supply and downward flexibility supply, which can be expressed as: in, Provide flexibility for the upward adjustment of hydropower units. Provide flexibility for hydropower units to adjust downward. is the maximum output of the hydroelectric unit, is the minimum output of the hydropower unit, is the upward climbing rate of the hydropower unit, is the downward climbing rate, P H (t) is the actual output active power of the hydropower unit in the period t; Define the flexibility quantification model of energy storage. Energy storage includes upward flexibility supply and downward flexibility supply, which can be expressed as: in, Provides flexibility for energy storage. Provides flexibility for energy storage downtime. is the rated charging power of the energy storage, is the rated discharge power of the energy storage, E ESS is the rated capacity of the energy storage, is the maximum state of charge of the energy storage, is the minimum state of charge of the energy storage, SOC(t) is the state of charge of the energy storage in the t period, is the charging efficiency of energy storage, is the discharge efficiency of energy storage.

5. The energy storage optimization configuration method for balancing power supply and demand flexibility under extreme weather conditions as claimed in claim 4, characterized in that: The establishment of the supply-side and load-side flexibility quantitative model also includes defining a load flexibility quantitative model, where the load includes an upward flexibility demand and a downward flexibility demand, expressed as: in, To meet the demand for load flexibility, is the load down-regulation flexibility requirement, P M is the net load of the system, P load is the actual load of the system, p u is the wind power output of the system, P v The photovoltaic output of the system.

6. The energy storage optimization configuration method for balancing power supply and demand flexibility under extreme weather conditions as claimed in claim 5, characterized in that: The establishment of the system power supply and demand flexibility evaluation index system includes calculating the system flexibility margin index, which is used to characterize the upward and downward flexibility margins that the system can provide within a certain period of time. The system flexibility margin index is equal to the difference between the system flexibility supply and the flexibility demand within a certain period of time. The larger the flexibility margin, the higher the system flexibility, which is expressed as: in, is the upward flexibility margin of the system in period t, is the downward flexibility margin of the system in period t; The probability index of insufficient system flexibility is calculated to characterize the probability of insufficient system flexibility. The probability index of insufficient system flexibility is equal to the ratio of the number of time periods in which the system has insufficient flexibility to the total number of time periods within the scheduling cycle, expressed as: Among them, f uE is the comprehensive probability of insufficient system flexibility, The probability of insufficient upward flexibility of the system, The probability of insufficient downward flexibility of the system, is the number of periods in which the system has insufficient upward flexibility during the scheduling cycle, N is the number of periods in which the system has insufficient downward flexibility during the scheduling period. T is the total number of time periods in the scheduling cycle, is the weight coefficient for insufficient upward flexibility, is the weight coefficient for insufficient downward flexibility.

7. The energy storage optimization configuration method for balancing power supply and demand flexibility under extreme weather conditions as claimed in claim 6, characterized in that: The establishment of a two-layer energy storage optimization configuration model that considers the balance of power supply and demand flexibility under extreme weather conditions includes taking the minimum annual comprehensive operating cost of the system as the goal, the capacity and power of the energy storage equipment as the decision variables, and establishing the objective function and constraint conditions of the upper-level planning model; The objective function of the upper-level planning model includes minimizing the system's annual comprehensive operating cost. The system's annual comprehensive operating cost includes system operating cost, annual investment cost of energy storage, energy storage operation and maintenance cost, and penalty cost for insufficient flexibility, which can be expressed as: Among them, F l is the upper objective function, C ws is the system operating cost, is the annual investment cost of energy storage, is the energy storage operation and maintenance cost, C FI Penalize costs for lack of flexibility; Calculate system operating cost C sys , expressed as: in, is the coal consumption cost of thermal power, is the start-up and shutdown cost of thermal power, The environmental cost of thermal power generation is additional. The operation and maintenance costs of thermal power. The operation and maintenance costs of hydropower; Calculate the annual investment cost of energy storage It is expressed as: Among them, N ESS is the number of energy storage devices, is the fixed investment cost of energy storage equipment, c g is the cost per unit capacity of energy storage equipment, c p is the cost per unit power of energy storage equipment, σ CRF is the annual capital recovery rate, R is the discount rate, and Y is the useful life of the energy storage equipment; Calculating Energy Storage Operation and Maintenance Costs It is expressed as: Among them, μ OM is the operation and maintenance cost coefficient; Calculate the penalty cost of insufficient flexibility C FL , expressed as: in, For the system upward flexibility shortage, The system's downward flexibility is insufficient. Penalize the system for insufficient upward flexibility. N is the penalty cost for insufficient downward flexibility of the system, tupicel is the number of typical days; The constraints of the upper-level planning model include energy storage investment capacity constraints, energy storage investment cost constraints, and power balance constraints, which can be expressed as: Among them, E ESS,max is the maximum capacity of energy storage investment. The maximum annual investment and construction cost of energy storage; The established extreme weather typical day set of extremely hot and windless and extremely cold and lightless weather is simulated for daily operation. The flexibility index and economic optimization of the system power supply and demand under multiple types of extreme weather scenarios are taken as the goal. The output of each unit in the system and the charging and discharging status of energy storage are taken as decision variables. The objective function and constraint conditions of the lower-level typical day optimization operation model are established. The objective function of the lower typical day optimization operation model includes the optimization of the system power supply and demand flexibility index and economic efficiency under multiple types of extreme weather scenarios, including maximizing the power supply and demand flexibility index of extreme weather typical days and minimizing the operation cost of extreme weather typical days, which is expressed as: Among them, N Dpical is the number of typical days, is the operating cost in the nth typical day, ω1 is the weight coefficient of the power supply and demand flexibility index, ω2 is the weight coefficient of the typical day operating cost, ξ l , ξ2 and ξ3 are the normalized coefficients of flexibility margin index, flexibility deficiency probability index and typical daily operating cost respectively; The constraints of the lower typical day optimization operation model include the upper and lower limits of thermal power and hydropower output, the minimum start and stop time of thermal power, the ramp rate of thermal power and hydropower, the energy storage charging and discharging state, the energy storage charging and discharging power, the energy storage charge state, and the power balance. The upper and lower limits of thermal power and hydropower output are expressed as: The minimum start-stop time constraint of thermal power is expressed as: Among them, u T,k (t) is the state of thermal power unit k in the tth period, with 1 and 0 indicating the running and shutdown states respectively. and are the minimum continuous operation time and shutdown time allowed for thermal power unit k respectively; The ramp rate constraint of thermal power is expressed as: The ramp rate constraint of hydropower is expressed as: The charge and discharge state constraints of energy storage are expressed as: u ESS,k (t)∈[-1,0,1] Among them, u ESS,k (t) is the state of energy storage k at the tth time period, with 1, 0 and -1 indicating charging, silent and discharging states respectively; The charging and discharging power constraints of energy storage are expressed as: The state of charge constraint of energy storage is expressed as: The system power balance constraint is expressed as: The model is solved. The upper planning model is solved by the particle swarm optimization algorithm. The lower typical day optimization operation model is solved by commercial solvers such as CPLEX or Gurobi. This includes generating initial particles. The particle coordinates are the capacity and power of the energy storage device. For each particle, the lower model is called to solve according to the decision variable value. The annual comprehensive operating cost of the system is obtained as the particle fitness. The individual optimal position of each particle and the group optimal position of all particles are recorded. The speed and position of each particle are updated, which is expressed as: Among them, v i (j) and X i (j) are the velocity and position of the ith particle in the jth iteration, X Pbest,i (j) is the individual optimal position of the i-th particle in the j-th iteration process, X Gbest (j) is the optimal position of the group in the jth generation process, is the inertia coefficient, c1 and c2 are the individual learning factor and the group learning factor respectively, r1(j) and r2(j) are the random numbers between 0 and 1 generated in the j-th generation process respectively. The speed and position of each particle are updated repeatedly until the preset convergence condition is met or the number of iterations reaches the upper limit, and finally the optimal solution is output as the final planning value of the capacity and power of the energy storage device.

8. A system using the energy storage optimization configuration method for balancing power supply and demand flexibility under extreme weather conditions as described in any one of claims 1 to 7, characterized in that: It includes set building module, flexibility quantification module and double-layer optimization module; The set building module is used to build a set of wind and solar output scenarios under extreme weather conditions based on historical wind and solar output and meteorological data; The flexibility quantification module is used to define the balance of power flexibility supply and demand and establish a supply-side and load-side flexibility quantification model; The two-layer optimization module is used to establish a system power supply and demand flexibility evaluation index system and to establish a storage energy two-layer optimization configuration model that takes into account the power flexibility supply and demand balance under extreme weather conditions.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the energy storage optimization configuration method for balancing the flexible supply and demand of electricity under extreme weather conditions as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the energy storage optimization configuration method for balancing the flexible supply and demand of electricity under extreme weather conditions as described in any one of claims 1 to 7 are implemented.