Bio-Inspired Design of an Underwater Robot Exploiting Fin Undulation Propulsion

Interest in autonomous underwater vehicles is constantly increasing following the emerging needs of underwater exploration and military purposes. Thus, several new propulsion mechanisms are studied and developed. Fish swimming is a promising source of inspiration because they outperform conventional propellers in terms of energy efficiency and maneuvrability. Their advantages are not only due to the streamlined shape and their low-drag skin but also, above all, due to the particular fin motion, which makes thrust generation possible with small energy dissipation. This paper analyses the motion of batoid fishes that are considered highly efficient by biologists. Their motion is reproduced by different linkage mechanisms optimized to fit underwater robots. A bioinspired robot mimicking cownose ray locomotion is, then, designed and built. Numerical analysis of its dynamics allows us to measure the size of actuators and to estimate the robot behavior. Finally, the control algorithm that maintains the mechanism synchronization according to different strategies is described and some experimental results are presented.


Introduction
In nature, a large variety of strategies for underwater locomotion have evolved over millions of years and have achieved optimal performances. Therefore, the design of autonomous underwater vehicles (AUVs) is a promising field of application for bioinspired engineering. Bioinspired AUVs are underwater robots that can be employed for several different tasks that require high maneuvrability and great endurance. These features are typical of fishes or other swimming animals, which move with high energy efficiency and, thanks to their flexible bodies, can perform maneuvres with great agility [1].
Stingrays and mantas belong to the order of batoid fishes, the swimming strategy of which is characterized by the motion produced by their large pectoral fins. They produce a travelling wave that pushes water backwards and generates thrust thanks to momentum conservation [2,3]. This type of locomotion is identified as oscillatory if less than a half wave is present on the fin or undulatory otherwise. Undulatory swimming is distinctive of small species that need great maneuvrability and that live in narrow environments, whereas oscillatory swimming is characteristic of migratory fish that roam through the ocean at high speed [4]. Figure 1 shows how the combined motion of flapping and pitching of a fin is, actually, the propagation of a wave with a wavelength greater than twice the body length of the fish. The cownose ray (Rhinoptera Bonasus) is a median size fish that combines these capabilities; therefore, it is taken as a source of inspiration for the development of a robot mimicking its locomotion. Thanks to their high efficiency and to their agility, batoid fish locomotion has inspired the development of several underwater robots [1], which are briefly described in the following paragraph.
Many robots that take inspiration from a batoid fish use a single actuator to move each fin, and undulatory motion is obtained with the passive flexibility of the fin itself. One such robot is the Manta ray robot developed by Gao et al. [5], which features a large central body and rigid leading edges with support for the flexible fin membrane. The Robo-Ray II is composed of a flexible rubber exterior shell containing a rigid central part and pneumatic artificial muscles actuating the fins [6,7]. Robo-Ray III, made by Niu et al. [8,9], is characterized by a central body equipped with control flaps for stability and a flexible membrane of silicone rubber. The robot ray developed by Chew et al. [10] features a rigid central body containing two servomotors that actuate the bionic fins, which are thin foils with a rigid leading edge.
Other robots use a single mechanism to move the fin, but they actuate two degrees of freedom: the flapping motion and the twist angle of the fin, so that, with an appropriate combination of the two motions, they are able to recreate the oscillating motion of the fin of a batoid fish. One example of this kind is the robot developed by Ma et al. [11], whose fins are made from some flexible ribs covered by an elastic skin. The manta ray robot developed by Zhang et al. [12] exploits a very similar principle and integrates a rigid structure with flexible metal cables. The robot realized by Chen et al. [13] has fins composed of a flexible elastomer, and they are actuated by an electroactive polymer beam, which performs both flapping and twisting motions. The Aqua Ray robot, made by Festo [14], is actuated by hydraulic bionic fin muscles, and three antagonistic muscles give the robot the ability to flap and twist its fins to recreate an oscillatory motion.
Finally, other robots have several independent mechanisms actuating each fin. Although wave propagation along the fins of a cownose ray is similar to the motion of a heaving and pitching aerofoil such that it can be reproduced with a flapping and twisting fin, having more independent mechanisms on each fin gives the possibility to modulate the wave propagation, enhancing the maneuvrability of the robot. The MantaBot robot created by Fish et al. [15,16] has fins composed of tensegrity structures actuated by tensioned cables and surrounded by a flexible elastomer. RoMan-III [17] and RoMan-IV [18] have multiple fin ribs that actuate a flexible membrane, and the body is rigid with actuation motors along the side of the body. The bionic fish developed by Cai et al. [19], which has its flexible fins actuated by several motors, accurately reproduces the travelling wave present on a cownose ray and it is featured by high maneuvrability. The robot described in this paper has deformable fins actuated with three independent mechanisms, so that it is possible to achieve great maneuvrability by adjusting the parameters of the fin kinematics, such as the frequency of oscillation and the phase shift between the different mechanisms. The fluid structure interaction of the robot in water has been investigated with a Computational Fluid Dynamics (CFD) model and the hydrodynamic forces resulting from such an analysis have been used to model the dynamics of the robot with a multibody analysis.
In Section 2, the mechanical design of the robot is presented, its dynamics are analysed, and the control algorithm is described; in Section 3, some experimental results are presented, and in Section 4, conclusions are drawn.

Materials and Methods
The first step of the project is the analysis of fin geometry and fin motion; then, kinematic synthesis of a mechanism reproducing the fin is performed. After these steps, the dynamics of the robot is modelled, and a control algorithm is designed. Finally, the robot is built and tested.

Shape and Dimensions of the Robot
The first step of this bio-inspired robot design is reproduction of the shape of a cownose ray, in particular, of its fins. The contour of the fin is taken from the literature [9], and it is obtained by reconstructing a curve that follows the profile of a real cownose ray. The cross sections along the span of a fin can be approximated with a series of aerodynamic profiles with gradient changes from a large profile in the centre of the body to a small profile at the tip of the fin [19]. The reconstructed shape of the external surface of the robot and its dimensions are represented in Figure 2.

Kinematic Synthesis of the Fin Mechanisms
The mechanisms actuating the fins were designed with the objective of accurately mimicking the fin deformation that is responsible for thrust generation. The motion of the fin is a travelling wave with an amplitude increasing towards the tip. Since the number of waves on the fin is about 0.4 [4], three mechanisms are enough to reproduce the travelling wave, and they are positioned near the head, in the centre, and near the tail [9].
The equations representing the deformation of the fin can be obtained from the work of Russo et al. [20], who analysed the skeletal structure of a cownose ray and related it to the kinematics of the fin. Assuming that the deformation is continuous along the fin, the equations representing the deformation of a section of the fin are as follows: where y and z are depicted in Figure 3, ω is the frequency of fin flapping, φ is the wave number along the fin, θ max is the angle formed by the fin at its tip, and s is the curvilinear abscissa along the fin span. A kinematic diagram of the mechanism actuating the central part of the fin is presented in Figure 4. The four-bar linkage actuated by the motor is connected to the first link, which moves the second and third links through sliders and hinges. In the first stage, the four-bar linkage O-H-K is not considered in kinematic synthesis of the mechanism. The lengths of the links are selected using an optimization method to approximate as accurately as possible the deformed shape of the fin using the minimum area error method [21]. This method consists of finding the optimal combination of link lengths that minimize the area between the real deformed curve and the shape obtained with the three links. The optimization procedure is performed considering an adimensional problem and considering the overall length of the fin span in the central section.
The area below the real curve is obtained by integrating Equation (1) along z: The area below the links, instead, is as follows: The angle α is a sinusoidal function of time, and the variable θ can be introduced as a cyclical variable. The amplitude of the oscillation of α is unknown, and it is determined together with the other parameters of the optimization: The angles β and γ can be written as functions of α: Considering that the sum of the length of the three links must be equal to the length of the span of the fin, it is possible to write the following: Therefore, the area below the linksÃ of Equation (4) is a function of five variables: L 1 , L 2 , a, b, and X. The function to minimize is the difference between the two areas for all the time instants of a period of fin oscillation, i.e., for all the angles θ from 0 to 2π, and it is written as follows: The minimum of the objective function presented in (9) is searched with the fmincon function present in Matlab, which solves a constrained optimization problem. Since the objective function has several local minima, the solution is strongly dependent on the initial guess. Thus, the initial guess is selected by evaluating the objective function on several combinations of the five variables using nested for cycles.
The result of the optimization is shown in Figure 5. The other two mechanisms moving the fin are designed with the same optimization method. Since the deformation of the fin in every section is described by the same equations as that in the central section, the only difference between real deformation of the front or back sections and the central section is in the length of the fin span. Given that the result obtained with optimization of the mechanism of the central part of the fin is more than satisfactory, the same kinematic diagram is used for the mechanisms on the front and back of the fin. To account for different lengths of fin span, the mechanism for the frontal part of the fin (Figure 6a) lacks the third link; similarly, the link in the back of the fin (Figure 6b) lacks both the second and the third links, as shown in Figure 6. Since both the curve defining deformation of the fin and the kinematic diagram are the same, the optimization gives the same results and the link lengths are equal to those on the central mechanism of the fin. To transform the continuous rotation of the motor ψ into an alternative rotation of the first link, a four-bar linkage was designed. Considering Figure 4, the angle α is written as a function of the angle ψ and of the lengths of the links composing the four-bar linkage, and the error function is then minimized. The result of the optimization is shown in Figure 7, where the angle α obtained with the four-bar linkage and the desired angle α of Equation (5) are plotted.  Finally, the complete mechanism can be designed and its superimposition on the ideal curve of a real fish is shown in Figure 8.

Robot Assembly
In Figure 9, a Computer-Aided Design (CAD) model of the final assembly without the external surface surrounding the fins is presented. The software used for CAD modelling is Solidworks. There are three mechanisms in each fin, so that, with a correct phase shift among them, it is possible to recreate the travelling wave along the fin. The tail is actuated by two independent motors and acts as a rudder to the correct pitch rotation during forward motion and to perform maneuvres.
All the links composing the mechanisms, the tail, and the frames containing the servomotors were 3D printed with Z-UltraT material. They were mounted on an aluminium base. The shape is given by the aerodynamic profiles and the NACA 0020 in the center is rigid, whereas the others mounted on the fins were obtained by molding flexible silicone rubber.
Finally, the external surface is obtained by welding together two polyethylene sheets along the contour of the robot. This cover is fundamental as it preserves the shape of the robot throughout the movement of the fins and it waterproofs the robot.
The electronics and the battery are positioned below the aluminium base. The main electronic board is an Arduino Due, and the robot is equipped with a Bluetooth module and with a 3-axes accelerometer and gyroscope. The system is powered by a LiPo battery FullPower with two cells, which supplies 7.4 V, and it has a capacity of 5200 mAh.
The robot is self-buoyant, and its mass is about 10.2 kg. The center of mass is under the base, where the battery and some balancing weights are positioned.

Dynamic Analysis and Motor Sizing
The dynamics of the robot was investigated using the multibody software SimMechanics. The hydrodynamic forces acting on the fins were taken from a CFD analysis carried out with OpenFOAM.

Hydrodynamic Forces Estimation
The objective of this CFD analysis was to estimate the forces acting on a cownose ray fin moving with a prescribed motion law and immersed in a constant speed flow.
The numerical simulation was 3D and unsteady, and it was performed using a moving mesh. Unsteady-Reynolds-Average-Navier-Stokes (URANS)equations were solved, and the k − ωSST method was used to model turbulence. k − ωSST is a well-established turbulence model since it combines the best features of k − ω and k − methods: a k − ω formulation was adopted in the inner parts of the boundary layers and a k − formulation was adopted in the free stream [22]. Considering the symmetry of the fish, only one fin was present in the simulation, and symmetry plane boundary conditions were imposed on the middle plane of the body for every variable. In Figure 10, it is possible to see the domain of the simulation with the imposed boundary conditions. A constant fluid velocity of 1 m/s was imposed at the inlet and as an initial condition for the internal flow, a moving wall velocity condition was imposed on the fin, and a zero gradient boundary condition for velocity was present at all the other boundaries. As far as pressure is concerned, a fixed pressure of 0 Pa was imposed at the outlet and a zero gradient condition was imposed everywhere else.
The mesh was composed of 1,005,416 cells, with 7 levels of refinement around the surface of the fin. The mesh motion on the fin surface was imposed with a custom function that moves the points of the mesh according to Equations (1) and (2). The rest of the mesh was deformed using a Laplacian motion solver with a quadratic inverse distance diffusivity. In Figure 11, the deformed mesh is shown at different positions of the fin motion. In this analysis, the fin moved with a frequency of 1 Hz, 0.4 waves were present on the fin, and one period, i.e., 1 s, was simulated. The pressure distribution on the fin at different instants of fin motion is shown in Figure 12. As it is possible to observe, the motion created a negative pressure in front of the fin and a positive pressure behind it, so that the fish was pushed forward by the surrounding fluid. The major contribution to this pressure difference was given by the area near the fin tip, where the fin motion featured a greater amplitude. It can be noted also that, at the area near the leading edge, the pressure difference is higher than in the area near the trailing edge. The propulsive force is maximum at the middle of the fin motion, both during upstroke and during downstroke, when fin velocity is maximum; conversely, when the fin tip reaches the top and the bottom extremities, it has zero velocity, so its propulsive force is minimum.
To analyze the effect of such a pressure distribution on the torque and on the power required by the motors, the surface of the fin was divided in six smaller regions and, in each of them, the resultant force and moment vectors were extracted, as shown in Figure 13. These forces and moments were then exported to Simulink and applied in the correspondent positions of the robot.

Multibody Analysis
Once the forces acting on a fin are known, they can be used to investigate the dynamics of the robot. The objective of this multibody analysis is to understand the maximum torque required by motors to produce this travelling wave on the fin, so that a propulsive force is generated. Including both fins in the analysis, it is possible to investigate forward swimming and turning maneuvres. If the wave travels in the same direction on both fins, the generated forces are equal and the robot swims in a straight direction. Conversely, if the waves on the two fins travel in opposite directions, the generated force are opposite and a turn can be achieved, as represented in Figure 14. In this multibody analysis, the motion laws of the robot fins are prescribed: there is a phase shift between the three mechanisms consistent with the travelling wave present in the CFD analysis, which features a frequency of 1 Hz and a wavelength of 0.4 body lengths per second.
The motors move the links in a vertical and in a span-wise direction, and there is no relative motion of the links with respect to the base in a longitudinal direction. Therefore, only vertical and span-wise forces have an effect on motor torque; the propulsive force acting in a longitudinal direction is only a consequence of the vertical and span-wise deformation of the fin. Hence, the yaw rotation, which arises as a result of the application of two opposite longitudinal forces, does not directly affect the motor torque.
The forces and moments acting on each region of the fin are presented in Figures 15 and 16, where the number of regions correspond to the numbers indicated in Figure 13. The presented forces and moments refer to the right fin, the one present in the simulation; on the left fin, the vertical force and the pitch moment are equal, whereas the force on the span-wise axis and the roll moment have an opposite sign. The force acting in the vertical direction has the same frequency as the fin motion; conversely, the frequency of the force acting in the span-wise direction is double because, when the fin tip approaches both the maximum positive amplitude and minimum negative amplitude, the fluid is pushed towards the central body of the robot and it is moved outwards when the fin returns to the median position.
The resulting torque required by each motor and the power consumed to move each fin are plotted in Figure 17. Thanks to the phase shift between the three motors, the peaks of requested torque are not simultaneous. This is advantageous in terms of instantaneous power, which remains smaller than it would have been with no phase shift. The servomotors are chosen so that their maximum torque limit is never exceeded. The selected motors are Feetech FB5311m, able to generate a torque of 2 N m rotating at 60 rpm; the controlled variable is velocity, and they provide an angular position feedback.

Control Algorithm
The control algorithm is designed to keep the two fins synchronized and to guarantee the desired phase shift between the mechanisms of each fin. During forward swimming, the phase shift between mechanisms is the same for both fins and each mechanism is synchronized with the corresponding one on the other fin. During a turn maneuvre, the phase shift between mechanisms is the opposite for the two fins, the two central mechanisms are again synchronized, but the front mechanisms are synchronized with the back mechanisms of the opposite fin.
For each motor, the velocity is calculated as the sum of a feedforward part and of a feedback part. The feedforward part is the reference velocity of motors (ω re f ), which is proportional to the frequency of fin motion, it is equal for all motors and it is provided by the user. The feedback part is a correction needed to maintain the desired phase shift. A Proportional-Integral (PI) control logic is adopted to correct the phase shift between two mechanisms: the angular position of each motor is measured, and the actual phase shift among all motors is computed; then, the phase shift is corrected accelerating the motor in delay and slowing the motor in advance, as depicted in the block diagram in Figure 18. The block diagram of the complete control algorithm for forward swimming is shown in Figure 19. Since the mechanisms are mounted in a mirrored configuration, the motors of different fins rotate in opposite directions. Therefore, the phase shift between the same mechanisms for the same fins is calculated as the sum of the two angles instead of their difference. Figure 19. Block diagram of the control algorithm for forward swimming.
Considering, for example, the central mechanism of the right fin, the input velocity given to the motor is calculated as follows: where ω re f is the reference velocity given by the input, ∆ψ re f is the desired phase shift between the mechanisms, and ψ k is the measured angular position of the motor. The numeration of motors is the same as in Figure 19. The gains k The control algorithm acting on all six motors can be summarized in a matrix form, shown in Equation (11) for forward swimming and in Equation (12) for a left turn. (In both equations, the integral contribution is omitted to simplify the notation.) (12) In both cases, the state matrices have a zero eigenvalue because the reference is given in terms of difference in the angular positions and no absolute reference position is given to the motors. Nevertheless, this does not represent a singularity problem, but it is the consequence of the fact that the measured variables are the angular positions while the control corrects only the difference in angular position among motors.

Results
The final assembly of the robot, as described in the previous section, is shown in Figure 20. The gains in the PI controllers were obtained experimentally with a trial-and-error procedure and their values are as follows: The angular positions were acquired at regular intervals of 1 ms, synchronized by the internal clock of the board. Then, a low-pass filter, with a cutoff frequency of 10 Hz is applied to the acquired signal to delete some high-frequency noise.
The control algorithm was tested experimentally, as displayed in the supplementary video and in Figure 21, where the fin mechanisms are shown in different instants of their motion. Figure 21. Instances of fin motion during forward swimming in sequence (a-d).
The results of the control algorithm can be better appreciated by looking at Figure 22, where the signals coming from the encoders are plotted. In Figure 22a, the encoder measurements are taken when the fish swims forward and it is possible to note that, for both fins, the front mechanisms (Motor 0 and Motor 3) are in advance with respect to the central mechanisms (Motor 1 and Motor 4), and the back mechanisms (Motor 2 and Motor 5) are in delay. On the other side, in Figure 22b, the measurements come from a left turn maneuvre; for the right fin, the mechanisms have the same phase shift as for forward swimming, whereas for the left fin, the back mechanism (Motor 5) is in advance with respect to the central mechanism (Motor 4) and the front mechanism (Motor 3) is in delay.
Some preliminary tests underwater were carried out, as represented in Figure 23. A fin of the robot was immersed in a basin filled with water, and the motion of the fin was imposed. This test showed that the motors are powerful enough to exert a force on the surrounding water and to move the fin in the desired way. During the test, the span of the fin was oriented in a vertical direction, instead of being horizontal. This means that, in this test, weight and buoyancy forces were not present. Nevertheless, this is still representative of the working condition because the robot is self buoyant.

Conclusions
The development of a bioinspired swimming robot was described from conceptual design to dynamic simulation and control logic implementation. The kinematics of fin mechanisms allow us to reproduce the fin deformation and the ability of the selected servomotors to actuate the mechanisms in the desired way and to verify it with a multibody simulation and in a real underwater environment. The control algorithms for the principal gaits of the robot were implemented and tested. The results obtained in the experiments are encouraging, and they are preliminary to the development of a fully autonomous robot, which could be used to investigate the advantages of batoid fish locomotion.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.