Hydraulic artificial muscle state control method and device, electronic equipment and storage medium
By allocating independent state storage space for the hydraulic artificial muscle actuator and selecting the target coefficient set based on historical control commands, the problem of state discontinuity in hydraulic artificial muscle simulation is solved, and more stable simulation output is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN ZHENYOU TECHNOLOGY CO LTD
- Filing Date
- 2026-02-10
- Publication Date
- 2026-06-12
AI Technical Summary
Existing technologies lack an effective memory and smooth management mechanism for the internal hysteresis state of the actuators when simulating hydraulic artificial muscles, resulting in simulation distortion, instability, and difficulties in multi-actuator coordination.
Each hydraulic artificial muscle actuator is allocated an independent state storage space, the polynomial coefficient set of the previous simulation step is persistently recorded, and a target coefficient set is selected based on the comparison results of the current and historical control commands. The state storage is then updated and the output force is calculated.
By maintaining the continuity of muscle mechanical state, the smoothness and dynamic stability of simulation output are significantly improved, and the additional numerical processing overhead of calculating abrupt changes is reduced.
Smart Images

Figure CN122194774A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robot control technology, specifically to a method, device, electronic device, and storage medium for controlling the state of a hydraulic artificial muscle. Background Technology
[0002] Hydraulic artificial muscles, as a type of biomimetic actuator, have significant application prospects in fields such as humanoid robots and rehabilitation exoskeletons due to their high power density and compliance. To accurately reproduce their mechanical behavior in simulations, current methods typically employ polynomial models to fit the force-length-pressure relationships of the hydraulic muscle under two different physical states: fluid filling and fluid release. During simulation calculations, the system instantly selects the corresponding set of polynomial coefficients to calculate the instantaneous output force of the muscle based on the direction of change of the current control command (usually mapped to the target pressure).
[0003] In realizing this invention, the inventors discovered that existing methods have at least the following drawbacks: First, in current methods, polynomial coefficients are selected independently at each step based on the direction of change of the instantaneous control command. When the control command experiences small high-frequency fluctuations near the target value, it causes the polynomial coefficients to switch frequently and non-physically between the fluid filling and discharging sets, which is seriously inconsistent with the physical fact that real muscles have continuous states and hysteresis characteristics. Second, due to the lack of memory of the mechanical state at the previous moment, the aforementioned frequent and abrupt coefficient switching causes discontinuous jumps in the calculated muscle force, leading to simulation jitter and instability, and failing to realistically simulate the smooth contraction and relaxation process of muscles. Finally, for complex systems containing a large number of hydraulic muscle actuators (such as human lower limb bionic models), existing methods lack a mechanism to maintain the specific hysteresis state of each independent actuator, making it difficult to achieve a coordinated and stable group working mode of multiple muscles.
[0004] In summary, existing technologies for simulating hydraulic artificial muscles suffer from technical problems such as distortion, instability, and poor scalability due to the lack of an effective memory and smooth management mechanism for the internal hysteresis state of the actuator. Summary of the Invention
[0005] In view of this, it is necessary to provide a method, device, equipment and medium for controlling the state of a hydraulic artificial muscle, so as to solve the technical problems of simulation distortion, instability and difficulty in multi-actuator coordination caused by the lack of effective state memory and anti-disturbance switching mechanism in the existing methods.
[0006] To address the aforementioned technical problems, in a first aspect, the present invention provides a method for controlling the state of a hydraulically actuated artificial muscle, comprising:
[0007] Allocate and maintain an independent state storage space for each hydraulic artificial muscle actuator in the simulation system to persistently store the set of polynomial coefficients used in the force calculation of the last simulation step of the actuator; When calculating muscle force in each simulation step, a target coefficient set is selected based on the comparison between the current control command and the control command of the previous simulation step. The target coefficient set is used to update the state storage space of the corresponding driver, and the muscle output force of the current simulation step is calculated based on the target coefficient set.
[0008] In one possible implementation, when calculating muscle force in each simulation step, a target coefficient set is selected based on the comparison between the current control command and the control command of the previous simulation step, including: Calculate the difference between the control command of the current simulation step and the control command of the previous simulation step; Based on the difference, a target coefficient set is selected from the predefined set of filling polynomial coefficients, the predefined set of discharging polynomial coefficients, and the target coefficient set of the previous simulation step stored in the state storage space.
[0009] In one possible implementation, based on the difference, the coefficients are selected from a predefined set of filling polynomial coefficients, a predefined set of discharging polynomial coefficients, and the target coefficient set of the previous simulation step stored in the state storage space, including: If the difference is greater than zero, then the set of coefficients of the liquid-filled polynomial is selected as the target set of coefficients; If the difference is less than zero, then the set of coefficients of the discharge polynomial is selected as the target coefficient set; If the difference is zero, then the set of coefficients already stored in the state storage space is selected as the target set of coefficients.
[0010] In one possible implementation, based on the difference, selecting a target coefficient set from a predefined set of filling polynomial coefficients, a predefined set of discharging polynomial coefficients, and the target coefficient set of the previous simulation step stored in the state storage space, further includes: Obtain a preset anti-interference switching threshold, wherein the anti-interference switching threshold is not zero; When the absolute value of the difference is greater than the switching threshold, the target stage is determined according to its sign, and the target coefficient set is determined based on the target stage, wherein the target stage is either the filling stage or the discharging stage. If the absolute value of the difference is less than or equal to the switching threshold, it is determined that the pressure has not changed, and the set of coefficients already stored in the state storage space is selected as the target set of coefficients.
[0011] In one possible implementation, calculating the muscle output force for the current simulation step based on the target coefficient set includes: Based on the target coefficient set, a muscle polynomial constitutive model calculation is performed to obtain a smooth and continuous muscle output force.
[0012] In one possible implementation, the hydraulic artificial muscle state control method includes the following steps before allocating and maintaining an independent state storage space for each hydraulic artificial muscle actuator in the simulation system: At the start of the simulation or when the driver is first activated, it is detected whether the state storage space is in an uninitialized state; If it is in an uninitialized state, the state storage space is initialized using the default set of fluid-filled polynomial coefficients.
[0013] In one possible implementation, the state storage space is implemented using a global array whose length is the product of the number of muscle actuators in the simulation system and the number of polynomial coefficients that each actuator needs to store.
[0014] On the other hand, the present invention also provides a hydraulic artificial muscle state control device, comprising: The state storage module allocates and maintains an independent state storage space for each hydraulic artificial muscle actuator in the simulation system, which is used to persistently store the set of polynomial coefficients used in the force calculation of the last simulation step of the actuator; The state decision module is used to select the target coefficient set based on the comparison result between the current control command and the control command of the previous simulation step when calculating muscle force in each simulation step. The state update and calculation module is used to update the state storage space of the corresponding driver using the target coefficient set, and to calculate the muscle output force of the current simulation step based on the target coefficients.
[0015] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the hydraulic artificial muscle state control method described in any of the above implementations.
[0016] Fourthly, the present invention also provides a computer-readable storage medium for storing a computer-readable program or instructions, which, when executed by a processor, can implement the steps in the hydraulic artificial muscle state control method described in any of the above implementations.
[0017] The beneficial effects of this invention are as follows: The hydraulic artificial muscle state control method provided by this invention allocates an independent state storage space to each hydraulic muscle actuator to persistently record the polynomial coefficients used in the previous simulation step. In each simulation step, the target coefficient set for the current calculation is selected based on the comparison results between the current and historical control commands, thereby simultaneously updating the state storage and calculating the output force. This method effectively avoids frequent non-physical switching of polynomial coefficients caused by minor fluctuations in commands by maintaining the continuity of the muscle's mechanical state, thus significantly improving the smoothness and dynamic stability of the simulation output, while reducing the additional numerical processing overhead required due to sudden computational changes. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A schematic flowchart of an embodiment of the hydraulic artificial muscle state control method provided by the present invention; Figure 2 For the present invention Figure 1 A schematic diagram of an embodiment of S102; Figure 3 For the present invention Figure 2 A schematic diagram of an embodiment of S202; Figure 4 For the present invention Figure 2 A schematic diagram of another embodiment of S202; Figure 5 A schematic flowchart of another embodiment of the hydraulic artificial muscle state control method provided by the present invention; Figure 6 A schematic diagram of an embodiment of the hydraulic artificial muscle state control device provided by the present invention; Figure 7 A schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0021] In the description of the embodiments of the present invention, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0022] The terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a technical feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature.
[0023] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0024] High-level abstract features; the decoder is responsible for upsampling to progressively recover and output the three-dimensional structure.
[0025] This invention provides a method, apparatus, electronic device, and storage medium for controlling the state of a hydraulically propelled artificial muscle. The technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0026] Figure 1 A schematic flowchart of an embodiment of the hydraulic artificial muscle state control method provided by the present invention is shown below. Figure 1 As shown, the method for controlling the state of a hydraulically actuated artificial muscle includes: S101. Allocate and maintain an independent state storage space for each hydraulic artificial muscle actuator in the simulation system to persistently store the set of polynomial coefficients used in the force calculation of the last simulation step of the actuator. S102. When calculating muscle force in each simulation step, select the target coefficient set based on the comparison result between the current control command and the control command of the previous simulation step. S103. Update the state storage space of the corresponding driver using the target coefficient set, and calculate the muscle output force of the current simulation step based on the target coefficients.
[0027] Specifically, this embodiment provides a method for controlling the state of a hydraulic artificial muscle, applied to a robot simulation system based on the MuJoCo physics engine. This method aims to solve the simulation distortion and instability problems caused by the lack of continuous state memory. Its core lies in establishing and maintaining a unique historical state record for each hydraulic artificial muscle actuator, and using this record to guide current mechanical calculations, thereby achieving smooth and physically realistic dynamic simulation. The core process of the method is explained below with specific steps.
[0028] In step S101, the method allocates and maintains an independent state storage space for each hydraulic artificial muscle actuator in the simulation system.
[0029] In computer software implementation, the state storage space can be understood as a memory area reserved for a specific data object. Its function is to persist (i.e., maintain across program execution cycles) the set of polynomial coefficients actually used by the driver in the previous simulation step when performing force calculation.
[0030] Among them, the polynomial coefficient set refers to a set of mathematical parameters obtained through data fitting, used to define the force-length-pressure relationship of hydrodynamic muscles in a specific state (such as fluid filling or fluid releasing).
[0031] Taking the simulation of the lower limbs of a humanoid robot as an example, if it contains 24 independent hydraulic muscles, the method will create 24 independent state storage units for each of the 24 actuators.
[0032] In one specific implementation of the MuJoCo physics engine, this can be achieved through the engine's core data structures (such as...). mjData Expand a global array (e.g.) in last_theta_force This is achieved by multiplying the number of muscles by the number of coefficients required for each muscle (e.g., 24). 10), thus providing a dedicated storage location for each drive.
[0033] In step S102, during muscle force calculation at each simulation step, decision logic is executed: based on the comparison between the current control command and the control command of the previous simulation step, a target coefficient set is selected. The control command here typically refers to the normalized target pressure signal. The comparison result reflects the changing trend of the control intent between adjacent simulation steps and is the core basis for determining whether the muscle should follow a fluid-filling or fluid-depleting mechanical path.
[0034] The decision-making process in this embodiment does not depend on the absolute value of the instantaneous instruction, but rather on its direction of change.
[0035] For example, in a walking cycle simulation, when the controller instructs the calf muscles to increase pressure in preparation for pushing off the ground, this step initiates a coefficient selection process based on the comparison result that "the current instruction is greater than the previous instruction." This selection mechanism is the foundation for subsequent smooth switching and disturbance rejection.
[0036] In step S103, two key operations are performed using the target coefficient set selected in step S102.
[0037] First, the state storage space of the corresponding driver is updated using the target coefficient set. That is, the coefficient set determined in this decision is written into the dedicated storage unit of the driver, overwriting the old value, so as to provide the latest historical state for the next simulation step.
[0038] Next, a muscle polynomial constitutive model is calculated based on the same target coefficient set to directly obtain the muscle output force for the current simulation step. This constitutes a complete "decision-update-computation" closed loop.
[0039] For example, when the calf muscle group is determined to have entered the fluid filling stage and a set of fluid filling coefficients is selected, the set of coefficients is saved as a new historical state and immediately used to calculate the current muscle contraction force. This force is then input into MuJoCo's dynamics solver to drive joint movement.
[0040] It's important to note that hysteresis refers to the phenomenon where a system's output depends not only on the current input but also on the historical input paths. This manifests as the output response trajectory not coinciding when the input changes in different directions. In the simulation control of hydraulic artificial muscles, hysteresis means that even at the same pressure value, the output force may differ during the muscle's filling (pressure increase) and deflating (pressure decrease) processes, depending on whether it's currently in the filling or deflating path.
[0041] In this embodiment, the hysteresis state is specifically manifested as: each driver independently stores the set of polynomial coefficients used in the previous simulation step. This set represents the current mechanical path (fluid filling / fluid releasing) state of the muscle and continues until the control command changes significantly, thus avoiding frequent non-physical switching.
[0042] In this embodiment, each hydraulic muscle actuator is allocated an independent state storage space to persistently record the polynomial coefficients used in the previous simulation step. In each simulation step, the target coefficient set for the current calculation is selected based on a comparison between the current and historical control commands. The state storage is updated accordingly, and the output force is calculated. This method effectively avoids frequent non-physical switching of polynomial coefficients caused by minor fluctuations in commands by maintaining the continuity of the muscle's mechanical state. This significantly improves the smoothness and dynamic stability of the simulation output while reducing the additional numerical processing overhead required due to computational abrupt changes.
[0043] In some embodiments of the present invention, such as Figure 2 As shown, in step S102, when calculating muscle force in each simulation step, a target coefficient set is selected based on the comparison result between the current control command and the control command of the previous simulation step, including: S201. Calculate the difference between the control command of the current simulation step and the control command of the previous simulation step; S202. Based on the difference, select the target coefficient set from the predefined set of filling polynomial coefficients, the predefined set of discharging polynomial coefficients, and the target coefficient set of the previous simulation step stored in the state storage space.
[0044] In step S201, the control command difference refers to the result obtained by subtracting the command value from the previous time step from the current command value. Its sign and magnitude intuitively reflect the instantaneous change direction and magnitude of the control intention. The calculation process in step S201 is the core operation of discretizing and comparing continuous command signals, providing a quantitative basis for subsequent decision-making.
[0045] In step S202, a target coefficient set is selected from a predefined set of possibilities based on the calculated difference. This selection logic explicitly defines three sources: first, a predefined set of fluid-filling polynomial coefficients, which is a set of parameters calibrated through experimental data that describes the mechanical properties of the hydrodynamic muscle during the internal pressure increase phase (fluid filling); second, a predefined set of fluid-release polynomial coefficients, which is another set of parameters describing the mechanical properties during the pressure decrease phase (fluid release); and third, the target coefficient set of the previous simulation step stored in the state storage space, which is the historical state itself.
[0046] This embodiment quantifies the instruction difference, making the triggering conditions for state switching objective and repeatable, eliminating the uncertainty that may be introduced by fuzzy judgment, thereby improving the consistency and predictability of the simulation logic. Simultaneously, by explicitly limiting the source of the target coefficient set to three specific sets with clear physical meaning (two predefined physical model sets and one historical state set), invalid or erroneous coefficients are prevented from being introduced into the calculation, fundamentally ensuring the physical accuracy of the model on which each force calculation is based.
[0047] In some embodiments of the present invention, such as Figure 3 As shown, step S202, based on the difference, retrieves coefficients from a predefined set of filling polynomial coefficients, a predefined set of discharging polynomial coefficients, and the target coefficient set from the previous simulation step stored in the state storage space, including: S301. If the difference is greater than zero, then select the set of coefficients of the liquid-filled polynomial as the target set of coefficients. S302. If the difference is less than zero, then select the set of coefficients of the discharge polynomial as the target set of coefficients. S303. If the difference is zero, then the set of coefficients already stored in the state storage space is selected as the target set of coefficients.
[0048] This embodiment provides a clear, definite, and physically meaningful mapping relationship for the decision-making process in step S202. The core of this mapping lies in the fact that the mathematical symbols of the control command differences are given direct physical meaning: their positive or negative sign represents the direction of pressure change, and whether they are zero represents whether the pressure has changed. Based on this, the calculated scalar difference is directly mapped to one of three predefined coefficient sets.
[0049] Specifically, this embodiment employs three mutually exclusive and complete conditional branches, each of which associates a specific pressure change state with a defined set of coefficients.
[0050] The first branch stipulates that if the difference is greater than zero, the set of coefficients of the fluid-filling polynomial is selected as the target set of coefficients. This condition corresponds to the physical state of increased pressure, i.e., the hydrodynamic muscle is in the stage of internal fluid filling and active contraction. The set of coefficients of the fluid-filling polynomial is a set of mathematical model parameters, experimentally calibrated, specifically used to calculate the output force in this stage.
[0051] The second branch stipulates that if the difference is less than zero, the set of coefficients for the fluid release polynomial is selected as the target set of coefficients. This condition corresponds to the physical state of reduced pressure, i.e., the muscle is in the stage of internal fluid release, passive elongation, or active relaxation. The set of coefficients for the fluid release polynomial is another set of parameters specifically used to calculate the output force during this stage.
[0052] The third branch stipulates that if the difference is zero, the set of coefficients already stored in the state storage space is selected as the target set of coefficients. This condition corresponds to the physical state of constant pressure and is key to achieving state preservation. It means that when the control command does not change, the muscle's mechanical model will maintain its current historical mechanical path (which may be fluid filling or fluid releasing) without any non-physical switching.
[0053] In some embodiments of the present invention, such as Figure 4As shown, step S202, based on the difference, selects the target coefficient set from the predefined set of filling polynomial coefficients, the predefined set of discharging polynomial coefficients, and the target coefficient set of the previous simulation step stored in the state storage space, and further includes: S401. Obtain the preset anti-interference handover threshold, which is not zero; S402. When the absolute value of the difference is greater than the switching threshold, the target stage is determined according to its sign, and the target coefficient set is determined based on the target stage. The target stage is either the filling stage or the discharging stage. S403. If the absolute value of the difference is less than or equal to the switching threshold, it is determined that the pressure has not changed, and the coefficient set already stored in the state storage space is selected as the target coefficient set.
[0054] In some embodiments of the present invention, a specific implementation for enhancing robustness in step S202 is provided, namely, defining a judgment logic that includes an anti-disturbance switching threshold. This implementation aims to solve the problem of unnecessary and frequent mechanical state switching that may be caused by minor fluctuations or noise in the control signal, thereby improving the stability of the simulation under non-ideal signal conditions.
[0055] Specifically, this embodiment introduces a preset disturbance rejection switching threshold before the basic difference judgment. This threshold is a predetermined positive number that is not zero, often referred to as a "dead zone" or "hysteresis band" in control engineering, used to define a negligible range of signal changes. The judgment logic is modified as follows: First, the threshold is obtained. Then, instead of making a decision directly based on the original sign of the difference, the absolute value is first determined to be greater than the threshold. Only when the absolute difference exceeds the threshold is a clear directional change considered to have occurred. At this point, the target stage (filling stage or discharging stage) is determined based on the sign of the difference, and the corresponding predefined coefficient set is selected accordingly. Conversely, if the absolute value of the difference is less than or equal to the threshold, it is determined that no substantial change in pressure has occurred. The system will ignore this minor fluctuation and directly select the coefficient set already stored in the state storage space as the target coefficient set, thereby maintaining the current mechanical state unchanged.
[0056] In simple terms, the relationship between this stage division and the difference mapping is as follows: if the difference is positive, the target stage is the filling stage; if it is negative, it is the discharging stage.
[0057] By implementing the threshold-based disturbance rejection switching logic described in this embodiment, the hydraulic muscle simulation control system achieves enhanced robustness and practicality. First, this mechanism effectively filters out high-frequency minute noise or numerical jitter in control commands, significantly reducing the frequency of non-physical state switching caused by signal fluctuations, thereby improving the smoothness and stability of the simulation output. Second, by avoiding numerous unnecessary coefficient set switchings and subsequent repetitive calculations, it reduces computational fluctuations and potential performance overhead in the simulation system, enabling reliable operation even in real, noisy control environments.
[0058] In some embodiments of the present invention, the muscle output force of the current simulated step is calculated based on the target coefficient, including: Based on the target coefficient set, a muscle polynomial constitutive model is performed to calculate a smooth and continuous muscle output force.
[0059] This step transforms the set of abstract coefficients selected in the previous step into a concrete and quantifiable execution step for muscle output force.
[0060] Specifically, the muscle polynomial constitutive model calculation here refers to a mathematical model calculation process that uses polynomial functions to characterize the relationship between the output force of hydrodynamic muscles and their state variables (such as length and pressure). The core of this model is typically expressed as... F = Σ(A[i] × θ[i]) ,in F For the output muscle force, A The feature vector is constructed from the current physical state of the muscle (such as normalized length and normalized pressure). θ This is the so-called "target coefficient set".
[0061] Performing this calculation means substituting the real-time muscle state (length, pressure derived from control commands) acquired in the current simulation step into the feature vector. A and with the selected target coefficient set θ By performing linear combination operations, the instantaneous muscle force can be directly calculated. F Since polynomial functions are themselves continuously differentiable and have the same set of coefficients... θ According to the calculation, as long as the input state variables change continuously, the output force will naturally have mathematical continuity.
[0062] This embodiment combines physical states with calibrated model parameters to ensure that the numerical results of each force output have clear physical meaning and repeatable accuracy. Furthermore, because the calculation is based on a continuous polynomial function and a consistent (or smoothly switching according to rules) coefficient set, the output force exhibits smoothness and continuity over time, effectively eliminating non-physical jumps in force during simulation and significantly improving the numerical stability of the overall dynamic solution and the realism of the simulation experience.
[0063] In some embodiments of the present invention, such as Figure 4 As shown, prior to step S101, the method for controlling the state of the hydraulically actuated artificial muscle includes: S501. At the start of simulation or when the driver is first activated, check whether the state storage space is in an uninitialized state. S502. If the state is in an uninitialized state, the state storage space is initialized using the default set of liquid-filled polynomial coefficients.
[0064] To ensure the reliable operation of the hydraulic artificial muscle state control method during simulation startup or the addition of a new actuator, a one-time initialization preparation process, namely steps S501 and S502, is included before step S101. This process aims to establish a defined and consistent starting point for the state storage space of each hydraulic artificial muscle actuator, ensuring that the entire state control logic can iterate from a known initial condition.
[0065] Specifically, step S501 stipulates that at the start of the simulation or when a driver is activated for the first time, it is necessary to first check whether its corresponding state storage space is in an uninitialized state. In computer program implementation, this uninitialized state typically refers to the memory region allocated to that storage space not yet being assigned a value with clear physical meaning. A common and efficient detection method is to check whether all elements in the storage region are zero (or a specific flag value).
[0066] In step S502, if the detection result indicates that the state is in an uninitialized state, a default set of fluid-filling polynomial coefficients is used to initialize the state storage space. The default set of fluid-filling polynomial coefficients is a predefined set of parameters used to describe the mechanical properties of the hydrodynamic muscle under basic pressure, and its function is to provide a standard initial mechanical model for the actuator. After this write operation is completed, the state storage space is changed from uninitialized to initialized, and the stored coefficients become the initial values of the target coefficient set of the previous simulation step in subsequent steps.
[0067] This embodiment ensures that the starting state of the simulation or actuator activation is clear and predictable, eliminating uncertain initial states caused by random memory values, thereby improving the repeatability and reliability of simulation results. Simultaneously, by providing a unified, physically clear default initial model (fluid-filled state) for all actuators, a safe and consistent logical starting point is provided for subsequent smooth control based on state memory, avoiding numerical instability issues that may arise from evolving from non-physical or abnormal states.
[0068] In some embodiments of the present invention, the state storage space is implemented through a global array, the length of which is the product of the number of muscle actuators in the simulation system and the number of polynomial coefficients to be stored for each actuator.
[0069] The global array refers to a contiguous block of memory allocated for this purpose. Its size is determined before program execution or during initialization, and its scope is globally valid throughout the entire simulation calculation. This array is specifically used to centrally store the historical polynomial coefficient states of all hydraulic artificial muscle actuators.
[0070] The calculation of its total length follows a defined rule: it is equal to the product of the total number of muscle actuators in the simulation system (e.g., the number of all hydrodynamic muscles in a humanoid robot model) and the number of polynomial coefficients that each actuator needs to store independently (e.g., 10 parameters used to characterize its mechanical properties).
[0071] For example, for a humanoid robot lower limb model with 24 hydraulic muscles, if each muscle needs to store 10 coefficients, the total length of the global array is set to 24 × 10 = 240 floating-point units. In a specific implementation based on the MuJoCo engine, by... mjData Extend a structure with a name last_theta_force The pointer is used to point to the global array, and during simulation initialization, a contiguous memory of the appropriate size is dynamically allocated based on the model information and the number of coefficients (e.g., 10).
[0072] This embodiment centrally manages the state of all drivers through a single contiguous memory block, greatly simplifying memory allocation and management logic, reducing the risk of memory fragmentation, and facilitating efficient memory access by the processor. Simultaneously, by utilizing driver indexes and a fixed number of coefficients for linear addressing, it provides a fast access path with constant time complexity for each driver's state access, significantly improving the efficiency of state querying and updating during large-scale multi-muscle system simulations.
[0073] To better implement the hydraulic artificial muscle state control method in the embodiments of the present invention, based on the hydraulic artificial muscle state control method, correspondingly, as follows: Figure 6 As shown, this embodiment of the invention also provides a hydraulic artificial muscle state control device, the hydraulic artificial muscle state control device 600 comprising: The state storage module 601 is used to allocate and maintain an independent state storage space for each hydraulic artificial muscle actuator in the simulation system, and to persistently store the set of polynomial coefficients used in the force calculation of the last simulation step of the actuator. The state decision module 602 is used to select a target coefficient set based on the comparison result between the current control command and the control command of the previous simulation step when calculating muscle force in each simulation step. The state update and calculation module 603 is used to update the state storage space of the corresponding driver using the target coefficient set, and calculate the muscle output force of the current simulation step based on the target coefficients.
[0074] The hydraulic artificial muscle state control device 600 provided in the above embodiments can realize the technical solutions described in the above hydraulic artificial muscle state control method embodiments. The specific implementation principles of each module or unit can be found in the corresponding content in the above hydraulic artificial muscle state control method embodiments, and will not be repeated here.
[0075] like Figure 7 As shown, the present invention also provides an electronic device 700. The electronic device 700 includes a processor 701, a memory 702, and a display 703. Figure 7 Only some components of the electronic device 700 are shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
[0076] In some embodiments, processor 701 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 702 or process data, such as the hydraulic artificial muscle state control method of the present invention.
[0077] In some embodiments, processor 701 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 701 may be local or remote. In some embodiments, processor 701 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, intranet, multi-cloud, etc., or any combination thereof.
[0078] In some embodiments, memory 702 may be an internal storage unit of electronic device 700, such as a hard disk or memory of electronic device 700. In other embodiments, memory 702 may also be an external storage device of electronic device 700, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 700.
[0079] Furthermore, the memory 702 may include both internal storage units of the electronic device 700 and external storage devices. The memory 702 is used to store application software and various types of data installed on the electronic device 700.
[0080] In some embodiments, display 703 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 703 is used to display information from electronic device 700 and to display a visual user interface. Components 701-703 of electronic device 700 communicate with each other via a system bus.
[0081] In one embodiment, when the processor 701 executes the hydraulic artificial muscle state control program in the memory 702, the following steps can be implemented: Allocate and maintain an independent state storage space for each hydraulic artificial muscle actuator in the simulation system to persistently store the set of polynomial coefficients used in the force calculation of the last simulation step of the actuator; When calculating muscle force in each simulation step, a target coefficient set is selected based on the comparison between the current control command and the control command of the previous simulation step. The target coefficient set is used to update the state storage space of the corresponding driver, and the muscle output force of the current simulation step is calculated based on the target coefficients.
[0082] It should be understood that when the processor 701 executes the hydraulic artificial muscle state control program in the memory 702, in addition to the functions mentioned above, it can also perform other functions, as can be found in the description of the corresponding method embodiments above.
[0083] Furthermore, the embodiments of the present invention do not specifically limit the type of electronic device 700 mentioned. Electronic device 700 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, electronic device 700 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).
[0084] Accordingly, this application also provides a computer-readable storage medium for storing computer-readable programs or instructions. When the programs or instructions are executed by a processor, they can implement the steps or functions of the hydraulic artificial muscle state control methods provided in the above-described method embodiments.
[0085] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0086] The above provides a detailed description of the hydraulic artificial muscle state control method, device, electronic device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for controlling the state of a hydraulically actuated artificial muscle, characterized in that, include: Allocate and maintain an independent state storage space for each hydraulic artificial muscle actuator in the simulation system to persistently store the set of polynomial coefficients used in the force calculation of the last simulation step of the actuator; When calculating muscle force in each simulation step, a target coefficient set is selected based on the comparison between the current control command and the control command of the previous simulation step. The target coefficient set is used to update the state storage space of the corresponding driver, and the muscle output force of the current simulation step is calculated based on the target coefficient set.
2. The method for controlling the state of a hydraulically actuated artificial muscle according to claim 1, characterized in that, When calculating muscle force in each simulation step, a target coefficient set is selected based on the comparison between the current control command and the control command of the previous simulation step, including: Calculate the difference between the control command of the current simulation step and the control command of the previous simulation step; Based on the difference, a target coefficient set is selected from the predefined set of filling polynomial coefficients, the predefined set of discharging polynomial coefficients, and the target coefficient set of the previous simulation step stored in the state storage space.
3. The method for controlling the state of a hydraulically actuated artificial muscle according to claim 2, characterized in that, Based on the difference, the coefficients from the predefined set of filling polynomial coefficients, the predefined set of discharging polynomial coefficients, and the target coefficient set from the previous simulation step stored in the state storage space include: If the difference is greater than zero, then the set of coefficients of the liquid-filled polynomial is selected as the target set of coefficients; If the difference is less than zero, then the set of coefficients of the discharge polynomial is selected as the target coefficient set; If the difference is zero, then the set of coefficients already stored in the state storage space is selected as the target set of coefficients.
4. The method for controlling the state of a hydraulically actuated artificial muscle according to claim 2, characterized in that, Based on the difference, a target coefficient set is selected from a predefined set of filling polynomial coefficients, a predefined set of discharging polynomial coefficients, and the target coefficient set of the previous simulation step stored in the state storage space. This also includes: Obtain a preset anti-interference switching threshold, wherein the anti-interference switching threshold is not zero; When the absolute value of the difference is greater than the switching threshold, the target stage is determined according to its sign, and the target coefficient set is determined based on the target stage, wherein the target stage is either the filling stage or the discharging stage. If the absolute value of the difference is less than or equal to the switching threshold, it is determined that the pressure has not changed, and the set of coefficients already stored in the state storage space is selected as the target set of coefficients.
5. The method for controlling the state of a hydraulically actuated artificial muscle according to claim 1, characterized in that, The calculation of the muscle output force for the current simulation step based on the target coefficient set includes: Based on the target coefficient set, a muscle polynomial constitutive model calculation is performed to obtain a smooth and continuous muscle output force.
6. The method for controlling the state of a hydraulically actuated artificial muscle according to claim 1, characterized in that, The hydraulic artificial muscle state control method includes the following steps, prior to allocating and maintaining an independent state storage space for each hydraulic artificial muscle actuator in the simulation system: At the start of the simulation or when the driver is first activated, it is detected whether the state storage space is in an uninitialized state; If it is in an uninitialized state, the state storage space is initialized using the default set of fluid-filled polynomial coefficients.
7. The method for controlling the state of a hydraulically actuated artificial muscle according to claim 1, characterized in that, The state storage space is implemented through a global array, the length of which is the product of the number of muscle actuators in the simulation system and the number of polynomial coefficients that each actuator needs to store.
8. A hydraulic artificial muscle state control device, characterized in that, include: The state storage module is used to allocate and maintain an independent state storage space for each hydraulic artificial muscle actuator in the simulation system, and to persistently store the set of polynomial coefficients used in the force calculation of the last simulation step of the actuator. The state decision module is used to select the target coefficient set based on the comparison result between the current control command and the control command of the previous simulation step when calculating muscle force in each simulation step. The state update and calculation module is used to update the state storage space of the corresponding driver using the target coefficient set, and to calculate the muscle output force of the current simulation step based on the target coefficient set.
9. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the hydraulic artificial muscle state control method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the hydraulic artificial muscle state control method according to any one of claims 1 to 7.