Wheel-foot compound structure pid control and gait planning method and electronic equipment
By optimizing the PID control model with coupling compensation terms and the PPO algorithm, the problems of control accuracy, mode switching impact, and multi-machine collaborative efficiency of wheel-leg composite structure robots in complex environments were solved, achieving high-precision and low-energy motion control.
Patent Information
- Application Number
- CN202511202969.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-27
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-08-27
AI Technical Summary
Under traditional PID control and gait planning methods, wheel-leg hybrid robots face problems such as insufficient control accuracy due to joint dynamics coupling, large impact of mode switching, high synchronization error and energy consumption in multi-machine collaboration, and poor parameter adaptability in complex terrain.
A PID control model with coupling compensation term is adopted, which combines IMU feedback and lidar prediction to adjust PID parameters in real time. The control strategy is optimized through PPO algorithm to achieve joint motion disturbance compensation and smooth mode switching. Multi-machine collaborative optimization of power distribution is used to reduce energy consumption.
It achieves high-precision motion posture stability, smooth mode switching, high efficiency of multi-machine collaboration, and improved environmental adaptability for robots in complex environments.
Smart Images

Figure CN120779708B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of robot control, in particular to a PID control and gait planning method of a wheel-foot composite structure and an electronic device. BACKGROUND
[0002] In the robot control, the joint movement of the wheel-leg composite structure has a dynamic coupling (such as the mutual interference of the hip joint and the knee joint movement), and when the traditional wheel-foot composite structure robot adopts the conventional PID control and gait planning mode, it faces the problems of insufficient control accuracy caused by the joint dynamic coupling, large and non-smooth switching impact of the wheel-foot mode, synchronization error and high energy consumption in multi-robot cooperation, and poor parameter adaptability in complex terrain, which jointly restrict the improvement of the motion performance, cooperation efficiency and environmental adaptability in complex environments. SUMMARY
[0003] The purpose of the present application is to overcome the defects of the prior art, and to provide a PID control and gait planning method of a wheel-foot composite structure, and to provide a PID control and gait planning electronic device of a wheel-foot composite structure to solve the problems raised in the background.
[0004] The PID control and gait planning method of the wheel-foot composite structure of the present application comprises the following steps:
[0005] Establish a PID control model with a coupling compensation term;
[0006] Calculate the joint angle error, compensate the adjacent joint movement interference according to the PID control model with the coupling compensation term, and correct the historical control amount difference for the control delay of the first threshold value;
[0007] In the wheeled mode, the outer ring controls the speed with the second threshold value as the target, and the inner ring corrects the attitude according to the IMU feedback, and when the inclination exceeds the third threshold value, the attitude control weight is enhanced;
[0008] In the foot mode, the PID parameters are adjusted in advance according to the laser radar prediction to improve the adaptability to complex terrain;
[0009] Real-time collection of terrain, gait, control accuracy and energy consumption data, automatic adjustment of PID parameters based on PPO algorithm to improve the control accuracy of the robot in unknown terrain;
[0010] Each robot module has independent PID control, and for the fourth threshold value communication delay, the parameters of the robot module are adjusted according to the control amount of the neighbor node, the PID parameters are linearly interpolated when the wheel-foot mode is switched, and the control amount is adjusted according to the joint angular velocity and angular acceleration direction during the foot landing stage, so as to reduce the switching impact.
[0011] Further, the control equation of the PID control model with the coupling compensation term is:
[0012] ; The preliminary control quantity is generated based on the current error, the cumulative error and the error change rate for the basic PID control calculation; The preliminary control quantity is modified as the coupling compensation term, u i (t) is the control quantity of the i th joint, e i (t) is the joint angle error, K p,i (t) is the time-varying proportional gain, K i,i is the integral gain, K d,i is the differential gain; C i,j is the joint coupling coefficient matrix, which is used to describe the degree of mutual influence of the motion of different joints, u j (t) is the control quantity of the j th joint at time t, u j (t-T d ) is the control quantity of the j th joint at time t-T d .
[0013] Further, the joint angle error is calculated, and the motion interference of adjacent joints is compensated according to the PID control model with the coupling compensation term, including: the actual angle value of each joint is obtained in real time through the encoder, and the target angle value in the preset trajectory is subtracted to obtain the angle error; the control quantity of each joint is calculated based on the PID control model with the coupling compensation term, the motion interference degree between the joints is quantified through the predefined coupling coefficient matrix, and the control delay caused by the mechanical transmission is compensated by using the difference between the control quantities at the current time and the historical time.
[0014] Further, the historical control quantity difference is used to modify the control delay of the first threshold, including: the control quantities of adjacent joints at the current time and the historical time are obtained, and the difference between the two is calculated as a delay compensation signal; the difference is multiplied by the predefined joint coupling coefficient matrix to generate a coupling compensation term, which is superimposed into the PID control quantity of the current joint.
[0015] Further, the outer ring targets the second threshold to control the speed, including: the wheel set speed is collected in real time through the encoder and compared with the target value to generate a speed error, and a preliminary control quantity is calculated through the PID algorithm; the inner ring is corrected according to the IMU feedback attitude, including: the attitude inner ring takes the real-time attitude data provided by the IMU as the feedback, the three-axis angular velocity and acceleration are obtained through high-frequency sampling, and the pitch angle and roll angle are calculated after the data is fused by using the complementary filtering algorithm, and the attitude error is generated by comparing with the preset attitude reference; when the inclination angle exceeds the third threshold, the attitude control weight is increased to 0.6 from the default value, and the correction force of the vehicle body inclination is enhanced.
[0016] Further, in the foot mode, the PID parameters are adjusted in advance according to the prediction of the laser radar, including: acquiring terrain elevation data in real time through continuous scanning of the laser radar and constructing a three-dimensional terrain model; analyzing the acquired terrain data to identify complex terrain features such as gullies, slopes and steps; adjusting the PID control parameters in advance based on a set prediction time window; dynamically optimizing the proportional gain, integral gain and differential gain of each joint according to the identified terrain type and trend, and introducing a second derivative compensation term to correct the control quantity according to the predicted terrain change trend.
[0017] Further, real-time terrain, gait, control accuracy and energy consumption data are collected, and the PID parameters are automatically adjusted based on the PPO algorithm, including: acquiring terrain point cloud data through real-time scanning of the laser radar to calculate the terrain roughness index, identifying the current gait based on encoder and IMU data, calculating error entropy values based on joint angle error sequences to represent control accuracy, and monitoring energy consumption data to construct a four-dimensional state space containing terrain, gait, control accuracy and energy consumption data indicators; inputting the real-time state into a pre-trained PPO algorithm model, the pre-trained PPO algorithm model is a reinforcement learning model based on a proximal policy optimization framework, the reinforcement learning model includes a policy network and a value network, the policy network is used to output the adjustment amount of the PID parameters, and the value network is used to evaluate the value of the current state to assist policy optimization, the reinforcement learning model has initial decision-making capability through training of various terrain and gait scenarios; a pre-set reward function integrates control error, energy efficiency and smoothness through a weighting method, the control error is calculated by the deviation between the actual joint angle and the target angle, the smaller the deviation, the higher the reward value; the energy efficiency is calculated based on the energy consumption per unit time, the lower the energy consumption, the higher the reward value; the smoothness is calculated by the fluctuation of the joint angle change rate, the smaller the fluctuation, the higher the reward value, the weights of the three are set in the proportion of control error being the highest, energy efficiency being the second, and smoothness being the third; after the real-time state is input into the reinforcement learning model, the policy network outputs the adjustment strategy of the proportional, integral and differential gains according to the current state, and the adjustment strategy of the proportional, integral and differential gains is directly used to update the parameters of the current PID controller.
[0018] Further, each robot module has independent PID control, and for the fourth threshold communication delay, the parameters of each robot module are adjusted according to the control quantity of the neighbor node, including: each robot module independently performs PID calculation using local sensor data, generates an initial control quantity, and for the communication delay between modules, acquires the control quantity data of the neighbor node at the delay time, calculates the difference between the current control quantity of the robot module and the historical control quantity of the neighbor node, weights the difference with a coordination weight factor, generates a communication delay compensation term and adds it to the local control quantity.
[0019] Further, during wheel-foot mode switching, the PID parameters are linearly interpolated, and during the foot landing stage, the control amount is adjusted according to the joint angular velocity and angular acceleration direction, including: after the wheel-foot mode switching is started, a total switching time T is preset as a reference, the current time t in the switching process is defined, a transition coefficient a(t) is calculated through a quintic polynomial function, wherein the value of the transition coefficient a(t) is smoothly increased from 0 to 1 with t, and is used to quantify the transition degree of the wheel mode to the foot mode; for the proportional gain, the integral gain and the differential gain, linear interpolation formulas are respectively used for parameter transition; during the transition process, the dynamic characteristics of the transition coefficient a(t) are optimized by using a pre-trained PPO algorithm model, the state space of the model includes the current transition coefficient a(t), the joint angle error, the parameter change rate and the energy consumption rate; the action space is the adjustment amount of the transition coefficient.
[0020] Further disclosed is an electronic device, comprising:
[0021] at least one processor; and
[0022] a memory connected in communication with the at least one processor; wherein
[0023] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above-mentioned PID control and gait planning method for a wheel-foot composite structure.
[0024] The present application has the following advantages:
[0025] The PID control and gait planning method and system for a wheel-foot composite structure of the present application can accurately resolve the motion interference between joints through a dynamic coupling compensation mechanism, so that each joint can maintain high coordination during motion, and can stably maintain accurate motion posture regardless of complex terrain.
[0026] During wheel-foot mode switching, the optimized parameter transition method realizes natural and smooth conversion between the two modes, completely eliminates the impact and jerk during the switching process, and makes the motion of the robot more coherent.
[0027] In terms of multi-machine cooperation, through an efficient cooperation strategy and power distribution scheme, the modular robot can maintain consistent motion rhythm after being combined, the carrying capacity is significantly enhanced, and energy consumption is reduced, solving the problem of low efficiency in the traditional cooperation mode.
[0028] The robot can automatically optimize control parameters according to different terrain conditions and motion states, and can flexibly adapt to various unknown environments without manual operation, greatly improving the environmental adaptability. BRIEF DESCRIPTION OF DRAWINGS
[0029] Figure 1 The PID control and gait planning method of the wheel-foot composite structure. DETAILED DESCRIPTION
[0030] The application discloses a PID control and gait planning method of a wheel-foot composite structure, which comprises the following steps: Figure 1 S100. A PID control model with a coupling compensation term is established; S101. The joint angle error is calculated, the adjacent joint motion interference is compensated according to the PID control model with the coupling compensation term, the historical control quantity difference is corrected for the control delay of the first threshold value, the joint synchronous motion is ensured, and the joint synchronous error is reduced; S102. In the wheeled mode, the outer ring controls the speed with the second threshold value as the target, and the inner ring corrects the posture according to the IMU feedback, and when the inclination exceeds the third threshold value, the posture control weight is enhanced; S103. In the foot mode, the PID parameters are adjusted in advance according to the laser radar prediction, and the adaptability to complex terrains is improved; S104. The terrain, gait, control precision and energy consumption data are collected in real time, the PID parameters are automatically adjusted based on the PPO algorithm, and the control precision of the robot in unknown terrains is improved; S105. Each robot module is independently PID controlled, the parameters of the robot module are adjusted according to the control quantity of the neighbor node for the fourth threshold value communication delay, the power distribution is optimized through the cooperation matrix, the joint synchronization of the quadruped assembly is realized, the load capacity is improved, and the energy consumption is reduced; S106. When the wheel-foot mode is switched, the PID parameters are linearly interpolated by using a quintic polynomial function, and in the foot landing stage, the control quantity is adjusted according to the joint angular velocity and angular acceleration direction, so that the switching impact is reduced.
[0031] The PID control and gait planning method of the wheel-foot composite structure can be realized by a computer program, and the computer program for implementing the method of the application can be written in any combination of one or more programming languages. The computer program can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the computer program makes the functions / operations specified in the flowchart and / or block diagram be implemented when executed by the processor. The computer program can be executed completely on the machine, partially on the machine, partially on the machine and partially on a remote machine, or completely on a remote machine or server.
[0032] For S100. Establishing a PID control model with a coupling compensation term, the control equation of the PID control model with the coupling compensation term is:
[0033] ;
[0034] For basic PID control calculation, the preliminary control quantity is generated based on the current error, the cumulative error and the error change rate respectively;
[0035] To couple compensation terms, the preliminary control quantity is modified by calculating the changes and delayed effects of other joint control quantities, and finally the accurate joint control quantity u i (t) is obtained, which realizes the coordinated motion between joints, reduces the joint synchronization error, and improves the motion control accuracy of the robot in complex environments. The basic PID parameters include:
[0036] u i (t): The control quantity of the i-th joint (such as the hip joint or the knee joint), which is used to drive the joint motor and determine the joint motion angle and speed.
[0037] e i (t): Joint angle error, calculated by the difference between the target angle and the current actual angle. This error value is the basis for the adjustment of the PID controller.
[0038] K p,i (t): Time-varying proportional gain. The proportional gain determines the response speed and intensity of the controller to the current error. Here K p,i (t) will be dynamically adjusted according to the terrain characteristics, such as maintaining a low value for smooth motion on flat terrain, and automatically increasing when crossing obstacles to speed up the joint angle adjustment speed.
[0039] K i,i : Integral gain. Its role is to accumulate past errors and eliminate static errors of the system. For example, when the robot is climbing a slope, if there is a persistent angle deviation, the integral term will continuously accumulate, gradually increasing the control quantity until the deviation is eliminated.
[0040] K d,i : Differential gain. Based on the rate of change of error, it can predict the trend of error change, adjust the control quantity in advance, and suppress the overshoot and oscillation of the system. For example, when the joint is moving quickly and approaching the target angle, the differential action will slow down the joint motion speed to avoid overshooting the target angle.
[0041] Coupling compensation parameters include:
[0042] C i,j : Joint coupling coefficient matrix. Used to describe the degree of mutual influence between different joints. For example, C 2,1 =0.3 means that the motion of the knee joint (the 2nd joint) has a 0.3 coefficient effect on the hip joint (the 1st joint). During the robot's walking process, when the knee joint is bent, the compensation value for the hip joint control is calculated through this coefficient to modify the control of the hip joint to offset the interference caused by the knee joint motion and ensure the overall motion coordination.
[0043] u j(t): the control amount of the jth joint at time t, used to calculate the coupling effect between joints.
[0044] u j (t-T d ): the control amount of the jth joint at time t-T d . T d =0.05s is the adjacent joint control delay compensation time. Due to mechanical structure and signal transmission factors, there is a certain delay in joint control. By introducing the control amount at the historical time, the delay can be compensated, making the coupling compensation more accurate.
[0045] For S101. Calculate the joint angle error, compensate for the motion interference of adjacent joints based on the PID control model with coupling compensation term, correct the control delay for the first threshold value using the historical control amount difference, ensure joint synchronous motion, reduce joint synchronization error, in implementation, the actual angle value of each joint is obtained in real time through high-precision encoder, which is subtracted from the target angle value in the preset trajectory to obtain the angle error. Based on the PID control model with coupling compensation term, the control amount of each joint is calculated, not only considering the proportional, integral and differential control effect of the current joint, but also introducing the coupling compensation mechanism between adjacent joints. Through the predefined coupling coefficient matrix, the motion interference degree between joints is quantified, and the control delay caused by mechanical transmission is compensated by using the control amount difference between the current time and the historical time. When moving in complex terrain, the control parameters are dynamically adjusted according to the terrain characteristics identified by the environment perception system.
[0046] For the control delay of the first threshold value, the historical control amount difference is corrected to ensure joint synchronous motion and reduce joint synchronization error. In implementation, for the 0.05s control delay caused by mechanical transmission and signal transmission, the control amount u j (t) and u j (t-0.05s) of adjacent joints at the current time t and the historical time t-0.05s are obtained, and the difference between the two is calculated as the delay compensation signal. Multiply the difference by the predefined joint coupling coefficient matrix C i,j to generate the coupling compensation term, which is superimposed into the PID control amount of the current joint. By monitoring the motion asynchronization phenomenon caused by the control delay of each joint in real time, the compensation strength is dynamically adjusted using the historical control amount difference, so that the control signals of adjacent joints are synchronized and calibrated in time dimension, effectively eliminating the motion interference caused by delay, ensuring the attitude consistency of multi-joint collaborative motion, reducing the joint synchronization error, and improving the motion stability of the robot in complex terrain.
[0047] For S102. In wheeled mode, the outer ring controls the speed with the second threshold value as the target, and the inner ring corrects the attitude according to the IMU feedback. When the inclination exceeds the third threshold value, the attitude control weight is increased.
[0048] In implementation, specifically, when the wheeled mode is running, the speed outer loop takes the target speed of 1.2 m / s as the control threshold, the encoder collects the wheel group speed in real time and compares it with the target value to generate a speed error, and the preliminary control amount is calculated through the PID algorithm. The attitude inner loop takes the real-time attitude data provided by the IMU as the feedback, obtains the three-axis angular velocity and acceleration through high-frequency sampling, and calculates the pitch angle and roll angle after fusing the data using the complementary filtering algorithm. The attitude error is generated by comparing with the preset attitude reference. When the IMU detects that the inclination angle exceeds 10°, the system automatically increases the attitude control weight from the default value to 0.6, enhancing the correction strength of the body tilt. The double closed-loop control amount is output to the wheel group motor after weighted fusion, realizing the cooperative control of speed and attitude, ensuring the stability of the robot in high-speed running on flat road surface, and avoiding the risk of rollover caused by uneven ground or turning.
[0049] For S103. When the legged mode, the PID parameters are adjusted in advance based on the laser radar prediction to improve the adaptability to complex terrain. In implementation, specifically, the laser radar continuously scans the terrain in front of a certain range, and obtains the terrain elevation data in real time and constructs a three-dimensional terrain model. The system analyzes the obtained terrain data and identifies complex terrain features such as gullies, slopes, and steps. Based on the set prediction time window, the PID control parameters are adjusted in advance. According to the identified terrain type and trend, the proportional gain, integral gain and differential gain of each joint are dynamically optimized, and a second derivative compensation term is introduced. The control amount is corrected according to the predicted terrain change trend, so that the robot can adjust the joint motion trajectory in advance according to the terrain change during the legged walking process, improve the adaptability to complex terrain, and ensure smooth walking.
[0050] For S104. Real-time collection of terrain, gait, control accuracy, and energy consumption data, automatically adjust the PID parameters based on the PPO algorithm to improve the control accuracy of the robot in unknown terrain. In implementation, the terrain roughness index is calculated by real-time scanning of the laser radar to obtain the terrain point cloud data, the current gait mode is identified using encoder and IMU data, the error entropy value is calculated based on the joint angle error sequence to represent the control accuracy, and the energy consumption rate is monitored to construct a four-dimensional state space containing terrain, gait, control accuracy, and energy consumption data indicators. The real-time state is input into the pre-trained PPO algorithm model, which is a reinforcement learning model based on the proximal policy optimization framework, containing a policy network and a value network. The policy network is used to output the adjustment amount of the PID parameters, and the value network is used to evaluate the value of the current state to assist policy optimization. The model has initial decision-making ability through training on various terrain and gait scenarios. The pre-set reward function integrates control error, energy efficiency, and smoothness through weighting, where control error is calculated by the deviation between actual and target joint angles, with smaller deviation corresponding to higher reward value; energy efficiency is calculated based on energy consumption per unit time, with lower energy consumption corresponding to higher reward value; smoothness is calculated by the fluctuation of joint angle change rate, with smaller fluctuation corresponding to higher reward value. The weights of the three indicators are set according to the proportion of control error being the highest, energy efficiency being the second, and smoothness being the third. When the real-time state is input into the model, the policy network outputs the adjustment strategy for proportional, integral, and derivative gains based on the current state. These adjustment strategies are directly used to update the parameters of the current PID controller.
[0051] For S105. Independent PID control of each robot module, for the fourth threshold communication delay, adjust its own parameters according to the neighbor node control amount, optimize power distribution through the coordination matrix, realize joint synchronization of the quadruped assembly, improve load capacity, and reduce energy consumption; In implementation, each robot module independently performs PID calculation using local sensor data, generates an initial control amount, and for a communication delay of 0.1 seconds between modules, obtains the control amount data of the neighbor node at the delay time, calculates the difference between the current control amount and the historical control amount of the neighbor node, weights the difference by a coordination weight factor of 0.2, generates a communication delay compensation term, and adds it to the local control amount. At the same time, based on the coordination coupling matrix of the quadruped assembly, the joint control amount is optimized, the energy and driving capacity are shared and distributed through the power bus, the joint motion of the multi-machine assembly tends to be synchronized, the overall load capacity is improved, and the energy consumption is reduced.
[0052] For S106. When the wheel-foot mode is switched, the PID parameters are linearly interpolated by a quintic polynomial function, and during the foot landing phase, the control amount is adjusted according to the joint angular velocity and angular acceleration direction to reduce the switching impact. In practice, after the wheel-foot mode switching is started, the total switching time T (T = 0.6 s, i.e. the total duration of the switching process) is preset as the reference, and the current time t (t ∈ [0, T]) in the switching process is defined. The transition coefficient α(t) is calculated by the quintic polynomial function α(t) = 10(t / T)³−15(t / T) 4 +6(t / T) 5 The transition coefficient α(t) is calculated, where the value of α(t) smoothly increases from 0 to 1 with t, which is used to quantify the transition degree from the wheel mode to the foot mode.
[0053] For the proportional gain Kp, the integral gain Ki, and the derivative gain Kd, linear interpolation formulas are used for parameter transition respectively:
[0054] Proportional gain transition: Kp(t) = Kp_wheel⋅(1−α(t))+Kp_leg⋅α(t), where Kp_wheel is the preset value of the proportional gain in the wheel mode, and Kp_leg is the preset value of the proportional gain in the foot mode; Integral gain transition: Ki(t) = Ki_wheel⋅(1−α(t))+Ki_leg⋅α(t), where Ki_wheel is the preset value of the integral gain in the wheel mode, and Ki_leg is the preset value of the integral gain in the foot mode;
[0055] Derivative gain transition: Kd(t) = Kd_wheel⋅(1−α(t))+Kd_leg⋅α(t), where Kd_wheel is the preset value of the derivative gain in the wheel mode, and Kd_leg is the preset value of the derivative gain in the foot mode.
[0056] During the transition process, the pre-trained PPO algorithm model is used to optimize the dynamic characteristics of α(t). The state space of the model includes the current transition coefficient α(t), the joint angle error, the parameter change rate, and the energy consumption rate; the action space is the adjustment amount of the transition coefficient. The preset reward function is R = w1⋅err_norm + w2⋅(1−energy_rate) + w3⋅smoothness, where err_norm is the normalized joint angle error (reflecting control accuracy), energy_rate is the energy consumption ratio per unit time (reflecting energy efficiency), and smoothness is the square sum of the PID parameter change rate (reflecting transition smoothness). w1 = 0.5, w2 = 0.3, and w3 = 0.2 are the weight coefficients of each index. Through the reward function, the model optimizes the transition process, so that the proportional, integral, and derivative gains have no sudden change during the switching process, achieving smooth transition between the wheel mode and the foot mode.
[0057] During the transition between the wheel mode and the leg mode, the coupling between the joints (e.g., the motion interference between the hip joint and the knee joint) can exacerbate the transition impact and the attitude fluctuation. The present application can offset the coupling interference in real time by designing a sliding mode surface with a joint coupling term and combining a high-frequency switching control law. The sliding mode surface with a joint coupling term is designed as follows for the i-th joint (e.g., the hip joint): ;
[0058] Parameter significance:
[0059] e i (t): the angle error of the i-th joint (the difference between the target angle and the actual angle, consistent with the error definition in the basic PID); : the rate of change of the angle error (reflecting the dynamic trend of the joint motion); k i : the convergence coefficient of the sliding mode surface (positive, the value range is 1.2-2.5, which determines the speed of the system state converging to the sliding mode surface, the larger the value, the faster the convergence); C i,j : the joint coupling coefficient matrix (completely consistent with the coupling compensation parameters in the basic PID control model, such as C2,1=0.3, which represents the coupling influence coefficient of the knee joint on the hip joint as 0.3); : the rate of change of the angle error of the j-th adjacent joint (e.g., the knee joint), which is used to quantify the dynamic interference of the i-th joint in the sliding mode surface The term, which can capture the dynamic interference of the adjacent joint (e.g., the impact of the rapid swing of the knee joint on the hip joint) in real time through the coupling coefficient matrix, so that the sliding mode surface can perceive the coupling effect in advance, providing accurate interference quantification basis for the subsequent control law design.
[0060] The control law works synergistically through "equivalent control + switching control" to actively offset the coupling interference, and the mathematical relationship is: ; is the equivalent control term, which reuses the PID parameter interpolation results in the wheel-leg mode transition, i.e., the real-time PID control quantity generated by the quintic polynomial transition function: , where K p (t), K i (t), and K d (t) are time-varying PID parameters after quintic polynomial interpolation (consistent with the parameter transition logic in the mode transition), ensuring seamless connection between the sliding mode control and the existing PID framework
[0061] is the switching control term, which is used to offset the coupling interference at high frequency, and the mathematical expression is: ;
[0062] Parameter significance:
[0063] K sw: switching gain (positive number, value range 5~15, dynamically adjusted by PPO algorithm according to real-time terrain roughness, the greater the disturbance, the greater the value); sign(s i (t)):sign function (output 1 when s i (t)>0, output-1 when s i (t)<0), determine the direction of switching control; : coupling strength coefficient (the sum of the absolute values of the total coupling effect of adjacent joints on the i th joint), used to dynamically adjust the amplitude of switching control, the stronger the coupling, the greater the compensation.
[0064] Core logic: when the sliding surface s i (t) is not equal to 0 (i.e. the system deviates from the ideal state), the switching control term outputs a compensation quantity opposite to the direction of coupling disturbance through high-frequency switching, directly offsetting the disturbance caused by the system state, forcing the system state to quickly converge to the sliding surface s i (t)=0 state. Through the sliding surface with coupling term and high-frequency switching control law, the switching impact caused by joint coupling disturbance and joint synchronization error are reduced.
[0065] It can be understood that the present application discloses an electronic device, comprising:
[0066] at least one processor; and
[0067] a memory in communication connection with the at least one processor; wherein,
[0068] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above-mentioned PID control and gait planning method of a wheel-foot composite structure.
[0069] The present application discloses a PID control and gait planning system of a wheel-foot composite structure, which is a hardware and software integrated system for realizing high-precision control and efficient gait planning of a wheel-foot composite structure robot. Through the cooperative work of multiple modules, problems such as joint coupling disturbance, mode switching impact, low efficiency of multi-machine cooperation, and poor environmental adaptability are solved. The specific composition and functions are as follows:
[0070] The perception layer module acquires real-time robot motion state and environmental information to provide data support for control decision.
[0071] The perception layer module comprises:
[0072] The joint state perception unit is composed of high-precision encoders, which can obtain the actual angle values of each joint (such as hip joint and knee joint) in real time, calculate the angle error and error rate, and provide basic feedback data for PID control.
[0073] The attitude and motion perception unit is used for: integrating an IMU (inertial measurement unit), sampling three-axis angular velocity and acceleration at a high frequency, and calculating attitude information such as robot pitch angle and roll angle through a complementary filtering algorithm, for attitude closed-loop control in a wheeled mode.
[0074] The terrain environment perception unit is used for: containing a laser radar, continuously scanning the terrain in front and constructing a three-dimensional terrain model, identifying complex terrain features such as gullies, slopes, and steps, and providing environmental data for PID parameter pre-adjustment and terrain prediction in a legged mode.
[0075] The control layer module realizes high-precision PID control based on perception data, and the core is a control model with a coupling compensation term to offset joint dynamics coupling and delay interference.
[0076] The control layer module includes:
[0077] The coupling compensation PID control unit is used for: constructing a PID control model with a joint coupling coefficient matrix, and when calculating the joint control amount, not only the current joint proportion, integral, and differential terms are included, but also the coupling compensation term is generated through the difference between the current and historical control amounts of adjacent joints, to correct the control delay (such as 0.05 seconds) caused by mechanical transmission and signal transmission, and to ensure synchronous motion of multiple joints.
[0078] The mode dual-closed-loop control unit is used for: in a wheeled mode, a double closed loop is composed of a speed outer loop (with a target speed as a threshold) and an attitude inner loop (based on IMU feedback), and when the inclination angle exceeds the threshold, the attitude control weight is automatically increased to balance the speed and attitude stability.
[0079] In a legged mode, the PID parameters (such as proportional gain and differential gain) of each joint are adjusted in advance in combination with the terrain prediction data of the laser radar, and a second derivative compensation term is introduced to adapt to the motion requirements of complex terrain.
[0080] The cooperative control module realizes efficient cooperation of multiple robot modules and solves the problems of communication delay and power distribution.
[0081] The cooperative control module includes:
[0082] The distributed cooperative unit is used for: each robot module independently runs PID control, while obtaining the historical control amount of the neighbor node (considering a 0.1 second communication delay) through a communication bus, calculating the difference between the local control amount and the neighbor node control amount, and generating a delay compensation term through a cooperative weight factor weighting, and adding it to the local control amount.
[0083] The power distribution optimization unit is used for: based on the cooperative coupling matrix, optimizing the joint control amount of a multi-machine combination (such as a quadruped mode), sharing and distributing energy and driving capacity through a power bus, improving overall load capacity and reducing energy consumption.
[0084] A learning and optimization module, based on reinforcement learning, realizes autonomous optimization of PID parameters, and improves adaptability to unknown environments.
[0085] The learning and optimization module comprises:
[0086] The state perception and data fusion unit is configured to: collect terrain roughness (based on laser radar point cloud), current gait mode (based on encoder and IMU data), control accuracy (based on joint angle error entropy value), and energy consumption data in real time, and construct a four-dimensional state space.
[0087] The PPO algorithm optimization unit is configured to: internally store a pre-trained PPO reinforcement learning model (containing a policy network and a value network), the policy network outputs a PID parameter adjustment strategy according to real-time states, and the value network evaluates state values to assist optimization; the model is guided to autonomously learn through a reward function (comprising control error, energy consumption efficiency, and motion smoothness), so as to realize adaptive adjustment of parameters in unknown terrains without human intervention.
[0088] The mode switching module is configured to: realize smooth transition between wheeled and footed modes, and reduce switching impact.
[0089] The mode switching module comprises:
[0090] The parameter transition unit is configured to: calculate a transition coefficient a(t) by using a quintic polynomial function, perform linear interpolation on proportional, integral, and derivative gains, and smoothly transition parameters from a wheeled mode to a footed mode; during the transition process, the PPO algorithm is used to optimize the dynamic characteristics of a(t), so as to balance control accuracy, energy consumption, and smoothness.
[0091] The impact suppression unit is configured to: in the footed landing phase, real-time adjust a control amount in combination with joint angular velocity and angular acceleration directions; in an optimal scheme, a sliding mode surface containing a joint coupling term and a high-frequency switching control law are introduced, the sliding mode surface (containing a joint coupling coefficient) is used to perceive coupling interference, the switching control term is used to output a compensation amount at a high frequency, and the motion interference of a hip joint and a knee joint is actively offset, so as to further reduce switching impact.
[0092] Finally, it should be noted that the above only describes preferred embodiments of the present application and is not intended to limit the present application. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments, or equivalently replace some technical features, and any modification, equivalent replacement, improvement, etc. within the spirit and principles of the present application shall be included in the protection scope of the present application.
[0093] The above are preferred embodiments of the present application, but not to limit the protection scope of the present application, therefore: any equivalent changes made according to the structure, shape, principle of the present application should be covered within the protection scope of the present application.
Claims
1. A PID control and gait planning method for a myriapod composite structure, characterized in that, The method comprises the steps of: establishing a PID control model with a coupling compensation term; calculating the joint angle error, compensating the motion interference of adjacent joints according to the PID control model with the coupling compensation term, and correcting the control delay for the first threshold value using the historical control amount difference; in the wheeled mode, the outer ring controls the speed with the second threshold value as the target, and the inner ring corrects the attitude according to the IMU feedback; in the legged mode, the PID parameters are adjusted in advance according to the laser radar prediction to improve the adaptability to complex terrain; real-time collection of terrain, gait, control precision and energy consumption data, automatic adjustment of PID parameters based on the PPO algorithm to improve the control precision of the robot in unknown terrain; independent PID control of each robot module, adjustment of the parameters of the robot itself according to the control amount of the neighbor node for the fourth threshold value communication delay, linear interpolation of the PID parameters when switching between the wheeled mode and the legged mode, and adjustment of the control amount according to the joint angular velocity and angular acceleration direction to reduce the switching impact during the landing of the legged mode.
2. The PID control and gait planning method for a wheel-legged hybrid structure according to claim 1, wherein, The control equation of the PID control model with the coupling compensation term is: ; For the basic PID control calculation, a preliminary control amount is generated based on the current error, accumulated error and error rate of change, respectively; For the coupling compensation term, the preliminary control amount is modified, u i (t) is the control amount of the i-th joint, e i (t) is the joint angle error, K p,i (t) is the time-varying proportional gain, K i,i is the integral gain, K d,i is the differential gain; C i,j is the joint coupling coefficient matrix, which is used to describe the degree of mutual influence between different joints, u j (t) is the control amount of the j-th joint at time t, u j (t-T d ) is the control amount of the j-th joint at time t-T d .
3. The PID control and gait planning method for a wheel-legged hybrid structure according to claim 1, wherein, calculating the joint angle error, compensating the motion interference of adjacent joints according to the PID control model with the coupling compensation term, including: obtaining the actual angle values of each joint through the encoder, subtracting the target angle values in the preset trajectory to obtain the angle error; based on the PID control model with the coupling compensation term, the control amount of each joint is calculated, the motion interference degree between the joints is quantified through a predefined coupling coefficient matrix, and the control delay caused by mechanical transmission is compensated by using the control amount difference between the current time and the historical time.
4. The PID control and gait planning method for a wheel-legged hybrid structure according to claim 1, wherein, for the first threshold value of the control delay, the historical control amount difference is corrected, including: obtaining the control amount of the adjacent joint at the current time and the historical time, calculating the difference as the delay compensation signal; multiply the difference by the predefined joint coupling coefficient matrix to generate the coupling compensation term, which is added to the PID control amount of the current joint.
5. The PID control and gait planning method for a wheel-legged hybrid structure according to claim 1, wherein, the outer ring controls the speed with the second threshold value as the target, including: collecting the wheel group speed through the encoder in real time and comparing it with the target value to generate a speed error, and calculating a preliminary control amount through a PID algorithm; the inner ring corrects the attitude according to the IMU feedback, including: the attitude inner ring takes the real-time attitude data provided by the IMU as the feedback, obtains the three-axis angular velocity and acceleration through high-frequency sampling, fuses the data by using a complementary filtering algorithm, and calculates the pitch angle and roll angle, compares them with the preset attitude reference to generate an attitude error; when the inclination exceeds the third threshold value, the attitude control weight is increased, including: when the IMU detects that the inclination exceeds the third threshold value, the attitude control weight is automatically increased from the default value to 0.6, and the correction force of the vehicle body inclination is enhanced.
6. The PID control and gait planning method for a wheel-legged hybrid structure according to claim 1, wherein, In the foot mode, the PID parameters are adjusted in advance according to the prediction of the laser radar, including: acquiring the terrain elevation data in real time through continuous scanning of the laser radar and constructing a three-dimensional terrain model; analyzing the acquired terrain data to identify complex terrain features such as gullies, slopes and steps; adjusting the PID control parameters in advance based on the set prediction time window; dynamically optimizing the proportional gain, integral gain and differential gain of each joint according to the identified terrain type and trend, and introducing a second derivative compensation term to correct the control quantity according to the predicted terrain change trend.
7. The PID control and gait planning method for a wheel-legged hybrid structure according to claim 1, wherein, Real-time acquisition of terrain, gait, control accuracy and energy consumption data, automatic adjustment of PID parameters based on PPO algorithm includes: acquiring terrain point cloud data through real-time scanning of the laser radar to calculate the terrain roughness index, identifying the current gait using encoder and IMU data, calculating error entropy values based on joint angle error sequences to represent control accuracy, and monitoring energy consumption data to construct a four-dimensional state space containing terrain, gait, control accuracy and energy consumption data indicators; input the real-time state into the pre-trained PPO algorithm model, the pre-trained PPO algorithm model used is a reinforcement learning model based on the proximal policy optimization framework, which includes a policy network and a value network, the policy network is used to output the adjustment amount of the PID parameters, and the value network is used to evaluate the value of the current state to assist policy optimization, the reinforcement learning model has initial decision-making ability through training on various terrain and gait scenarios; the pre-set reward function integrates control error, energy efficiency and smoothness through weighting, the control error is calculated by the deviation between the actual joint angle and the target angle, the smaller the deviation, the higher the reward value; energy efficiency is calculated based on energy consumption per unit time, the lower the energy consumption, the higher the reward value; smoothness is calculated by the fluctuation of joint angle change rate, the smaller the fluctuation, the higher the reward value, the weights of the three are set in the order of control error being the highest, energy efficiency being the second, and smoothness being the third; after the real-time state is input into the reinforcement learning model, the policy network outputs the adjustment strategy of proportional, integral and differential gains according to the current state, which is directly used to update the parameters of the current PID controller.
8. The PID control and gait planning method for a wheel-legged hybrid structure according to claim 1, wherein, Each robot module has independent PID control, and for the fourth threshold communication delay, the parameters of each robot module are adjusted according to the control quantity of the neighbor node, including: each robot module uses local sensor data to perform PID calculation independently, generates an initial control quantity, and for the communication delay between modules, acquires the control quantity data of the neighbor node at the delay time, calculates the difference between the current control quantity and the historical control quantity of the neighbor node, weights the difference with a coordination weight factor, generates a communication delay compensation term and adds it to the local control quantity.
9. The PID control and gait planning method for a wheel-legged hybrid structure according to claim 1, wherein, During wheel-foot mode switching, linearly interpolate PID parameters, and in the foot landing phase, adjust the control amount according to the joint angular velocity and angular acceleration direction, including: after the wheel-foot mode switching is started, taking the preset total switching time T as the reference, defining the current time in the switching process as t, calculating the transition coefficient α(t) through a quintic polynomial function, wherein the value of the transition coefficient α(t) is smoothly increased from 0 to 1 with t, which is used to quantify the transition degree from the wheel mode to the foot mode; for the proportional gain, the integral gain and the differential gain, respectively, linear interpolation formula is used for parameter transition; in the transition process, the dynamic characteristics of the transition coefficient α(t) are optimized by using a pre-trained PPO algorithm model, the state space of the model includes the current transition coefficient α(t), the joint angle error, the parameter change rate and the energy consumption rate; the action space is the adjustment amount of the transition coefficient. 10.An electronic device, comprising: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the PID control and gait planning method of the wheel-foot composite structure of claim 1.
Citation Information
Patent Citations
Predictive control method and device for wheeled robot and wheeled robot
CN116679706A
Robot control method and apparatus, robot, computer-readable storage medium, and computer program product
US20240176365A1