Power electronic system simulation method and system based on rigid self-switching
By detecting the step-length change rate switching algorithm in the power electronic system simulation, the problem of low simulation efficiency in the prior art is solved, and efficient simulation solution performance is achieved.
Patent Information
- Application Number
- CN202510395983.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-03-31
AI Technical Summary
Existing power electronic system simulation tools are difficult to switch the optimal solution algorithm based on the system rigid characteristics, resulting in time-consuming simulation process and low simulation efficiency.
The simulation method based on rigid self-switching is adopted to switch rigid algorithms and non-rigid algorithms by detecting the step-size change rate to realize adaptive algorithm scheduling.
It improves the simulation efficiency of power electronic systems, significantly reduces the calculation cost of algorithm switching, and improves the simulation solution performance.
Smart Images

Figure CN119918296A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of power electronic system simulation, and more specifically, relates to a power electronic system simulation method and system based on rigid self-switching. Background Art
[0002] The design and analysis of power electronic systems rely on numerical simulation tools, and the performance of the solution algorithm is an important indicator of the competitiveness of numerical simulation tools. The power electronic system is a typical continuous-discrete hybrid system. The continuity of the system (reflected in the derivative value of the state variable) will change with the switching action as the interval. However, too many discrete events in the model will cause the traditional variable step-size algorithm based on time discreteness to lose all its advantages. Specifically, the discrete events cause the solution process of the variable step-size algorithm to have "acceleration" and "deceleration" stages. The variable step-size algorithm based on conventional time discreteness is limited by the progressive step-size adjustment strategy. It cannot quickly adjust the step-size to the appropriate level during the acceleration and deceleration stage, so the simulation efficiency is low.
[0003] The power electronic system may contain parasitic parameters with very small time constants, which makes the circuit containing the device have a very fast change process, which is specifically reflected in the rigidity characteristics of the problem. According to the rigidity of the problem to be solved, the solution algorithm can be simply divided into rigid algorithms and non-rigid algorithms. The high-frequency on-off switching behavior will cause the system rigidity to change rapidly, which makes it difficult to ensure the solution quality using a single simulation algorithm, and it is impossible to maintain stable and efficient solution performance throughout the simulation process. At present, common power electronic simulation tools, such as PSIM and PLECS software, have failed to switch the optimal solution algorithm according to the rigidity characteristics of the problem to be solved, which makes the entire simulation process very time-consuming. Summary of the invention
[0004] In view of the above defects or improvement needs of the prior art, the present invention provides a power electronic system simulation method and system based on rigid self-switching, the purpose of which is to improve the simulation efficiency of the power electronic system.
[0005] To achieve the above object, according to a first aspect of the present invention, a power electronic system simulation method based on rigid self-switching is proposed, comprising the following steps: In the process of simulating the power electronic system, the rigid algorithm and the non-rigid algorithm are used to switch and solve the system state variables. The switching method is as follows: When the current algorithm is non-rigid: When the step change rate is detected to be -0.1 to 0.1 and meets When , switch to the rigid algorithm; is the current integration step size, is the adaptive threshold, is the maximum integration step size; When the current algorithm is rigid: when the step change rate is detected to be less than -1, and When , switch to the non-rigid algorithm; They are the cost functions of the non-rigid algorithm and the rigid algorithm, respectively, and are determined based on the computational time of the algorithm.
[0006] As a further preferred embodiment, the calculation formula of the step length change rate is: ; in, is the step size of the previous integration step; after the step size change rate dh is preliminarily obtained according to the above formula, it is filtered to obtain the final step size change rate.
[0007] As a further preferred embodiment, the updating method of the adaptive threshold is: Each time the non-rigid algorithm is integrated, the following update formula is executed: ; Each time the rigid algorithm switches to the non-rigid algorithm, the following update formula is executed: ; in, is the adaptive threshold before updating, is the updated adaptive threshold, coefficient Less than 1, coefficient Greater than 1.
[0008] As a further preference, a non-rigid algorithm is used at the beginning of the simulation, and the initial value of the adaptive threshold is taken as the maximum integral step length .
[0009] As a further preferred method, the cost function of the non-rigid algorithm and the rigid algorithm is The calculation formula is: ; in, They are the computational time of a single integration step of the non-rigid algorithm and the rigid algorithm respectively.
[0010] As a further preferred embodiment, when a non-rigid algorithm is used to solve the system state variables, the method for determining the current integration step size is: Based on the step size of the previous integration step, the system state variables are estimated in real time to determine the local truncation error; Calculate the optimal step size based on the local truncation error ; With the best step length As the current integration step, determine the current system state variable value.
[0011] As a further preferred method, the optimal step size is calculated based on the local truncation error. , the calculation formula is: ; in, err represents the local truncation error, h represents the step size of the previous integration step, q Indicates the algorithm order.
[0012] As a further preferred method, based on the step size of the previous integration step, the system state variables are estimated in real time to further determine the local truncation error, including: Based on the step size of the previous integration step, the estimated value of the system state variable is obtained by the 4th-order Runge-Kutta method , the estimated value of the system state variable is obtained by the 5th-order Runge-Kutta method ; Estimated values based on system state variables , Determine the local truncation error err, calculated as: ; in, Respectively No. i elements, Indicates that the estimated value of the system state variable was obtained by the 5th-order Runge-Kutta method at the last moment. m Indicates the total number of elements; For the customized absolute error accuracy, It is the customized relative error accuracy.
[0013] According to a second aspect of the present invention, a power electronic system simulation system based on rigid self-switching is provided, comprising a processor, wherein the processor is used to execute the power electronic system simulation method based on rigid self-switching.
[0014] According to a third aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-mentioned power electronic system simulation method based on rigid self-switching.
[0015] In general, the above technical solution conceived by the present invention has the following technical advantages compared with the prior art: 1. The present invention designs a set of low-cost dynamic system rigidity detection and algorithm scheduling strategies, which realizes adaptive rigid / non-rigid algorithm switching by tracking the step size change behavior rather than the solution curve characteristics. Compared with other rigidity detection algorithms, such as the system eigenvalue method or the Lipschitz constant method, the computational cost is very low, which significantly improves the efficiency of algorithm switching.
[0016] 2. Aiming at the discrete events that may occur in the electronic power system, the present invention is designed to use local truncation error to adjust the integral step size of the current time step. Compared with the progressive variable step size algorithm, the connection between the current integral step size and the step size of the previous integral step is weakened, thereby realizing the cross-order adjustment of the integral step size, and improving the simulation solution efficiency while meeting the accuracy requirements.
[0017] 3. The present invention combines a variable step-size algorithm that can span orders of magnitude with a rigid self-switching algorithm based on system rigidity characterization to achieve efficient solution of power electronic systems. The simulation solution algorithm of the present invention has greatly improved computational efficiency compared to a single progressive variable step-size algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is a flow chart of a variable step size algorithm that can span orders of magnitude according to an embodiment of the present invention.
[0019] Figure 2 The figure is a schematic diagram of the power electronic system simulation process according to an embodiment of the present invention.
[0020] Figure 3 This is a flow chart of the rigid self-switching algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] 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.
[0022] An embodiment of the present invention provides a power electronic system simulation method based on rigid self-switching. Before simulation, a mathematical model of the power electronic system is obtained in advance and expressed in the form of the following differential algebraic equation: ; Among them, the state variable It is the smallest set of variables that characterize the state of a power electronic system. Its physical meaning is the current value flowing through an inductor or the voltage value across a capacitor. Indicates time, is a state variable The time derivative, It is the control input of the power electronic system, which can be an independent source or a switch variable. The state variables of the power electronic system need to be simulated and solved Solution curves over time.
[0023] When simulating power electronic systems: Based on the discrete state conditions, a step adjustment mechanism is established. According to the rigidity characterization of the power electronic system, a system rigidity criterion is established to implement a variable step adaptive algorithm that can span orders of magnitude and provide a faster simulation solution speed than a single rigid / non-rigid algorithm. Figure 2 As shown, specifically including: (1) System rigidity adaptive detection and algorithm scheduling Use the algorithm selector to select the optimal integration algorithm during simulation Specifically, the rigid algorithm and non-rigid algorithm are switched, and the switching principles are as follows: When the current algorithm is non-rigid: When the step change rate dh is detected to be -0.1 to 0.1 and satisfies hour, is the current integration step size, is the adaptive threshold, For the maximum integration step, switch to the rigid algorithm; When the current algorithm is rigid: when the step change rate dh is detected to be less than -1, and hour, is the cost function of the non-rigid algorithm, For the cost function of the rigid algorithm, switch to the non-rigid algorithm.
[0024] It should be noted that the rigid algorithm can be an implicit Runge-Kutta algorithm, an implicit multi-step method, etc., and the non-rigid algorithm can be an explicit Runge-Kutta algorithm, an explicit multi-step method, etc., which can be selected according to actual needs without limitation.
[0025] Specifically, Figure 3 As shown, including: (1-1) The step length change rate is calculated as follows: (1) in, is the step size of the current integration step, is the step size of the previous integration step. Since the integration step size is not continuous, the above differential formula will generate a lot of noise, so the step size change rate needs to be adjusted in the actual algorithm implementation. Perform filtering.
[0026] The following rigid criterion is further defined: when the step size of a non-rigid integration algorithm changes very little in a number of consecutive integration steps, specifically when the step size change rate defined in formula (1) is less than 0.1, and the current step size is less than the maximum allowed integration step size, it is considered that the problem to be solved has strong rigidity and needs to be switched to a rigid algorithm. The computational cost of the rigid criterion proposed in the present invention is almost negligible compared to the rigid criterion strictly defined in mathematics, so it is extremely efficient.
[0027] (1-2) Define the maximum integration step size And the following cost function : (2) Among them, is the calculation time of a single integration step, usually reflected in the CPU time. is the current integration step; the corresponding cost function of the non-rigid algorithm is recorded as , the cost function of the rigid algorithm is recorded as The basic principle of algorithm selection is When the integral step of the implicit integral algorithm begins to decrease significantly, the step change rate defined by formula (1) is less than -1, and , you need to switch to an explicit algorithm.
[0028] (1-3) Since the rigidity criterion in (1-1) is relatively simple, it is possible that the algorithm switches to the non-rigid algorithm in the rigid region of the system. In order to improve the adaptive ability of the algorithm, it is necessary to periodically detect whether the integral step is greater than the adaptive threshold when using the non-rigid algorithm to ensure that the algorithm switches back to the rigid integral algorithm after executing several steps of the non-rigid integral algorithm. Therefore, an adaptive algorithm callback is established, and the specific steps are as follows: The update formula of the adaptive threshold is defined as follows: (3) The following adaptive threshold update timing is specified: each time the non-rigid integration algorithm is executed, formula (3) is executed once, and the coefficient a is less than 1 at this time, and is taken as 0.99 in this embodiment; each time the rigid algorithm is executed and just switched to the non-rigid algorithm, formula (3) is executed once, and the coefficient a is greater than 1 at this time, and is taken as 1.2 in this embodiment. The initial value of the adaptive threshold can be taken as the maximum integral step length of the operation .
[0029] Therefore, when executing the rigid detection in (1-1), it is necessary to further check the current integration step size and the adaptive threshold. Only when the integration step size is greater than the adaptive threshold will it switch to the rigid algorithm.
[0030] (2) A step-size adjustment mechanism that can span multiple orders of magnitude When a non-rigid algorithm is used, the current integration step size is determined based on a variable step size algorithm that can span orders of magnitude, including: (2-1) Based on the step size of the previous integration step, try to integrate forward one step to obtain the local truncation error of the current step.
[0031] Based on the step size of the previous integration step, the estimated values of the system state variables are calculated using low-order and high-order non-rigid algorithms respectively. , Here, low-order and high-order refer to the relative size of the order, which is determined according to the needs; according to the estimated value of the system state variable , The difference in determines the local truncation error.
[0032] Specifically, this embodiment obtains the estimated value of the system state variable by the fourth-order Runge-Kutta method: , the estimated value of the system state variable is obtained by the 5th-order Runge-Kutta method .
[0033] System state variable estimates , The calculation formula is as follows: (4) (5) Among them, the 4th and 5th order Runge-Kutta pairs are selected as the basic explicit algorithm, and the Bucher table is defined as follows: (6) Take s=7, that is, formula (4) contains 7 steps ,in f represents the derivative calculation function, represents the starting time of integration, represents the starting value of the state variable, h represents the step size of the previous integration step; This is the final step of the previous integration step, so no calculation is required. Formulas (5) and (6) correspond, that is, the values of the coefficients in formula (4) correspond to those of formulas (5) and (6). Calculation yields ~ Then, we substitute it into the last two lines of formula (4) and get ,in With 5th order accuracy, With 4th order accuracy.
[0034] based on Get the local truncation error of the integration step : (7) (8) in, express The i-th element of express The i-th element of ; The absolute error precision set by the user, Relative error accuracy set by the user, Indicates the last moment The ith element of .
[0035] (2-2) According to the state discrete condition, the local truncation error and the trial step size of the current step (the step size of the previous integration step) ) Calculate the optimal step size that satisfies the accuracy constraint .
[0036] Specifically, the integral step size is adjusted according to the state discrete conditions, and the calculation formula is: (9) Among them, the trial step size is taken as the integration step size of the previous step h , q Represents the algorithm order. In this embodiment q =5.
[0037] The meaning of the state discrete condition is: if an integral step length of length is used in the current step, the local truncation error of the algorithm in the current step is exactly equal to the set accuracy requirement, and the calculation efficiency is optimal at this time.
[0038] (2-3) According to the optimal step length The interpolation obtains the system state variable value when the integration step size is the optimal step size.
[0039] That is, for the n+1th integration step, Figure 1 As shown, To try to integrate forward one step to get the value of the state variable according to the step size of the previous integration step, The state variable value when the integration step is the optimal step is obtained by interpolation based on the optimal step size. The significant difference between this method and the traditional variable step size strategy in the calculation process is that the optimal step size directly acts on the current step, rather than on the next integration step, and the state variable value under the optimal integration step is obtained by interpolation of the state variable value obtained under the trial step size, thus significantly improving the calculation efficiency of the algorithm.
[0040] Combined with the designs in (1) and (2), the power electronic system simulation solution algorithm proposed in the present invention can improve the computational efficiency by 1.5 to 4 times compared with the single progressive variable step size algorithm. Specifically, as shown in Table 1, the speed-up ratio of the power electronic system simulation solution efficiency implemented by the present invention compared with the single progressive variable step size algorithm, where the Dopri5 algorithm is a non-rigid 5th order variable step size algorithm, and the Dassl algorithm is a rigid 5th order variable step size algorithm. The speed-up ratio refers to the ratio of the CPU time consumption of the single progressive variable step size algorithm to the CPU time consumption of the algorithm of the present invention. .
[0041] 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 rigid self-switching, characterized in that: In the process of simulating the power electronic system, the rigid algorithm and the non-rigid algorithm are used to switch and solve the system state variables. The switching method is as follows: When the current algorithm is non-rigid: When the step change rate is detected to be -0.1 to 0.1 and meets When , switch to the rigid algorithm; is the current integration step size, is the adaptive threshold, is the maximum integration step size; When the current algorithm is rigid: when the step change rate is detected to be less than -1, and When , switch to the non-rigid algorithm; They are the cost functions of the non-rigid algorithm and the rigid algorithm, respectively, and are determined based on the computational time of the algorithm.
2. The power electronic system simulation method based on rigid self-switching according to claim 1, characterized in that: The calculation formula of the step length change rate is: ; in, is the step length of the previous integration step; the step length change rate is preliminarily obtained according to the above formula After that, it is filtered to get the final step size change rate.
3. The power electronic system simulation method based on rigid self-switching according to claim 1, characterized in that: The updating method of the adaptive threshold is: Each time the non-rigid algorithm is integrated, the following update formula is executed: ; Each time the rigid algorithm switches to the non-rigid algorithm, the following update formula is executed: ; in, is the adaptive threshold before updating, is the updated adaptive threshold, coefficient Less than 1, coefficient Greater than 1.
4. The power electronic system simulation method based on rigid self-switching according to claim 3, characterized in that: The non-rigid algorithm is used at the beginning of the simulation, and the initial value of the adaptive threshold is taken as the maximum integration step length. .
5. The power electronic system simulation method based on rigid self-switching according to claim 1, characterized in that: Cost functions of non-rigid and rigid algorithms The calculation formula is: , in, They are the computational time of a single integration step of the non-rigid algorithm and the rigid algorithm respectively.
6. The power electronic system simulation method based on rigid self-switching according to any one of claims 1 to 5, characterized in that: When a non-rigid algorithm is used to solve the system state variables, the current integration step size is determined as follows: Based on the step size of the previous integration step, the system state variables are estimated in real time to determine the local truncation error; Calculate the optimal step size based on the local truncation error ; With the best step length As the current integration step, determine the current system state variable value.
7. The power electronic system simulation method based on rigid self-switching according to claim 6, characterized in that: Calculate the optimal step size based on the local truncation error , the calculation formula is: ; in, err represents the local truncation error, h represents the step size of the previous integration step, q Indicates the algorithm order.
8. The power electronic system simulation method based on rigid self-switching according to claim 6, characterized in that: Based on the step size of the previous integration step, the system state variables are estimated in real time to determine the local truncation error, including: Based on the step size of the previous integration step, the estimated value of the system state variable is obtained by the 4th-order Runge-Kutta method , the estimated value of the system state variable is obtained by the 5th-order Runge-Kutta method ; Estimated values based on system state variables Determining the local truncation error , the calculation formula is: ; ; in, Respectively, No. i elements, Indicates that the estimated value of the system state variable was obtained by the 5th-order Runge-Kutta method at the last moment. m Indicates the total number of elements; For the customized absolute error accuracy, It is the customized relative error accuracy.
9. A power electronic system simulation system based on rigid self-switching, characterized in that: It comprises a processor, wherein the processor is used to execute the power electronic system simulation method based on rigid self-switching as described in any one of claims 1-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 power electronic system simulation method based on rigid self-switching as described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
A model switching and variable step size combined doubly-fed wind power model simulation method
CN109815638A
Elastic combination fixed step size simulation method and system
CN119004874A
Methods and systems to control an adaptive time-step
US20150317417A1
Cited By
Rigid / non-rigid algorithm adaptive switching method for solving system simulation model
CN120046320A
An Adaptive Switching Method for Rigid / Non-rigid Algorithms in Solving System Simulation Models
CN120046320B
Simulation calculation method and device for thin shell transient jump behavior, medium and equipment
CN121279005A