A Bioinspired Control Strategy Ensures Maneuverability and Adaptability for Dynamic Environments in an Underactuated Robotic Fish

Bioinspired underwater robots can move efﬁciently, with agility, even in complex aquatic areas, reducing marine ecosystem disturbance during exploration and inspection. These robots can improve animal farming conditions and preserve wildlife. This study proposes a muscle-like control for an underactuated robot in carangiform swimming mode. The artifact exploits a single DC motor with a non-blocking transmission system to convert the motor’s oscillatory motion into the ﬁshtail’s oscillation. The transmission system combines a magnetic coupling and a wire-driven mechanism. The control strategy was inspired by central pattern generators (CPGs) to control the torque exerted on the ﬁshtail. It integrates proprioceptive sensory feedback to investigate the adaptability to different contexts. A parametrized control law relates the reference target to the ﬁshtail’s angular position. Several tests were carried out to validate the control strategy. The proprioceptive feedback revealed that the controller can adapt to different environments and tail structure changes. The control law parameters variation accesses the robotic ﬁsh’s multi-modal swimming. Our solution can vary the swimming speed of 0.08 body lengths per second (BL/s), and change the steering direction and performance by an angular speed and turning curvature radius of 0.08 rad/s and 0.25 m, respectively. Performance can be improved with design changes, while still maintaining the developed control strategy. This approach ensures the robot’s maneuverability despite its underactuated structure. Energy consumption was evaluated under the robotic platform’s control and design. Our bioinspired control system offers an effective, reliable, and sustainable solution for exploring and monitoring aquatic environments, while minimizing human risks and preserving the ecosystem. Additionally, it creates new and innovative opportunities for interacting with marine species. Our ﬁndings demonstrate the potential of bioinspired technologies to advance the ﬁeld of marine science and conservation.


Introduction
Underwater robotics is increasingly grabbing the attention in science and society for its role in exploring the unknown and delicate ocean environment.Underwater scenarios poses particular challenges to humans due to the difficulty of communication and the conflict between the importance of B Gianluca Manduca gianluca.manduca@santannapisa.itB Donato Romano donato.romano@santannapisa.it Extended author information available on the last page of the article saving the aquatic ecosystem and human needs.Ocean, a fundamental resource for humans, covers much of the earth's surface and most of it remains unexplored [1].Marine ecosystems provide food, produce oxygen, regulate the climate, and host rich biodiversity.Humans's ecological footprint is constantly growing and is damaging the balance of the ecosystems, including oceans, thus immediate actions are imperative [2].Plastics [3] and heavy metals [4] are just two examples of the numerous pollutants that pose a significant threat to the health and well-being of the marine ecosystem.Robotics offers a variety of solutions, including towed systems, Human Occupied Vehicles (HOVs), Remotely Operated Vehicles (ROVs), and Autonomous Underwater Vehicles (AUVs), which are employed to explore and monitor oceans with sustainable and robust approaches [5].These technologies have the ability to reach significant depths [6], mitigating human risks and contributing to environmental conservation [7].However, underwater robotics still faces significant challenges such as movement mechanics, sensory apparatus, and control strategies that need to be addressed.
The effective locomotion strategies evolved by aquatic animal species are an ever-increasing source of inspiration for the reproduction of efficient, and agile artifacts able to navigate in complex underwater areas.In a recent study, a tunable stiffness solution has been adopted to achieve high efficient swimming in a bioinspired artifact [8].In addition, with the advent of soft-robotics, the use of pliant materials with low environmental impact is increasingly adopted.An instance of this is the proposal by Rossi et al. [9] which suggests utilizing shape memory alloys (SMAs) as a solution.Bioinspired robotic platforms have emerged as a powerful tool for testing and validating biological hypotheses, enabling breakthroughs in fields such as zoology and neuroscience.For instance, Tytell and Long [10] investigated the neuromechanical coordination of undulatory swimming, while Manfredi et al. [11] explored optimized swimming and goaldirected locomotion.These studies demonstrate the potential of bioinspired robotics to shed light on the underlying principles of biological systems and inspire new design solutions for robotic applications.Biomimetic design also allows scientists to develop agents capable of approaching living organisms with reduced stress in order to study and interact with them [12].These robots have presented new opportunities for interaction with marine species, such as in the case of closed-loop systems, where robotic artifacts manage movement in response to the behavior of the specimens being studied [13].Regrettably, the bulk of ethorobotics research has thus far been confined to controlled laboratory settings, with the prevalent utilization of decoys affixed to either stationary or mobile robotic platforms.Polverino et al. [14], for instance, employed this approach by swimming a controlled lure together with golden shiners (Notemigonus crysoleucas) in a water tunnel, to study their interaction.Similarly, Porfiri [15] exploited a small lure to study zebrafish social behavior and fear response.These robots have potential applications to improve animal farming conditions, preserve wildlife, and control pest species in both non-aquatic [16] and aquatic [17] environments within the agricultural industry.
The biodiversity found underwater is reflected in the design and control strategies of numerous marine bioinspired robots.For instance, researchers have developed diverse lamprey-like robotic platforms.Stefanini et al. [18] proposed a magnetic transmission system for a lamprey-like robot with rigid vertebrae.This was done in collaboration with neuroscientists to validate biological hypotheses regarding locomotion control aspects [19].Differently, Liu et al. [20] proposed a soft-body lamprey-like robot with flexible and compliant sensors.In other studies, the propulsion system based on the pectoral fin of the manta ray has been explored, evaluating its efficiency through various fin shapes [21] and thicknesses [22].Among the different locomotion strategies in aquatic environments, carangiform and subcarangiform swimmers can reach high speed ranges lowering the maneuverability to anguilliform swimmers due to fewer degrees of freedom.The body undulation, in this case, is localized mainly in the rear part while maintaining the major part of the anterior portion rigid.Different approaches have been adopted to achieve such bioinspired movements.Usually, the actuation system is composed of different motors coupled with the tail fin in different ways.Essex MT1 robotic fish [23] exploits two R/C servo motors and fifteen metal shafts to achieve tail and pectoral fin movements.Also, FIsho [24] used two different servo motors placed side by side in the head to actuate two joints.In Nanyang Arowana-like fish (NAF) [25], two micromotors have been considered to actuate a three-joints system.The robot proposed in [26] exploits 5 DC motors with a caudal fin made of wood laminates and pectoral fins made of cast epoxy.In [27], a single motor propels three rigid links through an eccentric wheel.The application of magnetic transmission proves to be a robust, simple, and reliable method.Notably, this technique allows for isolating moving parts from the main structure, enhancing impermeability.Moreover, the integration of a non-blocking magnetic mechanism reduces the risk of motor overload, particularly when the tail encounters obstacles.This actuation technique has been explored in various research scenarios, encompassing both multi-link actuated robotic models [18] and underactuated configurations [28].
Underactuated solutions allow the reproduction of complex movements improving the system reliability, decreasing the overall load, and saving energy.Marine species not only inspire the design choices but also in control aspects.CPGs are responsible for locomotor activity in vertebrates and invertebrates.They are neuronal circuits that can produce rhythmic motor patterns without sensory or high-level inputs carrying specific timing information [29,30].Most of the solutions which rely on these networks to control the locomotion of bioinspired robotic artifacts exploit multi-link systems independently actuated [31][32][33] instead of exploiting underactuated solutions, as proposed in [34].Studies involving CPGs for locomotion control open the door to solutions that can move dexterously even in complex environments such as the marine for environmental monitoring and interaction with the ecosystem, as in the above-mentioned work [19] but also as proposed in [35].To achieve motor patterns that can adapt to the environment, the integration with sensor inputs is essential [36].CPGs can benefit from proprioceptive sensing, thus introducing a feedback control strategy for pattern modulation.For instance, in fish, this approach has been shown to result in significant energy savings, as demonstrated through testing with a robotic solution in [37].Additionally, proprioceptive control has been successfully validated in [38] using an underactuated robotic fish.This strategy offers a useful tool for developing robust and efficient bioinspired swimming solutions.Overall, incorporating proprioceptive sensing into CPGs can lead to improved performance and energy efficiency, making it a promising avenue for future research in this field.
Here we propose a novel control strategy for an underactuated robotic fish.The robotic artifact is inspired by pelagic fish and exploits only one DC motor to reproduce the caringform swimming mode.It is characterized by a modular and biomimetic design, with a transmission system that resembles the contraction and relaxation of the lateral tail muscles.The solution combines a magnetic coupling and a wiredriven mechanism to convert the oscillating movement of the motor into an oscillatory motion of the robotic fishtail.A proper bioinspired control strategy allows for exploiting the advantages of a modular and underactuated solution with a non-blocking transmission system.The approach results in muscle-like control based on CPGs.The proprioceptive feedback integration allows for investigating the adaptability of the control strategy under different environments and design configurations.The maneuverability of the underactuated robotic platform has been proven through different tests.Energy consumption was evaluated according to the design choice and control law adopted.The main contribution of this work is the development of a bioinspired control strategy that renders effective a solution based on a magnetic coupling system to reproduce a fish-like movement through a robotic artifact with a single motor.Thanks to the proposed control strategy, the robot can turn and vary its swimming speed, adapting its tail beat to different environments and configurations through proprioceptive feedback.The remainder of this research is organized as follows: First, the robotic fish's model, structure, and mechanism are presented.Second, the developed control strategy is explained.Then, experimental results to prove and validate the control strategy are shown and discussed.

Modeling, Structure, and Mechanism
Underwater robotics is a key tool for environmental parameters monitoring and exploration missions.Fish robots reproduce the aquatic species efficient and energy saving movements to swim with agility even in complex underwater environments.The bioinspired robotic fish developed takes pelagic fish as biological reference and it generates the thrust by bending its body into a propulsive wave that extends back to its caudal fin. Figure 1 shows the artifact structure, the working principle of the transmission system, and the reference systems.
The robot swims with the carangiform mode, a bodycaudal fin (BCF) locomotion which can be described as an amplitude-modulated traveling wave [39,40].The following equation models the imposed transverse motion in a bodyfixed coordinate system for carangiform robotic fish [41]: where y t and x t are the sideward and axial displacement, respectively, in the coordinate system {S t } in Fig. 1(B) while t denotes the time.k = 2π/λ is the wave number, λ represents the wavelength, while ω is the circular frequency of oscillation.c 1 and c 2 are the wave amplitude's linear and quadratic coefficients, respectively.The last two parameters can be adjusted to achieve the desired BCF swimming mode.
Lighthill introduced the Elongated Body Theory in 1960 [42], which gained widespread acceptance for analyzing the hydrodynamics of elongated fish locomotion and propulsion efficiency [43][44][45][46][47].The fish can achieve a steady state and maintain a constant mean speed, denoted by U , when the force generated by its thrust equals the opposing drag force.In this context, the average is taken over one period of the fish's body undulation.This concept is fundamental to the study of fish locomotion, and Lighthill's Elongated Body Theory can be used to calculate the mean thrust required to maintain this steady state speed, described as: where (•) expresses the mean value, l denotes the length of fish, and m is the virtual mass, described as: where ρ is the fluid density, S c is the width of tail at x = l, and β is the coefficient of virtual mass correction, a non-dimensional parameter close to the value of one.Under conditions of inviscid flow, a cruising fish will experience a drag force, expressed as: where C D and K D are the drag force and moment coefficients, respectively, S is the wet surface area of the undulating body part, and ω is the angular speed.Once the fish achieves a balance between thrust and drag forces, we can calculate its U speed as follows: The robotic platform consists of two main parts: a watertight head and an oscillating mechanism exposed to water.The head contains all necessary electronics, while the oscillating mechanism consists of a peduncle, a rod, three links, two joints, and a final caudal fin inserted into the final link, as seen in Fig. 1(A).The proposed artifact utilizes only one DC gear motor to reproduce the bioinspired locomotion presented above.The system transforms the oscillating movement of the DC motor into an oscillatory motion in the robotic fishtail through the combination of a magnetic coupling and a wire-driven mechanism, illustrated in Fig. 1(B) and (C).A motor located in the head imparts an oscillating motion to a plastic disc containing four inserted permanent magnets (disc magnet).The arrangement and orientation of these magnets divide the disc magnet into two regions with opposing polarities.In the peduncle, two magnets face the disc-side with the same polarity.Contactless mechanical power transmission results from attractive/repulsive forces between the disc magnet and peduncle magnets.The peduncle connects to the first link using a rod, forming a system which we refer to as oscillating arm, and all links are interconnected in movement through hinges and a wire system, as depicted in Fig. 1(C).Each link incorporates two channels parallel to the mid-axis of the fish (on both sides) for the wires to pass through.The wire system connects the three links and the caudal fin to the head.When the magnets on the disc attract one of the magnets in the peduncle, the other is repulsed.Consequently, the oscillating rod bends towards the attracted magnet, and the tail tip points to the side of the repulsed magnet, following the wire system.The absence of any mechanical connection between the motor shaft and the oscillating arm ensures a non-blocking transmission system, preventing damage to the DC motor and the entire structure from overloading.
The mechanical design of the robot is an evolution of a previous artifact that was developed in our laboratory at The BioRobotics Institute of Scuola Superiore Sant'Anna (Pisa, Italy) [28], and it presents several modifications.With the previous version of the robot, the non-blocking transmission system was validated.Only a DC motor was contained, while the electronics were excluded from the body.However, in this work, the size of the robot was increased.The actual robotic fish weighs 875 g, and when θ t = 0 rad, it has a length from head to tail tip of 40 cm.This is unlike the first version, which had a weight of 77 g and a length of 17.9 cm.In this new version, the motor driver, a microcontroller, together with a sensor apparatus comprising a quadrature encoder, Hall effect sensors, an inertial measurement unit (IMU), and a humidity sensor were incorporated into the robotic artifact.In accordance with the increased size of the robot, different magnets and a different motor size were considered.The actuation mechanism underwent several changes aimed at ensuring control of the robotic tail beat.Specifically, two modifications were made: first, the motor's unidirectional rotation in the previous version was replaced with a back-and-forth solution in the current version.Second, the configuration of the magnets inserted in the disc magnet was changed.
The position of the disc magnet θ d determines the magnetic attraction/repulsive force exerted on the tail and, therefore, its torque.The force values have been experimentally measured with different disc magnet/tail configurations through a dynamometer placed in P 0 (Fig. 1(B)).Figure 2(A) shows the results converted into torque values.
Bipolar Hall effect sensors are an effective solution for the absolute measurement of the disc magnet position, according to the small size and robustness to disturbances.Figure 2(B) shows the the signal received during magnets rotation.Two Hall effect sensors improve the system reliability and they allow the detection of direction changes.An IMU sensor with 9 DoF is placed inside the fish robot head while a quadrature encoder, integrated on the motor shaft, provides data on the shaft's relative position, speed, and acceleration.In this study, two Hall effect sensors, measure the magnetic field of the disc magnet, and they set the reference position θ d = 0 rad (Fig. 1(B)) during an initial setting phase.The quadrature encoder measurement is relative to it.The encoder is therefore responsible for measuring the position of the disc magnet during the control phase.Another Hall effect sensor measures the magnetic field of two magnets connected to the tail.The magnetic field value is converted into the tail angular position.The curve relating the tail angular position and the sensor measurements has been characterized by interpolation through the Curve Fitting Tool of the MATLAB (MathWorks Inc., MA) software.Different functions have been evaluated.A second-degree polynomial fits the extrapolated data by considering two different sets of parameters according to the θ t angle sign (Fig. 2(C)): where x h is value in Volt read from the Hall effect sensor.Fig. 3 exhibits the finally assembled robotic fish.

Control Strategy
In this work, we investigated a muscle-like control for the developed robotic fish.The locomotion management by CPGs inspires the control strategy.The CPGs are networks that coordinate various motor patterns in vertebrates and invertebrates [29].They are distributed in different areas of the nervous system, thus generating a rhythmic activity to consent complex movements.Similarly, the proposed control strategy produces a rhythmic oscillating activity in the motor, leading to a tail oscillation.First, the stability of the proposed structure was analyzed.The system presented can be described as a DC motor mechanically coupled to a load (disc magnet) which interacts through a magnetic coupling with an oscillating arm.To verify the stability of the system, a descriptive MATLAB model of the system to be controlled was created and the transfer function obtained was evaluated.The DC motor model can be described with the following equations [48]: The variables and parameters of the motor's equations are described in Table 1, along with the parameters' adopted values.
The disc magnet angular position corresponds to the rotor one (θ d (t) = θ p (t)).The disc magnet and the oscillating mechanism were modelled as loads on the motor.The load torque was therefore expressed as follows: J l represents the inertia of the disc magnet (0.000016 kg•m 2 ).The load resulting from the interaction between the disc magnet and the oscillating arm has been modeled as a sinusoidal disturbance, dependent on the rotor's position θ p (t), with amplitude A l .The value of this parameter (0.2 N•m) was chosen to match the maximum transverse torque in absolute value measured experimentally and depicted in Fig. 2(A).This choice represents the worst-case scenario Table 1 Description of motor variables and parameters, along with their values used in the simulation

Variables and parameters
Description Adopted values Rotor speed (rad/s) L a Armature inductance (H ) 0.000000610 since the tangential torque value, expressed by A l , is lower in absolute value.The open-loop function G ol of the system was derived using MATLAB's linmod function from the model developed in Simulink: Then, the closed-loop transfer function G cl was obtained as: Zeros and poles of the closed-loop transfer function are collected in Table 2.The feedback loop is stable since all poles have negative real parts.
A motor position control, which has a sinusoidal profile as a reference, generates rhythmic tail activity.In nature, CPG circuits determine the appropriate set of activation of the muscles without requiring feedback from the sensors.Motion management, in this sense, resorts to a feedforward control, thus ensuring the exact torque to achieve goal-directed motion at certain speeds [30,49].Incorporating proprioceptive sensing allows for the adaptation of rhythmic activity management [50].This approach can further enhance the adaptability to different environments [51].In the proposed control, the oscillatory reference integrates with proprioceptive sensory feedback coming from the tail.Figure 4(A) elucidates the core principle behind this control strategy.This approach controls the torque exerted on the fishtail by using a parameterized control law.This law takes the tail angle θ t as input and determines the torque exerted on the fishtail.The reference torque is then converted into the corresponding configuration of the disc magnet.The control law is composed of three contributions.The first contribution is given by: where θt is the tail angle θ t divided by its maximum value, resulting in θt ∈ [−1.1].This contribution generates a torque that varies its sign according to the direction of rotation of the oscillating arm and is maximum in absolute value when the tail is at θt = 0.This contribution becomes null when the tail reaches the limit switches ( θt = ±1).k 1 is a positive parameter.Increasing the value of k 1 results in a higher torque and, consequently, a higher oscillation frequency of the tail.The second contribution of the control law plays a crucial role in guaranteeing a call-back to the tail when it reaches the limit switches.This contribution opposes the effect of τ t,1 ( θt ) and is expressed as follows: where, in contrast to τ t,1 ( θt ), it has maximum and minimum peaks when the tail reaches the limit switches, and it cancels out when the tail is at θt = 0.The positive parameter k 2 defines the torque value imparted to the tail when approaching limit switches, countering the motion and changing the direction of rotation of the oscillating arm.k 2 is imposed to be smaller than k 1 .If not, the control would reduce the torque when the oscillating arm begins its movement again after changing direction of rotation.This strategy reduces the loads on the motor resulting from the magnetic coupling between the tail and the disc magnet.The motor's controlled oscillation encounters a reduced tangential force.
The third contribution of the control law generates a steering manoeuvre.It generates an asymmetry in τ t,1 ( θt ), increasing the torque value towards one direction of rotation of the oscillating arm while decreasing it towards the other.This contribution is expressed as follows: The sign of k s determines the direction of curvature.The parameter's absolute value controls the asymmetry of the tail beat.It's crucial to ensure that k s doesn't reduce the impact and it results in the following expression: The following system collects the constraints to which the three parameters are subject: The control law determines the reference torque corresponding to a particular disc magnet configuration according to the tail position.The relation between the torque contributed by the magnets and the disc magnet position was approximated by the following linear function: θ d is the angular position of the disc magnet (rad) according to the coordinate system {S t } (Fig. 1).The value of k ln is determined by the system's maximum allowable torque and the disc magnet's angular operating range.By considering normalized torque values, the control law can be generalized.The choice of k ln is then determined by the disc magnet's angular operating range, which is dictated by the spacing between the magnets in the disc.For the design presented, k ln is set at 0.52.This means that when the torque is at its maximum value (τ t ( θt )=1), the disc magnet's position corresponds to θ d =0.52 rad.On the other hand, when the torque is at its minimum (τ t ( θt )=-1), θ d will be -0.52 rad.The overall strategy reduces to position control of the motor.The reference position tracking relies on a PID controller.A Pulse Width Modulation (PWM) strategy is adopted.Figure 4(B) shows the block scheme of the entire system.To prevent the system from overstepping the operating range of the disc magnet and nullifying the control strategy, saturation is taken into consideration.
To initiate the algorithm, the quantities that need to be defined are k ln , k 1 , k 2 , k s , and the PID parameters.Among these, k ln is structural.k 2 determines the continuous oscillation of the system.k 1 and k s are adjustable and can influence performance in terms of frequency and asymmetry of the oscillation, respectively.A key feature of this approach lies in its adaptability.The control strategy benefits from proprioceptive feedback to adapt to different situations.When changing the tail's structure, weight, or the environment in which the robotic fish operates, the controller adjusts accordingly.This is because the tail's position determines the motor's oscillating reference position.Otherwise, a predefined sinusoidal reference would require amplitude and frequency calibration for each context.A strategy without proprioceptive feedback, in fact, could result in the magnetic coupling breaking down.To visually explore our proposed artifact, control strategy, and the conducted tests, please refer to Video S1.

General Observations
The final CAD model of the robotic fish was developed into the commercial software Solidworks.Based on FDM technology, the robotic fish was manufactured with a Zortrax M200 3D printer.Z-ULTRAT material was used, an ABSbased plastic with superior mechanical properties to pure ABS.Only the cylinder connecting the motor shaft with the disc magnet was made in aluminum for more robust transmission.The DC motor sized for this work is a high-power, 6 V brushed DC motor combined with a 34.014:1 metal spur gearbox.A 48 CPR quadrature encoder is mounted on the motor shaft.The microcontroller board is an ESP32, while the motor driver is a VNH5019A, one-channel.The DC power supplier considered is an IPS2303.The neodymium magnetic discs sized for the robotic fish have a diameter of 12 mm, an height of 10 mm, and an holding force of 5.3 kg.The wire connecting the tail components with the robotic fish head has a diameter of 0.3 mm and it can hold up to 20 kg.All tests were carried out first in air and then in water.The water tank considered for testing is 1 m long and 0.5 m high.
Then the robotic fish and the various tests were repeated in a larger environment that is in a pool 10x5 m, deep 0.8 m.A global view camera is set above the swimming pool to record the movement of the robotic fish during the experiments.The data coming from the internal sensors have been saved on the internal memory of the microcontroller and then extrapolated and analyzed with the MATLAB software.The data were taken via Bluetooth at the end of each experiment.In the same way, the various parameters have been sent for the control strategy analysis and the evaluation of the relative performances.The control strategy has been implemented directly on the microcontroller.The firmware has been uploaded via Wi-Fi on the microcontroller without opening the head of the fish containing the electronics, avoiding any risk of damage during the experiments.

Results
Different tests have been conducted to validate the control strategy and proof its adaptability under different conditions.First, the control law has been validated, considering the robotic artifact stuck in the water.Figure 5(A) shows the fishtail and disc magnet angular position for a given set of parameters (k 1 = 1, k 2 = 0.4, k s = 0).The data have been collected in the controller's internal memory and analyzed after the test.The selected set of parameters consists of the nominal condition, where there is no steering contribution.The call-back contribution considered is the minimum value empirically computed to ensure the proper functioning of the strategy, and k 1 is set to the maximum value to avoid saturation.The fishtail dictates the motor oscillation.The motor's oscillation drives the oscillation of the disc magnet.According to the related reference systems, the developed control law generates a phase shift between the disc magnet and fishtail angular positions.When the fishtail approaches the limit switches, the disc magnet configures in the angular position θ d = 0 rad.Thanks to the call-back contribution, the disc magnet configuration starts to push away the tail.Conversely, the magnets provide the maximum torque contribution in absolute value when θ d = 0 rad.Then, different tests were repeated, changing the external environment and increasing the weight of the fishtail.Figure 5(B) presents the change in the disc magnet oscillation and fishtail beating frequency according to different situations investigated.Frequencies were obtained with plomb MATLAB function by considering the maximum peak of the periodigram, and checked with the Signal Analyzer tool.The results compare the control performance of the robotic fish when suspended in air, submerged in water, and when additional loads are applied to the fishtail (in the water scenario).Two different weights, 0.075 kg and 0.140 kg were considered.The weights were positioned in P 1 (Fig. 1(B)) and they provide a constant torque disturbance of 0.0735 N•m and 0.1373 N•m, respectively.The fishtail and the disc magnet are magnetically coupled, and they oscillates with the same frequency.The results show a change in the oscillation frequency according to the different scenarios.The various scenarios emulate shifts in environmental conditions and alterations to the robot's structure.The fishtail, encountering constant disturbances during the beating, modulates the disc magnet oscillation according to the control law.This result shows the effectiveness of a closedloop strategy.The controller can adapt to changes in shape, the weight of the tail, or liquid density in which the robotic fish swims, thanks to proprioceptive feedback.Otherwise, an open-loop strategy would result in a frequency invariation.For each scenario, the reference sinusoidal input would have to be defined.This would not only be time-consuming, but also less robust.In fact, if the tail gets stuck, the mechanical coupling could break.A break in the magnetic coupling can generate a tail beat that does not exploit the operating range, with a possible asymmetrical oscillation.
The non-zero value assigned to k 2 prevents the disc magnet from reaching the neutral position at the limit switches, ensuring continuous oscillation and avoiding tail stalling.This parameter was empirically selected to ensure proper func- Different tests have been carried on to evaluate the swimming performance changes related to these parameters.First, the fish body speed and the tail beat frequency have been investigated, varying k 1 .No steering contribution was considered in this case (k s = 0).The times to complete a predetermined distance were collected to measure the average fish body speed.In the following, the swimming speed of the robot will be indicated in body lengths per second (BL/s).The frequencies were analyzed as described above.Figure 6(A) shows the obtained results related to the parameter choice.The control law allows changing the torque exerted on the tail.Changing the torque exerted on the fishtail involves a frequency variation due to the magnetic transmission system.As expected, increasing the value of k 1 also increases the tail beat frequency and the fish's body swimming speed.According to the parameters evaluated, the tail beat frequency varies between 1.7 Hz and 2.3 Hz.The measured swimming speed change with the same trend between 0.18 BL/s and 0.26 BL/s.Differently, the parameter k s allows changing the torque exerted on the fishtail according to the rotational direction of the oscillating arm.A change in torque with respect to the direction of rotation of the oscillating arm leads to an asymmetry in the tail beat.This parameter can influence the robotic fish's swimming direction and steering performances.Different tests have been carried maintaining fixed k 1 = 1 and let varying k s .The steering performances have been investigated in terms of angular speed and radius of curvature.The parameter sign determines the steering direction, while its value changes the steering performance.Circular paths have been performed and both steering directions have been evaluated.Times and distances covered were obtained through a videos analysis.Figure 6(B) shows the change in the steering performances varying k s .According to the control strategy, the robotic fish can increase/decrease the angular speed and the curvature radius.The steering performances increase with k s absolute value.The robotic fish can improve the steering angular speed of 0.08 rad/s with a relative change in the curvature radius of 0.25 m. Figure 7 compares the robot steering performance with two different values of k s through snapshots.The control strategy ensures a range of robotic artifacts' maneuverability despite its underactuated design.
Energy consumption is another essential feature for maintaining stable, proper, and long working conditions.The average current value with a DC motor power supply of 6 V is 0.

Discussion
Developing robust and sustainable robotic solutions for discovering and monitoring the marine ecosystem is essential.A bioinspired locomotion design and biomimetics allow acting in the harsh and unstructured ocean environment exploiting the agility and efficiency of the fish movements without causing stress to submarine species.The proposed solution combines a magnetic coupling and a wire-driven mechanism to convert the oscillating movement of one DC motor into an oscillatory motion of the robotic fishtail.The underactuated system improves the solution reliability and energy savings.Moreover, the non-blocking transmission system ensures waterproofness and prevents structure and actuating motor overload.The solution implemented is simple to manufacture and modular.A proper control strategy must guarantee the robotic fish's maneuverability to take advantage of this design choice.
The movement control in this study draws inspiration from CPGs, mimicking how fish activate muscles.Incorporating proprioceptive feedback into generating a sinusoidal reference position for the motor aims to enhance control robustness and adaptability across diverse environments and design configurations, distinguishing it from open-loop solutions.Results demonstrate the controller's adaptation to water and air conditions and varying tail loads.Across different environments and loads, the control system dynamically adjusts the tail beat frequency, exploiting the entire operating range and maintaining magnetic coupling.Additionally, speed and steering performance changes were observed by varying control law parameters, with swimming speed correlating with tail beat frequency.The curves illustrate a similar trend, reaching a maximum fish body speed of 0.26 BL/s with a 2.3 Hz tail beat frequency.The robotic fish developed here exhibits quite good performance as regards swimming speed according to the potential applications.These applications include approaching wild aquatic animals to monitor and interact with them in a minimal invasive way.So, a biomimetic and calm swimming artifact, without abrupt or too fast movements, would produce a lesser nuisance and aversion effect on living organisms compared to an artifact with better speed performance (this would reproduce a state of agitation or alertness in fish [52]).The steering performance of the robotic fish depends on two interdependent parameters -the angular speed and the radius of curvature.Based on various tests, two curves were empirically extrapolated.The fish can adjust its angular speed by 0.08 rad/s, resulting in a relative change in the radius of curvature of 0.25 m, showing high maneuverability.To further enhance speed and steering performances, options include employing magnets with stronger attraction/repulsion forces, modifying the motor size, or exploring different tail designs.The adaptable controller enables fish maneuverability, and the modular design facilitates improved swimming performance by modifying the fish's design while retaining the same control strategy.
This work is innovative on several fronts.The choice of the transmission system combines a magnetic non-blocking system with a wire-driven mechanism meant for a selfpropelled robotic fish inspired at carangiform swimmers.Magnetic coupling systems have shown promise in actuating robotic platforms.Magnetic transmission presents a promising approach for achieving simple, robust, and reliable solutions.One of its benefits is the potential to separate moving parts from the rigid body, which can improve waterproofing.Additionally, the implementation of a non-blocking magnetic system can reduce the risk of motor overload if the tail gets stuck.However, when replicating nuanced fishlike movements, certain considerations arise.The inherent low rotational inertia of these systems can subtly differ from the natural, fluid undulations observed in living fish.Additionally, while offering consistent motion, the bandwidth of magnetic coupling might not always capture the rapid directional shifts typical in dynamic aquatic scenarios.Nevertheless, with careful design and control, these challenges can be mitigated, making magnetic coupling a viable choice for certain robotic fish applications.In literature, the use of a magnetic coupling system to reproduce a fish-like movement through a robotic artifact is not widespread.A similar transmission system has been exploited to investigate CPGs by reproducing a lamprey-like robotic fish [19].In this case, however, the system is not underactuated, and it is composed of active and passive vertebrae that generates an anguilliform locomotion.In an other work, magnets couples two subsystems of a robotic platform for a direct underwater interaction study with small fish species [53].More widespread instead is the wire-driven mechanism for the reproduction of underactuated and bioinspired solutions.For instance, PoTuna [54] and UC-Ika [55] use one motor mechanically connected to a system mechanism to mimic the tuningform movement.There are other examples which exploit only one motor with wires and a mechanical coupling for subcarangiform locomotion [56][57][58].However, using an underactuated system and its advantages is not the first choice for developing bioinspired solutions.Most works exploit multiple motors to reproduce fish-like movements [23-25, 59, 60].However, the actual innovative contribution of this work lies in the choice of a bioinspired and muscle-like control strategy that takes inspiration from CPG with the integration of proprioceptive feedback to make effective an underactuated and non-blocking solution.This approach allows exploiting an underactuated solution's advantages by guaranteeing the robotic fish's maneuverability and multimodal swimming.Most studies that exploit CPGs to control the movement of fish-like robots use multi-link systems independently actuated, as in the case of i-RoF robotic fish [61], which exploits two different servomotors to activate its links.This control strategy is not always used among the various solutions underactuated [31][32][33].In a similar study that involves a wire-driven underactuated system, it is demonstrated that with just one motor, the CPGs control can be easily implemented to obtain multimodal swimming [34].Differently in our study, we integrated this feedforward control with the proprioceptive feedback to obtain an adaptable solution to the environment and structure.Similar to this integrated control strategy, in [38] force sense is used as input, differently from the tail position, and considering a mechanical coupling between the motor and fishtail.Considering the position of the tail is a robust choice.Also, the choice of a non-blocking system makes the solution more reliable to the various loads to which the robot can be subjected.The robotic fish head contains all the electronics, separated by the moving fishtail, for a more safe system.Those choices also consent to investigate the system mechanics and different fishtail configurations, which can be substituted easily, increasing performances, by maintaining the developed control strategy.
In this study, we employed a PID controller for reference position tracking.While this approach has demonstrated efficacy in our specific setup, it's worth noting that alternative control solutions might offer enhanced performance.While PID controllers are popular due to their simplicity and broad applicability, they have some inherent limitations.For instance, they may struggle with non-linear systems and require precise tuning.The emergence of learning controllers, such as those based on machine learning or adaptive control strategies, offers promising alternatives that can adjust and optimize in real-time [62][63][64][65][66][67][68].
Bioinspired and biomimetic robots have opened up new avenues for interacting with underwater species.However, the majority of ethorobotics research has been limited to laboratory settings where decoys, either stationary or mounted on mobile robotic platforms, have been predominantly used.[14,15,52,[69][70][71].A free-swimming fish robot has been proposed for an animal-robot interaction study in [72].Tests have also been carried out in the laboratory.To optimize its interaction with zebrafish, the robot's design has been specifically tailored, taking into account factors such as color pattern, aspect ratio, and tail beat frequency.The robot has been operated remotely using a control unit, and a servomotor located in the tail section has been used to actuate the bodytail joint and propelling the robot.In our work, we want to propose a robotic agent controlled independently of external robotic platforms, which could be used in this context and can be blended into animal populations.Although other robots have focused on biomimetic design, in our case we believe that this type of transmission would have a less disturbing effect on the populations of organisms being observed due to the magnetic coupling system, which would limit vibrations and noise produced by traditional mechanical drive systems.

Conclusion
This work investigated a muscle-like control for an underactuated robotic fish.The transmission system enables the control of the torque exerted on the fishtail.The control strategy is inspired by the CPGs and integrates proprioceptive feedback.According to a parametrized control law, the fishtail angular position dictates the reference torque.Several tests validated the proposed approach.The controller can adapt to changes in shape, the weight of the tail, or the liquid density in which the robotic fish swims.By varying the parameters, the control law can change the torque exerted on the tail.Changes to the torque involve a tail beat frequency variation due to the magnetic transmission system.Depending the parameters evaluated, the tail beat frequency can vary between 1.7 Hz and 2.3 Hz.The torque and the frequency variation dictate swimming speed changes.The swimming speed measured can vary between 0.18 BL/s and 0.26 BL/s.The solution also enables steering direction to be controlled along with the performance.The performances were evaluated in terms of angular speed and radius of curvature.The robotic fish can improve the steering angular speed of 0.08 rad/s with a relative change in the curvature radius of 0.25 m.The control strategy ensures a range of maneuverability for the robotic artifact despite its underactuated design.The bioinspired solution enables design changes to improve performances without changing the control strategy.The robot can adopt different configurations according to the tasks required.The biomimetics and the carangiform swimming mode are less invasive choices for the marine ecosystem.We believe that our solution is effective, reliable, and sustainable for environmental monitoring, discovery, and animal-robot interaction.

Future Work
In the future, the integration of a buoyancy control system into the swimming robot will be evaluated.The focus is to develop a sustainable and robust system that maintains the underactuation, modularity, and biomimetics principles of the design.Initial results show that the proprioceptive control strategy allows for different swimming modes, steering rates, and speed performances using only one DC motor.To make the proposed solution autonomous and enable it to act in the field, we plan to integrate exteroceptive sensors that can detect environmental parameters and set a reference target in the outside world.For example, an integrated camera in the head of the robotic fish could track a target organism, detect environmental or species anomalies, and analyze animal behavior using artificial intelligence techniques.Bioinspired robots have potential applications in aquafarming, where the biomimetic design and quiet locomotion can reduce stress on monitored marine species.The proposed robot could environment, detect harmful elements such as pathogens and help preserve the health and welfare of animals, as well as interact with marine species.(2024) 110:69 Gianluca Manduca [M.Sc. in Automation and Control Eng.] is a PhD student at The BioRobotics Institute of Scuola Superiore Sant'Anna of Pisa.Gianluca graduated in Automation and Control Engineering at Politecnico di Milano; before embarking on his PhD path, he spent a period as a visiting scholar at the Center for Automotive Research (CAR) of The Ohio State University, Columbus, OH, USA.The background in automation and control formed during studies initially contributed to the automotive sector, with work related to autonomous driving and lithium-ion battery modeling.Currently, Gianluca deals with biorobotic systems and biosensors managed through artificial intelligence techniques, with application to underwater robots and environmental monitoring.He is involved in several national and international research projects.
Gaspare Santaera [B.Sc. in Electronic Eng. and M.Sc. in Automation Eng.] is a PhD student at The BioRobotics Institute of Scuola Superiore Sant'Anna of Pisa.He started his career as research fellow at the Research Center "E.Piaggio" of the University of Pisa in 2013, working on the design and the control of robotic and prosthetics hands.In 2016, he moved to the Istituto Italiano di Tecnologia (IIT) in Genoa, then he transitioned to the industrial sector in 2019, working at E.P. Elevatori Premontati on electrical design of novel elevators.In March 2020, he joined The BioRobotics Institute of Scuola Sant'Anna of Pisa, where he is currently a PhD student specializing in electronics design for robots.His expertise includes problem-solving, PCB design, and firmware/hardware integration, with a focus on swarm and underwater robotics.He has been involved in several EU projects such as PaCMAN, WearHAP, SoMa, SoftPRo, WalkMAN, Thing, Robocoenosis, Ecobotics.Donato Romano [M.Sc. in Agriculture Science and Technologies (honors), PhD in BioRobotics (honors)] is currently Assistant Professor at The BioRobotics Institute of Scuola Superiore Sant'Anna of Pisa, Italy, where he coordinates the Biorobotic Ecosystems Laboratory.Romano is mainly focusing his activities on bioinspired and biomimetic robotics, and in particular on animal-robot interaction, biohybrid systems, natural and biohybrid intelligence, ethorobotics, neuroethology.Romano received national and international recognitions for his research.He also has been visiting researcher at Khalifa University, Abu Dhabi (UAE).He is Member of the Editorial Board for many International Scientific Journals.Romano is Coordinator, PI, or partner of several national and international research projects.

Fig. 1
Fig. 1 Robotic fish design: (A) Structure representation with the related components description.(B) Visual description of the magnetic transmission mechanism with the reference coordinate systems considered.(C) Representation of the wire mechanism

Fig. 2
Fig. 2 Structure charachterization: (A) Torque exerted on the tail by the magnetic coupling between disc magnet and oscillating arm magnets according to different disc magnet/tail configurations.(B) Disc magnet

Fig. 3
Fig. 3 Representative image of the finally assembled robotic platform during tests in a swimming pool

Fig. 4
Fig. 4 Control strategy: (A) General description of the bioinspired approach.(B) Block diagram of the system

Fig. 5 Fig. 6
Fig. 5 Control strategy validation in nominal condition (k 1 = 1, k 2 = 0.4, and k s = 0) with the robotic fish stuck: (A) Phase shift between the angular position of the tail (dashed line) and the disc magnet (solid 2 A in the nominal condition.The Work Per Meter (WPM) represents the energy spent to travel a 1 m distance.It can be expressed as the ratio between the average electric power consumption P el and the average swimming speed, resulting in WPM = 16.78J/m.Another consumption index is the Cost of Transport (CoT), which consists of the energy consumption per unit distance and unit mass.It is simply equal to the ratio between the Work Per Meter and the mass of the robotic artifact.For the solution proposed it results CoT = 19.18J/(kg•m).

Marco
Miraglia [B.Sc. in Aerospace Eng.(honors), M.Sc. in Aeronautical Eng.(honors), PhD in BioRobotics (honors)] has specialized in biomimetic and industrial robotics during his research activities at The BioRobotics Institute of Scuola Superiore Sant'Anna of Pisa.He contributed to the development of Finite Element Method (FEM) models and mechanical designs throughout his activities.He held the position of mechanical designer at IUVO S.r.l., where he contributed to industrial automation projects.He later transitioned to ESA S.p.A..Godfried Jansen Van Vuuren received his senior certificate fromVredenburg High in 2004.He worked in the construction industry for 7 years as an electrical technician, where he engaged himself in the installation and maintenance of backup generator systems and industrial cooling systems for multi-story office buildings.He started at Scuola Superiore Sant'Anna in 2012 as lab technician and worked on various European projects including Angels, Replicator, CoCoRo, subCULTron and Robocoenosis.His main responsibilities include design, fabrication, assembly, testing and maintenance of various autonomous robotic platforms within the above-mentioned projects.PaoloDario is Emeritus Professor at Scuola Superiore Sant'Anna in Pisa.Until 2021, he was Full Professor of Biomedical Robotics and taught courses to PhD students in The BioRobotics Doctoral Program and to students in the Bionics Engineering Course, jointly organized by the University of Pisa and Scuola Superiore Sant'Anna.He served as Director and Founder (2011-2017) of The BioRobotics Institute, Coordinator and Founder of The BioRobotics Doctoral Program at the Scuola Superiore Sant'Anna.He was coordinator of the doctoral program until 2019.He served as Pro-Rector for Innovation, Knowledge Transfer, and Third Mission at the University and Coordinator of the Department of Excellence in Robotics and AI at Scuola Superiore Sant'Anna.He is Scientific Director of the ARTES4.0Competence Center on Industry 4.0, co-financed by the Ministry of Economic Development (MiSE) and involving 127 partners (public and private).He has also been a member of university councils, national and international evaluation committees for research and academic activities, and numerous national and international advisory boards for assessing candidates for academic positions.Paolo Dario served as President of the IEEE Robotics and Automation Society from 2002 to 2003.He has been General or Program Chair of numerous major international conferences, including IEEE ICAR, ICRA, IROS, and BioRob, which he founded.He is an IEEE Life Fellow, a member of the European Society on Medical and Biological Engineering, and he has received numerous awards and honors.Cesare Stefanini [M.Sc. in Mech.Eng.(honors), PhD in Microengineering (honors)] is Full Professor of Bioengineering at The BioRobotics Institute of Scuola Superiore Sant'Anna of Pisa, Italy, with the role of Institute Director and Area Leader in "Creative Engineering Design".His research activity is applied to different fields, including biomechatronics, and micromechatronics for medical and industrial applications.He received international recognitions for the development of novel actuators for microrobots and he has been visiting researcher at the University of Stanford, Center for Design Research, and Professor at Khalifa University, UAE.

Table 2
Zeros and poles of the closed-loop transfer function