1. Introduction
In recent years, the growing demand for underwater operations—such as marine resource exploration, environmental monitoring, underwater archaeology, defense reconnaissance, and search and rescue—has driven the development of advanced marine equipment. Among these, underwater robots play a vital role in both underwater exploration and resource acquisition. However, conventional underwater robots face significant limitations when applied to biological data collection, military reconnaissance, and operations in complex terrains [
1]. To overcome these challenges, biomimetic underwater robots have been developed by mimicking the morphology and locomotion mechanisms of aquatic organisms. Compared to traditional propulsion systems, biomimetic propulsion offers higher efficiency, enhanced maneuverability, and reduced hydrodynamic disturbance [
2]. Equipped with multi-degree-of-freedom biomimetic actuators, these robots demonstrate highly flexible motion, which makes them well-suited for complex and dynamic underwater environments. Furthermore, their resemblance to marine life, combined with low-disturbance propulsion, enables effective observation and tracking of aquatic animals. These features also contribute to improved performance in specific military reconnaissance tasks.
The motion control of biomimetic underwater robots serves two primary purposes: replicating the locomotion patterns of aquatic organisms and ensuring navigation along a designated trajectory or at a specified speed. These tasks can be classified into five key aspects: direction, depth, speed, stability, and trajectory control [
3]. Trajectory control functions as a closed-loop system that integrates direction and depth control to enable basic path tracking. The inclusion of speed control further enhances tracking accuracy by minimizing position errors. In addition, stability control plays a vital role in underwater locomotion. It is typically achieved by adjusting the robot’s pitch and roll angles to maintain dynamic equilibrium during motion.
Various control strategies have been applied to underwater robotic motion control, including proportional-integral-derivative (PID) control [
4], linear quadratic regulators (LQR) [
5], sliding mode control (SMC) [
6], model predictive control (MPC) [
7], fuzzy logic control (FLC) [
8], and neural network-based control methods [
9]. These approaches have demonstrated reliable performance in terms of both control accuracy and system stability. To address the path tracking problem of underactuated surface vessels, So-Ryeok Oh et al. [
10] developed a three-degree-of-freedom (3-DOF) dynamic model for an unmanned surface vehicle within an MPC framework. Line-of-Sight (LOS) guidance was integrated, and the optimal control inputs were computed using quadratic programming (QP). For planar underwater robotic motion, Shen et al. [
11] derived nonlinear state-space equations and applied linear feedback techniques to compute the required propulsion forces. Path tracking inputs were then generated through MPC-based optimization. Simulation results confirmed the effectiveness of this method. In another study, Wang et al. [
12] developed a two-dimensional dynamic model of a biomimetic robotic fish driven by a single joint. The model considered flow field disturbances, and a hybrid control strategy combining MPC and PID was implemented in a still-water environment. This approach enabled the robot to effectively reach target points. Yang et al. [
13] proposed a two-layer control architecture that integrated robust model predictive control (RMPC) with central pattern generators (CPG). This method significantly improved trajectory tracking accuracy and enhanced the closed-loop stability of biomimetic underwater robots operating in complex disturbance environments.
The bipedal amphibious biomimetic robot investigated in this study integrates terrestrial walking mechanisms with flapping wing technology. Its multi-degree-of-freedom wing-foot structure enables three primary modes of locomotion: walking on land, crawling on the seabed, and swimming underwater. During underwater swimming, propulsion is generated by the flapping motion of the foot-wings. This driving force is regulated by adjusting the characteristic parameters of the limb joints, thereby controlling both the posture and position of the robot. The robot’s underwater dynamics are subject to strong coupling and various nonlinear hydrodynamic effects, which significantly complicate motion control. Moreover, the generated propulsion force is inherently periodic and time-varying, posing challenges to system stability. Since the propulsion acts in three dimensions, the direction and magnitude of the overall force vector change dynamically as the limb parameters are modified. These variations further influence the robot’s balance and posture during underwater movement.
Considering the three aforementioned issues and the task requirements for 3D path tracking, this study first employs blade element theory to accurately calculate the propulsion force generated by the flapping motion of the foot-wings. Nonlinear hydrodynamic effects, including viscous forces and added mass, are incorporated to establish a precise six-degree-of-freedom (6-DOF) dynamic model of the robot. To simplify the periodic characteristics of the propulsion force, a scale function averaging method is applied, which facilitates subsequent controller design. The path tracking objective, based on LOS guidance, along with the robot’s balance parameters, is then embedded into the state-space model. An NMPC algorithm is subsequently utilized to perform optimization and determine the optimal control inputs. Simulation results demonstrate that the proposed strategy enables accurate path tracking while maintaining stable attitude control throughout 3D underwater motion.
2. Overall Control Scheme
The foot-wing hybrid amphibious robot employs winged feet as its primary propulsion mechanism. By adjusting key parameters—such as the amplitude, frequency, phase difference, and equilibrium position of the foot-wing joints—the flapping-generated propulsion force can be modulated, thereby influencing the robot’s buoyancy and stability during underwater motion [
14]. According to the findings in [
14], multiple CFD simulations were conducted to identify the parameters affecting the forces and moments generated by fin flapping. The amplitude, frequency, and phase of the joints primarily influence thrust, while the equilibrium position mainly affects lift with minimal impact on thrust. Based on this analysis, the robot’s horizontal and vertical motions can be controlled independently.
The robot generates three-dimensional propulsion forces. During yaw maneuvers, differential thrust between the left and right foot-wings is applied. However, such adjustments often disrupt the force balance in other directions. Excessive yaw angles or prolonged yawing may result in the accumulation of rolling moments, which can destabilize the robot or even lead to capsizing. Therefore, it is essential to incorporate attitude stabilization control into the path-tracking system to ensure motion stability and overall balance during 3D navigation.
In previous studies, Chen’s work [
15] did not consider the coupling effects among multiple degrees of freedom in underwater robot motion. The use of conventional PID control limited the system to single-variable regulation, making it ineffective for addressing multivariable coupling challenges during underwater operations. Moreover, the neural network-based PID controller demonstrated limited precision and robustness, falling short of the requirements for complex and dynamic underwater environments. In Yang’s study [
13], a transformation function was introduced to connect RMPC with the CPG layer by mapping the forces and torques generated by RMPC to characteristic parameters—such as frequency and phase—within the CPG network. However, the design of this mapping function is complex and requires additional consideration of nonlinear phenomena, including saturation and dead zones. These factors increase implementation difficulty and reduce engineering practicality.
Given the objective of achieving both accurate trajectory tracking and stable posture control, conventional single-objective methods such as PID are insufficient. These approaches lack the ability to coordinate multiple control objectives simultaneously. In addition, the mapping and inverse mapping functions designed in Yang’s work are highly complex, creating significant challenges for real-world implementation. To address these limitations, this study proposes a direct derivation of the mapping relationship between flapping-fin parameters and the resulting forces and moments. An optimization-based control algorithm is then employed to compute these parameters directly. This approach simplifies the control pipeline and improves both real-time performance and engineering applicability.
Since the equilibrium position of the joints significantly influences the lift generated by the foot-wings while having only a limited effect on thrust, the 3D path tracking task is decomposed into horizontal trajectory tracking and vertical depth regulation. The implementation framework of the proposed path-tracking controller is presented in
Figure 1.
In the horizontal plane, path tracking is achieved by generating differential thrust between the left and right foot-wings. However, this approach can introduce force imbalances in other directions, thereby requiring the integration of attitude stabilization control into the horizontal motion controller. This results in a multi-objective control problem that demands both accurate horizontal tracking and stable body posture. Given the strong coupling and high nonlinearity of the robot’s underwater dynamics, a combined LOS and NMPC strategy is adopted for the design of the horizontal motion controller, based on a comprehensive analysis of system characteristics.
For depth control, the objective is to guide the robot to reach and maintain a specified depth. To this end, a simple LOS–PID strategy is employed for the design of the snorkeling motion controller. The desired pitch angle for vertical motion is calculated using the LOS method, and the robot is steered toward this angle by adjusting the equilibrium positions of the limb joints through PID control.
Finally, the 3D desired path, together with the robot’s actual position and attitude angles, is provided as input to the control system. The horizontal and snorkeling motion controllers subsequently generate the corresponding control inputs for the robot model, thereby enabling accurate tracking of the desired 3D trajectory.
3. Dynamics Modeling of the Flapping-Based Underwater Robot
The dynamic model provides the mathematical foundation for the design of the robot’s control system. Due to the pronounced nonlinearities and strong coupling effects present in the robot’s underwater hydrodynamics, an in-depth analysis of its swimming dynamics is essential for accurate modeling and effective control design.
3.1. Coordinate System Definition
To facilitate motion analysis of the foot-wing hybrid amphibious robot, the coordinate systems shown in
Figure 2 are defined in this study. When the robot is stationary, the earth-fixed coordinate system
E-XYZ coincides with the body-fixed coordinate system
O-XYZ, whose origin
O is located at the robot’s center of mass. The positive
OX-axis points forward,
OY corresponds to the lateral direction, and
OZ indicates the vertical motion. To compute and represent the propulsion forces generated by the four foot-wings, four local coordinate systems are established at the joints connecting the limbs to the main body. These local systems are denoted as
,
,
, and
, corresponding to the first and second foot-wings on the left and right sides, respectively. The origin of each local coordinate system is placed at the attachment point between the respective limb and the robot’s torso. Among the coordinate systems defined above, only the earth-fixed frame
E-XYZ remains constant, while the body-fixed frame
O-XYZ and the four local frames vary with the robot’s pose, as they are rigidly attached to the body.
In 3D space, the robot’s orientation relative to the earth-fixed coordinate system is described by three Euler angles: , , and , which correspond to pitch, roll, and yaw, respectively. The robot’s motion state is defined as the vector [u, v, w, p, q, r], where u, v, and w represent surge, sway, and heave velocities, and p, q, and r represent roll, pitch, and yaw angular velocities.
3.2. Flapping-Based Swimming Dynamics Modeling
During underwater swimming, the robot is subjected to nonlinear hydrodynamic forces, including added mass effects and viscous drag. In addition, the flapping motion of each foot-wing significantly influences the overall dynamic behavior of the system. To facilitate controller design and reduce computational complexity, this study adopts a simplified dynamic model proposed in [
16] to represent the robot’s swimming dynamics. This choice is based on the similarity between the robot’s configuration and actuation method and those described in [
16]. The model is formulated as follows:
The resultant force
F consists of the robot’s weight and buoyancy, the thrust generated by the flapping foot-wings, and the viscous hydrodynamic forces exerted by the surrounding fluid. The matrix
M denotes the generalized mass matrix, composed of the rigid-body mass matrix
and the added mass matrix
. The Coriolis matrix
also consists of two components: the rigid-body Coriolis and centrifugal matrix
, and the added mass Coriolis matrix
. The vector
, defined as
= [
], represents the spatial velocity of the robot. The expressions for the rigid-body mass matrix and Coriolis matrix are given as follows:
where
m denotes the mass of the robot body,
,
, and
, represent the moments of inertia about the body-fixed axes Ox, Oy, and Oz, respectively, and
,
, and
, denote the products of inertia. Considering the robot’s low swimming speed and approximate symmetry with respect to the YOZ and XOZ planes, the added mass matrix and the added Coriolis matrix are simplified as diagonal matrices, as shown below:
where
,
, and
represent the linear acceleration coefficients of the robot body, and
,
, and
denote the angular acceleration coefficients.
To facilitate subsequent controller design, Equation (1) is reformulated in state-space form. The state vector is defined as
= [
u,
v,
w,
p,
q,
r], and the control input vector as
F =
.
A complete physical model of the robot was constructed in the relevant software, and the values of the variables in Equations (2)–(5) were obtained through the following measurement:
m = 7 kg,
= 0.0194
,
= 0.0106
, and
= 0.126
. The remaining variables adopt the same values as reported in [
17]. By substituting these parameter values into Equation (6), the resulting expression is obtained as follows:
3.3. Gravity and Buoyancy
When the robot is stationary underwater, it exhibits neutral buoyancy, meaning that its weight is equal to the buoyant force. However, the center of gravity does not coincide with the center of buoyancy. To satisfy mass distribution requirements and ensure stability through a restoring buoyant moment, the center of buoyancy is typically positioned slightly above the center of gravity. The buoyant moment acting on the robot, expressed in the body-fixed coordinate system, is given by:
Since the robot is neutrally buoyant, the net effect of gravity and buoyancy forces is neglected. In the above equation, B denotes the magnitude of the robot’s buoyant force, and represents the position vector of the center of buoyancy in the body-fixed coordinate system.
3.4. Modeling of Foot-Wing Flapping Force
The flapping motion of the robot’s foot-wings generates a three-dimensional, time-varying, and periodic propulsion force, which serves as the primary driving source for underwater locomotion. To achieve effective motion control, it is essential to accurately calculate the forces produced during flapping. Based on blade element theory, each foot-wing is discretized into multiple infinitesimal elements along the spanwise direction. For an arbitrary element iii, the lift, thrust, and added mass forces generated during flapping are calculated using the Kutta–Joukowski lift theorem. These elemental forces are then transformed into the local coordinate system defined at the foot-wing joint through a coordinate transformation. By integrating the transformed forces across all elements, the total flapping force of the foot-wing is obtained.
The robot’s foot-wing possesses three degrees of freedom: swing motion about the
Z-axis, up-and-down flapping about the
Y-axis, and forward-and-backward flapping about the
X-axis. Correspondingly, a coordinate system is established for the fin, as shown in
Figure 3. Coordinate system
(marked in black in the figure) is established at the joint between the foot-wing and the robot body, fixed to the body with its origin at the connection point. Coordinate system
(marked in black in the figure) is attached to the first joint, which performs swing motion around the
Z-axis. Coordinate system
(marked in green in the figure) is associated with the second joint, enabling forward-and-backward flapping around the
X-axis. Coordinate system
(marked in orange in the figure) is placed at the third joint, allowing up-and-down flapping about the
Y-axis. In addition, a local coordinate system
(marked in red in the figure) is defined at the
i-th blade element of the foot-wing to facilitate force transformation. In the corresponding figure,
denotes the
Z-axis distance between coordinate systems
and
, and
denotes the
Z-axis distance between
and
. The motion principles and coupling relationships among the foot-wing’s degrees of freedom are detailed in [
17].
The transformation matrix
T between coordinate systems is defined by the three joint rotation angles
. Specifically,
represents the swing angle of Joint 1 (rotation about the
Z-axis),
denotes the forward–backward flapping angle of Joint 2 (rotation about the
X-axis), and
indicates the up-and-down flapping angle of Joint 3 (rotation about the
Y-axis).
Meanwhile, the flapping velocity of blade element i in the
coordinate system can be expressed using a Jacobian transformation as
.
During underwater motion, the robot maintains a forward velocity denoted by
. As a result, the relative velocity of the i-th foot-wing element with respect to the incoming flow, expressed in the local coordinate frame
, is the vector sum of the flapping velocity and the translational velocity of the robot. According to the Kutta–Joukowski lift theorem, the hydrodynamic force acting on the i-th foot-wing element consists of three components: lift
, viscous drag
, and added mass force
. The corresponding expression is given by:
where
denotes the chord length of the foot-wing corresponding to blade element
i. The parameters
and
represent the maximum lift and drag coefficients, respectively, with their values adopted from [
18]. The variable
denotes the angle of attack relative to the incoming flow.
In the subsequent controller design, the generated propulsion force is primarily regulated by adjusting the amplitude of the vertical flapping joint. Therefore, it is necessary to express this force as a function of the flapping amplitude. However, the original formulation depends on multiple variables, including time
t and the joint angles
,
, and
, which makes the computation relatively complex. To reduce complexity, a period-wise integration is performed to simplify the expression. The detailed formulation is presented in
Section 4.
3.5. Additional Hydrodynamic Components
When the robot swims underwater, it is subjected to hydrodynamic forces, which can be categorized into inertial and viscous components. The inertial hydrodynamic forces have already been incorporated in Equation (1); therefore, only the viscous components are considered in this section. Viscous hydrodynamic forces refer to the fluid resistance acting on the robot’s body along the direction of motion during steady swimming. These forces depend on both the robot’s geometry and its motion state, and they exhibit complex nonlinear behavior, which makes it difficult to obtain an exact analytical expression. To address this, researchers often adopt an approximate linearization approach, where the forces are expressed as functions of the robot’s velocity states, projected areas, and dimensionless drag coefficients. The viscous drag forces in the surge, sway, and heave directions are denoted by
,
, and
, respectively, while the corresponding viscous drag moments are represented by
,
, and
. According to [
16], the viscous hydrodynamic force model for the AQUA robot is given by:
where
,
, and
represent the projected areas of the robot along the X, Y, and Z axes, respectively, and are obtained from the robot model. The terms
,
, and
denote the dimensionless hydrodynamic drag coefficients along the three principal axes, while
,
, and
represent the dimensionless moment resistance coefficients. Since the robot’s shape and mass distribution are similar to those of the AQUA robot, the above coefficients are adopted from the AQUA model.
4. Averaging Simplification of Scaling Function
Based on the preceding analysis of the robot’s underwater force mechanisms, the relationships between the flapping joint amplitudes of the foot-wings and the resulting forces and moments have been derived with precision. However, since these forces and moments exhibit periodic variation over time, they may negatively impact controller stability. In addition, the resulting expressions are too complex to be directly applied in controller design. To address these challenges, this section adopts the method proposed in [
19], which simplifies the original expressions using an averaging technique combined with a scaling function. When the flapping amplitude
of the third joint on the right foot-wing varies, the corresponding flapping force and moment in the local foot-wing coordinate frame
are expressed as follows:
Note: to facilitate computation, a simulation-based approach is employed to determine the angle of attack during foot-wing flapping by varying the flapping amplitude and observing the corresponding angle of attack. A polynomial fitting method is then applied to approximate the angle of attack as follows: .
In the above equation, denotes the velocity of the surrounding fluid in which the robot operates, and represents the yaw angular velocity of the robot. The pair denotes the coordinates of the origin of the single wing’s coordinate frame with respect to the robot’s body-fixed frame. The distance is defined as , and , , and so on are all polynomials with as the variable parameter.
In Equation (14), the flapping force generated by the foot-wing is a function of the robot’s motion state. To facilitate the derivation of the scaling function, the flapping force and moment are evaluated under steady, straight swimming conditions. Specifically, the swing joint amplitude is set to 0.6109 rad, and the forward–backward flapping joint amplitude is fixed at 0°. The fluid velocity is defined as = 0.2 m/s, while both the yaw angle and yaw rate are set to zero. The pitch angle is also maintained at zero throughout one motion cycle.
Through multiple simulation experiments, the resulting scaling coefficient is determined as follows:
Under steady swimming conditions, the lift force generated by a single foot-wing in the X-direction and the moment generated in the Z-direction average to zero over one motion cycle. By summing the forces and moments produced by all four foot-wings and transforming them into the robot’s body-fixed coordinate system, the net effect of foot-wing flapping on the robot over one cycle can be obtained.
where
and
represent the averaged forces generated by the left and right foot-wings, respectively, while
and
denote the corresponding averaged moments, obtained using the scaling coefficient.
Finally, by combining Equations (7), (8) and (12)–(16), an expression is derived that relates the robot’s overall motion state to the flapping amplitudes of the left and right foot-wing joints.
5. Path Tracking Controller
In the previous two sections, the hydrodynamic forces acting on the foot-wing hybrid-driven amphibious robot during underwater swimming were analyzed. In addition, the relationship between the vertical flapping joint amplitudes and the resulting propulsion force was derived and subsequently simplified. Based on the established dynamic model, a path tracking controller is developed for the robot. Moreover, balance and stability control are integrated into the overall control strategy to ensure robust posture regulation during 3D motion.
5.1. LOS Guidance Method
LOS guidance is a classical algorithm originally inspired by the navigation strategies of experienced sailors, who align a vessel’s heading with a visible reference point. It has since been widely applied in control systems for missiles, autonomous robots, and marine vehicles. The core principle of LOS guidance involves computing the desired heading angle based on the line connecting the current position to a specified target point. The vehicle is then steered such that its heading gradually converges to this direction, thereby enabling accurate trajectory tracking [
20].
In this study, a look-ahead distance-based LOS guidance method is employed. Specifically, a tracking target point is defined at a distance ahead of point P, which is the projection of the robot’s current position onto the desired path L, along the tangent direction at that point. The desired yaw and pitch angles are computed with respect to the target point and are then transformed into the corresponding attitude angles in the earth-fixed coordinate frame via coordinate transformation. Finally, a controller is designed to drive the robot’s actual attitude angles to converge to the desired values.
Figure 4 illustrates the reference coordinate frames used in the 3D LOS guidance strategy. SF denotes the tangential coordinate frame at point
on the desired path
L(
s), representing the virtual tracking point. The angles
and
correspond to the pitch and yaw angles between the tangential frame at
and the earth-fixed frame I, and can be computed directly from the geometry of the desired path
L(
s). The parameter
represents a user-defined look-ahead distance.
To facilitate the computation of the desired yaw and pitch angles, the tracking error is transformed from the inertial coordinate frame I to the tangential coordinate frame SF:
where
represents the actual position P of the robot in the inertial coordinate frame I, while
denotes the position of point
on the desired path, also expressed in frame I. By differentiating the above expression, the error dynamics can be derived as follows [
21]:
Since the snorkeling motion is controlled using a PID controller, a precise dynamic model is not required. Therefore, only the kinematic constraint associated with the lateral tracking error
is considered in the control design. To ensure that the trajectory generated by the LOS guidance remains close to the desired path, the convergence and stability of the guidance system are analyzed in the vicinity of the equilibrium point
. Assuming that the robot accurately follows the desired path during tracking, the corresponding desired yaw angle
and pitch angle
are given by:
To facilitate subsequent controller design, the error dynamics equation is appropriately simplified. When the robot’s actual path remains close to the desired path, it is assumed that
,
, and the actual yaw angle
; therefore,
and
. By simplifying Equation (18), the following expression is obtained:
The variables and in the equation are associated with the virtual tracking point . Since this study focuses on designing a path tracking algorithm for bionic-driven amphibious robots operating under nonlinear and time-varying force conditions, the desired path is simplified to facilitate algorithm implementation. Specifically, the path adopted in this work is composed of multiple piecewise linear segments, with curvature discontinuities occurring only at the turning points. Within each segment, the curvature remains constant, and its rate of change is zero. Therefore, in the computation of Equation (20), terms related to curvature variation can be neglected.
5.2. NMPC-Based Horizontal Motion Controller
In this study, the horizontal motion tracking controller is designed not only to accurately follow the desired trajectory in the horizontal plane, but also to maintain the robot’s attitude balance and stability during motion. Considering the strong nonlinear characteristics of underwater robot dynamics and the presence of practical constraints such as actuator saturation, a comprehensive analysis is conducted on the applicability and limitations of conventional control methods, including PID control, fuzzy control, and sliding mode control. Based on the results of this analysis, the NMPC strategy is adopted due to its capability for multi-objective optimization, its suitability for nonlinear dynamic systems, and its ability to explicitly handle system constraints.
MPC is a model-based control method that operates on the principle of rolling optimization. At each sampling instant, it predicts the system’s future behavior, solves a constrained optimal control problem over a finite prediction horizon, and applies only the first control input to the system. This process is repeated at every time step, enabling continuous dynamic optimization [
22]. NMPC extends MPC to nonlinear dynamic systems. In each sampling period, it solves an optimal control problem that incorporates a nonlinear system model along with input, state, and output constraints. This typically results in a nonlinear programming (NLP) problem, which requires advanced numerical optimization techniques for real-time implementation [
23]. Compared to linear MPC, NMPC entails higher computational complexity and longer solution times, but offers superior control performance for systems with significant nonlinearities.
In the preceding sections, the robot’s dynamic model and the LOS guidance strategy were analyzed, and the corresponding state equations governing motion and path tracking were derived. Based on the two control objectives, the state vector is defined as
. For notational simplicity, let
, and define the control input vector as
, representing the flapping amplitudes of the left and right foot-wings, respectively. The state-space equation can then be expressed as:
Both MPC and NMPC perform optimization based on a discrete-time system model. However, the dynamic model established in this study is formulated in continuous time and must therefore be discretized prior to implementation. Common discretization methods in the literature include the forward Euler method, zero-order hold (ZOH), and the fourth-order Runge–Kutta method [
24]. Among these, the forward Euler method is preferred due to its simplicity and computational efficiency, and it is generally sufficient to meet typical control accuracy requirements. Accordingly, this study adopts the forward Euler method to discretize the continuous-time system equations.
where
denotes the sampling time, which defines the discrete-time step of the controller. In this study, it is set to 0.001 s.
In constructing the objective function, multiple factors are considered, including the lateral tracking error in a horizontal motion, the deviation from the desired attitude angles, the magnitude of the control inputs, and the rate of change of these inputs (i.e., control increments). This formulation enables joint optimization of tracking accuracy and controls smoothness, ensuring both a precise trajectory following and a stable actuator behavior.
where
denotes the control input from the previous time step in the simulation model.
J is the cost function,
is the prediction horizon length, and
is the control horizon length.
Q, R, and P are the weighting matrices corresponding to the system state, control input, and control input increment, respectively. In this study, both
and
are set to 10, but only the first control input is applied to the system at each time step.
In designing the state weighting matrix Q, appropriate simplifications and selections were made based on the control objectives and the dynamic characteristics of the system. First, the forward velocity u is inherently generated by the flapping motion of the foot-wings and does not require explicit regulation; therefore, it is excluded from the weighting matrix. The vertical velocity www is controlled independently by a PID controller, and its associated state is similarly omitted. Additionally, the pitch rate q is primarily affected by asymmetry between the front and rear foot-wing motions. However, since the front and rear wings are set to flap synchronously in this study, q can also be neglected. As a result, the weighting matrix Q assigns nonzero weights only to the lateral position error, yaw-angle error, lateral velocity v, roll rate p, and yaw rate r.
Since the magnitudes of the state variables during system operation are significantly smaller than those of the control inputs, and the variations in control input increments are typically smaller than the absolute values of the control inputs, it is necessary to normalize the scales of these terms in the objective function. This normalization ensures a balanced trade-off among tracking accuracy, control effort, and control smoothness. Accordingly, scale unification is applied to the weighting terms in the objective function. The specific values of the weighting matrices
Q,
R, and
P are provided in
Table 1.
In practical control scenarios, it is essential to incorporate constraint conditions into the system to ensure the feasibility of control inputs and to maintain the state variables within acceptable bounds. Based on the physical limitations of the actuators and the safety requirements of system operation, the following constraints are defined in this study:
Based on simulation experiments of the robot during normal forward swimming and turning maneuvers, the approximate range of state variables can be preliminarily determined as
. Reference [
17] employed a CFD-based approach to account for factors such as forward velocity and energy consumption, and determined the optimal flapping joint amplitudes to be
= 0.6109 rad and
= 0.6981 rad. Accordingly, this study sets the amplitude of Joint 1 to 0.6109 rad, and defines the allowable range of flapping amplitudes for all three joints as [0.6109, 0.7854], i.e.,
= 0.6109 rad,
= 0.7854 rad.
6. Simulation Experiments
In this study, a physical simulation model of the foot-wing hybrid-driven amphibious robot was developed using a co-simulation platform based on SolidWorks 2022 and Simulink Simscape R2023b. The hydrodynamic and other external forces acting on the robot during motion were computed using theoretical formulations. For control optimization, MATLAB’s built-in nonlinear constrained optimization function fmincon was employed. The Sequential Quadratic Programming (SQP) algorithm was selected to numerically solve the NMPC problem.
The snorkeling motion controller adopts a PID with LOS strategy to track the target depth, with the PID parameters set to = 0.003, = 0, and = 0.006. The horizontal motion controller is implemented using a PID with NMPC framework for path tracking in the horizontal plane, with a prediction horizon of = 10, control horizon = 1, and time step T = 0.001.
The desired path defined in this study is a piecewise linear trajectory composed of a series of discrete coordinate points. At the initial moment, the robot is stationary and positioned at the starting point of the path. The robot’s single foot-wing performs a two-degree-of-freedom motion, consisting of a one-joint flapping motion and a three-joint vertical beating motion. During the time interval from
t = 0 to 8 s, the swing amplitudes of the first and third joints are set to 0.6109 rad and 0.6981 rad, respectively, with a quarter-period phase difference between them. This configuration produces a figure-of-eight flapping motion at the foot-wing tip. The detailed coupling relationships between the joints are provided in Reference [
17]. The flapping cycle is set to 1 s in the simulation. During the first 4 s, the robot undergoes an acceleration phase. Over time, the thrust and drag forces generated by the flapping motion gradually reach equilibrium, and the robot transitions to a steady-speed state after 4 s. At
t = 8 s, the robot begins executing the path tracking control algorithm proposed in this study. Upon completion of the simulation, a comparison between the robot’s center-of-gravity trajectory and the desired path is presented in
Figure 5.
In the figure, the green line on the bottom plane represents the projection of the reference path onto the XOY plane.
To prevent excessive path deviation at the turning points of the piecewise linear trajectory, this study introduces a preemptive waypoint-switching strategy. Specifically, when the robot’s longitudinal distance to a turning point is less than 3 m, the tracking target is switched in advance to the next waypoint.
Figure 6a presents an enlarged comparison between the desired and actual trajectories at the path inflection point. This approach reserves sufficient turning space for the robot, ensuring smooth transitions and stable path tracking performance.
Figure 6b indicates that the robot can accurately follow the predefined trajectory, with the lateral tracking error remaining within a small range throughout the motion. During turning maneuvers, the proposed control algorithm effectively balances the steering torque and roll torque, enabling the robot to complete turns while maintaining stable attitude control.
Figure 7a and
Figure 7b show the amplitude inputs of the robot’s left and right foot-wings during forward locomotion and turning, respectively.
Furthermore, to verify that the proposed NMPC algorithm can achieve accurate path tracking while maintaining body attitude stability, this study selects the LOS + PID and LOS + fuzzy PID algorithms as comparative benchmarks. These methods are used to perform tracking control of the robot along the same reference path. Under the PID-based control strategy, the flapping amplitudes of the three joints on one side of the foot-wing are fixed, while those on the other side are adjusted using a PID controller to generate asymmetric flapping forces for turning control. The PID controller parameters are set to
= 0.452,
= 0, and
= 1.03. In the fuzzy PID controller, the fuzzy universes of discourse for the input error
e and its rate of change
ec are defined as [−0.3, 0.3] and [−0.3, 0.3], respectively. The fuzzy control rules are adopted from Reference [
25]. The outputs of the fuzzy inference rules are scaled by corresponding scaling factors to obtain the correction values
,
, and
. These correction values are then used in the following equations to compute the fuzzy PID gains
,
, and
.
where parameters
,
, and
serve as the initial values of the controller and are set the same as those used in the aforementioned PID.
Figure 8a and
Figure 8b respectively present a comparison of the trajectories generated by the three algorithms during tracking of the desired path, along with the corresponding variations in the robot’s roll angular velocity
p under different control methods. These results are used to comprehensively evaluate both path tracking accuracy and attitude stability.
Table 2 summarizes the simulation results of the three control methods. The evaluation metrics include maximum tracking error, average tracking error, standard deviation of roll angular velocity, and total simulation time. Here, the simulation time refers to the actual time consumed in Simulink for the model to complete the path tracking task.
As shown in the figure, all three control methods are capable of effectively tracking the desired path. Among them, the PID and fuzzy PID controllers exhibit similar maximum and average tracking errors, indicating relatively consistent and stable performance. In contrast, the NMPC method demonstrates a significantly higher maximum tracking error compared to the other two approaches, while its average error remains comparable. This suggests certain limitations in local transient response, despite maintaining acceptable overall tracking accuracy.
In terms of attitude control, the NMPC algorithm explicitly incorporates posture stability into the control process by accounting for the robot’s dynamic balance. As a result, it achieves a significantly lower standard deviation of roll angular velocity compared to the PID and fuzzy PID controllers, demonstrating superior attitude stability. The fuzzy PID controller adjusts the PID parameters in real time based on fuzzy inference rules, which helps suppress fluctuations in roll angular velocity to some extent. However, since both PID and fuzzy PID strategies are designed primarily for path tracking accuracy without considering attitude balance, roll angular velocity tends to accumulate during the later stages of the simulation. This issue becomes more pronounced during large-angle turns, where these two controllers rely mainly on yaw-angle adjustment and do not account for torque balance in other directions. As a result, lateral torque imbalance may occur, potentially leading to loss of stability or even robot overturning. In contrast, the roll angular velocity under NMPC control remains within a small range, and the robot maintains a stable posture throughout the motion. With respect to simulation time, NMPC requires solving a nonlinear optimization problem at each control step, resulting in the highest computational load and the longest simulation time. The fuzzy PID controller also performs rule matching and parameter adjustment during each cycle, which introduces additional computational overhead compared to conventional PID, thereby leading to a relatively longer simulation time.
However, several additional factors must be considered when applying the NMPC algorithm to the underwater robot investigated in this study. On one hand, the developed hydrodynamic model does not fully capture external disturbances, which reduces the controller’s robustness to unknown perturbations. On the other hand, the high computational complexity of NMPC presents challenges for real-time implementation on embedded systems. Although a relatively accurate dynamic model is established in this work, the inherent complexity and unpredictability of real underwater environments may still impact the accuracy and robustness of the controller.
A comprehensive analysis indicates that although the instantaneous tracking accuracy of NMPC may be inferior to that of conventional PID control, its overall control performance is superior in long-distance path tracking tasks. Nevertheless, in practical engineering applications, a trade-off must be made between the algorithm’s computational complexity and its real-time control capability. This trade-off remains a key challenge limiting the widespread adoption of NMPC.
7. Conclusions
This paper addresses the challenge of achieving high-precision 3D path tracking for bionically actuated amphibious robots operating in complex underwater environments characterized by periodic and time-varying thrust forces, through systematic modeling and control design. First, the hydrodynamic forces acting on the robot during underwater hovering, along with the thrust generated by foot-wing flapping, were thoroughly analyzed, leading to the development of a complete six-degree-of-freedom dynamic model. To simplify the periodic actuation inputs, an averaging method based on a scaling function was introduced. This enabled the derivation of an explicit functional relationship between the joint flapping amplitude and the resulting thrust force, thereby enhancing model controllability and facilitating controller design.
Finally, a horizontal path tracking controller was developed by integrating NMPC with the LOS guidance strategy. Simulation results demonstrate that the proposed control approach not only achieves high-precision trajectory tracking, but also effectively maintains attitude stability throughout underwater motion.
Nevertheless, several limitations remain in this study. Certain secondary hydrodynamic terms were simplified during the modeling process, which may affect the overall accuracy of the dynamic model. Although the averaging-based model reduces computational complexity, it still retains a relatively complex structure that may hinder the real-time performance and implementation efficiency of the controller. Moreover, the controller design does not account for common environmental disturbances such as ocean currents and waves, which limits its robustness under complex operating conditions. In addition, the stability of the NMPC controller has not been systematically analyzed from a theoretical perspective, and thus lacks rigorous theoretical justification.
Therefore, future research should focus on more comprehensive hydrodynamic modeling, enhanced robustness to environmental disturbances, and a rigorous theoretical analysis of controller stability. These improvements are expected to enhance the practicality and engineering scalability of the proposed control system.