Search

CN-122021016-A - Multi-muscle model collaborative simulation method and system

CN122021016ACN 122021016 ACN122021016 ACN 122021016ACN-122021016-A

Abstract

The invention provides a multi-muscle model collaborative simulation method and system, wherein the method comprises the steps of obtaining a parameter array of a muscle model, wherein the parameter array comprises a preset model type identifier, dynamically interpreting semantics of each parameter bit in the parameter array based on the model type identifier to obtain a parameter interpretation result corresponding to a model type, routing the parameter interpretation result to a corresponding muscle model calculation function based on the model type identifier, executing the muscle model calculation function to obtain muscle state data of a current simulation step, and storing the muscle state data for the next simulation step to be called. The invention can freely switch or mix different muscle models by modifying the parameter array, namely by modifying the configuration, and realizes that various muscle models can be configured and dynamically selected on the premise of not changing the native interface of the simulation engine and the kernel architecture.

Inventors

  • HUANG LI
  • Shan Songjunjie
  • LIU YAFEI
  • ZHANG CAN
  • Yin Houfang

Assignees

  • 武汉真友科技有限公司

Dates

Publication Date
20260512
Application Date
20260128

Claims (10)

  1. 1. A multi-muscle model co-simulation method, comprising: acquiring a parameter array of a muscle model, wherein the parameter array comprises a preset model type identifier; Dynamically interpreting the semantics of each parameter bit in the parameter array based on the model type identifier to obtain a parameter interpretation result corresponding to the model type; Routing the parameter interpretation result to a corresponding muscle model calculation function based on the model type identifier, and executing the muscle model calculation function to obtain muscle state data of the current simulation step; and storing the muscle state data for the next simulation step to call.
  2. 2. The multi-muscle model co-simulation method of claim 1, wherein the parameter array comprises a base parameter field, a model type identifier field, and an extension parameter field; The basic parameter field stores geometric and mechanical parameters shared by different muscle models; the model type identifier field stores the model type identifier; the extension parameter field stores the specific parameters required for the muscle model.
  3. 3. The method of claim 2, wherein dynamically interpreting semantics of each parameter bit in the parameter array based on the model type identifier to obtain a parameter interpretation result corresponding to a model type, comprises: determining a parameter semantic interpretation rule corresponding to the muscle model type based on the muscle model type indicated by the model type identifier; And interpreting the parameter array based on the parameter semantic interpretation rule to obtain the parameter interpretation result.
  4. 4. The multi-muscle model collaborative simulation method according to claim 2, wherein the invoking a corresponding muscle model computing function for mechanical computation based on the model type identifier and the parameter interpretation results to obtain muscle state data of a current simulation step comprises: Distributing the parameter interpretation results to corresponding muscle model calculation functions based on the model type identifiers; and executing the muscle model calculation function and outputting the muscle state data of the current simulation step.
  5. 5. The method according to claim 4, wherein the data format and units of the muscle state data of the current simulation step outputted by the different muscle models are the same.
  6. 6. The multi-muscle model co-simulation method of claim 1, wherein the muscle state data comprises general state data and special state data, and the storing the muscle state data comprises: Storing the general state data into a general storage space; and dynamically allocating a special storage space for the special state data based on the model type and the storage requirement, and storing the special state data into the special storage space.
  7. 7. The multi-muscle model co-simulation method of claim 1, further comprising: the muscle state data is saved to a non-volatile storage medium.
  8. 8. The method according to claim 1, wherein dynamically interpreting semantics of each parameter bit in the parameter array based on the model type identifier comprises: Judging whether the model type identifier is an invalid identifier or not; When the model type identifier is a valid identifier, dynamically explaining the semantics of each parameter bit in the parameter array based on the model type identifier; and when the model type identifier is an invalid identifier, stopping the execution of the current simulation step and generating error information.
  9. 9. The multi-muscle model co-simulation method of claim 1, further comprising: Determining high-frequency access data based on the access frequency of the muscle state data, and caching the high-frequency access data; And/or the number of the groups of groups, Time stamps or numbers are added to the muscle state data for different time steps.
  10. 10. A multi-muscle model co-simulation system, comprising: the parameter data acquisition unit is used for acquiring a parameter array of the muscle model, wherein the parameter array comprises a preset model type identifier; The parameter interpretation unit is used for dynamically interpreting the semantics of each parameter bit in the parameter array based on the model type identifier to obtain a parameter interpretation result corresponding to the model type; The route selection and calculation unit is used for routing the parameter interpretation result to a corresponding muscle model calculation function based on the model type identifier, and executing the muscle model calculation function to obtain muscle state data of the current simulation step; And the data storage unit is used for storing the muscle state data for the next simulation step to call.

Description

Multi-muscle model collaborative simulation method and system Technical Field The invention relates to the technical field of physical simulation engines, in particular to a multi-muscle model collaborative simulation method and system. Background In the field of physical simulation, in particular robotics, biomechanics and animation, high-fidelity muscular dynamics simulation is a key to achieving natural motion. MuJoCo (Multi-Joint DYNAMICS WITH Contact) is taken as a leading physical simulation engine in the industry, and a built-in muscle actuator of the physical simulation engine is based on a classical Hill model, so that a reliable basis is provided for biological muscle simulation. However, with the continuous expansion of simulation application scenes, a single muscle model cannot meet diversified demands. For example, in biomimetic robotic studies, hydraulic or pneumatic driven hydraulic muscles are often simulated, while in neuromuscular control simulation, an accurate biological muscle model is required. The prior art solution suffers from the disadvantage that the 1, muJoCo engine native only provides a single hill-type muscle model, whose model type and computational logic are hard-coded inside the engine. If the user needs to use other models such as hydraulic muscle, the model cannot be realized through configuration, and the necessary flexibility is lacking. 2. If a user attempts to integrate a new model, existing solutions typically require direct modification of the engine kernel code, overwriting or replacing the original muscle force calculation function. This approach destroys the integrity of the original system, resulting in loss of original model functionality, and requiring recompilation for each modification, which is cumbersome and prone to errors. 3. In the same simulation scene, if different types of muscles such as biological drive and hydraulic drive are required to exist at the same time, the existing architecture cannot support mixed use and real-time switching of the model based on configuration. Users are forced to create different simulation environments for different types of muscles, destroying the uniformity and simulation efficiency of the system. Therefore, it is needed to provide a multi-muscle model collaborative simulation method and system, which can realize that multiple muscle models can be configured and dynamically selected without changing the native interface and kernel architecture of a simulation engine. Disclosure of Invention In view of the foregoing, it is necessary to provide a multi-muscle model collaborative simulation method and system for solving the technical problem that the prior art cannot realize the configurable and dynamic selection of various muscle models without changing the native interfaces and kernel architecture of the simulation engine. In order to solve the above technical problems, in a first aspect, the present invention provides a multi-muscle model collaborative simulation method, including: acquiring a parameter array of a muscle model, wherein the parameter array comprises a preset model type identifier; Dynamically interpreting the semantics of each parameter bit in the parameter array based on the model type identifier to obtain a parameter interpretation result corresponding to the model type; Routing the parameter interpretation result to a corresponding muscle model calculation function based on the model type identifier, and executing the muscle model calculation function to obtain muscle state data of the current simulation step; and storing the muscle state data for the next simulation step to call. In one possible implementation, the parameter array includes a base parameter field, a model type identifier field, and an extension parameter field; The basic parameter field stores geometric and mechanical parameters shared by different muscle models; the model type identifier field stores the model type identifier; the extension parameter field stores the specific parameters required for the muscle model. In one possible implementation manner, the dynamically interpreting the semantics of each parameter bit in the parameter array based on the model type identifier to obtain a parameter interpretation result corresponding to the model type, includes: determining a parameter semantic interpretation rule corresponding to the muscle model type based on the muscle model type indicated by the model type identifier; And interpreting the parameter array based on the parameter semantic interpretation rule to obtain the parameter interpretation result. In one possible implementation manner, the step of calling a corresponding muscle model calculation function to perform mechanical calculation based on the model type identifier and the parameter interpretation result to obtain muscle state data of the current simulation step includes: Distributing the parameter interpretation results to corresponding muscle model calculation func