Design, Construction, and Modeling of a BAUV with Propulsion System Based on a Parallel Mechanism for the Caudal Fin

Traditional propulsion systems for autonomous underwater vehicles (AUVs) have several deficiencies, such as the invasion of the aquatic environment through the generation of noise and damage to the ecosystem, higher energy consumption, and a unidirectional thruster vector. The last characteristic constrains the maneuverability of the vehicle. This paper proposes a 3-DOF spherical 3 universal–cylindrical–universal and 1 spherical joint (3UCU-1S) parallel mechanism coupled to an artificial caudal fin to produce a vectored thruster for a biomimetic AUV (BAUV). First, the design and construction of the prototype are described. Then, the kinematics and dynamics analysis of the parallel mechanism is presented. Finally, a motion study shows the types of movements that can be achieved with the mechanism to perform flapping of the caudal fin in different directions.


Introduction
A significant part of the Earth is made of water provenience of lakes, rivers, and oceans, most of them still unexplored [1][2][3][4]. Underwater robots have begun to revolutionize seabed exploration, generally providing better information at a lower cost. The propulsion system of an underwater robot ultimately defines the types of movements and maneuvers it can perform. In the design of propulsion systems, aspects such as energy consumption, robot hardware, and the effects on the marine environment should be considered [3]. Autonomous underwater vehicles (AUVs) are robots that navigate based on algorithms and surrounding information. They are equipped with multiple advanced sensors to carry out exploration, operations of intelligence, and reconnaissance, as well as maritime research and development [1,2]. AUVs are important for oceanography for exploration and collecting data. There are a variety of vehicles with different sizes, shapes, working depth limits, energy sources, and methods of propulsion; about 155 unique configurations exist which are in different stages of development and are being used for scientific, commercial, oceanographic, and military applications [3,4].
The main components of underwater vehicles [1,4] are the cabin or hull, sensor systems, energy source, and the propulsion system. Communications systems are challenging for AUVs due to constraints not found in other environments; autonomous systems are based on acoustic sensors. González et al. [5] described a review of different technologies used for underwater localization,

Conceptual Design of the BAUV
Fishes have many types of swimming locomotion classified into two types of movement: body caudal fin (BCF) and median or paired fin (MPF). With BCFs, the waves generated from the body move towards the caudal fin, producing the propulsion. In addition, BCFs are classified into two types of motion: undulatory and oscillatory. With oscillatory motion, the fish swings the body and caudal fin to propel the body. This paper is focused on thunniform locomotion, which is an oscillatory motion of the BCF type since it is the most efficient. Around 90% of the thrust is generated by oscillatory   The trajectory of the BAUV is defined using the standard SNAME notation (The Society of Naval Architects and Marine Engineers) established in 1950 for underwater vehicles [19]. The parameters are listed in Table 1 and represented in Figure 1.
The caudal fin performs a combination of movements causing yaw and sway trajectory of the fish; the thrust and propulsive efficiency are dependent on the caudal fin aspect ratio (AR), where a higher AR leads to higher efficiency, and caudal fin shape (beneficiated by a curved leading edge, which reduces suction of the leading edge, avoiding boundary layer separation at high thrust). The AR is defined as the fin span squared, divided by the projected fin area. High aspect ratio fins lead to improved efficiency because they induce less drag per unit of lift or thrust produced. In thunniform swimmers, AR values range from 4.5 to about 7.2 [8]. The caudal fin shape defines the direction of the thrust [18]. Figure 2 shows the model of the caudal fin for the prototype of this research, where AR = 6.1. Table 1. The Society of Naval Architects and Marine Engineers (SNAME) notation for DOF and forces acting on a submersible body.

Axis
Motion SNAME Position Velocity Force

98
The trajectory of the BAUV is defined using the standard SNAME notation (The Society of Naval

99
Architects and Marine Engineers) established in 1950 for underwater vehicles [19]. The parameters 100 are listed in Table 1 and represented in Figure 1.

101
The caudal fin performs a combination of movements causing yaw and sway trajectory of the 102 fish; the thrust and propulsive efficiency are dependent on the caudal fin aspect ratio (AR), where a higher AR leads to higher efficiency, and caudal fin shape (beneficiated by a curved leading edge, 104 which reduces suction of the leading edge, avoiding boundary layer separation at high thrust). The

105
AR is defined as the fin span squared, divided by the projected fin area. High aspect ratio fins lead 106 to improved efficiency because they induce less drag per unit of lift or thrust produced. In thunniform 107 swimmers, AR values range from 4.5 to about 7.2 [8]. The caudal fin shape defines the direction of 108 the thrust [18]. Figure 2 shows the model of the caudal fin for the prototype of this research, where Table 1. The Society of Naval Architects and Marine Engineers (SNAME) notation for DOF and forces 111 acting on a submersible body.

112
Axis Motion SNAME Position Velocity Force

129
The prototype was manufactured and assembled with the following components:   o Current sensor: This is used to determine the time of operation for a limited power source.

150
A sensor Allegro TM ACS712 provides a way to sense the current for AC or DC circuits.

153
 Drivers: A driver controls the operation of different devices from a control signal provided by

Prototyping
The prototype was manufactured and assembled with the following components: • Energy Source: Li-Polymer battery of 5000 mAh.

•
Onboard computer: A card size Raspberry 3B+ was selected due to the versatility in communications, programming, and greater ease of connection to other types of plug and play devices. • Actuators: For the propulsion system, there were three linear motion Actuonix L16-50-35-12-Ps with feedback of the position; they worked with an input voltage up to 15 VDC. The steering/tilting movements were achieved through the control of servomotors HS-5086WP for the pectoral fins.

•
Sensors and signal acquisition: The sensors of the BAUV depend on the activities to be carried out. For this research, the BAUV was equipped with: • Inertial measurement unit: Integrates an accelerometer, gyroscope, and magnetometer. The BNO055 is a system in package (SiP), integrating the previously mentioned devices.

•
Humidity sensor: Relative humidity is the ratio of the partial pressure of water vapor to the equilibrium vapor pressure of water at a given temperature. The AM2320 sensor provides measurements of temperature and relative humidity. This sensor aims to detect water leaks in the area of the circuits to take appropriate measures and avoid damage to the vehicle. • PH meter: SEN0161 is an analog pH sensor with a voltage regulator and a filter at the output.

•
Turbidity sensor: the TDS-10 module measures the number of suspended particles in water.

•
Current sensor: This is used to determine the time of operation for a limited power source. A sensor Allegro TM ACS712 provides a way to sense the current for AC or DC circuits. Later, more autonomous communications will be implemented, such as those mentioned by González et al. in [5]. Another type of communication in the vehicle was between the main CPU and the components; here, an I 2 C interface was implemented.

•
Printed circuit boards: To integrate the different actuators and sensors, a circuit board was designed to provide connectivity and power distribution. The schematic of Figure 4 shows the interconnection between boards.  168 SDA are serial data; SCL are serial clock signals; and Analog refers to analog signals.

169
An essential part of the novel design is the flexible peduncle required to cover the parallel 170 mechanism and hold the caudal fin; this material represents the part of the flexible peduncle. The 171 material proposed is polydimethyl-siloxane (PDMS) silicone Sylgard 184, which is durable, tensile, and resistant against water and most solvents [20]. All other parts of the parallel mechanism, as well as the dorsal and pectoral fins and the nose, were printed on polylactic acid filament (PLA). The caudal fin was made of flexible filament thermoplastic polyurethane (TPU). Figure   An essential part of the novel design is the flexible peduncle required to cover the parallel mechanism and hold the caudal fin; this material represents the part of the flexible peduncle. The material proposed is polydimethyl-siloxane (PDMS) silicone Sylgard 184, which is durable, tensile, and resistant against water and most solvents [20]. All other parts of the parallel mechanism, as well as the dorsal and pectoral fins and the nose, were printed on polylactic acid filament (PLA). The caudal fin was made of flexible filament thermoplastic polyurethane (TPU). Figure 5 shows the final prototype and the respective components of it.

Instrumentation
The electrical system provides energy from the vehicle's battery to the propulsion system, the sensors, the control system, and other actuators. A diagram of the hardware architecture is shown in Figure 6.

179
The electrical system provides energy from the vehicle's battery to the propulsion system, the Figure 6.

Software
The software was developed using Python language, given that the mainboard is Raspberry Pi 3B+. Python is an open-source programming language of a high-level. This language is defined as multi-paradigm; this means it is suited to different programming styles. A server-client architecture ( Figure 7) was selected, with the BAUV's onboard computer acting as the server and a laptop computer (station) being the client. This architecture was used during the testing period, but in the future, it will change to allow the BAUV to be more autonomous. In the testing period, a computer was used to monitor the data from the different sensors that allow knowing the BAUV's status. The communication between the BAUV and the computer was performed using WiFi and serial communication for some of the tests.  The software of the system included a script that ran in the Raspberry Pi as a server onboard the BAUV and another PC client. The main processing was done in the Raspberry Pi; the client allowed us to monitor and change the values of the main actuators.
A graphical user interface was implemented on the client; Figure 8 shows its initialization. This interface showed the values of the sensors in real-time, and also allowed us to change the values of the actuators. Later, this interface will change depending on the type of control and communications system that will be implemented in the BAUV. The measurements of most sensors, except those of pH and turbidity, were used for control tasks.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 7 of 15 The software of the system included a script that ran in the Raspberry Pi as a server onboard the 197 BAUV and another PC client. The main processing was done in the Raspberry Pi; the client allowed 198 us to monitor and change the values of the main actuators.

199
A graphical user interface was implemented on the client; Figure 8 shows its initialization. This

207
Parallel mechanisms perform a specific kinematics configuration that has advantages over serial 208 configuration, such as mechanical simplicity and high rigidity [15]. AUVs with a parallel mechanism 209 on the propulsion system can change orientation along arbitrary space trajectories; propeller position 210 is adjusted producing a vectored thruster and resulting in smaller working space [16]. This work 211 proposes a parallel mechanism with spherical 3-DOF motion using a 3UCU-1S architecture adapted    (1) Figure 8. Graphical interface on the client script.

Propulsion System Modeling
Parallel mechanisms perform a specific kinematics configuration that has advantages over serial configuration, such as mechanical simplicity and high rigidity [15]. AUVs with a parallel mechanism on the propulsion system can change orientation along arbitrary space trajectories; propeller position is adjusted producing a vectored thruster and resulting in smaller working space [16]. This work proposes a parallel mechanism with spherical 3-DOF motion using a 3UCU-1S architecture adapted to control the motion of the propulsion system with a caudal fin. The mechanism is composed on one base attached to the middle body, a moving platform carrying the caudal fin, three actuated limbs consisting of universal-cylindrical-universal joints from the base to the moving platform, and one passive limb fixed to the base and attached to the moving platform through a spherical joint. The cylindrical joint is formed by a rotational joint that has collinear axes with the prismatic joint of the servomotor; the underlined letter denotes the actuated joint [21].

Inverse Kinematics Analysis
The kinematics model is the mathematical representation of the position, velocity, and acceleration defined by the links and joints that conformed the robot with respect to the reference frame [1]. For this robot, a coordinate reference frame {A} was attached to the fixed base of the 3UCU-1S mechanism, and another coordinate frame {B} was attached to the moving platform. For convention, further analyses denote vectors and matrices as bold letters. The vector d i (i = 1, 2, 3) is from points A i to B i . For convenience, the origin of frame {B} was situated at the center of mass of the moving platform. The axes and frames were placed as shown in Figure 9.
The orientation of the moving platform is described by a rotation matrix A R B defined by roll, pitch, and yaw angles ( X − Y − Z Euler angle convention): that is, a rotation of Φ about the fixed x − axis, a rotation of Θ about the fixed y − axis, and a rotation of Ψ about the fixed z − axis. Thus, the rotation matrix from the moving platform of frame {B} to the new global frame {A} is as follows: The length of the limb and its unit vector are: ̂= , For linear and angular acceleration, ( × ( ×̂)) •̂= − • is considered.

244
̈=̇=̇× + × ( × ), where is the distance from the center of the platform to the ball joint of the ℎ limb and is the 245 distance of the center of the base to the universal joint of the ℎ limb. Each linear actuator is 246 decomposed into two parts, as shown in the body diagram of Figure 10, with masses 1 and 2 .

247
The position of each center of mass are 1 and 2 . Then, their corresponding linear velocities and 248 accelerations are: The length of the limb l i and its unit vector s i are: Universal joints of the linear actuators with the moving platform constrain the limbs to spin over the longitudinal axis, and therefore ω i ·ŝ i = . ω i ·ŝ i = 0 andŝ i × (ω i ×ŝ i ) = ω i . Then, the derivative of l iŝi gives the angular velocity: For linear and angular acceleration, (ω i × (ω i ×ŝ i ))·ŝ i = −ω i ·ω i is considered. .. .
where b i is the distance from the center of the platform to the ball joint of the i th limb and a i is the distance of the center of the base to the universal joint of the i th limb. Each linear actuator is decomposed into two parts, as shown in the body diagram of Figure 10, with masses m 1i and m 2i . The position of each center of mass are r 1i and r 2i . Then, their corresponding linear velocities and accelerations are: . v 1i = c 1i .

258
The inverse dynamics formulate the system equation of motion (EOM) and execute the histories 259 of the controlling actuated joint forces and moments [23]. This is important for generating high 260 performance of control algorithms, while the forward dynamical model is used for simulation [24].

261
The principle of virtual work [25] 0 is a compact form of the EOM since it eliminates constraint 262 forces and is considered at static equilibrium. Virtual displacements are small displacements that do 263 not break any constraints and are non-time dependent.

264
Applied and inertia forces exerted at the center of mass of the moving platform , and applied 265 and inertia forces exerted at the centers of mass of the cylinder and piston , are defined with 266 the simplified equations proposed by [26].

268
, (15) where and are the inertia matrix and mass of the moving platform, cylinder, and piston, 269 respectively.

270
To solve the dynamical EOM for the actuator forces , the external forces applied to the moving

Inverse Dynamics Analysis
While the kinematics of parallel manipulators have been extensively studied, just a few papers have analyzed the dynamics in these systems. The dynamical model can be used for the simulation of the robotic system and the implementation of control strategies. The dynamic analysis determines the reaction forces and moments due to the position and velocity of the robot. A dynamical model of parallel manipulators is complicated because of the multiple closed-loop chains [1,22].
The inverse dynamics formulate the system equation of motion (EOM) and execute the histories of the controlling actuated joint forces and moments [23]. This is important for generating high performance of control algorithms, while the forward dynamical model is used for simulation [24]. The principle of virtual work [25] δW = 0 is a compact form of the EOM since it eliminates constraint forces and is considered at static equilibrium. Virtual displacements are small displacements that do not break any constraints and are non-time dependent.
Applied and inertia forces exerted at the center of mass of the moving platform F p , and applied and inertia forces exerted at the centers of mass of the cylinder F i1 and piston F i2 , are defined with the simplified equations proposed by [26].
where I k and m k are the inertia matrix and mass of the moving platform, cylinder, and piston, respectively. To solve the dynamical EOM for the actuator forces τ, the external forces applied to the moving platform are supported by the force acting on the passive limb, assuming there are no external forces applied to the passive limb, only actuator forces; therefore, the passive force does not contribute in the moments applied to the moving platform's center of mass.
The Jacobian matrix J −T p describes the relation of angular and linear velocities of the moving platform with the joints, while J ij is the Jacobian matrix of the j th body's (for the cylinder and piston) i th limb, being X = p x p y p z Φ Θ Ψ and L = d 1 d 2 d 3 : .

Forward Dynamics Analysis
In forward dynamics, the actuator forces and external disturbance wrench applied to the manipulator are known, and the trajectory of the platform is calculated. The explicit dynamic equation is: for τ a is the vector of actuator forces and τ d is disturbance forces. M T , C T , and G T correspond to the inertia matrix, Coriolis and centrifugal forces matrix, and gravity vector defined by [26]: Each matrix has the following structure: where (ω k ) × is the skew-symmetric matrix of the angular velocity of the k th element, and the Jacobian time derivative matrices are defined as: ..

Simulations and Experiments
The analysis of the mechanism simulated on Solidworks ® is divided into three types of motion; Figure 11 shows first the caudal fin in the vertical position, then the caudal fin is turned 90 • to hold a horizontal position.
The simulation followed the parameters listed in Table 2. Each experiment shows the displacement graph of the three limbs and the projection angle of the platform corresponding to the case of movement.
• Experiment 1: The caudal fin starts in a neutral position for a vertical fluttering to swim like a tuna. Then, the caudal fin starts to flap from −30 • to +30 • for a total caudal amplitude of 60 • (Figure 12). • Experiment 2: The caudal fin starts in a neutral position for a vertical fluttering and then turns 90 • along the body axis, positioning it for a horizontal fluttering to swim like a dolphin. Then, the caudal fin starts to flap from −30 • to +30 • for a total caudal amplitude of 60 • (Figure 13).

314
The gravity compensation block was applied to attenuate the effect of gravity on the tracking 315 performance, then a gravity compensation term was added to this wrench. This term is indeed the 316 term ( ) of Equation (24), derived from the dynamic formulation. The desired and real closed-loop 317 motions were similar. The PD controller with gravity compensation was able to reduce tracking 318 errors. Note that the controller used in this simulation was in its simplest form. However, the gravity 319 compensation feedback is the key point to reach such a performance with a simple PD structure in 320 control [25]. For this simulation, no disturbances of the hydrodynamical lateral forces were added.

314
The gravity compensation block was applied to attenuate the effect of gravity on the tracking 315 performance, then a gravity compensation term was added to this wrench. This term is indeed the 316 term ( ) of Equation (24), derived from the dynamic formulation. The desired and real closed-loop 317 motions were similar. The PD controller with gravity compensation was able to reduce tracking 318 errors. Note that the controller used in this simulation was in its simplest form. However, the gravity 319 compensation feedback is the key point to reach such a performance with a simple PD structure in 320 control [25]. For this simulation, no disturbances of the hydrodynamical lateral forces were added. To verify the correctness of the forward dynamics model, a closed-loop proportional-derivative (PD) controller was implemented, as shown in the block diagram of Figure 14. It had the desired trajectory for the motion of the moving platform in three distinct scenarios: for a motion of 30 • in roll only, then 30 • in pitch only, and finally 30 • in yaw only; the results are shown in Figure 15. The trajectory of the moving platform X(t) was measured and compared to the desired trajectory X d (t). Furthermore, the tracking error e(t) = X d (t) − X(t) was fed to a controller to determine the required wrench needed. The platform orientation is described by the roll-pitch-yaw angles (Φ − Θ − Ψ) trying to reach the desired trajectory The gravity compensation block was applied to attenuate the effect of gravity on the tracking performance, then a gravity compensation term was added to this wrench. This term is indeed the term G(x) of Equation (24), derived from the dynamic formulation. The desired and real closed-loop motions were similar. The PD controller with gravity compensation was able to reduce tracking errors. Note that the controller used in this simulation was in its simplest form. However, the gravity compensation feedback is the key point to reach such a performance with a simple PD structure in control [25]. For this simulation, no disturbances of the hydrodynamical lateral forces were added.     In this work, a novel BAUV design that employs a parallel mechanism to manipulate the position the subsystems, a simple graphical interface was designed.

340
A motion analysis study was performed in order to know the sequence of movements and  The PD controller implemented for simulation showed good performance for the direct 347 dynamics model; however, it worked correctly with no disturbance forces, so more advanced 348 controllers will be implemented to deal with the hydrodynamical lateral forces applied to the caudal 349 fin.

350
Future work will also include underwater dynamics simulations, advanced control strategies for 351 the desired path planning, as well as physical tests with the prototype. To give more autonomy to the 352 vehicle, a reliable communication system needs to be designed and implemented. The graphical user 353 interface will be evolving along with the improvements and implementation of the prototype.

346
The PD controller implemented for simulation showed good performance for the direct 347 dynamics model; however, it worked correctly with no disturbance forces, so more advanced 348 controllers will be implemented to deal with the hydrodynamical lateral forces applied to the caudal 349 fin.

350
Future work will also include underwater dynamics simulations, advanced control strategies for 351 the desired path planning, as well as physical tests with the prototype. To give more autonomy to the 352 vehicle, a reliable communication system needs to be designed and implemented. The graphical user 353 interface will be evolving along with the improvements and implementation of the prototype.

Conclusions and Future Work
In this work, a novel BAUV design that employs a parallel mechanism to manipulate the position of a caudal fin was developed. The proposed propulsion system allows for the use of different types of swimming, e.g., vertical like a tuna and horizontal like a dolphin. Moreover, it is possible to use intermediate orientations of the fin and have a thrusted vector. These features will increase the maneuverability of the vehicle.
The architecture of the vehicle was designed considering the necessary systems to implement in the near future for a fully autonomous vehicle. The main components included an onboard computer, sensors, actuators, and power and communication protocols. In addition, to perform the testing of the subsystems, a simple graphical interface was designed.
A motion analysis study was performed in order to know the sequence of movements and extensions of the limbs to follow a flapping motion previously established, simulating a vertical fluttering with a caudal amplitude of 30 • , then turning to a horizontal position of the caudal fin and repeating the same fluttering at the new position. These results provide design information for future research on advanced control strategies for the planning trajectory of the BAUV to increment the efficiency and autonomy of the vehicle.
The PD controller implemented for simulation showed good performance for the direct dynamics model; however, it worked correctly with no disturbance forces, so more advanced controllers will be implemented to deal with the hydrodynamical lateral forces applied to the caudal fin.
Future work will also include underwater dynamics simulations, advanced control strategies for the desired path planning, as well as physical tests with the prototype. To give more autonomy to the vehicle, a reliable communication system needs to be designed and implemented. The graphical user interface will be evolving along with the improvements and implementation of the prototype.

Conflicts of Interest:
The authors declare no conflicts of interest.