The pursuit of advanced automation in agricultural and field operations has catalyzed significant interest in legged robotic platforms. Among these, the bionic robot, specifically the quadrupedal configuration, offers unparalleled advantages in traversing unstructured and complex terrains due to its bio-inspired locomotion strategies, mirroring the agility and adaptability of four-legged mammals. This class of bionic robot presents a compelling balance between mechanical complexity and inherent stability, making it a superior candidate for applications where wheeled or tracked vehicles falter. The embodiment of force and mobility in such systems often relies on hydraulic actuation, prized for its high power density and robustness. However, the hydraulic servo-drive systems integral to these bionic robots introduce pronounced challenges, including inherent nonlinearities, parameter time-variance, and sensitivity to load disturbances. These factors can severely degrade control performance, leading to undesirable high-frequency vibrations during steady-state locomotion, which in turn compromises the bionic robot’s gait stability and energy efficiency.
Traditional control paradigms, such as the ubiquitous Proportional-Integral-Derivative (PID) controller, are frequently employed in hydraulic automation for their simplicity and effectiveness in linear, time-invariant scenarios. Yet, their fixed-gain structure is fundamentally ill-suited for managing the complex, nonlinear dynamics of a legged bionic robot’s hydraulic joints. The inability of a conventional PID controller to adapt to changing system parameters and nonlinear effects results in suboptimal performance, characterized by oscillatory responses and reduced tracking accuracy during dynamic motions like walking or trotting.
To address these critical limitations and effectively suppress vibration while enhancing the steady-state walking performance of the hydraulic bionic robot, this work introduces an intelligent control synthesis. We propose and implement an Adaptive Particle Swarm Optimization (PSO) algorithm to dynamically optimize the parameters of a position inner-loop PID controller. This hybrid strategy synergizes the structural simplicity of PID control with the powerful global search and adaptive capabilities of the PSO metaheuristic. The algorithm enables the PID controller to rapidly converge to an optimal parameter set through stochastic population-based search and global information sharing, effectively tailoring the control action to the bionic robot’s real-time dynamic state. This optimization significantly improves the transmission performance and disturbance rejection of the hydraulic servo system. Our approach is validated through a comprehensive methodology encompassing mathematical modeling, simulation in MatLab/Simulink, and experimental trials on a physical bionic robot prototype employing a trotting gait. Results conclusively demonstrate that the Adaptive PSO-optimized PID controller delivers superior dynamic response, enhanced robustness, and greater control precision compared to its conventional counterpart, ensuring stable and smooth locomotion for the bionic robot.

Mechanical Architecture of the Bionic Robot
The developed bionic robot platform is a quadrupedal system comprising a central torso and four identical, kinematically independent legs. The leg configuration is bio-mimetic, adopting an “elbow-in-front, knee-in-back” posture commonly observed in quadrupedal mammals, which is advantageous for weight distribution and stride efficiency. Each leg of the bionic robot is a serial chain of three actuated segments: the abduction/adduction joint (hip yaw), the thigh (hip pitch), and the shank (knee pitch). Consequently, the entire bionic robot is driven by twelve independent hydraulic servo actuators. A critical design feature is the integration of passive elastic elements at the foot-end. These components serve as mechanical filters, absorbing and dissipating the high-impact shock loads generated during the foot-strike phase of the gait cycle, thereby protecting the actuator joints from damaging rigid impacts and contributing to a more natural and energy-efficient gait for the bionic robot.
Mathematical Modeling of the Hydraulic Servo System
Accurate control necessitates a faithful dynamic model. The hydraulic servo system for each joint of the bionic robot is modeled as a cascade of key components.
Servo Valve Dynamics
The servo valve, which includes a torque motor and spool assembly, converts the control signal (error voltage) into hydraulic flow. The torque amplifier is modeled as a simple gain, \(K_a\). The valve’s spool dynamics, which relate the driving current \(I\) to the output flow rate \(Q\), are represented by a second-order transfer function to capture its frequency response characteristics:
$$ \frac{Q(s)}{I(s)} = \frac{K_v \omega_v^2}{s^2 + 2\xi_v\omega_v s + \omega_v^2} $$
where \(K_v\) is the valve flow gain, \(\omega_v\) is the valve’s natural frequency, and \(\xi_v\) is its damping ratio.
Actuator and Load Dynamics
The hydraulic cylinder, coupled with the inertial and compliant load of the bionic robot’s leg segment, is typically modeled as an integrator plus a second-order oscillatory system. Its nominal transfer function from flow \(Q\) to piston position \(Y\) is:
$$ G(s) = \frac{Y(s)}{Q(s)} = \frac{\omega_n^2 / A_p}{s(s^2 + 2\xi\omega_n s + \omega_n^2)} $$
where \(A_p\) is the piston area, \(\omega_n\) is the hydraulic-mechanical natural frequency, and \(\xi\) is the associated damping ratio. To account for the critical effect of external load forces \(F_L\) (e.g., ground reaction forces on the bionic robot), a disturbance transfer function is defined:
$$ G_d(s) = \frac{Y(s)}{F_L(s)} = \frac{-(K_{ce}/A_p^2)(1 + \frac{V_t}{4\beta_e K_{ce}}s)}{s(s^2 + 2\xi\omega_n s + \omega_n^2)} $$
Here, \(K_{ce}\) is the total flow-pressure coefficient, \(V_t\) is the total compressed volume, and \(\beta_e\) is the effective bulk modulus of the hydraulic fluid.
Integrated System Block Diagram
Combining the valve and actuator models, and incorporating a PID controller in the position feedback loop, yields the complete block diagram of the hydraulic servo system for a single joint of the bionic robot, as shown in the conceptual figure below. The controller’s objective is to minimize the error \(e(t) = r(t) – y(t)\), where \(r(t)\) is the desired joint trajectory.
Principle of the Adaptive PSO-Optimized PID Controller
The core innovation lies in using the Adaptive PSO algorithm to continuously and automatically tune the three PID gains \(K_p\), \(K_i\), and \(K_d\). The controller structure employs the standard PID form with error \(e(t)\) as input, but its parameters are not static. They are treated as particles in a swarm, being iteratively updated to optimize system performance.
Foundations of Particle Swarm Optimization
In PSO, a population (swarm) of \(m\) candidate solutions, called particles, explores the \(D\)-dimensional search space. For PID tuning, \(D=3\), with each dimension corresponding to one gain. The position of the \(i\)-th particle at iteration \(n\) is a vector \(\mathbf{X}_i^n = [K_{p,i}^n, K_{i,i}^n, K_{d,i}^n]\). Each particle’s position represents a potential PID parameter set. The quality of this set is evaluated by a fitness function \(F\). For the bionic robot’s servo control, we adopt the Integral of Time-weighted Absolute Error (ITAE) to penalize persistent errors:
$$ F(\mathbf{X}_i) = \int_{0}^{T} t \cdot |e(t, \mathbf{X}_i)| \, dt $$
A lower \(F\) indicates better performance (faster, less oscillatory response). Each particle remembers its best historical position (\(\mathbf{P}_{best,i}\)) and knows the best position found by the entire swarm (\(\mathbf{G}_{best}\)). The particles navigate the space by updating their velocity \(\mathbf{V}_i\) and position each iteration:
$$ \mathbf{V}_i^{n+1} = w^n \mathbf{V}_i^n + c_1 r_1^n (\mathbf{P}_{best,i}^n – \mathbf{X}_i^n) + c_2 r_2^n (\mathbf{G}_{best}^n – \mathbf{X}_i^n) $$
$$ \mathbf{X}_i^{n+1} = \mathbf{X}_i^n + \mathbf{V}_i^{n+1} $$
Here, \(c_1\) and \(c_2\) are acceleration coefficients (typically set to 2), \(r_1, r_2 \in U(0,1)\) are random numbers, and \(w\) is the crucial inertia weight.
Adaptive Inertia Weight Strategy
The inertia weight \(w\) balances global exploration (high \(w\)) and local exploitation (low \(w\)). Using a fixed \(w\) can lead to premature convergence or sluggish refinement. We implement an adaptive strategy where \(w\) for each particle is adjusted based on its fitness relative to the swarm’s average:
$$ w_i^n = \begin{cases}
w_{min} + \frac{(w_{max} – w_{min})(f_i^n – f_{min}^n)}{f_{avg}^n – f_{min}^n}, & \text{if } f_i^n \le f_{avg}^n \\
w_{max}, & \text{if } f_i^n > f_{avg}^n
\end{cases} $$
where \(f_i^n\) is the fitness of particle \(i\), \(f_{avg}^n\) and \(f_{min}^n\) are the average and minimum fitness in the swarm at iteration \(n\), and \(w_{max}\), \(w_{min}\) are the bounds for the inertia weight. This adaptation allows particles with below-average performance to perform wider searches, while those with above-average performance focus on fine-tuning their current region, enhancing the overall convergence efficiency for the bionic robot’s control problem.
Real-Time PID Parameter Optimization Process
The Adaptive PSO-PID control system operates as follows: The inner loop is a standard digital PID controller generating the command voltage for the servo valve based on the joint position error. In parallel, the Adaptive PSO algorithm module periodically (or triggered by significant error) executes an optimization cycle. It uses the recent system response (error signal) to evaluate the fitness of the current PID parameters (a particle). It then updates the entire swarm according to the rules above, and the newly found \(\mathbf{G}_{best}\) parameters are downloaded to the PID controller. This creates an adaptive control law that self-tunes to maintain optimal performance as the bionic robot’s dynamics change during locomotion.
| Component | Parameter | Symbol | Value | Unit |
|---|---|---|---|---|
| Hydraulic Cylinder & Load | Piston Area | \(A_p\) | \(4.9 \times 10^{-4}\) | m² |
| Total Volume | \(V_t\) | \(4.17 \times 10^{-5}\) | m³ | |
| Bulk Modulus | \(\beta_e\) | \(6.9 \times 10^8\) | Pa | |
| Flow-Pressure Coefficient | \(K_{ce}\) | \(6.14 \times 10^{-12}\) | m³/(s·Pa) | |
| Natural Frequency | \(\omega_n\) | 69.12 | rad/s | |
| Damping Ratio | \(\xi\) | 0.35 | – | |
| Servo Valve | Amplifier Gain | \(K_a\) | 45 | – |
| Flow Gain | \(K_v\) | \(1.82 \times 10^{-3}\) | m³/(s·A) | |
| Natural Frequency | \(\omega_v\) | 157 | rad/s | |
| Damping Ratio | \(\xi_v\) | 0.7 | – | |
| PSO Algorithm | Swarm Size | \(m\) | 50 | – |
| Dimensions | \(D\) | 3 | – | |
| Acceleration Constants | \(c_1, c_2\) | 2 | – | |
| Inertia Weight Bounds | \(w_{max}, w_{min}\) | 1.2, 0.2 | – | |
| Max Iterations | \(N_{max}\) | 50 | – | |
| Velocity Limits | \(V_{max}\) | ±30% of search range | – |
Simulation Analysis and Results
To validate the proposed control strategy before implementation on the physical bionic robot, a high-fidelity simulation model was constructed in MatLab/Simulink using the parameters listed in Table 1.
Convergence Performance of the Adaptive PSO
The efficacy of the optimization engine itself was first tested. The algorithm was tasked with minimizing the ITAE fitness function for a step response. Figure 1 (conceptual plot) illustrates the characteristic convergence of the best fitness value over iterations. The Adaptive PSO consistently converged to a minimum fitness within 10-15 iterations across multiple runs, demonstrating its rapid search capability and stability. This fast convergence is essential for the real-time or near-real-time tuning requirements of the dynamic bionic robot.
Sinusoidal Tracking and Disturbance Rejection
A critical test for a locomotion controller is tracking smooth, cyclic trajectories while rejecting disturbances. The system was commanded to track a sinusoidal position reference \(r(t) = 30\sin(6.3t + \pi/10)\) mm. A periodic load disturbance \(F_L(t) = 50\sin(20t)\) N was injected to simulate varying ground reaction forces on the bionic robot’s leg.
Conventional PID Control: The fixed-gain PID controller achieved basic tracking but exhibited significant high-frequency oscillations, particularly around the peaks of the sine wave where acceleration is highest. The disturbance directly excited these oscillations, as seen in a simulated output plot, indicating poor robustness and damping.
Adaptive PSO-PID Control: In stark contrast, the optimized controller provided nearly perfect tracking. The output signal overlapped the reference with negligible phase lag or amplitude distortion. More importantly, the high-frequency vibrations were almost completely suppressed, and the system showed remarkable insensitivity to the applied load disturbance. This simulation conclusively proved that the Adaptive PSO algorithm successfully tunes the PID gains to achieve a control law that optimally manages the nonlinear hydraulic dynamics, ensuring precise and smooth motion for the simulated bionic robot joint.
Experimental Validation on a Bionic Robot Prototype
The simulation findings were physically validated on a custom-built quadrupedal bionic robot prototype designed for dynamic locomotion.
Hardware and Control System Implementation
The bionic robot’s control system is hierarchical. A central main computer handles high-level gait planning and coordination. Each leg is managed by a dedicated local controller based on a PC/104 stack. This leg controller executes the low-level Adaptive PSO-PID servo algorithm for its three joints. Sensory feedback for each joint is provided by position sensors, with signals conditioned and digitized by an A/D module. The computed PID output is converted to an analog voltage command via a D/A module to drive the servo valve. The Adaptive PSO optimization routine runs on the main computer, which periodically updates the PID parameters for each joint controller via a real-time communication network.
| Gait Parameter | Symbol | Value |
|---|---|---|
| Gait Type | – | Trotting (Diag. Gait) |
| Stride Length | \(S\) | 200 mm |
| Step Height | \(H\) | 50 mm |
| Gait Cycle Period | \(T\) | 2.0 s |
| Desired Touchdown Velocity | \(V_0\) | 30 mm/s |
| Controller Sampling Time | \(T_s\) | 1 ms |
Walking Test Results and Comparative Analysis
The bionic robot was tasked with performing steady-state trotting locomotion on a flat surface using the parameters in Table 2. Experiments were conducted first with conventional PID control and then with the Adaptive PSO-PID control. The resulting joint angle trajectories for the thigh and shank actuators were recorded.
Under conventional PID control, the bionic robot was able to walk but with noticeable whole-body jerking and vibration. The recorded joint trajectories showed clear high-frequency noise and tracking error, especially during the transition between swing and stance phases (foot impact). This correlated directly with the observed shaky locomotion.
When switched to the Adaptive PSO-PID control, the improvement was dramatic. The bionic robot’s walk became visibly smoother and more stable. The recorded joint trajectories showed clean, precise tracking of the desired sine-based foot trajectory. The high-frequency noise was eliminated, and the impact-induced disturbances were effectively damped out by the adaptively tuned controller. The experimental data closely mirrored the simulation predictions, confirming the fidelity of the model and the real-world efficacy of the proposed method. The enhanced vibration suppression directly translates to reduced mechanical stress on the bionic robot’s structure, lower energy consumption, and the potential for higher-speed, more stable gaits.
Conclusion
This work successfully addressed the core challenge of controlling highly nonlinear and time-variant hydraulic servo systems in a legged bionic robot. The integration of an Adaptive Particle Swarm Optimization algorithm with a standard PID control framework has proven to be a highly effective solution. The key contributions and findings are:
- The proposed Adaptive PSO-PID controller exhibits strong self-adaptive capabilities and rapid convergence. It can efficiently perform a global search in the parameter space and dynamically locate optimal or near-optimal PID gains in response to the changing dynamics of the bionic robot, fulfilling the requirements of real-time control.
- Both simulation and extensive physical experiments on a bionic robot prototype confirm that the Adaptive PSO-PID control strategy significantly outperforms conventional fixed-gain PID control. It provides superior dynamic tracking accuracy and, most critically, effectively suppresses the high-frequency vibrations induced by hydraulic nonlinearities and time-varying parameters such as load disturbances.
- By drastically improving the steady-state precision and disturbance rejection of the hydraulic servo drives, this control method directly enables smoother, more stable, and more robust locomotion for the bionic robot. It effectively mitigates the jerkiness and oscillation that often plague hydraulic legged machines.
- The achieved level of joint-level control stability and accuracy establishes a crucial foundation for implementing more advanced whole-body control strategies for the bionic robot. With stable and precise low-level actuators, the path is paved for implementing force-based impedance control or hybrid force/position control at each joint. This would endow the bionic robot with active compliance, allowing it to intelligently interact with uncertain environments—such as absorbing shocks from uneven terrain or modulating foot force during interaction—thereby significantly enhancing its autonomy and operational capability in real-world agricultural and field scenarios. The advancement from a vibration-prone system to a smoothly operating platform marks a substantial step forward in the practical deployment of powerful hydraulic bionic robots.
