A New Energy System Simulation Modeling Method Based on Large Language Models and Fuzzy Rules
By constructing a two-layer optimization framework of large language model and fuzzy rules, the problems of structural changes and parameter drift in the simulation modeling of new energy systems are solved, achieving high-precision and stable simulation model updates and improving the simulation modeling performance of new energy systems.
Patent Information
- Application Number
- CN202610359367.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-23
- Publication Date
- 2026-11-17
AI Technical Summary
Existing simulation modeling techniques for new energy systems are insufficient to handle system structure changes and parameter drift under uncertain system structure conditions. Furthermore, the output results of large language models are difficult to directly apply to the updating of numerical simulation models, and there is a lack of stable and reliable decision-making mechanisms.
A two-layer optimization framework based on a large language model and fuzzy rules is constructed. The upper layer optimizes the structure of candidate models, while the lower layer optimizes and updates the modeling strategy. By combining fuzzy inference system and reinforcement learning method, the optimization weights are dynamically adjusted to achieve joint correction of model structure and parameters.
It significantly improves the accuracy and stability of the simulation model of new energy systems, can maintain high consistency under structural changes and parameter drift, reduces simulation errors and KL divergence, and improves the robustness and engineering applicability of the model.
Smart Images

Figure CN123116764A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of power system and artificial intelligence technology, and more specifically, to a simulation modeling method for new energy systems based on large language models and fuzzy rules. Background Technology
[0002] With the rapid development of new energy power generation technologies, the proportion of new energy power systems, represented by photovoltaic power generation systems, wind power generation systems, and energy storage systems, in the energy structure is constantly increasing. New energy systems typically have characteristics such as complex operating environments, frequent changes in operating states, and dynamic changes in equipment parameters. Therefore, in the process of system design, operation optimization, and fault diagnosis, it is often necessary to rely on high-precision simulation models to predict and analyze the system's operating characteristics. By establishing simulation models of new energy systems, electrical behavior under different operating conditions can be simulated before the system is actually put into operation, thus providing important technical support for system control strategy design, operating state assessment, and energy management. Therefore, new energy system simulation modeling technology has become a key foundational technology in the research and engineering application of new energy power systems.
[0003] In existing technologies, simulation modeling of new energy systems typically relies on equivalent models based on physical mechanisms. For example, in photovoltaic system modeling, single-diode or dual-diode models are often used to describe the current and voltage characteristics of photovoltaic modules, and an equivalent system model is established by combining environmental factors such as temperature and irradiance. In wind power systems, a complete system model is constructed by establishing a wind turbine aerodynamic model, a generator electromagnetic model, and a power electronic converter model. These methods describe the internal mechanisms of the system through physical equations and use parameter identification algorithms to determine model parameters, such as least squares, recursive least squares, or Kalman filtering. However, these methods are usually based on the assumption that the system structure is known and the parameters change slowly. When the system operating environment changes or equipment ages, key system parameters may drift significantly, such as changes in the series resistance of photovoltaic modules, changes in inductor and capacitor parameters, or changes in the characteristics of power devices. Furthermore, in actual engineering environments, new energy systems may also be affected by environmental electromagnetic coupling or changes in equipment wiring, leading to changes in the system structure. In these cases, parameter identification methods based on fixed model structures struggle to simultaneously handle changes in system structure and parameters, thus affecting the accuracy of the simulation model.
[0004] In recent years, large language models have demonstrated strong capabilities in complex knowledge reasoning tasks. By integrating multi-source knowledge information, large language models can perform reasoning analysis on complex engineering problems and generate possible solutions. Therefore, some research has begun to explore the use of large language models to assist in engineering system modeling, such as generating system modeling suggestions through prompting learning or knowledge enhancement methods. However, the results generated by large language models are usually expressed in text form, and their outputs have a certain degree of semantic uncertainty. Furthermore, in complex engineering systems, reasoning results may appear inconsistent with physical laws. In addition, the optimization process of new energy system simulation models requires numerical updates to the system structure or parameters, and text-based reasoning results are difficult to directly translate into executable numerical modeling operations, thus limiting the application of large language models in new energy system simulation modeling tasks.
[0005] In summary, existing simulation modeling techniques for new energy systems still have certain limitations: on the one hand, traditional parameter identification methods based on physical models are difficult to maintain effectiveness under conditions of system structural uncertainty; on the other hand, purely data-driven methods rely on large amounts of training data and lack physical interpretability; simultaneously, existing knowledge fusion methods typically only address parameter estimation problems and struggle to simultaneously handle system structural changes and parameter drift. Furthermore, while large language models possess strong knowledge reasoning capabilities, their outputs are difficult to directly apply to numerical simulation model updates and lack a stable and reliable decision-making mechanism. Therefore, in the field of new energy system simulation modeling, there is still a lack of a modeling optimization method that can simultaneously handle system structural changes, parameter drift, and reasoning uncertainty under conditions of incomplete observation information. Summary of the Invention
[0006] This invention proposes a simulation modeling method for new energy systems based on large language models and fuzzy rules. By constructing a probabilistic simulation model space and using a two-layer optimization framework to achieve joint correction of model structure and parameters, the consistency between the simulation model and the real system can be gradually improved without relying on a large amount of labeled data.
[0007] The specific implementation of the technical solution of this invention is as follows: A simulation modeling method for new energy systems based on large language models and fuzzy rules includes: The simulation model of the new energy system is formally described as a triplet, and the observation data set of the new energy system is collected. A two-layer optimization framework is constructed. The upper layer optimization is used to search for candidate model structures in the simulation model space of new energy systems, and the lower layer optimization is used to update the modeling strategy of the large language model. The two layers of optimization exchange information through an experience playback mechanism. In the aforementioned upper-level optimization process, a large language model is used to generate candidate modeling suggestions based on the current simulation model, observation data, and domain knowledge. A fuzzy inference system is introduced to control the model update process. The optimization weights are dynamically adjusted through fuzzy rules, and the candidate models are ranked and the optimal model is selected based on the updated objective function. In the lower-level optimization process, the large language model strategy is updated through reinforcement learning, a reinforcement learning strategy optimization method based on human feedback is adopted, and a multi-dimensional reward function is constructed to evaluate the quality of model generation. The above optimization process is executed iteratively until the simulation error converges, resulting in a new energy system simulation model that is highly consistent with the behavior of the real system.
[0008] Furthermore, the construction of the two-layer optimization framework includes representing the new energy system modeling problem as a weighted optimization objective between simulation error and modeling entropy:
[0009] in This represents the simulation error function, used to measure the simulation output. With observation data The differences between them; α represents the modeling entropy, used to describe the uncertainty of the current modeling strategy; α and β are weighting parameters used to balance simulation accuracy and model stability.
[0010] Furthermore, the iterative process of the two-layer optimization framework is expressed as follows:
[0011]
[0012] in This represents the simulation model for the k-th iteration; F represents the large language modeling strategy for the k-th iteration; F(·) represents the model update function based on the fuzzy inference system. η represents the experience replay buffer; Q(M) represents the reinforcement learning reward function; η represents the policy update learning rate.
[0013] Furthermore, the fuzzy inference system adopts the Takagi-Sugeno fuzzy inference system, and the input variables include simulation error and modeling entropy. The membership function of the modeling entropy is defined as follows: Let the range of historical modeling entropy be H1 to H2, then the membership function of the modeling entropy is defined as follows: = 0, when ≤ H1 = -( - H1) / (H2 - H1), when H1 ≤ ≤ H2 = 1, when ≥ H2 = 1, when ≤ H1 =-(H u + H2) / (H2 - H1), when H1 ≤ ≤ H2 = 0, when ≥ H2 in Indicates high-entropy membership degree. This represents the low-entropy membership degree.
[0014] Furthermore, the fuzzy rules include: When the simulation error is low and the modeling entropy is low, the system is in a convergent state, and the optimization weights are set as follows: α = 1 / E β = 2 / (H1 + H2); When the simulation error is low but the modeling entropy is high, reduce the model exploration intensity and optimize the weights as follows: α = 1 / (2E) β = 1 / H2; When the simulation error is high and the modeling entropy is low, the model structure adjustment capability is increased, and the optimization weights are set as follows: α = 2 / E β = 1 / H2; When the simulation error is high and the modeling entropy is high, the exploration capability is improved, and the optimization weights are set as follows: α = 4 / E β = 2 / H1; Where E represents the average simulation error in the historical model set, and H1 and H2 represent the lower and upper bounds of the historical modeling entropy, respectively.
[0015] Furthermore, during the fuzzy rule activation process, the trigger strength of each rule is represented as follows: = μ(e) × μ(H) Where μ(e) and μ(H) represent the membership functions of simulation error and modeling entropy, respectively.
[0016] Furthermore, during the process of dynamically adjusting the optimization weights using fuzzy rules, a new optimization objective function is calculated using a weighted average method:
[0017] The candidate models are ranked using the updated objective function, and the optimal model is selected for the next round of optimization.
[0018] Furthermore, the experience replay mechanism employs a monotonic stack structured experience replay buffer to record candidate models generated during historical optimization processes, and maintains the model quality in a monotonically increasing manner based on the objective function value; when a new candidate model is generated, if the new model is better than the best model in the current buffer, the top element of the stack is updated, otherwise the model is discarded.
[0019] Furthermore, the objective function of the reinforcement learning strategy optimization method based on human feedback is expressed as follows:
[0020] in = π( | ) / ( | () represents the ratio of the probabilities before and after the policy update; The dominant function is represented by ε, which is the pruning threshold. This represents the KL divergence constraint between the current policy and the initial policy, used to prevent the model from degrading due to excessively rapid policy updates.
[0021] Furthermore, the multidimensional reward function is expressed as: Q(M) = k1· (M)+k2· (M)+k3· (M) in This indicates a format reward, used to ensure the model output structure is standardized. This represents a reward for the reasoning process, used to ensure that the reasoning process is consistent with the final conclusion. The incentive mechanism is used to ensure that the model meets the physical constraints.
[0022] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention achieves joint processing of system structure changes and parameter drift by constructing a two-layer optimization framework and dynamically adjusting optimization weights through a fuzzy inference system. Specifically, the upper layer utilizes a large language model to generate modeling suggestions and introduces a Takagi-Sugeno fuzzy inference system, dynamically adjusting weights based on simulation errors and modeling entropy to improve the robustness and efficiency of model search. The lower layer employs reinforcement learning based on human feedback (RLHF) combined with a multi-dimensional reward function to optimize the large language model strategy, enhancing the rationality and physical consistency of the model-generated suggestions. Simultaneously, an experience replay mechanism with a monotonic stack structure is introduced to retain historically optimal models and avoid getting trapped in local optima. This invention significantly reduces simulation errors and KL divergence under structural changes and both high-quality and low-quality data scenarios, effectively suppresses the illusion of large language models, improves inference path stability and modeling efficiency, and converges with only a few iterations, demonstrating strong robustness and engineering applicability. Attached Figure Description
[0023] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. In the drawings: Figure 1 This is a schematic diagram of the overall architecture of the new energy system simulation modeling method based on large language models and fuzzy rules of the present invention; Figure 2 This is a schematic diagram illustrating the RMSE changes of different methods on the HQD dataset in embodiments of the present invention; Figure 3 This is a schematic diagram illustrating the effect of different training strategies on the inference trajectory of a large language model in an embodiment of the present invention. Detailed Implementation
[0024] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the disclosure to those skilled in the art. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0025] This embodiment proposes a simulation modeling method for new energy systems based on large language models and fuzzy rules, such as... Figure 1As shown, in this embodiment, the simulation model of the new energy system is first formally described. A new energy system typically consists of multiple functional modules, such as a power generation module, a power electronic conversion module, an electrical connection module, and an environmental input module. To uniformly describe the system structure and operating conditions, this invention represents the new energy system simulation model as a triplet form M = (V, R, S), where V represents the set of system functional modules, R represents the set of connection rules between modules, and S represents the set of system operating conditions. The system model is gradually constructed through the selection of a series of connection rules; different combinations of connection rules correspond to different system structures. Let the generation probability of each connection rule r be p(r), then the generation probability of the system model M can be expressed as... p(M) = ∏ p(r i ) Where r i This represents the connection rules selected during model construction. Using the above method, the simulation model space of a new energy system can be represented as a probability distribution μ(M), which reflects the likelihood of different system structures in the modeling space.
[0026] In practical applications, it is necessary to collect observational data from new energy systems as a basis for model correction. Let the observational data set be... X = {x1, x2, …, x N} Where x i This represents the observed output of the system in the i-th operating state, such as variables like voltage, current, or power. The goal of simulation modeling for new energy systems is to find the optimal simulation model M given the observed data, minimizing the difference between the simulation output and the actual system's observed data.
[0027] Theoretically, this can be achieved by maximizing the posterior probability p(M| To obtain the optimal model, i.e. arg max_M log p(M | ) Due to the limited observation conditions of real systems, the term log p( The exact value of |M) is often difficult to calculate. Therefore, this invention employs variational inference to transform the above problem into an Evidence Lower Bound (ELBO) optimization problem based on Bayes' theorem. This is achieved by introducing a model to generate the distribution μ. π (M), and by generating data X using the simulation model, the following optimization objective can be obtained.
[0028] The first term represents the error between the simulation output and the observed data, and the second term represents the difference between the model distribution and the prior physical model distribution. By minimizing this objective function, simulation accuracy can be improved while maintaining physical consistency.
[0029] To facilitate practical optimization, this invention further transforms the above optimization problem into a weighted optimization objective based on simulation error and modeling entropy. Modeling entropy describes the uncertainty of the modeling strategy, and its expression is:
[0030] Based on the above definition, this invention expresses the new energy system modeling problem as the following optimization problem:
[0031] in This represents the simulation error function, used to measure the simulation output. With observation data The differences between them; α represents the modeling entropy, used to describe the uncertainty of the current modeling strategy; α and β are weighting parameters used to balance simulation accuracy and model stability.
[0032] To solve the above optimization problem, this invention constructs a two-layer optimization framework, where the upper-layer optimization is used to update the simulation model structure, and the lower-layer optimization is used to update the modeling strategy of the large language model. This two-layer optimization process can be represented as:
[0033]
[0034] in This represents the simulation model for the k-th iteration; F represents the large language modeling strategy for the k-th iteration; F(·) represents the model update function based on the fuzzy inference system. Let represent the experience replay buffer; Q(M) represent the reinforcement learning reward function; and η represent the policy update learning rate. By simultaneously minimizing simulation error and modeling entropy, the model can gradually approximate the behavior of the real system while ensuring physical plausibility.
[0035] Based on this, this invention constructs a two-layer optimization process. The upper-layer optimization is used to search for candidate model structures in the simulation model space of the new energy system, while the lower-layer optimization is used to update the modeling strategy of the large language model. The two layers of optimization exchange information through an experience replay mechanism, thereby achieving a balance between exploration and utilization.
[0036] In the upper-level optimization process, the large language model first generates several candidate modeling suggestions based on the current simulation model, observation data, and domain knowledge. These suggestions typically include system structure modifications or parameter adjustments, such as adding circuit components, changing module connections, or modifying environmental parameters. Since the output of the large language model is in the form of symbolic reasoning, its direct application to the numerical simulation model may lead to unstable model updates. Therefore, this invention introduces a fuzzy inference system to control the model update process.
[0037] The fuzzy inference system described employs the Takagi–Sugeno Fuzzy Inference System (TSFIS), whose input variables include simulation error e and modeling entropy H. The simulation error reflects the deviation between the current simulation model and the real system, while the modeling entropy describes the uncertainty of the current modeling strategy. By fuzzifying these variables, a mapping relationship between the system state and the optimization weights can be established.
[0038] Let the range of historical modeling entropy be H1 to H2, then the membership function of the modeling entropy is defined as follows: = 0, when ≤ H1 = -( - H1) / (H2 - H1), when H1 ≤ ≤ H2 = 1, when ≥ H2 = 1, when ≤ H1 =-(H u + H2) / (H2 - H1), when H1 ≤ ≤ H2 = 0, when ≥ H2 in Indicates high-entropy membership degree. This represents the low-entropy membership degree.
[0039] In the fuzzy inference process, this invention sets four core fuzzy rules to dynamically update and optimize the weights: 1. When the simulation error and modeling entropy are both low, it indicates that the current simulation model can fit the real system well, and the model inference process is stable, with the system in a convergent state. In this case, the optimization process should prioritize maintaining the current model structure, making only minor parameter adjustments to further reduce the error. Therefore, the parameter weights are updated as follows: α = 1 / E β = 2 / (H1 + H2) Where E represents the average simulation error in the historical model set, and H1 and H2 represent the lower and upper bounds of the historical modeling entropy, respectively.
[0040] 2. When the simulation error is low but the modeling entropy is high, it indicates that the current model output is relatively accurate, but the modeling strategy has significant uncertainty, meaning the large language model's inference process is not yet stable. In this case, over-exploration may cause the model to deviate from the current optimal solution. Therefore, it is necessary to appropriately reduce the model's exploration intensity and reduce inference uncertainty through stabilization strategies. At this time, the fuzzy system updates the weights to... α = 1 / (2E) β = 1 / H2 3. When the simulation error is high and the modeling entropy is low, it indicates that the current model inference process is relatively stable, but there is still a significant deviation between the model structure and the real system. In this case, it is necessary to increase the model structure adjustment capability so that the system can escape the current local optimum. Therefore, the optimization weights are updated to... α = 2 / E β = 1 / H2 By increasing the weight of the simulation error term, the optimization process pays more attention to model errors, thereby driving the adjustment of the model structure.
[0041] 4. When both simulation error and modeling entropy are high, it indicates that the current model cannot accurately describe the real system, and the modeling strategy also has significant uncertainty, meaning the system is in an exploratory phase. In this case, it is necessary to significantly improve the exploratory capability, enabling the optimization process to search a wider range within the model space. Therefore, the weights are updated to... α = 4 / E β = 2 / H1 Significantly increasing the weight of the simulation error term can accelerate the model structure adjustment process, while utilizing a larger modeling entropy weight encourages the model to explore more extensively within the model space. In the fuzzy rule activation process, the trigger strength of each rule is represented as... = μ(e) × μ(H) Where μ(e) and μ(H) represent the membership functions of simulation error and modeling entropy, respectively. Finally, a new optimization objective function is calculated using a weighted average method:
[0042]
[0043] The candidate models are ranked using the updated objective function, and the optimal model is selected for the next round of optimization.
[0044] To improve search efficiency, this invention introduces an experience replay buffer with a monotonic stack structure into the two-layer optimization framework. This buffer records candidate models generated during the historical optimization process and maintains monotonically increasing model quality based on the objective function value. Let the experience buffer be... = { , , … , } Once a new candidate model is generated, its value is compared with the objective function value to determine whether to add it to the buffer. If the new model is better than the current best model in the buffer, the top element of the stack is updated; otherwise, the model is discarded. In this way, historical optimal solutions can be retained during the model search process, thereby improving the stability of the optimization process and avoiding the algorithm getting trapped in local optima.
[0045] In the lower-level optimization process, this invention updates the large language model policy using reinforcement learning, enabling the model to gradually learn and generate more reasonable modeling suggestions. This process employs a **Human Feedback-Based Reinforcement Learning (RLHF)** policy optimization method, with its objective function expressed as follows:
[0046] in = π( | ) / ( | () represents the ratio of the probabilities before and after the policy update; The dominant function is represented by ε, which is the pruning threshold. This represents the KL divergence constraint between the current policy and the initial policy, used to prevent the model from degrading due to excessively rapid policy updates.
[0047] In the strategy optimization process, this invention constructs a multidimensional reward function to evaluate the quality of model generation. The reward function is expressed as follows: Q(M) = k1· (M)+k2· (M)+k3· (M) in This indicates a format reward, used to ensure the model output structure is standardized. This represents a reward for the reasoning process, used to ensure that the reasoning process is consistent with the final conclusion. The incentive mechanism is used to ensure that the model meets the physical constraints.
[0048] In new energy system modeling tasks, constraint functions G(M) can be constructed based on circuit physics laws, such as Kirchhoff's circuit laws or device characteristic equations, and rewards can be given based on the constraint residual definition mechanism. = tanh( - || G(M) || 2 ) In actual operation, the simulation model of the new energy system is gradually updated through iterative optimization. First, simulation calculations are performed using the current simulation model, and the simulation output is compared with real observation data to obtain the error. Then, a large language model is used to generate candidate model correction schemes. Next, a fuzzy inference system is used to screen the candidate schemes and update the optimization weights. Finally, a two-layer optimization framework is used to update the simulation model structure and parameters. The above process is repeated until the simulation error converges, thereby obtaining a new energy system simulation model with high consistency with the behavior of the real system.
[0049] Through the above technical solutions, this invention can automatically correct simulation models under conditions of uncertain new energy system structure and limited observational information, and improve modeling accuracy and stability by combining knowledge reasoning and numerical optimization. Compared with traditional parameter identification methods based on fixed structures or pure data-driven modeling methods, this invention can simultaneously handle system structure changes, parameter drift, and reasoning uncertainties, thereby significantly improving the reliability and engineering applicability of new energy system simulation modeling.
[0050] The experiment was conducted under three different data conditions: structural change scenario (MSTD), high quality data scenario (HQD), and low quality data scenario (LQD), to verify the modeling capability of the method of the present invention under different uncertainty conditions.
[0051] The Modified Simulation Topology Dataset (MSTD) is used to model the structural changes in a renewable energy system. In this scenario, the circuit topology of the original photovoltaic system simulation model is modified, and the original 2×22 series-parallel photovoltaic module structure is scaled down to a 2×11 structure, thus constructing a simulation model that deviates from the real system structure. Subsequently, voltage, current, and power response data of the photovoltaic system are collected under different environmental conditions to evaluate the algorithm's ability to jointly identify the model structure and parameters under conditions of system structural mismatch.
[0052] The High-Quality Dataset (HQD) scenario was used to evaluate the method's parameter identification capability under conditions of basic system structural stability. In this scenario, the experimental data came from the initial stage of photovoltaic system operation, when the system equipment showed low aging and minimal structural changes. System errors mainly originated from environmental factors (such as temperature and irradiance variations) and external influences such as electromagnetic interference. Approximately 100 sets of IVP curve data were collected, with an ambient temperature range of 20.5°C to 36°C and an irradiance range of 252 W / m². 2 Up to 724W / m 2 It is used to build high-quality datasets.
[0053] The Low Quality Dataset (LQD) scenario is used to simulate the complex and uncertain conditions that may arise after long-term operation of a renewable energy system. In this scenario, due to factors such as long-term operation, low maintenance frequency, and occasional failures, photovoltaic systems may experience issues such as component aging, electrical parameter drift, and changes in the electromagnetic environment, leading to significant deviations between the simulation model and the real system. Approximately 170 sets of IVP data samples were collected under different operating conditions to construct the low-quality dataset and to evaluate the modeling robustness of the algorithm under high uncertainty conditions.
[0054] By conducting experiments under the three different data scenarios mentioned above, the simulation modeling performance of the method of the present invention can be comprehensively evaluated under various practical engineering conditions such as system structure changes, parameter drift, and differences in observation data quality.
[0055] Table 1
[0056] Table 1 presents the performance comparison results of different methods in the simulation modeling task of new energy systems. The experimental comparison methods include traditional optimization algorithms (PSO), deep learning methods (CNN), and various methods based on large language models (COT, SFT+PPO, SFT+DPO, SFT+DAPO). All methods were run on the same photovoltaic system dataset, and the modeling accuracy was evaluated by simulation error and KL divergence index.
[0057] Experimental results show that the method of this invention achieves optimal performance in all data scenarios. For example, in the structural change scenario MSTD, the final KL divergence of the method of this invention is 0.058, which is about 98.7% lower than the 4.57 of the traditional simulation model; it also has significant advantages over CNN methods (1.34) and other LLM methods (0.073, 0.082). On the HQD and LQD datasets, the method of this invention also shows lower model error, and the overall performance is improved by more than 60% compared with other large language model methods.
[0058] Furthermore, from the perspective of iterative efficiency, the method of this invention requires only an average of two outer-layer iterations to achieve high-precision simulation results in both MSTD and HQD scenarios, significantly reducing the number of searches during model optimization. This demonstrates that through fuzzy rule constraints and knowledge reasoning guidance, large language models can more quickly locate the sources of model errors, thereby improving simulation optimization efficiency.
[0059] The experimental results above show that the method proposed in this invention can significantly improve the accuracy of simulation modeling of new energy systems under complex conditions such as structural changes and parameter drift, and reduce the number of iterations required for model optimization.
[0060] To verify the impact of fuzzy rules and monotonic stack structure on the outer-layer optimization process in this invention, ablation experiments were conducted on the HQD dataset. The experiments compared the following three outer-layer optimization structures by enabling or disabling different modules: 1) The complete solution of this invention (fuzzy rules + monotonic stack); 2) Use only fuzzy rules; 3) Use only a monotonic stack.
[0061] The experiment recorded the RMSE changes of different methods on sample 82 of the HQD dataset. Figure 2 The results show that when using fuzzy rules, large language models can quickly identify the main sources of error in the initial iteration phase, thus rapidly reducing the RMSE value. However, in later iterations, if only fuzzy rules are relied upon without historical optimization information, the model may continue to update along a predetermined optimization direction, thereby increasing the risk of getting trapped in local optima.
[0062] Conversely, when using only monotonic stacks without fuzzy rules, the modeling suggestions generated by large language models are prone to fragmentation or illusion. These erroneous suggestions may be persistently retained in the historical model, leading to abnormal results in the simulation system.
[0063] When fuzzy rules and a monotonic stack structure are used simultaneously, the system can both use fuzzy rules to suppress the illusion of large language models and use the monotonic stack to record historical best models and guide subsequent searches, thus achieving an effective balance between exploration and utilization in the model space. Experimental results show that on the HQD dataset, the method of this invention has the highest effective modeling ratio and can continuously improve the quality of model optimization.
[0064] The experimental results demonstrate that the fuzzy rule constraint and monotonic stack optimization mechanism proposed in this invention can significantly improve the stability and reliability of the outer optimization process.
[0065] To verify the impact of the proposed multi-dimensional reward reinforcement learning training mechanism on the reasoning ability of large language models, an ablation experiment was conducted on the inner training module. The experiment tested the following different training strategies: 1) Complete training strategy (mechanism reward + process reward + format reward); 2) Only use the mechanism for rewards; 3) Supervision is conducted using only the reward model (RM); 4) Use only Supervised Fine-Tuning (SFT); 5) Learn using only prompts (Prompt Few-Shot).
[0066] The experiment compares the effects of different training strategies by analyzing the inference trajectory of a large language model, and uses principal component analysis (PCA) to reduce the dimensionality of the inference process vector, thereby visualizing the model's inference path. Evaluation metrics include maximum inference error (Max Mistake), total inference error (Total Mistakes), final prediction accuracy (Final Precision), and effective thinking length (Effective Thinking Length).
[0067] like Figure 3 Experimental results show that with the addition of the mechanism reward, the reasoning path of the large language model is significantly more stable, and its final prediction accuracy approaches 1.0. The mechanism reward, by introducing the physical constraints of the photovoltaic system, enables the model's reasoning process to automatically correct reasoning paths that do not conform to physical laws, thereby improving the reliability of the model's output.
[0068] Process rewards can effectively reduce erroneous paths in the reasoning process, allowing the reasoning steps to gradually converge to the correct reasoning trajectory, thereby reducing the maximum reasoning error and the total reasoning error.
[0069] The supervised fine-tuning phase provides domain knowledge data, enabling the model to learn the basic principles of new energy system modeling, thereby ensuring that the inference process has a minimum effective depth.
[0070] Experimental results show that the multidimensional reward reinforcement learning training mechanism proposed in this invention can significantly improve the reasoning stability and modeling accuracy of large language models.
[0071] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A new energy system simulation modeling method based on a large language model and fuzzy rules, characterized in that, include: The simulation model of the new energy system is formally described as a triplet, and the observation data set of the new energy system is collected. A two-layer optimization framework is constructed. The upper layer optimization is used to search for candidate model structures in the simulation model space of new energy systems, and the lower layer optimization is used to update the modeling strategy of the large language model. The two layers of optimization exchange information through an experience playback mechanism. In the aforementioned upper-level optimization process, a large language model is used to generate candidate modeling suggestions based on the current simulation model, observation data, and domain knowledge. A fuzzy inference system is introduced to control the model update process. The optimization weights are dynamically adjusted through fuzzy rules, and the candidate models are ranked and the optimal model is selected based on the updated objective function. In the lower-level optimization process, the large language model strategy is updated through reinforcement learning, a reinforcement learning strategy optimization method based on human feedback is adopted, and a multi-dimensional reward function is constructed to evaluate the quality of model generation. The above optimization process is executed iteratively until the simulation error converges, resulting in a new energy system simulation model that is highly consistent with the behavior of the real system.
2. The method of claim 1, wherein, The construction of the two-layer optimization framework includes representing the new energy system modeling problem as a weighted optimization objective between simulation error and modeling entropy: , wherein denotes the simulation error function, which measures the difference between the simulation output and the observation data ; denotes the modeling entropy, which describes the uncertainty of the current modeling strategy; and α and β are weight parameters to balance the simulation accuracy and model stability.
3. The method of claim 1, wherein, The iterative process of the two-layer optimization framework is expressed as follows: , , wherein denotes the simulation model of the kth iteration; denotes the large language model modeling strategy of the kth iteration; F(·) denotes the model update function based on the fuzzy inference system; denotes the experience replay buffer; Q(M) denotes the reinforcement learning reward function; η denotes the policy update learning rate.
4. The method of claim 1, wherein, The fuzzy inference system adopted is the Takagi-Sugeno fuzzy inference system. The input variables include simulation error and modeling entropy. The membership function of the modeling entropy is defined as follows: Let the range of historical modeling entropy be H1 to H2, then the membership function of the modeling entropy is defined as follows: = 0, when ≤ H1, = - (H2 - H1) / (H2 - H1), when H1 ≤ ≤ H2, = 1, when ≥ H2, = 1, when ≤ H1, = -(H u + H2) / (H2 - H1), when H1 ≤ ≤ H2, = 0, when ≥ H2, wherein represents a high entropy membership, represents a low entropy membership.
5. The method of claim 1, wherein, The fuzzy rules include: When the simulation error is low and the modeling entropy is low, the system is in a convergent state, and the optimization weights are set as follows: α = 1 / E β = 2 / (H1 + H2); When the simulation error is low but the modeling entropy is high, reduce the model exploration intensity and optimize the weights as follows: α = 1 / (2E)β = 1 / H2; When the simulation error is high and the modeling entropy is low, the model structure adjustment capability is increased, and the optimization weights are set as follows: α = 2 / E β = 1 / H2; When the simulation error is high and the modeling entropy is high, the exploration capability is improved, and the optimization weights are set as follows: α = 4 / E β = 2 / H1; Where E represents the average simulation error in the historical model set, and H1 and H2 represent the lower and upper bounds of the historical modeling entropy, respectively.
6. The method of claim 5, wherein, During the activation process of the fuzzy rules, the trigger strength of each rule is represented as follows: = μ(e) x μ(H), Where μ(e) and μ(H) represent the membership functions of simulation error and modeling entropy, respectively.
7. The method of claim 1, wherein, During the process of dynamically adjusting and optimizing weights using fuzzy rules, a new optimization objective function is calculated using a weighted average method. , The candidate models are ranked using the updated objective function, and the optimal model is selected for the next round of optimization.
8. The method of claim 1, wherein, The experience replay mechanism uses a monotonic stack structure for the experience replay buffer, which records the candidate models generated during the historical optimization process and keeps the model quality monotonically increasing according to the objective function value. When a new candidate model is generated, if the new model is better than the best model in the current buffer, the top element of the stack is updated; otherwise, the model is discarded.
9. The method of claim 1, wherein, The human feedback-based reinforcement learning strategy optimization method, the objective function is expressed as , in = π( | ) / ( | () represents the ratio of the probabilities before and after the policy update; Represents the dominance function; ε is a clipping threshold; represents the KL divergence constraint between the current policy and the initial policy, which is used to prevent the model from degrading due to too fast policy updates.
10. The method of claim 1, wherein, The multi-dimensional reward function is expressed as: Q(M) = k1 · (M) + k2 · (M) + k3 · (M), in This indicates a format reward, used to ensure the standardized structure of the model output. This represents a reward for the reasoning process, used to ensure that the reasoning process is consistent with the final conclusion. The incentive mechanism is used to ensure that the model meets the physical constraints.
