A robust gait control method for quadruped robots applicable to various terrains
By introducing model predictive control with terrain-adaptive Lyapunov stability constraints into a quadruped robot, the problem of insufficient stability under complex terrain is solved, and the quadruped robot achieves stable walking and improved robustness under complex terrain.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG UNIV OF TECH
- Filing Date
- 2026-03-30
- Publication Date
- 2026-06-30
AI Technical Summary
Existing quadruped robots struggle to dynamically adjust stability parameters based on changes in terrain risk when walking in complex terrain, resulting in insufficient stability. Furthermore, they lack an adaptive adjustment mechanism that integrates with terrain features, making it difficult to maintain stable walking under disturbance and uncertainty conditions.
By introducing a model predictive control method with terrain-adaptive Lyapunov stability constraints, and combining terrain features to generate fuselage attitude and altitude references, an MPC optimization model with terrain-adaptive Lyapunov stability constraints is constructed. The control strategy is dynamically adjusted to suppress attitude oscillations and state divergence.
In complex terrain environments, quadruped robots can maintain stable walking, improving the system's engineering applicability and environmental robustness, and significantly enhancing stability and disturbance resistance under disturbance and uncertainty conditions.
Smart Images

Figure CN121934612B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of quadruped robot motion control and intelligent control technology, specifically relating to a robust gait control method for quadruped robots applicable to various terrains. Background Technology
[0002] As the application of quadruped robots in scenarios such as inspection, security, disaster relief, and outdoor operations continues to expand, their ability to achieve stable and reliable walking in unstructured environments such as slopes, gravel roads, and undulating terrain has become a key factor affecting task completion rate and system safety. Compared to structured environments such as flat indoor ground, natural and complex terrain usually has characteristics such as significant slope changes, uneven support surfaces, large height differences at contact points, uneven friction conditions, and strong and uncertain external disturbances. This leads to problems such as body posture oscillation, foot slippage, deterioration of contact force distribution, gait disorder, and even tipping over during quadruped robot walking, which seriously restricts their continuous operation capability and engineering applicability in complex environments.
[0003] Currently, quadruped robots often employ a walking control framework based on Model Predictive Control (MPC). This framework achieves stable motion by predictively optimizing the center-of-mass dynamics or single-rigid-body models, combined with contact force constraints and gait timing. However, existing technologies still have significant limitations in complex terrain applications, mainly in the following aspects:
[0004] 1. Fixed constraints or fixed convergence parameters lead to rigid stability adjustment: Existing MPC-based methods often use fixed constraint parameters or fixed convergence rates for constraint settings and stability adjustment, lacking the ability to dynamically adjust according to changes in terrain risk. When the robot transitions from flat ground to slopes, gravel roads, or rugged terrain, contact uncertainty and disturbances increase significantly. If fixed parameter configurations are still used, it is easy to become overly conservative in low-risk terrain, resulting in decreased control performance; or, in high-risk terrain, insufficient constraints may lead to state divergence or oscillation, making it difficult to achieve a balance between stability and sensitivity.
[0005] 2. Some stability enhancement methods only focus on the control structure level and lack adaptive adjustment mechanisms that integrate with terrain features: Some existing stability enhancement strategies introduce stability-related constraints or correction terms, but their adjustment logic is often decoupled from actual terrain conditions. They fail to adaptively adjust the strength of stability constraints using terrain features such as slope, roll changes, pitch changes, foot height difference, and roughness. Such methods often fail to promptly enhance convergence constraints to suppress attitude oscillations when there are abrupt changes in terrain or multiple adverse factors. Furthermore, they may introduce unnecessary conservatism when the terrain is relatively flat, affecting gait smoothness and movement efficiency.
[0006] 3. In complex terrain, perception is highly dependent or lacks robustness, making it difficult to guarantee the engineering applicability of stable walking: Some terrain adaptive control methods rely on external environmental sensors such as depth cameras and lidar to obtain high-precision terrain information, but they are prone to performance degradation or failure under conditions such as low light, rain, snow, and dust obstruction, and the system cost and engineering integration complexity are high. At the same time, the foot contact state changes frequently under complex terrain, and there are local abnormal contacts and estimation noise. If there is no adaptive mechanism for terrain reliability and risk level, the control system is difficult to maintain stable convergence under disturbance and uncertainty conditions.
[0007] In summary, the core challenge of existing technologies in walking control in complex terrain lies in how to extract terrain features using available foot contact and inertial measurement unit (IMU) information without relying on high-cost external environmental sensors, and further achieve adaptive adjustment of stability constraint parameters according to terrain risk. This would ensure that the system state converges towards a safe and stable region and improve walking stability and anti-disturbance capability even under complex terrain disturbances and increased contact uncertainty. Summary of the Invention
[0008] The purpose of this invention is to provide a robust gait control method for quadruped robots applicable to various terrains, enabling quadruped robots to walk stably in complex terrain environments and significantly improving the system's engineering applicability and environmental robustness.
[0009] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0010] A robust gait control method for quadruped robots applicable to various terrains includes the following steps:
[0011] Obtain the body state information and foot state information of the quadruped robot in the current cycle;
[0012] The supporting foot of the quadruped robot in the current cycle is determined based on the foot end state information. The terrain where the quadruped robot is located in the current cycle is estimated by combining the body state information of the current cycle, and the slope and height features of the terrain are extracted.
[0013] Based on the slope and height characteristics of the terrain, generate fuselage attitude reference and fuselage height reference adapted to the terrain in the current cycle;
[0014] Based on fuselage attitude reference and fuselage altitude reference, a model predictive control optimization model with terrain-adaptive Lyapunov stability constraints is constructed.
[0015] Solve the model predictive control optimization model to obtain the optimal foot contact force sequence in the prediction time domain, and select the first step in the optimal foot contact force sequence as the gait control command of the quadruped robot in the current cycle.
[0016] Several alternative methods are provided below, but they are not intended as additional limitations on the overall solution above. They are merely further additions or optimizations. Provided there are no technical or logical contradictions, each alternative method can be combined individually with respect to the overall solution above, or multiple alternative methods can be combined with each other.
[0017] Preferably, the step of estimating the terrain where the quadruped robot is located in the current cycle by combining the body state information of the current cycle, and extracting the slope and height features of the terrain, includes:
[0018] The least squares method is used to fit the local terrain plane of the support foot endpoint set to establish a terrain plane model.
[0019] The slope characteristics are calculated based on the parameters of the terrain plane model, and the slope characteristics include pitch slope and roll slope.
[0020] The height characteristics are calculated based on the spatial positions of all supporting feet in the world coordinate system. The height characteristics include average height, maximum height difference, and roughness.
[0021] Preferably, the step of generating fuselage attitude reference and fuselage altitude reference adapted to the terrain in the current cycle based on the slope and height characteristics of the terrain includes:
[0022] Based on the slope characteristics of the terrain, initial reference values for the fuselage attitude are constructed;
[0023] The initial reference value of the fuselage attitude is low-pass filtered to obtain the smoothed reference value of the fuselage attitude.
[0024] Using the terrain estimation confidence coefficient, the smoothed fuselage attitude reference value and the fuselage attitude in the current period's fuselage state information are weighted and fused to obtain the final fuselage attitude reference.
[0025] The average height in the height feature is superimposed with the expected fuselage ground clearance to serve as the fuselage height reference.
[0026] Preferably, the model predictive control optimization model, constructed based on fuselage attitude reference and fuselage altitude reference and with terrain-adaptive Lyapunov stability constraints, includes:
[0027] Construct a dynamic model of the quadruped robot;
[0028] Based on the fuselage attitude reference and fuselage altitude reference, the expected state vector for the current cycle is obtained, and the cost function of the model predictive control optimization model is constructed.
[0029] Based on the slope and height characteristics of the terrain where the quadruped robot is located in the current cycle, the terrain risk index is calculated, and the convergence rate parameter of the Lyapunov stability constraint is nonlinearly adaptively scheduled.
[0030] Calculate the error of the prediction step state vector and construct the Lyapunov function. Based on the Lyapunov functions of adjacent prediction steps and the convergence rate parameters after nonlinear adaptive scheduling, construct Lyapunov stability constraints.
[0031] Preferably, the calculation of terrain risk indicators based on the slope and height characteristics of the terrain where the quadruped robot is currently located includes:
[0032] The slope and height characteristics of the current cycle are normalized, and a corresponding weighting coefficient is added to each physical quantity. The physical quantity with the largest normalized value after weighting by the weighting coefficient is taken as the main risk factor.
[0033] The normalized value after weighting by the weighting coefficients is used as the weighted feature of the physical quantity. The Euclidean norm of the weighted features of all physical quantities is calculated and used as the multi-factor energy fusion term.
[0034] The terrain risk index is obtained by weighted fusion of the maximum risk dominant term and the multi-factor energy fusion term.
[0035] Preferably, the nonlinear adaptive scheduling of the convergence rate parameters of the Lyapunov stability constraints includes:
[0036] The terrain risk indicators are normalized to obtain normalized terrain risk indicators;
[0037] The convergence rate parameter is nonlinearly adaptively scheduled, as shown in the following formula:
[0038]
[0039] In the formula, For the current period The convergence rate parameter, This represents the maximum value of the convergence rate parameter. This represents the minimum value of the convergence rate parameter. For the current period Normalized terrain risk index, To schedule steepness coefficient, The threshold for dedication is triggered.
[0040] Preferably, the step of constructing Lyapunov stability constraints based on the Lyapunov functions of adjacent prediction steps and the convergence rate parameters after nonlinear adaptive scheduling includes:
[0041] Apply discrete stability constraints as follows: The Lyapunov function of the prediction step and the th prediction step The difference between the Lyapunov function at the prediction step is less than the convergence rate parameter after nonlinear adaptive scheduling and the Lyapunov function at the prediction step. The negative of the product of the Lyapunov functions for each prediction step;
[0042] The discrete stability constraints are transformed into linear inequalities with respect to the current periodic control input through a first-order Taylor expansion, thus completing the construction of the Lyapunov stability constraints.
[0043] Preferably, the Lyapunov stability constraint is applied only to the initial prediction step of the model prediction control in the prediction time domain.
[0044] This invention aims to solve the following problems existing in the walking of quadruped robots in complex terrain:
[0045] (1) Existing model predictive control methods mostly use fixed constraint parameters, which are difficult to dynamically adjust according to changes in terrain risk, resulting in insufficient stability in complex terrain; (2) In slopes, gravel roads and rugged terrain, external disturbances and contact uncertainties are enhanced, and traditional MPC cannot guarantee that the system state always converges to a safe and stable region; (3) Some existing stability enhancement methods only introduce stability constraints at the control structure level and lack an adaptive adjustment mechanism combined with terrain features.
[0046] This invention provides a robust gait control method for quadruped robots applicable to various terrains. By introducing a stability constraint mechanism into the model predictive control framework and adaptively adjusting the stability constraints based on terrain features, it effectively overcomes the instability problem of traditional model predictive control methods under complex terrain conditions. Especially in environments with slopes, gravel roads, terrains with varying undulations, and irregular disturbances, this invention can dynamically adjust the control strategy according to terrain changes and contact states, ensuring that the robot's body posture and center of mass motion remain within a safe and stable evolutionary range. By embedding stability constraints as constraints in the control optimization process into the MPC, and adaptively adjusting the constraint strength according to the degree of terrain risk, this invention effectively suppresses posture oscillations and state divergence when facing uncertainties such as abrupt terrain changes, external disturbances, and sensor measurement errors, improving the system's convergence and disturbance resistance. It enables stable walking of quadruped robots in complex terrain environments, significantly improving the system's engineering applicability and environmental robustness. Attached Figure Description
[0047] Figure 1 This is an architectural diagram of the robust gait control method for quadruped robots applicable to various terrains according to the present invention;
[0048] Figure 2 This is a flowchart of the robust gait control method for quadruped robots applicable to various terrains according to the present invention;
[0049] Figure 3 This is a schematic diagram showing the pitch and roll angles of the quadruped robot and its reference trajectory over time in the experiment of this invention on a gravel road surface.
[0050] Figure 4 This is a graph showing the changes in Lyapunov stability index under gravel road terrain in the experiment of this invention;
[0051] Figure 5 The terrain risk index for gravel road surface in the experiment of this invention The convergence rate parameters of its Lyapunov stability constraints The change curve;
[0052] Figure 6 This is a graph showing the changes in Lyapunov stability index under a rugged terrain with a roughness of 25 cm in the experiment of this invention. Detailed Implementation
[0053] 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 some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to limit the invention.
[0055] Example 1:
[0056] like Figure 1As shown, this embodiment, combined with the Gazebo simulation platform and based on the Unitree Go2 quadruped robot model, proposes a robust gait control method for quadruped robots suitable for various terrains, effectively compensating for the lack of stability of traditional model predictive control methods under complex terrain conditions. This invention significantly improves the stable walking ability of quadruped robots on complex terrain by introducing an MPC model based on terrain risk adaptation and Lyapunov constraints. Specifically, it includes: (1) State acquisition: in each control cycle (Sampling period) (1) Real-time acquisition of robot body state and foot state information as closed-loop control input. (2) Terrain estimation: Based on the support foot endpoint set and IMU attitude information, local terrain geometric features are estimated online to obtain terrain description quantities that can be used to schedule control parameters. (3) Attitude and height reference generation: Based on the terrain estimation results, body attitude and height reference consistent with the terrain are generated to construct the expected state of MPC. (4) Construction of Lyapunov constraint based on terrain risk adaptation: Terrain features are further mapped into risk indicators, and Lyapunov constraint parameters are adaptively scheduled accordingly to form stability enhancement constraints. (5) Construction of MPC state equation: Based on the single rigid body / center of mass dynamics model, a discrete prediction model is established, and together with the cost function, physical constraints and Lyapunov constraints, constitutes the MPC optimization problem. (6) Optimization solution and control execution to form a closed-loop control system: The MPC optimization problem is solved in real time to obtain the optimal control input and execute it. At the same time, sensor feedback is used to enter the next cycle to realize closed-loop control.
[0057] like Figure 2 As shown in the figure, this embodiment proposes a robust gait control method for quadruped robots applicable to various terrains, which specifically includes the following steps:
[0058] Step 1: Obtain the body state information and foot state information of the quadruped robot in the current cycle. During the quadruped robot's walking process, in each control cycle... Inside, the robot's current body state and foot state information are acquired in real time for subsequent terrain estimation, attitude reference generation, and model predictive control optimization calculations.
[0059] Step 1.1: Acquisition of Robotic State Information. The robot's robotic state information in the world coordinate system is obtained through multi-source information acquired by the inertial measurement unit, joint encoders, and foot contact state sensors. Specifically, the robotic state information includes the robot's attitude. angular velocity Linear acceleration The attitude quaternion, center of mass position, and linear velocity are used to characterize the robot's attitude and motion state in space. The body attitude is represented using Euler angles as follows:
[0060]
[0061] in, , , These represent the fuselage in the current cycle. The roll angle, pitch angle, and yaw angle, This represents the transpose of a matrix.
[0062] The fuselage angular velocity is expressed as:
[0063]
[0064] in, , , The fuselage angular velocity at , , The components of the axis.
[0065] Obtain the position and linear velocity of the fuselage's center of mass:
[0066]
[0067]
[0068] in, This indicates the spatial position of the fuselage's center of mass in the world coordinate system. , , The center of mass of the fuselage in the world coordinate system are respectively , , The position of the axis The linear velocity representing the center of mass of the fuselage. , , The linear velocities of the fuselage's center of mass in the world coordinate system are respectively , , The components of the axis.
[0069] The fuselage attitude can be represented in quaternion form as follows:
[0070]
[0071] in, This is a scalar component that reflects the amplitude of the fuselage's attitude rotation. for Axial vector components reflect the fuselage's rotation The direction and angle of rotation of the axis (roll axis, tilt direction). for Axial vector components reflect the fuselage's rotation The direction and angle of rotation of the axis (pitch axis, tilt direction). for Axial vector components reflect the fuselage's rotation The rotation direction and angle of the axis (yaw axis, steering direction). Quaternions are used for attitude calculation, coordinate system transformation, and attitude continuity calculation to avoid the singularity problem that may occur in Euler angle representation under large attitude changes.
[0072] Step 1.2: Obtaining foot status information. This involves acquiring the status information of the four legs of the quadruped robot. Foot state information is obtained through a joint encoder, kinematic model, and ground contact detection module. Define the first... The ground contact status of a leg during the current control cycle is indicated by: , This indicates that the foot is in a supporting position (supporting foot). This indicates that the foot is in a swinging state (a swinging foot). Based on the robot's current body pose and joint angle information, the kinematic model is used to calculate the... The position vector of the foot of each leg in the fuselage coordinate system is represented as:
[0073]
[0074] in, For the current period No. The position vector of the foot of each leg in the fuselage coordinate system. , , Each is the current period No. The foot of one leg in the fuselage coordinate system , , The position of the axis.
[0075] Transform the foot position from the fuselage coordinate system to the world coordinate system to obtain the first... The spatial position of the foot in the world coordinate system:
[0076]
[0077] in, Let be the position vector of the fuselage's center of mass in the world coordinate system. For the fuselage attitude quaternion The rotation matrix obtained by mapping, For the current period No. The position vector of the foot of a leg in the world coordinate system.
[0078] Step 1.3, Valid Foot End Point Filtering. To improve the reliability of subsequent terrain estimation and control calculations, only foot position data in a supported state are retained, constructing a set of supported foot end points:
[0079]
[0080] Support foot end set It is used to characterize the effective contact geometry between the robot and the ground within the current control cycle, and serves as an important input for terrain plane fitting, terrain slope estimation, and terrain adaptive strategies in model predictive control, providing an accurate and reliable state basis for stable walking control under complex terrain conditions.
[0081] Step 2: Determine the supporting foot of the quadruped robot in the current cycle based on the foot state information. Combine this with the body state information of the current cycle to estimate the terrain in which the quadruped robot is located in the current cycle, and extract the slope and height features of the terrain. In this embodiment, based on the spatial distribution information of the supporting foot and the attitude data provided by the inertial measurement unit within the current control cycle, the terrain in which the robot is located is estimated online, and geometric features such as terrain slope and height are extracted, providing basic input for subsequent terrain consistency reference generation and adaptive scheduling of control parameters.
[0082] Step 2.1: Construction of Support Foot Endpoint Set. Based on the support foot endpoint set obtained in Step 1, construct the support foot endpoint set used for terrain estimation within the current control period:
[0083]
[0084] in, For the current period The set of foot endpoints, Represents the set of supporting foot endpoints The selected and renumbered number The position vector of each supporting foot in the world coordinate system. , , The first The supporting foot is positioned in the world coordinate system. , , The position of the axis This indicates the number of feet in a supported state during the current control cycle.
[0085] Step 2.2: Least Squares Fitting of Topographic Plane. The least squares method is used to fit the set of support foot endpoints. Perform local terrain plane fitting to establish a terrain plane model:
[0086]
[0087] The corresponding least squares optimization problem is expressed as:
[0088]
[0089] in, Represents the vertical height component of corresponding points on the plane. Represents the horizontal coordinate components of any point on the plane. Indicates the plane in The slope of the direction, Indicates the plane in The slope of the direction, Indicates the plane in The intercepts of the axes. By solving the above optimization problem, we obtain the planar parameters describing the local geometry of the current terrain. , and .
[0090] Furthermore, to improve the accuracy of terrain estimation, this embodiment constructs a corresponding terrain plane normal vector based on the obtained terrain plane fitting parameters, and performs consistency correction on the normal vector by combining the gravity direction information output by the inertial measurement unit, reducing the impact of abnormal single-foot contact, instantaneous attitude disturbance, or sensor noise on the terrain estimation results. If the consistency correction fails, the terrain plane model is re-estimated based on the output data of the inertial measurement unit, thereby improving the stability and reliability of the terrain slope estimation results.
[0091] Step 2.3: Extraction and output of terrain geometric features.
[0092] The slope characteristics of the current terrain are calculated, and the pitch slope in the front-back direction and the roll slope in the left-right direction are expressed as follows:
[0093]
[0094]
[0095] in, Indicates the current period Slope characteristics in the elevation direction of the terrain. Indicates the current period Slope characteristics of the terrain roll direction.
[0096] Based on the current height distribution of the supporting foot, the terrain height characteristic parameters are calculated as follows:
[0097] The average elevation of terrain is defined as:
[0098]
[0099] The maximum height difference is defined as:
[0100]
[0101] The terrain roughness index is defined as the mean square deviation of the support foot height relative to the average terrain height:
[0102]
[0103] in, Indicates the current period Average elevation of the terrain Indicates the current period The maximum elevation difference of the terrain, Indicates the current period The maximum height that supports the foot. Indicates the current period The minimum height supporting the foot. Indicates the current period The roughness of the terrain.
[0104] The calculated terrain slope, average terrain height, maximum height difference, and terrain roughness parameters together constitute a comprehensive description of the current terrain geometry.
[0105] Step 3: Based on the slope and height characteristics of the terrain, generate a fuselage attitude reference and a fuselage height reference adapted to the terrain in the current cycle. This embodiment generates fuselage attitude and height references consistent with the current terrain geometry based on the terrain slope and height characteristics. This guides the quadruped robot to maintain a stable and coordinated spatial attitude under complex terrain conditions, providing desired state input for subsequent model predictive control optimization.
[0106] Step 3.1: Construct initial reference values for the fuselage attitude based on the terrain's slope characteristics. The initial reference values for the fuselage attitude are constructed based on the terrain's pitch and roll slopes, and are expressed as follows:
[0107]
[0108]
[0109]
[0110] in, and These are the terrain roll slope and pitch slope obtained in step 2, respectively. and This is the attitude adjustment coefficient, used to adjust the degree to which the fuselage attitude follows the terrain slope. The current period given to the user Yaw angle command, , , These represent the fuselage in the current cycle. The initial reference values for roll angle, pitch angle, and yaw angle.
[0111] Step 3.2, Attitude Reference Low-Pass Filtering. To avoid abrupt changes in the fuselage attitude reference caused by terrain estimation noise or abnormal single-leg contact, the initial attitude reference is low-pass filtered to obtain a smoothed fuselage attitude reference value:
[0112]
[0113]
[0114] in, Indicates the fuselage in the current cycle The smoothed reference value of the roll angle. Indicates the fuselage in the current cycle The smoothed reference value of the pitch angle. Indicates the fuselage in the previous cycle The smoothed reference value of the roll angle. Indicates the fuselage in the previous cycle The smoothed reference value of the pitch angle. Let be the filter coefficients, satisfying .
[0115] Step 3.3: Attitude reference fusion based on terrain estimation confidence. This involves combining the terrain estimation confidence coefficient... The filtered attitude reference is then weighted and fused with the current fuselage attitude to obtain the final fuselage attitude reference.
[0116]
[0117]
[0118]
[0119] in, For the fuselage in the current cycle Roll angle reference, For the fuselage in the current cycle Pitch angle reference, Indicates the fuselage in the current cycle Yaw angle reference, The attitude reference is used to characterize the reliability of the terrain estimation results. When the reliability of the terrain estimation is low, the attitude reference automatically converges to the current fuselage attitude, thereby avoiding the adverse effects of estimation errors on control stability.
[0120] In this embodiment, the estimation reliability coefficient is updated online within each control cycle based on the stability and consistency of the terrain estimation results. Specifically, the control system evaluates the reliability of the terrain estimation results based on the geometric consistency of the current support foot endpoint set, the terrain plane fitting residual, and the temporal changes of terrain feature parameters. When the support foot endpoint distribution is stable and the terrain estimation results are continuous and consistent, the estimation reliability coefficient is increased to enhance the aircraft attitude's following of the terrain reference (increased based on a preset step size, with a maximum value). When abnormal single-foot contact occurs or the terrain estimation results (planar parameters) are inconsistent, the reliability coefficient is increased. , and When any fluctuation exceeds the fluctuation threshold, the estimation confidence coefficient is automatically reduced (based on a preset step size, with a minimum value set), causing the attitude reference to converge to the current fuselage attitude, thereby suppressing the impact of terrain estimation error on control stability.
[0121] Step 3.4: Generating the fuselage height reference. Based on the average terrain height calculated in Step 2, a fuselage height reference is generated:
[0122]
[0123] in, For the current period Reference for fuselage height, For the current period Average terrain elevation This represents the desired ground clearance of the fuselage.
[0124] Step 4: Based on the fuselage attitude reference and fuselage altitude reference, construct a model predictive control optimization model with terrain-adaptive Lyapunov stability constraints. In this embodiment, after obtaining terrain-consistent fuselage attitude and altitude references, terrain-adaptive Lyapunov stability constraints are constructed and embedded into the MPC model to enhance the system's stability and disturbance resistance under complex terrain conditions.
[0125] Step 4.1: Construct the system dynamics model. Based on the single rigid body dynamics model, the robot's center of mass motion and attitude dynamics are modeled, and discretized near the current working point to obtain the discrete-time system state equations:
[0126]
[0127] in, For the first The state vector of each prediction step For the system in the first The state vector of each prediction step For the first The predicted output of the foot contact force vector in each prediction step. For the first The discrete system matrix for each prediction step. For the first Each prediction step includes a gravity term and a perturbation vector for model uncertainties.
[0128] Step 4.2: Constructing the model prediction control cost function.
[0129] First, the desired state vector is constructed. Based on the fuselage attitude reference and fuselage altitude reference, the desired state vector required for model predictive control is constructed as follows:
[0130]
[0131] in, For the current period The expected state vector, Let this be the reference position vector of the fuselage's center of mass in the world coordinate system. for transpose, This is the reference angular velocity vector of the fuselage (preset value). for transpose, The reference linear velocity vector (preset value) is the center of mass of the fuselage. for The transpose of . Where the reference position vector The vertical component in the figure is the fuselage reference height. , used to represent the desired fuselage center of gravity height; its horizontal component and It can be set to zero, kept constant, or given by the high-level planning module, depending on the needs of the walking task.
[0132] Secondly, in the prediction time domain length is Under the given conditions, construct the cost function for the model predictive control optimization problem:
[0133]
[0134] in, Let cost function be To predict the time step index in the time domain, For the first The state vector of each prediction step For the first The expected state vector for each prediction step. For the first The state and control weighting matrix for each prediction step The weighted norm square of the state tracking error, To control the weighted norm square of the input, To predict the end-time state vector, To predict the desired state vector (reference state) at the end of the time domain. To predict the state weighting matrix at the end of the time domain, The weighted norm squared is used to predict the state tracking error at the end of the time domain.
[0135] Step 4.3: Construction of Topographic Risk Indicators. Based on the topographic slope, roll slope, elevation difference, and roughness obtained in Step 2, the topographic features are normalized to obtain dimensionless topographic feature quantities. On this basis, a maximum risk dominant term and a multi-factor energy fusion term are introduced to characterize the combined impact of a single high-risk factor and the superposition of multiple adverse topographic factors, respectively, and a topographic risk index is further constructed. It is used to characterize the potential risk of the current terrain environment to the robot's stable walking.
[0136] For the dominant term of maximum risk, the slope and height characteristics of the current period are normalized, and a corresponding weighting coefficient is added to each physical quantity. The physical quantity with the largest normalized value after weighting by the weighting coefficient is taken as the dominant term of maximum risk, and its expression is as follows:
[0137]
[0138] For the multi-factor energy fusion term, the normalized value after weighting by the weighting coefficients is used as the weighted characteristic of the physical quantity. The Euclidean norm of the weighted characteristics of all physical quantities is calculated and used as the multi-factor energy fusion term. Its expression is as follows:
[0139]
[0140] in, This refers to the normalized terrain elevation and slope characteristics. This refers to the normalized topographic roll slope characteristic. This refers to the normalized terrain elevation difference feature. This represents the normalized terrain roughness feature. , , , This represents the terrain feature weighting coefficient. For the current period The maximum risk dominant term is used to characterize the single terrain risk factor that has a dominant adverse impact on the robot's stable walking under the current terrain conditions, so as to avoid the weakening of a single high-risk feature in the process of multi-feature fusion. For the current period The multi-factor energy fusion term is used to characterize the comprehensive risk impact on system stability when multiple adverse terrain factors coexist, so as to reflect the overall risk level change caused by the superposition of multiple factors.
[0141] A terrain risk index is constructed by weighting and fusing the dominant risk term and the multi-factor energy fusion term.
[0142]
[0143] And normalized to:
[0144]
[0145] in, The weighting coefficients for the indicators. To normalize the terrain risk index, This represents the amplitude limiting function.
[0146] Step 4.4: Terrain-adaptive scheduling of Lyapunov convergence rate parameters. Based on the normalized terrain risk index obtained in Step 4.2. Convergence rate parameters for Lyapunov stability constraints Nonlinear adaptive scheduling is employed to maintain control sensitivity in low-risk terrain and enhance convergence constraints to improve stability in high-risk terrain. This is represented by a continuous sigmoid trigger function:
[0147]
[0148] In the formula, The convergence rate parameter for the current period. This represents the maximum value of the convergence rate parameter. This represents the minimum value of the convergence rate parameter. To normalize the terrain risk index, To schedule the steepness coefficients, thereby achieving an adaptive convergence rate, The threshold for dedication is triggered.
[0149] Step 4.5: Calculate the error of the prediction step state vector and construct the Lyapunov function. Based on the Lyapunov function of adjacent prediction steps and the convergence rate parameter after nonlinear adaptive scheduling, construct the Lyapunov stability constraint.
[0150] Define state error:
[0151]
[0152] Constructing Lyapunov functions:
[0153]
[0154] in, For the first The state error of each prediction step For the first Lyapunov function for each prediction step, for transpose, It is a positive definite weighted matrix, and is preset and adjusted according to control requirements.
[0155] Apply discrete stability constraints:
[0156]
[0157] The discrete stability constraints are transformed into linear inequalities with respect to the current periodic control input using the first-order Taylor approximation, thus completing the construction of the Lyapunov stability constraints:
[0158]
[0159] in, and The constraint coefficients are calculated jointly from the system state, the target state, the dynamic model parameters, and the adaptive Lyapunov convergence rate parameters, thus realizing the solvable embedding of stability constraints in model predictive control. Lyapunov stability constraints are applied only to the initial prediction step, ensuring system state convergence while effectively avoiding overly conservative constraints introduced by model predictive control throughout the entire prediction time domain, thereby balancing system stability and control performance.
[0160] Step 5: Solve the model predictive control optimization model to obtain the optimal foot contact force sequence in the prediction time domain, and select the first step in the optimal foot contact force sequence as the gait control command of the quadruped robot in the current cycle.
[0161] After constructing the MPC optimization problem based on terrain-adaptive Lyapunov stability constraints in step 4, the model predictive control problem is solved in real time. The optimal foot contact force sequence in the prediction time domain is obtained, and only the control input of the first step is selected as the control command for the current cycle. The foot contact force is mapped to the joint driving torque through the Jacobian matrix and executed. The system obtains real-time feedback status through the IMU, joint encoder, and foot contact sensor, and returns to step 1 to repeat the execution, forming a closed-loop control process, thereby enabling the quadruped robot to walk stably and continuously on flat ground, slopes, gravel roads, and rugged terrain.
[0162] To verify the effectiveness and robustness of the proposed Lyapunov stability constraint model predictive control method based on terrain risk adaptive scheduling under complex terrain conditions, walking experiments were conducted on gravel roads and rugged terrain (rough 25cm) using a quadruped robot platform. Data such as posture tracking, risk scheduling, and Lyapunov stability index were recorded for verification.
[0163] (1) Experimental platform and control framework.
[0164] The experimental subject was a quadruped robot, whose control system adopted a model predictive control (MPC) framework based on a single rigid body dynamics model. The robot was equipped with an inertial measurement unit, joint encoders, and a ground contact detection module to acquire information such as body attitude (pitch / roll), angular velocity, and foot contact state and position. The control employed a fixed discrete control cycle, executing the following sequentially within each cycle: supporting foot endpoint set construction and selection, online terrain estimation and geometric feature extraction, and terrain risk index determination. Calculation and stability scheduling coefficients Generate, and solve the MPC optimization with Lyapunov stability constraints and output the current control input.
[0165] (2) Terrain settings.
[0166] The experiment selected two representative types of complex terrain as the test environment:
[0167] 1) Gravel road surface / random undulating terrain: used to verify attitude tracking performance, risk index response, and stability constraint scheduling effect under conditions of significant changes in foot height difference and terrain roughness (corresponding to...). Figures 3-5 );
[0168] 2) Rough 25cm terrain: Used to verify the closed-loop stability maintenance capability under stronger disturbances and multiple factors (corresponding to...) Figure 6 ).
[0169] (3) Experimental results.
[0170] Figure 3 The changes in the aircraft's pitch and roll angles and its reference trajectory under gravel road terrain are shown. The results indicate that although the aircraft's attitude exhibits momentary deviations under terrain undulations and local height abrupt changes, it can quickly track the reference trajectory and recover stability, with the overall attitude error remaining bounded.
[0171] Figure 4 The Lyapunov function for the corresponding road condition is given. and its difference component The results of the changes. It can be seen that... Always remain bounded, and Most values were negative or fluctuated slightly around zero, with no sustained positive growth, indicating that the closed-loop stability of the system was effectively guaranteed.
[0172] Figure 5 Terrain risk indicators are given. and its adaptive stability scheduling coefficient The curve shows the change in risk index. When entering areas with significant terrain undulations, the risk index increases and triggers enhanced stability scheduling; when the terrain becomes flatter, the scheduling coefficient decreases accordingly, avoiding overly conservative control, thus verifying the effectiveness of the terrain risk adaptive scheduling mechanism.
[0173] Figure 3 - Figure 5 The experimental results show that the method of the present invention can achieve stable attitude tracking under complex gravel terrain conditions, and effectively balance system stability and control performance through terrain risk adaptive scheduling.
[0174] Figure 6 The Lyapunov function for walking on complex terrain is given. and its difference component The experimental results show that, under the influence of terrain undulation and foot contact disturbance, It has always remained bounded and has not shown a sustained divergence trend; at the same time... The system state error is negative or fluctuates slightly around zero during most control cycles. Even when there are instantaneous positive fluctuations during periods of high terrain complexity, it does not continue to grow. This indicates that after introducing terrain-adaptive Lyapunov stability constraints, the system state error can be quickly suppressed and reconverged under disturbances, thus verifying the effective guarantee of closed-loop stability of the proposed method under complex terrain conditions.
[0175] In summary, the experimental results show that the model prediction control framework based on terrain risk adaptive Lyapunov stability constraints proposed in this invention can effectively perceive and schedule single high-risk factors and multiple superimposed risks under complex terrain conditions. While ensuring system stability, it avoids overly conservative control, thereby significantly improving the stable walking ability and robustness of quadruped robots in complex terrain environments.
[0176] Example 2:
[0177] This embodiment provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the robust gait control method for quadruped robots applicable to various terrains described in Embodiment 1.
[0178] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0179] Example 3:
[0180] This embodiment provides a robust gait control device for quadruped robots suitable for various terrains, including a processor and a memory storing a number of computer instructions. When the computer instructions are executed by the processor, they implement the steps of the robust gait control method for quadruped robots suitable for various terrains described in Embodiment 1.
[0181] The memory and processor are electrically connected directly or indirectly to enable data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines. The memory stores a computer program that can run on the processor, which implements the method of the present invention by running the computer program stored in the memory.
[0182] The memory may be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory stores the program, and the processor executes the program upon receiving an execution instruction.
[0183] The processor may be an integrated circuit chip with data processing capabilities. The aforementioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor.
[0184] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0185] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.
Claims
1. A robust gait control method for a quadruped robot applicable to various terrains, characterized in that, Includes the following steps: Obtain the body state information and foot state information of the quadruped robot in the current cycle; The supporting foot of the quadruped robot in the current cycle is determined based on the foot end state information. The terrain where the quadruped robot is located in the current cycle is estimated by combining the body state information of the current cycle, and the slope and height features of the terrain are extracted. Based on the slope and height characteristics of the terrain, generate fuselage attitude reference and fuselage height reference adapted to the terrain in the current cycle; Based on fuselage attitude reference and fuselage altitude reference, a model predictive control optimization model with terrain-adaptive Lyapunov stability constraints is constructed. Solve the model predictive control optimization model to obtain the optimal foot contact force sequence in the prediction time domain, and select the first step in the optimal foot contact force sequence as the gait control command of the quadruped robot in the current cycle. The aforementioned construction of a model predictive control optimization model with terrain-adaptive Lyapunov stability constraints based on fuselage attitude reference and fuselage altitude reference includes: Construct a dynamic model of the quadruped robot; Based on the fuselage attitude reference and fuselage altitude reference, the expected state vector for the current cycle is obtained, and the cost function of the model predictive control optimization model is constructed. Based on the slope and height characteristics of the terrain where the quadruped robot is located in the current cycle, the terrain risk index is calculated, and the convergence rate parameter of the Lyapunov stability constraint is nonlinearly adaptively scheduled. Calculate the error of the prediction step state vector and construct the Lyapunov function. Based on the Lyapunov functions of adjacent prediction steps and the convergence rate parameters after nonlinear adaptive scheduling, construct Lyapunov stability constraints.
2. The robust gait control method for quadruped robots applicable to various terrains according to claim 1, characterized in that, The process of estimating the terrain where the quadruped robot is located in the current cycle by combining the body state information of the current cycle, and extracting the slope and height features of the terrain, includes: The least squares method is used to fit the local terrain plane of the support foot endpoint set to establish a terrain plane model. The slope characteristics are calculated based on the parameters of the terrain plane model, and the slope characteristics include pitch slope and roll slope. The height characteristics are calculated based on the spatial positions of all supporting feet in the world coordinate system. The height characteristics include average height, maximum height difference, and roughness.
3. The robust gait control method for quadruped robots applicable to various terrains according to claim 1, characterized in that, Based on the slope and height characteristics of the terrain, Generate fuselage attitude and altitude references adapted to the terrain of the current cycle, including: Based on the slope characteristics of the terrain, initial reference values for the fuselage attitude are constructed; The initial reference value of the fuselage attitude is low-pass filtered to obtain the smoothed reference value of the fuselage attitude. Using the terrain estimation confidence coefficient, the smoothed fuselage attitude reference value and the fuselage attitude in the current period's fuselage state information are weighted and fused to obtain the final fuselage attitude reference. The average height in the height feature is superimposed with the expected fuselage ground clearance to serve as the fuselage height reference.
4. The robust gait control method for quadruped robots applicable to various terrains according to claim 1, characterized in that, The slope and height characteristics of the terrain where the quadruped robot is located in the current cycle are described. Calculating terrain risk indicators includes: The slope and height characteristics of the current cycle are normalized, and a corresponding weighting coefficient is added to each physical quantity. The physical quantity with the largest normalized value after weighting by the weighting coefficient is taken as the main risk factor. The normalized value after weighting by the weighting coefficients is used as the weighted feature of the physical quantity. The Euclidean norm of the weighted features of all physical quantities is calculated and used as the multi-factor energy fusion term. The terrain risk index is obtained by weighted fusion of the maximum risk dominant term and the multi-factor energy fusion term.
5. The robust gait control method for quadruped robots applicable to various terrains according to claim 1, characterized in that, The nonlinear adaptive scheduling of the convergence rate parameters of the Lyapunov stability constraints includes: The terrain risk indicators are normalized to obtain normalized terrain risk indicators; The convergence rate parameter is nonlinearly adaptively scheduled, as shown in the following formula: ; In the formula, For the current period The convergence rate parameter, This represents the maximum value of the convergence rate parameter. This represents the minimum value of the convergence rate parameter. For the current period Normalized terrain risk index, To schedule steepness coefficient, The threshold for triggering dedication.
6. The robust gait control method for quadruped robots applicable to various terrains according to claim 1, characterized in that, The step of constructing Lyapunov stability constraints based on the Lyapunov functions of adjacent prediction steps and the convergence rate parameters after nonlinear adaptive scheduling includes: Apply discrete stability constraints as follows: The Lyapunov function of the prediction step and the th prediction step The difference between the Lyapunov function at the prediction step is less than the convergence rate parameter after nonlinear adaptive scheduling and the Lyapunov function at the prediction step. The negative of the product of the Lyapunov functions for each prediction step; The discrete stability constraints are transformed into linear inequalities with respect to the current periodic control input through a first-order Taylor expansion, thus completing the construction of the Lyapunov stability constraints.
7. The robust gait control method for quadruped robots applicable to various terrains according to claim 1, characterized in that, The Lyapunov stability constraint is applied only to the initial prediction step of the model prediction control in the prediction time domain.