Large language model-assisted power system frequency stability control method, device, equipment and storage medium
By using a large language model to assist in formulating low-frequency load reduction control rules, combined with physical simulation and natural language processing technology, the parameter combination range and special wheel starting conditions that do not meet the control rules are identified, which solves the problem of insufficient adaptability of traditional low-frequency load reduction strategies in power grids with high penetration of new energy, and realizes the effectiveness and accuracy of intelligent frequency control.
Patent Information
- Application Number
- CN202510771535.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-06-11
AI Technical Summary
Traditional low-frequency load reduction strategies are difficult to adapt to the dynamic characteristics of the frequency change rate in power grids with high penetration of new energy, resulting in over- or under-load shedding. The contradiction between model dependence and uncertainty makes it difficult to match actual operating conditions and results in insufficient adaptability.
Large language models are used to assist in formulating low-frequency load reduction control rules. Combined with physical simulation and natural language processing technology, the parameter combination range that does not meet the control rules and special wheel starting conditions are identified. The control strategy is updated through the frequency prediction model to achieve intelligent frequency control.
It improves the stability of the power system frequency, effectively responds to the highly uncertain regulation needs of the new energy power system, and improves the adaptability and accuracy of frequency regulation.
Smart Images

Figure CN120320358B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power systems, and in particular to a method, apparatus, device and storage medium for frequency stability control of a power system assisted by a large language model. Background Art
[0002] With the large-scale integration of renewable energy sources such as wind power and photovoltaics into the power system, the grid structure has gradually shifted from the traditional model dominated by synchronous units to a "low inertia, high power electronics" model. New energy units are connected to the grid through voltage source inverters. Their output is highly random, intermittent, and has weak inertial support characteristics. This results in complex characteristics such as multi-time scale coupling and prominent nonlinear response in the frequency dynamic process of the system after disturbance. In this scenario, the traditional under-frequency load shedding (UFLS) strategy based on the electromechanical transient characteristics of synchronous machines faces the following technical bottlenecks:
[0003] Mismatch between static thresholds and dynamic response: Traditional under-frequency load shedding relies on a preset fixed frequency threshold and delayed shedding logic. However, in systems with high renewable energy penetration, the rate of change of frequency (RoCoF) increases significantly. Influenced by factors such as renewable energy output fluctuations and virtual inertia control strategies, the frequency trajectory exhibits a complex pattern of rapid drops and multi-stage recoveries. Fixed thresholds struggle to adapt to the time-varying frequency safety margins during dynamic operation, easily leading to over-shedding (economic loss) or under-shedding (risk of instability).
[0004] The conflict between model dependency and uncertainty: Existing improved under-frequency load shedding schemes are often based on offline simulations or probabilistic models to generate action strategies, requiring assumptions about boundary conditions such as the fluctuation range of renewable energy output and a set of fault scenarios. However, the high proportion of renewable energy integrated into the grid leads to flexible and variable system operation, significantly increasing uncertainty on both the source and load sides. Traditional model-driven strategies struggle to adapt to actual operating conditions in real time, resulting in insufficient protection adaptability. Summary of the Invention
[0005] The present application provides a method, device, equipment and storage medium for frequency stability control of an electric power system assisted by a large language model, aiming to utilize the powerful adaptive capabilities of artificial intelligence content generation technology to achieve efficient frequency optimization control and make up for the lack of adaptability of traditional methods. First, a low-frequency load reduction control rule for a new energy power system is formulated, and then a multi-dimensional database of system operating characteristics is formed based on offline simulation tests. By retrieving working conditions that do not meet the low-frequency load reduction rule, the conclusion is input into a large model for learning, and finally a decision-making implementation plan for intelligent frequency control assisted by a large language model is proposed. The present application can effectively improve the stability of the frequency of the electric power system, provide a new technical reference for intelligent frequency control of the electric power system, and has high application value.
[0006] In a first aspect, the present application provides a large language model-assisted power system frequency stabilization control method, comprising:
[0007] Formulate low-frequency load reduction control rules;
[0008] Based on the processing results of historical data samples, physical simulation and natural language processing technologies are used to identify the target parameter combination range that does not meet the under-frequency load reduction control rules and the conditions for special wheel starting; wherein the target parameter combination range includes the range of system inertia constant, generator and load levels, power shortage ratio and new energy penetration rate;
[0009] An intelligent frequency control system is established. The intelligent frequency control system is configured with a knowledge base, a frequency prediction model, and a large language model. The knowledge base stores the low-frequency load shedding control rules, the target parameter combination range, and the conditions for starting the special wheel. In response to an input data sample, the intelligent frequency control system obtains the low-frequency load shedding control rules, the target parameter combination range, and the conditions for starting the special wheel from the knowledge base and embeds them into a prompt word. The large language model is used to determine the parameter combination range of the input data sample. If the parameter combination range is included in the target parameter combination range, an execution plan is output based on the prompt word. If the parameter combination range is not included in the target parameter combination range, the frequency prediction model is activated to obtain a frequency prediction curve, the prompt word is updated according to the frequency prediction curve, and an execution plan is output based on the updated prompt word.
[0010] In one possible design, an underfrequency load reduction regulation rule is formulated, including:
[0011] Setting a preliminary load shedding plan; wherein the preliminary load shedding plan includes multiple basic rounds, the frequency threshold of each basic round action decreases step by step, and the load shedding amount of each basic round is a fixed value; wherein the fixed value is a fixed load shedding power of a set proportion;
[0012] A first-level special wheel is set, and the load shedding amount of the special wheel is determined according to the load shedding amount of the basic wheel in the previous round and the adjusted load shedding amount output by the large model; wherein the initial value of the adjusted load shedding amount output by the large model is set to 0;
[0013] Based on the multi-stage basic wheel and the first-stage special wheel, key frequency control rules are set.
[0014] In one possible design, the key frequency control rules include:
[0015] Rule 1: After the automatic under-frequency load reduction device is activated, the system steady-state frequency is restored to no less than the first frequency threshold;
[0016] Rule 2: Add a special level 1 wheel to prevent the system frequency from being below the second frequency threshold for a long time;
[0017] Rule 3: Limit the system frequency to a time below the third frequency threshold that does not exceed the set time;
[0018] Rule 4: For frequency overmodulation caused by load over-cut, the maximum frequency shall not exceed the fourth frequency threshold.
[0019] In one possible design, the target parameter combination range and the special wheel starting conditions that do not meet the low-frequency load reduction control rule identified by the large language model include:
[0020] Under the conditions that the engine inertia constant fluctuation range is 2-4, and the generator and load fluctuation range is 200-300 W:
[0021] When the power shortage accounts for 7% of the total power, if the proportion of renewable energy is between 18% and 30%, one round of load shedding will be implemented; if the proportion of renewable energy exceeds 30%, two rounds of load shedding will be implemented;
[0022] When the power shortage accounts for 10% of the total power, if the proportion of new energy is 18%-30%, one or two rounds of load shedding will be implemented; if the proportion of new energy exceeds 30%, one or two rounds of load shedding will be implemented and then a special round will be started;
[0023] When the power shortage accounts for 12% of the total power, if the proportion of new energy is 18%-30%, two rounds of load shedding will be implemented; if the proportion of new energy exceeds 30%, two rounds of load shedding will be implemented and then the special round will be started.
[0024] In one possible design, the load reduction of the special wheel is determined by the following formula: :
[0025] ,
[0026] In the formula For fixed load shedding, The load reduction amount for large model output is adjusted, and the default value is 0.
[0027] In one possible design, updating the prompt word according to the frequency prediction curve includes:
[0028] If the steady-state value of the frequency prediction curve is not lower than 49.5 Hz, the prompt word is not updated;
[0029] If the steady-state value of the frequency prediction curve is lower than 49.5 Hz, the special wheel is started, and it is determined whether the maximum value of the frequency prediction curve after starting the special wheel exceeds 51 Hz. If so, the prompt word is updated to start the special wheel within the current parameter combination range and reduce the load reduction amount. If not, the prompt word is updated to start the special wheel within the current parameter combination range.
[0030] In a possible design, while the prompt word is updated according to the frequency prediction curve, the target parameter combination range that does not meet the low-frequency load reduction control rule and the conditions for starting the special wheel are also updated.
[0031] In a second aspect, the present application provides a large language model-assisted power system frequency stability control device, the device comprising:
[0032] A control mode determination module is configured to formulate an under-frequency load reduction regulation rule;
[0033] a preliminary identification module configured to identify, based on the processing results of historical data samples, a target parameter combination range that does not satisfy the under-frequency load reduction control rule and a condition for special wheel activation using physical simulation and natural language processing technology; wherein the target parameter combination range includes a range of system inertia constant, generator and load levels, power shortage ratio, and / or new energy penetration rate;
[0034] The intelligent control module is configured to establish an intelligent frequency control system. The intelligent frequency control system is configured with a knowledge base, a frequency prediction model, and a large language model. The knowledge base stores the low-frequency load shedding control rules, the target parameter combination range, and the conditions for starting the special wheel. In response to an input data sample, the intelligent frequency control system obtains the low-frequency load shedding control rules, the target parameter combination range, and the conditions for starting the special wheel from the knowledge base and embeds them into a prompt word. The intelligent frequency control system uses the large language model to determine the parameter combination range of the input data sample. If the parameter combination range is within the target parameter combination range, an execution plan is output based on the prompt word. If the parameter combination range is not within the target parameter combination range, the frequency prediction model is activated to obtain a frequency prediction curve, the prompt word is updated according to the frequency prediction curve, and an execution plan is output based on the updated prompt word.
[0035] In a third aspect, an embodiment of the present application provides an electronic device comprising: at least one processor and a memory; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the large language model-assisted power system frequency stability control method as described in the first aspect and various possible designs of the first aspect.
[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer-executable instructions. When a processor executes the computer-executable instructions, the large language model-assisted power system frequency stability control method described in the first aspect and various possible designs of the first aspect is implemented.
[0037] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the large language model-assisted power system frequency stability control method as described in the first aspect and various possible designs of the first aspect.
[0038] The large language model-assisted power system frequency stability control method, device, equipment, and storage medium provided in this application have at least the following beneficial effects:
[0039] This application develops low-frequency load reduction control rules for new energy power systems, and then forms a multidimensional database of system operating characteristics based on offline simulation tests. By retrieving operating conditions that do not meet the low-frequency load reduction rules, the conclusions are input into a large model for learning. Finally, a decision-making implementation plan for large language model-assisted frequency intelligent control is proposed. A large language model-assisted frequency intelligent control model is constructed using Python evaluation in the Windows 11 system environment, verifying the effectiveness of the proposed control method, which can effectively cope with the highly uncertain regulation needs of new energy power systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0041] Figure 1 A flowchart of a large language model-assisted power system frequency stability control method provided in an embodiment of the present application;
[0042] Figure 2 This is a flowchart of the frequency intelligent control system provided in the embodiment of the present application;
[0043] Figure 3 This is a diagram showing the RAG combined with function calling solution provided in an embodiment of the present application;
[0044] Figure 4 Comparison of frequency curves before and after the large model provided in the embodiment of this application participates in regulation;
[0045] Figure 5 A structural diagram of a large language model-assisted power system frequency stabilization control device provided in an embodiment of the present application.
[0046] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0047] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0048] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0049] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned. They should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0050] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0051] At present, the high proportion of new energy grid connection has led to increasingly complex frequency response characteristics of the power system after disturbance. The traditional low-frequency load reduction method cannot effectively cope with the strong uncertainty of the regulation demand of the new energy power system. Based on this, the embodiment of the present application provides a large language model-assisted power system frequency stability control method, such as Figure 1 As shown, it is a flow chart of a large language model-assisted power system frequency stabilization control method provided in an embodiment of the present application. The large language model-assisted power system frequency stabilization control method includes the following steps S100-S300.
[0052] S100: Formulate low-frequency load reduction control rules.
[0053] In this embodiment, the purpose of S100 is to formulate low-frequency load reduction control rules for the new energy power system.
[0054] In some embodiments, step S100 may include the following steps:
[0055] S101. Set a preliminary load reduction plan; wherein, the preliminary load reduction plan includes multiple basic rounds, the frequency threshold of each basic round action decreases step by step, and the load reduction amount of each basic round is a fixed value; wherein, the fixed value is a fixed load reduction power of a set proportion.
[0056] As a preferred implementation, referring to the actual load shedding mode of the power grid, the preliminary load shedding plan sets 4 basic rounds, whose action frequency thresholds are 49.2, 48.8, 48.4 and 48.0 Hz respectively; the load shedding amount in each round is Set them to 27%, 27%, 23% and 23% of the fixed load reduction power respectively.
[0057] S102. Set a first-level special wheel, and the load reduction amount of the special wheel is determined according to the load reduction amount of the basic wheel in the previous round and the adjusted load reduction load output by the large model; wherein the initial value of the adjusted load reduction load output by the large model is set to 0.
[0058] As a preferred embodiment, on the basis of setting up a multi-stage basic wheel, a special wheel is set up, and the intelligent control model determines whether it moves and its load reduction The calculation of is shown in formula (1).
[0059] (1)
[0060] In the formula For fixed load shedding, The load reduction amount for large model output is adjusted, and the default value is 0.
[0061] By implementing a special gear, the system frequency can be effectively restored to a safe and stable level of 49.6Hz or above during emergency control. By implementing both a special gear and a multi-stage basic gear, the frequency regulation characteristics of the generator sets can be maximized to compensate for power shortfalls in the system, minimizing the total amount of load shedding, ensuring the reliability of load shedding measures while optimizing their economic efficiency.
[0062] S103: Based on the multi-level basic wheels and the first-level special wheel, set key frequency control rules.
[0063] In some embodiments, the frequency control key rules include:
[0064] Rule 1: After the automatic under-frequency load reduction device is activated, the system steady-state frequency is restored to no less than the first frequency threshold;
[0065] Rule 2: Add a special level 1 wheel to prevent the system frequency from being below the second frequency threshold for a long time;
[0066] Rule 3: Limit the system frequency to a time below the third frequency threshold that does not exceed the set time;
[0067] Rule 4: For frequency overmodulation caused by load over-cut, the maximum frequency shall not exceed the fourth frequency threshold.
[0068] As a preferred implementation, four key frequency control rules are proposed to meet the control requirements of underfrequency load shedding. These rules not only ensure the stability of the power system when encountering frequency fluctuations, but also take into account the special needs of the system after the integration of new energy. The rules are shown in Table 1:
[0069] Table 1 Underfrequency load reduction control rules
[0070] ,
[0071] S200: Based on the processing results of historical data samples, physical simulation and natural language processing technology are used to identify the target parameter combination range that does not meet the low-frequency load reduction control rules and the conditions for starting the special wheel; wherein, the target parameter combination range includes the range of system inertia constant, generator and load level, power shortage ratio and / or new energy penetration rate.
[0072] In this embodiment, the purpose of S200 is to implement offline analysis of large language model-assisted intelligent frequency control.
[0073] In some embodiments, the target parameter combination range and the special wheel activation conditions that do not meet the low-frequency load reduction control rule identified by the large language model include:
[0074] Under the conditions that the engine inertia constant fluctuation range is 2-4, and the generator and load fluctuation range is 200-300 W:
[0075] When the power shortage accounts for 7% of the total power, if the proportion of renewable energy is between 18% and 30%, one round of load shedding will be implemented; if the proportion of renewable energy exceeds 30%, two rounds of load shedding will be implemented;
[0076] When the power shortage accounts for 10% of the total power, if the proportion of new energy is 18%-30%, one or two rounds of load shedding will be implemented; if the proportion of new energy exceeds 30%, one or two rounds of load shedding will be implemented and then a special round will be started;
[0077] When the power shortage accounts for 12% of the total power, if the proportion of new energy is 18%-30%, two rounds of load shedding will be implemented; if the proportion of new energy exceeds 30%, two rounds of load shedding will be implemented and then the special round will be started.
[0078] Specifically, the dynamics of the frequency response under high renewable energy consumption is primarily influenced by four factors: First, power shortfalls can lead to an imbalance between electromagnetic and mechanical torque, which in turn causes speed fluctuations, significantly affecting the determination of the minimum frequency point. Second, the impact of renewable energy on system inertia determines the system's ability to respond to disturbances. Inertial components compensate for power shortfalls by releasing stored energy, thereby slowing the rate of frequency drop. Third, the capacity of the generator sets and loads reflects the system's primary frequency regulation capability and plays a key role in determining the minimum frequency point. Finally, frequency regulation mechanisms (such as speed regulators) play a regulatory role after the inertial response ends, further stabilizing the system frequency. In summary, the renewable energy share, power shortfall, generator set and load capacity, and system inertia are the primary factors influencing the frequency response after low-frequency load shedding startup. These factors are considered as key parameter dimensions, as shown in Table 2.
[0079] Table 2 Key parameter dimensions
[0080] ,
[0081] In view of the sensitivity and security of power system data, the present invention mines the inherent laws of low-frequency load reduction and system parameters through simulation data. According to the parameter dimensions in Table 2, the offline simulation test uses natural language processing technology to extract and analyze samples that do not conform to the rules, revealing the internal connection of the parameters. Under the conditions that the engine inertia constant fluctuation range is 2-4, and the generator and load fluctuation range is 200-300 W, when the power shortage accounts for 7% of the total power, except for a small proportion of samples, the simulation results meet the low-frequency load reduction rules and there is no need to start a special wheel; when the power shortage ratio increases to 10%, the medium proportion of data cannot meet rule one and a special wheel needs to be started; when the power shortage ratio reaches 12%, the high proportion of data samples cannot meet rule one and a special wheel needs to be started. The specific simulation results are summarized in Table 3:
[0082] Table 3 Simulation results and parameter ranges
[0083] ,
[0084] Specifically, when the renewable energy share is between 18% and 24%, two rounds of load shedding are required. When the renewable energy share exceeds 30%, after two rounds of load shedding, the special wheel must still be activated. However, this may cause the frequency to rise above 51.0 Hz, violating Rule 2. Therefore, the load shedding of the special wheel must be reduced to control the frequency rise.
[0085] S300: Establishing a frequency intelligent control system, wherein the frequency intelligent control system is configured with a knowledge base, a frequency prediction model, and a large language model. The knowledge base stores the low-frequency load reduction control rules, the target parameter combination range, and the conditions for starting the special wheel. In response to an input data sample, the frequency intelligent control system obtains the low-frequency load reduction control rules, the target parameter combination range, and the conditions for starting the special wheel from the knowledge base and embeds them into a prompt word. The system uses physical simulation and natural language processing technology to determine the parameter combination range of the input data sample. If the parameter combination range is included in the target parameter combination range, an execution plan is output based on the prompt word. If the parameter combination range is not included in the target parameter combination range, the frequency prediction model is activated to obtain a frequency prediction curve, the prompt word is updated according to the frequency prediction curve, and an execution plan is output based on the updated prompt word.
[0086] In this embodiment, the purpose of step S300 is to use a large language model to assist in the decision-making and implementation of intelligent frequency control. Generally speaking, step S300, through in-depth analysis of simulation data, utilizes data retrieval techniques to identify and define the "boundary conditions" for the current system's under-frequency load reduction scheme—that is, the range within which the scheme is effective under specific operating conditions. By combining retrieval-enhanced generation and function call techniques, a frequency control system based on a large language model is constructed. This system automatically learns the rules associated with these boundary conditions and, for operating conditions that exceed these rules, uses frequency prediction (function call) to provide control recommendations and update the database.
[0087] In some embodiments, updating the prompt word according to the frequency prediction curve includes:
[0088] If the steady-state value of the frequency prediction curve is not lower than 49.5 Hz, the prompt word is not updated;
[0089] If the steady-state value of the frequency prediction curve is lower than 49.5 Hz, the special wheel is started, and it is determined whether the maximum value of the frequency prediction curve after starting the special wheel exceeds 51 Hz. If so, the prompt word is updated to start the special wheel within the current parameter combination range and reduce the load reduction amount. If not, the prompt word is updated to start the special wheel within the current parameter combination range.
[0090] In some embodiments, while the prompt word is updated according to the frequency prediction curve, the target parameter combination range that does not meet the low-frequency load reduction control rule and the conditions for starting the special wheel are also updated.
[0091] As a preferred embodiment, Figure 2As shown, the design of the RAG retrieval document must include the following core contents: First, the definition of the low-frequency load reduction rules must be systematically described, including the specific content of the low-frequency load reduction rules, the criteria for determining violations of the rules, and the possible consequences. Second, based on the processing results of historical data samples, the range of parameter combinations that may trigger rule violations must be identified, including the definitions and value ranges of key input parameters such as system inertia constant, generator and load levels, power shortage ratio, and new energy penetration rate, as well as the requirements for special round starts. Third, the document must supplement the prediction model, i.e., auxiliary instructions for function calls, to clarify the model's output content, calling conditions, and return data examples to support the evaluation and optimization of low-frequency load reduction rules.
[0092] Secondly, the activation of the function call function requires defining the corresponding tool module in the underlying code and explicitly informing the large model that the function can be called. Due to the limitations of the prediction model application and to ensure the integrity of the function demonstration, the function call function in the embodiment of this application is replaced by user input.
[0093] RAG is implemented primarily through underlying logic and using the LlamaIndex framework. This embodiment utilizes the GPT-3.5 Turbo model and Python code. RAG and function calls are implemented through underlying logic, and combined with prompt word engineering to build an intelligent frequency control system. The first step is to access the relevant knowledge base. The system recursively reads all Markdown-formatted documents in a specified directory and its subdirectories. These documents contain information such as rules for power system under-frequency load shedding and function call initiation criteria. The second step is text segmentation and processing. Within the read document content, the system segments the text based on preset text block sizes and overlaps. Each text block is designed to maintain a certain amount of contextual information to facilitate efficient subsequent similarity retrieval. The third step is quantization and storage. The system uses an embedding model provided by OpenAI to convert each text block into a vector representation and store it in the FAISS vector database. FAISS is designed for efficient storage and retrieval of large-scale vectors and supports calculating similarity between text blocks using Euclidean distance or inner product. The fourth step is user query and answer generation. When receiving relevant information, the system finds the most relevant document fragment through vector retrieval and embeds it into a pre-set prompt, and then responds using a large language model.
[0094] During the search process, if the data does not conform to the existing rules, the large model will automatically start the function call mechanism to obtain the predicted value and use the GPT-3.5 Turbo model to generate the answer (the effect is the same as Deepseek-R1). The effect diagram is as follows: Figure 3As shown. In order to suppress the "hallucination" of the large model, the embodiment of the present application designs a set of mechanisms to ensure the accuracy of the large model output. The system first retrieves the relevant rules from the knowledge base, embeds these rules into the prompt words, and inputs them to the large model for judgment. If the large model determines that the input parameters do not meet the actual requirements, it will start the function call mechanism, obtain the key frequency response values from the prediction model, and make further adjustments. In this process, the system rules and the frequency prediction model work together, and through multi-level verification and correction, it effectively avoids the large model from making erroneous speculations that deviate from the actual rules. Compared with the answers of the unadjusted general large model, the large model under this mechanism significantly reduces the risk of "hallucinations" through rule constraints and real-time feedback.
[0095] Table 4 shows the operating time of each component of the large model for two experiments. The embedding model used was text-embedding-ada-002. Furthermore, the function call mechanism was not triggered in this experiment, so the overall time for evaluating the prediction model alone was approximately 1 second.
[0096] Table 4 Time indicators for each part
[0097] ,
[0098] This experimental design not only tests the response speed of the large model, but also verifies how to ensure the validity and accuracy of the output through external function calls and rule retrieval without rigorous reasoning of mathematical models. Figure 4 The frequency simulation results under certain working conditions before and after the large model is involved in the RAG combined with function calling scheme are shown.
[0099] Depend on Figure 4 It can be seen that the output results of the large model are used to assist in the regulation, and the offline updated strategy starts a special round to prevent the frequency curve from hovering. In summary, this application constructs a large model in the vertical field of electricity based on the large model technology, successfully achieves tasks that cannot be completed by general large models, and confirms its application prospects in the field of frequency regulation. It is worth mentioning that this application aims to explore the application of large language models in the formulation of low-frequency load reduction plans and frequency regulation of power systems. Therefore, future research work can further explore how to optimize load reduction strategies and improve the adaptability and accuracy of large models in actual power systems.
[0100] The present application also provides a large language model-assisted power system frequency stability control device, such as Figure 5 As shown, the large language model-assisted power system frequency stability control device includes:
[0101] The control mode determination module 501 is configured to formulate an under-frequency load reduction control rule;
[0102] A preliminary identification module 502 is configured to use physical simulation and natural language processing technology to identify target parameter combination ranges that do not meet the under-frequency load reduction control rules and conditions for special wheel activation based on the processing results of historical data samples; wherein the target parameter combination ranges include the ranges of system inertia constant, generator and load levels, power shortage ratio, and / or new energy penetration rate;
[0103] The intelligent control module 503 is configured to establish an intelligent frequency control system. The intelligent frequency control system is configured with a knowledge base, a frequency prediction model, and a large language model. The knowledge base stores the under-frequency load shedding control rules, target parameter combination range, and special wheel activation conditions. In response to an input data sample, the intelligent frequency control system obtains the under-frequency load shedding control rules, target parameter combination range, and special wheel activation conditions from the knowledge base and embeds them into a prompt word. The intelligent frequency control system uses the large language model to determine the parameter combination range of the input data sample. If the parameter combination range is within the target parameter combination range, an execution plan is output based on the prompt word. If the parameter combination range is not within the target parameter combination range, the frequency prediction model is activated to obtain a frequency prediction curve, the prompt word is updated according to the frequency prediction curve, and an execution plan is output based on the updated prompt word.
[0104] An embodiment of the present application provides an electronic device, which may include a processor and a memory, wherein the processor and the memory can communicate with each other; illustratively, the processor and the memory communicate with each other via a communication bus.
[0105] The processor executes the computer-executable instructions stored in the memory, so that the processor implements the solutions in the above embodiments. The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0106] The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. System buses can be categorized as address buses, data buses, and control buses. Transceivers facilitate communication between the database access device and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) or non-volatile memory.
[0107] The electronic device provided in the embodiment of the present application may be the terminal device of the above embodiment.
[0108] An embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the technical solution of the large language model-assisted power system frequency stability control method of the above embodiment.
[0109] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, it can implement the technical solution of the large language model-assisted power system frequency stability control method in the above-mentioned embodiment.
[0110] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or module, which can be electrical, mechanical or other forms.
[0111] Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of these modules may be selected to implement the solution of this embodiment based on actual needs.
[0112] In addition, the functional modules in the various embodiments of the present application may be integrated into a single processing unit, or each module may exist physically separately, or two or more modules may be integrated into a single unit. The above-mentioned modules may be implemented in the form of hardware or hardware plus software functional units.
[0113] The integrated modules implemented in the form of software function modules can be stored in a computer-readable storage medium. The software function modules stored in a storage medium include a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute some of the steps of the methods of various embodiments of the present application.
[0114] It should be understood that the processor described above may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.
[0115] The memory may include a high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk.
[0116] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be divided into address buses, data buses, and control buses.
[0117] The storage medium may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0118] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a main control device.
[0119] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A large language model-assisted power system frequency stability control method, characterized in that: The method comprises: Formulate low-frequency load reduction control rules; Based on the processing results of historical data samples, physical simulation and natural language processing technologies are used to identify the target parameter combination range that does not meet the under-frequency load reduction control rules and the conditions for special wheel starting; wherein the target parameter combination range includes the range of system inertia constant, generator and load levels, power shortage ratio and new energy penetration rate; Establishing an intelligent frequency control system, wherein the intelligent frequency control system is configured with a knowledge base, a frequency prediction model, and a large language model. The knowledge base stores the under-frequency load shedding control rules, target parameter combination range, and special wheel activation conditions. In response to an input data sample, the intelligent frequency control system obtains the under-frequency load shedding control rules, target parameter combination range, and special wheel activation conditions from the knowledge base and embeds them into a prompt word. The large language model is used to determine the parameter combination range of the input data sample. If the parameter combination range is within the target parameter combination range, an execution plan is output based on the prompt word. If the parameter combination range is not within the target parameter combination range, the frequency prediction model is activated to obtain a frequency prediction curve, the prompt word is updated according to the frequency prediction curve, and an execution plan is output based on the updated prompt word. Formulate under-frequency load reduction control rules, including: Setting a preliminary load shedding plan; wherein the preliminary load shedding plan includes multiple basic rounds, the frequency threshold of each basic round action decreases step by step, and the load shedding amount of each basic round is a fixed value; wherein the fixed value is a fixed load shedding power of a set proportion; Setting a first-level special round, wherein the load shedding amount of the special round is determined based on the load shedding amount of the previous basic round and the adjusted load shedding amount output by the large language model; wherein the initial value of the adjusted load shedding amount output by the large language model is set to 0; Based on the multi-stage basic wheel and the first-stage special wheel, key frequency control rules are set; The target parameter combination range and special wheel starting conditions that do not meet the low-frequency load reduction control rules identified by the large language model include: Under the conditions that the engine inertia constant fluctuation range is 2-4, and the generator and load fluctuation range is 200-300 W: When the power shortage accounts for 7% of the total power, if the proportion of renewable energy is between 18% and 30%, one round of load shedding will be implemented; if the proportion of renewable energy exceeds 30%, two rounds of load shedding will be implemented; When the power shortage accounts for 10% of the total power, if the proportion of new energy is 18%-30%, one or two rounds of load shedding will be implemented; if the proportion of new energy exceeds 30%, one or two rounds of load shedding will be implemented and then a special round will be started; When the power shortage accounts for 12% of the total power, if the proportion of new energy is 18%-30%, two rounds of load shedding will be implemented; if the proportion of new energy exceeds 30%, two rounds of load shedding will be implemented and then the special round will be activated; Updating the prompt word according to the frequency prediction curve includes: If the steady-state value of the frequency prediction curve is lower than 49.5 Hz, the special wheel is started, and it is determined whether the maximum value of the frequency prediction curve after starting the special wheel exceeds 51 Hz. If so, the prompt word is updated to start the special wheel within the current parameter combination range and reduce the load reduction amount. If not, the prompt word is updated to start the special wheel within the current parameter combination range.
2. The large language model-assisted power system frequency stability control method according to claim 1 is characterized in that: The key frequency control rules include: Rule 1: After the automatic under-frequency load reduction device is activated, the system steady-state frequency is restored to no less than the first frequency threshold; Rule 2: Add a special level 1 wheel to prevent the system frequency from being below the second frequency threshold for a long time; Rule 3: Limit the system frequency to a time below the third frequency threshold that does not exceed the set time; Rule 4: For frequency overmodulation caused by load over-cut, the maximum frequency shall not exceed the fourth frequency threshold.
3. The large language model-assisted power system frequency stability control method according to claim 1, characterized in that: The load reduction of the special wheel is determined by the following formula: : , In the formula For fixed load shedding, The amount of load shedding for adjusting the output of the large language model. The default value is 0.
4. The large language model-assisted power system frequency stability control method according to any one of claims 1 to 3, characterized in that: While updating the prompt word according to the frequency prediction curve, the target parameter combination range that does not meet the low-frequency load reduction control rule and the conditions for starting the special wheel are updated.
5. A large language model-assisted power system frequency stability control device, characterized in that: The device comprises: A control mode determination module is configured to formulate an under-frequency load reduction regulation rule; a preliminary identification module configured to identify, based on the processing results of historical data samples, a target parameter combination range that does not satisfy the under-frequency load reduction control rules and a condition for special wheel activation using physical simulation and natural language processing technology; wherein the target parameter combination range includes a range of system inertia constant, generator and load levels, power shortage ratio, and new energy penetration rate; an intelligent control module configured to establish an intelligent frequency control system, wherein the intelligent frequency control system is configured with a knowledge base, a frequency prediction model, and a large language model. The knowledge base stores the low-frequency load shedding control rules, the target parameter combination range, and the special wheel activation conditions. In response to an input data sample, the intelligent frequency control system obtains the low-frequency load shedding control rules, the target parameter combination range, and the special wheel activation conditions from the knowledge base and embeds them into a prompt word. The intelligent frequency control system uses the large language model to determine the parameter combination range of the input data sample. If the parameter combination range is within the target parameter combination range, an execution plan is output based on the prompt word. If the parameter combination range is not within the target parameter combination range, the frequency prediction model is activated to obtain a frequency prediction curve, the prompt word is updated according to the frequency prediction curve, and an execution plan is output based on the updated prompt word. Formulate under-frequency load reduction control rules, including: Setting a preliminary load shedding plan; wherein the preliminary load shedding plan includes multiple basic rounds, the frequency threshold of each basic round action decreases step by step, and the load shedding amount of each basic round is a fixed value; wherein the fixed value is a fixed load shedding power of a set proportion; Setting a first-level special round, wherein the load shedding amount of the special round is determined based on the load shedding amount of the previous basic round and the adjusted load shedding amount output by the large language model; wherein the initial value of the adjusted load shedding amount output by the large language model is set to 0; Based on the multi-stage basic wheel and the first-stage special wheel, key frequency control rules are set; The target parameter combination range and special wheel starting conditions that do not meet the low-frequency load reduction control rules identified by the large language model include: Under the conditions that the engine inertia constant fluctuation range is 2-4, and the generator and load fluctuation range is 200-300 W: When the power shortage accounts for 7% of the total power, if the proportion of renewable energy is between 18% and 30%, one round of load shedding will be implemented; if the proportion of renewable energy exceeds 30%, two rounds of load shedding will be implemented; When the power shortage accounts for 10% of the total power, if the proportion of new energy is 18%-30%, one or two rounds of load shedding will be implemented; if the proportion of new energy exceeds 30%, one or two rounds of load shedding will be implemented and then a special round will be started; When the power shortage accounts for 12% of the total power, if the proportion of new energy is 18%-30%, two rounds of load shedding will be implemented; if the proportion of new energy exceeds 30%, two rounds of load shedding will be implemented and then the special round will be activated; Updating the prompt word according to the frequency prediction curve includes: If the steady-state value of the frequency prediction curve is lower than 49.5 Hz, the special wheel is started, and it is determined whether the maximum value of the frequency prediction curve after starting the special wheel exceeds 51 Hz. If so, the prompt word is updated to start the special wheel within the current parameter combination range and reduce the load reduction amount. If not, the prompt word is updated to start the special wheel within the current parameter combination range.
6. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the large language model-assisted power system frequency stability control method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the large language model-assisted power system frequency stability control method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Low-frequency load shedding model optimization method based on frequency response of new energy power system
CN117977623A
New energy project intelligent planning method and system based on large language model
CN119671317A