Abstract
This article investigates the capability for backward swimming of a carangiform-fish-like robot with only three joints. A simple dynamic model based on a fixed point, a point in the body without perpendicular oscillation, is first developed to analyze the feasibility of backward motion for the robot. Through this theoretical analysis, we find that the fixed point lies closer to the robotic fish tail with higher backward swimming speeds. Combining the theoretical analysis with experimental optimization, we further explore backward swimming patterns using particle swarm optimization. After a series of online optimal experiments, we find several locomotion gaits that can make the robotic fish swim backward, and the corresponding fixed points are similarly located near the tail. The backward swimming velocity is strongly correlated with the fixed point position along the robotic fish body, which verifies the effectiveness of our fixed-point model.
Introduction
Autonomous underwater vehicles (AUV) have attracted tremendous attention, as they can be widely applied in oceanography, and in commercial and military missions. 1 –4 However, most existing vehicles can hardly satisfy the increasing requirements expected of them, such as long range, high maneuverability, station keeping or energy saving. 5 Since most aquatic creatures are endowed with remarkable swimming skills, such as high efficiency, high maneuverability and low noise, 6 they are an obvious source of inspiration. Therefore, with the development of mechanics, materials, electronics, sensors and controls, enormous strides have been taken in the development of bio-inspired underwater robots over the past two or so decades. 7 –13
Since the first robotic fish was made at MIT, 14 researchers have built a variety of robotic fish. 15,12,15 –19 Improving the maneuverability of robotic fish is one of the most popular studies in the field, including the development of features such as sharp turning, rolling, front and back flips, and three-dimensional fin undulations. 5,20 –22 Few have considered the backward swimming performance of robotic fish, 21,23 –26 although backward swimming is observed in nature. 27,28 If a robotic fish is endowed with backward swimming ability, its maneuverability will be greatly improved. For instance, when robotic fish swim in narrow spaces or small pipelines, they can only swim backward to go back, as there is not enough space to turn.
To date, the backward swimming of robotic fish has been mainly studied through simulations or experimental optimizations. Using computational fluid dynamics modelling, Anton et al. achieved the backward swimming of a robotic fish with two-link tail. 24 Zhou et al. found the backward swimming pattern for a carangiform-fish-like robot based on Lagrangian dynamics. Recently, Yu and Wu optimized the backward swimming patterns of a four-joint robotic fish based on particle swarm optimization (PSO). 21,29 However, finding suitable swimming patterns that make fish swim backward is still quite difficult due to a lack of simple yet general dynamic models and an asymmetric mechanical structure that is propelled forward more easily than backward.
In this article, we first analyze the feasibility of backward swimming for our three-joint robotic fish. A fixed-point (FP) based hydrodynamic model is developed to evaluate the properties of backward motion for our robotic fish. Through this model, we find that it is the position of the FP that determines the velocity of the robot. Whenever the FP is located near the tail, the robotic fish will swim backward, and the fastest backward swimming speed will be achieved when the FP moves to the tip of the tail. Guided by these rules, we present the results of an experimental platform which can automatically optimize the parameters for the backward swimming gaits based on PSO. Several backward swimming patterns were found which further prove the trend relations between backward swimming and FP location which we proposed in the theoretical analysis.
The main contributions of this article are twofold: (1) a simple yet powerful FP-based model is proposed to qualitatively analyze the backward swimming of a carangiform robot; and (2) a combination of the modelling analysis and experimental optimization via PSO is proposed. As a robotic fish is controlled by central pattern generator (CPG) controller, finding the maximum backward swimming control parameters accurately is beyond a simple hydrodynamic model. Experimental optimization without pre-hydrodynamic analysis will consume a lot of time and may converge on sub-optimal results. Here the compromise is that the FP model makes sure that the global optimization, such as the stop condition of the optimization, can be chosen as the tail tip position of the FP, and experimental optimization verifies the effectiveness of the FP model. So the modelling analysis and the experimental analysis supplement each other.
The remainder of the article is organized as follows. Section 2 describes the prototype of a carangiform robot both in mechanism and locomotion controller. The FP hydrodynamic model for the backward swimming analysis of the robotic fish is given in Section 3. An online experimental platform comprising an automatic optimization system for searching for backward swimming gaits is presented in Section 4. In Section 5, results of the experiments are provided. Finally, discussion and an outline of future work are presented in Section 6.
A carangiform robot
Robotic prototype
Figure 1 depicts a wireless-controlled, three-link, carangiform robotic fish prototype developed in our laboratory. The robot is about 0.4 m in length and 0.5 kg in weight. The robotic fish is composed of three parts: rigid head, flexible body and caudal fin. All the propulsion power is produced by the undulation of the flexible body and flapping of the caudal fin. In the rigid head, there is a control unit, battery and balancing weight adjusted for static balance in stationary water. A pair of fixed pectoral fins are designed to keep the body balanced when the robot swims in water. Furthermore, the head is equipped with a wireless communication module which is used for transmitting data between the robotic fish and the upper computer. The flexible body is mainly comprised of three joints and servomotors; these are all covered with a soft but waterproof skin. The caudal fin is made of rubber, and its stiffness decreases towards its end, resembling a real fish.

The robotic fish is divided into three parts: rigid head, flexible body and caudal fin.
CPG-based locomotion controller
To implement the online optimization of the control parameters, the locomotion controller for the robotic fish should be capable of adapting to any body wave form of fish. A simple, linear, yet still powerful CPG model is applied to control the locomotion of the robotic fish. 30,31 This CPG controller is based on coupled oscillators similar to neural networks in animals, defined as:
where ri, φi and θi represent the amplitude, the phase and the outputs of i th oscillator, respectively. Ri denotes the amplitude setting of the i th oscillator determining the body wave of our robotic fish. Considering that the robot is controlled by the rotation of the severmotor, we scale the amplitude with the maximum rotation angle. ϕij, calculated as φj − φi, is named the lag angle and represents a bias of phase between oscillators i and j when the oscillators reach stability. In physics, ϕij equals −ϕij, and ϕij = ϕik + ϕkj; thus, for three oscillators, two phase biases, such as ϕ12 and ϕ13, can describe all the phase relationships among them. v is the frequency of all the oscillators. Structural parameters α and μ respectively affect the convergence rate of ri and φi. One can refer to Li et al. for a detailed introduction of this CPG controller, including its convergence analysis. 31
As a basis for the online automatic optimization, the onboard CPG controller is significant. This CPG model is linear, so that it can be easily implemented in AVR controllers. Figure 2 shows a framework of the application of the above CPG controller in our robotic fish. Whenever the robotic fish receives a new group of control parameters from the upper computer, the CPG network first generates the corresponding turning angles for each servomotor. Then the AVR microcontroller transmits these angles as PWM signals, driving the three servomotors. One can refer to the details of the implementation of the CPG controller in the AVR controllers in Li et al. 32

Framework of CPG controller embedded in the three-link robotic fish.
Fixed point hydrodynamic model
Due to the asymmetric structure of the carangiform robot, it is difficult for the robot to swim backward. The following work aims to determine whether carangiform robots can swim backward through only the undulation of the rear two-thirds of its body. We propose a hydrodynamic model termed the FP model, 33 which is an extension of the classical elongated body theory (EBT). 34 This model considers the head shaking and evaluates both forward and backward thrust and swimming speed. According to this model, the carangiform robot exhibits backward swimming abilities when the FP is located in the rear part of the robot.
Description of the body wave
Before we go through the detail of our FP model, we should first introduce the body wave, as it is the basis of EBT and the FP model. The body wave was first defined and systematically researched by Gray. 35 He observed that most fish in nature generate thrust through body undulation to overcome the drag of water. Consequently, defining an appropriate body wave function is the first step in the further study of fish swimming for both experimental and theoretical researchers.
Figure 3 gives a top-down view of a carangiform fish body in the earth-fixed inertial reference frame (x, z). The fish swims along the direction of −x, and its perpendicular displacement is described as z(x, t). Further, the body wave function was used to mathematically describe how the fish’s body undulates periodically. Lighthill proposed one of the expressions of the body wave as

Overhead view of fish body wave defined in the earth-fixed inertial reference frame. There is a discrepancy between the body waves of the fish (dotted line) and robotic fish (solid line).
where z(x, t) denotes the transverse displacement of fish body, x is the displacement along the main axis, k is expressed as 2π/λ where λ is the body wave length, c1 and c2 are linear and quadratic wave amplitude envelopes, respectively, and ω is regarded as the frequency of the body wave. 34
Because the oscillation of the man-made robot is achieved through discrete rotating hinge joints, a discrete planar spline curve is taken into account,
where i denotes i th joint of robot. Here i equals 1, 2, 3 for our three-joint robotic fish. The robotic fish’s body wave is approximated by the linkages that are driven by the CPG controller, and an explanation of the body wave parameters in view of CPG parameters is given as follows: c1 and c2 determine the amplitudes of the three joints in the CPG controller; kxi denotes the lag angle in the CPG controller; and ω equals the frequency in the CPG controller. The transformation from CPG parameters to body wave parameters is simply deduced through the least squares method (LSM). 33
The fixed point model
The FP model is an extension of EBT which was first proposed by Lighthill in 1960. 34 EBT has been widely applied in the bio-fluid-dynamic analysis of the locomotion of elongated fish. 36
The model assumes that when thrust equals drag force, fish reach a steady state with a mean speed of U, where the word ‘mean’ refers to the average over one period of fish body undulation. According to EBT, the mean thrust is described as
where
where Sc is the chord length of the tail fin, ρω is the density of the fluid, and β is a nondimensional parameter close to 1. Under inviscid flow conditions, the drag force of a fish is experimentally expressed as
where CD is a coefficient determined by experiments, and S is the wetted surface area of the undulating part.
When the thrust balances drag, the speed of fish is estimated by
In EBT, a basic assumption is that the rigid head has no displacement in the z axial. However, natural carangiform fish usually swim with body undulation along with head shaking.
37
And, according to our previous studies on hydrodynamic modelling,
33
as well as the analysis of the locomotion of fish swimming (see Figure 4), we find that a point in the body of robotic fish instead of its head has no oscillation in z. The position of the point is determined by both the mechanical properties of the fish and its specific body wave. Here, we define these points as fixed-points (FPs) and naturally modify the traditional body wave function as

(a) Successive dorsal profiles of robotic fish swimming at 0.0336 m/s (0.084 BL/s, where BL stands for body length), determined at 1.25s intervals. (b) Images from (a) overlain. A fixed-point is located in the body of robotic fish, and, according to the FP, the fish body is divided into two parts: front and rear.
where x0 represents the position of the FP. The body undulation of robotic fish can be divided into two parts, separated by FP: front and rear (see Figure 4). The virtual masses of the front and rear parts are recorded as m1 and m2, and the thrusts generated by these two parts are calculated as
If the thrust of the undulation of the rear part is larger than that of the front, the robotic fish swims forward and its speed is calculated as
On the contrary, if the thrust generated by the undulation of the front part is larger, the robotic fish swims backward and the speed is derived as
Whenever (13) and (14) have no solution, the thrust generated by the fish’s undulation is smaller than its drag; that is to say, a robotic fish needs an external thrust to counteract its drag. 34
Swimming performance evaluation
Here, an evaluation of whether a carangiform robot can swim backward via two-thirds of body undulation is carried out under the assumption that body undulation remains constant while the position of the FP varies. This analysis reveals the main determinant for when the fish swims backward with respect to the position of the FP. The structure parameters in the simulation are chosen according to the physical robotic fish, and are shown in Table 1.
Parameters setting in simulation.
Thrust and speed of the fish are calculated via (13) or (14) with the position of the FP varying from the head to the tail of the fish. When the FP is located at the head of robot, the robotic fish swims forward with a maximum speed of 0.429 m/s (1.073 BL/s, where BL stands for body length). On the contrary, when the FP goes to the tail tip of the robot, it swims backward with a maximum speed of 0.357 m/s (0.893 BL/s). When the FP equals xt (see Figure 5), the fish will swim neither forward nor backward. The fish is likely to struggle in the water. The region of the backward swimming gaits is much smaller than that of the forward swimming gaits. This is due to the fact that the virtual masses near the head are much smaller than those near the undulating body for most carangiform robots. Thereby, FPs mostly stay in the forward section of the body, and the robotic fish swims forward more easily than it swims backward.

Simulation of speed with the position of the FP ranging from the head to the tail.
Actually, the FP model proves the feasibility of backward swimming for a carangiform robot, and shows that, if we can find gaits that move the FP near the tail, the robot may swim backward. However, it is quite difficult to determine the position of the FP with accuracy using only the model. Therefore, to find a suitable body wave or CPG controller for our robotic fish to swim backward, we found it necessary to carry out some experiments with the real robot. In the following section, we first develop an automated optimization platform for the speed optimization, and, guided by the theoretical analysis, we optimize the control parameters for our robot to swim backward based on PSO.
Experimental platform
According to the above theoretical analysis, backward swimming for a robotic fish is feasible. Thus, in this section, we develop an experimental platform that uses the PSO algorithm to find the control parameters that make the fish swim backward. First, we build a basic experimental platform, including the hardware and software system. We further introduce how to apply the PSO algorithm to find CPG parameters that enable our robotic fish to swim backward as fast as it can.
Test platform
We set up a test platform to find the backward swimming gaits for our robotic fish. The testbed for the experiments consisted of four parts: an upper computer, a wireless transmitter, a global view camera and a swimming tank (see Figure 6). The swimming tank was 300 × 200 cm, with a water height of around 20 cm. A global view camera was equipped above the swimming tank to record videos with a resolution of 800 × 600 pixels and a depth of 8 bit per pixel in real-time.
In the experiments, the upper computer acquires the video data from the camera at 25 fps and calculates the robotic locomotion. After acquiring the information, the upper computer updates the CPG parameters and sends these parameters to the robotic fish via the wireless transmitter. In order to optimize automatically, a software platform wass also developed to provide a user-friendly interface to deal with all the processes of backward swimming optimization, including sending control parameters, handling pattern recognition and updating algorithm optimization. Pattern recognition is vital for our parameter search, since it is used to acquire both the speed and position of robotic fish. In order to do the online tracking, we simply tracked the rigid head instead of the whole deformable robotic fish. A detailed introduction to the test platform we adopted here can be found in Shao and Xie. 38

Experimental Platform.
The particle swarm optimization algorithm
To find the suitable parameters that enable the robotic fish to swim backward, we applied an evolutionary computation algorithm, PSO, to update the CPG control parameters. PSO was first presented by Kennedy and Eberhart in 1995. 39 In 1998, in order to overcome local convergence in PSO, Shi et al. proposed a modified PSO algorithm with an inertia weight that plays the role of balancing the global and the local search ability. 40 Until now, because PSO is simple and powerful, it has been researched and used in many fields, for example in the analysis of human optimization, in examining the metal removal operation in manufacturing environments and in multi-dimensional optimization.
In this article, PSO with inertia weight is applied for the optimization of the backward swimming speed of a a carangiform fish, and this algorithm is described as
where a1 and a2 are two positive constants, and rand1i and rand2i are two random coefficients in the range of [0, 1]. The subscript i denotes the i th particle.
The PSO algorithm is simple but powerful, and it can be easily applied to and implemented in engineering. Before optimization, we only need to initialize ωp, a1 and a2. Moreover, the fitness, as the optimal object, can correlate with whichever variable in the physical system requires optimization. During the optimization, fitness determines which position of the particle is the personal best (
Experimental system
Since the locomotion of robotic fish is controlled by the CPG, we define the position of particle in the PSO algorithm as CPG control parameters [R1, R2, R3, ϕ12, ϕ13, v]. The velocity of each particle represents the variation of each group of CPG parameters. Considering both the guidance of theoretical analysis and the physical limitations for each particle, the parameter spaces for all the particles are bounded. Table 2 presents the thresholds of the PSO parameters. Moreover, similarly to the limited movement abilities of animals in nature, there are maximum and minimum velocities for these particles. Thresholds of particle velocities in this algorithm are also given in Table 3.
Thresholds of the CPG parameters.
Maximum and minimum speed of particles
Figure 7 shows a flowchart illustrating how PSO is applied in our experimental platform to find the backward swimming gaits for the robotic fish. Two loops are included in this optimization. One is the inner loop for each particle during one generation, and the other is the outer loop for a swarm of particles in one generation. After each outer loop we will get the real swimming speed for each particle, and

Flowchart of the PSO algorithm used in the experiments.
Results
A PSO algorithm with 10 particles was applied to find the CPG parameters for the maximum backward speed. The initialization of the positions was random. The optimization stopped when the number of iterations reached the maximum, or the FP was close enough to the fish tail tip that the fish swam fastest according to the FP model. Here, in order to fully optimize the gaits, we neglect this stop condition.
According to (15) and (16), besides the random initialization of particle positions and speeds, parameters ωp, a1 and a2 also play important roles during the optimization. Since we prefer that particles have more ability of exploration when started, and converge quickly when close to the goal, ωp is chosen as a simple function of iteration
where ωp(i) represents the particles’ inertial value in the i th iteration, and Itermax is the maximum number of iterations, set as 25 in this experiment. To ensure the algorithm converges quickly, parameters ω p max , ω p min , a1 and a2 are initialized at 0.8, 0.1, 1.5 and 2.0, according to the analysis of Shi et al. and Clerc. 40,41
In order to improve the performance of the PSO algorithm, an experiment with 10 particles was designed to find the CPG parameters for backward swimming. The random initialization and experiment results are shown in Table 4 and Figure 8, respectively. Several backward swimming gaits are found as the global best fitness, shown by the red solid line in Figure 8. The maximum backward speed achieved was 0.124 m/s (about 0.31 BL/s). Figure 9 shows comparisons between the experiments and modelling for several backward swimming gaits. Although there are some differences between the experiments and modelling, the trend that the fish swims backward faster when the FP is larger agrees with the prediction of the model. Therefore, the experiments verify the effectiveness of the modelling. A group of snapshots of the robotic fish swimming backward at these parameters is shown in Figure 10. Results prove that there are less CPG parameters that make the robot swim backward, which explains why this mode cannot be found through ‘cut and try’ methods. The corresponding CPG parameters are [R1, R2, R3, ϕ12, ϕ13, v] = [ 0.79, 0.23, 0.44, −0.93, −1.9, 1.6]. All these parameters show that backward swimming needs a large FP. And the larger the FP, the faster the backward swimming. Moreover, as the optimal CPG lag angles are negative, the body envelope of the robotic fish’s backward swimming is essentially the opposite of that of forward swimming. All these experimental results correspond with the conclusion of the FP model that the fish reaches maximum backward swimming speed when the FP is located near the tail.
PSO algorithm initialization with 10 particles.

PSO algorithm with 10 particles and a limit of 25 iterations. Each ∗, in varying colours, represents a different particle in the PSO. The fitness value of each iteration is connected with the red line. The blue dash line is the 1 st particle over 25 th iterations. The ∗ s in iteration 0 represent the actual swimming speeds of the particles given the initial CPG parameters described in Table 4.

Comparisons between experiments and simulations for different FPs.

Snapshots of robotic fish swimming backward at maximal speed. The time step between the snapshots is 0.5 s.
There are several notes concerning this experimental optimization. With each initialization of PSO parameters, five repeat experiments were performed in order to reduce accidental errors. The maximum backward swimming speed was defined as the average value of these five experiments. In order to decrease the mechanical and battery induced discrepancy, all the experiments were performed on the same robotic fish with at least 80 percent of battery power. Considering the processes of acceleration and deceleration, the speeds of the robotic fish (the fitness in the PSO) are calculated 10 s after (before) the robotic fish started (stopped). Due to the limitations of actual robotic fish, such as mechanical wear and battery aging, optimizations of the 10 particles were performed in the real robot within 25 iterations. One may find faster backward speeds using the experimental platform with more particles and iterations.
Discussion and conclusion
Through theoretical analysis and experimental optimization, we proved and verified the possibility of backward swimming for a carangiform robot. The theoretical analysis was based on the novel hydrodynamic FP model. In order to find the backward swimming gaits for the physical robot and verify the hypothesis of the model, we carried out a series of experiments on our robot and found a backward swimming gait with a maximum velocity of 0.31 BL/s. The corresponding Reynolds number based on the body length (BL) and the dynamic viscosity ν of water at 30 C is Re = UL/ν = 78, 700, which is the same number as when the robot swims forward with the same speed. 42 The corresponding Strouhal number is St = fA/U = 1.6 · 0.02/0.31 = 0.1032. The Strouhal number of robot swimming forward at the same speed is evaluated at around St = 0.08. This deviation may be due to the differences of the drag coefficients between forward and backward swimming. When the fish swims forward, the wider rigid head determines the drag coefficient, which is larger than the coefficient when the fish swims backward. Additionally, the head shaking during the fish swimming forward may also cause a higher coefficient for robot swimming forward.
In this article, to find suitable backward swimming gaits, we carried out a feasibility analysis by both modelling and experimental optimization. These two methods supplement each other. The FP-based model proves the feasibility of backward swimming gaits for our robotic fish, and concludes that the FP determines backward swimming performance. Nevertheless, because this model needs FP locomotion before evaluating the swimming speed of robotic fish, we can hardly acquire the backward swimming gaits through this model. While, for the experiments, a stop condition for PSO usually results in a small deviation between the last two steps, this is invalid for the optimization of backward swimming gaits. The control parameter space is so small that the backward swimming speed cannot be improved after several steps (as shown in Figure 8). However, through the relationship between the FP and backward swimming, we find that whenever the FP moves to the end of the tail, the maximum backward swimming speed is achieved. Therefore, the parameter optimization experiments are guided by the theoretical analysis.
Although the backward swimming speed evaluated through the FP model is slightly different from the experimental one, the key feature of backward swimming, that the FP is located in the tail tip when fish swims backward, is definitely the same. The deviations between the experiments and modelling (as shown in Figure 9) may be due to the parameter evaluation in the modelling. For example, the virtual masses for the flapping caudal fin and fish head are time-varying, because of the undulating body. Moreover, the FP model is based on EBT, which ignores the viscosity force, thus resulting in possible deviations. Nonetheless, the trends for both experiments and modelling are the same, thus verifying the effectiveness of the proposal that the larger the FP, the faster the backward swimming speed.
In contrast, natural carangiform fish swim backward mostly by pectoral fin flapping. The reason why natural carangiform fish do not swim backward through body undulation may lie in the high energy cost of that swimming gait. In addition, some natural fish, such as the eel, can also undulate their body to swim backward. The two main features of backward swimming in anguilliform fish are that these fish endowed with large amplitude and high frequency undulations. 27 However, our robotic fish only needs small amplitude and moderate frequency. This may result from the different structures between anguilliform and carangiform fish.
Our research will be extended in several directions in the future. First, in order to further improve the maneuverability of the robot, turning will be integrated into the backward swimming of the robotic fish. Second, the proposed architecture will be applied in developing other swimming patterns, such as C-start and minor-radius turning. Finally, we will add some onboard sensors to our robotic fish; thus the robot will accomplish special tasks in some narrow spaces autonomously. For instance, this robotic fish could be applied to the crack detection in under-sea oil pipelines after being equipped with a crack detection device.
Footnotes
Acknowledgement
We would like to acknowledge Stephen Lang for polishing the article.
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship and/or publication of this article: This work was supported by the National Natural Science Foundation of China (NSFC, grant numbers 51575005, 61503008, 61633002) and the China Postdoctoral Science Foundation (grant numbers 2015M570013, 2016T90016).
