The exploration of marine environments presents significant challenges, demanding robust and efficient robotic platforms. Among various propulsion methods, bio-inspired systems offer remarkable advantages in terms of efficiency, maneuverability, and reduced acoustic signature. This article details the comprehensive design, development, and testing of a novel bionic robot that mimics the paddling locomotion of aquatic insects, specifically diving beetles. The focus is on creating a streamlined mechanical design, a robust hardware-software control architecture centered on an STM32 microcontroller, and the implementation of an intelligent Fuzzy-PID control strategy to govern its underwater motion. The subsequent sections elaborate on the design philosophy, system integration, control algorithm, and experimental validation of this bionic robot.

The fundamental inspiration for this bionic robot stems from the locomotive mechanisms of coleopteran insects like the diving beetle (Dytiscidae). These insects employ paired, segmented hind legs for powerful thrust generation. The key biomechanical principles adapted include: a multi-segmented limb structure that facilitates a compound paddling stroke, passive joint flexion using elastic elements to simplify actuation, and anisotropic drag properties via deployable swimming paddles. This bio-inspired approach distinguishes our bionic robot from many existing platforms that often rely on complex multi-motor active joints or emulate larger vertebrates like frogs or otters. The core mechanical structure, as depicted, consists of three primary links mimicking the insect’s femur, tibia, and tarsus. The length ratios between these links are proportionally scaled from biological measurements. Crucially, flexible silicone membranes are integrated at the inter-segment joints. These membranes provide restorative torsional stiffness, allowing the joints to bend passively during the power and recovery strokes. This elegant solution grants the necessary degrees of freedom for effective paddling while drastically reducing the number of actuators and associated control complexity compared to a fully active joint system.
The distal segment of the limb features an innovative, two-part swimming paddle connected by a flexible hinge. This design is central to achieving anisotropic drag—a higher drag coefficient during the power stroke and a lower one during the recovery stroke. During the power stroke (leg moving posteriorly), water pressure forces the two paddle sections to deploy into a larger, planar surface area, maximizing thrust. Conversely, during the recovery stroke (leg moving anteriorly), hydrodynamic forces cause the paddles to collapse, presenting a smaller, streamlined profile that minimizes backward drag. This passive morphing mechanism significantly enhances the net propulsive efficiency of the bionic robot. For directional control and stability, a rudder mechanism is installed at the stern, actuated by a high-torque servo. The central waterproof compartment houses the entire electronic control system and the power source, ensuring buoyancy and balance are maintained.
Hardware Architecture of the Control System
The real-time motion control of the bionic robot is orchestrated by a custom-designed electronic system built around a high-performance STM32F407ZGT6 microcontroller unit (MCU). This MCU was selected for its robust computational power, rich peripheral set (multiple timers, USARTs, ADCs), and low-power operational modes, which are essential for autonomous underwater applications. The hardware architecture is modular, comprising several key subsystems as summarized in the table below.
| Module | Component/Model | Primary Function |
|---|---|---|
| Core Controller | STM32F407ZGT6 MCU | Central processing unit for sensor data fusion, control algorithm execution, and actuator command generation. |
| Power Management | 3x 18650 Li-ion Cells (11.1V), DC-DC Converters (5V, 3.3V) | Provides stable primary voltage (11.1V) for servos and regulated low voltages for MCU and sensors. |
| Wireless Communication | Dual APC220 RF Modules (433MHz) | Enables bidirectional, low-latency data telemetry and command transmission between the robot and the surface station. |
| Motion Sensing | JY901S 9-Axis IMU (Gyro, Accel, Magnetometer) | Measures real-time attitude (roll, pitch, yaw), angular rates, and linear accelerations for state feedback. |
| Actuation | XW540-T140-R Smart Servo (for paddling) Standard Servo (for rudder) |
Drives the paddling leg in position/speed mode and controls the rudder angle for steering. |
| Programming & Debug | SWD (Serial Wire Debug) Interface | Facilitates firmware upload, in-circuit debugging, and real-time variable monitoring. |
The power system is based on an 11.1V lithium-ion battery pack. This voltage is used directly to drive the high-torque servos. Efficient switching regulators step down this voltage to a stable 5V and 3.3V supply for the MCU, sensors, and communication modules, ensuring noise-free operation. A dual-channel wireless communication system was implemented using two APC220 modules. This configuration provides redundancy and allows dedicated channels for uplink (commands) and downlink (sensor data), effectively mitigating potential latency or packet collision issues in a single-channel setup, which is critical for responsive closed-loop control of the bionic robot.
State estimation is paramount for autonomous control. The JY901S Inertial Measurement Unit (IMU) provides high-fidelity orientation data with a static accuracy of 0.2° and a resolution of 0.0055°. Its onboard sensor fusion algorithm outputs stable Euler angles and quaternions, which are essential for determining the robot’s posture in the water. The primary propulsion is achieved using a Dynamixel XW540-T140-R smart servo. This actuator can operate in several control modes; for this application, it is configured in Position Control Mode to execute a precise, repetitive angular profile that drives the paddling leg. A simpler, high-torque servo is used for the rudder, controlled via standard PWM signals.
Software System and Control Interface
The software ecosystem for this bionic robot is bifurcated into the embedded firmware running on the STM32 MCU and a graphical user interface (GUI) application running on a host PC. The firmware is developed in C/C++ using the STM32CubeIDE framework and HAL libraries. It handles low-level tasks including: periodic sampling of IMU data via UART, parsing of incoming RF commands, execution of the core control algorithm (e.g., Fuzzy-PID), generation of servo control signals, and packaging of telemetry data for transmission.
The host-side software is a dedicated application developed using the Microsoft .NET Framework’s Windows Forms (WinForms) and the C# programming language. This GUI serves as the primary command, control, and monitoring station. Its architecture and functional flow are designed for intuitive operation and comprehensive data analysis, which is crucial for tuning and evaluating the bionic robot‘s performance.
The control flowchart for the host application is as follows: Upon launch, the application scans and pairs with the robot’s wireless COM ports. A handshake protocol confirms a successful bidirectional link. The operator then configures the system through dedicated interface panels: the Servo Parameter Panel sets the operating mode, ID, and limits for each servo, while the Control Mode Panel selects the control strategy (e.g., manual, Fuzzy-PID) and tunes its parameters (e.g., PID gains, fuzzy rule sets). After configuration, a master control button initiates the robotic operation. The GUI’s Data Display Panel visualizes real-time sensor streams (attitude angles, angular velocity) and actuator feedback. All incoming telemetry data is simultaneously logged to a timestamped file for post-experiment analysis. This seamless integration of configuration, real-time monitoring, and data logging forms a powerful toolchain for developing and refining the bionic robot‘s autonomous capabilities.
Mathematical Modeling and Fuzzy-PID Control Strategy
Effective control of an underwater bionic robot requires dealing with nonlinear dynamics, time-varying hydrodynamic forces, and inherent system uncertainties. A classic Proportional-Integral-Derivative (PID) controller, while simple, often struggles with these complexities. To enhance robustness and adaptability, a Fuzzy-PID control scheme was designed and implemented.
The robot’s motion in the horizontal plane can be described by simplified kinetic equations. Let the robot’s state be defined by its surge velocity \( u \), sway velocity \( v \), and yaw rate \( r \). The forces and moments come from paddle thrust \( X_{paddle} \), rudder force \( Y_{rudder} \), and hydrodynamic damping. A simplified model for heading control is:
$$
I_z \dot{r} + D_r r = N_{rudder} + N_{paddle}
$$
where \( I_z \) is the moment of inertia about the vertical axis, \( D_r \) is the damping coefficient, \( N_{rudder} \) is the yaw moment generated by the rudder, and \( N_{paddle} \) represents any asymmetric thrust from the paddling leg. The control objective is to maintain a desired heading \( \psi_d \) by minimizing the yaw error \( e_{\psi}(t) = \psi_d(t) – \psi(t) \).
The Fuzzy-PID controller regulates the rudder angle \( \delta \) based on \( e_{\psi} \) and its derivative \( \dot{e}_{\psi} \). The PID controller output \( u_{PID} \) is given by:
$$
u_{PID}(t) = K_p e_{\psi}(t) + K_i \int_0^t e_{\psi}(\tau) d\tau + K_d \frac{d e_{\psi}(t)}{dt}
$$
where \( K_p \), \( K_i \), and \( K_d \) are the proportional, integral, and derivative gains, respectively. In the Fuzzy-PID scheme, these gains are not fixed but are dynamically adjusted online by a fuzzy inference system based on the magnitude of \( e_{\psi} \) and \( \dot{e}_{\psi} \).
The fuzzy logic component uses these two inputs, each fuzzified with membership functions (e.g., Negative Big (NB), Negative Small (NS), Zero (ZE), Positive Small (PS), Positive Big (PB)). A rule base defines how to adjust the PID gains. For example:
- IF \( e_{\psi} \) is PB AND \( \dot{e}_{\psi} \) is ZE, THEN \( \Delta K_p \) is PB, \( \Delta K_i \) is ZE, \( \Delta K_d \) is PS.
- IF \( e_{\psi} \) is ZE AND \( \dot{e}_{\psi} \) is NS, THEN \( \Delta K_p \) is PS, \( \Delta K_i \) is NS, \( \Delta K_d \) is NB.
The fuzzy inference engine processes these rules, and the resulting fuzzy outputs for \( \Delta K_p, \Delta K_i, \Delta K_d \) are defuzzified to crisp values. The final adaptive gains are:
$$
K_p^{adj} = K_p^{base} + \Delta K_p, \quad K_i^{adj} = K_i^{base} + \Delta K_i, \quad K_d^{adj} = K_d^{base} + \Delta K_d
$$
This adaptive mechanism allows the bionic robot to respond aggressively with a high \( K_p \) when the heading error is large, increase damping (\( K_d \)) when the error is changing rapidly, and fine-tune with the integral term (\( K_i \)) when the error is small and persistent. This hybrid strategy leverages the precision of PID and the heuristic, nonlinear adaptability of fuzzy logic, making it highly suitable for the dynamic underwater environment.
Experimental Testing and Performance Analysis
The developed bionic robot prototype and its control system were subjected to comprehensive testing in a controlled water tank measuring 5.5m × 1.8m × 2m. The primary objective was to validate the locomotion capability and evaluate the performance of the Fuzzy-PID heading control system. The robot was tasked with swimming straight for a distance of approximately 4 meters. Its trajectory and attitude data were recorded via the wireless telemetry link.
Qualitative and quantitative observations were made. The segmented leg with the passive paddle successfully generated effective forward thrust, confirming the bio-inspired mechanical design. The most significant tests involved the Fuzzy-PID controller. During straight-line swimming, external disturbances (e.g., water currents from tank circulation, minor buoyancy shifts) or inherent asymmetries in the paddle stroke would cause the robot to deviate from its intended path. The Fuzzy-PID controller demonstrated excellent corrective behavior. Upon detection of a yaw error, the controller promptly calculated and applied an appropriate rudder deflection. The adaptive gain adjustment enabled a swift initial response to arrest the deviation, followed by a smooth return to the desired heading without significant overshoot or oscillation.
The recorded path closely approximated a straight line, with a maximum cross-track error of less than 0.15 meters over the 4-meter run. This performance is summarized in the table below, comparing the desired outcome with the Fuzzy-PID controlled result against a benchmark of a fixed-gain PID controller tested under similar conditions.
| Performance Metric | Desired Target | Fuzzy-PID Controller | Fixed-Gain PID (Benchmark) |
|---|---|---|---|
| Maximum Cross-Track Error | 0 m | < 0.15 m | 0.25 – 0.40 m |
| Settling Time after Disturbance | Minimal | ~ 2.5 seconds | ~ 4.0 seconds |
| Overshoot | None | Negligible | Moderate (~10% of error) |
| Path Smoothness | Straight Line | High | Moderate, with slight weaving |
The data clearly indicates the superiority of the Fuzzy-PID approach for this application. The fixed-gain PID controller, while functional, exhibited slower response and a tendency to oscillate or overshoot, leading to a less stable and efficient path. The adaptive nature of the Fuzzy-PID allowed the bionic robot to handle the nonlinear hydrodynamic effects more effectively, resulting in faster convergence, better stability, and a more accurate trajectory. These experimental results conclusively validate the effectiveness of the integrated mechanical design, hardware architecture, and intelligent control system of the bionic robot.
Conclusion and Future Perspectives
This work has successfully presented the end-to-end development of a bio-inspired paddling propulsion robot. The bionic robot incorporates a mechanically intelligent design featuring a passively flexing, segmented leg and anisotropic drag paddles, minimizing actuation complexity while mimicking efficient biological locomotion. A reliable and modular hardware system was built around an STM32F407 microcontroller, integrating power management, robust wireless communication, high-precision sensing, and powerful actuation. A sophisticated software environment was established, comprising embedded firmware and a versatile WinForms-based PC application for command, control, and monitoring.
The core contribution lies in the implementation and experimental validation of a Fuzzy-PID control algorithm for autonomous heading stabilization. The fusion of fuzzy logic’s adaptability with PID’s structured corrective action proved highly effective in managing the nonlinear and uncertain dynamics of the underwater environment. Tank tests demonstrated that the bionic robot could maintain a stable, straight-line trajectory with high precision, confirming the robustness of the overall motion control system.
Future work on this bionic robot platform will focus on several advanced avenues. Firstly, integrating depth sensors and a pressure transducer to enable full 3D motion control, including diving and depth-keeping maneuvers. Secondly, implementing more advanced control strategies, such as adaptive sliding mode control or model predictive control (MPC), to further enhance performance under more severe disturbances. Thirdly, exploring the coordination of multiple bionic robot units for swarm-based operations, which would require inter-robot communication and decentralized control algorithms. Finally, miniaturization and enhanced energy efficiency will be pursued for longer mission endurance. This project establishes a solid foundation for the next generation of agile, efficient, and intelligent underwater bionic robots for exploration and monitoring tasks.
