Four-legged robot leg flexibility control method and system based on virtual model control

CN122884094APending Publication Date: 2026-10-09WUHAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611189682.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-06
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0002]四足机器人的动态平衡控制核心在于腿部足端力位协同调控与整机姿态扰动抑制,传统四足机器人控制方案多采用刚性位置控制、固定参数阻抗控制或经典虚拟模型控制,在结构化平整路面可实现基础行走功能,但在野外复杂工况下存在诸多技术缺陷,严重制约机器人的环境适应性与运动稳定性,传统控制方案存在如下不足:

Benefits of technology

1、本发明通过拉格朗日法建立单腿动力学通用方程,通过雅可比转置实现足端接触力到关节扭矩的解析映射,定义足端位置、速度和加速度三类误差向量,建立虚拟柔性控制力足端接触力的对应关系,以三维虚拟弹簧–阻尼–惯性模型为核心实现了无需复杂动力学求逆的低计算量柔性控制,结合地形刚度、阻尼实时辨识与虚拟参数自适应迭代,使四足机器人能够根据地面软硬程度和机身姿态误差自动调整腿部柔顺特性,在支撑相实现冲击缓冲与振动抑制,在摆动相保证轨迹跟踪精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122884094A_ABST
    Figure CN122884094A_ABST
Patent Text Reader

Abstract

The application discloses a kind of four-legged robot leg flexibility control method and system based on virtual model control, belong to four-legged robot motion control and dynamics simulation technical field, including the following steps: constructing the body rigid attitude dynamics model of four-legged robot, each support leg of four-legged robot is equivalent to three-dimensional space virtual spring-damping flexible system, by the control deviation of attitude balance, trajectory tracking is converted into virtual flexible control force, constructs the identification model of real-time terrain stiffness and terrain real-time damping coefficient, for obtaining terrain parameters;Based on the terrain parameters obtained by identification model, design adaptive iteration algorithm to the adaptive optimization of virtual flexible control force;Establish attitude balance PID correction control law to obtain attitude balance compensation control amount;Attitude balance compensation control amount, virtual flexible control force and dynamics inertia compensation force are synthesized, jointly constitute foot end Cartesian space control force, convert into the joint driving torque of each support leg.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of quadruped robot motion control and dynamics simulation technology, and particularly relates to a method and system for flexible control of the legs of a quadruped robot based on virtual model control. Background Technology

[0002] The core of dynamic balance control for quadruped robots lies in the coordinated regulation of force and position at the end of the legs and the suppression of overall posture disturbances. Traditional quadruped robot control schemes mostly employ rigid position control, fixed parameter impedance control, or classic virtual model control. While these can achieve basic walking functions on structured, flat surfaces, they suffer from numerous technical shortcomings in complex outdoor conditions, severely limiting the robot's environmental adaptability and motion stability. Traditional control schemes have the following deficiencies: Traditional pure position closed-loop rigid control achieves precise joint angle tracking by pre-setting leg motion trajectories and relying on PID controllers. This control method is simple in structure and has high trajectory tracking accuracy, but it completely ignores the interaction force feedback between the robot and the ground, and the legs lack flexible buffering characteristics. Under conditions of uneven surfaces, road impacts, and load fluctuations, the feet will generate huge contact impact loads, which can easily cause mechanical structure vibration, joint servo motor overload, overall tilting instability, and even leg jamming and overturning. It is completely unsuitable for unstructured complex terrain.

[0003] Fixed-parameter impedance control establishes an impedance mapping relationship between foot position and contact force, simulating the flexible characteristics of spring damping to achieve a basic contact cushioning effect. However, the impedance stiffness and damping coefficient of this scheme are fixed preset values, and the parameters cannot be dynamically adjusted according to terrain stiffness, movement speed, and support status. When the robot walks at high speed, crosses obstacles, or walks on soft surfaces, the fixed impedance parameters may exhibit insufficient flexibility, buffering lag, or excessive flexibility and insufficient support stiffness, leading to disordered robot gait, a significant decrease in balance accuracy, and extremely poor dynamic disturbance resistance.

[0004] Traditional fixed-parameter virtual model control (VMC) transforms the control requirements for overall robot posture balance and leg trajectory tracking into the force output of virtual components by introducing virtual springs and virtual damping components. These forces are then mapped to robot joint control torques via a Jacobian matrix. Compared to traditional control methods, this significantly simplifies the dynamics solution process and improves real-time performance. However, the core control parameters of existing virtual model control schemes—virtual stiffness, virtual damping, and virtual inertia—are fixed parameters calibrated offline, resulting in fundamental technical flaws. First, fixed parameters cannot adapt to dynamic conditions such as abrupt changes in terrain stiffness, changes in motion posture, and alternating support / swing phases, failing to achieve flexible adaptive adjustment. Second, the dynamic characteristics of the leg support and swing phases differ greatly; fixed virtual parameters lead to lag in swing phase trajectory tracking and insufficient buffering capacity in the support phase, resulting in gait imbalance. Third, the lack of a coordinated leg force-position balance constraint mechanism prevents the coordinated correction of overall robot posture disturbances and single-leg motion deviations, causing small disturbances to accumulate and ultimately leading to robot dynamic instability.

[0005] Existing technologies suffer from slow algorithm iteration speed and poor real-time performance, failing to meet the millisecond-level dynamic control requirements of quadruped robots. Furthermore, they lack a dedicated constraint model for leg flexibility and balance, hindering the coordinated control of foot contact force, leg pose, and overall robot posture. Additionally, existing solutions lack a comprehensive leg dynamics model and an adaptive iterative mathematical model for virtual parameters, resulting in low control precision and weak robustness, making it difficult to meet the stable motion requirements of quadruped robots under high-speed, complex terrain, and strong disturbances.

[0006] Therefore, it is necessary to provide a method and system for flexible control of the legs of a quadruped robot based on virtual model control. Through precise dynamic modeling, virtual flexible model construction, real-time terrain parameter identification, adaptive optimization of impedance parameters, and closed-loop correction of posture balance, the method can achieve flexible and stable motion and high-precision dynamic balance of the quadruped robot under all working conditions. Summary of the Invention

[0007] In view of this, the present invention proposes a method and system for the flexible control of the legs of a quadruped robot based on virtual model control. This system achieves coordinated body posture balance and foot compliance control by accurately modeling the single-leg Lagrangian dynamics, modeling the three-dimensional virtual spring damping system, identifying terrain parameters in real time, and iterating the coefficient matrix. It can also achieve flexible buffering and trajectory tracking of the legs that are adaptive to the terrain.

[0008] On one hand, the present invention provides a method for flexible control of the legs of a quadruped robot based on virtual model control, comprising the following steps: S1: Real-time acquisition of leg joint posture, foot contact force and quadruped robot body posture information, construction of quadruped robot body rigid body posture dynamics model, establishment of single-leg Lagrangian dynamics general equation, obtaining the mapping relationship between foot contact force and joint torque, and obtaining foot position error vector, velocity error vector and acceleration error vector; S2: Each supporting leg of the quadruped robot is equivalent to a three-dimensional virtual spring-damped flexible system. The basic equation of virtual flexible control force in Cartesian space is constructed. The foot position error vector, velocity error vector and acceleration error vector are transformed into virtual flexible control force, and the virtual flexible control force is used as a flexible substitute for the foot contact force. S3: Construct an identification model for real-time terrain stiffness and real-time terrain damping coefficient to obtain terrain parameters as the basis for environmental physical characteristics of the three-dimensional virtual spring-damped flexible system. S4: Based on the terrain parameters obtained from the identification model and combined with the body posture angle error of the quadruped robot, an adaptive iterative algorithm is designed to iterate the virtual stiffness and virtual damping parameters to achieve adaptive optimization of the coefficient matrix of the virtual flexible control force. S5: Establish a PID correction control law for attitude balance, take the horizontal balance of the quadruped robot's body as the control target, obtain the attitude balance compensation control quantity, and map the attitude balance compensation control quantity into the attitude balance compensation force. S6: The attitude balance compensation force, virtual flexible control force and dynamic inertia compensation force are combined to form the foot-end Cartesian space control force. The conversion of the foot-end Cartesian space control force to the joint drive torque of each supporting leg is realized through the leg Jacobian matrix. S7: Repeat steps S1-S6 above, iteratively updating terrain parameters, virtual stiffness and virtual damping parameters, and joint drive torque in each control cycle to continuously adapt to changes in terrain and the quadruped robot's motion state.

[0009] Based on the above technical solutions, preferably, step S1 involves the following steps: The quadruped robot has a rigid body and four symmetrically distributed single-leg structures. The single-leg structure of the quadruped robot adopts a three-degree-of-freedom series linkage form for the hip, knee, and ankle. The body's center-of-mass coordinate system and world coordinate system are defined, the body's attitude angle vector and body inertia tensor matrix are obtained, the body's attitude dynamic equation is established, and the resultant external torque vector generated by the foot contact force of the four legs on the body's center of mass is obtained. The generalized coordinate vector of the single leg, including the hip joint rotation angle, knee joint rotation angle, and ankle joint rotation angle, is defined. Based on the single-leg generalized coordinate vector, the leg joint driving torque vector, the leg Jacobian matrix, and the foot contact force, the generalized Lagrange dynamic equation of the single leg is established. The pose mapping from joint space to Cartesian space is realized through forward kinematics, and the single-leg foot position error vector, foot velocity error vector, and foot acceleration error vector are obtained.

[0010] Preferably, step S2 is as follows: the virtual flexible control force model in the one-dimensional direction is obtained by adding the product of the virtual equivalent stiffness coefficient and the position error vector to the virtual equivalent damping coefficient and the velocity error vector. Combining the three-dimensional motion characteristics of quadruped robots, the one-dimensional virtual flexible control force model is extended to three-dimensional Cartesian space and an inertial compensation term is added to obtain a three-dimensional Cartesian space virtual flexible control force model. It includes the single-leg foot position error vector, foot velocity error vector, and foot acceleration error vector, as well as the diagonal virtual stiffness matrix, diagonal virtual damping matrix, and diagonal virtual inertia matrix that correspond one-to-one with the three error vectors.

[0011] Preferably, step S3 involves causing the terrain to undergo compressive deformation. δ The difference between the initial contact elevation of the foot and the real-time elevation of the foot is used; a real-time terrain stiffness model is constructed, and the real-time terrain stiffness is... equal z Change in foot contact force in the axial direction With the rate of terrain compression deformation The ratio; construct a real-time terrain damping coefficient model, and the real-time terrain damping coefficient. equal z Change in foot contact force in the axial direction Changes in the rate of topographic deformation under pressure The ratio.

[0012] Preferably, step S4 involves combining the current time... k Real-time terrain stiffness Stiffness Iterative Learning Rate Current moment k The diagonal virtual stiffness matrix and the current time k The absolute value of the body posture angle error of the quadruped robot is used to establish a virtual stiffness adaptive iterative formula, and the next moment after the iteration is obtained. k +1 diagonal virtual stiffness matrix ; Combined with the current moment k Real-time damping coefficient of terrain Damped iterative learning rate Current moment k The diagonal virtual damping matrix and the current time k The absolute value of the rate of change of the body posture angle error of the quadruped robot is used to establish a virtual damping adaptive iterative formula to obtain the next moment. k +1 diagonal virtual damping matrix .

[0013] Preferably, to avoid iterative divergence, at the current time... k The diagonal virtual stiffness matrix and the current time k The diagonal virtual damping matrix satisfies upper and lower bound constraints; the stiffness iterative learning rate Damped iterative learning rate The range of values ​​for is (0, 1).

[0014] Preferably, step S5 involves making the fuselage attitude angle vector include the fuselage roll angle, pitch angle, and yaw angle, and making the desired fuselage attitude angle as follows: The real-time collected fuselage attitude angles are The attitude angle error between the expected attitude angle of the fuselage and the real-time acquired attitude angle. Based on the attitude angle error and the proportional, integral, and derivative coefficients, an attitude balance PID correction control law is established to output the attitude balance compensation control quantity. The attitude balance compensation control variables are combined to form a balance torque vector in the world coordinate system. Further balance torque vector Transformed into attitude balance compensation force in three-dimensional Cartesian space .

[0015] Preferably, the desired attitude angle of the fuselage The value of is 0.

[0016] Preferably, step S6 involves combining virtual flexible control force. Attitude balance compensation force and dynamic inertial compensation force Synthetic foot Cartesian space control force Dynamic inertial compensation force It is the center of mass of the quadruped robot. Three-dimensional acceleration of the fuselage center of mass in the world coordinate system The three-dimensional acceleration of the fuselage's center of mass in the world coordinate system obtained by multiplication. It is the location of the fuselage's center of gravity. Obtained by taking the second derivative; the transformation from Cartesian space force to leg joint driving torque vector is achieved through the leg Jacobian matrix; the leg joint driving torque vector at the current moment. Also combined with the first i The changes in the Jacobian matrix of the leg, the iteration step size, and the Cartesian space control force of the foot. Iterate and update to obtain the time. k +1 leg joint drive torque vector.

[0017] On the other hand, the present invention also provides a quadruped robot leg flexibility control system based on virtual model control, for implementing the above method, comprising: The dynamic model building unit is used to construct the rigid body posture dynamic model of the quadruped robot and the general Lagrangian dynamic equation for a single leg, obtain the mapping relationship between the foot contact force and the joint torque, and obtain the foot position error vector, velocity error vector and acceleration error vector. A single-leg Cartesian space virtual flexible control force modeling unit is used to transform the foot position error vector, velocity error vector and acceleration error vector into virtual flexible control force, construct the basic equation of Cartesian space virtual flexible control force, and use the virtual flexible control force as a flexible substitute for the foot contact force. The terrain parameter identification unit acquires the parameters of the terrain where the quadruped robot is located, constructs a real-time terrain stiffness model and a real-time terrain damping coefficient model, and obtains the real-time terrain stiffness and real-time terrain damping coefficient. By designing an adaptive iterative algorithm, the virtual stiffness and virtual damping parameters are iteratively optimized to adaptively iteratively optimize the coefficient matrix of the basic equation of the virtual flexible control force in Cartesian space. The attitude balance compensation force acquisition unit establishes an attitude balance PID correction control law, takes the horizontal balance of the quadruped robot's body as the control target, obtains the attitude balance compensation control quantity, and maps the attitude balance compensation control quantity into attitude balance compensation force. The foot-end Cartesian space control force synthesis unit synthesizes the virtual flexible control force obtained from the single-leg Cartesian space virtual flexible control force modeling unit, the attitude balance compensation force obtained from the attitude balance compensation force acquisition unit, and the dynamic inertia compensation force to obtain the foot-end Cartesian space control force, which is then converted into the joint drive torque of each supporting leg through the leg Jacobian matrix. The closed-loop optimization unit collects information on leg joint posture, foot contact force, and quadruped robot body posture in real time, iteratively updates terrain parameters, virtual stiffness and virtual damping parameters, and joint drive torque, and performs closed-loop optimization in each control cycle.

[0018] The method and system for flexible control of the legs of a quadruped robot based on virtual model control provided by this invention have the following advantages compared with the prior art: 1. This invention establishes a general equation for single-leg dynamics using the Lagrange method, achieves analytical mapping from foot contact force to joint torque through Jacobi transpose, defines three types of error vectors—foot position, velocity, and acceleration—and establishes the correspondence between virtual flexible control force and foot contact force. Using a three-dimensional virtual spring-damping-inertia model as the core, it achieves low-computational-volume flexible control without complex dynamic inversion. Combined with real-time identification of terrain stiffness and damping, and adaptive iteration of virtual parameters, the quadruped robot can automatically adjust its leg compliance characteristics according to the ground hardness and body posture error, achieving impact buffering and vibration suppression in the support phase and ensuring trajectory tracking accuracy in the swing phase.

[0019] 2. Based on the generalized coordinate vector of a single leg, the driving torque vector of the leg joint, the Jacobian matrix of the leg, and the obtained foot contact force, a general Lagrange dynamic equation for a single leg is established. It explicitly includes the leg inertia matrix, the Coriolis force / centrifugal force matrix, and the gravity term. Compared with the piecewise approximation of the Newton-Euler method, it fully describes the dynamic coupling relationship between the joint space and the Cartesian space.

[0020] 2. The supporting leg is equivalent to a three-dimensional virtual spring-damped-inertial system. A virtual inertial matrix is ​​introduced, and the driving force of traditional rigid position control is replaced by virtual control force. This makes the foot exhibit compliant characteristics similar to biological muscles, which significantly reduces ground impact and fuselage vibration. The virtual control force is directly calculated from the position, velocity, and acceleration errors through stiffness, damping, and inertial matrix, avoiding the huge overhead of solving high-dimensional nonlinear dynamic inverse problems in real time and meeting the real-time requirement of 1ms control cycle.

[0021] 3. A real-time terrain identification model is introduced, which can accurately identify different terrain stiffness and damping characteristics. The control parameters are dynamically optimized through an adaptive iterative algorithm, which is suitable for all working conditions and has strong versatility. The upper and lower limits of virtual stiffness and virtual damping are set to prevent instability during the iteration process, and the range of the iteration learning rate is limited to ensure monotonic convergence of the iteration process.

[0022] 4. A PID correction channel is established based on roll angle, pitch angle and yaw angle. Incremental PID control is adopted. Each output is the increment of the control quantity rather than the absolute value, which effectively suppresses the integral saturation phenomenon. The output attitude balance compensation control quantity combination is the balance torque vector in the fuselage coordinate system and mapped to the foot Cartesian space compensation force, which provides the basis for subsequent synthesis of foot Cartesian space control force.

[0023] 5. After obtaining the Cartesian space control force of the foot, it is mapped to the driving torque of each joint based on the Jacobian matrix of the leg. The mapping relationship is matched with the current configuration of the robot in real time. By introducing the control iteration step size, the torque jump caused by sudden terrain changes, phase switching and other reasons is effectively suppressed, and the continuity of motion is improved. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the 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.

[0025] Figure 1 This is a flowchart of the method and system for the flexible control of the legs of a quadruped robot based on virtual model control, as described in this invention. Figure 2 This is a schematic diagram of the overall coordinate system of the quadruped robot leg flexibility control method and system based on virtual model control according to the present invention; Figure 3 This is a schematic diagram of single-leg virtual model control of the quadruped robot leg flexibility control method and system based on virtual model control according to the present invention. Detailed Implementation

[0026] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0027] Existing technologies suffer from slow algorithm iteration speed and poor real-time performance, failing to meet the millisecond-level dynamic control requirements of quadruped robots. Furthermore, they lack a dedicated constraint model for leg flexibility and balance, hindering the coordinated control of foot contact force, leg pose, and overall robot posture. Additionally, existing solutions lack a comprehensive leg dynamics model and an adaptive iterative mathematical model for virtual parameters, resulting in low control precision and weak robustness, making it difficult to meet the stable motion requirements of quadruped robots under high-speed, complex terrain, and strong disturbances.

[0028] In view of this, such as Figure 1 Combination Figure 2 As shown, on one hand, the present invention provides a method for flexible control of the legs of a quadruped robot based on virtual model control, comprising the following steps: S1: Real-time acquisition of leg joint posture, foot contact force, and quadruped robot body posture information; construction of quadruped robot body rigid body posture dynamics model; establishment of general Lagrangian dynamics equation for single leg; obtaining the mapping relationship between foot contact force and joint torque; and obtaining foot position error vector, velocity error vector, and acceleration error vector.

[0029] The specific content is as follows, such as Figure 2As shown, the quadruped robot has a rigid body and four symmetrically distributed single legs. The single-leg structure of the quadruped robot adopts a three-degree-of-freedom (DOF) series linkage for the hip, knee, and ankle. The quadruped robot's body centroid coordinate system B-xyz and world coordinate system O-xyz are defined, and the leg coordinate system is refined as follows: The length and mass of each joint are respectively and The joint rotation angle is , These correspond to the hip, knee, and ankle joints, respectively. Obtain the fuselage attitude angle vector. and fuselage inertia tensor matrix Establish the fuselage attitude dynamics equations:

[0030] , formula 1; Let be the vector of the net external torque generated by the contact forces at the ends of the four legs about the center of mass of the fuselage. The number of origins above the parameter represents the order of the derivative. The net external torque is obtained by mapping the contact forces at the ends of each leg. i The position vector of the foot of the leg is , i =1, 2, 3, 4 represent the sequence numbers of the four legs, with superscripts. T For matrix transpose, These are the world coordinates of the point where the leg contacts the ground, and the force vector at the foot is... , For the foot contact force in the world coordinate system x , y , z The components of the shaft, the torque output of a single leg is Resultant external torque vector for Define a single-leg generalized coordinate vector. , Let the hip joint rotation angle, knee joint rotation angle, and ankle joint rotation angle be represented respectively. Establish the general equation of single-leg Lagrange dynamics: , formula 2; in For the leg inertia matrix, The matrix represents the Coriolis force and the centrifugal force. The vector of the gravity term. For joint friction torque, This is the driving torque vector for the leg joint. For the Jacobian matrix of the legs. The contact force at the foot tip; pose mapping from joint space to Cartesian space is achieved through forward kinematics, and the desired position of the foot tip on a single leg is... The actual position of the foot on one leg is The foot position error vector is The expected velocity at the foot of a single leg is The actual speed of the single-leg foot is The foot velocity error vector is The expected acceleration at the foot of a single leg is The actual acceleration of the foot on a single leg is The foot acceleration error vector is The Jacobian matrix realizes the mapping relationship between joint velocity and foot velocity as follows: The force mapping relationship between joint torque and foot contact force is as follows: .

[0031] S2: Each leg of the quadruped robot is equivalent to a three-dimensional virtual spring-damped flexible system. A fundamental equation for virtual flexible control force in Cartesian space is constructed. The foot position error vector, velocity error vector, and acceleration error vector are transformed into virtual flexible control force, which is then used as a flexible substitute for the foot contact force. A schematic diagram of single-leg control is shown below. Figure 3 As shown. The oscillating phase can be viewed as the hip joint being fixed and the foot oscillating, with a flexible force applied to the foot; the supporting phase can be viewed as the foot being fixed and the hip joint moving, with a flexible force applied to the hip joint; the gravity of a single joint link. The direction is always vertically downward, and the weight of one leg is... .

[0032] This invention abandons traditional rigid position control and treats each supporting leg of the robot as an equivalent three-dimensional virtual spring-damped flexible system. By adjusting the virtual stiffness and damping parameters, the leg achieves flexible adaptation, and the virtual model outputs flexible contact force to replace the traditional rigid driving force.

[0033] Specifically, the virtual flexible control force model in the one-dimensional direction is obtained by adding the product of the virtual equivalent stiffness coefficient and the position error vector, to the product of the virtual equivalent damping coefficient and the velocity error vector. , formula 3; This is the virtual equivalent stiffness coefficient. This is the virtual equivalent damping coefficient. Virtual flexible contact force; Based on the three-dimensional motion characteristics of quadruped robots, the one-dimensional virtual flexible control force model is extended to three-dimensional Cartesian space and an inertial compensation term is added to obtain the virtual flexible control force model in three-dimensional Cartesian space: , formula 4; For virtual flexible control force, The diagonal virtual stiffness matrix, For diagonal virtual damping matrix, For diagonal virtual inertia matrix, For inertia compensation, a one-dimensional virtual equivalent stiffness coefficient The corresponding three-dimensional diagonal virtual stiffness matrix The components of each independent risk on the diagonal, and the one-dimensional virtual equivalent damping coefficient. Corresponding three-dimensional diagonal virtual damping matrix The components in each independent direction along the diagonal, a one-dimensional virtual flexible contact force. Corresponding to three-dimensional virtual flexible control force Projected components on a single coordinate axis.

[0034] By combining the robot's three-dimensional motion characteristics, a virtual spring-damping-inertia coupling model is constructed in the Cartesian space of the robot's legs. This model transforms the control deviations in attitude balance and trajectory tracking into virtual control forces, achieving flexible control without the need for complex dynamic inversion. The core of the basic virtual model consists of virtual stiffness, virtual damping, and virtual inertial components, corresponding to position deviation correction, velocity deviation suppression, and dynamic inertial compensation, respectively.

[0035] S3: Construct an identification model for real-time terrain stiffness and real-time terrain damping coefficient to obtain terrain parameters as the basis for environmental physical characteristics of the three-dimensional virtual spring-damped flexible system.

[0036] To achieve flexible parameter adaptive control, terrain physical characteristics are identified in real time based on foot contact force and deformation, and terrain parameter identification formulas are constructed.

[0037] Specifically, it involves causing the terrain to undergo compression deformation. δ Initial contact elevation of the foot z 0 and real-time foot elevation z foot Difference: , formula 5; Construct a real-time terrain stiffness model; real-time terrain stiffness equal z Change in foot contact force in the axial direction With the rate of terrain compression deformation The ratio: , Formula 6; Construct a real-time terrain damping coefficient model; real-time terrain damping coefficient equal z Change in foot contact force in the axial direction Changes in the rate of topographic deformation under pressure The ratio: , Formula 7.

[0038] S4: Based on the terrain parameters obtained from the identification model and combined with the body posture angle error of the quadruped robot, an adaptive iterative algorithm is designed to iterate the virtual stiffness and virtual damping parameters to achieve adaptive optimization of the coefficient matrix of the virtual flexible control force.

[0039] Based on the identified terrain parameters and body attitude errors, an adaptive iterative algorithm is designed to optimize virtual stiffness and damping parameters in real time, achieving optimal flexible adaptation control and avoiding adaptation failure caused by parameter fixation.

[0040] The specific content is as follows, in conjunction with the current moment k Real-time terrain stiffness Stiffness Iterative Learning Rate Current moment k diagonal virtual stiffness matrix and the current moment k The body posture angle error of the quadruped robot The absolute value of the virtual stiffness is used to establish an adaptive iterative formula to obtain the next time step after the iteration. k +1 diagonal virtual stiffness matrix : , formula 8; Combined with the current moment k Real-time damping coefficient of terrain Damped iterative learning rate Current moment k diagonal virtual damping matrix and the current moment k Rate of change of body posture angle error of the quadruped robot The absolute value of the value is used to establish a virtual damping adaptive iterative formula to obtain the next time step. k +1 diagonal virtual damping matrix : , Formula 9.

[0041] To avoid iterative divergence, at the current time k diagonal virtual stiffness matrix and the current moment k diagonal virtual damping matrix Satisfy upper and lower limit constraints: , formula 10; These represent the lower and upper limits of the virtual stiffness, with values ​​of 100 N / m and 1000 N / m, respectively. The lower and upper limits of the virtual damping are 5 N·s / m and 50 N·s / m, respectively; the stiffness iteration learning rate... Damped iterative learning rate The value range is (0, 1). As a preferred implementation, the stiffness iterative learning rate... The preferred value is 0.2-0.5, and the damping iterative learning rate is... The optimal value is 0.3-0.6. A limiting constraint ensures that the virtual parameter remains within the effective control range, balancing flexibility and stability.

[0042] S5: Establish a PID correction control law for attitude balance, take the horizontal balance of the quadruped robot's body as the control target, obtain the attitude balance compensation control quantity, and map the attitude balance compensation control quantity into the attitude balance compensation force.

[0043] Specifically, the content is to set the fuselage attitude angle vector. ,in Let the roll angle, pitch angle, and yaw angle of the fuselage be respectively, and let the desired fuselage attitude angle be... The real-time collected fuselage attitude angles are Calculate the attitude angle error: , Formula 11; Establish a PID control law for attitude balance correction: , Formula 12; in For proportional, integral, and differential coefficients, This represents the increment of the attitude error at the current moment. This represents the increment of the attitude error from the previous moment. The attitude balance compensation control variables are combined to form the balance torque vector in the world coordinate system. , balance torque vector Transformed into attitude balance compensation force in three-dimensional Cartesian space .

[0044] In one embodiment, the desired attitude angle of the fuselage The value of is 0.

[0045] S6: The attitude balance compensation force, virtual flexible control force and dynamic inertia compensation force are combined to form the foot-end Cartesian space control force. The conversion of the foot-end Cartesian space control force to the joint drive torque of each supporting leg is realized through the leg Jacobian matrix.

[0046] Specifically, it involves combining virtual flexible control force. Attitude balance compensation force and dynamic inertial compensation force Synthetic foot Cartesian space control force : , Formula 13; Dynamic inertial compensation force It is the center of mass of the quadruped robot. Three-dimensional acceleration of the fuselage center of mass in the world coordinate system The product obtained by multiplication The three-dimensional acceleration of the fuselage's center of mass in the world coordinate system It is the location of the fuselage's center of gravity. Obtained by taking the second derivative; the transformation from Cartesian space force to leg joint driving torque vector is achieved through the leg Jacobian matrix: , Formula 14; It is the first i The Jacobian matrix of each leg is used to implement the dynamic mapping between joint space and Cartesian space; the current moment's leg joint driving torque vector. Combined with the i Jacobian matrix of a single-legged leg Iteration step size and the change in the Cartesian spatial control force of the foot Perform iterations: , Formula 15; For a moment k The leg joint drive torque vector is +1. The iteration step size is preferably 0.8-1.2. By controlling the iteration step size, the torque output is ensured to be smooth without abrupt changes.

[0047] S7: Repeat steps S1-S6 above, iteratively updating terrain parameters, virtual stiffness and virtual damping parameters, and joint drive torque in each control cycle to continuously adapt to changes in terrain and the quadruped robot's motion state.

[0048] On the other hand, the present invention also provides a quadruped robot leg flexibility control system based on virtual model control, for implementing the above method, comprising: The dynamic model building unit is used to construct the rigid body posture dynamic model of the quadruped robot and the general Lagrangian dynamic equation for a single leg, obtain the mapping relationship between the foot contact force and the joint torque, and obtain the foot position error vector, velocity error vector and acceleration error vector. A single-leg Cartesian space virtual flexible control force modeling unit is used to transform the foot position error vector, velocity error vector and acceleration error vector into virtual flexible control force, construct the basic equation of Cartesian space virtual flexible control force, and use the virtual flexible control force as a flexible substitute for the foot contact force. The terrain parameter identification unit acquires the parameters of the terrain where the quadruped robot is located, constructs a real-time terrain stiffness model and a real-time terrain damping coefficient model, and obtains the real-time terrain stiffness and real-time terrain damping coefficient. By designing an adaptive iterative algorithm, the virtual stiffness and virtual damping parameters are iteratively optimized to adaptively iteratively optimize the coefficient matrix of the basic equation of the virtual flexible control force in Cartesian space. The attitude balance compensation force acquisition unit establishes an attitude balance PID correction control law, takes the horizontal balance of the quadruped robot's body as the control target, obtains the attitude balance compensation control quantity, and maps the attitude balance compensation control quantity into attitude balance compensation force. The foot-end Cartesian space control force synthesis unit synthesizes the virtual flexible control force obtained from the single-leg Cartesian space virtual flexible control force modeling unit, the attitude balance compensation force obtained from the attitude balance compensation force acquisition unit, and the dynamic inertia compensation force to obtain the foot-end Cartesian space control force, which is then converted into the joint drive torque of each supporting leg through the leg Jacobian matrix. The closed-loop optimization unit collects information on leg joint posture, foot contact force, and quadruped robot body posture in real time, iteratively updates terrain parameters, virtual stiffness and virtual damping parameters, and joint drive torque, and performs closed-loop optimization in each control cycle.

[0049] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for flexible control of the legs of a quadruped robot based on virtual model control, characterized in that, Includes the following steps: S1: Real-time acquisition of leg joint posture, foot contact force and quadruped robot body posture information, construction of quadruped robot body rigid body posture dynamics model, establishment of single-leg Lagrangian dynamics general equation, obtaining the mapping relationship between foot contact force and joint torque, and obtaining foot position error vector, velocity error vector and acceleration error vector; S2: Each supporting leg of the quadruped robot is equivalent to a three-dimensional virtual spring-damped flexible system. The basic equation of virtual flexible control force in Cartesian space is constructed. The foot position error vector, velocity error vector and acceleration error vector are transformed into virtual flexible control force, and the virtual flexible control force is used as a flexible substitute for the foot contact force. S3: Construct an identification model for real-time terrain stiffness and real-time terrain damping coefficient to obtain terrain parameters as the basis for environmental physical characteristics of the three-dimensional virtual spring-damped flexible system. S4: Based on the terrain parameters obtained from the identification model and combined with the body posture angle error of the quadruped robot, an adaptive iterative algorithm is designed to iterate the virtual stiffness and virtual damping parameters to achieve adaptive optimization of the coefficient matrix of the virtual flexible control force. S5: Establish a PID correction control law for attitude balance, take the horizontal balance of the quadruped robot's body as the control target, obtain the attitude balance compensation control quantity, and map the attitude balance compensation control quantity into the attitude balance compensation force. S6: The attitude balance compensation force, virtual flexible control force and dynamic inertia compensation force are combined to form the foot-end Cartesian space control force. The conversion of the foot-end Cartesian space control force to the joint drive torque of each supporting leg is realized through the leg Jacobian matrix. S7: Repeat steps S1-S6 above, iteratively updating terrain parameters, virtual stiffness and virtual damping parameters, and joint drive torque in each control cycle to continuously adapt to changes in terrain and the quadruped robot's motion state.

2. The method for flexible control of the legs of a quadruped robot based on virtual model control according to claim 1, characterized in that, Step S1 involves defining a quadruped robot with a rigid body and four symmetrically distributed single legs. Each leg of the quadruped robot uses a series linkage with three degrees of freedom (hip, knee, and ankle). The robot's body center-of-mass coordinate system and world coordinate system are defined. The body attitude angle vector and body inertia tensor matrix are obtained, and the body attitude dynamics equation is established. The net external torque vector generated by the foot contact forces of the four legs on the body center-of-mass is obtained. A generalized coordinate vector for each leg, including hip, knee, and ankle joint rotation angles, is defined. Based on the generalized coordinate vector, leg joint driving torque vector, leg Jacobian matrix, and foot contact forces, a generalized Lagrangian dynamics equation for each leg is established. The pose mapping from joint space to Cartesian space is achieved through forward kinematics, yielding the foot position error vector, foot velocity error vector, and foot acceleration error vector for each leg.

3. The method for flexible control of the legs of a quadruped robot based on virtual model control according to claim 2, characterized in that, Step S2 is as follows: The virtual flexible control force model in the one-dimensional direction is obtained by adding the product of the virtual equivalent stiffness coefficient and the position error vector to the virtual equivalent damping coefficient and the velocity error vector. Combining the three-dimensional motion characteristics of quadruped robots, the one-dimensional virtual flexible control force model is extended to three-dimensional Cartesian space and an inertial compensation term is added to obtain a three-dimensional Cartesian space virtual flexible control force model. It includes the single-leg foot position error vector, foot velocity error vector, and foot acceleration error vector, as well as the diagonal virtual stiffness matrix, diagonal virtual damping matrix, and diagonal virtual inertia matrix that correspond one-to-one with the three error vectors.

4. The method for flexible control of the legs of a quadruped robot based on virtual model control according to claim 3, characterized in that, Step S3 involves causing the terrain to undergo compressive deformation. δ The difference between the initial contact elevation of the foot and the real-time elevation of the foot is used; a real-time terrain stiffness model is constructed, and the real-time terrain stiffness is... equal z Change in foot contact force in the axial direction With the rate of terrain compression deformation The ratio; construct a real-time terrain damping coefficient model, and the real-time terrain damping coefficient. equal z Change in foot contact force in the axial direction Changes in the rate of topographic deformation under pressure The ratio.

5. The method for flexible control of the legs of a quadruped robot based on virtual model control according to claim 4, characterized in that, Step S4 involves combining the current time... k Real-time terrain stiffness Stiffness Iterative Learning Rate Current moment k The diagonal virtual stiffness matrix and the current time k The absolute value of the body posture angle error of the quadruped robot is used to establish a virtual stiffness adaptive iterative formula, and the next moment after the iteration is obtained. k +1 diagonal virtual stiffness matrix ; Combined with the current moment k Real-time damping coefficient of terrain Damped iterative learning rate Current moment k The diagonal virtual damping matrix and the current time k The absolute value of the rate of change of the body posture angle error of the quadruped robot is used to establish a virtual damping adaptive iterative formula to obtain the next moment. k +1 diagonal virtual damping matrix .

6. The method for flexible control of the legs of a quadruped robot based on virtual model control according to claim 5, characterized in that, To avoid iterative divergence, at the current time k The diagonal virtual stiffness matrix and the current time k The diagonal virtual damping matrix satisfies upper and lower bound constraints; the stiffness iterative learning rate Damped iterative learning rate The range of values ​​for is (0, 1).

7. The method for flexible control of the legs of a quadruped robot based on virtual model control according to claim 5, characterized in that, Step S5 involves defining the fuselage attitude angle vector as including the fuselage roll angle, pitch angle, and yaw angle, and setting the desired fuselage attitude angle as follows: The real-time collected fuselage attitude angles are The attitude angle error between the expected attitude angle of the fuselage and the real-time acquired attitude angle. Based on the attitude angle error and the proportional, integral, and derivative coefficients, an attitude balance PID correction control law is established to output the attitude balance compensation control quantity. The attitude balance compensation control variables are combined to form a balance torque vector in the world coordinate system. Further balance torque vector Transformed into attitude balance compensation force in three-dimensional Cartesian space .

8. The method for flexible control of the legs of a quadruped robot based on virtual model control according to claim 7, characterized in that, Desired attitude angle of fuselage The value of is 0.

9. The method for flexible control of the legs of a quadruped robot based on virtual model control according to claim 7, characterized in that, Step S6 involves combining virtual flexible control force. Attitude balance compensation force and dynamic inertial compensation force Synthetic foot Cartesian space control force Dynamic inertial compensation force It is the center of mass of the quadruped robot. Three-dimensional acceleration of the fuselage center of mass in the world coordinate system The three-dimensional acceleration of the fuselage's center of mass in the world coordinate system obtained by multiplication. It is the location of the fuselage's center of gravity. Obtained by taking the second derivative; the transformation from Cartesian space force to leg joint driving torque vector is achieved through the leg Jacobian matrix; Current leg joint drive torque vector Also combined with the first i The changes in the Jacobian matrix of the leg, the iteration step size, and the Cartesian space control force of the foot. Iterate and update to obtain the time. k +1 leg joint drive torque vector.

10. A flexible control system for the legs of a quadruped robot based on virtual model control, used to implement the method described in any one of claims 1-9, characterized in that, include: The dynamic model building unit is used to construct the rigid body posture dynamic model of the quadruped robot and the general Lagrangian dynamic equation for a single leg, obtain the mapping relationship between the foot contact force and the joint torque, and obtain the foot position error vector, velocity error vector and acceleration error vector. A single-leg Cartesian space virtual flexible control force modeling unit is used to transform the foot position error vector, velocity error vector and acceleration error vector into virtual flexible control force, construct the basic equation of Cartesian space virtual flexible control force, and use the virtual flexible control force as a flexible substitute for the foot contact force. The terrain parameter identification unit obtains the parameters of the terrain where the quadruped robot is located, constructs a real-time terrain stiffness model and a real-time terrain damping coefficient model, and obtains the real-time terrain stiffness and real-time terrain damping coefficient. By designing an adaptive iterative algorithm, the coefficient matrix of the fundamental equation of virtual flexible control force in Cartesian space is adaptively iteratively optimized by iterating virtual stiffness and virtual damping parameters. The attitude balance compensation force acquisition unit establishes an attitude balance PID correction control law, takes the horizontal balance of the quadruped robot's body as the control target, obtains the attitude balance compensation control quantity, and maps the attitude balance compensation control quantity into attitude balance compensation force. The foot-end Cartesian space control force synthesis unit synthesizes the virtual flexible control force obtained from the single-leg Cartesian space virtual flexible control force modeling unit, the attitude balance compensation force obtained from the attitude balance compensation force acquisition unit, and the dynamic inertia compensation force to obtain the foot-end Cartesian space control force, which is then converted into the joint drive torque of each supporting leg through the leg Jacobian matrix. The closed-loop optimization unit collects information on leg joint posture, foot contact force, and quadruped robot body posture in real time, iteratively updates terrain parameters, virtual stiffness and virtual damping parameters, and joint drive torque, and performs closed-loop optimization in each control cycle.