Joint simulation control method and device, equipment and medium

By introducing a quaternion interpolation algorithm and a backoff mechanism into the co-simulation system, the data exchange time of different solvers is coordinated, which solves the simulation accuracy and efficiency problems caused by inconsistent step sizes and achieves high-precision and stable simulation results.

CN120995713APending Publication Date: 2025-11-21CHENGDU GONGDING TECHNOLOGY CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511223566.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

In existing technologies, multi-physics domain co-simulation systems suffer from insufficient simulation accuracy and efficiency due to inconsistent solver step sizes, and are prone to numerical instability.

Method used

Quaternion interpolation algorithm is used to coordinate the data exchange time of different solvers. The solution result is determined at the data exchange time by quaternion interpolation algorithm, and back-off processing is performed when necessary to ensure the accuracy and stability of simulation results.

Benefits of technology

It improves the accuracy and efficiency of multi-physics domain co-simulation, enhances the accuracy and reliability of simulation results, avoids error accumulation and numerical instability caused by inconsistent solver step sizes, and improves the stability and flexibility of simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120995713A_ABST
    Figure CN120995713A_ABST
Patent Text Reader

Abstract

The invention provides a joint simulation control method and device, equipment and a medium. The method comprises the following steps: inputting an initial condition for joint simulation into at least one solver, wherein the solver is used for solving a simulation solving result corresponding to the initial condition after a set time length; determining a data exchange moment used for obtaining a solving result output by the solver; based on a quaternion interpolation algorithm, determining a solving result of the solver at a data exchange moment; and based on the result data corresponding to each solver, determining a simulation result of joint simulation at the data exchange moment. According to the method and the device, the problem of insufficient simulation precision and efficiency of joint simulation in related technologies is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of simulation technology, and in particular to a co-simulation control method, device, equipment and medium. Background Technology

[0002] In the design of modern industrial systems, especially in the development of transportation vehicles such as automobiles, high-speed trains, and aircraft, computer-aided engineering (CAE) simulation technology has become a crucial design and verification tool. Since complex systems typically span multiple physical domains, such as mechanical structures, thermodynamics, fluid dynamics, electrical systems, and control systems, the industry commonly employs multiple specialized solvers to address problems in their respective physical domains. Therefore, effectively coordinating the work of different simulation solvers to achieve joint simulation is crucial for the accuracy and reliability of the simulation results.

[0003] In related technologies, inconsistencies in time steps and state variables between different solvers often affect simulation accuracy and efficiency. Furthermore, coordination difficulties exist, and numerical instability in a single solver can easily lead to the overall failure of the co-simulation. Summary of the Invention

[0004] The co-simulation control method, apparatus, equipment, and medium provided in this application are intended to address the problems of insufficient simulation accuracy and efficiency in co-simulation in related technologies.

[0005] Firstly, this application provides a co-simulation control method, including:

[0006] The initial conditions for co-simulation are input into at least one solver, which is used to solve the simulation results corresponding to the initial conditions after a set time.

[0007] Determine the data exchange timing for obtaining the solution results output by the solver;

[0008] Based on the quaternion interpolation algorithm, the solution result of the solver at the data exchange time is determined;

[0009] Based on the result data corresponding to each solver, the simulation results of the joint simulation at the data exchange time are determined.

[0010] In one embodiment of this disclosure, the solution result of the solver at the data exchange time is determined based on the quaternion interpolation algorithm, including: if the data exchange time is an integer multiple of the solver step size, the result output by the solver at the data exchange time is taken as the solution result; if the data exchange time is not an integer multiple of the solver step size, the process data of the solver at the data exchange time is input into the quaternion interpolation algorithm, and the solution result is output.

[0011] In one embodiment of this disclosure, the quaternion interpolation algorithm is implemented through the following steps: based on the solution result of the previous step size of the solver, the initial quaternion and the initial angular velocity for the quaternion interpolation algorithm are determined; based on the process data of the solver at the data exchange time, the real-time quaternion at the target time in the quaternion interpolation algorithm is determined; the initial quaternion and the real-time quaternion are input into the quaternion interpolation algorithm, and the solution result is output.

[0012] In one embodiment of this disclosure, the quaternion interpolation algorithm is expressed as:

[0013] h(t) = (2t 3 – 3t 2 + 1)q0+ (t 3 – 2t 2 + t)v0+ (-2t 3 + 3t 2 )Δ0 + (t 3 – 2t 2 v1,

[0014] q(t)=q0e h(t) ;

[0015] Where q0 is the initial quaternion, v0 is the initial angular velocity, v1 is the real-time angular velocity, q(t) is the real-time quaternion at time t, and Δ0 is the initial attitude difference between the initial quaternion and the real-time quaternion.

[0016] In one embodiment of this disclosure, the method further includes: determining that at least one solver outputs a solution result that does not meet the requirements at the data exchange time; determining a rollback time for result rollback; if the rollback time is the data exchange time, determining the result data obtained at the data exchange time as the simulation result at the rollback time; if the rollback time is not the data exchange time, determining the simulation result at the rollback time based on a quaternion interpolation algorithm.

[0017] In one embodiment of this disclosure, if the rollback time is not the data exchange time, the simulation result at the rollback time is determined based on the quaternion interpolation algorithm, including: inputting the process data of the solver at the rollback time into the quaternion interpolation algorithm, and outputting the solution result corresponding to the rollback time; and determining the simulation result corresponding to the rollback time based on the solution result.

[0018] In one embodiment of this disclosure, determining the simulation result of the joint simulation at the data exchange time based on the result data corresponding to each solver includes: normalizing the result data based on the definition of the state variables contained in the solution results of the solver; and obtaining the simulation result based on the normalized result data.

[0019] Secondly, this application provides a co-simulation control device, comprising:

[0020] An input module is used to input the initial conditions for co-simulation into at least one solver, which is used to solve the simulation results corresponding to the initial conditions after a set time period;

[0021] The acquisition module is used to determine the data exchange time for acquiring the solution results output by the solver;

[0022] The solution module is used to determine the solution result of the solver at the data exchange time based on the quaternion interpolation algorithm.

[0023] The simulation module is used to determine the simulation results of the joint simulation at the time of data exchange based on the result data corresponding to each solver.

[0024] In one embodiment of this disclosure, the solving module is specifically used to: if the data exchange time is an integer multiple of the solver step size, take the result output by the solver at the data exchange time as the solving result; if the data exchange time is not an integer multiple of the solver step size, input the process data of the solver at the data exchange time into the quaternion interpolation algorithm and output the solving result.

[0025] In one embodiment of this disclosure, the solving module is specifically used to implement the quaternion interpolation algorithm through the following steps: determining the initial quaternion and initial angular velocity for the quaternion interpolation algorithm based on the solution result of the previous step size of the solver; determining the real-time quaternion at the target time in the quaternion interpolation algorithm based on the process data of the solver at the data exchange time; inputting the initial quaternion and the real-time quaternion into the quaternion interpolation algorithm, and outputting the solution result.

[0026] In one embodiment of this disclosure, the solving module specifically includes a quaternion interpolation algorithm, represented as follows:

[0027] h(t) = (2t 3 – 3t 2 + 1)q0+ (t 3 – 2t 2 + t)v0+ (-2t 3 + 3t 2 )Δ0 + (t 3 – 2t 2 v1,

[0028] q(t)=q0e h(t) ;

[0029] Where q0 is the initial quaternion, v0 is the initial angular velocity, v1 is the real-time angular velocity, q(t) is the real-time quaternion at time t, and Δ0 is the initial attitude difference between the initial quaternion and the real-time quaternion.

[0030] In one embodiment of this disclosure, the solving module is further configured to: determine that at least one solver outputs a solution result that does not meet the requirements at the data exchange time; determine a rollback time for result rollback; if the rollback time is the data exchange time, determine the result data obtained at the data exchange time as the simulation result at the rollback time; if the rollback time is not the data exchange time, determine the simulation result at the rollback time based on a quaternion interpolation algorithm.

[0031] In one embodiment of this disclosure, the solving module is specifically used to input the process data of the solver at the back-off time into the quaternion interpolation algorithm, output the solution result corresponding to the back-off time, and determine the simulation result corresponding to the back-off time based on the solution result.

[0032] In one embodiment of this disclosure, the simulation module is specifically used to normalize the result data based on the definition of the state variables contained in the solution results in the solver; and to obtain the simulation results based on the normalized result data.

[0033] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;

[0034] The memory stores computer-executed instructions;

[0035] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0036] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0037] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.

[0038] The co-simulation control method, apparatus, device, and medium provided in this disclosure, by introducing a quaternion interpolation algorithm, can effectively solve the problems of inconsistent time steps and inconsistent state variables in multi-solver co-simulation. By obtaining high-precision solution results at any data exchange time, without being limited by the step size of each solver, simulation accuracy and efficiency are improved. By determining the co-simulation results at the data exchange time, coordination and consistency among different solvers are ensured, enhancing the accuracy and reliability of simulation results. By flexibly selecting the data exchange time, the influence of numerical instability of a single solver under a fixed step size is effectively avoided, improving the stability and flexibility of co-simulation. Attached Figure Description

[0039] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0040] Figure 1 This is an application scenario diagram of the co-simulation control method provided in the embodiments of this disclosure;

[0041] Figure 2 A flowchart of a co-simulation control method provided in one embodiment of this disclosure;

[0042] Figure 3 A flowchart of a co-simulation control method provided in yet another embodiment of this disclosure;

[0043] Figure 4 A schematic diagram of the structure of a co-simulation control device provided in yet another embodiment of this disclosure;

[0044] Figure 5 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present disclosure.

[0045] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation

[0046] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0047] In the design of modern industrial systems, especially in the development of transportation vehicles such as automobiles, high-speed trains, and aircraft, computer-aided engineering (CAE) simulation technology has become a key design and verification tool. Since complex systems typically span multiple physical domains, such as mechanical structures, thermodynamics, fluid dynamics, electrical systems, and control systems, the industry commonly employs multiple "specialized solvers" to solve problems in different physical domains through multibody dynamics co-simulation. However, existing co-simulation technologies face challenges due to inconsistent step sizes among different solvers. Coordinating these step sizes leads to long individual solution steps, insufficient flexibility, and difficulties in efficient data exchange and coordination within a unified timeframe.

[0048] In existing technologies, interpolation algorithms are sometimes used to coordinate the step size and state variables of different solvers. However, common linear interpolation is simple to calculate but inaccurate in handling rotation variables because it does not consider the influence of angular velocity on rotational attitude. While Euler angle cubic Hermite interpolation considers the influence of angular velocity, the results may jump due to the singularity of Euler angles, leading to numerical instability in the simulation results.

[0049] In highly dynamic scenarios, where there is equipment disturbance, rotation, or rotation, the above simulation methods are prone to leading to inaccurate simulation results.

[0050] Furthermore, existing technologies lack flexible rollback mechanisms. Once a solver becomes numerically unstable, the overall simulation is often forced to terminate, making it impossible to flexibly adjust and recover locally. These problems have not yet been effectively solved in related technologies, limiting the application and development of co-simulation.

[0051] The co-simulation control method provided in this application ensures a consistent simulation starting point by inputting initial conditions into the solvers. It coordinates the time steps of different solvers by determining the data exchange time. A quaternion interpolation algorithm is used to determine the solution results at the data exchange time, providing high-precision attitude interpolation and avoiding errors from Euler angle interpolation. Finally, based on the results data from each solver, the co-simulation results are determined, ensuring consistency between different physical domains. This effectively solves the problems of inconsistent step sizes, insufficient flexibility, and simulation instability.

[0052] Figure 1 This is a schematic diagram illustrating the application scenario of the co-simulation control method provided in this application, such as... Figure 1 As shown, during the co-simulation control process, the controller 100 receives the solution results output by each solver 110, integrates them, and outputs the corresponding co-simulation results to complete the co-simulation control process.

[0053] It should be noted that, Figure 1The scenario shown includes controllers and solvers, with only one or a specific number as examples for illustration. However, this disclosure is not limited to this; that is, the number of controllers and solvers can be arbitrary.

[0054] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0055] Figure 2 Flowchart of the co-simulation control method provided in this application Figure 1 ,like Figure 2 As shown, the method includes:

[0056] S201. Input the initial conditions for co-simulation into at least one solver.

[0057] The solver is used to solve the simulation results corresponding to the initial conditions after a set time period.

[0058] Specifically, this embodiment is used to illustrate the main steps of the co-simulation control method.

[0059] In this embodiment, the execution entity is a coordinating solver or coordinating module used to coordinate and control the various solvers in the co-simulation. For ease of subsequent description, it is collectively referred to as the controller.

[0060] In co-simulation, the input of initial conditions is a crucial step in ensuring the accuracy of the simulation process. Initial conditions include the system's state variables and environmental parameters, which provide the solver with the starting point for simulation calculations.

[0061] Depending on the application scenario, the initial input conditions may vary.

[0062] For example, in vehicle simulation, initial conditions may involve the vehicle's speed, position, acceleration, and environmental conditions such as road friction coefficient and wind speed. These conditions not only affect the vehicle's dynamic behavior but also determine the response of the suspension system and tires.

[0063] In more detailed chassis simulations, initial conditions may include material properties, initial stress state, and connection conditions, which directly affect the structural strength and durability of the chassis.

[0064] In the field of large-scale equipment such as wind power generation, the initial conditions may involve wind speed, wind direction, initial blade angle and rotation speed, etc., which determine the power output and structural load of the wind turbine.

[0065] In addition, in fields such as aviation equipment, initial conditions may also include the aircraft's speed, attitude, and airflow conditions, which are crucial to the aircraft's stability and control performance.

[0066] By inputting these initial conditions into the solver, the consistency of the starting point of the simulation process is ensured, enabling the solver to output simulation results that match the actual situation after a set time.

[0067] Depending on the simulation method, in addition to the initial conditions, corresponding supplementary or corrective conditions can be input at different simulation stages to optimize the simulation results.

[0068] Since the accuracy and comprehensiveness of initial conditions directly affect the reliability and precision of simulation results, the characteristics and interactions of each physical domain need to be considered when inputting initial conditions. For example, in multiphysics coupling simulations, the initial conditions need to simultaneously meet the requirements of thermodynamics, fluid mechanics, and structural mechanics to ensure the accuracy of the simulation results.

[0069] This can effectively reduce the accumulation of errors during the simulation process and improve the reliability of the simulation results.

[0070] S202. Determine the data exchange time for obtaining the solution results output by the solver.

[0071] Specifically, determining the data exchange timing is a crucial step in achieving multi-solver coordination. Since different solvers may have different time steps, the selection of the data exchange timing needs to comprehensively consider the computational capabilities of each solver and the complexity of the physical model.

[0072] Using the aforementioned example as an illustration, in vehicle and chassis simulation, the selection of the data exchange time needs to consider the characteristic time scale based on the vehicle's dynamic response, such as the response time of the suspension system and the step size of the solver related to the vibration modes of the chassis.

[0073] In wind power generation equipment, the step size of the solver needs to be considered at the moment of data exchange, which is related to the frequency of wind speed changes and the dynamic response of the blades.

[0074] In aviation equipment, the step size of the solver needs to be considered in relation to the aircraft's attitude adjustment frequency and airflow changes.

[0075] By selecting the step size of some solvers as a benchmark to determine the data exchange time, effective data coordination can be achieved between different solvers, ensuring the synchronization of the simulation process.

[0076] In practical applications, instead of choosing the step size of these solvers as the benchmark, another time step can be determined to ensure computational flexibility.

[0077] However, in multi-solver co-simulation, overly frequent data exchanges may lead to excessive computational burden, while overly sparse data exchanges may result in inaccurate simulation results. Therefore, when determining the timing of data exchanges, it is necessary to comprehensively consider the balance between simulation accuracy and computational efficiency, and reduce error accumulation and numerical instability caused by inconsistent step sizes.

[0078] Meanwhile, by flexibly selecting the data exchange time, the influence of numerical instability of a single solver under a fixed step size is effectively avoided, thereby improving the stability and flexibility of the co-simulation (the relevant effects will be further described in subsequent embodiments).

[0079] S203. Based on the quaternion interpolation algorithm, determine the solution result of the solver at the data exchange time.

[0080] Specifically, in simulation scenarios involving attitude changes, the quaternion interpolation algorithm can effectively solve the singularity problem that traditional Euler angle interpolation methods are prone to when dealing with complex motions, thus avoiding inaccurate interpolation results.

[0081] Quaternion interpolation algorithms provide smoother and more accurate attitude interpolation by performing interpolation in quaternion space. For example, in vehicle simulation, quaternion interpolation can be used to accurately describe the dynamic response and attitude changes of a vehicle on uneven surfaces. In aviation equipment, quaternion interpolation can be used to simulate the attitude adjustment and rotational motion of aircraft, ensuring the accuracy and stability of simulation results.

[0082] Quaternion interpolation algorithms can accurately determine the solver's solution at the moment of data exchange, thereby achieving coordination and consistency among different solvers.

[0083] Quaternion interpolation algorithms not only improve the accuracy of simulations but also enhance their stability. Especially in highly dynamic environments, they effectively address the shortcomings of traditional interpolation methods, providing more reliable simulation results and offering technical support for the coordination of multiple physics domains.

[0084] S204. Based on the result data corresponding to each solver, determine the simulation results of the joint simulation at the data exchange time.

[0085] Specifically, in co-simulation, the output data of each solver, based on the characteristics of its physical model, may include state variables, mechanical responses, thermodynamic states, etc. By integrating these output data, the simulation results of the co-simulation can be determined at the time of data exchange, ensuring the consistency between different physical domains and providing technical support for the design and verification of complex systems.

[0086] The co-simulation control method provided in this application, by introducing a quaternion interpolation algorithm, can effectively solve the problems of inconsistent time steps and inconsistent state variables in multi-solver co-simulation. It improves simulation accuracy and efficiency by obtaining high-precision solution results at any data exchange time, without being limited by the step size of each solver. By determining the co-simulation results at the data exchange time, it ensures the coordination and consistency between different solvers, enhancing the accuracy and reliability of the simulation results. Furthermore, by flexibly selecting the data exchange time, it effectively avoids the impact of numerical instability of a single solver under fixed compensation, improving the stability and flexibility of the co-simulation.

[0087] Figure 3 Flowchart of co-simulation control provided for this application Figure 2 ,like Figure 3 As shown, in this embodiment... Figure 2 Based on the examples, the specific processes in the co-simulation control method are described in detail, including:

[0088] S301. Input the initial conditions for co-simulation into at least one solver.

[0089] The solver is used to solve the simulation results corresponding to the initial conditions after a set time period.

[0090] Specifically, this embodiment is used to further explain the specific process of co-simulation.

[0091] S302. Determine the data exchange time for obtaining the solution results output by the solver.

[0092] Specifically, the time of data exchange, which is also the time of determining the simulation results, is usually set to a fixed time step. However, when it is necessary to perform precise checks on the simulation results, any time can be temporarily selected as the data exchange time, and the joint simulation results at that time can be obtained.

[0093] S303. If the data exchange time is an integer multiple of the solver step size, the result output by the solver at the data exchange time shall be taken as the solution result.

[0094] Specifically, depending on the choice of the data exchange time, when the data exchange time is exactly an integer multiple of a certain solver step size, the solver's output at that time can be directly used as the solution result.

[0095] In this case, no additional interpolation calculations are needed because the solver's output is already aligned with the data exchange timing.

[0096] This simplifies the calculation process, ensures the efficiency and accuracy of the simulation, avoids unnecessary computational overhead, and reduces the risk of accumulated numerical errors.

[0097] S304. If the data exchange time is not an integer multiple of the solver step size, input the process data of the solver at the data exchange time into the quaternion interpolation algorithm and output the solution result.

[0098] Specifically, when the data exchange time is not an integer multiple of the solver step size, a quaternion interpolation algorithm is needed to determine the solution result.

[0099] By inputting the process data of the solver at the data exchange moment into the quaternion interpolation algorithm, high-precision solution results can be output, ensuring the continuity and accuracy of the simulation process.

[0100] Quaternion interpolation algorithms are particularly suitable for simulation scenarios involving complex attitude changes, such as flight attitude adjustment of aircraft equipment and dynamic response of vehicles on uneven roads.

[0101] This method can effectively solve the problem of error accumulation caused by inconsistent step size and improve the reliability of simulation results.

[0102] Furthermore, the specific implementation process of the quaternion interpolation algorithm is described below, including the following:

[0103] Step A1: Based on the solution results of the previous step in the solver, determine the starting quaternion and the starting angular velocity for the quaternion interpolation algorithm.

[0104] Specifically, in the quaternion interpolation algorithm, the initial quaternion and initial angular velocity for interpolation are first determined based on the solution result of the previous step size of the solver.

[0105] The initial quaternion represents the system's attitude at the previous time step, while the initial angular velocity reflects the system's rotational dynamics at that moment. These initial parameters provide the necessary initial conditions for quaternion interpolation, ensuring the accuracy and continuity of the interpolation process.

[0106] In vehicle simulation, initial quaternions and angular velocities may reflect the vehicle's current attitude and rotational state; in aerospace equipment, these parameters may relate to the aircraft's current attitude and rotational rate. Accurately determining these initial parameters lays a solid foundation for subsequent interpolation calculations.

[0107] Step A2: Based on the process data of the solver at the data exchange time, determine the real-time quaternion at the target time in the quaternion interpolation algorithm.

[0108] Specifically, based on the process data of the solver at the data exchange time, the real-time quaternion at the target time can be calculated.

[0109] Real-time quaternions represent the system's attitude at the target time and are the target result of interpolation calculations.

[0110] By accurately calculating real-time quaternions, the accuracy and continuity of interpolation results can be ensured, thus guaranteeing the reliability of simulation results.

[0111] Step A3: Input the initial quaternion and the real-time quaternion into the quaternion interpolation algorithm and output the solution result.

[0112] Specifically, the calculation principle of the quaternion interpolation algorithm is explained below. By defining the Hermite interpolation trajectory in the quaternion space, the first derivative of the high-order attitude interpolation is achieved by calculating the logarithmic mapping and tangent vector between two attitude quaternions, and ensuring that the interpolation trajectory lies on the unit quaternion sphere (S³), thus realizing the physical "shortest path rotation".

[0113] In actual calculations, each quaternion is converted into a Lie algebra for computation, i.e.:

[0114] Δ0 = log(q0) -1 q1);

[0115] v0 = log(q0 -1 q0);

[0116] v1 = log(q1 -1 q1);

[0117] Where q0 is the initial quaternion, v0 is the initial angular velocity, v1 is the real-time angular velocity, q1 is the real-time quaternion, and Δ0 is the initial attitude difference between the initial quaternion and the real-time quaternion.

[0118] At this point, the quaternion interpolation algorithm is expressed as:

[0119] h(t) = (2t 3 – 3t 2 + 1)q0+ (t 3 – 2t 2 + t)v0+ (-2t 3 + 3t 2 )Δ0 + (t 3 – 2t 2 v1,

[0120] q(t)=q0e h(t) ;

[0121] Where q(t) is the real-time quaternion at time t, t∈[0, 1].

[0122] The specific quaternion representation of q is as follows:

[0123] q = w + xi + yj + zk,

[0124] q -1 = w – xi – yj – zk;

[0125] Where w is the real part of the quaternion, x, y, and z are the imaginary parts, and i, j, and k are the imaginary units. These related concepts are common knowledge in this field and will not be explained further here.

[0126] The quaternion interpolation algorithm can be used to obtain the quaternion q(t) at the corresponding data exchange time t, which can be used as the solution result of the solver. It can also effectively avoid the singularity problem in traditional interpolation methods and provide smoother and more accurate attitude interpolation results.

[0127] S305. Based on the definition of state variables contained in the solution results in the solver, normalize the result data.

[0128] Specifically, by normalizing the state variables in the solution results, errors caused by different units and dimensions can be eliminated, ensuring that results from different physical domains can be compared and integrated within the same framework.

[0129] This process is particularly important for multiphysics coupling simulations because the state variables of different physics fields may have different dimensions and ranges.

[0130] This improves the comparability of simulation results and provides a basis for subsequent result analysis and optimization.

[0131] S306. Based on the normalized result data, the simulation results are obtained.

[0132] Specifically, after the normalization process is completed, the simulation results of the joint simulation can be obtained based on the processed result data.

[0133] This ensures the consistency of output results from different solvers, improves the accuracy and reliability of simulation results, achieves consistency across multiple physics domains, and provides technical support for the design and verification of complex systems.

[0134] Furthermore, embodiments of this disclosure also provide a backoff mechanism based on a quaternion interpolation algorithm, which includes the following steps:

[0135] Step B1: Determine that at least one solver outputs a solution that does not meet the requirements at the time of data exchange.

[0136] Specifically, during the simulation process, the controller monitors the solution results in real time and can promptly detect problems such as numerical instability or error exceeding limits based on the judgment rules corresponding to different solvers. It can also generate corresponding alarm information to alert simulation personnel to potential problems.

[0137] Step B2: Determine the rollback time for the result rollback.

[0138] Specifically, at this point, the controller can automatically roll back to the previous data exchange moment, or it can roll back to any moment based on the instructions of the simulation personnel, that is, determine the corresponding rollback moment.

[0139] Step B3: If the rollback time is the data exchange time, determine the result data obtained at the data exchange time as the simulation result at the rollback time.

[0140] Specifically, in the automatic rollback mechanism, the rollback time is usually the previous data exchange time. At this time, no additional interpolation calculation is required, so the result data at the rollback time is already aligned with the data exchange time. The controller can directly use the result data from the data exchange time, which can quickly restore the simulation process and reduce the calculation delay and error accumulation caused by rollback.

[0141] Step B4: If the rollback time is not the data exchange time, determine the simulation result of the rollback time based on the quaternion interpolation algorithm.

[0142] Specifically, when the rollback time is not the data exchange time, the simulation results of the rollback time need to be determined based on the quaternion interpolation algorithm.

[0143] In practice, the process involves inputting the solver's process data at the back-off time into the quaternion interpolation algorithm, outputting the solution result corresponding to the back-off time, and then determining the simulation result corresponding to the back-off time based on the solution result.

[0144] Specifically, by inputting the process data of the solver at the back-off time into the quaternion interpolation algorithm, the solution result corresponding to the back-off time can be output. The relevant principle is the same as the principle of calculating the result at any data exchange time in the aforementioned steps, and will not be repeated here.

[0145] This ensures the continuity and stability of the simulation process, especially in simulation scenarios involving complex motion, and effectively solves the problem of error accumulation caused by inconsistent step size, thereby improving the reliability of simulation results.

[0146] This method allows for rapid recovery of the simulation process after rollback, ensuring the accuracy and stability of the simulation results.

[0147] The co-simulation control method provided in this disclosure significantly improves the accuracy and stability of co-simulation by introducing a quaternion interpolation algorithm and a backoff mechanism. The quaternion interpolation algorithm effectively solves the singularity problem in traditional Euler angle interpolation, providing smoother and more accurate attitude interpolation, suitable for complex motion scenarios. By rationally determining the data exchange timing and normalization processing, the consistency between different solvers is ensured, enhancing the reliability of simulation results. The backoff mechanism allows for flexible adjustments when simulation results do not meet requirements. By selecting appropriate backoff timing and interpolation calculations, the simulation process can be quickly restored, reducing error accumulation and the risk of numerical instability. The combination of these technologies effectively improves the accuracy and reliability of co-simulation of complex systems.

[0148] Figure 4 A schematic diagram of the co-simulation control device provided in this application is shown below. Figure 4 As shown, the co-simulation control device 400 provided in this embodiment includes:

[0149] The input module 410 is used to input the initial conditions for co-simulation into at least one solver, which is used to solve the simulation results corresponding to the initial conditions after a set time.

[0150] The acquisition module 420 is used to determine the data exchange time for acquiring the solution results output by the solver;

[0151] The solver module 430 is used to determine the solver's solution at the data exchange time based on the quaternion interpolation algorithm.

[0152] The simulation module 440 is used to determine the simulation results of the joint simulation at the data exchange time based on the result data corresponding to each solver.

[0153] In one embodiment of this disclosure, the solving module 430 is specifically used to: if the data exchange time is an integer multiple of the solver step size, take the result output by the solver at the data exchange time as the solving result; if the data exchange time is not an integer multiple of the solver step size, input the process data of the solver at the data exchange time into the quaternion interpolation algorithm and output the solving result.

[0154] In one embodiment of this disclosure, the solving module 430 is specifically used to implement a quaternion interpolation algorithm through the following steps: determining the initial quaternion and initial angular velocity for the quaternion interpolation algorithm based on the solution result of the previous step size of the solver; determining the real-time quaternion at the target time in the quaternion interpolation algorithm based on the process data of the solver at the data exchange time; inputting the initial quaternion and the real-time quaternion into the quaternion interpolation algorithm, and outputting the solution result.

[0155] In one embodiment of this disclosure, the solving module 430 specifically includes a quaternion interpolation algorithm, expressed as:

[0156] h(t) = (2t 3 – 3t 2 + 1)q0+ (t 3 – 2t 2 + t)v0+ (-2t 3 + 3t 2 )Δ0 + (t 3 – 2t 2 v1,

[0157] q(t)=q0e h(t) ;

[0158] Where q0 is the initial quaternion, v0 is the initial angular velocity, v1 is the real-time angular velocity, q(t) is the real-time quaternion at time t, and Δ0 is the initial attitude difference between the initial quaternion and the real-time quaternion.

[0159] In one embodiment of this disclosure, the solver module 430 is further configured to: determine that at least one solver outputs a solution result that does not meet the requirements at the data exchange time; determine a rollback time for result rollback; if the rollback time is the data exchange time, determine the result data obtained at the data exchange time as the simulation result at the rollback time; if the rollback time is not the data exchange time, determine the simulation result at the rollback time based on the quaternion interpolation algorithm.

[0160] In one embodiment of this disclosure, the solver module 430 is specifically used to input the process data of the solver at the back-off time into the quaternion interpolation algorithm, output the solution result corresponding to the back-off time, and determine the simulation result corresponding to the back-off time based on the solution result.

[0161] In one embodiment of this disclosure, the simulation module 440 is specifically used to normalize the result data based on the definition of the state variables contained in the solution results in the solver; and to obtain the simulation results based on the normalized result data.

[0162] The co-simulation control device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0163] Figure 5 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 5 As shown, the electronic device 50 includes:

[0164] Processor 51, memory 52, and communication interface 53;

[0165] The memory 52 is used to store the executable instructions of the processor 51;

[0166] The processor 51 is configured to execute the technical solutions in any of the foregoing method embodiments by executing the executable instructions.

[0167] Optionally, the memory 52 can be either standalone or integrated with the processor 51.

[0168] Optionally, when the memory 52 is a device independent of the processor 51, the electronic device 50 may further include:

[0169] Bus 54, memory 52 and communication interface 53 are connected to processor 51 through bus 54 and complete communication with each other. Communication interface 53 is used to communicate with other devices.

[0170] Optionally, the communication interface 53 can be implemented using a transceiver. The communication interface is used to enable communication between the database access device and other devices (e.g., clients, read-write databases, and read-only databases). The memory may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk drive.

[0171] Bus 54 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus.

[0172] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0173] The electronic device is used to execute the technical solutions in any of the foregoing method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.

[0174] This application also provides a readable storage medium storing a computer program thereon, which, when executed by a processor, implements the technical solutions provided in any of the foregoing method embodiments.

[0175] This application also provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the technical solutions provided in any of the foregoing method embodiments.

[0176] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0177] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A co-simulation control method, characterized in that, include: The initial conditions for co-simulation are input into at least one solver, which is used to solve the simulation results corresponding to the initial conditions after a set time period. Determine the data exchange time for obtaining the solution results output by the solver; Based on the quaternion interpolation algorithm, the solution result of the solver at the data exchange time is determined; Based on the result data corresponding to each solver, the simulation results of the joint simulation at the data exchange time are determined.

2. The method according to claim 1, characterized in that, The method for determining the solver's solution at the data exchange time based on the quaternion interpolation algorithm includes: If the data exchange time is an integer multiple of the solver step size, the result output by the solver at the data exchange time shall be taken as the solution result; If the data exchange time is not an integer multiple of the solver step size, the process data of the solver at the data exchange time is input into the quaternion interpolation algorithm, and the solution result is output.

3. The method according to claim 2, characterized in that, The quaternion interpolation algorithm is implemented through the following steps: Based on the solution results of the previous step size of the solver, the initial quaternion and initial angular velocity used for the quaternion interpolation algorithm are determined; Based on the process data of the solver at the data exchange time, the real-time quaternion at the target time in the quaternion interpolation algorithm is determined; The initial quaternion and the real-time quaternion are input into the quaternion interpolation algorithm, and the solution result is output.

4. The method according to claim 3, characterized in that, The quaternion interpolation algorithm is expressed as follows: h(t) = (2t 3 – 3t 2 + 1)q0+ (t 3 – 2t 2 + t)v0+ (-2t 3 + 3t 2 )Δ0 + (t 3 – 2t 2 )v1, q(t)=q0e h(t) ; Where q0 is the initial quaternion, v0 is the initial angular velocity, v1 is the real-time angular velocity, q(t) is the real-time quaternion at time t, and Δ0 is the initial attitude difference between the initial quaternion and the real-time quaternion.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: It was determined that at least one solver output a solution that did not meet the requirements at the time of data exchange; Determine the rollback timing for the result rollback; If the rollback time is the data exchange time, the result data obtained at the data exchange time shall be determined as the simulation result at the rollback time; If the rollback time is not the data exchange time, the simulation result of the rollback time is determined based on the quaternion interpolation algorithm.

6. The method according to claim 5, characterized in that, If the rollback time is not the data exchange time, the simulation result for the rollback time is determined based on the quaternion interpolation algorithm, including: The solver inputs the process data at the back-off time into the quaternion interpolation algorithm and outputs the solution result corresponding to the back-off time. Based on the solution results, the simulation results corresponding to the rollback time are determined.

7. The method according to any one of claims 1 to 4, characterized in that, The process of determining the joint simulation results at the data exchange time based on the result data corresponding to each solver includes: Based on the definition of the state variables contained in the solution results in the solver, the result data is normalized. The simulation results are obtained based on the normalized data.

8. A co-simulation control device, characterized in that, include: An input module is used to input the initial conditions for co-simulation into at least one solver, which is used to solve the simulation results corresponding to the initial conditions after a set time period; The acquisition module is used to determine the data exchange time for acquiring the solution results output by the solver; The solver module is used to determine the solver's solution at the time of data exchange based on the quaternion interpolation algorithm. The simulation module is used to determine the simulation results of the joint simulation at the time of data exchange based on the result data corresponding to each solver.

9. An electronic device, characterized in that, include: Processor, memory, communication interface; The memory is used to store the executable instructions of the processor; The processor is configured to execute the co-simulation control method according to any one of claims 1 to 7 by executing the executable instructions.

10. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the co-simulation control method according to any one of claims 1 to 7.