A Simulation Method and System for Power Electronic Systems Based on Rigid Self-Switching
By adopting a simulation method based on rigid self-switching in power electronic system simulation, switching rigid and non-rigid algorithms, and adjusting step sizes by local truncation errors, the problem of low simulation efficiency in the existing technology is solved, and efficient simulation solution is achieved.
Patent Information
- Application Number
- CN202510395983.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-01
- 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 change rate to realize adaptive algorithm scheduling, and the integral step length is adjusted through local truncation errors to achieve step length adjustment across orders.
The simulation efficiency of power electronic systems has been significantly improved. Compared with a single progressive step-length algorithm, the calculation efficiency has been increased by 1.5 to 4 times, reducing the time-consuming of the simulation process.
Smart Images

Figure CN119918296B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of power electronics system simulation, and more specifically, relates to a power electronics system simulation method and system based on rigid self-switching. Background Art
[0002] The design and analysis of power electronics systems rely on numerical simulation tools, and the performance of the solution algorithm is an important indicator reflecting the competitiveness of numerical simulation tools. A power electronics system is a typical continuous-discrete hybrid system. At intervals of switching actions, the continuity of the system (reflected in the derivative values of state variables) will change. However, too many discrete events in the model will make the advantages of traditional variable-step algorithms based on time discretization disappear completely. Specifically, the solution process of the variable-step algorithm is characterized by "acceleration" and "deceleration" stages due to discrete events. The variable-step algorithm based on conventional time discretization is limited by the progressive step adjustment strategy and cannot quickly adjust the step size to an appropriate magnitude during the acceleration and deceleration stages, resulting in low simulation efficiency.
[0003] Power electronics systems may contain parasitic parameters with very small time constants, which makes the loop containing such devices have a very fast change process, specifically reflected in the stiffness characteristics of the problem. According to the stiffness of the problem to be solved, the solution algorithm can be simply divided into a stiff algorithm and a non-stiff algorithm. The high-frequency on-off switching behavior will cause a rapid change in the system stiffness, resulting in difficulty in ensuring the solution quality using a single simulation algorithm and inability to maintain stable and efficient solution performance throughout the simulation process. Currently, common power electronics simulation tools, such as PSIM, PLECS software, etc., have not been able to switch the optimal solution algorithm according to the stiffness characteristics of the problem to be solved, making the entire simulation process very time-consuming. Summary of the Invention
[0004] In view of the above defects or improvement requirements of the prior art, the present invention provides a power electronics system simulation method and system based on rigid self-switching, aiming to improve the simulation efficiency of power electronics systems.
[0005] To achieve the above object, according to the first aspect of the present invention, a power electronics system simulation method based on rigid self-switching is proposed, including the following steps:
[0006] During the simulation process of the power electronics system, a stiff algorithm and a non-stiff algorithm are used to switch and solve the system state variables, and the switching method is as follows:
[0007] When the current is a non-stiff algorithm: when it is detected that the step size change rate is -0.1 to 0.1 and satisfies switch to the stiff algorithm; is the current integration step size, is the adaptive threshold, is the maximum integration step size;
[0008] When it is currently a rigid algorithm: when the step size change rate is detected to be less than -1, and then, switch to the non-rigid algorithm; are the cost functions of the non-rigid algorithm and the rigid algorithm, respectively, determined based on the computational time consumption of the algorithm.
[0009] As a further preference, the calculation formula for the step size change rate is:
[0010] ;
[0011] where is the step size of the previous integration step; after initially obtaining the step size change rate dh according to the above formula, filter it to obtain the final step size change rate.
[0012] As a further preference, the update method of the adaptive threshold is:
[0013] When performing non-rigid algorithm integration once, execute the following update formula: ;
[0014] When switching from the rigid algorithm to the non-rigid algorithm once, execute the following update formula: ;
[0015] where is the adaptive threshold before update, is the adaptive threshold after update, the coefficient is less than 1, and the coefficient is greater than 1.
[0016] As a further preference, use the non-rigid algorithm at the initial stage of simulation, and take the initial value of the adaptive threshold as the maximum integration step .
[0017] As a further preference, the calculation formulas for the cost functions of the non-rigid algorithm and the rigid algorithm are:
[0018] ;
[0019] where are the computational time consumptions of a single integration step of the non-rigid algorithm and the rigid algorithm, respectively.
[0020] As a further preference, when using the non-rigid algorithm to solve the system state variables, the method for determining the current integration step size is:
[0021] Based on the step size of the previous integration step, estimate the system state variables in real time, and then determine the local truncation error;
[0022] Calculate the optimal step size based on the local truncation error ;
[0023] Use the optimal step size as the current integration step size to determine the current system state variable value.
[0024] As a further optimization, calculate the optimal step size based on the local truncation error , and the calculation formula is:
[0025] ;
[0026] where err represents the local truncation error, h represents the step size of the previous integration step, q represents the algorithm order.
[0027] As a further optimization, based on the step size of the previous integration step, estimate the system state variables in real time, and then determine the local truncation error, including:
[0028] Based on the step size of the previous integration step, obtain the estimated value of the system state variable through the fourth-order Runge-Kutta method , and obtain the estimated value of the system state variable through the fifth-order Runge-Kutta method ;
[0029] According to the estimated values of the system state variables , determine the local truncation error err, and the calculation formula is:
[0030] ;
[0031] where respectively represent the i th element of represents the estimated value of the system state variable obtained through the fifth-order Runge-Kutta method at the previous moment, m represents the total number of elements; is the user-defined absolute error precision, is the user-defined relative error precision.
[0032] According to the second aspect of the present invention, a power electronic system simulation system based on rigid self-switching is provided, including a processor, and the processor is used to execute the above-mentioned power electronic system simulation method based on rigid self-switching.
[0033] According to the third aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned power electronic system simulation method based on rigid self-switching is implemented.
[0034] In general, the above technical solution conceived by the present invention has the following technical advantages compared with the prior art:
[0035] 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.
[0036] 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.
[0037] 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
[0038] 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.
[0039] Figure 2 The figure is a schematic diagram of the power electronic system simulation process according to an embodiment of the present invention.
[0040] Figure 3 This is a flow chart of the rigid self-switching algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION
[0041] 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.
[0042] 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: ;
[0043] Among them, the state variable is the smallest set of variables that characterize the state of a power electronics system, and its physical meaning is the current value flowing through an inductor or the voltage value across a capacitor; represents time, is the state variable the derivative with respect to time, is the control input of the power electronics system, which can be an independent source or a switching variable. It is necessary to simulate and solve the state variables of the power electronics system the solution curve that changes with time.
[0044] Furthermore, when simulating the power electronics system: based on the state discretization condition, a step size adjustment mechanism is established, and according to the stiffness characterization of the power electronics system, a system stiffness criterion is established to implement a variable step size adaptive algorithm that can cross magnitudes, and it can provide a faster simulation solution speed compared to a single stiffness / non-stiffness algorithm. As Figure 2 shown, it specifically includes:
[0045] (1) System stiffness adaptive detection and algorithm scheduling
[0046] An algorithm selector is used to select the optimal integration algorithm during simulation , specifically, a stiffness algorithm and a non-stiffness algorithm are switched, and the switching principle is as follows:
[0047] When the current is a non-stiffness algorithm: when the detected step size change rate dh is -0.1 to 0.1, and it satisfies at this time, is the current integration step size, is the adaptive threshold, is the maximum integration step size, and switch to the stiffness algorithm;
[0048] When the current is a stiffness algorithm: when the detected step size change rate dh is less than -1, and at this time, is the cost function of the non-stiffness algorithm, is the cost function of the stiffness algorithm, and switch to the non-stiffness algorithm.
[0049] It should be noted that the stiffness algorithm can be an implicit Runge-Kutta algorithm, an implicit multi-step method, etc., and the non-stiffness algorithm can be an explicit Runge-Kutta algorithm, an explicit multi-step method, etc., which are specifically selected according to actual needs and are not limited.
[0050] Specifically, as Figure 3 shown, it includes:
[0051] (1-1) The calculation formula for the step size change rate is as follows:
[0052] (1)
[0053] Among them, is the step size of the current integration step, is the step size of the previous integration step. Since the integration step sizes are not continuous, the above difference formula will generate a large amount of noise. Therefore, when implementing the actual algorithm, it is also necessary to filter the step size change rate .
[0054] Furthermore, the following stiffness criterion is defined: when the step size changes of the non-stiff integration algorithm in several consecutive integration steps are very small, specifically reflected in that the step size change rate defined by formula (1) is less than 0.1, and the current step size is less than the maximum allowable integration step size, it is considered that the problem to be solved has strong stiffness and it is necessary to switch to the stiff algorithm. The stiffness criterion proposed by the present invention has almost negligible computational cost compared to the mathematically strictly defined stiffness criterion, so the efficiency is extremely high.
[0055] (1 - 2) Define the maximum integration step size and the following cost function :[[]]END]]
[0056] (2)
[0057] where is the computational time consumed by a single integration step, usually reflected as the CPU time consumption, is the current integration step size; the corresponding cost function of the non-stiff algorithm is denoted as , and the cost function of the stiff algorithm is denoted as . The basic principle for algorithm selection is that when is satisfied, the explicit algorithm (i.e., the non-stiff algorithm) is selected, and vice versa, the implicit algorithm (i.e., the stiff algorithm) is selected. When the integration step size of the implicit integration algorithm begins to significantly decrease, specifically reflected in that the step size change rate defined by formula (1) is less than -1, and is satisfied, it is necessary to switch to the explicit algorithm.
[0058] (1 - 3) Since the stiffness criterion in (1 - 1) is relatively simple, there may be a situation where the non-stiff algorithm is switched to in the system stiffness region. In order to improve the adaptive ability of the algorithm, it is necessary to periodically detect whether the integration step size is greater than the adaptive threshold when using the non-stiff algorithm to ensure that the algorithm switches back to the stiff integration algorithm after executing several steps of the non-stiff integration algorithm. Therefore, an adaptive algorithm callback is established, and the specific steps are as follows:
[0059] Define the following update formula for the adaptive threshold:
[0060] (3)
[0061] And the update timing of the following adaptive threshold is specified as follows: Each time the non-rigid integration algorithm is executed, formula (3) is executed. At this time, the coefficient a is less than 1, and in this embodiment, it is taken as 0.99; Each time the rigid algorithm just switches to the non-rigid algorithm, formula (3) is executed. At this time, the coefficient a is greater than 1, and in this embodiment, it is taken as 1.2. The initial value of the adaptive threshold can be taken as the maximum integration step size of the operation 。
[0062] Therefore, when performing the rigid detection in (1-1), it is necessary to further check the size of the current integration step and the adaptive threshold. Only when the integration step is greater than the adaptive threshold will the rigid algorithm be switched
[0063] (2)Cross-magnitude step size adjustment mechanism
[0064] When using the non-rigid algorithm, the current integration step is determined based on the cross-magnitude variable step size algorithm, including::
[0065] (2-1)Attempt to integrate one step forward according to the step size of the previous integration step to obtain the local truncation error of the current step
[0066] Based on the step size of the previous integration step, the system state variable estimates are calculated respectively through low-order and high-order non-rigid algorithms 、 , where low-order and high-order refer to the relative magnitude of the order, which is specifically determined according to needs; According to the system state variable estimates 、 to determine the local truncation error
[0067] Specifically, in this embodiment, the system state variable estimate is obtained through the fourth-order Runge-Kutta method , and the system state variable estimate is obtained through the fifth-order Runge-Kutta method 。
[0068] System state variable estimate 、 The calculation formulas are as follows
[0069] (4)
[0070] (5)
[0071] Among them, the Runge-Kutta pair of the fourth order and the fifth order is selected as the basic explicit algorithm, and the Bucher table is defined as follows
[0072] (6)
[0073] Take s = 7, that is, formula (4) contains 7 steps ,where fRepresents the derivative calculation function, Represents the starting time of integration, Represents the initial value of the state variable, h Represents the step size of the previous integration step; Is the final step of the previous integration step, so there is no need to calculate. Formulas (5) and (6) correspond, that is, the coefficient values in formula (4) are taken with reference to formulas (5) and (6). After calculating ~ Substitute into the last two lines of formula (4), and calculate to get , where Has 5th-order accuracy, Has 4th-order accuracy.
[0074] Based on Obtain the local truncation error of this integration step :
[0075] (7)
[0076] (8)
[0077] Among them, Represents The i-th element of, Represents The i-th element of; Is the absolute error accuracy set by the user, Is the relative error accuracy set by the user, Represents the previous moment The i-th element of.
[0078] (2-2) According to the state discretization condition, calculate the optimal step size That satisfies the accuracy constraint from the local truncation error and the trial step size of the current step (take the step size of the previous integration step .
[0079] Specifically, adjust the integration step size according to the state discretization condition, and the calculation formula is:
[0080] (9)
[0081] Among them, take the trial step size as the integration step size of the previous step h , q Represents the algorithm order, in this embodiment q =5.
[0082] The meaning of the state discretization condition is: when using an integration step size of length 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 the best at this time.
[0083] (2 - 3) According to the optimal step size Interpolate to obtain the system state variable values when the integration step size is the optimal step size.
[0084] That is, for the (n + 1)-th integration step, as Figure 1 shown, where is the state variable value obtained by attempting to integrate forward one step according to the step size of the previous integration step, is the state variable value obtained by interpolation according to the optimal step size when the integration step size is 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 size is interpolated from the state variable value obtained under the trial step size. Therefore, the calculation efficiency of the algorithm is significantly improved.
[0085] Combined with the designs in (1) and (2), the simulation solution algorithm for power electronic systems proposed by the present invention can improve the calculation efficiency by 1.5 - 4 times compared with the single progressive variable step size algorithm; specifically, as shown in Table 1, it is the speed-up ratio of the simulation solution efficiency of the power electronic system implemented by the present invention compared with the single progressive variable step size algorithm. Among them, the Dopri5 algorithm is a non-stiff 5th-order variable step size algorithm, and the Dassl algorithm is a stiff 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;
[0086] .
[0087] Those skilled in the art can easily understand 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 replacements, and improvements made within the spirit and principle of the present invention should be included within 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 using a non-rigid algorithm to solve the system state variables, the current integration step size The method for determining 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; the optimal step size is calculated based on the local truncation error ; With the best step length As the current integration step , determine the current system state variable value; 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 claim 1, 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.
7. The power electronic system simulation method based on rigid self-switching according to claim 1, 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.
8. 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 to 7.
9. 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 7 is implemented.
Citation Information
Patent Citations
Elastic combination fixed step size simulation method and system
CN119004874A
Methods and systems to control an adaptive time-step
US20150317417A1