A method for generating energy storage configuration principles based on LLM and time-series production simulation
Patent Information
- Application Number
- CN202610796077.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-04
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2046-06-04
AI Technical Summary
然而,储能规划配置问题具有典型的多维度、多约束、多时间尺度特点:其一,储能配置变量包含容量、功率、能量功率比、安装位置、接入电压等级、控制策略参数、充放电功率边界、SOC约束与寿命退化约束等;其二,储能效益与风险高度依赖运行方式与场景条件,不同季节、不同典型日、不同新能源出力与负荷分布下,储能的最优作用方式可能显著不同;其三,储能同时影响经济性与安全性指标,需要在投资成本、运行成本、弃电、网损、碳排放与安全约束之间进行综合权衡
本发明提供的方法,通过人工智能Agent实现“仿真—分析—迭代”的闭环自动化流程:人工智能Agent基于系统拓扑与运行边界生成储能配置参数组合与仿真场景,调用全年时序生产模拟获取关键运行指标,再将仿真结果输入LLM进行归纳、规则抽取并输出储能配置原则;人工智能Agent对储能配置原则进行有效性验证与修正,实现海量探索与自学习,提升电力系统运行安全性与规划决策效率。
Smart Images

Figure CN122334624B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power system planning, and more specifically, relates to a method for generating energy storage configuration principles based on LLM and time-series production simulation. Background Technology
[0002] The intermittent, random, and highly volatile nature of renewable energy generation leads to a stronger peak-to-valley difference and higher ramp-up requirements in the power system's net load curve, significantly increasing the pressure on the grid's peak shaving, frequency regulation, and reserve capacity. Simultaneously, the declining proportion of traditional synchronous generator units results in lower system inertia, poorer dynamic frequency strain, and a greater likelihood of risks such as increased frequency variation rate and a downward shift in the frequency minimum. With the high penetration of renewable energy and power electronic equipment, the grid's voltage support capacity and system strength may also decline, manifesting as voltage exceeding limits, insufficient reactive power margin, reduced short-circuit capacity, and enhanced control interactions. The coupling of frequency security, voltage stability, and system strength issues, coupled with uncertainties such as extreme weather, sudden load changes, and equipment maintenance or failures, presents new challenges to the safe and stable operation of the power system.
[0003] Energy storage systems are considered an important resource for improving the flexibility and security of power systems due to their advantages such as fast charging and discharging response, controllable power, and the ability to provide various ancillary services. Energy storage can be used to smooth out renewable energy fluctuations, peak shaving and valley filling, provide primary frequency regulation / fast frequency response, participate in reserve and black start, and improve local voltage and power flow distribution to a certain extent. However, the planning and configuration of energy storage is characterized by multiple dimensions, constraints, and time scales: First, energy storage configuration variables include capacity, power, energy-to-power ratio, installation location, access voltage level, control strategy parameters, charging and discharging power boundaries, SOC constraints, and lifetime degradation constraints; Second, the benefits and risks of energy storage are highly dependent on the operating mode and scenario conditions. The optimal mode of operation of energy storage may vary significantly under different seasons, typical days, and renewable energy output and load distributions; Third, energy storage affects both economic and safety indicators, requiring a comprehensive trade-off between investment costs, operating costs, curtailment, grid losses, carbon emissions, and safety constraints.
[0004] Therefore, it is evident that how to provide reasonable energy storage configuration suggestions under the premise of engineering calculation, and further refine them into reusable "configuration principles", is an urgent problem to be solved in the field of energy storage planning. Summary of the Invention
[0005] To address the aforementioned deficiencies or improvement needs of existing technologies, this invention provides a method for generating energy storage configuration principles based on LLM and time-series production simulation. This method can automatically extract energy storage configuration principles based on time-series operation simulations in multiple scenarios, thereby improving the operational safety and planning decision-making efficiency of the power system.
[0006] To achieve the above objectives, according to a first aspect of the present invention, a method for generating energy storage configuration principles based on LLM and time-series production simulation is provided, comprising: S1, the topology, operating boundary conditions, basic operating scenarios, planning constraints, and multiple energy storage configuration principles of the power system are input into the artificial intelligence agent to obtain multiple combinations of energy storage configuration parameters of the power system; wherein, the energy storage configuration parameters include energy storage capacity, energy storage power, energy storage device layout location, and energy storage device control strategy; the energy storage configuration principles include energy storage capacity and energy storage power; S2, under the basic operating scenario, the power system is simulated for the whole year using various energy storage configuration parameter combinations to obtain the power system dispatch results. The voltage safety index, frequency safety index, economic index and constraint violation list are statistically analyzed and constructed into prompt information and input to LLM so that LLM can select the best energy storage configuration principle from the multiple energy storage configuration principles and use it as the current energy storage configuration principle, and then proceed to S3. S3: Input the current energy storage configuration principle into the artificial intelligence agent to obtain multiple optimized combinations of energy storage configuration parameters; under the basic operation scenario, use each optimized combination of energy storage configuration parameters to perform a year-round time-series production simulation of the power system to obtain the power system dispatch results, and statistically analyze the voltage safety index and frequency safety index to verify the effectiveness of the current energy storage configuration principle. If the effectiveness verification is successful, the current energy storage configuration principle is adopted as the final energy storage configuration principle; otherwise, proceed to S4. S4, the AI Agent expands the energy storage capacity and power in the current energy storage configuration principle according to the corresponding proportions to update the current energy storage configuration principle; the updated current energy storage configuration principle is input into the AI Agent to obtain multiple energy storage configuration parameter optimization combinations, and then performs a year-round time-series production simulation again and constructs prompt information to input into LLM, so that LLM can select the best energy storage configuration principle from the current energy storage configuration principle before the update and the updated current energy storage configuration principle, and use it as the current energy storage configuration principle, and return to S3.
[0007] According to a second aspect of the present invention, an electronic device is provided, comprising: a computer-readable storage medium and a processor; The computer-readable storage medium is used to store executable instructions; The processor is configured to read executable instructions stored in the computer-readable storage medium and execute the method as described in the first aspect.
[0008] According to a third aspect of the invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to perform the method as described in the first aspect.
[0009] According to a fourth aspect of the invention, a computer program product is provided, comprising a computer program or instructions that, when executed by a processor, implement the method described in the first aspect.
[0010] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects: The method provided by this invention realizes a closed-loop automated process of "simulation-analysis-iteration" through an artificial intelligence agent: the artificial intelligence agent generates energy storage configuration parameter combinations and simulation scenarios based on system topology and operating boundaries, calls the annual time-series production simulation to obtain key operating indicators, and then inputs the simulation results into an LLM for summarization, rule extraction, and output of energy storage configuration principles; the artificial intelligence agent verifies and corrects the effectiveness of the energy storage configuration principles, realizes massive exploration and self-learning, and improves the operational safety and planning decision-making efficiency of the power system.
[0011] To address the difficulty in solving the large-scale annual time series model, as a further preferred solution, this invention introduces time dimension decomposition, breaking down the annual model into multiple sub-optimization problems and solving them in a rolling or splicing manner, thereby improving computational efficiency and engineering usability while ensuring accuracy.
[0012] In summary, the method provided by this invention can form a reusable energy storage configuration principle system in multiple scenarios and time scales, providing more efficient, more interpretable and more verifiable technical support for the planning and safe operation of power system energy storage. Attached Figure Description
[0013] Figure 1 A flowchart of a method for generating energy storage configuration principles based on LLM and time-series production simulation, provided in an embodiment of the present invention.
[0014] Figure 2 This is a schematic diagram of LLM pre-training provided in an embodiment of the present invention.
[0015] Figure 3 This is a schematic diagram of time-series operation simulation time period decomposition provided in an embodiment of the present invention.
[0016] Figure 4 This is a schematic diagram of the segmented solution for timing simulation provided in an embodiment of the present invention. Detailed Implementation
[0017] 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.
[0018] In existing technologies, energy storage planning often employs a combination of capacity optimization, cost-benefit analysis, and safety verification. Common methods include: comparing schemes based on production simulations or power flow calculations on typical days / weeks; using mixed integer programming, stochastic programming, or robust optimization to jointly optimize energy storage capacity and operation; or providing candidate schemes during the planning stage and then verifying their safety in operational simulations. However, these methods still have certain limitations in practical applications. First, while year-round time-series production simulations can comprehensively reflect the seasonality, intraday variations, and maintenance mode switching of load and renewable energy output, year-round models typically contain a large number of time periods and multiple types of integer decision variables (such as unit start-up and shutdown, segmented constraints, load shedding, discrete control states, etc.), resulting in a huge solution scale. This can easily lead to problems such as long computation time, difficulty in convergence, or inability to solve, limiting the exploration of a large number of candidate configurations. Secondly, many planning studies ultimately output the "optimal solution" or "recommended capacity" for a specific simulation example, lacking a rule-based summary of "under what conditions to select what capacity, how to allocate power, how to choose the location, and how to set the control strategy." This makes it difficult to transfer the results to systems with different grid structures, different levels of renewable energy penetration, or different operating boundary conditions. Thirdly, scenario construction often relies on manual experience to select a small number of typical operating conditions, easily overlooking boundary scenarios or high-risk scenarios, resulting in uncertainty when extrapolating the configuration conclusions to actual operation. Finally, planners need to manually interpret, compare, and summarize a large number of simulation results to form planning reports or technical principles, which is a heavy workload, and the consistency of the conclusions is significantly affected by personal experience.
[0019] Large Language Models (LLMs) demonstrate strong capabilities in natural language understanding, knowledge induction, rule extraction, and interpretation generation, providing a new approach to transforming complex simulation results into structured "configuration principles." LLMs can summarize key influencing factors, extract patterns, and output recommendations in a readable format, even when inputs include multi-dimensional indicators, constraint violations, and scenario characteristics. However, without rigorous verifiable mechanisms and engineering constraints, LLM outputs may be uncontrollable or inconsistent with actual power grid constraints, making them difficult to directly apply to engineering decisions.
[0020] Based on this, the embodiments of the present invention adopt a technical approach that combines the "verifiability of simulation tools" with the "inductive power of LLM": it can obtain reliable data based on large-scale time-series simulations, and automatically extract interpretable configuration principles from the data, and continuously revise them through iterative verification, so that the principles have stronger generalizability and engineering credibility. On this basis, the embodiments of the present invention provide a method for generating energy storage configuration principles based on LLM and time-series production simulation, such as... Figure 1 As shown, it includes: S1, input the topology of the power system, operating boundary conditions, basic operating scenarios, planning constraints and multiple different energy storage configuration principles into the artificial intelligence agent to obtain multiple combinations of energy storage configuration parameters of the power system; The energy storage configuration parameters include energy storage capacity, energy storage power, energy storage device location, and energy storage device control strategy. The energy storage configuration principles include energy storage capacity and energy storage power.
[0021] Specifically, the topology of a power system includes nodes, lines, transformers, generators, loads, new energy access points, tie lines, etc.
[0022] The operational boundary conditions of a power system include fuel price / cost parameters, maintenance plans, and capacity limits.
[0023] The AI agent employs three methods—grid / Latin hypercube sampling (wide coverage), localized encrypted sampling around the optimal configuration, and targeted search based on sensitive information—to generate multiple sets of energy storage configuration parameters while satisfying power system planning constraints. Each energy storage configuration parameter set includes energy storage capacity (E, MWh), energy storage power (P, MW), energy storage device location (loc), energy storage device control strategy (ctrl) (e.g., droop control, grid-connected / grid-connected control, etc.), and related parameters. Power system planning constraints include energy storage constraints and engineering operation constraints, used to limit the feasible search space for energy storage configuration parameters. Energy storage constraints include site selection constraints, capacity and power boundary constraints, capacity-to-power ratio constraints, source-grid side configuration ratio constraints, control strategy constraints, set of candidate energy storage sites, source-side / grid side configuration ratio range, capacity-to-power ratio range, prohibited configuration areas, control strategy constraints, energy storage efficiency constraints, and SOC upper and lower limit constraints. Engineering operation constraints are the power system dispatch constraints.
[0024] Preferably, the basic operating scenario includes the annual load curve, the new energy output curve, the available equipment set, and the equipment operation and maintenance methods.
[0025] Specifically, the basic operating scenarios are constructed based on historical operating data and manually set rules. The historical operating data includes one or more of the following: load time-series curves, renewable energy output time-series curves, equipment operating status, maintenance plans, and network boundary conditions, used to characterize the scenario features of the power system under typical operating conditions. The manually set rules are used to limit the time scale of scenario construction, which is a typical year, typical season, typical week, or typical day.
[0026] S2, under the basic operating scenario, the power system is simulated for the whole year using various energy storage configuration parameter combinations to obtain the power system dispatch results. The voltage safety index, frequency safety index, economic index and constraint violation list are statistically analyzed and constructed into prompt information and input to LLM so that LLM can select the best energy storage configuration principle from the multiple energy storage configuration principles and use it as the current energy storage configuration principle, and then proceed to S3.
[0027] Specifically, step S2 includes: S21, under the basic operating scenario, the power system is simulated for the whole year using various combinations of energy storage configuration parameters to obtain the power system dispatch results.
[0028] In step S21, the AI Agent calls the annual time-series production simulation module to perform annual time-series production simulations based on various energy storage configuration parameter combinations under the basic operation scenario, and obtains the corresponding power system operation results. Then, the results of solving the sub-optimization problem are spliced or rolled up to obtain the power system scheduling results, thereby reducing the scale of integer variables and improving the feasibility and computational efficiency of the solution.
[0029] The power system dispatch results include the output of conventional power sources, the consumption of new energy sources, the charging and discharging power of energy storage, the state of charge of energy storage, the start-up and shutdown status of generating units, the system reserve level, and the distribution of branch power flow in each time period.
[0030] Because the annual time-series production simulation covers a continuous period throughout the year, with a large number of decision variables and strong temporal coupling, direct overall solution would involve a large computational scale. To improve the feasibility and computational efficiency, a rolling window decomposition method is preferred. This method divides the annual time domain into multiple interconnected time windows, and establishes and solves sub-optimization problems window by window in chronological order. That is, during the annual time-series production simulation, the time dimension is decomposed into multiple sub-optimization problems, which are solved sequentially. The solutions to these sub-optimization problems are then combined to obtain the power system dispatching results. The solution process specifically includes: (1) Pre-set the rolling window length L, rolling step size H, and optional overlap interval length, wherein the window length L is greater than or equal to the rolling step size H. The window length is used to determine the range of continuous time periods covered by a single sub-optimization problem, and the rolling step size is used to determine the starting time interval between two adjacent windows.
[0031] (2) For the k-th rolling window, its coverage period is defined as [tk, tk+L), where tk=(k 1) H. Within this time window, based on the current energy storage configuration parameters, corresponding scenario data, and the state variables passed from the previous window, a sub-optimization problem is established and solved. By solving this sub-optimization problem, the unit combination results, power output plan, energy storage charging and discharging power, energy storage SOC change trajectory, network power flow distribution, and related operating indicators for each time period within this window are obtained.
[0032] (3) After the solution of the Kth window is completed, the end state of the window or the end state of the previous H time periods is extracted as a state transit quantity and used as the initial condition of the (k+1)th window to ensure the consistency and continuity of cross-window time-series decision-making. The state transit quantity includes at least: the SOC state of the energy storage system, the energy storage charging and discharging mode or standby state, the number of energy storage cycles or the cumulative amount of degradation, the start-up and shutdown state of the conventional unit, the remaining amount of the minimum start-up and shutdown time of the unit, and other operating state quantities with cross-time-series coupling relationships. Through the above state transit, the subsequent windows can inherit the operating history of the previous windows when solving, avoiding state jumps or infeasible results caused by the independence of each sub-optimization problem.
[0033] (4) Extract the effective optimization results of the first H time periods of each window according to the rolling step size H, and splice them in chronological order to form a time-series operation result covering the continuous period of the whole year. If the last window is less than a complete step size, retain the effective results of the remaining time periods and splice them to the end of the annual result. The spliced annual result shall include at least the unit start-up and shutdown status, output of various power sources, energy storage charging and discharging power and SOC trajectory, network power flow distribution, standby configuration results, and records of power curtailment, load shedding and constraint violation for each time period of the year, which shall be used for subsequent index calculation, constraint verification and energy storage configuration principle extraction.
[0034] S22, statistical analysis of voltage safety indicators, frequency safety indicators, economic indicators, and constraint violation lists in the power system dispatch results obtained from S21.
[0035] Specifically, the voltage safety index adopts common voltage safety indicators, such as voltage deviation; the frequency safety index adopts common frequency safety indicators, such as frequency change rate; and the economic index adopts the comprehensive cost of the power system.
[0036] In step S22, based on the power system dispatch results obtained from the annual time-series production simulation, the extreme values, average values, percentile values, occurrence frequency, and duration of voltage safety indicators and frequency safety indicators throughout the year are statistically analyzed. At the same time, based on the planning constraints of the power system, violations of constraints such as voltage over-limit, frequency risk, insufficient system strength, cross-section over-limit, line overload, and load loss are identified, and a list of constraint violations is formed. The comprehensive cost of the power system is calculated and used as an economic indicator.
[0037] In an optional implementation, the energy storage configuration parameters can be comprehensively scored based on the evaluation principle of "safety first, economy second"; for configurations that meet safety constraints, their economy and operational performance are compared in detail, and for configurations that do not meet safety constraints, penalties are imposed according to the degree of violation.
[0038] In an optional implementation, sensitivity analysis can be performed on key configuration parameters such as capacity, power, location, and control strategy to guide the next round of energy storage configuration search.
[0039] S23, construct the voltage safety index, frequency safety index, economic index and constraint violation list obtained in S22 into a prompt message and input it into LLM, so that LLM can select the best energy storage configuration principle from the multiple energy storage configuration principles and use it as the current energy storage configuration principle.
[0040] The LLM (Limited Library Management) generates a Retrieval Enhancement Group (RAG) to access the power system knowledge base. The AI Agent generates a retrieval query based on the prompt information and retrieves knowledge entries related to energy storage configuration, operation constraints, and safety verification from the power system knowledge base. The knowledge entries are then input into the LLM along with the prompt information as an external knowledge context, so that the LLM satisfies the applicable conditions, constraint thresholds, and rule clauses contained in the knowledge entries when generating energy storage configuration principles.
[0041] In other words, structured prompts are constructed as input to the LLM. These prompts include energy storage configuration parameters, operational scenario parameters (including renewable energy penetration rate, peak-valley characteristics, critical sections, fault sets, etc.), frequency safety indicators, voltage safety indicators, economic indicators, and constraint violation lists. It is recommended to organize these into three parts: an "overview table," a "list of key anomalies," and "conclusions to be analyzed," guiding the LLM to output targeted energy storage configuration principles. Simultaneously, the AI agent generates search queries based on the prompts, retrieving relevant clauses / standard thresholds / operational guidelines / case key points from the power system knowledge base to form an external knowledge context. The integrated prompts and the retrieved external knowledge context are then input into the LLM to guide its output of executable energy storage configuration principles, i.e., optimal energy storage configuration principles. Furthermore, the energy storage configuration principles output by the LLM can also include explanations of the reasons for indicator improvements or violations, specific adjustment suggestions for non-optimal energy storage configuration principles (expanding / reducing energy storage capacity or function, changing the location of energy storage devices, switching energy storage device strategies / parameters, etc.), and indicate the knowledge base entries or sources cited for these conclusions.
[0042] LLM can use any existing large language model.
[0043] S3: Input the current energy storage configuration principle into the artificial intelligence agent to obtain multiple optimized combinations of energy storage configuration parameters; under the basic operation scenario, use each optimized combination of energy storage configuration parameters to perform a year-round time-series production simulation of the power system to obtain the power system dispatch results, and statistically analyze the voltage safety index and frequency safety index to verify the effectiveness of the current energy storage configuration principle. If the effectiveness verification is successful, the current energy storage configuration principle is adopted as the final energy storage configuration principle, and the process ends; otherwise, proceed to S4. Preferably, the standard for validity verification is: if the over-limit rate of both voltage safety index and frequency safety index is lower than the corresponding threshold, then the validity verification is passed.
[0044] Specifically, in step S3, the AI Agent evaluates the effectiveness of the optimal energy storage configuration principle output by LLM, including: First, under the basic operating scenario, an energy storage configuration parameter set is generated based on the energy storage configuration principle output by LLM, and the statistical quantities of voltage safety index and frequency safety index are obtained through year-round time-series production simulation verification. If the over-limit rate of voltage safety index is lower than the over-limit rate threshold of voltage safety index and the over-limit rate of frequency safety index is lower than the over-limit rate threshold of frequency safety index, the effectiveness verification is passed; otherwise, it is not passed.
[0045] Preferably, the basic operating scenario includes the annual load curve, the new energy output curve, the available equipment set, and the equipment operation and maintenance methods.
[0046] Preferably, step S3 further includes: The AI agent constructs an extrapolation verification scenario by applying perturbations to the basic operating scenario; wherein the perturbations include at least one of the following: load level changes, fluctuations in new energy output, partial equipment shutdown, and equipment operation mode switching.
[0047] In each extrapolation verification scenario, the power system is simulated throughout the year using optimized combinations of energy storage configuration parameters to obtain the power system dispatch results. The voltage safety index and frequency safety index are statistically analyzed to calculate the pass rate of the extrapolation verification scenario. For any extrapolation verification scenario, if the over-limit rates of the voltage safety index and frequency safety index in the corresponding power system dispatch results are both lower than the corresponding thresholds, the extrapolation verification scenario passes; otherwise, it fails. The validity verification criteria also include: whether the pass rate of the extrapolation verification scenario is greater than a preset threshold; if so, the validity verification is passed.
[0048] Specifically, the AI Agent constructs extrapolation verification scenarios by applying disturbances beyond the historical distribution range to the basic operation scenario. This is to simulate and verify disturbances such as extreme loads, new energy fluctuations, key equipment outages, and short-circuit faults, in order to evaluate the robustness and applicability boundaries of the energy storage configuration principles output by LLM under conditions exceeding the historical sample range, and to record the pass rate of each extrapolation verification scenario.
[0049] S4, the AI Agent expands the energy storage capacity and power in the current energy storage configuration principle according to the corresponding proportions to update the current energy storage configuration principle; the updated current energy storage configuration principle is input into the AI Agent to obtain multiple energy storage configuration parameter optimization combinations, and then performs a year-round time-series production simulation again and constructs prompt information to input into LLM, so that LLM can select the best energy storage configuration principle from the current energy storage configuration principle before the update and the updated current energy storage configuration principle, and use it as the current energy storage configuration principle, and return to S3.
[0050] Specifically, if the validity verification of the current energy storage configuration principle in step S3 fails, the AI Agent expands the energy storage capacity in the current energy storage configuration principle by a first ratio and expands the energy storage power in the current energy storage configuration principle by a second ratio to update the current energy storage configuration principle. Then, the updated current energy storage configuration principle is input into the AI Agent to obtain multiple optimized combinations of energy storage configuration parameters. Under the basic operation scenario, the power system is simulated for the whole year using each optimized combination of energy storage configuration parameters to obtain the power system dispatch results. The voltage safety index, frequency safety index, economic index and constraint violation list are statistically analyzed and constructed into a prompt message and input into LLM so that LLM can select the best energy storage configuration principle from the current energy storage configuration principle before the update and the updated current energy storage configuration principle, and use it as the current energy storage configuration principle, and return to S3.
[0051] The AI Agent ultimately outputs verified energy storage configuration principles, including optimal energy storage capacity and power. These principles may further include applicable conditions, recommended configuration ranges for other energy storage configuration parameters (such as the location of energy storage devices), control strategies and parameter suggestions, risk warnings and exception clauses, and explanations of the cited basis.
[0052] In this invention, the AI Agent is used to generate energy storage configuration parameters, invoke the year-round time-series production simulation module to perform year-round time-series production simulation, construct extrapolation verification scenarios, and verify the effectiveness of the energy storage configuration principles output by the LLM. Its working principle is based on a closed-loop decision-making mechanism of "rule constraint driving, simulation result feedback driving, and iterative convergence control". Specifically, the AI Agent first performs constrained modeling of the energy storage configuration space and the operation scenario space based on the input system topology, operating boundary conditions, power system planning constraints, and multiple energy storage configuration principles. It limits configuration parameters such as energy storage capacity, power, layout location, and control strategy, as well as scenario parameters such as load level, new energy output, equipment status, and network boundary, to within the engineering feasible range, thereby constructing a searchable configuration-scenario joint decision space. Based on this, the AI Agent generates a set of energy storage configuration parameters according to a preset search strategy, and calls the annual time-series production simulation module to perform an annual time-series production simulation based on the energy storage configuration parameters under the basic operation scenario. The processing module extracts voltage safety indicators, frequency safety indicators, economic indicators, and constraint violation lists from the power system operation results obtained from the annual time-series production simulation and constructs them into prompt information. The prompt information is input to the LLM so that the LLM can select the best energy storage configuration principle from the multiple energy storage configuration principles. The AI Agent verifies the validity of the best energy storage configuration principle. If the verification fails, the best energy storage configuration principle is updated and input into the AI Agent to obtain multiple optimized combinations of energy storage configuration parameters. The annual time-series production simulation is performed again, and prompt information is constructed and input into the LLM so that the LLM can select the best energy storage configuration principle from the current energy storage configuration principle before the update and the current energy storage configuration principle after the update. This is then used as the current energy storage configuration principle for validity verification again until the validity verification of the best energy storage configuration principle output by the LLM passes, and the final energy storage configuration principle is output. Through this mechanism, the Agent realizes a closed-loop iterative process of "simulation calculation - index evaluation - rule extraction - policy update", thereby performing adaptive search and rule extraction in multiple scenarios and multiple parameter spaces, gradually approaching the energy storage configuration principle that simultaneously meets the requirements of safety and economy.
[0053] It should be noted that the artificial intelligence agent in this embodiment of the invention is also equipped with an LLM model, and has functions such as calling the annual time-series production simulation module, processing module, validity verification of energy storage configuration principles, and adaptive updates. It can be implemented using intelligent agents such as OpenClaw.
[0054] Preferably, both the AI Agent and LLM constrain the output by generating a RAG access power system knowledge base through retrieval enhancement.
[0055] Specifically, the power system knowledge base consists of literature knowledge, regulatory knowledge, and fundamental theoretical knowledge, with metadata annotation for each knowledge entry (e.g., source, applicable conditions, applicable voltage level, scenario type, indicator object, etc.). In other words, this power system knowledge base systematically integrates and annotates three types of knowledge sources: First, literature knowledge. This mainly comes from academic journals and conference papers, incorporating cutting-edge research results and methods, such as advanced frequency security analysis algorithms, optimized control strategies for energy storage systems participating in grid frequency regulation, the calculation framework for the generalized short-circuit ratio, and its engineering threshold experience, providing innovative analytical perspectives, model assumptions, and solutions for the model, ensuring technological foresight. Second, regulatory knowledge: derived from national and industry standards, technical guidelines, and power grid planning and dispatching operation procedures. This type of knowledge defines the "hard constraints" and core engineering rules for the safe and stable operation of the system, such as the allowable deviation range of voltage and frequency, the rate of change of frequency (ROCOF) limit, the fault ride-through requirements for new energy generation units, and the principles for configuring system reserve capacity, ensuring that the model output results are compliant and auditable. Third, fundamental theoretical knowledge. It covers the basic principles and common knowledge of power system analysis, control and operation, such as power flow calculation, stability analysis, equivalent methods, dynamics of energy storage state of charge (SOC), frequency regulation control mechanism, and grid-connected interaction characteristics of power electronic equipment, so that the model can build a complete analysis chain based on basic principles and improve the credibility of the model output results.
[0056] The LLM used in this invention is a pre-trained LLM, and the pre-training process includes: (1) Text semantic segmentation Text semantic segmentation is the process of transforming raw domain materials into standardized knowledge fragments that are trainable, searchable, and alignable. This process involves cleaning and structuring the raw text, removing irrelevant information such as tables of contents, headers and footers, and repeated paragraphs, and normalizing terms, units, and key indicators (e.g., mapping "RoCoF", "df / dt", and "frequency change rate" to the same standardized field) to ensure consistency in knowledge representation.
[0057] Furthermore, this process segments the text into "minimum usable knowledge units" based on semantic integrity boundaries. Each unit typically contains four elements: First, an ontology statement of the rule or conclusion, such as "When the proportion of new energy is higher than X, a fast frequency response capability ≥ Y needs to be configured"; second, clear applicable conditions, including constraints such as voltage level, operating mode, fault type, and time scale; third, the associated specific technical indicators and their thresholds, such as voltage intensity, generalized short-circuit ratio, or frequency safety limits; and fourth, accurate source identification, such as relevant literature or standard clause numbers.
[0058] After segmenting the knowledge units, structured tags and metadata descriptions are further established for each knowledge fragment. These tags preferably include one or more of the following: topic category, applicable scenario, indicator object, constraint type, equipment object, voltage level, time scale, and source type. For example, they can be labeled with topics such as "frequency safety," "voltage stability," "system strength," and "energy storage control." Through these tags and metadata descriptions, discrete knowledge fragments can be organized into indexable, filterable, and associative knowledge entries, facilitating subsequent retrieval, matching, and retrieval based on scenario characteristics, indicator type, or constraint type. This provides a unified knowledge organization foundation for RAG retrieval and subsequent rule generation.
[0059] (2) QA pair generation: turning knowledge into "questionable and answerable" supervised samples To build an LLM model that can respond to real-world engineering needs, structured knowledge fragments need to be transformed into trainable "instruction-response" samples. The core of this approach lies in enabling the model to learn, through high-quality "question-answer pairs," to generate professional and compliant engineering responses under given constraints.
[0060] The questions are designed to simulate real-world engineering consulting scenarios, and are typically formulated by integrating specific conditions and technical objectives. Examples include: "In scenarios with high renewable energy penetration and low inertia, how should energy storage be configured to meet frequency variation rate constraints?" or "When the generalized short-circuit ratio at the grid connection point is low, how should the layout and control strategies of the energy storage system be adjusted?"
[0061] The construction of an answer needs to go beyond simple conclusions and present a structured knowledge system. A complete answer should include: configuration principles and specific thresholds based on "If-Then" logic, explanations of the reasons for the related physical mechanisms or technical indicators, clarification of "why this is so", a clear definition of the scope of application of the suggestion and possible exceptions, and corresponding provisions or literature citations, ensuring the traceability and authority of the answer.
[0062] To achieve the generalization capability of the LLM model, a systematic coverage strategy is adopted. By systematically combining different scenario conditions (such as load level, renewable energy output, fault type, source-grid-load-storage ratio, energy storage penetration rate range, etc.), a large-scale and diverse "question-answer pairs" are generated to improve the reasoning and adaptability when facing unseen or complex engineering scenarios.
[0063] (3) Fine-tuning: from the original LLM model to the domain expert model In the model fine-tuning stage, the Parametric Efficient Fine-Tuning (PEFT) method is adopted. Its core idea is to introduce a low-rank incremental adapter to inject domain knowledge without making large-scale changes to the original model parameters.
[0064] Specifically, suppose the weight matrix of a certain layer in the original model is During fine-tuning, do not update directly. And by introducing an increment matrix of low-rank decomposition This makes the forward propagation of that layer become ,in .matrix B and A rank r Much smaller than the original dimension d This low-rank adaptation (LoRA) strategy reduces the number of parameters to be trained, lowers computational costs, and mitigates the catastrophic forgetting problem.
[0065] To ensure the model's behavior is stable during the initial training phase It is usually initialized to zero. Figure 3 "in "" indicates a common initialization for LoRA: set the increment to 0 initially to ensure that the model output does not change abruptly when fine-tuning begins, and then gradually learn the domain increment during training. This represents the standard deviation of the normal distribution at initialization.
[0066] By training with the aforementioned domain knowledge question-answering pairs containing "instruction-structured response," the model gradually learns low-rank increments. The expert knowledge encoded in the model is fine-tuned. The resulting domain expert model exhibits the following key characteristics: First, it can accurately and consistently use power system terminology and standardized expressions; second, it possesses the ability to perform logical reasoning based on specific engineering conditions (such as renewable energy penetration rate and short-circuit capacity) and output structured configuration principles and threshold suggestions; third, and most importantly, because its training samples themselves contain a complete logical chain of "indicator-threshold-conclusion-explanation," the model's generated answers can maintain intrinsic alignment with the engineering logic verified by simulation, thus providing reliable decision support in actual workflows.
[0067] The constructed domain expert model not only possesses the ability to reason within known conditions, but also has a proactive mechanism of "extrapolation verification and iteration" to expand and correct its knowledge boundaries. This mechanism constitutes a self-reinforcing closed-loop workflow.
[0068] First, the domain expert model generates preliminary energy storage configuration principles based on existing knowledge and input simulation results and statistical information. Then, an AI agent further constructs boundary scenarios for extrapolation verification. These boundary scenarios are not directly derived from the original training samples but are constructed by applying perturbations to existing historical or verification scenarios. After construction, the extrapolation verification scenarios are input into a year-long time-series production simulation for verification, checking whether the energy storage configuration principles still meet the validity requirements under conditions exceeding the original sample range. Through this process, the applicable boundaries, failure conditions, and weaknesses of the configuration principles can be identified, thus providing a basis for subsequent rule corrections and iterative updates.
[0069] The simulation results are used to assess the reliability of expert model recommendations. When a model's recommendation in an extrapolated scenario is found to be infeasible or violates constraints in simulation, the "failed sample" is not simply discarded. Instead, the "extrapolation conditions" and "simulation violation information" are encapsulated together and transformed into new question-answer pairs or preference ranking samples with corrective labels. These new samples are then fed back into the training data pool and can be used for incremental fine-tuning of the model or supplementation of the domain knowledge base.
[0070] Through this closed-loop process, the LLM model can continuously correct errors in extrapolation through a continuous "generate-verify-feedback" cycle, gradually improving its robust decision-making and generalization capabilities in complex and unknown engineering scenarios.
[0071] The specific steps for simulating the entire year's time-series operation are explained in further detail below.
[0072] (1) Input data for timing simulation The core logic of time-series simulation lies in ensuring that the input data simultaneously covers "time dimension data", "system basic data" and "coupled object data", thus ensuring time continuity and coupling correlation.
[0073] Specifically, the input data for time-series operation simulation mainly includes the following three categories: First, basic time-dimensional data. This refers to the predicted time-series data of the system at the hourly granularity throughout the year or the entire cycle, such as load curves, renewable energy output curves, and supply time-series data of related coupled resources (such as natural gas); Second, system static parameters. This includes structural parameters of the grid or pipeline network, and equipment operating characteristic parameters (such as generator ramp rate, energy storage efficiency, constraint coefficients of coupled equipment, etc.); Third, time-series correlation parameters. These are used to describe the state transitions across time periods, such as the initial reservoir capacity of a hydropower station, the initial state of charge of an energy storage system, and the initial time-series data of pressure or temperature in the coupled network.
[0074] Taking the electro-thermal coupling scenario as an example, the instantiation of these three types of data includes: 1. Time-series forecast data: annual electricity load curve Heat load curveq ( t Wind / Solar Maximum Capacity Generation Time Sequence Natural gas supply data Second, static parameters: generator rated capacity. Thermo-electric constraint coefficient of cogeneration units Gas pipeline transmission limits 3. Time-series correlation parameters: initial reservoir capacity of the hydropower station Initial SOC value of energy storage, initial pressure of pipeline By integrating this data, a complete and computable time-series simulation model can be constructed.
[0075] (2) Construction of time-series simulation model The core logic of constructing a time-series simulation model lies in taking "time continuity" and "coupling synergy" as the core, clarifying the objective function, time constraints, and coupling constraints, and forming a complete mathematical model.
[0076] The model structure mainly includes: 1. Objective function (which must reflect time-series cumulative characteristics): The objective function is to minimize the sum of the total cost (e.g., power generation cost, coupled resource loss cost) and penalties (e.g., renewable energy curtailment penalty, coupled resource shortage penalty) over the entire system lifecycle. The mathematical expression is: System operating cost, coupled resource loss cost, and penalty term. 2. Constraints.
[0077] (3) Specific modeling process The constraints considered in the annual time-series production simulation include the operational constraints of various devices and system constraints.
[0078] The power system operating constraints are: Node power balance constraints (1) In the formula, Indicating the system t The power is received by the soft and direct flow at all times. for Time Node i The grid-connected wind power at the location, for Time Node i The output of the thermal power units at the location, and They are respectively Time Node i The charging and discharging power of the grid-type energy storage at the location, for Time Node Load power at the location.
[0079] Energy storage operation constraints include: 1) State constraints of grid-based energy storage:
[0080] (2) In the formula, E For the existing stored electricity in a grid-type energy storage system, E ESS This refers to the total capacity of the grid-type energy storage battery.
[0081] 2) Energy storage upper and lower limit constraints: (3) In the formula, and These are grid-type energy storage i exist t The charging and discharging power at any given time and These represent the maximum and minimum active power of grid-type energy storage, respectively.
[0082] 3) Constraints on the depth of charge and discharge of energy storage: (4) In the formula, and These represent the upper and lower limits of the state of charge of the energy storage unit.
[0083] The operating constraints of thermal power units include: Equation (5) is the working power range constraint, Equation (6) is the unit ramp constraint, Equation (7) is the start-stop ramp constraint, and Equation (8) is the minimum start-stop time constraint.
[0084] (5) (6) (7) (8) In the formula, , Minimum and maximum output of the respective units for The timing of unit start-up and shutdown for The timing of unit start-up and shutdown for Unit power at any given time , These represent the maximum uphill / downhill ramp rates of the thermal power unit, respectively. , They represent thermal power units Maximum power consumption during startup / shutdown; It is a constant with a large value (e.g.) ), used to ensure that formulas (6) and (7) always hold true when the thermal power unit is in a non-corresponding state. , They represent t Periodic thermal power units The system still needs to maintain its operation and downtime.
[0085] 4) Constraints on the operation of new energy sources include: (9) In the formula, express t Periodic new energy units Maximum force that can be generated.
[0086] In summary, the annual time-series production simulation model of the power system including energy storage is shown in equation (10).
[0087] (10) In the formula, and These represent the set of decision variables and external information (time series data of new energy sources and loads) of the model, respectively, both with a time dimension of 8760h. Total annual operating costs To optimize the time scale length (total number of time periods). For the set of equality constraints, Let be the set of inequality constraints. The set of decision variables over the entire year. This is a set of external input data for the entire year within the time domain.
[0088] Furthermore, by decomposing the problem along the time dimension, the original problem of 8760 hours throughout the year is broken down into multiple time steps. This sub-optimization problem significantly reduces the difficulty of solving the model. The overall system cost includes coal consumption of thermal power units, start-up and shutdown costs, investment costs of grid-based energy storage, charging and discharging costs of grid-based energy storage, and wind curtailment costs. (13) This indicates the coal consumption cost of thermal power units. This indicates the start-up and shutdown costs of thermal power units. Indicates the investment cost of grid-type energy storage. This represents the cost of wind curtailment. Among them: (14) (`5) (16) (17) (18) In the formula, To plan the number of hours within a single day, This refers to the number of thermal power units. Configure the number of nodes for grid-type energy storage. The number of wind power nodes. For the unit i The unit output power coal consumption cost, For the unit i exist Output power at any moment For the unit The coal consumption cost function, For the unit i exist The level of output at any given moment function value and Forming a quadratic relationship, Costs associated with starting and stopping thermal power units. , , These are the coefficients of the quadratic, linear, and constant terms of the fuel cost function, respectively. and The units i Start-up and shutdown costs, and Recording units i exist A 0-1 variable representing the start-up and shutdown actions at all times. The equivalent daily investment cost for grid-type energy storage, Cost per unit power capacity of battery energy storage units. Cost per unit energy capacity of battery storage units. The rated power capacity of the battery energy storage unit. This refers to the rated energy capacity of the battery energy storage unit. The expected lifespan of grid-type energy storage is expressed in days. To determine the unit cost of grid-connected energy storage during off-peak hours, The unit discharge cost of grid-type energy storage at peak load, This is the wind curtailment penalty coefficient. for t Wind curtailment rate at all times for t Shike Wind Farm Station j Maximum output.
[0089] (4) Detailed solution process The time-series simulation is quite complex and difficult to solve directly. The model complexity mainly stems from three aspects: time dimension, unit dimension, and model dimension. For power systems with a relatively small number of units and line nodes, resulting in low unit and model dimensions, the main factor contributing to the difficulty in solving the time-series simulation is the large time dimension caused by the long-term simulation of 8760 hours. Therefore, it is necessary to employ methods such as... Figure 3 The segmented solution method shown decomposes the entire year into several short time segments, solves them sequentially, and uses the results of the last few time segments of the previous sub-segment as the starting state of the next sub-segment to satisfy the time segment coupling constraint and ensure the completeness and feasibility of the solution results.
[0090] After decomposing the annual time-series simulation model into several sub-period problems, each sub-period is solved sequentially. Finally, the results of each sub-period are summed to obtain the complete annual time-series simulation results. The complete solution process is as follows: Figure 4 As shown. For large power systems, the length of a sub-time period is generally set to one day or one week under acceptable computational complexity. However, too many sub-time periods will affect the accuracy of the simulation. For power systems with fewer lines and generating units, the length of the sub-time periods can be set to be longer, within the limits of computational capacity, to reduce the number of time periods and obtain more accurate solution results.
[0091] This invention provides an electronic device, including: a computer-readable storage medium and a processor; The computer-readable storage medium is used to store executable instructions; The processor is configured to read executable instructions stored in the computer-readable storage medium and execute the method as described in any of the above embodiments.
[0092] This invention provides a computer-readable storage medium storing computer instructions that cause a processor to perform the method described in any of the above embodiments.
[0093] This invention provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the method described in any of the above embodiments.
[0094] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for generating energy storage configuration principles based on LLM and time-series production simulation, characterized in that, include: S1, the topology, operating boundary conditions, basic operating scenarios, planning constraints, and multiple energy storage configuration principles of the power system are input into the artificial intelligence agent to obtain multiple combinations of energy storage configuration parameters of the power system; wherein, the energy storage configuration parameters include energy storage capacity, energy storage power, energy storage device layout location, and energy storage device control strategy; the energy storage configuration principles include energy storage capacity and energy storage power; S2, under the basic operating scenario, the power system is simulated for the whole year using various energy storage configuration parameter combinations to obtain the power system dispatch results. The voltage safety index, frequency safety index, economic index and constraint violation list are statistically analyzed and constructed into prompt information and input to LLM so that LLM can select the best energy storage configuration principle from the multiple energy storage configuration principles and use it as the current energy storage configuration principle, and then proceed to S3. In the process of simulating the production time sequence throughout the year, the annual model is decomposed into multiple sub-optimization problems through time dimension decomposition and solved sequentially. The solution results of each sub-optimization problem are spliced or updated in a rolling manner to obtain the power system dispatching results. S3: Input the current energy storage configuration principle into the artificial intelligence agent to obtain multiple optimized combinations of energy storage configuration parameters; under the basic operation scenario, use each optimized combination of energy storage configuration parameters to perform a year-round time-series production simulation of the power system to obtain the power system dispatch results, and statistically analyze the voltage safety index and frequency safety index to verify the effectiveness of the current energy storage configuration principle. If the effectiveness verification is successful, the current energy storage configuration principle is adopted as the final energy storage configuration principle; otherwise, proceed to S4. S4, the AI Agent expands the energy storage capacity and power in the current energy storage configuration principle according to the corresponding proportions to update the current energy storage configuration principle; the updated current energy storage configuration principle is input into the AI Agent to obtain multiple energy storage configuration parameter optimization combinations, and then performs a year-round time-series production simulation again and constructs prompt information to input into LLM, so that LLM can select the best energy storage configuration principle from the current energy storage configuration principle before the update and the updated current energy storage configuration principle, and use it as the current energy storage configuration principle, and return to S3.
2. The method as described in claim 1, characterized in that, In step S2, the prompt information includes energy storage configuration parameter combinations, basic operating scenarios, statistics of voltage safety indicators and frequency safety indicators, constraint violation list, and economic indicators.
3. The method as described in claim 1, characterized in that, The validity verification standard is as follows: if the over-limit rate of both voltage safety index and frequency safety index is lower than the corresponding threshold, the validity verification is passed; otherwise, it is not passed.
4. The method as described in claim 3, characterized in that, The basic operating scenarios include the annual load curve, the output curve of new energy sources, the set of available equipment, and the equipment operation and maintenance methods.
5. The method as described in claim 4, characterized in that, Step S3 also includes: The AI agent constructs an extrapolation verification scenario by applying perturbations to the basic operating scenario; wherein, the perturbations include at least one of the following: load level changes, fluctuations in new energy output, partial equipment shutdown, and equipment operation mode switching; In each extrapolation verification scenario, the power system is simulated throughout the year using optimized combinations of energy storage configuration parameters to obtain the power system dispatch results. The voltage safety index and frequency safety index are statistically analyzed to calculate the pass rate of the extrapolation verification scenario. For any extrapolation verification scenario, if the over-limit rates of the voltage safety index and frequency safety index in the corresponding power system dispatch results are both lower than the corresponding thresholds, the extrapolation verification scenario passes; otherwise, it fails. The validity verification criteria also include: whether the pass rate of the extrapolation verification scenario is greater than a preset threshold; if so, the validity verification is passed.
6. The method as described in claim 1, characterized in that, Both the AI Agent and LLM generate the RAG access power system knowledge base through retrieval enhancement.
7. An electronic device, characterized in that, include: Computer-readable storage media and processors; The computer-readable storage medium is used to store executable instructions; The processor is configured to read executable instructions stored in the computer-readable storage medium and execute the method as described in any one of claims 1-6.
8. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a processor to perform the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Energy storage capacity optimal configuration method based on power system time sequence production simulation
CN115425668A
LLM-Agent-based transformer substation TSN intelligent scheduling method and system
CN121216728A