A microgrid stability analysis method and system
By combining neural network models with symbolic regression techniques, an analytical Lyapunov function was constructed, which solved the problems of accuracy and adaptability in microgrid system stability analysis, and achieved efficient and accurate microgrid stability analysis.
Patent Information
- Application Number
- CN202511405886.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-09-29
AI Technical Summary
In existing technologies, the verifiability of Lyapunov functions is poor, and the accuracy, flexibility, and adaptability of stability analysis for microgrid systems are also poor, especially in complex, nonlinear systems where effective analysis is difficult.
By employing a neural network model combined with symbolic regression techniques, a verifiable analytical Lyapunov function is constructed. Through training and counterexample generation, the accuracy and adaptability of stability analysis are ensured, making it suitable for high-dimensional, networked microgrid systems.
It significantly improves the accuracy and flexibility of microgrid system stability analysis, can adapt to complex environments, provides global stability assurance, and enhances analysis efficiency and accuracy.
Smart Images

Figure CN120876161B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of control systems and stability analysis, specifically to a microgrid stability analysis method and system. Background Technology
[0002] With the widespread application of renewable energy and the modernization of power systems, microgrids, as a localized and distributed form of power network, have become an important component of smart grids. Microgrid systems can achieve self-regulation of power production, storage, transmission, and consumption within a local area, exhibiting strong energy independence and flexibility. However, due to the nonlinearity, dynamics, and coupling with traditional power grids, the stability analysis and control of microgrid systems have become a significant research challenge.
[0003] Especially in islanded operation mode, the microgrid is disconnected from the main grid and relies solely on local energy for power supply, making the microgrid system more vulnerable to instability. External disturbances, such as sudden load changes or fluctuations in renewable energy affecting the system, can directly cause voltage and frequency fluctuations, power imbalances, and even system instability. During the operation of an islanded microgrid, the control system needs to respond and adjust rapidly without the support of the main grid; therefore, the dynamic processes of the microgrid system are more drastic, placing higher demands on stability analysis.
[0004] Lyapunov stability theory is a classic method for analyzing the stability of nonlinear systems. The stability of a system can be proven by constructing a Lyapunov function. However, traditional methods for constructing Lyapunov functions typically rely on predefined function templates, lacking sufficient flexibility, especially when dealing with complex, nonlinear microgrid systems. Therefore, there is an urgent need for new methods that can handle more complex systems while ensuring stability.
[0005] In recent years, with the development of deep learning technology, neural network models have been widely used in modeling nonlinear systems, demonstrating powerful expressive capabilities. However, neural network model methods often lack theoretical stability guarantees, especially in safety-critical applications such as microgrid systems. Ensuring the verifiable stability of the learned control strategies or stability analysis methods is a significant challenge.
[0006] The existing invention patent application document CN113839420A, entitled "A Stability Analysis Method for Islanded Microgrids Based on Dynamic Phasor Method," includes the following steps: establishing dynamic equations for islanded operation of a microgrid based on its basic structure; obtaining a network dynamic phasor model for islanded operation based on the dynamic phasor method and the dynamic equations; controlling the network dynamic phasor model for islanded operation using a frequency-voltage droop control method to obtain a closed-loop dynamic phasor model for islanded operation; and analyzing the closed-loop dynamic phasor model for islanded operation using the Lyapunov stability analysis method, determining the stability of the islanded microgrid through the eigenvalues of the Jacobian matrix.
[0007] The stability analysis methods based on the dynamic phasor method mentioned in the aforementioned existing solutions mainly employ Lyapunov stability theory and eigenvalue analysis of the Jacobian matrix. This method relies on solving the system's state equations, and faces high computational complexity, especially when dealing with complex nonlinear microgrid systems, and is easily affected by the model's accuracy. Particularly for high-dimensional, highly nonlinear systems, the determination of the Jacobian matrix's eigenvalues can lead to significant errors. The stability analysis method based on the dynamic phasor method requires establishing the dynamic equations for the islanded operation of the microgrid and obtaining a closed-loop dynamic phasor model through control methods such as frequency-voltage droop control, before using Lyapunov stability analysis to analyze its stability. The entire process is computationally intensive, especially when dealing with large-scale, complex microgrid systems, where the analysis efficiency significantly decreases. Traditional Lyapunov methods typically rely on predefined function templates, making it difficult to adapt to the dynamic changes of highly complex and nonlinear systems, thus failing to accurately and effectively analyze the stability of more complex microgrid systems.
[0008] In summary, existing technologies suffer from poor verifiability of Lyapunov functions and limitations in the accuracy, flexibility, and adaptability of stability analysis. Summary of the Invention
[0009] The technical problem to be solved by this invention is: how to solve the problems of poor verifiability of Lyapunov functions and poor accuracy, flexibility and adaptability of stability analysis in the prior art.
[0010] This invention solves the above-mentioned technical problems by employing the following technical solution: A microgrid stability analysis method includes:
[0011] S1. Collect microgrid system data in islanded operation state, and remove noise from the microgrid system data through filtering operation to obtain a clean state signal;
[0012] S2. Model the microgrid dynamics based on the clean state signal, construct a neural network model and output the Lyapunov function, and fit the stability structure of the system by training the neural network model.
[0013] S3. Define and minimize the Lyapunov risk function to optimize the neural network model. Transform the network output into an analytical Lyapunov function through symbolic regression and quantify the degree to which the Lyapunov function violates the stability condition.
[0014] S4. Verify the stability condition of the analytical Lyapunov function. If there is a counterexample, feed back the current analytical Lyapunov function for retraining to complete the global stability enhancement operation of the function.
[0015] S5. Using the combined neural network model Lyapunov function, model the state of each subsystem in a high-dimensional islanded microgrid system, learn and represent the interactive coupling relationship between subsystems, and complete model sharing and stability collaborative evaluation.
[0016] This invention focuses on microgrid stability analysis based on neural network models and Lyapunov functions. It aims to construct verifiable analytical Lyapunov functions by combining deep learning and symbolic regression techniques, thereby efficiently and accurately analyzing and ensuring the stability of microgrid systems. The method models the dynamics of the microgrid system using a neural network model, outputs a Lyapunov function, and then uses symbolic regression to transform the neural network model output into an analytical Lyapunov function.
[0017] This invention ensures that the analytical Lyapunov function meets the global stability requirements by verifying the stability conditions and generating counterexamples for training, thereby providing a stability guarantee for microgrid systems.
[0018] The method of this invention can be extended to high-dimensional islanded microgrid systems, exhibiting good scalability and adaptability. Experimental results show that this method demonstrates excellent stability analysis capabilities in multiple nonlinear systems, significantly improving the efficiency and accuracy of traditional methods when dealing with complex systems.
[0019] In a more specific technical solution, in S1, during the filtering operation, a low-pass filter is used to remove high-frequency random noise from the microgrid system data to obtain denoised microgrid data.
[0020] The denoised microgrid data is normalized to obtain normalized microgrid data;
[0021] The normalized microgrid data is standardized to obtain and divide the standard data, and then the training set and validation set are obtained.
[0022] In a more specific technical solution, in S2, the state variables of the microgrid system are set as follows: ,R Representing the set of real numbers, using ordinary differential equations to express the dynamic system of the microgrid system;
[0023] The neural network model outputs a Lyapunov function. ,in These are the parameters of the neural network model;
[0024] Train a neural network model using the following logic:
[0025] (5)
[0026] In equation (5), It is a smooth ReLU activation function. It is an input convex neural network model. It is an invertible, continuously differentiable function. It is a constant. This represents the nonlinear transformation result obtained based on the input convex neural network model. This represents the baseline value output by the network when the input is zero. Let L be the squared L2 norm of the state vector.
[0027] In a more specific technical solution, S3 uses the following logic to quantify the degree to which the Lyapunov function violates the stability condition:
[0028] (6)
[0029] In equation (6), It is the Lie derivative of the Lyapunov function. Represents the total number of samples. Represents the Lie derivative. i Indicates the index of the sample;
[0030] The loss function is minimized using the backpropagation algorithm, such that the Lie derivative is... It satisfies the stability condition of the Lyapunov function.
[0031] In a more specific technical solution, S3 performs a sign regression operation, transforming the Lyapunov function... This is converted into an analytic mathematical expression, resulting in an analytic Lyapunov function. To satisfy the stability condition of the Lyapunov function:
[0032] (8)
[0033] In the formula, This indicates a condition constraint, namely, that the condition holds for all non-zero state vectors 𝑥.
[0034] This invention employs a method combining neural network models and symbolic regression. Through intelligent modeling and automated analysis, it constructs verifiable analytical Lyapunov functions, thereby improving the accuracy, flexibility, and adaptability of stability analysis.
[0035] This invention combines neural network models with symbolic regression to automatically learn and model the complex nonlinear dynamics of microgrid systems, overcoming the limitations of traditional Lyapunov methods that rely on predefined function templates. Compared to traditional methods, this invention can flexibly adapt to dynamic changes in the system, improving the efficiency and accuracy of stability analysis, and is particularly suitable for microgrid systems with high nonlinearity and large dynamic changes.
[0036] By employing symbolic regression, this invention transforms the Lyapunov function output by the neural network model into an analytical Lyapunov function, enhancing the transparency and interpretability of the analysis results. Compared to traditional methods that typically rely on numerical solutions and approximations, symbolic regression provides an accurate and easily verifiable analytical expression, making stability analysis more controllable and theoretically sound.
[0037] In a more specific technical solution, S4, for analytical Lyapunov functions To verify stability, a numerical root-finding algorithm is used to detect the roots of the analytical Lyapunov function, ensuring that the analytical Lyapunov function is zero only at equilibrium points:
[0038] (10)
[0039] In the formula, This indicates the equilibrium point x=0.
[0040] In a more specific technical solution, based on the analytical Lyapunov function... Calculate the Lie derivative:
[0041] (11)
[0042] And ensure that the Lie derivative satisfies the following in the state space. .
[0043] In a more specific technical solution, if the Lyapunov function does not satisfy the stability condition at a preset state point, a counterexample is identified, and the counterexample is added to the training set. The neural network model is then retrained until an analytical Lyapunov function that satisfies the stability condition is found.
[0044] This invention ensures that the Lyapunov function meets global stability requirements through counterexample generation and a neural network model self-optimization mechanism. Through continuous training and feedback, this invention can adapt to different microgrid system configurations and automatically optimize the stability analysis model, significantly improving the stability analysis capability of microgrid systems in complex environments. Compared with existing technologies, it has stronger adaptability and self-adaptability.
[0045] In a more specific technical solution, S5 uses the following logic to express the Lyapunov function of the combinatorial neural network model:
[0046] (12)
[0047] In equation (12), Lyapunov functions represent the interactions between a single subsystem and the rest of the subsystems. Indicates the number of subsystems. Representation and subsystem i The corresponding learnable constant, Representation and subsystem i With neighbor subsystem j The learnable constants corresponding to the interactions, Representation Subsystem i With neighbor subsystem j Lyapunov functions interacting between them Representing the neighbor subsystem j State variables, Representation and subsystem i A set of connected neighboring subsystems.
[0048] This invention combines neural network models with symbolic regression techniques to directly construct verifiable analytical Lyapunov functions, significantly improving the accuracy and interpretability of stability analysis. It can also be extended to high-dimensional complex systems and has promising application prospects.
[0049] The method of this invention can be extended to high-dimensional, networked microgrid systems, supporting interactive modeling between multiple subsystems. By combining Lyapunov functions of neural network models, the stability analysis of each subsystem is performed independently, but the dynamic relationships between subsystems can be learned through a shared network, significantly improving the scalability and applicability of the system, and enabling it to cope with larger-scale and more complex microgrid environments.
[0050] In a more specific technical solution, a microgrid stability analysis system includes:
[0051] The microgrid data acquisition and preprocessing module is used to acquire microgrid system data in the isolated operation state, and remove noise from the microgrid system data through filtering to obtain a clean state signal;
[0052] The modeling and training module is used to model the dynamics of the microgrid based on the clean state signal, construct a neural network model and output a Lyapunov function. By training the neural network model, the stability structure of the system is fitted. The modeling and training module is connected to the microgrid data acquisition and preprocessing module.
[0053] The symbolic regression processing module is used to define and minimize the Lyapunov risk function, optimize the neural network model, transform the network output into an analytical Lyapunov function through symbolic regression, quantify the degree to which the Lyapunov function violates the stability condition, and connect the symbolic regression processing module to the modeling and training module.
[0054] The counterexample training module is used to verify the stability conditions of the analytical Lyapunov function. If a counterexample exists, the current analytical Lyapunov function is fed back for retraining to complete the global stability enhancement operation. The counterexample training module is connected to the symbolic regression processing module and the modeling training module.
[0055] The subsystem interaction learning module is used to model the state of each subsystem in a high-dimensional islanded microgrid system by using the combined neural network model Lyapunov function, learn and represent the interaction coupling relationship between subsystems, and complete model sharing and stability collaborative evaluation. The subsystem interaction learning module is connected to the counterexample training module.
[0056] The present invention has the following advantages over the prior art:
[0057] This invention focuses on microgrid stability analysis based on neural network models and Lyapunov functions. It aims to construct verifiable analytical Lyapunov functions by combining deep learning and symbolic regression techniques, thereby efficiently and accurately analyzing and ensuring the stability of microgrid systems. The method models the dynamics of the microgrid system using a neural network model, outputs a Lyapunov function, and then uses symbolic regression to transform the neural network model output into an analytical Lyapunov function.
[0058] This invention ensures that the analytical Lyapunov function meets the global stability requirements by verifying the stability conditions and generating counterexamples for training, thereby providing a stability guarantee for microgrid systems.
[0059] The method of this invention can be extended to high-dimensional islanded microgrid systems, exhibiting good scalability and adaptability. Experimental results show that this method demonstrates excellent stability analysis capabilities in multiple nonlinear systems, significantly improving the efficiency and accuracy of traditional methods when dealing with complex systems.
[0060] This invention employs a method combining neural network models and symbolic regression. Through intelligent modeling and automated analysis, it constructs verifiable analytical Lyapunov functions, thereby improving the accuracy, flexibility, and adaptability of stability analysis.
[0061] This invention combines neural network models with symbolic regression to automatically learn and model the complex nonlinear dynamics of microgrid systems, overcoming the limitations of traditional Lyapunov methods that rely on predefined function templates. Compared to traditional methods, this invention can flexibly adapt to dynamic changes in the system, improving the efficiency and accuracy of stability analysis, and is particularly suitable for microgrid systems with high nonlinearity and large dynamic changes.
[0062] By employing symbolic regression, this invention transforms the Lyapunov function output by the neural network model into an analytical Lyapunov function, enhancing the transparency and interpretability of the analysis results. Compared to traditional methods that typically rely on numerical solutions and approximations, symbolic regression provides an accurate and easily verifiable analytical expression, making stability analysis more controllable and theoretically sound.
[0063] This invention ensures that the Lyapunov function meets global stability requirements through counterexample generation and a neural network model self-optimization mechanism. Through continuous training and feedback, this invention can adapt to different microgrid system configurations and automatically optimize the stability analysis model, significantly improving the stability analysis capability of microgrid systems in complex environments. Compared with existing technologies, it has stronger adaptability and self-adaptability.
[0064] This invention combines neural network models with symbolic regression techniques to directly construct verifiable analytical Lyapunov functions, significantly improving the accuracy and interpretability of stability analysis. It can also be extended to high-dimensional complex systems and has promising application prospects.
[0065] The method of this invention can be extended to high-dimensional, networked microgrid systems, supporting interactive modeling between multiple subsystems. By combining Lyapunov functions of neural network models, the stability analysis of each subsystem is performed independently, but the dynamic relationships between subsystems can be learned through a shared network, significantly improving the scalability and applicability of the system, and enabling it to cope with larger-scale and more complex microgrid environments.
[0066] This invention solves the technical problems of poor verifiability of Lyapunov functions and poor accuracy, flexibility and adaptability of stability analysis in the prior art. Attached Figure Description
[0067] Figure 1 This is a schematic diagram illustrating the basic steps of a microgrid stability analysis method according to the present invention;
[0068] Figure 2This is a symbolic regression framework diagram of Embodiment 1 of the present invention. Detailed Implementation
[0069] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0070] Example 1
[0071] like Figure 1 As shown, the microgrid stability analysis method provided by this invention includes the following basic steps:
[0072] S1. Collect microgrid system data in islanded operation state, and remove noise from the microgrid system data through filtering operation to obtain a clean state signal;
[0073] In this embodiment, since the microgrid system data may be affected by noise interference during the acquisition process, filtering techniques are needed to remove this noise. In the filtering operation, a low-pass filter is used to remove high-frequency random noise from the microgrid system data, resulting in denoised microgrid data. Specifically, the following low-pass filter is used to remove high-frequency random noise; the low-pass filter expression is:
[0074] (1)
[0075] In equation (1), It is the original signal. It is the filtered signal. Represents the filter time constant. It is the cutoff time constant of the filter. x Indicates a sample.
[0076] In this embodiment, the denoised microgrid data is normalized to obtain normalized microgrid data; specifically, to ensure the training effect of the neural network model, the data is normalized to a uniform range, such as [0, 1], to reduce the difference in the dimensions of different parameters. The Min-MaxNormalization method is used:
[0077] (2)
[0078] This method ensures that all microgrid system data are within the same numerical range, making the training process more stable.
[0079] This indicates that the data has been normalized to the microgrid standard. This represents the minimum value among all samples in the dataset. This represents the maximum value among all samples in the dataset.
[0080] In this embodiment, to make the training process more stable, standardization is performed so that the mean of the data is 0 and the variance is 1, eliminating scale differences in the microgrid system data and improving training efficiency. The standardization formula is:
[0081] (3)
[0082] In equation (3), It is the mean of the data. That is the standard deviation. This indicates data that has undergone standardization.
[0083] In this embodiment, the processed dataset is divided, for example, into a 70% allocation for training, 15% for validation, and 15% for testing. This ensures the stability of model training and prevents overfitting. The training set is used to train the neural network model, and the network adjusts its parameters based on the training data. The validation set is used to adjust the network's hyperparameters, such as the learning rate and the number of network layers, and to prevent overfitting. The test set is used to finally evaluate the model's performance and ensure its generalization ability.
[0084] S2. Model the microgrid dynamics based on the clean state signal, construct a neural network model and output the Lyapunov function, and fit the stability structure of the system by training the neural network model.
[0085] In this embodiment, the state variable of the microgrid system is set as follows: , R Let the set of real numbers be represented, and let ordinary differential equations be used to express the dynamic system of the microgrid system; specifically, the dynamic system is described by the following ordinary differential equations:
[0086] (4)
[0087] In equation (4), It is a nonlinear vector field describing the dynamics of a microgrid. t Represents a time variable.
[0088] In this embodiment, the output of the neural network model is a Lyapunov function. ,in These are the parameters of the neural network model. The neural network model is trained using the following formula:
[0089] (5)
[0090] In equation (5), It is a smooth ReLU activation function. It is an input convex neural network model (ICNN, InputConvex Neural Networks). It is an invertible, continuously differentiable function. It is a constant, ensuring the positive definiteness of the Lyapunov function.
[0091] This represents the nonlinear transformation result obtained based on the input convex neural network model (ICNN). This represents the baseline value of the network output when the input is zero, used to ensure the normalization of the Lyapunov function. Let represent the squared L2 norm of the state vector 𝑥, which is the sum of the squares of the state variables.
[0092] S3. Define and minimize the Lyapunov risk function to optimize the neural network model. Transform the network output into an analytical Lyapunov function through symbolic regression and quantify the degree to which the Lyapunov function violates the stability condition.
[0093] In this embodiment, the degree to which the Lyapunov function violates the stability condition is quantified; specifically, the neural network model is trained by maximizing the Lyapunov risk function. The Lyapunov risk function... Used to measure the degree to which a Lyapunov function violates the stability condition. Defined as:
[0094] (6)
[0095] Represents the total number of samples. Represents the Lie derivative. i Indicates the index of the sample.
[0096] In equation (6), It is the Lie derivative of the Lyapunov function, i.e., the rate of change along the system's trajectory:
[0097] (7)
[0098] The Lie derivative of the Lyapunov function is minimized using the backpropagation algorithm to achieve the desired Lie derivative. It satisfies the stability condition of the Lyapunov function. n The dimension of the system state variables. Represents the first in the system state vector i One portion, Represents a nonlinear vector field f(x) In thei Component functions in each dimension.
[0099] like Figure 2 As shown, in this embodiment, after training the neural network model, symbolic regression is used to convert the Lyapunov function output by the neural network model into a variable. Converting to an analytic mathematical expression yields the analytic Lyapunov function. To satisfy the stability conditions of Lyapunov functions, the symbolic regression objective is to find an analytic expression that satisfies the stability conditions of Lyapunov functions.
[0100] (8)
[0101] This indicates a conditional constraint, namely, for all non-zero state vectors. x Established.
[0102] After symbolic regression, the analytic Lyapunov function is obtained. ,For example:
[0103] (9)
[0104] in, It is a constant obtained from symbolic regression. x n The state vector is represented by the first... i Each component.
[0105] S4. Verify the stability condition of the analytical Lyapunov function. If there is a counterexample, feed back the current analytical Lyapunov function for retraining to complete the global stability enhancement operation of the function.
[0106] In this embodiment, the analytical Lyapunov function is... To verify stability, a numerical root-finding algorithm is used to detect the roots of the analytic Lyapunov function, ensuring that the analytic Lyapunov function is zero only at equilibrium points. Specifically, a numerical root-finding algorithm, such as SciPy's fsolve, is used to detect the roots of the analytic Lyapunov function, ensuring that the analytic Lyapunov function is zero only at equilibrium points.
[0107] (10)
[0108] This indicates the equilibrium point x=0.
[0109] Based on the analytical Lyapunov function Calculate the Lie derivative:
[0110] (11)
[0111] And ensure that it satisfies in the state space. ≤0 to ensure stability.
[0112] In this embodiment, if it is found that the Lyapunov function does not satisfy the stability condition at certain state points, i.e., counterexamples, these counterexamples are added to the training set, and the neural network model is retrained until a valid analytical Lyapunov function that satisfies the stability condition is found.
[0113] S5. Using the combined neural network model Lyapunov function, model the state of each subsystem in a high-dimensional islanded microgrid system, learn and represent the interactive coupling relationship between subsystems, and complete model sharing and stability collaborative evaluation.
[0114] In this embodiment, for a high-dimensional, networked, high-dimensional islanded microgrid system composed of multiple subsystems, this invention employs a design method using a combined neural network model Lyapunov function. The state of each subsystem is represented by an independent neural network model Lyapunov function, and the interaction relationships between subsystems are learned through a shared neural network model. The combined neural network model Lyapunov function is expressed as follows:
[0115] (12)
[0116] In equation (12), Lyapunov functions represent the interactions between a single subsystem and the rest of the subsystems. Indicates the number of subsystems. Representation and subsystem i The corresponding learnable constant, Representation and subsystem i With neighbor subsystem j The learnable constants corresponding to the interactions, Representation Subsystem i With neighbor subsystem j Lyapunov functions interacting between them Representing the neighbor subsystem j State variables, Representation and subsystem i A set of connected neighboring subsystems.
[0117] In summary, this invention analyzes the stability of microgrids based on the Lyapunov energy function of a neural network model. It aims to construct a verifiable analytical Lyapunov function by combining deep learning and symbolic regression techniques, thereby efficiently and accurately analyzing and ensuring the stability of microgrid systems. This method models the dynamics of the microgrid system using a neural network model, outputs the Lyapunov function, and utilizes symbolic regression to transform the neural network model output into an analytical mathematical expression.
[0118] This invention ensures that the Lyapunov function meets the global stability requirements by verifying the stability conditions and generating counterexamples for training, thereby providing a stability guarantee for the control system of microgrids.
[0119] The method of this invention can be extended to high-dimensional networked microgrid systems, exhibiting good scalability and adaptability. Experimental results show that this method demonstrates excellent stability analysis capabilities in multiple nonlinear systems, significantly improving the efficiency and accuracy of traditional methods when dealing with complex systems.
[0120] This invention employs a method combining neural network models and symbolic regression. Through intelligent modeling and automated analysis, it constructs verifiable analytical Lyapunov functions, thereby improving the accuracy, flexibility, and adaptability of stability analysis.
[0121] This invention combines neural network models with symbolic regression to automatically learn and model the complex nonlinear dynamics of microgrid systems, overcoming the limitations of traditional Lyapunov methods that rely on predefined function templates. Compared to traditional methods, this invention can flexibly adapt to dynamic changes in the system, improving the efficiency and accuracy of stability analysis, and is particularly suitable for microgrid systems with high nonlinearity and large dynamic changes.
[0122] By employing symbolic regression, this invention transforms the Lyapunov function output by the neural network model into an analytical expression, enhancing the transparency and interpretability of the analysis results. Compared to traditional methods that typically rely on numerical solutions and approximations, symbolic regression provides an accurate and easily verifiable analytical expression, making stability analysis more controllable and theoretically sound.
[0123] This invention ensures that the Lyapunov function meets global stability requirements through counterexample generation and a neural network model self-optimization mechanism. Through continuous training and feedback, this invention can adapt to different microgrid system configurations and automatically optimize the stability analysis model, significantly improving the stability analysis capability of microgrid systems in complex environments. Compared with existing technologies, it has stronger adaptability and self-adaptability.
[0124] This invention combines neural network models with symbolic regression techniques to directly construct verifiable analytical Lyapunov functions, significantly improving the accuracy and interpretability of stability analysis. It can also be extended to high-dimensional complex systems and has promising application prospects.
[0125] The method of this invention can be extended to high-dimensional, networked microgrid systems, supporting interactive modeling between multiple subsystems. By combining Lyapunov functions of neural network models, the stability analysis of each subsystem is performed independently, but the dynamic relationships between subsystems can be learned through a shared network, significantly improving the scalability and applicability of the system, and enabling it to cope with larger-scale and more complex microgrid environments.
[0126] This invention employs a method combining neural network models and symbolic regression techniques to construct verifiable analytical Lyapunov functions, overcoming the limitations of traditional Lyapunov methods. Through training the neural network model, the Lyapunov function can be output based on the dynamic characteristics of the actual microgrid system, and symbolic regression is used to transform it into an analytical expression. This not only improves the accuracy of stability analysis but also enhances the flexibility of the method, enabling it to better adapt to complex microgrid systems. Compared to existing dynamic phasor methods, this application, through the learning capability of the neural network model, can efficiently model and analyze the dynamic behavior of microgrid systems, and optimizes the Lyapunov function by minimizing the Lyapunov risk function, thereby reducing the computational burden. This method avoids the tedious process of solving system state equations, providing stability analysis with lower computational complexity and significantly improving analysis efficiency. By introducing symbolic regression techniques, this application can automatically generate analytical Lyapunov functions, and through counterexample generation and self-optimization mechanisms, ensure that the Lyapunov function meets global stability requirements. Unlike traditional methods that rely on numerical solutions and approximations, symbolic regression provides an accurate and easily verifiable analytical expression, improving the transparency and interpretability of the analysis results while ensuring the theoretical guarantee of the stability analysis process.
[0127] This invention solves the technical problems of poor verifiability of Lyapunov functions and poor accuracy, flexibility and adaptability of stability analysis in the prior art.
[0128] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for analyzing the stability of a microgrid, characterized in that, The method includes: S1. Collect microgrid system data in islanded operation state, and remove noise from the microgrid system data through filtering operation to obtain a clean state signal; S2. Model the microgrid dynamics based on the clean state signal, construct a neural network model and output the Lyapunov function, and fit the stability structure of the system by training the neural network model. In S2, the state variables of the microgrid system are set as follows: , R Representing the set of real numbers, using ordinary differential equations to express the dynamic system of the microgrid system; The neural network model outputs a Lyapunov function. ,in These are the parameters of the neural network model; Train a neural network model using the following logic: (5) In equation (5), It is a smooth ReLU activation function. It is an input convex neural network model. It is an invertible, continuously differentiable function. It is a constant. This represents the nonlinear transformation result obtained based on the input convex neural network model. This represents the baseline value output by the network when the input is zero. The squared norm of the state vector is represented by the 2-norm. S3. Define and minimize the Lyapunov risk function to optimize the neural network model. Transform the network output into an analytical Lyapunov function through symbolic regression and quantify the degree to which the Lyapunov function violates the stability condition. S4. Verify the stability condition of the analytical Lyapunov function. If there is a counterexample, feed back the current analytical Lyapunov function for retraining to complete the global stability enhancement operation of the function. S5. Using the combined neural network model Lyapunov function, model the state of each subsystem in a high-dimensional islanded microgrid system, learn and represent the interactive coupling relationship between subsystems, and complete model sharing and stability collaborative evaluation.
2. The microgrid stability analysis method according to claim 1, characterized in that, In step S1, during the filtering operation, a low-pass filter is used to remove high-frequency random noise from the microgrid system data, resulting in denoised microgrid data. The denoised microgrid data is normalized to obtain normalized microgrid data; The normalized microgrid data is standardized to obtain and divide standard data, and training and validation sets are obtained.
3. The microgrid stability analysis method according to claim 1, characterized in that, In S3, the degree to which the Lyapunov function violates the stability condition is quantified using the following logic: (6) In equation (6), It is the Lie derivative of the Lyapunov function. Represents the total number of samples. Represents the Lie derivative. i Indicates the index of the sample; The loss function is minimized using the backpropagation algorithm, such that the Lie derivative is... The stability condition of the Lyapunov function is satisfied.
4. The microgrid stability analysis method according to claim 1, characterized in that, In step S3, the symbolic regression operation is performed, and the Lyapunov function is... This is converted into an analytical mathematical expression to obtain the analytical Lyapunov function. This satisfies the stability condition of the Lyapunov function. (8) In the formula, This indicates a conditional constraint, meaning that the condition holds true for all non-zero state vectors.
5. The microgrid stability analysis method according to claim 1, characterized in that, In S4, the analytical Lyapunov function To verify stability, a numerical root-finding algorithm is used to detect the roots of the analytical Lyapunov function, ensuring that the analytical Lyapunov function is zero only at equilibrium points: (10) In the formula, This indicates the equilibrium point x=0.
6. The microgrid stability analysis method according to claim 5, characterized in that, According to the analytic Lyapunov function Calculate the Lie derivative: (11) And ensure that the Lie derivative satisfies the following in the state space. .
7. The microgrid stability analysis method according to claim 5, characterized in that, If the Lyapunov function does not satisfy the stability condition at a preset state point, a counterexample is determined, and the counterexample is added to the training set. The neural network model is then retrained until an analytical Lyapunov function that satisfies the stability condition is found.
8. The microgrid stability analysis method according to claim 1, characterized in that, In step S5, the Lyapunov function of the combined neural network model is expressed using the following logic: (12) In equation (12), Lyapunov functions represent the interactions between a single subsystem and the rest of the subsystems. Indicates the number of subsystems. Representation and subsystem i The corresponding learnable constant, Representation and subsystem i With neighbor subsystem j The learnable constants corresponding to the interactions, Representation Subsystem i With neighbor subsystem j Lyapunov functions interacting between them Representing the neighbor subsystem j State variables, Representation and subsystem i A set of connected neighboring subsystems.
9. A microgrid stability analysis system, used to execute a microgrid stability analysis method according to any one of claims 1 to 8, characterized in that, The system includes: The microgrid data acquisition and preprocessing module is used to acquire microgrid system data in the isolated operation state, and remove noise from the microgrid system data through filtering to obtain a clean state signal; The modeling and training module is used to model the microgrid dynamics based on the clean state signal, construct a neural network model and output a Lyapunov function, and fit the stability structure of the system by training the neural network model. The modeling and training module is connected to the microgrid data acquisition and preprocessing module. The symbolic regression processing module is used to define and minimize the Lyapunov risk function, optimize the neural network model, transform the network output into an analytical Lyapunov function through symbolic regression, and quantify the degree to which the Lyapunov function violates the stability condition. The symbolic regression processing module is connected to the modeling and training module. The counterexample training module is used to verify the stability condition of the analytical Lyapunov function. If a counterexample exists, the current analytical Lyapunov function is fed back for retraining to complete the global stability enhancement operation. The counterexample training module is connected to the symbolic regression processing module and the modeling training module. The subsystem interaction learning module is used to model the state of each subsystem in a high-dimensional islanded microgrid system by using the combined neural network model Lyapunov function, learn and represent the interaction coupling relationship between the subsystems, and complete model sharing and stability collaborative evaluation. The subsystem interaction learning module is connected to the counterexample training module.
Citation Information
Patent Citations
Island micro-grid stability analysis method based on dynamic phasor method
CN113839420A
Method for self-adaptive neural inversion control of three-phase parallel connection type active filter
CN104037766A
Fixed-time stable learning framework of Shenchang differential equation
CN119476401A