Parallel iteration Runge-Kutta method for simulating second-order nonlinear differential equation and application
By parallel iterating Longguta method to process second-order nonlinear differential equations, the problem of difficult to take into account both algorithm stability and computing efficiency in the existing technology is solved, and an efficient and stable method for solving rigid problems is realized.
Patent Information
- Application Number
- CN202411449337.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-02-07
AI Technical Summary
The prior art is difficult to effectively solve the rigidity problem in second-order nonlinear differential equations while taking into account both algorithm stability and computational efficiency.
The parallel iterative Longguta method is adopted to obtain ordinary differential equations and convert them into target nonlinear implicit differential equations, establish system differential algebra equations, judge whether the simulation time reaches the maximum calculation time, update the system matrix and decompose the iterative matrix, and adopt four The order extrapolation method and the fourth-order Longgekuta method perform prediction and parallel iteration until the convergence conditions are met.
The advantages of taking into account both algorithm stability and computing efficiency when solving second-order rigid problems are realized, reducing the dimensions of the system matrix and iterative matrix, and improving the accuracy and efficiency of the algorithm.
Smart Images

Figure CN119397150A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of simulation algorithms, and more specifically, to a parallel iterative Runge-Kutta method, device, electronic device and computer storage medium for simulating second-order nonlinear differential equations. Background Art
[0002] The numerical solution of initial value problems of ordinary differential equations is an important part of computer-aided design in subjects such as electricity, chemistry, automatic control, and space technology. In the field of modern science and technology, many systems can be described as mathematical models of initial value problems of second-order nonlinear differential equations. However, for second-order nonlinear differential equations, there are only a few methods to obtain approximate solutions.
[0003] There is a class of differential equation problems where the solution of the system equation changes very rapidly in some time periods and very slowly in other time periods. This class of problems is called stiff problems. Numerical solutions suitable for dealing with stiff ordinary differential equations must first consider stability constraints.
[0004] At present, the widely used numerical calculation methods for solving initial value problems of ordinary differential equations include Euler method, Runge-Kutta method, Backward Differentiation Formulas (BDF), PBD (Prediction-base Differentiation Formulas), etc. These integration algorithms have their own unique advantages, but also have different defects. For example, the explicit integration algorithm is simple to calculate and has high computational efficiency, but has poor numerical stability and does not have A-stability. Its simulation step is greatly limited by stability conditions and is difficult to apply to the simulation of rigid problems. The implicit integration algorithm has good numerical stability and A-stability, but requires iterative calculations, which are more complex and slow.
[0005] Therefore, proposing a Runge-Kutta solution method that can take into account both algorithm stability and computational efficiency for rigid problems is an urgent problem to be solved. Summary of the invention
[0006] In response to at least one defect or improvement need in the prior art, the present invention provides a parallel iterative Runge-Kutta method and application for simulating second-order nonlinear differential equations, aiming to balance the algorithm stability and computational efficiency of rigid problems.
[0007] To achieve the above-mentioned purpose, according to the first aspect of the present invention, a parallel iterative Runge-Kutta method for simulating second-order nonlinear differential equations is provided, comprising: obtaining a simulated ordinary differential equation and converting it into a target nonlinear implicit differential equation, establishing a system differential-algebraic equation according to the target nonlinear implicit differential equation; judging whether the simulation time in the target nonlinear implicit differential equation reaches the maximum calculation time, and when it is judged that the maximum calculation time has not been reached, judging whether it is necessary to update the system matrix in the system differential-algebraic equation according to Boolean variables, and decomposing the iterative matrix obtained from the system matrix; using a fourth-order extrapolation method and a fourth-level fourth-order Runge-Kutta method to obtain a predicted target nonlinear implicit differential equation. The derivative of the differential variable in the process is calculated, and a convergence judgment is performed on the predicted result. If the convergence condition is not met, an inner iteration is performed according to the decomposition of the iteration matrix. The inner iteration uses the predicted derivative of the differential variable as the starting value of the Newton iteration. Each Newton iteration is performed in parallel through the fourth-level fourth-order Runge-Kutta method until the calculation result meets the convergence condition. After it is judged that the convergence condition is met, it is further judged whether the calculation result meets the preset error range. If not, the system matrix is updated according to the step size reduction strategy and the iteration matrix is decomposed again. If it meets, the calculation result is updated. When it is judged that the maximum calculation time is reached, the simulation is terminated, and the calculation result is stored and displayed.
[0008] In one embodiment of the present invention, the ordinary differential equation obtained by simulation is converted into a target nonlinear implicit differential equation, and a system differential algebraic equation is established according to the target nonlinear implicit equation, including: converting the ordinary differential equation Transformed into the target nonlinear implicit differential equation ,in, is the differential variable, express The first derivative of express The second-order derivative of For time, and represents the simulation start time and end time, y belongs to the real number range R, represents the dimension of the equation, Respectively Moment The value of; the established system differential algebraic equation is ; Among them, the system matrix , , , F is the activation function of the system.
[0009] In one embodiment of the present invention, decomposing the iteration matrix obtained from the system matrix includes: constructing the iteration matrix and decompose it into represents the decomposition step size; solves nonlinear implicit differential equations : ;in, The dimension is The phase derivative vector of Include derivative values The approximate value of , represents the step length, express The approximate value of represents the Kronecker product, A represents the coefficient matrix, Representation vector , G represents the stacking value of g.
[0010] In one embodiment of the present invention, a fourth-order extrapolation method and a fourth-order Runge-Kutta method are used to obtain the predicted derivative of the differential variable in the target nonlinear implicit differential equation, including: a fourth-order extrapolation method using the second-order derivative vector of the previous stage ,get As the starting value of the Newton iteration process, where Matrix of dimensions express ; ,in is the coefficient in the Butcher table, and hp represents the prediction step size.
[0011] In one embodiment of the present invention, the Newton iteration is based on and two Butcher transformations AT=TΛ, Solve the iterative matrix and get The update formula for the next iteration is: ;in, , , ,in, and are matrices, have different positive eigenvalues, given by the matrix Split , increment The median dimension is Parallel calculation of the four components.
[0012] In one embodiment of the present invention, the step of determining whether the operation result meets the preset error range further includes: and the corresponding step length Determine if the current convergence speed Greater than ,and <= preset step length ,but Will be used for the next Newtonian process if , then the system matrix is recalculated, where =0.1 is the default value.
[0013] In one embodiment of the present invention, determining whether the operation result meets the preset error range also includes an error estimation step: according to the implicit embedding formula Eliminate the ordinary differential equation , solved by the Newton iteration , denoted as , and put Itself is used as a reference formula to define the error estimate : ;in, , yes The element in the lower right corner of the matrix Remove the rigid error components in the error estimate.
[0014] According to the second aspect of the present invention, a parallel iterative Runge-Kutta device for simulating second-order nonlinear differential equations is also provided, including: an equation conversion and establishment module, which is used to obtain the simulated ordinary differential equation and convert it into a target nonlinear implicit differential equation, and establish a system differential algebraic equation based on the target nonlinear implicit differential equation; a matrix updating and decomposition module, which is used to determine whether the simulation time in the target nonlinear implicit differential equation reaches the maximum calculation time, and when it is determined that the maximum calculation time has not been reached, it is determined whether the system matrix in the system differential algebraic equation needs to be updated according to Boolean variables, and the iterative matrix obtained from the system matrix is decomposed; a parallel iterative operation module, which is used to use the fourth-order extrapolation method and the fourth-level fourth-order Runge-Kutta method to obtain the predicted target nonlinear The derivative of the differential variable in the implicit differential equation is used, and the convergence judgment is performed on the predicted result. If the convergence condition is not met, an inner iteration is performed according to the decomposition of the iteration matrix. The inner iteration uses the predicted derivative of the differential variable as the starting value of the Newton iteration. Each Newton iteration is performed in parallel through the fourth-order Runge-Kutta method until the calculation result meets the convergence condition; an error judgment module is used to judge whether the calculation result meets the preset error range after judging that the convergence condition is met. If not, the system matrix is updated according to the step size reduction strategy and the iteration matrix is decomposed again. If it meets, the calculation result is updated; a simulation judgment module is used to end the simulation when it is judged that the maximum calculation time is reached, and store and display the calculation result.
[0015] According to the third aspect of the present invention, there is also provided an electronic device, which comprises at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the computer program is executed by the processing unit, the processing unit executes the steps of the method described in any one of the above embodiments.
[0016] According to a fourth aspect of the present invention, there is also provided a computer-readable storage medium storing a computer program executable by an access authentication device, wherein when the computer program runs on the access authentication device, the access authentication device executes the steps of the method described in any one of the above embodiments.
[0017] In general, the above technical solutions conceived by the present invention can achieve at least the following beneficial effects compared with the prior art: The parallel iterative implicit Runge-Kutta solution method for simulating second-order nonlinear ordinary differential equations provided by the present invention is benchmarked against the similar calculation program ODE15s in the foreign mainstream commercial tool MATLAB, and provides a solver suitable for solving second-order rigid problems, providing underlying support for system simulation. Specifically, the stability of the algorithm is guaranteed by integrating the improved Newton iteration method and the parallel iterative solution (Parallel Iterative Solver for Implicit Runge-Kutta, PISIRK) method of the implicit Runge-Kutta algorithm. Parallel calculation is used in each stage of Runge-Kutta to reduce the calculation cost, and the advantages of both calculation efficiency and stability can be taken into account. Compared with other algorithms for solving second-order differential equations, the present invention does not need to convert the second-order equation into a first-order equation system when constructing the target nonlinear implicit differential equation, which can greatly reduce the dimensions of the system matrix and the iteration matrix. This is for iterative algorithms, especially when solving large problems, each iteration requires solving a large matrix, which can effectively reduce the amount of calculation and memory usage; In addition, the variable step size strategy of the present invention can improve the accuracy of the algorithm for solving rigid system equations, and the algorithm is more stable and efficient. By comparing with the ODE15s algorithm, the iteration step size of this method is reduced by 51.8% compared with foreign commercial tools. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1A flowchart of a parallel iterative Runge-Kutta method for simulating second-order nonlinear differential equations provided in an embodiment of the present application; Figure 2 A schematic diagram of specific execution steps of a parallel iterative Runge-Kutta method for simulating second-order nonlinear differential equations provided in an embodiment of the present application; Figure 3 A pseudo-code diagram of an algorithm of a parallel iterative Runge-Kutta method for simulating a second-order nonlinear differential equation provided in an embodiment of the present application; Figure 4 A schematic diagram of test results of a simulation example provided in an embodiment of the present application; Figure 5 A schematic diagram of the structure of a parallel iterative Runge-Kutta device for simulating a second-order nonlinear differential equation provided in an embodiment of the present application; Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application; Figure 7 A schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] 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.
[0021] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0022] like Figure 1As shown, the first embodiment of the present invention proposes a teaching engagement evaluation method based on implicit parameter modeling, for example, including: step S1, obtaining a simulated ordinary differential equation and converting it into a target nonlinear implicit differential equation, and establishing a system differential algebraic equation according to the target nonlinear implicit differential equation; step S2, judging whether the simulation time in the target nonlinear implicit differential equation reaches the maximum calculation time, when it is judged that the maximum calculation time has not been reached, judging whether it is necessary to update the system matrix in the system differential algebraic equation according to Boolean variables, and decomposing the iterative matrix obtained from the system matrix; step S3, using the fourth-order extrapolation method and the fourth-order fourth-order Runge-Kutta method to obtain the predicted target nonlinear implicit differential equation The derivative of the differential variable is calculated, and the convergence judgment is performed on the predicted result. If the convergence condition is not met, an inner iteration is performed according to the decomposition of the iteration matrix. The inner iteration uses the predicted derivative of the differential variable as the starting value of the Newton iteration. Each Newton iteration is performed in parallel through the fourth-order Runge-Kutta method until the calculation result meets the convergence condition; step S4, after judging that the convergence condition is met, further judge whether the calculation result meets the preset error range. If not, update the system matrix according to the step size reduction strategy and re-decompose the iteration matrix. If it meets, update the calculation result; step S5, end the simulation when it is judged that the maximum calculation time is reached, and store and display the calculation result.
[0023] Specific, combined Figure 2 As shown, the expression of the second-order nonlinear implicit differential equation with initial value conditions in the simulation scenario is as follows:
[0024] in is the differential variable, express The first derivative of express The second derivative of . For time, and represents the start time and end time of the simulation, y belongs to the real number range R, represents the dimension of the equation, Respectively Moment The value of .
[0025] Combination Figure 3 As shown, in step S1, the above second-order nonlinear implicit differential equation is rewritten into a general IDE form, and the target nonlinear equation form is established as follows:
[0026] Further establish a dynamic model to form the system differential algebraic equation:
[0027] in, represents the stiffness matrix of the system, represents the damping matrix of the system, represents the mass matrix of the system, and F is the excitation function of the system.
[0028] In step S2, according to the established target nonlinear equation, the Boolean variable Determine whether the system matrix needs to be updated ,pass Determine whether to rebuild the iteration matrix , and decompose it; if the system matrix is recomputed, the Boolean value to use when calculating the new step size Set to . In the first iteration, the Boolean variable and Defaults to , the step size used for this decomposition The default is the initial step size. In subsequent iterations, these parameters are recalculated according to the variable step size strategy. The specific execution code is as follows:
[0029] In step S3, the fourth-order extrapolation of the second-order derivative vector from the previous stage is used ,get As the starting value of the Newton process, The coefficient matrix of dimension .
[0030]
[0031] in are the coefficients in the Butcher table, h represents the current time step, and hp represents the predicted time step.
[0032] For further internal iteration, if we want to use the fourth-order implicit Runge-Kutta method to solve the ordinary differential equations of the simulation in parallel, we must first solve the nonlinear system equations .
[0033]
[0034] here, The dimension is The phase derivative vector of Include derivative values The approximate value of , represents the step length, express The approximate value of represents the Kronecker product, Representation vector , A represents the coefficient matrix, G represents the stacked value of g, that is
[0035] is dimension 4 or The identity matrix of , whose dimensions need to be determined according to the context.
[0036] First, apply the modified Newton method The target nonlinear implicit differential equation is solved by using the Butcher transformation AT=TΛ. In order to reduce the system matrix dimension, the proposed parallel iterative linear system solver of the Runge-Kutta method is used to solve the increments, and the matrix Split into , apply the Butcher transformation again ,in is a diagonal matrix, the target nonlinear implicit differential equation The update formula for the next iteration is:
[0037] in, , , ,in, The median dimension is The four components of (each component corresponds to a stage) can be calculated in parallel. and They are all matrices. The following examples give specific values: Butcher matrix for the implicit Runge–Kutta method of level 4 and order 4:
[0038]
[0039] Two Butcher transformation matrix: Butcher transformation AT=TΛ,
[0040] Butcher Transform ,
[0041] Selecting appropriate matrix values is conducive to the rapid convergence of the algorithm.
[0042] get After that, we can calculate the phase vector in parallel , and .
[0043]
[0044] Costs can be saved by calculating the first iteration separately. Experiments show that for most ordinary differential equations, only one inner iteration is sufficient. Some complex ordinary differential equations require two inner iterations to achieve more robust and efficient simulation behavior. The specific execution code is as follows:
[0045] In step S4, the convergence behavior of the Newton process is checked. Monitoring whether the current iteration is too large relative to y can effectively prevent overflow. The case where this is true is when the Newton process converges too slowly.
[0046] After determining the convergence conditions, further determine whether the system matrix should be updated and the iterative matrix should be decomposed again. Under reasonable assumptions, is the expected convergence speed, The convergence speed is If the current convergence speed Greater than , <= (step size proposed by the ERROR module), Will be used for the next Newtonian process. If (in = 0.1 is the default), the Newton process may fail to converge because the system matrix is too old. The above strategy can prevent such failures. If the system matrix is new, the step size will be reduced by a stiffness factor The form is The formula prevents the new step size from differing from the old step size by more than Multiples of the range.
[0047] This strategy of updating the system matrix and reconstructing the iteration matrix is different from most strategies in existing ODE / DAE software because it tries to adjust the step size to obtain the best convergence rate for the Newton process. The role of is to adjust the step size so that the remaining integration interval is a multiple of the step size. If no new system matrix is required, then only when the proposed step size and When there is a significant difference, the iterative matrix is decomposed, that is, .
[0048] Furthermore, in order to avoid and Confusion between previous and current values of , using the time index in the derivation of the error estimate To avoid estimation errors, an implicit embedding formula of the following form is used:
[0049] Substitute it into the simulated ordinary differential equation to eliminate , solved by the improved Newton process , denoted as , and put Itself is used as a reference formula to define the error estimate :
[0050] in, , yes The element in the lower right corner of the matrix The rigid error component in the error estimate can be removed.
[0051] The step size is obtained by the Gustafsson predictive step size controller, whose main advantages are its adaptability and efficiency. By dynamically adjusting the step size and combining the prediction-correction strategy, it is possible to effectively utilize computing resources while reducing numerical errors. It is particularly suitable for problems that require high accuracy of numerical solutions, such as large-scale dynamic system simulation and control system design.
[0052] Note that this module is only called when the Newton process has converged. , it moves time forward, i.e. it updates , , ,variable , , and is saved for use the next time the error estimate is called; at this point the system matrix is no longer up to date.
[0053] The present invention is further described in detail below in conjunction with actual cases, taking the Van der pol equation as an example, the expression thereof is: This equation is a second-order nonlinear ordinary differential equation (ODE) used to describe nonlinear oscillators, where the variables have the following physical meanings: Represents the displacement or oscillation of the system and describes the state variable of the system. Indicates speed, describing the rate of change of the system state. represents acceleration, which describes how fast the system state changes. Controls the nonlinearity and damping characteristics of the system, especially When it is far from 0, the nonlinear behavior is obvious, and the nonlinear coefficient When is large, the system behaves as rigid.
[0054] Step 1) Get the parameters of the problem Given the time parameters of the system , , initial displacement value , tolerance error All are 10 -5 .
[0055] Step 2) Initialize the module 2.1 Second-order derivative Initialize the second-order derivative (acceleration), ODE equation The expression is as follows:
[0056] According to the preset problem parameters, the second-order derivative can be obtained .
[0057] Then the target nonlinear system equation is:
[0058] 2.2 Calculate the initial step size The initial step size is calculated according to the following strategy:
[0059] The default initial step size is , other parameter values are , norm Defined as:
[0060] in, is the dimension of the differential equation, and are the absolute and relative error tolerance vectors provided, Contains provided components For most ordinary differential equations, .
[0061] The target nonlinear system equations are solved in parallel using a four-level fourth-order implicit Runge-Kutta parallel iterative solver. Step 3) First, the nonlinear system equations must be constructed:
[0062] here, is the phase derivative vector of dimension 4d, where Include derivative values The approximate value of , represents the step length, Indicates the Butcher table given matrix, express The approximate value of represents the Kronecker product, Representation vector , G represents the stacking value of g. is the identity matrix of dimension 4 or d, whose dimensions can be obtained from the context. .
[0063] Construct the system matrix of the nonlinear system equations:
[0064]
[0065]
[0066] Each iteration is based on the Boolean variable Determine whether to recalculate the system matrix and thus construct the iterative matrix and through Determine whether it needs to be decomposed.
[0067] Step 4) Calculate the predicted value Fourth-order extrapolation using the second-order derivative vector from the previous stage ,get As the starting value of the Newton process, The coefficient matrix of dimension , , are the coefficients in the Butcher table, h represents the current time step, and hp represents the predicted time step.
[0068] Step 5) Convergence judgment (VERGEN) Check the convergence behavior of the Newton process. The Boolean variable growth monitors whether the current iteration is too large relative to y, which can effectively prevent overflow. Experience shows that It is ineffective to set limits on the growth of high indicator variables so use Replace. Variable It is saved for use the next time the convergence judgment is called. The case where this is true is when the Newton process converges too slowly.
[0069] Step 6) Runge-Kutta parallel iteration Solving for acceleration First, apply the improved Newton method , we get the simplified Newton iteration form of the nonlinear system equation:
[0070] Then, applying the Butcher transformation AT=TΛ twice, In the above formula of Iterative update formula:
[0071] in, , , Now you can see that The four components of dimension d (each component corresponds to a stage) can be calculated in parallel. , we can iteratively and parallelize the calculation of the stage vector , and
[0072]
[0073]
[0074]
[0075] You need to execute the steps again to check the convergence of the Newton process. If it converges, save the result and execute step 7). Otherwise, return to the iteration step and solve again.
[0076] Step 7) Control Module According to the error estimation formula, calculate the error of the current value:
[0077] if , is the receiving step, and the new step length is obtained through Gustafsson prediction. Time will move forward, that is, it will update , , and move , and ; By definition, the system matrix is no longer up-to-date, i.e. Set to , otherwise, it is a rejection step, the time step will be reduced proportionally and return to step 3) for recalculation.
[0078] Table 1 below gives a comparison of the simulation time and simulation step size between the semi-implicit Runge-Kutta method and the implicit trapezoidal integration method.
[0079] Table 1 Simulation comparison between implicit Runge-Kutta method and ODE15s method
[0080] In summary, the parallel iterative Runge-Kutta method for simulating second-order nonlinear differential equations proposed in the first embodiment of the present invention ensures the stability of the algorithm by integrating the improved Newton iteration method and the parallel iterative solution method of the implicit Runge-Kutta algorithm. Parallel computing is used in each stage of Runge-Kutta to reduce the computing cost, and the advantages of computing efficiency and stability can be taken into account. Compared with other algorithms for solving second-order differential equations, there is no need to convert the second-order equations into a set of first-order equations when constructing the target nonlinear implicit differential equations, which can greatly reduce the dimensions of the system matrix and the iteration matrix, and can effectively reduce the amount of calculation and memory usage for the iterative algorithm. In terms of the variable step size strategy, the algorithm accuracy can be improved for solving rigid system equations, and the algorithm is more stable and efficient. Compared with the ODE15s algorithm, the iteration step size is significantly reduced.
[0081] In addition, if Figure 5 As shown, the second embodiment of the present invention proposes a parallel iterative Runge-Kutta device 20 for simulating second-order nonlinear differential equations, including: an equation transformation and establishment module 201, a matrix update and decomposition module 202, a parallel iterative operation module 203, an error judgment module 204 and a simulation judgment module 205.
[0082] Among them, the equation conversion and establishment module 201 is used to obtain the simulated ordinary differential equation and convert it into the target nonlinear implicit differential equation, and establish the system differential algebraic equation according to the target nonlinear implicit differential equation. The matrix update and decomposition module 202 is used to determine whether the simulation time in the target nonlinear implicit differential equation reaches the maximum calculation time. When it is determined that the maximum calculation time has not been reached, it is determined whether the system matrix in the system differential algebraic equation needs to be updated according to the Boolean variable, and the iteration matrix obtained by decomposing the system matrix. The parallel iterative operation module 203 is used to obtain the predicted differential variable derivative in the target nonlinear implicit differential equation by using the fourth-order extrapolation method and the fourth-order fourth-order Runge-Kutta method, and perform convergence judgment on the predicted result. If the convergence condition is not met, an inner iteration is performed according to the decomposition of the iterative matrix. The inner iteration uses the predicted differential variable derivative as the starting value of the Newton iteration. Each Newton iteration is parallel iteratively operated by the fourth-order fourth-order Runge-Kutta method until the operation result meets the convergence condition. The error judgment module 204 is used to judge whether the operation result meets the preset error range after the convergence condition is met. If not, the system matrix is updated according to the step size reduction strategy and the iteration matrix is decomposed again. If it meets, the operation result is updated. The simulation judgment module 205 is used to end the simulation when it is judged that the maximum calculation time has been reached, and store and display the operation result.
[0083] It is worth mentioning that the method implemented by the parallel iterative Runge-Kutta device 20 for simulating second-order nonlinear differential equations disclosed in the second embodiment of the present invention is as described in the first embodiment, so it will not be described in detail here. Optionally, the various modules and the above-mentioned other operations or functions in the second embodiment are respectively for implementing the parallel iterative Runge-Kutta method for simulating second-order nonlinear differential equations described in the first embodiment, and the beneficial effects of this embodiment are the same as those of the first embodiment, and for the sake of brevity, they are not repeated here.
[0084] The third embodiment of the present invention further proposes an electronic device 30, for example, comprising: at least one processing unit 31, and at least one storage unit 32, wherein the storage unit 32 stores a computer program, and when the computer program is executed by the processing unit 31, the processing unit 31 executes the method described in the first embodiment, and the beneficial effects of the electronic device 30 provided by this embodiment are the same as the beneficial effects of the parallel iterative Runge-Kutta method for simulating second-order nonlinear differential equations provided by the first embodiment.
[0085] The fourth embodiment of the present invention also provides a computer-readable storage medium 40 on which a computer program is stored. When the program is executed by a processor, the steps of the above method are implemented. The beneficial effects of the computer-readable storage medium 40 provided by this embodiment are the same as the beneficial effects of the parallel iterative Runge-Kutta method for simulating second-order nonlinear differential equations provided by the first embodiment.
[0086] In addition, it can be understood that the aforementioned embodiments are merely illustrative descriptions of the present application. Under the premise that the technical features do not conflict, the structures do not contradict, and the purpose of the invention of the present application is not violated, the technical solutions of the various embodiments can be arbitrarily combined and used in combination.
[0087] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and / or methods can be implemented in other ways. For example, the device embodiments described above are merely schematic, and the division of the units / modules is merely a logical function division. There may be other division methods in actual implementation, such as multiple units or modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0088] The units / modules described as separate components may or may not be physically separated, and the components shown as units / modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units / modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0089] In addition, each functional unit / module in each embodiment of the present application may be integrated into one processing unit / module, or each unit / module may exist physically separately, or two or more units / modules may be integrated into one unit / module. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of hardware plus software functional units / modules.
[0090] The above-mentioned integrated unit / module implemented in the form of a software functional unit / module can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for enabling one or more processors of a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.
[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A parallel iterative Runge-Kutta method for simulating second-order nonlinear differential equations, characterized in that: include: Acquire the simulated ordinary differential equation and convert it into a target nonlinear implicit differential equation, and establish a system differential algebraic equation according to the target nonlinear implicit equation; Determine whether the simulation time in the target nonlinear implicit differential equation reaches the maximum calculation time, and when it is determined that the maximum calculation time has not been reached, determine whether it is necessary to update the system matrix in the system differential algebraic equation according to the Boolean variable, and decompose the iterative matrix obtained by the system matrix; A fourth-order extrapolation method and a fourth-level fourth-order Runge-Kutta method are used to obtain the predicted derivative of the differential variable in the target nonlinear implicit differential equation, and a convergence judgment is performed on the predicted result. If the convergence condition is not met, an inner iteration is performed according to the decomposition of the iteration matrix. The inner iteration uses the predicted derivative of the differential variable as a Newton iteration starting value. Each Newton iteration is performed in parallel through the fourth-level fourth-order Runge-Kutta method until the operation result meets the convergence condition; After determining that the convergence condition is met, further determining whether the operation result meets the preset error range, if not, updating the system matrix and re-decomposing the iteration matrix according to the step size reduction strategy, and if it meets, updating the operation result; When it is determined that the maximum calculation time is reached, the simulation is terminated, and the calculation result is stored and displayed.
2. The parallel iterative Runge-Kutta method for simulating second-order nonlinear differential equations according to claim 1, characterized in that: The step of obtaining the simulated ordinary differential equation and converting it into a target nonlinear implicit differential equation, and establishing a system differential algebraic equation according to the target nonlinear implicit equation, comprises: The ordinary differential equation Transformed into the target nonlinear implicit differential equation ,in, is the differential variable, express The first derivative of express The second-order derivative of For time, and represents the simulation start time and end time, y belongs to the real number range R, represents the dimension of the equation, Respectively Moment The value of The established system differential algebraic equation is ; Among them, the system matrix , , , F is the activation function of the system.
3. The parallel iterative Runge-Kutta method for simulating second-order nonlinear differential equations according to claim 2, characterized in that: Decomposing the iteration matrix obtained by the system matrix includes: Constructing the Iteration Matrix and decompose it into represents the decomposition step length; Solving nonlinear implicit differential equations : ;in, The dimension is The phase derivative vector of Include derivative values The approximate value of , represents the step length, express The approximate value of represents the Kronecker product, A represents the coefficient matrix, Representation vector , G represents the stacking value of g.
4. The parallel iterative Runge-Kutta method for simulating second-order nonlinear differential equations according to claim 3, characterized in that: The predicted derivatives of differential variables in the target nonlinear implicit differential equation are obtained by using the fourth-order extrapolation method and the fourth-order Runge-Kutta method, including: Fourth-order extrapolation using the second-order derivative vector from the previous stage ,get As the starting value of the Newton iteration process, where Matrix of dimensions express ; ; in is the coefficient in the Butcher table, and hp represents the prediction step size.
5. The parallel iterative Runge-Kutta method for simulating second-order nonlinear differential equations according to claim 3, characterized in that: The Newton iteration is based on and two Butcher transformations AT=TΛ, Solve the iterative matrix and get The update formula for the next iteration is: ; in, , , ,in, and are matrices, have different positive eigenvalues, given by the matrix Split , increment The median dimension is Parallel calculation of the four components.
6. The parallel iterative Runge-Kutta method for simulating second-order nonlinear differential equations according to claim 5, characterized in that: The step of determining whether the calculation result meets the preset error range also includes: According to the expected convergence speed and the corresponding step length Determine if the current convergence speed Greater than ,and <= preset step length ,but Will be used for the next Newtonian process if , then the system matrix is recalculated, where =0.1 is the default value.
7. The parallel iterative Runge-Kutta method for simulating second-order nonlinear differential equations according to claim 6, characterized in that: Determining whether the operation result meets the preset error range also includes an error estimation step: According to the implicit embedding formula Eliminate the ordinary differential equation , solved by the Newton iteration , denoted as , and put Itself is used as a reference formula to define the error estimate : ; in, , yes The element in the lower right corner of the matrix Remove the rigid error components in the error estimate.
8. A parallel iterative Runge-Kutta device for simulating second-order nonlinear differential equations, characterized in that: include: An equation conversion and establishment module, used for obtaining the simulated ordinary differential equation and converting it into a target nonlinear implicit differential equation, and establishing a system differential algebraic equation according to the target nonlinear implicit equation; A matrix updating and decomposition module, used for judging whether the simulation time in the target nonlinear implicit differential equation reaches the maximum calculation time, and when it is judged that the maximum calculation time is not reached, judging whether it is necessary to update the system matrix in the system differential algebraic equation according to the Boolean variable, and decomposing the iterative matrix obtained from the system matrix; A parallel iterative operation module is used to obtain the predicted derivative of the differential variable in the target nonlinear implicit differential equation by using the fourth-order extrapolation method and the fourth-level fourth-order Runge-Kutta method, and perform convergence judgment on the predicted result. If the convergence condition is not met, an inner iteration is performed according to the decomposition of the iteration matrix. The inner iteration uses the predicted derivative of the differential variable as the starting value of the Newton iteration. Each Newton iteration is parallel iteratively operated by the fourth-level fourth-order Runge-Kutta method until the operation result meets the convergence condition. An error judgment module is used to judge whether the operation result meets the preset error range after the convergence condition is met. If not, the system matrix is updated according to the step size reduction strategy and the iteration matrix is decomposed again. If it meets, the operation result is updated; The simulation judgment module is used to end the simulation when it is judged that the maximum calculation time is reached, and store and display the calculation result.
9. An electronic device, characterized in that: The method comprises at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the computer program is executed by the processing unit, the processing unit executes the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: It stores a computer program executable by the access authentication device. When the computer program runs on the access authentication device, the access authentication device executes the steps of the method according to any one of claims 1 to 7.
Citation Information
Cited By
Circuit stable state simulation calculation method and device, medium and program product
CN119886028A
A Circuit Steady-State Simulation Calculation Method, Device, Medium, and Program Product
CN119886028B
Field programmable gate array (FPGA) circuit and method for solving micro-grid economic dispatching problem based on neurodynamics optimization algorithm
CN120065845A
Rockfill dam creep simulation analysis method and system based on implicit iteration
CN120234884A
Self-adaptive time step length method and device in semiconductor device simulation
CN121859834A