Development of a Novel Underactuated Robotic Fish with Magnetic Transmission System

: In this study, a robotic ﬁsh inspired to carangiform swimmers has been developed. The artifact presents a new transmission system that employs the magnetic ﬁeld interaction of permanent magnets to ensure waterproofness and prevention from any overload for the structure and the actuating motor. This mechanism converts the rotary motion of the motor into oscillatory motion. Such an oscillating system, along with the wire-driven mechanism of the tail, generates the required traveling wave in the robotic ﬁsh. The complete free swimming robotic ﬁsh, measuring 179 mm in length with a mass of only 77 g, was able to maintain correct posture and neutral buoyancy in water. Multiple experiments were conducted to test the robotic ﬁsh performance. It could swim with a maximal speed of 0.73 body lengths per second (0.13 m/s) at a tail beat frequency of 3.25 Hz and an electric power consumption of 0.67 W. Furthermore, the robotic ﬁsh touched the upper bound of the efﬁcient swimming range, expressed by the dimensionless Strouhal number: 0.43 at 1.75 Hz tail beat frequency. The lowest energy to travel 1 meter was 4.73 Joules for the ﬁnal prototype. Future works will focus on endowing the robot with energy and navigation autonomy, and on testing its potential for real-world applications such as environmental monitoring and animal–robot interaction.


General Framework
By reproducing the working principles of living organisms, roboticists may endow their artifacts with better capabilities of adaptation to interact with the environment, pushing the boundaries of engineered systems' performance [1][2][3][4]. In addition, bioinspired robots can be employed to investigate social cooperative behaviors and manipulate groups of animals to deepen the knowledge on self-organization and the evolution of communication [5,6].
(0.39 BL/s). In [35], the artifact presented a rigid body and an IPCM caudal fin; it was 22.3 cm long with a mass of 290 g and a maximal speed of around 0.02 m/s = 0.09 BL/s. In [36], an IPCM actuator was used. The body was a 150 × 60 × 40 mm rectangular plastic box that fixed an electrode at the bottom to drive the IPCM strip actuator. This latter was 50 × 10 mm, and at its end, a 23 × 40 × 25 mm plastic fin was fixed. The total weight was 165.65 g and the maximal speed was 0.75 m/s = 3.36 BL/s. MFC piezoelectric laminates were used in [37], where the robotic artifact was 24.3 cm long with a maximal swimming speed of 0.075 m/s = 0.31 BL/s at a tail beat frequency of 5 Hz. In these conditions, the electric power consumption was 1.4 W. Table 1 summarizes the characteristics of the robotic artifacts under consideration, also reporting the Strouhal number when available. When provided data were enough to calculate the work per meter and the cost of transport (COT), these quantities were calculated and reported. These two data, as the already mentioned Strouhal number, are also indicative of swimming efficiency.  [14] n/a 1, 0 n/a n/a n/a n/a 25 n/a n/a [15] 0.29 0.213 0.44 n/a n/a n/a 4.12 n/a n/a [16] 1.02 0.255 4.0 15 n/a n/a 0.306 1.6 n/a [17] 0.21 0.255 0.82 3.6 n/a n/a n/a n/a 0.65 [18,19] 0.67 0.31 2. 15 3.0 ∼3.7 ∼12.7 0.5 ∼23.4 0.36 ÷ 0.6 [20] n/a 0.473 n/a n/a n/a n/a n/a n/a n/a [21] 0.33 0.661 0.5 n/a n/a n/a 6.8 n/a n/a [22] 0.48 0.48 1 2 n/a n/a 3.55 n/a n/a [23]  n/a n/a n/a [32] 1.14 0.37 3.1 8.0 25.6 22.5 n/a n/a n/a [33,34] 0.15 0.385 0.39 ∼1.57 n/a n/a 0.2 n/a n/a [35] 0.02 0.223 0.09 ∼1 n/a n/a 0.29 n/a n/a [36] 0.75 ∼0.2 3.36 n/a n/a n/a ∼0.17 n/a n/a [37] 0.075 0.243 0.31 5.0 1. 4 19 n/a n/a n/a

Aim of This Work
In this paper, a tethered robotic fish with carangiform swimming mode is developed. By following the approach of [21] and [23], the proposed robotic fish is characterized by a modular structure with a biomimetic wire-driven (similar to that in [38]) design that resembles the contraction and relaxation of the lateral tail muscles. The actuation was realized with a single DC micro gear motor placed into the fish head. For the transmission, a novel mechanism was investigated that exploited the magnetic field interaction of permanent magnets. The main advantage of this innovative transmission principle consists of preventing the gear motor and the tail structure from any overload. When the fish tail becomes stuck, it simply stays still in position while the motor continues to run smoothly, breaking the magnetic coupling. This can avoid excessive stress for both the motor and the structure. Once the fish tail is released, the magnetic coupling and thus the tail waving are recreated. This work also aims at not exceeding the value of 20 cm for total length, and achieving neutral vertical buoyancy and balance. Unlike most robotic fish of similar size, the proposed robotic fish could swim freely in the right position without any vertical strut supporting it.
The reminder of this research is organized as follows: Section 2 provides a general overview of the final manufactured prototype, the mathematical modelling of the traveling wave, and the procedure to size the propulsive tail of the fish, endowing the robotic artifacts with a proper balancing. In Section 3, all the experimental tests performed to characterize the performance of the robotic fish are presented together with the relative results. • Hydrodynamic waterproof head. • Three links, the last of which with a built-in caudal fin. • Power supply wires. Figure 1c shows an exploded view of the CAD robot assembly in which the internal elements are visible too. The head was produced with an ABS-based rigid part that was covered with a silicon sheath. The thin flexible connecting rod and the lateral wires simulating the flexible spinal cord and the muscle fibers, respectively, into the posterior part of the body, are also clearly visible. The micro-DC gear motor placed inside the head provides rotational motion to the disc in which the permanent magnets were inserted. The magnets on the right and left sides of the disc had opposite polarities (represented by red and blue). The oscillating unit had one magnet on each side with the same polarity orientation (represented in blue); thus, when one of them was attracted by the magnets on the disc, the other was repulsed, the tail pointed to the side of the repulsed magnet, and the whole posterior part of the body bent to the other side ( Figure 2b and Video S1). and achieving neutral vertical buoyancy and balance. Unlike most robotic fish of similar size, the proposed robotic fish could swim freely in the right position without any vertical strut supporting it.

Modelling and
The reminder of this research is organized as follows: Section 2 provides a general overview of the final manufactured prototype, the mathematical modelling of the traveling wave, and the procedure to size the propulsive tail of the fish, endowing the robotic artifacts with a proper balancing. In Section 3, all the experimental tests performed to characterize the performance of the robotic fish are presented together with the relative results.

Overview of the Complete Prototype and Working Principle
Error! Reference source not found.a,b provide the lateral and frontal views of the final assembled prototype. It is possible to clearly see the following:  Hydrodynamic waterproof head.  Three links, the last of which with a built-in caudal fin.  Power supply wires. Figure 1c shows an exploded view of the CAD robot assembly in which the internal elements are visible too. The head was produced with an ABS-based rigid part that was covered with a silicon sheath. The thin flexible connecting rod and the lateral wires simulating the flexible spinal cord and the muscle fibers, respectively, into the posterior part of the body, are also clearly visible. The micro-DC gear motor placed inside the head provides rotational motion to the disc in which the permanent magnets were inserted. The magnets on the right and left sides of the disc had opposite polarities (represented by red and blue). The oscillating unit had one magnet on each side with the same polarity orientation (represented in blue); thus, when one of them was attracted by the magnets on the disc, the other was repulsed, the tail pointed to the side of the repulsed magnet, and the whole posterior part of the body bent to the other side (Error! Reference source not found.b and Video S1). (c) exploded view of the final CAD assembly of the robotic fish. The micro gear motor was housed inside the head. Permanent magnets were inserted into the rotating disc and into the oscillating unit. The flexible connecting rod and the lateral wires simulate the flexible spinal cord and the lateral muscular fibers, respectively, of a real fish.
(c) Figure 1. Final fabricated robotic fish. Hydrodynamic waterproof head, three links, and power supply wires are visible. (a) Lateral view of the prototype; (b) frontal view of the prototype; (c) exploded view of the final CAD assembly of the robotic fish. The micro gear motor was housed inside the head. Permanent magnets were inserted into the rotating disc and into the oscillating unit. The flexible connecting rod and the lateral wires simulate the flexible spinal cord and the lateral muscular fibers, respectively, of a real fish. Figure 2. Magnetic mechanism. The micro DC gear motor placed inside the head gives rotative motion to a plastic disc. Permanent magnets were inserted into the disc (a). The magnets on the right and left sides of the disk had opposite polarities (represented by red and blue). The oscillating unit had one magnet on each side with the same polarity orientation (represented in blue). When one of these magnets is attracted to those on the disc, the other is repulsed. The plastic rod (represented in black) always points to the side of the attracted magnet (b, c).
As already anticipated in Section 1, this mechanism prevents the gear motor and the structure from any overload due to the absence of any rigid mechanical connection between the motor shaft and the oscillating arm. The other design principle that was followed is modularity. The proposed fish robot platform consisted of two main parts: (1) a watertight head housing all necessary electronics and (2) an oscillating mechanism exposed to water. The nature and characteristics of these two parts can be modified or adjusted independently from each other. The oscillating mechanism was in turn divided into a principal part, consisting of an oscillating arm, three segments, and two hinges; and a final caudal fin inserted into the final joint. Moreover, such a platform allows for easily investigating several different combinations of heads, joints, and caudal fins. It is sufficient to fabricate different typologies for these parts and connect them together in different combinations.

Modelling of the Travelling Wave
The authors in [24] provided an equation to model the travelling wave in the case of carangiform robotic fish: , (1) Figure 2. Magnetic mechanism. The micro DC gear motor placed inside the head gives rotative motion to a plastic disc. Permanent magnets were inserted into the disc (a). The magnets on the right and left sides of the disk had opposite polarities (represented by red and blue). The oscillating unit had one magnet on each side with the same polarity orientation (represented in blue). When one of these magnets is attracted to those on the disc, the other is repulsed. The plastic rod (represented in black) always points to the side of the attracted magnet (b,c).
As already anticipated in Section 1, this mechanism prevents the gear motor and the structure from any overload due to the absence of any rigid mechanical connection between the motor shaft and the oscillating arm. The other design principle that was followed is modularity. The proposed fish robot platform consisted of two main parts: (1) a watertight head housing all necessary electronics and (2) an oscillating mechanism exposed to water. The nature and characteristics of these two parts can be modified or adjusted independently from each other. The oscillating mechanism was in turn divided into a principal part, consisting of an oscillating arm, three segments, and two hinges; and a final caudal fin inserted into the final joint. Moreover, such a platform allows for easily investigating several different combinations of heads, joints, and caudal fins. It is sufficient to fabricate different typologies for these parts and connect them together in different combinations.

Modelling of the Travelling Wave
The authors in [24] provided an equation to model the travelling wave in the case of carangiform robotic fish: Equation (1) describes a body wave traveling from head to tail in a body-fixed coordinate system with the abscissa positive towards the tail (Figure 3), the linear and quadratic coefficient of the wave amplitude, k = 2π/λ is the body wave number in which λ represents the wavelength, ω is the wave frequency, and t denotes time. Parameters c 1 and c 2 can be adjusted to achieve the desired body-caudal fin (BCF) swimming mode ( Table 2). In this work, the reported values from [6,36] were used to model the traveling wave, and mimic fish swimming [39]. ratic coefficient of the wave amplitude, 2 / is the body wave number in which represents the wavelength, is the wave frequency, and denotes time. Parameters and can be adjusted to achieve the desired body-caudal fin (BCF) swimming mode ( Table 2). In this work, the reported values from [6,36] were used to model the traveling wave, and mimic fish swimming [39].

Wire Mechanism Calculation
With reference to Figure 4, in which the unit of measurement is body length (BL) for both the horizontal and vertical axes, the fish body was piecewise approximated to mimic the characteristic wave form of the carangiform swimming mode. By plotting the waveform curve at different instants of time (Figure 4a), the maximal bending angle was around 52° and could easily be approximated by means of three rigid segments and two connection hinges (Figure 4b). Looking at Figure 5a, Segment 1 was from Point B, where the plastic rod entered the ABS, to Point C (the center of Hinge 1), Segment 2 was from Point C to Point D (the center of Hinge 2) and Segment 3 was from Point D to Point E, i.e., the end of the fish. The oscillating arm was from Point A (the center of the oscillating unit hinge) and Point B, and was composed of the oscillating unit in which magnets were inserted and the flexible connecting rod (represented in Figure 1 and highlighted in black in Figure 2). As clearly shown in Figure 5, Segments 1 and 2 had two channels parallel to the mid axis of the fish (one to the right and one to the left) for the wires to pass through. Their distance from the mid axis was 4 mm. In this first work, since the focus was not on  Table 2. Selected value of the parameters used for modelling the traveling wave.

Description Symbol Value
Linear coefficient of wave amplitude Body wave number k π Wave frequency ω 2π

Wire Mechanism Calculation
With reference to Figure 4, in which the unit of measurement is body length (BL) for both the horizontal and vertical axes, the fish body was piecewise approximated to mimic the characteristic wave form of the carangiform swimming mode. By plotting the waveform curve at different instants of time (Figure 4a), the maximal bending angle was around 52 • and could easily be approximated by means of three rigid segments and two connection hinges ( Figure 4b). Looking at Figure 5a, Segment 1 was from Point B, where the plastic rod entered the ABS, to Point C (the center of Hinge 1), Segment 2 was from Point C to Point D (the center of Hinge 2) and Segment 3 was from Point D to Point E, i.e., the end of the fish. The oscillating arm was from Point A (the center of the oscillating unit hinge) and Point B, and was composed of the oscillating unit in which magnets were inserted and the flexible connecting rod (represented in Figure 1 and highlighted in black in Figure 2). As clearly shown in Figure 5, Segments 1 and 2 had two channels parallel to the mid axis of the fish (one to the right and one to the left) for the wires to pass through. Their distance from the mid axis was d = 4 mm. In this first work, since the focus was not on the perfect reproduction of the carangiform waveform, relatively simpler choices were made: Segments 1 and 2 were assumed to have the same length, and their size was based only on the maximal bending point. Moreover, it was assumed that the total 52 • angle was equally divided between the two joints of 26 • each. In future works, an approach to establish the number, length, and position of segments and joints to closer mimic biological models will be adopted. Since, as specified in [40], head and body segments are also coupled in a timely way, the development and implementation of a refined head control also play a key role in future steps of this research. the perfect reproduction of the carangiform waveform, relatively simpler choices were made: Segments 1 and 2 were assumed to have the same length, and their size was based only on the maximal bending point. Moreover, it was assumed that the total 52° angle was equally divided between the two joints of 26° each. In future works, an approach to establish the number, length, and position of segments and joints to closer mimic biological models will be adopted. Since, as specified in [40], head and body segments are also coupled in a timely way, the development and implementation of a refined head control also play a key role in future steps of this research.  Given the constraint on the robot total length, a total length of 180 mm was assumed to be an indicative reference for the robotic fish. Moreover, a space of 3 mm (∆ 3 mm) was left between the facing sides of the adjacent segment to produce hinges. The axial distance between Point A, the hinge of the oscillating arm, and the wire attachment point was 19 mm, while the transversal distance was 12 mm (they are represented in Figure 5a with continuous and dot lines). The following measures were derived on the Given the constraint on the robot total length, a total length of 180 mm was assumed to be an indicative reference for the robotic fish. Moreover, a space of 3 mm (∆S = 3 mm) was left between the facing sides of the adjacent segment to produce hinges. The axial distance between Point A, the hinge of the oscillating arm, and the wire attachment point was e = 19 mm, while the transversal distance was a = 12 mm (they are represented in Figure 5a with continuous and dot lines). The following measures were derived on the basis of Figure 5b: It is now possible to calculate the required length of the wires for the robotic fish in bended configuration. This total length can be decomposed in several parts: Length of the first part of the wire (l w1 ). This is represented by the orange segment in Figure 5b and was calculated by exploiting the schematic in Figure 6a. By considering triangle GHJ: Considering that FJ = ML, FG = e, J M = FL and that, by looking at triangle BMH, HM = c cos α, Equation (2) becomes: Considering triangles ALM and BMH, the following holds: Machines 2022, 10, x FOR PEER REVIEW 9 of 21 This is represented by the orange segment in Figure 5b and was calculated by exploiting the schematic in Figure 6a. By considering triangle GHJ: Considering that , , and that, by looking at triangle BMH, cos , Equation (2) becomes: Considering triangles ALM and BMH, the following holds: cos sin sin (4) Figure 6. (a) Schematic to calculate the length of the first part of wire . b represents the length of the connecting plastic rod and α the maximal bending angle equal to 26° (b) Schematic of relative position of two consecutive segments when the fish body is in straight configuration (black) and in maximal bending configuration (green).
Lastly, by substituting Equation (4)  Lastly, by substituting Equation (4) into Equation (3), the final expression of l w1 is: Lengths of wire parts inside ABS of Segments 1 and 2 (l w seg1 and l w seg2 respectively).
These wire parts are represented in orange in Figure 5a and are easily obtained: Lengths of wire parts between Segments 1 and 2, and between Segments 2 and 3 (l w 1−2 and l w 2−3 respectively).
These wire parts are highlighted in orange in Figure 5c. For the calculation, the schematic of Figure 6b was used. Black blocks represent the relative position of segments when the robotic fish body was in straight configuration, while green was used to represent the relative position of segments when the fish body was in maximal bending configuration. In this latter case, angle θ was equal to 26 • as already specified. In the schematic, the short wire part between segments is represented by AB, and the depicted situation was repeated twice: between Segments 1 and 2, and between Segments 2 and 3.
Considering the triangle ABC, the Carnot theorem states that: Considering triangles DOH and DFC: By substituting Equation (8) into Equation (7) according to the values of parameters, it is possible to conclude: To conclude, the total necessary length of each of the two wires from the attachment point till they enter the ABS of Segment 3 is: Table 3 shows the values of parameters that were used in the calculation. Table 3. Values of the parameters used in the wire-driven mechanism.

Description Symbol Value
Distance between the fulcrum and the point of attachment of the wire To select the appropriate magnets, the total drag force on the fish undulating tail was calculated. The fish body was simplified as a rectangular plank (C D ≈ 2); with reference to Figure 7, the worst-case drag for maximal transversal velocity (v = ωr) was considered. The equations to express hydrodynamic drag F drag and the associated hydrodynamic torque τ drag are shown below: where L and d are the length and maximal height of the fish body. Considering α = 21 • , the total angular deflection per cycle was 84 • . The maximal tail beat frequency was assumed to be equal to 4 Hz, and water density equal to ρ = 997 kg/m 3 ; thus, τ drag ≈ 173 Nmm. On the basis of this number, neodymium circular magnets were ordered (N-35, 5 × 5 mm), and their separation force was experimentally calculated considering that the magnets were 10 mm apart. This force was equal at 8.3 N and was used to calculate the magnet lever arm. Considering a single magnet configuration for the oscillating unit, the following holds: Magnet lever arm = τ drag magnet separation f orce = 173.33 Nmm 8.3 N ∼ = 20.88 mm (12) Since the oscillating unit had two magnets, one for each side, each magnet had a lever arm of 10.44 mm.
Machines 2022, 10, x FOR PEER REVIEW 11 of 21 5 5 mm), and their separation force was experimentally calculated considering that the magnets were 10 mm apart. This force was equal at 8.3 N and was used to calculate the magnet lever arm. Considering a single magnet configuration for the oscillating unit, the following holds: 173,33 Nmm 8.3 N ≅ 20.88 mm (12) Since the oscillating unit had two magnets, one for each side, each magnet had a lever arm of 10.44 mm.

Motor Selection
Considering that the magnets on the rotor and those on the oscillating tail were around 10 mm apart with an attraction force of 8.3 N, the gearmotor had to be capable of providing at least 10 mm • 8.3 N 83 Nmm to break the magnetic coupling between the two attracting magnets facing each other; in this way, the gearmotor could maintain its rotation. On this basis, a micro metal gear DC motor with a stall torque of 200 Nmm was ordered.

3D Model and Manufacture of the Robotic Fish
After selecting and sizing all the components, the final CAD model of the robotic fish was developed in commercial software SolidWorks. The final dimensions of the 3D model were: 179 mm length (almost the value taken as the reference in Section 2.3), 32.3 mm width, and 45.3 mm height, with a total mass of 77 g. The body profile was developed using NACA air foils. In particular, the body profile in the frontal plane was developed using NACA0018, while for the sagittal plane, NACA0026 was set. Lastly, the caudal fin was developed using the NACA0016 profile in the frontal plane with an aspect ratio of 2.02.
The complete fish was manufactured using a Zortrax M200 3D printer, which is based on FDM technology. Z-ULTRAT material was used, an ABS-based plastic with superior mechanical properties than those of pure ABS. After printing, the head was rendered waterproof using a silicone sleeve produced from Dragon Skin-30 by the Smooth-On company. A head mold was specifically produced and covered with a thin layer of wax to facilitate removing the silicone after curing. The adopted process was rotation molding and is shown in Figure S1: a thin coat of silicone was deposited on the open mold, and the

Motor Selection
Considering that the magnets on the rotor and those on the oscillating tail were around 10 mm apart with an attraction force of 8.3 N, the gearmotor had to be capable of providing at least 10 mm·8.3 N = 83 Nmm to break the magnetic coupling between the two attracting magnets facing each other; in this way, the gearmotor could maintain its rotation. On this basis, a micro metal gear DC motor with a stall torque of 200 Nmm was ordered.

3D Model and Manufacture of the Robotic Fish
After selecting and sizing all the components, the final CAD model of the robotic fish was developed in commercial software SolidWorks. The final dimensions of the 3D model were: 179 mm length (almost the value taken as the reference in Section 2.3), 32.3 mm width, and 45.3 mm height, with a total mass of 77 g. The body profile was developed using NACA air foils. In particular, the body profile in the frontal plane was developed using NACA0018, while for the sagittal plane, NACA0026 was set. Lastly, the caudal fin was developed using the NACA0016 profile in the frontal plane with an aspect ratio of 2.02.
The complete fish was manufactured using a Zortrax M200 3D printer, which is based on FDM technology. Z-ULTRAT material was used, an ABS-based plastic with superior mechanical properties than those of pure ABS. After printing, the head was rendered waterproof using a silicone sleeve produced from Dragon Skin-30 by the Smooth-On company. A head mold was specifically produced and covered with a thin layer of wax to facilitate removing the silicone after curing. The adopted process was rotation molding and is shown in Figure S1: a thin coat of silicone was deposited on the open mold, and the head was rotated periodically to render it uniform. The final version was produced using 2 coats of silicone. Then, for the final assembly, the open end of the sleeve was clamped against the robotic body using an O-ring to render the rigid head of the robot waterproof.

Vertical Stability of the Robotic Fish
To allow for the fish to swim freely without any supporting mechanism such as floats or strings, the robotic fish needed to exhibit neutral buoyancy. This was taken into consideration and had an important impact on the design of the fish. Precisely for this reason, the tail was not covered with silicone: it would have negatively affected the vertical stability of the fish. The center of gravity and the center of buoyancy must also respect some requirements on relative position: they must be vertically aligned to achieve both horizontal and vertical stability; for vertical stability only, the center of gravity must be lower than the center of buoyancy. This generates a self-correcting torque if necessary to keep the fish upright in water. During the design process, the positions of the center of gravity and of the center of buoyancy were calculated with SolidWorks software to completely submerge the fish. On the basis of these calculations, an approximated amount of lead weights was calculated, and they were properly positioned to balance the fish in stable configuration.

Experimental Tests
To quantify the performance of the designed robotic fish, various experiments were conducted. Three different setups were built to calculate the following parameters:

•
Motor voltage-to-tail beat frequency mapping.

•
Electrical power consumption at different tail beat frequencies.

•
Average swimming speed at different tail beat frequencies.

•
Average thrust generated at different tail beat frequencies.

•
Cost of transport at different tail beat frequencies. • Strouhal number, which denotes the efficiency of swimming, at different tail beat frequencies.
In the following sections, the three experimental setups are discussed together with the associated results. All the experiments were performed in the same tank whose dimensions were 970 × 590 × 430 mm.

Setup I
This setup was used for mapping the motor voltage to the tail beat frequency and for measuring the power requirements. The voltage-to-tail frequency mapping was crucial since, for all the following experiments, the robot would be powered by an external power supply without any active frequency control.
For this setup, a separate fish prototype was specifically built and attached to a frame through a custom designed bracket ( Figure S2) properly shaped to allow for the undulating tail to be completely submerged in water. The head was not included in this setup. This choice is justified by the fact that the oversized gearmotor and the mechanism render the rotor dynamic independent from the external fluid dynamic actions acting on the robotic body that, in turn, depend on the intrinsic characteristics of the surrounding liquid and on the specific experimental setup that is adopted. In fact, with an oversized gear motor, the angular speed of the rotor is nearly independent of the load acting on the shaft. Moreover, in this study, due to the magnetic coupling transmission, the only load seen by the gearmotor shaft is the one of the magnetic attraction forces that must be overcome to keep the rotor in a state of rotation, and this force does not depend on external hydrodynamic actions. For these reasons, we adopted a more convenient setup with respect to the whole fish body (head included) that allowed for simpler measurements and major control on the experiment. Indeed, the resulting relation between applied voltage and tail beat frequency was also valid when the total fish body with the head included was left to swing freely. Figure 8 shows the experimental process. To measure the tail beat frequency, rotations per second of the magnetic disc were recorded using a hall-effect sensor (SS413A). For reading data from the hall-effect sensor, a Arduino Mega board was used in which a dedicated code was developed and implemented. This provided the necessary time in milliseconds for the magnetic disc to complete each rotation. Data were transmitted in real time to a laptop by means of a universal asynchronous receiver-transmitter (UART) interface of Arduino. Voltage was provided to the motor by a benchtop power supply (Tenma 72-8345A) and was measured using a digital multimeter (Tenma 72-7730) with a USB port. The sampling frequency for this measurement was 1 s. Similarly, the USB interface of the multimeter was exploited to record data of the intake electrical power with 1 s sampling frequency again. For mapping the voltage-to-tail beat frequency, 17 different voltage values were selected within the operating range of the motor. Each test was run till 100 frequency samples had been collected. For calculating the power requirement, the test was performed for 10 frequency values. The voltage was manually noted with another multimeter (Agilent U1231A), while current data were collected using the USB interface of the Tenma multimeter.
Machines 2022, 10, x FOR PEER REVIEW 13 of 21 Figure 8 shows the experimental process. To measure the tail beat frequency, rotations per second of the magnetic disc were recorded using a hall-effect sensor (SS413A). For reading data from the hall-effect sensor, a Arduino Mega board was used in which a dedicated code was developed and implemented. This provided the necessary time in milliseconds for the magnetic disc to complete each rotation. Data were transmitted in real time to a laptop by means of a universal asynchronous receiver-transmitter (UART) interface of Arduino. Voltage was provided to the motor by a benchtop power supply (Tenma 72-8345A) and was measured using a digital multimeter (Tenma 72-7730) with a USB port. The sampling frequency for this measurement was 1s. Similarly, the USB interface of the multimeter was exploited to record data of the intake electrical power with 1 s sampling frequency again. For mapping the voltage-to-tail beat frequency, 17 different voltage values were selected within the operating range of the motor. Each test was run till 100 frequency samples had been collected. For calculating the power requirement, the test was performed for 10 frequency values. The voltage was manually noted with another multimeter (Agilent U1231A), while current data were collected using the USB interface of the Tenma multimeter. The corresponding values of supplied voltage and measured frequency are reported in Table 4, while Figure 9 highlights a strong linear correlation between voltage and frequency . In this regard, Pearson's correlation coefficient (PCC) [41] was calculated, and a value very close to 1 was recorded. This is indicative of a strong positive linear correlation [41] between applied voltage and tail beat frequency. Therefore, the relation between voltage and frequency can be approximated as shown in Figure 9.  The corresponding values of supplied voltage and measured frequency are reported in Table 4, while Figure 9 highlights a strong linear correlation between voltage V and frequency f . In this regard, Pearson's correlation coefficient (PCC) [41] was calculated, and a value very close to 1 was recorded. This is indicative of a strong positive linear correlation [41] between applied voltage and tail beat frequency. Therefore, the relation between voltage and frequency can be approximated as shown in Figure 9. The corresponding values of supplied voltage and measured frequency are reported in Table 4, while Figure 9 highlights a strong linear correlation between voltage and frequency . In this regard, Pearson's correlation coefficient (PCC) [41] was calculated, and a value very close to 1 was recorded. This is indicative of a strong positive linear correlation [41] between applied voltage and tail beat frequency. Therefore, the relation between voltage and frequency can be approximated as shown in Figure 9.
A suitable method to determine slope K 1 and intercept K 2 is to minimize the sum of the standard deviations about the line [41]. The following values were obtained: Thus, Equation (13) becomes:

Setup II-Average Swimming Speed at Different Tail Beat Frequencies, Power Consumption, and Cost of Transport
With reference to Figure S3a, the second setup consisted of an aquarium, a calibration grid, some portable LED lights, and a top-mounted camera. The fish swam at 11 different tail beat frequencies and it was recorded using a phone camera at 60 Hz video sampling rate. Markers were attached to the fish for easier tracking during the video analysis that followed. For experiments carried out under this setup, the robotic fish was completely unconstrained and free to swim. The fish had neutral buoyancy and, for all the experiments, swam just below the surface, as visible from the side view of this experimental setup ( Figure S3b). It was powered by thin enameled wires that did not constrain the swimming of the fish in any way. The electric power consumption was measured and recorded by means of the Tenma multimeter.
For each tail beat frequency, at least six videos were recorded at 60 Hz sampling frequency, and one video at 120 Hz (slow motion). Out of these videos, the best four were selected for analysis with Kinovea software, which is free and open-source software used in motion analysis by various researchers for sports and motion analysis, and is also reliable as a video analysis tool [42].
Three analyses were carried out using the videos captured from this setup. Before starting the analysis of any video, the image plane was calibrated using the calibration grid. Every time, this operation was performed when the water was static with no ripples distorting the image. Squares on the grid measured 20 mm on each side. Of course, the presence of water itself can affect measurements because lines of sight are deflected by this medium. This effect increases with water depth. To limit it, the grid was placed as close as possible to the robotic fish, taking care to not interfere with its kinematics. In future developments of this research study, dedicated software will be employed to counteract the effect of water depth and ripples, and conduct totally accurate measurements.

Swimming Speed Calculation
The forward swimming speed was calculated by tracking the marker attached to the head of the robotic fish. The marker was tracked (see Figure S4) only after steady-state swimming had been achieved, which was a few seconds after the release of the fish. The marker was tracked for a few seconds. From the results that contained the time-stamped position of the marker, the total horizontal displacement was divided by the time taken for that trial. This provided the average horizontal speed of the robotic fish. Once again, for each frequency, the best four videos were selected. The results of this analysis consisted of four swimming speed readings per tail beat frequency. Figure 10 shows the sequence of images, while Figure 11a shows the relationship between the tail-beat frequency and the measured swimming speed in units of body length per second (BL/s). As already explained in Section 1, it is important to adopt body length as unit of measurement for distance to allow for a comparison with the performance of other fish, both robotic and real. The robotic fish had a maximal swimming speed of 0.73 BL/s at the tail-beat frequency of 3.25 Hz. The average swimming speed increased approximately linearly with tail beat frequency. A sharp local increase in swimming speed was seen from 1 to 1.75 Hz, followed by a dip. The swimming speed remained almost constant from 2 to 2.75 Hz. Then, it again increased linearly with frequency. Pearson's correlation coefficient was calculated in this case (data are reported in Table 5) to be 0.8049. Thus, in this case, there was also quite strong linear relation, but less marked than the one detected in Section 3.1 between the supplied voltage and the tail beat frequency. The approximated relation is: v swim = 6.6425 f − 0.9813 (16) erence source not found.a shows the relationship between the tail-beat frequency and the measured swimming speed in units of body length per second (BL/s). As already explained in Section 1, it is important to adopt body length as unit of measurement for distance to allow for a comparison with the performance of other fish, both robotic and real. The robotic fish had a maximal swimming speed of 0.73 BL/s at the tail-beat frequency of 3.25 Hz. The average swimming speed increased approximately linearly with tail beat frequency. A sharp local increase in swimming speed was seen from 1 to 1.75 Hz, followed by a dip. The swimming speed remained almost constant from 2 to 2.75 Hz. Then, it again increased linearly with frequency. Pearson's correlation coefficient was calculated in this case (data are reported in Table 5) to be 0.8049. Thus, in this case, there was also quite strong linear relation, but less marked than the one detected in Section 3.1 between the supplied voltage and the tail beat frequency. The approximated relation is: 6.6425 0.9813 (11)

Power Consumption
For each tail beat frequency experiment, the current consumption was measured using the Tenma digital multimeter. Data were collected using the USB interface of the multimeter with a sampling frequency of 1 Hz and are shown in Table 6. Figure 11b shows that the electric power consumption was an increasing function of the tail beat frequency. The maximal power was 0.74 W at frequency values of 3 and 3.3 Hz. In this case, a strong linear relation was also evident. In fact, Pearson's correlation coefficient was equal to 0.9806, and the best linear fit was given by: The work per meter (WPM) represents the energy spent to travel a 1 m distance, and can be expressed as the ratio between average electric power consumption P el and average swimming speed v swim : Figure 11c shows that the lowest energy required to travel 1 meter of distance was 4.73 joules when tail beat frequency was 1.5 Hz. This means that, if a 300 mAh battery rated at 3.7 V (1.1 Wh) is installed in the water-tight head of the robot, this can swim a maximal distance of 830 m with a single charge. At this frequency the swimming speed was 0.09 m/s. If the fish swarm at its top speed of 0.13 m/s, its tail beat frequency was 3.25 Hz and the maximal traveling distance was 630 m. The cost of transport (COT) consists of the energy consumption per unit distance and unit mass, and equals the ratio of the work per meter and the mass of the robotic artifact: Therefore, in correspondence of the minimal value of the work per meter (WPM min = 4.73 J/m), there was also the minimal value of the cost of transport:

Strouhal Number
The Strouhal number is a dimensionless quantity that represents the propulsive efficiency of oscillation-based swimming. The peak-to-peak tail tip amplitude was similarly obtained through video analysis with Kinovea. The tail tip of the robotic fish was tracked on the already calibrated image plane ( Figure S5) and the amplitude was extracted from these tracked data. Referring to Figure 11d, the Strouhal number was always higher with respect to the optimal range, that is, 0.2 < St < 0.4. It approached, as the lower bound of the exhibited range, the Strouhal number of 0.43, which is considered to be optimal for swimming. In this case, the calibrated plate in Figure S5 was distorted by flow ripples. This rendered the measurements less accurate and conclusions on the Strouhal number less reliable. These data are reported for the sake of completeness with the purpose to apply compensatory image corrections in future developments and obtain more accurate data.

Setup III
The setup is visible in Figure S6. Thrust was measured for 10 different tail beat frequencies using a pre-calibrated load cell with 0.1 N accuracy. The arms of the mechanism (L 1 and L 2 ) were measured before each reading. To calculate the final thrust, the following equation was used: Figure 11e shows that the thrust increased linearly with the tail beat frequency. It reached a maximal value of 0.027 N at a tail beat frequency of 2.75 Hz and was almost the same for the tail beat frequency of 3.00 Hz (0.026 N). In this case, Pearson's correlation coefficient was equal to 0.9720, and the equation of the best linear approximation was: Figure S6 shows that the robot was slightly tilted upwards, but this should not have impacted the results because the lever arm was tilted the same way, so the propulsive force was always perpendicular to the lever arm.

Conclusions and Future Directions
In this study, a bioinspired robotic fish was developed by taking fish species with carangiform swimming mode as the biological reference. The artifact was actuated using a single micro-DC gearmotor. A new magnetic transmission system was proposed that consists of a clever arrangement of permanent magnets (neodymium) that converted the rotary motion of the motor into the oscillatory motion of the tail. This mechanism prevents both the structure and the motor from any overload in case the tail becomes stuck, and it was combined with a wire-driven solution to generate a propulsive travelling wave along the fish body.
The proposed design is modular, which aids in a quick assembly and permits to easily extend and/or modify the morphology to adapt to various needs that might emerge in future research developments and applications. The rigid head houses the electronics and can be independently sealed without affecting the tail beating mechanism.
The robotic fish could reach the maximal swimming speed of 0.73 BL/s, and approached, as the lower bound of the exhibited range, the Strouhal number of 0.43, which is considered to be optimal for swimming. The robotic fish could maintain neutral buoyancy and swim freely in the water without any supporting floating device. It measures only 179 mm in length, with a mass of just 77 g, making it the smallest and lightest carangiforminspired robotic swimmer with self-balance stability among the relevant works in Table 1. With respect to these references, the robotic fish developed here exhibited quite good performance as regards maximal swimming speed. A major future application of this robotic fish is to approach wild aquatic animals; thus, a lesser nuisance and aversion effect on living organisms is preferred to better speed performance. Comparing the Strouhal number and power consumption is difficult because very few references provide these data. Regarding the cost of transport, the robotic fish had quite high consumption to travel 1 meter in relation to its mass (COT min = 61.4 J/(kg·m)).
The main strengths of the proposed design are as follows: • Modular design. • Simple control.

•
Light weight and small size with neutral buoyancy. • Easy to manufacture.
Some shortcomings are: • Noise due to magnet snapping (however, lower than that of propellers traditionally used in underwater vehicles). • Absence of active buoyancy control. • Very high frequencies are bracketed by the choice of gear motor. • Power externally provided by means of wires.
The main future development of this work is the investigation of the possibility to use it in real-world applications, such as environmental monitoring. Improved versions of this artifact could be used in the study of animal-robot interactions [3,43,44] and in having artificial agents autonomously interacting with the environment [33].
To render the robot effective for these applications, some enhancing modifications are required, such as a more powerful gear motor to achieve higher frequencies without losing torque. In this way, the generated thrust would increase, and the cost of transport would be lower. Moreover, it is straightforward to implement autonomous control and navigation, and perform refined tests on these features. In this sense, wireless communication may be an effective solution because it allows for keeping the main control unit outside the robot, thus limiting weight and overall size [45,46].
In future studies, the key bending points of a real fish body, the optimal number of segments, and their lengths will be identified. As specified in [40], head and body segments are also coupled in a timely way; the development and implementation of a refined head control will also play a key role in future steps of this research work. Lastly, in this first work, no formal evaluation of the actual bending kinematics was presented, as the focus of the manuscript was the development and assessment of the novel magnetic transmission system. The swimming behavior of the updated robotic artifact will also be recorded with high-speed cameras to compare the theoretical form of the traveling wave and the one detected by the camera. A numerical evaluation of the difference will be performed.

Supplementary Materials:
The following supporting information can be downloaded at: https: //www.mdpi.com/article/10.3390/machines10090755/s1. Figure S1. Curing of the silicone sleeve for the robotic fish head. The 3D printed fish head was periodically rotated for a uniform silicone coating; Figure S2. Setup for mapping the motor voltage to tail beat frequency; Figure S3. Setup for measuring the swimming speed, work per meter, and Strouhal number. It consisted of an aquarium, a calibration grid, some portable LED lights, a top mounted camera, power source, and digital multimeters for measuring voltage and current; Figure S4. Tracking of the robotic fish's tail tip by exploiting the calibrated plane. The fish in this picture is swimming with a 2 Hz tail beat frequency; Figure S5. Tracking of the robotic fish using Kinovea for swimming speed calculation and correction angle. The tracked marker is the one on the fish head. The fish in this picture is swimming with a tail beat frequency of 2.5 Hz; Figure S6. Setup for measuring the generated thrust. A pre-calibrated load cell was used; Video S1. Dynamic exploded view of the CAD robot assembly and the final assembled robotic fish swimming. Funding: This work was supported by the EU H2020-MSCA-RISE-2018 ECOBOTICS.SEA "Bioinspired Technologies for a Sustainable Marine Ecosystem" (824043), and by EU H2020 FETOPEN Project "Robocoenosis-ROBOts in cooperation with a bioCOENOSIS" (899520). The funder had no role in the study design, data collection and analysis, decision to publish, or preparation of the manuscript.

Author
Data Availability Statement: Not applicable.

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