1. Introduction
Conventional machines employ rotary motors as the main part of the propulsion system to drive wheels or rotatory fans in ships. On the other hand, nature offers various locomotion mechanisms that are significantly more efficient, especially in complex and unstructured environments. For aquatic locomotion, propulsion in liquid domains, fishes exhibit various modes such as anguilliform, subcarangiform, carangiform, and thunniform [
1]. The Lindsey classification of the fish swimming styles counts twelve modes based on the geometry of the moving region of the fish, and body undulation or oscillation [
2,
3]. Admittedly, drawing a definite border between the modes is not easy because the modes appear to be kinematically analogous. Nevertheless, the anguilliform mode is particularly distinguishable from the other modes because the whole body is engaged in the undulatory motion, containing the rearward-travelling wave that provides propulsion for the swimmer. In this mode of locomotion, fins do not play the major role, and so snake-like anatomies in various ranges from nematodes to eels employ an anguilliform mode for locomotion. This can be used for developing robotic systems intended to navigate fluidic environments in different Reynolds numbers (Re). Biorobotics is a branch of robotics focusing on studying the kinematics of natural locomotion regimes and implementing the principles in actual robots. From the technologists’ point of view, developing or optimizing robots’ performance, e.g., speed or energy consumption, is a provisional achievement. The scalability of anguilliform mode is particularly important when technology limitations do not allow making tiny conventional motors or when the motors increase the total mass, which creates buoyancy and agility problems. Furthermore, scalability, if deciphered by the Re, reflects motion capability in a viscous environment.
One advantage of anguilliform swimming is its energy efficiency in long-distance movements. Maintaining the swimmer’s direction along the desired direction is the first question raised from the control engineering point of view. The problem can be stated as determining the control strategy to make the swimmer follow a straight line. The problem contains complexities that may be translated to observer and actuator control in robotics terms. On one hand, due to whole-body undulation, there is no physically rigid moving point indicating the motion direction. In anguilliform locomotion, the measurements of any positioning sensor [
4] will be contaminated with the body undulation. On the other hand, there is no specified primary actuator, like fins, for creating the necessary yaw torques for straight swimming. In fin-based steering, in fish such as sunfish or perch, dorsal, anal, and caudal fins counteract unwanted body rotations to maintain forward motion. Due to the lack of pronounced appendages and body flexibility, directional stability of the slender and elongated fishes, such as eels, lampreys, and larval fishes, relies on kinematics and hydrodynamics. To swim straight, such species may rely on highly symmetric body undulations to produce net forward thrust without lateral deviation [
5]. Turning can be seen as a separate problem within the study of anguilliform locomotion. It was shown that snakes twist their bodies inwards and shift their center of mass to reduce their moment of inertia during a turning behavior [
6]. In [
7], it is reported that an eel performs forward motion or distinctive curling behavior depending on some external electrical stimulation. Nevertheless, they concluded that full control over the eel’s motion (such as the path following problem) is far more complicated. Within fish, swimming locomotion is classified into two generic categories: steady (employed by the fish over relatively long distances at a constant speed) and transient movements [
1]. Similarly, the problem of the elongated robots’ navigation can be divided into steady path following and unsteady maneuvers (including turning).
Robots are prone to errors in their initial pose, disturbance within locomotion, as well as actuator and sensor faults. Therefore, the swimming of a robot along a line needs active control, especially over long distances. Various research is devoted to path planning and trajectory following of elongated robots [
8,
9,
10,
11]. Multi-body rigid snake robots can rely on angular deflections added on different joints for turning motion, as formulated in [
12]. Recently, strategies based on left-right unbalanced amplitude and head steering were experimentally implemented for maneuvering a soft swimming robot [
13]. Unlike rotary motors that can rotate to any angle as the reference zero around which the rotor oscillates, soft actuators commonly have a fixed nominal position corresponding to the straight nominal state of the fish robot. Therefore, finding a method for regulating the soft robot’s swimming direction is essential.
Machine learning (ML) techniques are extensively explored to handle different problems, such as gait optimization [
14] and analysis of mode shapes as the result of the interaction of the soft body with the surrounding water [
15,
16] for anguilliform swimming robots. The dynamic mode decomposition (DMD) is a data-driven ML technique that is powerful in uncovering coherent structures within fluid flows and mechanical vibrations. Various variants of the DMD algorithm have been developed for forecasting and identification in different scientific applications. The delay embedding technique has demonstrated the capability of decomposing interconnected dynamics, like separating waves and turbulence in fluid dynamics [
17,
18]. The complex delay-embedded method, CDE DMD, has shown the capability of decomposing the underlying modes of anguilliform swimming from experimental data obtained by tracking markers on the midline of a soft eel robot [
19]. It was shown that the method isolates the travelling wave dynamics as the result of inherent linear (in the sense of DMD) modes.
This study is focused on the directional control of anguilliform swimming of a pneumatic soft robot. The CDE DMD is explored and adapted to identify and predict the swimmer’s gross motion. The investigated question is limited to proposing a solution to maintain straight swimming with small deviations from the nominal working point. A simulation study using COMSOL Multiphysics® 6.2 (COMSOL AB, Stockholm, Sweden) was performed, especially to evaluate the directional variation based on unbalanced forcing with different right-left maximum pressures.
The remaining parts of this article are organized as follows. In
Section 2.1, first, the undulatory motion and the problem of directional stability in anguilliform swimming are explained. Then, in
Section 2.2, the method of CDE DMD and the online prediction formula are derived.
Section 2.3 is devoted to explaining the actuation method proposed for generating the control input. The computation and simulation results are presented in
Section 3. The prediction formula is first calculated and tested on some open-loop scenarios. Then, it is shown that the predictor can be used in a closed-loop control to provide a straight swimming and regulation of the initial state error. Discussion and conclusions are summarized in
Section 4 and
Section 5.
3. Results
Unlike Eulerian methods, which observe flow at fixed spatial points, FPT follows individual particles, providing direct insight into the material transport. The FPT simulation results for three (open-loop) scenarios are shown in
Figure 5. For meshing, the physics-controlled coarse mesh was used for the whole domain. The integrated physics includes laminar flow (SPF), solid mechanics (for the robot body), moving mesh (for fluid domain), fluid-structure interaction (FSI), and the FPT. Water physical properties were chosen as the properties of the 0.2 mm radius particles so that they represent the material flow of water, with the Stokes drag law. The simulation is arranged with two steps: Study 1 and Study 2 in COMSOL. First, in Study 1, the time-dependent analysis is performed without computing the particle tracing. In Study 2, only the FPT is solved. In this step, the results of the time-dependent analysis from the previous step, Study 1, are used as the values of variables not solved for.
The particles are released from a grid uniformly as shown in the plots at the top of
Figure 5. The simulation was performed for three cases (including balanced forcing for straight motion, and unbalanced forcing for left and right tendency), and the results are saved using image sequences. The time collapsed between the vertically arranged snapshots is 0.88 s, and the colors simply represent the index of the particles to make the tracing more visible. The robot velocity is 0.033 m/s, and the undulation frequency is 1.1 s.
In
Figure 5(a), the results for balanced forcing are shown. The sequence of the snapshots, which is arranged from top to down, shows a uniform and visually symmetric distribution. In contrast, in the unbalanced actuation shown in
Figure 5(b), with accentuating left forces, and
Figure 5(c), accentuating right, an asymmetric material displacement is observed at the downstream.
3.1. The CDE DMD
In this section, the CDE DMD method is used for the prediction and control of the gross lateral motion of the robot. The system, as shown in
Figure 3, is spatially discretized to seven points,
A1 to
A7, equally distributed on the midline of the robot’s continuous body. To evaluate the capability of the proposed method in the estimation of the robot’s gross motion, first, some state data is assembled of the Hankel matrix given in (3). The state vector, shown by the complex variable
within the manuscript, includes the lateral position and velocity, which can be obtained by differentiation of the position data. Different open-loop arbitrary scenarios are considered where
and the control input
takes constant values like
According to (18), when
we will have
and
. Likewise, when
we will have
and
, and when
symmetric actuation is provided as
. One advantage of this input is the feasibility of implementation using standard industrial pneumatic components. A pneumatic regulator can be used to provide
from the nominal pressure, 600 [KPa]. Switching pneumatic valves, which are smaller and much less expensive than analog pressure control valves, are used to guide the discrete input pressures to the actuators. Next, some data is required to assemble the data matrices and perform the calculations (also known as training within ML terminology). An arbitrary input shown in
Figure 6 was implemented to randomly manipulate the system. At this point, any arbitrarily varying input resulting in casual navigation with a rich gross motion effect is sufficient (Note that high frequency inputs may not yield a noticeable gross motion). The system response, i.e., the states of the discrete points on the robot midline, is shown in
Figure 7. The position data is obviously showing a noticeable overall motion, in addition to oscillations. The modal decomposition (8) is used to separate the different physics by projecting the data into a modal space. Visualization of the modes’ contribution, also known as the reconstruction process, is a tool to reveal the effect of the modes and distinguish the different underlying physics.
The modal decomposition results are shown in
Figure 8. The linear oscillations, shown by the blue curve, demonstrate the pure undulation, which contains the main drive in the anguilliform locomotion. The gross motion, which is of more interest in this work, is the next major part of the signals and is shown by the black curve. The graphs show that the curve provides a good approximation of the gross motion. Note that the superposition of the linear oscillations and the gross motion provides a form of reduced-order approximation (reconstruction) of the original data.
To investigate this issue numerically, the superposition of the linear oscillations and the gross motion is plotted in
Figure 9. The figure shows that the errors, which are associated with higher modes, demonstrate small amplitudes compared to the main data. This analysis reveals the contribution of modes in the pure undulation, as well as a drift or trend attributed to rigid-body-like motion, namely gross motion of the robot.
The results of the CDE DMD predictor given by (16) are shown in
Figure 10. From an ML point of view, the method manipulates the data in an unsupervised manner. In fact, the CDE DMD algorithm extracts the existing modes in the dynamics from the data matrix. Note that if the data does not contain the mode information (e.g., in case the data is collected from a short straight motion of the robot in this work), DMD techniques might not find the mode.
Similar to the mechanical vibrations, if an input is not rich enough, a mode may not be excited enough to be detected by data-driven model discovery methods. Another interesting topic in the arena of ML is the performance of the algorithm on unseen data. Employing the ML terminology, the previous data (represented in
Figure 7) can be seen as the training data. The data was used to measure the hyperparameters of (16). Then, in the next step, a different maneuvering scenario with an input signal given in
Figure 11 is used to evaluate the capability of the algorithm in identifying the gross motion within unseen scenarios. In this case, the algorithm updates a data window (as in
Figure 2) from the current data, and then utilizes the pretrained model (16) to predict the trace shown as CDE DMD gross motion in
Figure 12.
For the closed-loop control, the linear gain in (19) is heuristically selected as follows. As the
corresponds to the position of the middle point (
A4), a control term like
is used to make up for the distance error. Additionally, another term is required to react against the orientation error. The angle of the robot can be related to
which corresponds to the position of two points
A1 and
A7 Therefore, the controller is expressed as
This control can be seen as a simple bioinspired control law [
20] for steering right or left. Analogous to the step response in classical control of linear systems, the closed-loop system performance can be demonstrated by considering a non-zero initial condition for the position of the robot.
Figure 13 shows an example scenario of the controlled system using (21) with
and
. Note that the oscillation around the zero (shown by the dashed line) is the desired objective because it represents swimming in the line. However, when the robot has a non-zero initial angle to the line, the initial position of the discrete points will have a non-zero initial value in the beginning, and the controller compensates for this error. Similarly, in the other scenario shown in
Figure 14, at the initial time, there is a distance error concerning the zero line. The results show that the controller provides the error zeroing necessary for navigation in the desired line.
4. Discussion
In this study, different open-loop and closed-loop scenarios were analyzed to evaluate the gross motion prediction capability of the CDE DMD method. Within fish locomotion studies, the ability to swim in a straight line is known as directional stability. In comparison with robotics terminology, the directional stability can be related to trajectory following, with the difference that the desired trajectory is a straight line, and conceptually, less position error is expected. Commonly, within robot path following, regular shapes like a square or a circle are considered as the desired path, and the robot is controlled to approximately follow the path with generally tolerable position errors. Furthermore, unlike sharp turns that can be seen as transient curling behavior, the directional stability is associated with steady swimming. The proposed control is physically achieved with a small pressure adjustment, shown in
Figure 15. The robot is shown schematically, and the pneumatic control components are shown by the standard symbols. Each segment is controlled by two 3/2 valves to bend to the right or left.
The 3/2 valves are controlled by the sequential signal given in
Figure 4. The directional control is performed by the 5/3 valve, which provides the pressure for the 3/2 valves related to each side of the robot. An air supply delivers the nominal pressure,
P1, and a regulator provides the
P2 pressure for the direction control. The control rule given in (21) is given as the control signal to the 5/3 valve. The three-digit values are to select one of the three possible states of the valve using the solenoids. The simulation results show that the controller provides regulating signals that are practically feasible in hardware implementation. With an initial pose error, the controller, after approximately 60 s, settles the error. The prediction rule acts as a data-driven observer for tracing the robot. The open-loop simulations indicate that the prediction can be used for drawing a trace that approximately shows the overall trace of the robot trajectory. In soft robots and natural anguilliform swimmers, in contrast to rigid robots, which can rely on joint sensors, positioning and tracking the swimmer is complex. The proposed algorithm can be used for tracking or positioning, with or without navigation control purposes.
Author Contributions
Conceptualization, M.S. and H.W.; methodology, M.S.; software, M.S.; validation, M.S. and H.W.; formal analysis, M.S.; investigation, M.S. and H.W.; resources, M.S. and H.W.; data curation, M.S. and H.W.; writing—original draft preparation, M.S.; writing—review and editing, H.W.; visualization, M.S.; supervision, H.W.; project administration, M.S. and H.W.; funding acquisition, H.W. All authors have read and agreed to the published version of the manuscript.
Figure 1.
Illustration of anguilliform swimming kinematics within an undulation period, T: (a) Motion in a straight line; (b) Swimming with left-tilting tendency; (c) Right-tilting motion. The blue line represents the initial state, and the dashed-dot represents the (desired) position in straight motion.
Figure 1.
Illustration of anguilliform swimming kinematics within an undulation period, T: (a) Motion in a straight line; (b) Swimming with left-tilting tendency; (c) Right-tilting motion. The blue line represents the initial state, and the dashed-dot represents the (desired) position in straight motion.
Figure 2.
Memory stacking to update .
Figure 2.
Memory stacking to update .
Figure 3.
The simulation model: (a) Three-dimensional view; (b) The finite element mesh, dimensions, and forces. The dimensions are given in mm, and red arrows show the actuators’ forces for the six segments. The small blue circles represent motion tracking points from the head (A1) to the distal segment (A7).
Figure 3.
The simulation model: (a) Three-dimensional view; (b) The finite element mesh, dimensions, and forces. The dimensions are given in mm, and red arrows show the actuators’ forces for the six segments. The small blue circles represent motion tracking points from the head (A1) to the distal segment (A7).
Figure 4.
The segmental actuation sequence for a travelling wave along the robot body.
Figure 4.
The segmental actuation sequence for a travelling wave along the robot body.
Figure 5.
The FPT simulation results: (a) Motion in a straight line; (b) Swimming with left-tilting tendency (); (c) Right-tilting motion (). The color bar represents the particle indices.
Figure 5.
The FPT simulation results: (a) Motion in a straight line; (b) Swimming with left-tilting tendency (); (c) Right-tilting motion (). The color bar represents the particle indices.
Figure 6.
The arbitrary input used in the first scenario.
Figure 6.
The arbitrary input used in the first scenario.
Figure 7.
The lateral position and velocity data of the tracking points, A1 to A7.
Figure 7.
The lateral position and velocity data of the tracking points, A1 to A7.
Figure 8.
Decomposition of the position data into the linear oscillations and the gross motion.
Figure 8.
Decomposition of the position data into the linear oscillations and the gross motion.
Figure 9.
Reconstruction of the data with the main modes and the reconstruction error.
Figure 9.
Reconstruction of the data with the main modes and the reconstruction error.
Figure 10.
Results of the CDE DMD gross motion prediction (training scenario).
Figure 10.
Results of the CDE DMD gross motion prediction (training scenario).
Figure 11.
Arbitrary input in the unseen scenario.
Figure 11.
Arbitrary input in the unseen scenario.
Figure 12.
Results of the CDE DMD gross motion prediction for the unseen scenario.
Figure 12.
Results of the CDE DMD gross motion prediction for the unseen scenario.
Figure 13.
A closed-loop scenario of CDE DMD directional control for a nonzero initial orientation.
Figure 13.
A closed-loop scenario of CDE DMD directional control for a nonzero initial orientation.
Figure 14.
A closed-loop scenario with an initial distance dislocation.
Figure 14.
A closed-loop scenario with an initial distance dislocation.
Figure 15.
Pneumatic circuit for actuation of the soft robot.
Figure 15.
Pneumatic circuit for actuation of the soft robot.