Turning control of a 3-Joint carangiform fish robot using sliding mode based controllers

The fish robot is a new type of biomimetic underwater robot which is developing very fast in recent years by many researchers. Because it moves silently, saves energy, and is flexible in its operation in comparison to other kinds of underwater robots, such as Remotely Operated Vehicles (ROVs) or Autonomous Underwater Vehicles (AUVs). In this paper, we propose an efficient advanced controller that runs well in controlling the motion for our fish robot. First, we derive a new dynamic model of a 3-joint (4 links) Carangiform fish robot. The dynamic model also addresses the heading angle of a fish robot, which is not often covered in other research. Second, we present a Sliding Mode Controller (SMC) and a Fuzzy Sliding Mode Controller (FSMC) to the straight motion and turning motion of a fish robot. Then, in order to prove the effectiveness of the SMC and FSMC, we conduct some numerical simulations to show the feasibility or the advantage of these proposed controllers.


INTRODUCTION
Generally, researches about underwater propulsion mainly depend on the use of propellers or thrusters to generate the motion for objects in underwater environments.However, most marine animals use the undulation of their body shape, as well as oscillation of their tail fins, to generate propulsive force.The changing of body shape generates propulsion to make the object move forward or backward effectively.The Carangiform-type fish is a kind of changing body shape that creates motion in the underwater environment.
George V. Lauder and Eliot G. Drucker thoroughly surveyed and analyzed the motion mechanisms of fish fins in order to develop such a successful underwater robot system [1].M. J. Lighthill also surveyed the hydromechanics of aquatic animal propulsion because of many kinds of underwater animals whose motion mechanisms evolved throughout many generations to adapt to the harsh underwater environment [2].Iman Borazjani and Fotis Sotiropoulos introduced a numerical investigation of the hydrodynamics of Carangiform swimming in the transitional and flow regimes [3].They employed numerical simulation to investigate the hydrodynamics of Carangiform locomotion, including the relative magnitudes of the viscous and inertial forces, i.e. the Reynolds number (Re) and the tail-beat frequency or Strouhal number (St), which were systematically varied [3].Guo Jenhwa developed a measurement strategy for a biomimetic autonomous underwater vehicle (BAUV) in order to reduce positioning uncertainties while the BAUV was controlled to reach a target efficiently [4].The BAUV plays the role of a Trang target tracker and can swing its pectoral fins to adjust its direction when searching for a target; the BAUV oscillates its tail fin to move forward to the target [4].Also, K. H. Low et al. [5] discussed design mechanisms, the planar serial chain mechanism, and the parallel mechanism in their report of a gait study of biomimetic fish robots using either mechanism.In addition, the authors also discussed the gait functions for the two forms of biomimetic fish robots [5].
Other research focuses on the heading control problem of fish robots or related underwater robot types.Some of the intelligent controllers were proposed by many researchers.Jenhwa Guo used Genetic Algorithms to find the body spline parameter values of a fish robot.He then developed a control law that satisfies the Lyapunov function in the heading control of a BAUV [6].J. Guo et al. also used a combination of Fuzzy logic and Genetic Algorithms for the heading control of another kind of autonomous underwater robot [7].One of the most popular intelligent controllers used for motion control of fish robots is the Central Pattern Generator (CPG).This CPG controller was used by Long Wang et al. [8], Daisy Lachat et al. [9], and Wei Zhao et al. [10] for their fish robots.Another type of controller, called a hybrid controller, is also used in the motion control of fish robots.This type of controller is proposed by Jindong Liu et al [11].However, all the studies discussed above are based on simplified dynamic models or experiments involving fish robots.Besides, there are not many applications of Sliding Mode Controllers used in fish robot.Most uses of Sliding Mode Controllers are in the fields of other robotics [12,13], mechanical system [14,15], or motor control [16,17].
In this paper, we considered a 3-joint (4-link) Carangiform fish robot type.The dynamic model of this robot was derived using the Lagrange method.The influences of fluid force on the motion of the fish robot are also considered, based on M. J. Lighthill's Carangiform propulsion [18].The Singular Value Decomposition (SVD) algorithm is also used in our simulation program to minimize the divergence of the fish robot's links when simulating operation in an underwater environment.The dynamic model of the fish robot in this paper is analyzed, including the heading angle's motion of the fish robot.This concept differs from the kinematic equation proposed by M. J. Lighthill [18], in which that the body-spline takes the form of a traveling wave.With this kind of dynamic equation, we can analyze more precisely the turning and heading angles of fish robots when considering their operation in underwater environment.
The main goal of this paper is the introduction of a new dynamic analysis concept.Normally, the head and body of the Carangiform fish robot is supposed to be rigid, and these undulate as they swim.However, there is no method to express the heading angle of a fish robot at each sampling time of operation.Therefore, in our dynamic analysis approach, we consider the heading angle of the fish robot's head-body part.With this method, we can easily recognize the heading angle of the fish robot at each sampling time during operation, which is also helpful when researching the turning motion of the fish robot.The second point of this paper is that we propose a SMC and a FSMC controllers to design the straight motion and turning motion controllers for a fish robot.The FSMC provides excellent performance in both straight and turning control of a fish robot in comparison to the SMC for fish robot.

Figure. 1 Carangiform locomotion style
In our fish robot, we focus mainly on the Carangiform fish type because of its fast swimming characteristics, which resemble mackerel or trout.The Carangiform fish type has a large tail with a high aspect ratio.The movement of this fish requires powerful muscles that generate side-to-side motion in the posterior part.Also, the anterior part of the fish robot undulates while operating, as shown in Fig.

above.
We design a 3-joint (4 links) fish robot in order to get smoother and more natural motion.The analytical model of the fish robot is shown in Fig. 2. In this figure, the head and body of the Trang 16 fish robot (link0) are supposed to be a rigid part and undulate during the analysis process.The force distribution on the fish robot is presented in Fig. 3. F F is the thrust force component at the tail fin, F C is the lateral force component, and F D is the drag force resulting from the motion of the fish robot.The calculation of these forces, including , , , , F F F F F , and the attack angle a , is similar to that of our previous research [20].
By using Lagrange's method, the dynamic model of the fish robot is described briefly by Eq. (1).By solving Eq. ( 1), we can determine the values of i q and i q & (i = 0  3).The motion equation of the fish robot is expressed in Eq. ( 2).

G
x & & is the acceleration of the fish robot's centroid position, m is the total weight of the fish robot in water, F F is the propulsion force that pushes the fish robot forward, and F D is the drag

Trang 17
force caused by the friction between the fish robot and the surrounding environment when the fish robot swims.
The calculation of F D is presented in Eq. ( 3) where r is the mass density of water, V is the velocity of the fish robot relative to the water flow, D C is the drag coefficient, and S is the area of the main body of the fish robot, which is projected on the perpendicular plane of the flow.
The values of all parameters in Eqs.(2)(3) are referred to in our previous research [20].

SLIDING MODE BASED CONTROLLERS
In this section, a SMC and a FSMC are proposed to make a fish robot to follow a straight path with a predefined heading angle or to turn toward a heading direction with a desired turning angle.

The Sliding Mode Controller Design
The SMC system for heading and turning control of the fish robot is introduced in Fig. 4.
In the heading and turning control of a fish robot, we consider only the yaw angle of the fish robot.
Let: G : Fish robot yaw rate heading angle From Eq. ( 4) and Eq. ( 5), we have: We then calculate the average error during the relevant time: The sliding surface, s , is defined, as follow: where l is a positive coefficient of e .Then, s& is calculated, as follow: The sliding mode control input is described by: eq s u u u =+ (10) where we choose s u as in Eq. ( 11), and 0 h >  ( ) Thus, the control signal u becomes: To prove the convergence of the sliding mode, we consider the derivative of the distance of the point from the sliding mode  16) Eq. ( 16) shows that V & is always negative, so that the system is asymptotically stable.Therefore, the control signal, u , as introduced in Eq. ( 13) can be applied to the heading and turning control of the fish robot.However, the disadvantage of the SMC is that the discontinuous in the control signal causes chattering.There are many methods used to reduce the chattering phenomenon, like changing the saturation function.In our fish robot, we use the combination of Sliding Mode Control and Fuzzy Logic Control (FLC) to design the direction controller for fish robot.Based on the discrete value of s and ds , the FLC will calculate the suitable value of the control signal u .The principle of FSMC is introduced in Fig. 5 above.The equations of the FSMC are presented briefly in Eqs.(17 -22).

( ) (
) For the FLC, the number linguistic terms for each linguistic variable are three for two inputs and five for one output.The three linguistic variables of s and ds are N (Negative), ZE (Zero) and P (Positive).The five linguistic variables of u are NB (Negative Big), NS (Negative Small), ZE (Zero), PS (Positive Small) and PB (Positive Big).The triangle-type membership function is chosen for the system.The center of gravity method is chosen as the defuzzification method.A total of nine rules are applied to the Fuzzy controller.

SIMULATION RESULTS
For simulation, we consider that the total length of the fish robot is about 450 mm, including 3 links and the tail fin.Two external input torques are applied to joint1 and joint2 of the fish robot to generate propulsion.The head and body of fish robot are supposed to be one rigid part (link0) which is connected to link1 by active RC motor1 (joint1).Then, link1 and link2 are connected by active RC motor2 (joint2).Lastly, link3 (lunate shape tail fin) is jointed into link2 (joint3) by two extension flexible springs in order to imitate the smooth motion of real fish.The stiffness value of each spring is about 100Nm.Total weight of the fish robot (in air) is about 5 kg.Simulations are performed to evaluate the tracking performance to follow straight paths with a heading angle and angular paths with a turning angle.The desired heading angles for the fish robot are selected as 30 degrees and 60 degrees, and the same angles are selected for the case of the turning angle.
In the simulation, we consider two kinds of input disturbances for the flow velocity to check the robustness of the controllers.The first is the continuous disturbance, c w , as expressed in Eq. ( 23) [21].The disturbance impacts the fish robot   In both straight motion mode and turning motion mode, the direction control of the fish robot is necessary to recover the tracking error.The change of direction can be achieved by oscillating each link that is operated by the corresponding input torque at each joint.Fig. 6 shows examples of direction changes of the fish robot for the CW or CCW direction.

Tracking Control using the SMC
The principle of the SMC is introduced in Fig. 4, and the control signal is presented as Eq. ( 13) above.Figure 7a presents the tracking performance of the fish robot, in which the head of the robot should follow a straight path with a heading angle of 30 0 .The graph in Fig. 7a shows that the fish robot follows the path with an error less than 1 degree, and the sum square error during the whole period of operation (60 seconds) is measured as 0.33 0 .Fig. 7b shows the flow velocity with the disturbance that affects the original SMC control system.b.Applied flow disturbance.
Fig. 8 shows the direction control result for the heading angle of 60 degrees, in which the fish robot follows the path with an error also less than 1 degree, and the sum square error during the whole simulated time is 0.37 0 .The above two simulations exemplify that the SMC provides quite robustness, as well as satisfactory tracking performance, even in the flow disturbance environment.

Tracking Control using the FSMC
The principle of the FSMC is introduced in Fig. 5.This section discusses the application of FSMC to controlling the heading motion for fish robot.The testing values of desired heading angle or desired yaw angle are also selected of 30 degrees and 60 degrees, respectively.The results are introduced in Fig. 9 and Fig. 10.These figures describe the performance of fish robot's motion when applying the FSMC to the heading control.These figures show that, even though the influences of flow disturbances are also considered, the motion of the fish robot is quite good and stable.The sum square errors when using this controller are measured as 0.24 0 for testing with desired heading angle equal to both 30 degrees and 60 degrees.From these results, the performances of the fish robot's heading angle are better when testing with the FSMC than when using the SMC.The sum square errors when using FSMC are also smaller than when using the SMC.Therefore, the FSMC is better than the SMC in controlling the straight motion of the fish robot.From the performances of fish robot in the figures above, the SMC and FSMC are quite robust controllers in the heading control problem of the fish robot.

Tracking Control for Turning Motion
In this turning mode, the controller controls turns of the fish robot with the desired turning angle.After the fish robot reaches the desired turning angle, it swims straight with the desired heading angle or desired yaw angle, which is equal to the value of the turning angle.The desired turning angles to test the controllers are 30 degrees and 60 degrees.The fish robot is controlled to start turning from 0 degree to the desired turning angle.The time required for the SMC to turn the fish robot to the desired turning angles are about 1.9 seconds for turning of 30 degrees and about 2.3 seconds for 60 degrees.The steady state errors in this motion are 1.98 0 for a turn of 30 degrees and 1.29 0 for a turn of 60 degrees.The testing of the FSMC in turning motion is also conducted similar to that for the previous controller.The desired heading angle, b , in Fig. 5 is substituted by the desired turning angle, b .The performance of the fish robot in turning mode of 30 degrees and 60 degrees are presented in Figs. 13 and 14, respectively.The time required for the FSMC to turn the fish robot to the desire turning angle is about 1.82 seconds and 2.2 seconds for 30 degrees and 60 degrees,  When applying the FSMC in this motion, the fish robot also performs a little better than when applying the SMC.Also, the error of the fish robot is quite small.Therefore, the SMC and FSMC are good controllers for the turning motion of the fish robot.

CONCLUSION
This paper presents a model of a 3-joint Carangiform fish robot.From this type of fish robot, a new dynamic model is derived using Lagrange's method.This type of dynamic also includes the motion of the head and body of the fish robot, a characteristic difference between this dynamic analysis and other conventional analyses of the dynamics of Carangiform fish robots.The influence of the fluid forces exerted on the motion of the fish robot in underwater environment is also considered in the dynamic model by using the concept of M. J. Lighthill's Carangiform propulsion.Moreover, the SVD algorithm is also used in our simulation program as an effective method to reduce the divergence of the fish robot links' movement when solving the matrix of the dynamic model.
In this paper, the SMC and FSMC are also good for turning motion control for fish robot.Besides, both the SMC and FSMC are quite simple controllers, but they are highly effective in controlling motion problems for the fish robot.Besides, some experiments will be carried out in the near future to check the agreement between the simulation results and the experimental results.

Figure 2 .
Figure2.Fish robot analytical model T 1 and T 2 are the input torques at joint 1 and joint 2, respectively, which are generated by two active DC motors.We assume that the inertial fluid force, F V , and the lift force, F J , act on the

Figure 3 .
Figure 3. Forces distribution on the fish robot.

Figure 5 .
Figure 5. FSMC controller system kind of sudden disturbance also impacts the flow velocity at some arbitrary sampling times while the fish robot is swimming.

(Figure. 6
Figure.6 Turning motion of a fish robot in counterclockwise (CCW) and clockwise (CW) directions.

Figure. 12
Figure. 12 a.Turning control performance of the SMC (desired turning angle=60 0 ).b. Applied flow disturbance.The principle of the SMC is exactly the same as the case of straight motion expressed in Fig. 4. The only difference is that the desired heading angle, b , is changed to the desired turning angle, b .The simulation results for turning angles of 30 degrees and 60 degrees are shown in Figs.11 and 12.The fish robot performs quite well with the SMC.
This research is funded by Viet Nam National University Ho Chi Minh City (VNU-HCM) under Grant numberB- 2013-20-01.