1. Introduction
With promising potential for diverse applications, autonomous swimming robots are set to revolutionise aquatic environments. They can assist with surveillance and protection around marine infrastructure, perform vital search and rescue missions, and even handle maintenance operations within complex pipe systems [
1,
2]. Inspired by the movements of biological swimmers like eels and water snakes, a leading approach in this field involves articulated snake-like robots, which navigate intricate underwater environments with remarkable adaptability. Snake-like robots intended for these applications can already be found in the literature [
3,
4], demonstrating the practical viability of this approach. These bio-inspired systems offer significant advantages through their undulating movement, which adapts to irregular shapes while minimising environmental disturbance in sensitive ecological environments and confined spaces.
Within this broader context of snake-like swimming robots, the Purcell’s swimmer represents a fundamental model designed to simulate the behaviour of biological swimmers in fluid environments. Originally intended for navigation at low Reynolds number (
) regimes, where fluid dynamics are dominated by viscous forces rather than inertial ones, this system was introduced by Edward M. Purcell as the simplest swimmer capable of navigating these regimes [
5]. The Purcell’s swimmer consists of three segments and two joints, making it a simplified version of more complex snake-like robots. This design allows it to achieve net movement by rotating its lateral segments in asymmetric sequences, known as motion primitives or gaits, which define their angular positions.
Research in viscosity-dominated regimes has established a solid theoretical foundation for understanding the behaviour of the swimmer, with its kinematics and dynamics being the most widely studied aspects. Researchers have extensively developed and analysed two-dimensional dynamic models, investigating various parameters that influence swimmer displacement. These studies have explored critical aspects such as swimmer geometry [
6,
7,
8], motion primitives [
9], and its asymmetry and stability [
10]. Complementing two-dimensional approaches, other research efforts have focused on three-dimensional models of swimmers [
11,
12]. Some studies have taken a more generalised approach, first examining the dynamics of N-link systems and then attempting to approximate these models to sperm cell swimmers, with specific attention to the three-link case [
13]. Concerning motion primitives, the literature presents traditional gaits such as square and circular configurations, which have been implemented and comparatively analysed in several studies [
11,
14]. Additionally, researchers have proposed innovative methodologies for designing novel motion primitives, as documented in a range of publications [
7,
9,
15,
16,
17,
18,
19,
20,
21].
Regarding actuator types for rotating lateral links, the literature predominantly features two primary approaches: motorised systems and magnetic field-based actuation. Motorised prototypes have been extensively explored, with two notable servomotor-actuated swimmers developed in [
14,
22]. Another motorised prototype was introduced in [
23], although experimental results were not presented. Magnetic field-based actuation represents an alternative approach, with significant research focused on magnetic Purcell’s swimmers. Researchers have comprehensively investigated these systems in studies such as [
24,
25,
26,
27]. A particularly noteworthy experimental contribution was the creation and testing of a magnetic prototype spanning a few centimetres, as detailed in [
26].
Complementing these actuator strategies, some researchers have conducted mathematical analyses exploring the implications of passive and active elastic joints [
23,
28], providing additional theoretical insights into swimmer locomotion mechanisms. Moreover, ionic polymer-metal composites (IPMCs) have emerged as innovative materials for developing and simulating advanced swimming mechanisms. In [
29], researchers explored the potential of IPMCs in designing a three-link Purcell’s swimmer, demonstrating the versatility of this material in biomimetic locomotion systems. Building upon this approach, a recent work successfully fabricated an IPMC-based Purcell’s swimmer prototype in which the joints were fabricated by this material, offering experimental results that validate the design [
30].
While Purcell’s swimmer has shown promise in viscosity-dominated environments, there exists a notable gap in understanding its behaviour and applications in inertia-dominated regimes (
). Extending this concept beyond its original theoretical framework is crucial for its practical application in marine environments, where higher
are typical. Despite its simple design, the Purcell’s swimmer offers significant potential for real-world applications. Its long and slender design makes it an ideal tool for specialised subsea inspections, such as around offshore wind farms. This allows it to reach remote and confined underwater spaces that are otherwise inaccessible by conventional methods, much like other articulated robotic systems [
3]. In broader aquatic settings such as lakes, reservoirs, and shallow seas, these robots, equipped with appropriate tools and sensors, could aid in ecological inspections, habitat monitoring, or even rescue missions for trapped species. In the same way as snake-like robots, their biologically mimetic behaviours enable them to blend seamlessly with the surrounding environment [
31].
Nevertheless, effective deployment in these applications requires trajectory-following capabilities, which remain relatively unexplored for Purcell’s swimmers. Notably, in [
32], the author identifies distinct gaits, described as piecewise functions, enabling the swimmer to trace square and circular trajectories through an open-loop control strategy that eliminates the need for feedback mechanisms. Complementing this research, an open-loop control approach is proposed in [
14], which focuses on estimating swimmer displacement and rotation primitives. The study further advanced the understanding of trajectory generation by analytically determining the optimal number of primitive repetitions required to achieve the desired movement path. Despite this, no closed-loop control strategies have been applied to the Purcell’s swimmer for the purpose of following given trajectories. Furthermore, its unique locomotion, driven by specific motion primitives, requires that any control strategy explicitly account for these fundamental gaits to achieve effective navigation.
Given the characteristics of this robot, event-based control is a suitable closed-loop strategy for enhancing its path-following performance. This approach includes various methods that reduce resource use by executing control actions only when needed. Among these, event-triggered control has the widest adoption, whereby control updates occur when a system-dependent condition, such as a state or output error, exceeds a threshold [
33,
34]. Conversely, self-triggered control predicts the subsequent triggering instant based on the present state, thereby reducing the necessity for continuous monitoring. This feature is particularly advantageous in systems with limited sensing or computational resources. More recently, adaptive and learning-based event-triggered control has emerged as a promising direction, enabling controllers to adjust triggering conditions in real time based on environmental disturbances or system uncertainties, thereby improving robustness in dynamic settings [
35]. Each approach has its own set of trade-offs in terms of implementation complexity, performance, and resource efficiency, making them suitable for different classes of systems and application domains. Several examples of application of event-based methods in controlling other categories of mobile robots can be found in [
36,
37], as well as robotic arms in [
38,
39].
In this context, the aim of this paper is twofold. Firstly, it involves the kinematic and dynamic study of the swimmer, alongside the fabrication of a 30 cm-length motor-driven prototype. Secondly, it proposes an event-based closed-loop control strategy for path following. This strategy employs a threshold-based logical condition that considers both position error and its rate of change to initiate new events. Its operation switches between translation and rotation primitives based on trajectory error, allowing real-time path correction when the swimmer deviates from the target path. Moreover, experimental validation using the motor-driven prototype confirmed the effectiveness of the strategy.
Thus, the main contributions of this paper, all contextualised within inertia-dominated environments, include the following:
The design, modelling, and fabrication of a three-link Purcell’s swimmer prototype;
The proposal and experimental validation of a closed-loop control strategy for path following.
This document is organised as follows.
Section 2 provides the definition and kinematic modelling of a Purcell’s swimmer, alongside the theoretical movement of the classical swimmer and the basis of event-based control.
Section 3 outlines the methodology employed in this work, detailing the mechanical design of the fabricated motor-driven Purcell’s swimmer prototype, the dynamic modelling of such swimmers, and the designed control strategy for path following. The results of both simulations and experiments are presented and discussed in
Section 4. Finally, conclusions and future works are drawn in
Section 5.
3. Methodology
This section deals with the methodology followed throughout this work. Firstly, details of the prototype design are given, followed by the description of the dynamic model of such a swimmer and the definition of the control strategy for path following.
3.1. Purcell’s Swimmer Prototype
The Purcell’s swimmer prototype fabricated in this work, shown in
Figure 5, is composed of two parts, namely, the floating and submerged parts, which have different functions. On the one hand, the submerged part corresponds to the three segments that make up the swimmer, where the central one is immobile and the lateral links can rotate thanks to the actuators, DC motors in this case. The connection between the lateral segments and the motor shaft is done by an intermediate component and plastic screws. Due to geometrical constraints, the lateral segments can only rotate within the range
rad. The three segments were designed with rectangular cross-section for better manufacturing.
The floating section, however, not only ensures a constant depth of the swimmer segments during experiments but also incorporates a sealed housing. This housing protects all electronic components and other elements susceptible to water damage. A press-fitted cover on the housing contains several markers used for tracking the movement of the robot during the experiments. The key electrical components are as follows:
DC motors and driver: the lateral segments are rotated by 6 V low-power micro metal gearmotors from Pololu Robotics and Electronics(Pololu Corporation, Las Vegas, NV, USA).These motors, detailed in
Table 1, feature a 100:1 gearbox and a built-in incremental encoder. A Toshiba TB6612FNG driver (Toshiba Electronic Devices & Storage Corporation, Tokyo, Japan) powers these DC motors.
Microcontroller: an Arduino Nano 33 IoT (Arduino AG, Lugano, Switzerland) serves as microcontroller, managing all its movements and functionalities. Its WiFi+Bluetooth module, along with its numerous digital pins (usable for interrupts) and pulse width modulation (PWM) pins, made it suitable for this application.
Batteries: two 3.7 V batteries provide power to the robot.
LEDs and buttons: several LEDs and push buttons were also included inside and outside the housing of the robot for diverse purposes. External indicators allow to switch the robot on/off, change or identify its operating mode, and check the WiFi connection status. Internally, push buttons function as limit switches, essential for initialising the motor position.
Concerning materials, the prototype housing, the lateral links, and the mechanical parts were mainly fabricated with polylactic acid (PLA), a material used for additive manufacturing in 3D printers, although tough resin was also used for the fabrication of certain pieces that required better mechanical properties.
The choice of segment lengths in Purcell’s swimmer has been the subject of prior optimisation studies, where the lateral segments were sized relative to the central segment and a specific motion primitive under viscosity-dominated conditions. These studies aimed to maximise metrics such as relative displacement, efficiency, or both, per cycle. In the present work, the length of the central link was fixed at 40.5 mm due to mechanical constraints: the DC motors were housed within this segment, and the distance between them could not be reduced. However, the overall length of the swimmer could still be adjusted by modifying the length of the lateral segments, offering greater design flexibility.
For the experiments conducted in this work, a greater length was chosen for the lateral segments (147.64 mm). This decision was mainly driven by the need to achieve larger absolute displacements, thus facilitating the observation, quantification, and swimmer motion analysis in the experimental setup. Furthermore, at this scale, factors such as the resolution of motion capture systems, interaction with the surrounding medium, and the physical limitations of the test bench make it more practical to work with a larger swimmer. Finally, a longer segment length also contributes to greater robustness of the system against small inaccuracies in fabrication or control, thereby improving the reproducibility of the experiments.
3.2. Modelling of a Purcell’s Swimmer
This section begins with some preliminaries regarding initial hypotheses and notation. Next, the environmental forces that arise from the interaction between the swimmer and the fluid are introduced. Finally, the dynamic model of Purcell’s three-link swimmer is developed.
3.2.1. Preliminaries
Let consider the following assumptions [
45]:
The fluid is viscid, incompressible, and irrotational in the inertial frame.
The swimmer incorporates a floatation element designed to maintain the underwater components at a constant depth.
The flow field is defined by a constant, irrotational fluid velocity.
Boundary effects are considered negligible.
The swimmer navigates within an inertia-dominated regime.
Let us consider the following notation: the fluid velocities in X and Y axes are denoted as and , respectively; and are the relative linear velocities of i-link with respect to the fluid in X and Y directions; and represent the relative linear accelerations of i-link; and relative angular velocity and acceleration of i-link are denoted as and , respectively.
3.2.2. Environment Interaction
The interaction between swimming objects and fluid environments leads to the appearance of forces that oppose to the movement. Mainly, two types of hydrodynamic forces can be found in these regimes: added-mass (or virtual-mass) forces and drag (or viscous) forces. Hereafter, these forces will be described considering their application to a Purcell’s three-link swimmer.
The added-mass forces are opposed to the movement of the swimmer and represent the effective mass of the fluid that surrounds the swimmer and must be accelerated with it. These forces depend on the relative acceleration of the swimmer through the following expression [
45,
46]:
where
,
, and
are the added-mass forces in the
X and
Y axes and the generated torque, respectively. The added-mass coefficients of the
i-link in the tangential and perpendicular direction have been named as
and
, respectively, while the added-mass torque coefficient is defined by
. These coefficients only depend on the body geometry [
47].
The relative acceleration of the swimmer can be obtained, for each link, as follows [
45]:
Notice that the influence of the flow field is incorporated in Equation (
6) by subtracting the fluid velocity from the swimmer velocity, which is a common and straightforward method for modelling the effect of ocean currents on underwater robots [
48,
49].
Substituting this expression into (
5), leads to the following:
In order to simplify the equation, the matrices will be denoted as follows:
And the equation of added-mass forces for
i-link can be written as follows:
where
and
.
The drag or viscous forces typically consist of two components, encompassing both linear and nonlinear effects: the linear effects depend only on the relative velocity of each link, while the nonlinear ones depend on the squared relative velocity.
The linear drag forces can be obtained from the resistive force theory (RFT) by means of the following expression:
being
and
the linear drag forces,
the linear drag torque,
and
the drag coefficients of the
i-link in the tangential and perpendicular direction, respectively (both common to linear and nonlinear effects), and
the drag torque parameter for linear effects. The relative velocity can be obtained, for each link, as follows [
45]:
Simplifying terms and joining forces and velocities in matrices, the total drag forces and torque can be calculated through the following [
8]:
where
and
, which is called the resistance tensor, is defined by the following:
Concerning nonlinear drag forces, they depend on the squared velocity of the swimmer unlike linear ones, and they can be calculated as follows [
45]:
where
and
are the nonlinear drag forces,
is the nonlinear drag torque, and
is the drag torque parameter for nonlinear effects. Substituting the squared relative velocity and expressing in matrix form, the nonlinear drag forces can be obtained as follows:
where
and matrix
is defined as follows:
3.2.3. Dynamic Model
Considering an inertia-dominated regime, both added-mass and drag forces must be taken into account in the environment interaction. According to second Newton law, the force balance for each link is given by the following:
being
m the mass of the robot [
45]. Recalling expressions (
8), (
11), and (
13) and substituting them into (
14), the force balance equation can be rewritten as follows:
Substituting the expressions of
,
, and
and solving for
, the acceleration of the centre of the central link can be estimated as follows:
where the matrices are defined as follows:
3.3. Control Strategy for Path Following
This section details the closed-loop control strategy for path following, specifically addressing the control problem associated with Purcell’s swimmers.
3.3.1. Control Problem Formulation
In the reviewed literature, only primitives for translation and rotation of the centre of the central link of the Purcell’s swimmer have been found. This implies that any movement that the swimmer needs to make or any trajectory to be followed must be performed by executing such gaits.
Following straight paths with no inclination, while seemingly simple, is challenging because translation gaits inherently cause drift along the Y axis. Similarly, complex curved paths with varying curvatures and dimensions cannot be followed by relying solely on X-axis movement. The persistent Y-axis drift further complicates trajectory tracking, causing the swimmer to progressively deviate from its intended path. It is also important to note that all primitives must be executed completely from start to finish, meaning the swimmer must wait for one gait to conclude before initiating another. Finally, external factors like environmental disturbances or inertia can cause the swimmer to deviate from its path more significantly or earlier than anticipated during experiments.
Given this context, a closed-loop control strategy should be proposed that overcomes all these issues. The requirements that the designed control strategy should have are as follows:
Among the existing control strategies, event-based control allows the control action to be modified according to the fulfilment of a logical condition, so that it is possible to change, in this way, the motion primitive to be applied to the swimmer. Other control strategies provide control laws that do not allow to change the motion primitive, which is not useful for this application. Several examples of application of event-based methods in controlling other categories of mobile robots can be found in [
36,
37], as well as robotic arms in [
38,
39].
In this case, the logical condition of the event-driven control depends on the tracking error and its derivative to keep the robot on its path. If the error exceeds a set threshold, the motion primitive is adjusted to correct the trajectory and reduce deviations from drift or disturbances. This control also facilitates the use of the two types of primitives seen above: one when the tracking error is below the threshold, and the other when it is exceeded. Moreover, a key advantage is that the strategy allows for waiting for the current primitive to complete before recalculating the tracking error and deciding if a gait modification is needed.
3.3.2. Proposed Control Strategy
The proposed strategy for tracking a trajectory with the Purcell’s swimmer is an event-based control according to the scheme shown in
Figure 6, where the triggering of the logical condition depends on two variables: the tracking error, better known as position error (
), and its derivative (
). Basically, the strategy consists of implementing a motion primitive for translation, when the swimmer is following or approaching the path, combined with the execution of a primitive for rotation, when it is further than a fixed distance and it is moving away from the trajectory. In other words, the proposed strategy switches between translation and rotation primitives depending on a logical function of
and
.
The first issue to be considered is the type of path, namely, straight or curved, to be followed by the swimmer. Due to the fact that the swimmer is only able to move in a rectilinear direction, the curvature of the path is important because, if the path is curved, it should be divided into a certain number of straight segments so that the swimmer can follow it. The number of segments into which the curved path is divided will depend on the precision desired for the movement of the swimmer. This task will be performed by the path planner.
Secondly, the event detector takes part and evaluates the following triggering condition:
where
is the threshold. According to condition (
17), a new event will occur when any of the following situations is met:
The absolute value of is equal or higher than and its derivative is positive. In this situation, the event detector analyses if the swimmer is moving away from the trajectory, and both conditions concerning and must be true for a new event to be detected. Should any of the aforementioned conditions not be met, that is, the swimmer is in proximity to the trajectory and within the threshold () or if it is approaching the trajectory, thus leading to a reduction in error (), then any event occurs. The event triggering condition uses the error term () to ensure the robot remains within the specified of the trajectory. However, successive applications of rotation primitives, though necessary, can induce slight deviations that may cause the swimmer to drift significantly. By considering the derivative of the error (), the strategy can opt to maintain translational movement when the swimmer is outside but approaching the trajectory, allowing it to naturally converge and re-enter the defined limits without unnecessary and potentially detrimental rotational adjustments.
A new segment of the path must be followed, in order to redirect the swimmer to the direction of the new segment. This situation is necessary for those paths that are composed of multiple straight segments, such as compound or curved paths divided into straight segments.
The data sent to the event detector are the position of the centre of the central link of the swimmer in the plane (), and the event detector calculates the position error as the perpendicular distance between and the path. Given that all the motion primitives have the same duration (), the logical condition is evaluated periodically, after a motion primitive finishes. If the logical condition is not met, the controller proceeds with executing the translation primitive, as it assumes that the orientation of the swimmer is adequate and, therefore, the swimmer follows the desired path. On the contrary, if the logical condition is met, the controller applies a rotation primitive to adjust the swimmer orientation and rectify its motion in accordance with the desired path.
For comparison purposes and to validate the control strategy, both the tracking error and the mean square error (MSE) have been taken as performance indices, where the latter was given by the following definition:
where
n is the number of samples.
In between two events, any data are sent to the controller. Nevertheless, the lateral links of the Purcell’s swimmer should be rotating at every instant, as they are implementing the motion primitive. To solve this, two control loops have been considered, as shown in
Figure 6. The outer loop (
Figure 6a) is the event-based controller, and determines the primitive that the swimmer should implement to follow the trajectory. The inner loop (
Figure 6b) is a proportional-derivative (PD) controller that works at every instant to control the rotation of the lateral links, to ensure that the swimmer is implementing a motion primitive.
Concerning the inner control loop, the position of each of the DC motors was firstly identified as a second order system defined as follows:
being
and
K the time constant and the DC gain, respectively.
Secondly, a PD controller of the following form:
where
and
are the proportional and the derivative time constants, respectively, was tuned using the root locus method to a settling time of about 0.5 s with no overshoot as design specifications for a step response of
rad because of the geometrical constraints of the lateral links. The parameters of the system and the controller are indicated in
Table 2, where M1 and M2 refer to the motor that rotates
and
, respectively. The responses of both motors applying the PD controllers are shown in
Figure 7a, for a step reference, and in
Figure 7b, for a ramp one. As can be observed, the design specifications are fulfilled.
4. Results
This section covers the results obtained in both simulations and experiments carried out with the motor-driven prototype.
4.1. Simulations
To conduct open-loop simulations of the Purcell’s swimmer, dynamic model (
14) was simulated in MATLAB
® in its R2022b version by solving the differential equation through the Runge–Kutta method. The simulation parameters indicated in
Table 3 were considered for the fluid, geometry of the swimmer, and motion primitives. In addition, the drag coefficients were estimated through COMSOL Multiphysics
® version 5.5 as detailed in [
50], while the added-mass coefficients were approximated to those of a slender body, defined as follows [
47]:
The added mass of a slender body in the longitudinal direction, i.e.,
X axis, can be neglected in comparison to the body mass, so the added mass coefficient in this direction was approximated to zero [
45,
47].
The simulation results implementing the clockwise square gait are shown in
Figure 8, where the displacement in
X and
Y axes and the trajectory followed by the centre of the central link have been plotted. The data in
Figure 8a corroborate the idea that a positive net displacement on the
X axis is consistently achieved. The total displacement achieved is
m along the
X axis, while the displacement with a single gait repetition is
m. Additionally, an oscillatory motion along the
Y axis, typical of motion primitives, is evident. The amplitude of these oscillations, which is dependent on the dimensions of the swimmer, attains approximately
m in this case, aligning with its dimensions.
Concerning the trajectory observed in
Figure 8b, it deviates from that characteristic of viscosity-dominated regimes. Under these conditions, the swimmer typically traces distinctive figure-eight loops (as depicted in
Figure 4). In the present case, however, the loops exhibit a greater spatial extent and fail to close upon completion of the motion primitive, resulting in a trajectory resembling a sawtooth pattern.
Finally, it is evident from
Figure 8b that the mean trajectory deviates from the
axis instead of following a straight line. This behaviour is consistent with results observed in viscosity-dominated regimes, which were considered in the development of the closed-loop path following strategy. For this specific experiment, the final positive
Y-axis drift amounts to 10 cm, although the direction and magnitude of the drift vary throughout the simulation period.
In order to assess how external disturbances (specifically, the presence of a uniform flow field) affect the displacement and trajectory of the swimmer, several open-loop simulations under different fluid velocities and directions were conducted. The results are presented in
Figure 9 and
Table 4. A noticeable impact of the fluid flow on the net displacement and trajectory of the swimmer is shown in
Figure 9 in comparison with
Figure 8b, with the extent and direction of the deviation depending on the orientation of the flow relative to the motion of the swimmer. Notably, although the selected fluid velocity (
m/s) may appear small in absolute terms, it is considerably high when compared to the size and mass of the swimmer. Nevertheless, the characteristic sawtooth-shaped trajectory remains qualitatively preserved in all cases, indicating that the locomotion pattern is robust to moderate flows.
Table 4 shows a comparison of the displacement and amplitude of oscillations between the case with null fluid velocity and the simulations performed. Focusing on the displacement along the
X-axis (since the applied primitive corresponds to translation), it can be observed that, in all cases where
, the net
X-displacement decreases compared to the reference case (
), with reductions ranging from 4% to 22%. Regarding the
Y-axis, the displacement increases consistently across all flow conditions, indicating that the swimmer deviates more significantly when exposed to external disturbances. Moreover, the amplitude of the characteristic sawtooth oscillations in the
Y direction also increases, from values around 120 mm in the reference case to up to 152 mm under flow. These findings highlight the importance of implementing closed-loop control strategies to effectively regulate the trajectory of the swimmer and compensate for deviations caused by environmental disturbances.
4.2. Experiments
The experimental procedures and findings derived from testing the motor-driven prototype are covered in this section.
4.2.1. Types of Experiments
This section details the experimental procedures performed with the motor-driven prototype. Specifically, two distinct categories of experiments were conducted:
Open-loop experiments: The first experiments carried out with the motor-driven prototype consisted of implementing the translation and rotation primitives that will be used for path following, with the aim of verifying that the direction of the swimmer displacement corresponds to that observed in simulations. Specifically, the square and bi-square primitives from
Figure 2 were implemented for translation and rotation, respectively, applying them in clockwise or counterclockwise to obtain displacements in different directions. Hereafter, the translation primitives that provide positive displacement in
X axis will be named as positive translation primitives, while those that produce a counterclockwise increase in the swimmer orientation will be called positive rotation primitives, and vice versa. These gaits were repeatedly applied a total of 30 times.
Closed-loop experiments: The second type of experiments were carried out to verify the validity of the path following control algorithm. The square and bi-square motion primitives were implemented for translation and rotation of the robot, respectively. Concerning the path to be followed, three types of straight paths were considered to check that the robot was able to follow the trajectories, which were as follows:
- (a)
A simple trajectory with no inclination, where the robot only has to change direction if it deviates.
- (b)
A 45° inclined trajectory, for which the robot has to make an initial turn and position itself in the same direction as the path to be followed, and then implement the path following control algorithm in the same way as for the trajectory with no inclination.
- (c)
A path consisting of two straight segments through a combination of the two previous ones, i.e., a first inclined segment and a second segment with zero slope, in order to check the transition from one segment to the other at different angles of inclination.
4.2.2. Equipments
Figure 10 shows the setup used for the experiments with the motor-driven prototype. As can be observed, it consists of the following:
A pool filled with water, as observed in
Figure 10a. Due to the dimensions of the prototype, it was necessary to carry out the experiments in a large tank that would allow the robot to move without any possible interference from nearby walls. To this end, the facilities at the University of Castilla-La Mancha (Spain) were used, specifically a pool measuring approximately
metres, large enough to allow the robot to move freely. The height of the pool, approximately 1 m, is also suitable so that the bottom does not interfere with the rotation of the lateral segments of the swimmer when the pool is fully or partially filled.
A motion capture system to detect the position of the robot at each stage of the experiment. For this purpose, a four-camera system from Qualisys (Qualisys AB, Gothenburg, Sweden) was deployed, as visualised in
Figure 10a, which is capable of detecting the position of the markers placed in the prototype cover, as seen in
Figure 10b. The software that allows to capture, visualise and record the position of the markers in real time is Qualisys Track Manager (QTM). The acquired position can also be sent in real time to other softwares, such as LabVIEW or MATLAB
®, facilitating the development of closed-loop experiments. In this case, LabVIEW 2020 was used to communicate with the robot in real time.
A computer to run QTM version 2020.3 and LabVIEW 2020 softwares as seen in
Figure 10c. In addition, the computer was used to process the data collected in the experiments using MATLAB
®, which was also installed on the computer.
A communication protocol was developed to enable closed-loop experiments and transmit the position of the robot, as detected by the motion capture system, to the robot. This protocol, represented in
Figure 11, consisted of three phases: cameras-QTM, QTM-LabVIEW, and LabVIEW-Arduino. Firstly, the cameras communicated with the QTM software using the precision time protocol (PTP) and an Ethernet connection. Then, QTM communicated in real time with LabVIEW via the transmission control protocol/internet protocol (TCP/IP). Lastly, the communication between the computer and the robot was done through LabVIEW. To do this, it was necessary to integrate the exchange of data with both QTM and the robot in the same LabVIEW file. This communication was performed through the user data protocol (UDP) via WiFi.
To ensure reliable communication, a crucial step was selecting the optimal frequency for data exchange between QTM and LabVIEW. A 10 Hz frequency was chosen to prevent data loss or buffer accumulation, which could lead to the control strategy operating incorrectly. Higher frequencies tested resulted in communication delays due to LabVIEW processing limitations. Thus, 10 Hz proved to be the maximum viable frequency for these specific experiments to avoid such drawbacks and ensure the correct execution of the control strategy.
4.2.3. Motion Primitives Experiments
The linear and angular displacements over time of the central link for the four primitives implemented in these experiments are plotted in
Figure 12, while the net displacements are tabulated in
Table 5. Similar to the simulations results, the swimmer does not trace the eight-shape loop of the viscosity-dominated case. Instead, the trajectory followed by the centre of the central link is composed of upward and downward movements similar to a sawtooth pattern, as already observed in simulations. The amplitude of these movements, although it differs throughout the experiments, achieved approximately 10 cm and is consistent with the dimensions of the swimmer.
In the case of the translation primitives shown in
Figure 12a,b, it can be observed that the direction of the displacement in the
X axis coincides with that obtained with the simulated model, i.e., the primitive for positive translation coincides with that applied theoretically, which is the clockwise square gait, while the primitive for negative translation is the counterclockwise square gait. Moreover, it can be seen that, in both cases, there is a drift in the
Y axis, as already observed in the simulations, as well as a slight change in the orientation of the central segment.
However, the amplitude of the displacement is not consistent with the model or between the experiments themselves: since the primitives are the same but applied in opposite directions, it would be expected that the displacements would be also the same, but in opposite directions. Nevertheless, this is not reflected in the results, where it can be seen that the robot moves twice as much in the
X axis with the negative translation primitive than with the positive translation gait (see
Table 5). This asymmetry could be likely caused by small fabrication inaccuracies in the prototype, particularly a non-uniform mass distribution across the swimmer, which may shift the centre of mass and lead to direction-dependent inertial effects. Such asymmetries are difficult to avoid in physical implementations, especially at this scale, and are amplified under open-loop conditions where no corrective feedback is applied. These results highlight the limitations of open-loop execution and motivate the use of a closed-loop strategy to correct trajectory deviations caused by structural imbalances or external disturbances.
Regarding the rotation primitives, whose results are illustrated in
Figure 12c,d, it can be seen that the positive rotation primitive causes a positive change of orientation of the central segment of the robot, and the opposite occurs for the negative rotation primitive. As for the amplitude of the angular displacement, in this case it is similar for both primitives, around 5–6 rad in absolute values. It is also observed that there is a drift in
X and
Y axes, positive in both cases and of greater amplitude for the negative rotation primitive.
In view of the results obtained for the translation and rotation primitives, it is worth clarifying the following:
With respect to the translation primitives, the above results do not affect path following, since the control strategy should be able to correct the direction of the robot movement regardless of how far it moves in the plane and its angular position. What is important in this case is that there is a net displacement in the X axis that is greater than that in the other axes.
For rotation primitives, considering the dimensions of the robot and the angular displacement achieved, the drifts in X and Y axes can be neglected and will not affect, to a large extent, path following experiments.
4.2.4. Path Following Experiments
The results of the closed-loop experiments are depicted in
Figure 13, where the swimmer trajectory has been represented in blue colour and the red marks correspond to the event detector activation. Evidently, this was not performed after the completion of each gait. These and other modifications to the original strategy were conducted and are indicated below:
To optimise data exchange between the interacting elements, the control strategy evaluation was not performed after each individual gait execution. Instead, it was determined to wait until four repetitions of the motion primitives were completed, to prevent saturation of the information exchange between the motion capture system and the robot.
Two threshold values were considered for the experiments: mm and mm, which will also be referred to as case 1 and 2, respectively. The rationale for selecting these specific threshold values stems from the observed deviations in both simulations and physical experiments. The Y-axis drift per motion primitive exhibits variability between these two contexts. In simulations, this drift ranges from mm in the middle of the simulations to mm at the end, suggesting a maximum potential cumulative drift of mm over four consecutive primitive executions, as planned for the experiments. Notably, the experimental open-loop application of the square primitive reveals even larger deviations, reaching up to 11 mm per primitive, which extrapolates to 44 mm over four repetitions. Consequently, selecting a threshold below 44 mm would likely trigger a new control event and necessitate the application of the rotation primitive at each evaluation of the control strategy. Consequently, thresholds exceeding this critical value, specifically ranging from approximately two to five times the 44 mm-drift, were chosen to avoid excessive and potentially destabilising activation of the rotation primitive.
Figure 13 shows case 1 results in left column and case 2 in the right column. As can be observed, the following conclusions can be drawn:
Path with no inclination (
Figure 13a,b): The results indicate that a lower
led to a higher frequency of robot rotations. This is attributed to the earlier exceedance of
, necessitating more frequent reorientations towards the desired path. Specifically, case 1 (
Figure 13a) exhibited a total of four rotations, whereas case 2 (
Figure 13b) involved three rotations. The second rotation in case 2 was required because the initial reorientation was insufficient to maintain the trajectory of the swimmer, leading to further deviation and a subsequent need for correction (evident in the
X range of 600–800 mm in
Figure 13b).
Inclined path (in
Figure 13c,d): The robot successfully followed the inclined path for both
values, with highly similar trajectories observed in both cases. However, in case 2 (
Figure 13d), the swimmer executed one additional rotation compared to case 1. This supplementary rotation occurred near the end of the trajectory due to a deviation away from the desired path. For the remaining rotations along the inclined paths, their timing was notably consistent across both
values.
Combined path (see
Figure 13e,f): The swimmer exhibited superior performance in case 2, as depicted in
Figure 13f. Initially, the robot rotated at the beginning of the first inclined segment to align its angular orientation and achieve a slope comparable to the desired trajectory. Subsequently, it continued with translational motion until
exceeded
, at which point it rotated again to reduce the deviation. For the majority of the path, the swimmer remained within the
error bounds until a deviation occurred in the final zero-slope segment, prompting a further rotation to move downwards towards the intended trajectory. Case 1 (
Figure 13e) showed unexpected results, with significant swimmer deviation in the range
mm, and, although corrective rotations were implemented, the deviation remained considerable. Nevertheless, the robot achieved complete path tracking. The final zero-slope segment involved multiple rotations due to the swimmer orientation exceeding
/2 rad while targeting a 0 rad slope, requiring repeated adjustments.
For comparison purposes, open-loop experiments for not inclined and inclined paths were also performed (the combined path was not tested because of the poor results obtained for the inclined one). The results are shown in
Figure 14. As can be seen, the swimmer deviated to a large extent from the desired path, so closed-loop control is essential to reduce deviation.
A schematic of the robot with its actual dimensions has been included in
Figure 14a to show the amplitude of the robot movement compared to its size. It is worth noting that, at first glance, the amplitude of the
Y-movements appears to be much larger than the size of the robot, but there are two factors that influenced this. On the one hand, the inertia of the robot helped it to move further, so the movements were wider than those observed in the simulations. The upward motion of the robot involved a sequential rotation of its links, first one and then the other, with a similar sequence occurring during downward motion. This coordinated rotation of both links in each vertical movement cycle resulted in a larger amplitude of displacement along the
Y axis.
With regard to
, it has been calculated for each path, for open- and closed-loop, and for each
, and the results are plotted in
Figure 15. The time axis has been normalised to
, with
being the final time of the experiment, to improve result visualisation. As can be observed,
for open-loop tracking (see
Figure 15a) increases progressively until the end of the experiment, as expected from the results shown in
Figure 14. Regarding the closed-loop tracking (see
Figure 15b,c), it is evident that, for both values of
, the robot detected that the threshold had been exceeded and changed its direction of movement to reduce the error. Therefore, the results indicate that, when
increases above
, it immediately decreases again towards values below the threshold. For the case 1 (see
Figure 15b), an increase of the error well above the threshold is observed for
, which corresponds to the deviation experienced by the swimmer in the range
mm in
Figure 13e.
For a better comparison, the MSE for each experiment has been calculated and tabulated in
Table 6. The data reveal a direct correlation between the
value and the MSE across all paths, with the lowest
yielding the smallest MSE and thus minimal trajectory deviation. For the path with no inclination, only minor differences are observed between the MSE of the open-loop control and the smallest
. This is likely attributable to the shorter duration of the open-loop experiment, which does not cover the entirety of the path (as evident in
Figure 14a, where the final displacement is approximately 1100 mm compared to the total path length of 1500 mm). To sum up, it can be concluded that path following is more accurate for lower
values in the proposed control strategy.
4.3. Discussion
This section includes a brief discussion with a comparison between the simulated and experimental results of the motor-driven prototype.
Several similarities can be found regarding the open-loop experiments and the simulations. First of all, the amplitude of the swimmer movement on the Y axis during the implementation of a motion primitive is similar for both cases (around 10 cm in experiments and 12 cm in simulations), and the loops that the swimmer performs in the plane when navigating through viscosity-dominated environments are not observed in any of the results, showing instead a sawtooth pattern.
However, regarding the results, several differences are found in their magnitude. Firstly, the displacement in X is almost six times greater in the simulations than in the experiments, indicating that, for a single repetition of the primitive, the swimmer displaces 19 cm and 3.6 cm in simulations and experiments, respectively. Secondly, differences are also observed in the Y-drift, indicating that the swimmer deviates 10 cm in simulations and 20.5–26.8 cm in experiments, that is, the difference between both ranges from 2.05 to 2.68 times. Thus, the simulations show a larger longitudinal displacement along the X axis, but the experiments reveal a greater Y-drift.
In light of the presented results, several factors were identified that may have influenced the differences between simulations and experiments. Firstly, although the size of the pool should have minimised confinement effects, the enclosed environment might have introduced unaccounted-for forces in the dynamic model. Wall proximity could have influenced robot motion, and fluid oscillations from wall interactions might have affected displacement. Moreover, while maintaining constant depth and protecting electronics, the float itself could have influenced robot dynamics through unmodelled water surface drag forces.
Regarding the dynamic model, although the drag coefficients had been calculated via COMSOL Multiphysics® simulations, they could have deviated from actual values, impacting environmental drag forces and the swimmer displacement. Concerning added-mass coefficients, these were derived from theoretical expressions and might not have accurately reflected real-world values. Discrepancies would have affected added-mass forces and, consequently, the robot motion. Furthermore, the complexity of the model and MATLAB® implementation could have introduced minor discrepancies. Finally, the idealised representation of the fluid environment and hydrodynamic forces within the dynamic model omitted potentially relevant effects. As an example, the oscillatory motion of the swimmer caused the float to sway, resulting in its partial submersion in the fluid, which may have increased the drag.
In the area that the path-following control strategy concerns, the results have shown its effectiveness. However, alternatives or improvements could be proposed in terms of the triggering condition or the implementation of the strategy. Given the dissimilarities between simulation results and experimental data under the conditions explored in this work, it is inadvisable to employ model-dependent triggering criteria like linear predictor-based deadband and model-based approaches for path following. These methods, relying on inaccurate model predictions, would likely yield unsatisfactory control performance. However, promising alternative triggering strategies could be developed using absolute or integral deadband criteria, which assess the rate of deviation from the trajectory by comparing current and past data points.
For enhanced implementation, minimising communication delay and packet loss in the tracking system is crucial for accurate path following. Ideally, the robot should receive its position immediately after each primitive execution via fast communication. A significant advancement would be utilising the onboard positioning system of the robot, eliminating the reliance on external cameras for position detection and transmission.
5. Conclusions
This paper has presented a closed-loop control strategy for path following of Purcell’s three-link swimmers on the basis of event-based control. The strategy has been validated through experiments with a 30 cm-length motor-driven Purcell’s swimmer prototype within an inertia-dominated regime. The theoretical modelling of the Purcell’s swimmer was undertaken, succeeded by a description of the fabricated prototype. Following this, the simulations and experiments conducted were detailed, culminating in a discussion of the findings.
A comparison between simulation and experimental outcomes indicated both similarities and differences. Notably, both approaches showed consistent swimmer direction and overall displacement along the X axis. Furthermore, the extent of upward and downward motion observed in Y direction displayed a sawtooth pattern and similar amplitudes, aligning with the physical dimensions of the prototype. The trajectory followed by the swimmer showed differences from the ideal case at low Reynolds number () conditions (viscosity-dominated regimes), as the eight-shape loops were not traced in this case.
Concerning experimental results, the prototype managed to displace and rotate in the desired directions with translation and rotation primitives, respectively. The closed-loop strategy was tested experimentally for path following with two values of threshold () and three types of straight paths, comparing with the open-loop alternative by means of the mean square error (MSE). The results showed that the strategy is appropriate for this type of swimmer, as it was able to follow all path types. Moreover, MSE results showed that, the smaller the , the more accurate the tracking.
Future research should focus on refining experimental conditions by minimising communication delays and integrating onboard positioning systems to improve path-following accuracy. Additionally, exploring the robot performance with diverse and more intricate trajectories would be a valuable direction for future investigation. Moreover, future implementations may also incorporate adaptive mechanisms to improve the response to external disturbances. In particular, the integration of adaptive thresholds or disturbance observers could be explored to improve control robustness in environments with variable flow conditions or near-wall effects. In addition, future work may consider the integration of intelligent control techniques, such as fuzzy logic or neural networks, to enhance adaptability in the presence of unmodelled dynamics.