Power electronic system simulation method and system based on event trigger update state space model, and medium
Through event triggering mechanisms and swimming methods, the efficient online conversion of mathematical models described by the state equation to the state space model is realized, solving the problem of low model conversion efficiency in existing technologies, and improved the expansion of the simulation speed and the tool library of the tool library. Essence
Patent Information
- Application Number
- CN202411362404.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-09-27
AI Technical Summary
It is difficult for the existing technology to efficiently convert mathematical models described in state equations into state space models, resulting in limited expansion of simulation tool library and hindering the improvement of simulation efficiency.
By introducing an event trigger mechanism, the associated matrix between the coefficient matrix and the system state, the coefficient matrix of the spatial model of the status model at the discrete point of the event is used to achieve online conversion.
It reduces the calculation of the status space model coefficient matrix, optimizes the online conversion efficiency of the model, improves the simulation speed, and promotes the expansion of the simulation tool library and the advantages of different tools.
Smart Images

Figure CN119378209A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of system simulation, and more specifically, relates to a power electronic system simulation method, system and medium based on event-triggered updating of a state space model. Background Art
[0002] As the industry pays more and more attention to energy innovation and green development, power electronics technology is also being widely used in important fields such as aerospace, power grid, etc. At the same time, in order to improve energy conversion efficiency and optimize resource structure, modern power electronics technology is gradually developing towards high frequency and complexity. This background has brought new demands and challenges to the modeling and simulation technology of power electronics systems.
[0003] As an abstract description of the actual physical system, the system mathematical model is also the object and basis of system simulation analysis, and is of great significance in system simulation modeling technology. At present, most mainstream power electronics industry software adopts a model construction method based on the state-space method, such as EMTP, SPICE and other software. The state-space model is a widely used system mathematical model. It uses matrices and vectors to represent the system state and input and output variables, and describes the dynamic characteristics of the system with a set of first-order differential equations composed of state variables. It is particularly suitable for describing linear systems. For a circuit system, a set of independent variables with the minimum number that can fully describe the time-domain behavior of the circuit system is called a state variable. In addition, from the perspective of mathematical processing, the state-space model can be expressed by a set of first-order differential equations, which is also very convenient to solve using a computer.
[0004] As the industry is booming towards the trend of multidisciplinary cross-border and multi-field integration, modeling and simulation technology for multi-field complex systems has received increasing attention. The simulation tools based on this technology have outstanding convenience and practicality in model construction, but the system mathematical model required for its simulation is usually described in the form of state equations. Different from the state-space model, the mathematical model described by the state equation only provides a function interface, the relationship between the system state and the input and output variables is not explicit, and the model may be nonlinear, which makes it difficult for the computer to solve it. In addition, since the mathematical model described by the state equation is inconsistent with the mathematical form of the state-space model, the pain point that the models under these two description methods cannot be interoperable in actual engineering often occurs, which hinders the expansion of the simulation tool library and limits the improvement of simulation efficiency. Therefore, how to convert the mathematical model described by the state equation into the state-space model in an efficient way, realize the interoperability between the two forms of models, and break the barriers between different simulation tools is a problem that needs to be solved urgently.
[0005] According to the mathematical expression of the state-space model, the key to determining the state-space model of the system is to determine the coefficient matrix of the system's state-space equation. Therefore, the first sub-problem of the original problem is how to obtain the coefficient matrix of the state-space equation by calculating the mathematical model described by the state equation. At the same time, considering that the model in the mathematical model described by the state equation is time-varying, the process of converting it to the state-space model needs to be performed "online". In order to avoid this conversion calculation consuming excessive resources during the simulation process, it is necessary to reduce the calculation cost while ensuring the accuracy of the model conversion. Therefore, the second sub-problem of the original problem is how to achieve online conversion between the two models at a lower cost. Summary of the invention
[0006] In view of the above defects or improvement needs of the prior art, the present invention provides a power electronic system simulation method, system and medium based on event-triggered updating of the state space model, the purpose of which is to achieve timely and efficient online model conversion and improve the simulation speed of the power electronic system.
[0007] To achieve the above object, according to a first aspect of the present invention, a power electronic system simulation method based on event-triggered state space model update is proposed, comprising the following steps:
[0008] Construct the correlation matrix corresponding to each coefficient matrix in the system state space model respectively; each correlation matrix is an n×n matrix, n is the number of system states, and the correlation matrix is used to indicate whether the corresponding coefficient matrix needs to be updated when switching between any two system states;
[0009] The system is simulated according to the preset integration step. During the simulation process: every time an event discrete point is passed, the current integration step is updated according to the event discrete point moment, and it is determined whether each coefficient matrix needs to be updated based on the association matrix; for the coefficient matrix that needs to be updated, the new value of the coefficient matrix is calculated by the perturbation method based on the system mathematical model described by the state equation to achieve the update.
[0010] As a further preference, the coefficient matrix in the system state space model includes a state matrix A, an input matrix B, an output matrix C and a direct transfer matrix D.
[0011] As a further preferred embodiment, the expression of the system state space model is as follows:
[0012]
[0013] Among them, x is the state variable, is the first-order derivative of the state variable, y is the output variable, and u is the input variable.
[0014] As further preferred, the expression of the system mathematical model described by the state equation is as follows:
[0015]
[0016] Among them, f() is the state function of state variables, input variables and time variables, g() is the output function of state variables, input variables and time variables, and t is the time variable.
[0017] As a further preferred embodiment, according to the system mathematical model described by the state equation, when the new value of the coefficient matrix is calculated by the perturbation method, a small perturbation coefficient ε of the state variable is introduced. x Calculate the state matrix A and output matrix C as follows:
[0018]
[0019] As a further preferred embodiment, according to the system mathematical model described by the state equation, when the new value of the coefficient matrix is calculated by the perturbation method, a small perturbation coefficient ε of the input variable is introduced. u Calculate the input matrix B and the direct transfer matrix D as follows:
[0020]
[0021] As further preferred, the event discrete points include active event discrete points and passive event discrete points, the active event discrete points are active events known before the simulation, and the passive event discrete points are passive events occurring during the simulation.
[0022] As a further preferred embodiment, each association matrix is constructed as follows: if the switching between two system states does not change the corresponding coefficient matrix, the element representing the system state switching in the association matrix is set to "1", indicating that the coefficient matrix does not need to be updated; otherwise it is set to "0", indicating that the coefficient matrix needs to be updated.
[0023] According to a second aspect of the present invention, a power electronic system simulation system based on event-triggered state space model updating is provided, comprising a processor, wherein the processor is used to execute the above-mentioned power electronic system simulation method based on event-triggered state space model updating.
[0024] According to a third aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the power electronic system simulation method based on event-triggered updating of a state space model is implemented.
[0025] In general, the above technical solution conceived by the present invention has the following technical advantages compared with the prior art:
[0026] 1. The present invention helps to better determine the necessary time for updating the state space model by introducing the mechanism of system discrete events; and by respectively constructing the association matrix between each coefficient matrix and the system state, the update discrete points of each coefficient matrix are extracted from the event discrete points, and the update time of each coefficient matrix is decoupled, thereby avoiding unnecessary update calculations of the coefficient matrix, reducing the amount of calculation for updating the state space model coefficient matrix, reducing the model update cost, optimizing the model online conversion efficiency, and improving the overall simulation speed.
[0027] 2. The present invention introduces small perturbations of state variables or input variables at discrete points of events, and realizes the conversion between mathematical models described by state equations and mathematical models in state space form based on the perturbation method, thereby improving the model solving efficiency and model reusability, facilitating the expansion of the simulation tool library, and realizing the integration of advantages between different simulation tools. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A schematic diagram of the process of converting a mathematical model described by a state equation into a state space model in an embodiment of the present invention;
[0029] Figure 2 A schematic diagram of calculating a state space model coefficient matrix based on a perturbation method according to an embodiment of the present invention;
[0030] Figure 3 A schematic diagram of the relationship between various discrete points in an embodiment of the present invention;
[0031] Figure 4 A schematic diagram of a state space model updating method based on event triggering according to an embodiment of the present invention;
[0032] Figure 5 The present invention is a flowchart of a method for simulating a power electronic system based on event-triggered updating of a state space model according to an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0034] The embodiment of the present invention provides a power electronic system simulation method based on event-triggered updating of state space model, such as Figure 4 and Figure 5 As shown, the following steps are included:
[0035] (1) Preprocessing of the system: setting simulation parameters, constructing a discrete point set of events, analyzing the system state, and constructing the correlation matrix between the coefficient matrix in the state space model and the system state.
[0036] (1.1) System discrete events refer to discrete points that affect the system state during system simulation, and can be divided into active events and passive events. In the physical world, system discrete events can be the on and off of electrical switches, the opening and closing of hydraulic valves, or the emergency braking of working machines; in mathematical expression, they are factors that change the system state equation. Introducing the mechanism of system discrete events can help better determine the necessary moment for model conversion, update the model in a timely manner at low cost, and optimize the efficiency of model online conversion.
[0037] Specifically, the state changes of the system during the simulation process are mainly related to active events and passive events. For example, the active events of the power electronics system can be the switching of controllable power semiconductors such as MOSFET and IGBT in the system, and the changes in the system power supply excitation, and the passive events can be the switching of the diodes in the system as the system state changes.
[0038] The time when an active event occurs can be directly determined based on external signals before solving the simulation. Therefore, external active events that can determine the specific time can be added to the event discrete point set P{} in advance. Since the time when a passive event occurs is related to the system state variables, it needs to be approximately determined by the event location method during the simulation process. That is, when a passive event occurs during the simulation process, the time when the passive event occurs is located and this time is added to the event discrete point set P{}. The event discrete point is the key calculation point for converting the state equation description model into the state space model. In order to ensure that the model simulation is not distorted, the event discrete point should be a subset of the simulation discrete point.
[0039] (1.2) In practical applications, most of the system state changes are continuous switching between a finite number of states. The different system states existing in the system are numbered from 1→n, where n is the number of system states.
[0040] Then, n×n association matrices MA, MB, MC, and MD between the coefficient matrices A, B, C, and D in the state space model and the system states are constructed respectively. The principle of association matrix construction is as follows: if the switching between system states does not change the coefficient matrix, the element representing the switching of the system state in the corresponding association matrix is set to "1", otherwise it is set to "0".
[0041] Furthermore, the state space model expression is as follows:
[0042]
[0043] Among them, x is the system state variable, y is the system output variable, u is the system input variable, A is the connection between the internal state variables of the system, called the state matrix, B is the effect of the input on the state variable, called the input matrix, C is the connection between the state variable and the output variable, called the output matrix, and D is the direct transfer matrix. The system matrices A, B, C, and D are closely related to the system state.
[0044] The form of the incidence matrix is in diagonal form, as shown below:
[0045]
[0046] Among them, M = MA, MB, MC, MD are the correlation matrices corresponding to the system matrices A, B, C, and D respectively, and K ij is an element in the association matrix, 1≤i,j≤n, representing whether the system matrix changes when the system states numbered i and j are switched. If so, K ij =0, otherwise K ij =1.
[0047] (2) Simulate the system and advance the simulation by solving the integral according to the integral step until the simulation ends. During the simulation, update the integral step based on the event discrete point set, and determine whether the coefficient matrices in the state space model need to be updated in combination with the association matrix. The coefficient matrices that need to be updated are updated through the perturbation method.
[0048] Specifically, during simulation, a suitable variable step size algorithm, such as Adams algorithm, Dopri algorithm, etc., may be selected according to conditions such as accuracy and stability, and then the integral step size may be calculated according to these simulation solution algorithms.
[0049] During simulation, it is determined whether there are event discrete points in the single-step integration according to the event discrete point set. If not, the simulation is advanced by solving with the integral step length. If so, the coefficient matrix to be updated is determined according to the system state changes caused by this discrete event and the correlation matrix, and then the perturbation method is used to update the coefficient matrix of the state space model for the mathematical model described by the state equation. Finally, the integral step is adjusted to the discrete moment of the event, and the simulation is advanced by solving with the integral step length.
[0050] (2.1) Figure 3As shown in the figure, the simulation discrete point represents the single-step integration moment when simulating the target model. In order to accurately characterize the model characteristics, the specific moment of the event that will affect the system state needs to be considered during the simulation process, that is, the event discrete point. The system state may change before and after the defined event discrete point. In order to prevent the simulation results from being distorted, it is necessary to determine the moment of the event discrete point and perform the integral solution, that is, the event discrete point is a subset of the simulation discrete point. The change of the system state means that the mathematical model of the system changes, and the state space model coefficient matrix needs to be updated, but it does not mean that each coefficient matrix A, B, C, D needs to be updated. In actual simulations, there are many situations where the system state changes but some coefficient matrices remain unchanged. Therefore, it can be considered that each system matrix update discrete point is also a subset of the event discrete point.
[0051] When passing through the event discrete point, update the integration step size according to the event discrete point moment. For active events, the integration step size can be determined directly. For passive events that occur during the simulation process, when a certain integration step is detected to pass through a passive event, first determine the discrete moment of the passive event through the event location method, and then call the sorting algorithm to record this moment in the event discrete point set; in order to prevent simulation distortion and ensure the accuracy of the results, roll back this integration step to redetermine the integration step size. Then, determine whether each system matrix needs to be updated based on the elements in each association matrix MA, MB, MC, MD, and form a coefficient matrix to update the discrete point P A {},P B {},P C {},P D {}.
[0052] Specifically for a certain event discrete point p, if the corresponding elements of the association matrix MA are "1" (the corresponding system state change does not change the coefficient matrix A), there is no need to update the coefficient matrix A; otherwise, the event discrete point p is included in the coefficient matrix to update the discrete point P A {}, the determination method of updating discrete points of other coefficient matrices is the same as above, so as to achieve the decoupling of the updating time of coefficient matrices A, B, C, and D. It can be seen that the updating discrete points of each coefficient matrix should be a subset of the event discrete point set.
[0053] (2.2) Update the discrete points P in the coefficient matrix respectively A {},P B {},P C {},P D The state variable small perturbation coefficient ε is introduced into the mathematical model described by the state equation at {} x Or input variable small perturbation coefficient ε u , based on the perturbation method, the coefficient matrices A, B, C, and D are calculated and updated at different times.
[0054] The perturbation method is a method for solving nonlinear differential equations. It converts nonlinear equations into the sum of linear equations by introducing small perturbation coefficients, thereby approximating the solution of the target equation. The perturbation method is used in the approximate processing of complex mathematical models and has a good engineering background. It is practically feasible to calculate the coefficient matrix of the state space equation through the perturbation method.
[0055] Furthermore, for the mathematical model described by the state equation, the system state is described by the state variable x, the input variable u and the time variable t; the mathematical model described by the state equation is expressed as follows:
[0056]
[0057] Among them, f() is the state function and g() is the output function.
[0058] This model is widely used in technologies such as unified modeling and simulation in multiple fields and collaborative simulation of complex systems, and can well achieve the unification of the mathematical expression of the model. The mathematical model described by the state equation can be linear or nonlinear, which is mainly determined by the properties of the described system. When it is linear, it can be easily converted into the above-mentioned state space model; when it is nonlinear, it can be approximated as a state space model by piecewise linearization.
[0059] Furthermore, the coefficient matrices A, B, C, and D at the selected discrete points are calculated based on the perturbation method to achieve the transformation from the state equation description model to the state space model. Figure 2 As shown, the specific method is as follows:
[0060] When the discrete point P is updated through the coefficient matrix during the simulation process A {},P C {}, according to the characteristics of the state space model, the state variable small perturbation coefficient ε is introduced x , the coefficient matrix A is calculated as follows:
[0061]
[0062] Similarly, the coefficient matrix C can be calculated as follows:
[0063]
[0064] When the discrete point P is updated through the coefficient matrix during the simulation process B {},P D {}, according to the characteristics of the state space model, the input variable small perturbation coefficient ε is introduced u , the coefficient matrix B is calculated as follows:
[0065]
[0066] Similarly, the coefficient matrix D can be calculated as follows:
[0067]
[0068] Further, such as Figure 1 As shown in the figure, after the event-triggered state space model is updated, the piecewise linear state space equation obtained can be expressed as follows:
[0069]
[0070] Among them, t k ,t k+1 They represent the occurrence time of the kth and k+1th event discrete points in the system respectively; na, nb, nc, nd represent the nearest coefficient matrix update discrete point P corresponding to the kth event discrete point from the coefficient matrix A, B, C, D respectively. A {},P B {},P C {},P D The number of discrete event points between {}, whose value can be determined according to the correlation matrix during the simulation process; A k , B k , C k , D k is the coefficient matrix at the kth event discrete point. The system state space equation is segmented according to the event discrete points, and the coefficient matrices A, B, C, and D are discretized according to their corresponding coefficient matrices to update the discrete points. The combination of the two obtains a piecewise linear state space equation that can be efficiently updated based on event triggering.
[0071] In summary, for the state equation description model, the present invention determines the event discrete points in the simulation process based on the system event trigger mechanism, and uses the perturbation method to calculate and update the state space model coefficient matrix at the event discrete points, thereby obtaining a state space model that can accurately describe the system. Since the calculation and update of the coefficient matrix needs to be processed online during the simulation process, it is necessary to further optimize the update efficiency, establish an association matrix based on the relationship between the system state and the coefficient matrix, and asynchronously update the coefficient matrices A, B, C, and D, thereby minimizing the additional calculation amount required for the state space model update, and obtaining a segmented state space model under the asynchronous update of the coefficient matrix.
[0072] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for simulating a power electronic system based on event-triggered updating of a state space model, characterized in that: The steps include: Construct the correlation matrix corresponding to each coefficient matrix in the system state space model respectively; each correlation matrix is an n×n matrix, n is the number of system states, and the correlation matrix is used to indicate whether the corresponding coefficient matrix needs to be updated when switching between any two system states; The system is simulated according to the preset integration step. During the simulation process: whenever an event discrete point is passed, the current integration step is updated according to the event discrete point moment, and whether each coefficient matrix needs to be updated is determined according to the correlation matrix; For the coefficient matrix that needs to be updated, the new value of the coefficient matrix is calculated by the perturbation method according to the system mathematical model described by the state equation to achieve the update.
2. The power electronic system simulation method based on event-triggered state space model update according to claim 1, characterized in that: The coefficient matrices in the system state space model include the state matrix A, the input matrix B, the output matrix C and the direct transfer matrix D.
3. The power electronic system simulation method based on event-triggered state space model update according to claim 2, characterized in that: The expression of the system state space model is as follows: Among them, x is the state variable, is the first-order derivative of the state variable, y is the output variable, and u is the input variable.
4. The method for simulating a power electronic system based on event-triggered updating of a state space model according to claim 3, characterized in that: The expression of the system mathematical model described by the state equation is as follows: Among them, f() is the state function of state variables, input variables and time variables, g() is the output function of state variables, input variables and time variables, and t is the time variable.
5. The power electronic system simulation method based on event-triggered state space model update according to claim 4, characterized in that: According to the system mathematical model described by the state equation, when the new value of the coefficient matrix is calculated by the perturbation method, the small perturbation coefficient ε of the state variable is introduced x Calculate the state matrix A and output matrix C as follows:
6. The method for simulating a power electronic system based on event-triggered updating of a state space model according to claim 4, characterized in that: According to the system mathematical model described by the state equation, when the new value of the coefficient matrix is calculated by the perturbation method, the input variable small perturbation coefficient ε is introduced u Calculate the input matrix B and the direct transfer matrix D as follows:
7. The power electronic system simulation method based on event-triggered state space model update according to claim 1, characterized in that: The event discrete points include active event discrete points and passive event discrete points. The active event discrete points are active events known before the simulation, and the passive event discrete points are passive events occurring during the simulation.
8. The power electronic system simulation method based on event-triggered state space model update according to any one of claims 1 to 7, characterized in that: Each association matrix is constructed as follows: if the switch between two system states does not change the corresponding coefficient matrix, the element representing the system state switch in the association matrix is set to "1", indicating that the coefficient matrix does not need to be updated; otherwise, it is set to "0", indicating that the coefficient matrix needs to be updated.
9. A power electronic system simulation system based on event-triggered state space model update, characterized in that: It comprises a processor, wherein the processor is used to execute the power electronic system simulation method based on event-triggered updating of the state space model as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for simulating a power electronic system based on event-triggered updating of a state space model as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Discrete state event-driven simulation method for power electronic hybrid system simulation
CN109541961A
Improved variational iterative simulation method based on event triggering
CN115459339A
Distributed satellite formation configuration reconstruction control method based on dynamic event triggering learning sliding mode
CN118584802A
Systems and methods for generating code for computer-based physical models
US11354463B1
Stochastic state estimation for smart grids
US20140032187A1
Cited By
PINN intelligent simulation method for discontinuous ODE system
CN122365969A