Optimization of the Kinematic Model for Biomimetic Robotic Fish with Rigid Headshaking Mitigation

Biomimetic robotic fish is a new type of underwater robot with many superior characteristics such as high movement speed, high motion efficiency, high energy efficiency, and so on. However, the traditional kinematic model for biomimetic robotic fish has many shortcomings which limit their movement speed, such as the rigid shakes of the fish’s head when it swims, which is caused by neglecting the influences of manufacturing process on the model. In order to mitigate the rigid headshaking, a revised kinematic model is proposed by introducing an offset of the joints rotation center. The proposed kinematic equations are well simulated in a MATLAB environment, and the numerical results illustrate the advantage of the new kinematic model. Finally, experimental results generated from a three-joint biomimetic robotic fish with the proposed model show that the fish’s head shaking is effectively restrained, and therefore the swimming speed is significantly improved.


Introduction
Biomimetic robotic fish have become a hot spot in underwater robots research, and indeed, the attention on it has been growing recently with a large body of literature.This growing trend is attributed to the advantages, such as high speed and efficiency, long duration of working time, wide working areas, and being available to adapt to various working conditions [1].At present, the research achievements of robotic fish are mainly focused on control methods [2], manufacture materials, multifish collaboration [3], mechanical structure [4], and so on.For instance, to improve the control method of delete biomimetic robotic fish, the Central Pattern Generator (CPG) model is applied to improve swimming accuracy [5][6][7].An algorithm of improving the biomimetic robotic fish path planning is to transplant the existing land robot path planning algorithm [8][9][10].In order to improve its swimming speed, optimization on the shape of biomimetic robotic fish tail fin is presented in [11].However, few works have optimized the kinematic model of biomimetic robotic fish, and the kinematic model of biomimetic carangiform robotic fish commonly uses the slender body theory proposed by Lighthill [12].But the theory is summarized by extracting the real fish swimming curve.Meanwhile, the biomimetic robotic fish structure cannot be made exactly as the real fish due to the limitation of production accuracy, manufacturing materials, and center of gravity configuration, which will cause the rigid, robotic, shaking of the fish's head in the process of swimming.Therefore, the headshaking problem is considered in this paper and the kinematic model is optimized by introducing the offset of the joints rotation center.The traditional kinematic model doesn't consider the biomimetic robotic fish headshaking, and the model isn't an accurate description of the fish motion curve.But the proposed Robotics 2017, 6, 30 2 of 13 kinematic model is obtained by subtracting the headshaking equation from the traditional kinematic model and adding the offset of the joints' rotation center.Finally, the traditional model is compared with the proposed model through experiments.The experimental results show that the proposed model has the following two outstanding advantages: The first point is to better simulate the fish movement curve by decreasing the biomimetic robotic fish head swinging.The second point is to improve the swimming velocity of the biomimetic robotic fish by adopting the proposed model to reduce the fluid resistance.The third point is to improve the endurance time of the biomimetic robotic fish by using the new kinematic model.

Biological Model of Biomimetic Robotic Fish and Its Coordinate System
In order to investigate the biomimetic robotic fish kinematic model on different postures, it is necessary to make a simple classification for the kinematic model, because kinematics models are independent in different motion modes.According to the fish swimming characteristics, the swimming patterns are divided into three basic types [13]: parade mode, cruise turning, and C-sharp turning.In this paper, the parade model is studied and a new kinematic model is proposed.
Along the biomimetic robotic fish body direction, the body thickness is symmetrically and evenly distributed.In order to study the kinematic model and its geometric relationship when the biomimetic robotic fish is swimming, the symmetrical center line of the fish body is taken into account.While the biomimetic robotic fish is swimming on steady state, it can be simplified as a physical model as shown in Figure 1.
doesn't consider the biomimetic robotic fish headshaking, and the model isn't an accurate description of the fish motion curve.But the proposed kinematic model is obtained by subtracting the headshaking equation from the traditional kinematic model and adding the offset of the joints' rotation center.Finally, the traditional model is compared with the proposed model through experiments.The experimental results show that the proposed model has the following two outstanding advantages: The first point is to better simulate the fish movement curve by decreasing the biomimetic robotic fish head swinging.The second point is to improve the swimming velocity of the biomimetic robotic fish by adopting the proposed model to reduce the fluid resistance.The third point is to improve the endurance time of the biomimetic robotic fish by using the new kinematic model.

Biological Model of Biomimetic Robotic Fish and Its Coordinate System
In order to investigate the biomimetic robotic fish kinematic model on different postures, it is necessary to make a simple classification for the kinematic model, because kinematics models are independent in different motion modes.According to the fish swimming characteristics, the swimming patterns are divided into three basic types [13]: parade mode, cruise turning, and C-sharp turning.In this paper, the parade model is studied and a new kinematic model is proposed.
Along the biomimetic robotic fish body direction, the body thickness is symmetrically and evenly distributed.In order to study the kinematic model and its geometric relationship when the biomimetic robotic fish is swimming, the symmetrical center line of the fish body is taken into account.While the biomimetic robotic fish is swimming on steady state, it can be simplified as a physical model as shown in Figure 1.In this model, the fish body is simplified into an infinitely soft two-dimensional spline curve, which coincides with the symmetry centerline of the body.The caudal fins are simplified as rigid wave plates and rotate around their own shafts, meanwhile move ahead together with the fish body [14,15].The head is simplified into a rigid straight line, connected to the fish spline curve, and the connection point is the starting point of the fish movement wave [16].Taking the connection point of the head and the trunk rotation part 1 O as the origin point, and create a fixed coordinate system, named 1 R , the opposite direction of the X axis always points to the direction of the biomimetic robotic fish movement.Similarly, in order to facilitate the further study, we establish a body coordinate system 2 R with the connection point 1 O as the origin point.In the coordinate system, the opposite direction of the X axis is always directed to the fish head.In this model, the fish body is simplified into an infinitely soft two-dimensional spline curve, which coincides with the symmetry centerline of the body.The caudal fins are simplified as rigid wave plates and rotate around their own shafts, meanwhile move ahead together with the fish body [14,15].The head is simplified into a rigid straight line, connected to the fish spline curve, and the connection point is the starting point of the fish movement wave [16].Taking the connection point of the head and the trunk rotation part O 1 as the origin point, and create a fixed coordinate system, named R 1 , the opposite direction of the X axis always points to the direction of the biomimetic robotic fish movement.Similarly, in order to facilitate the further study, we establish a body coordinate system R 2 with the connection point O 1 as the origin point.In the coordinate system, the opposite direction of the X axis is always directed to the fish head.

Analysis of Kinematics Model
Most existing kinematic models used by carangiform fish mostly adopt the slender body theory proposed by Lighthill [12].According to the theory, the fish wave in the R 1 coordinate system is a traveling wave system with a gradually increasing amplitude, which can be approximated by the composition of a polynomial and a sinusoidal curve: where f B (x, t) is the lateral position of the fish, c 1 is the primary coefficient of the fish wave envelope, c 2 is the quadratic term coefficient of the fish wave envelope, k is the number of fish waves (k = 2π/λ, λ is the wavelength of the fish body), ω is the frequency of the fish wave (ω = 2π f = 2π/T).
The proposed model can be used to control the swimming of an ideal fish, and the fish head can accurately maintain the swimming direction without swinging along both sides of the center line.However, due to various aspects of biomimetic robotic fish: manufacturing process, proportion of fish configuration, inertia and reaction force, the biomimetic robotic fish head will not remain steady, as it will shake a little on both sides of its centerline.The headshaking caused by inertia and reaction forces can be actively suppressed by a real fish's own body, but the robotic fish do not have this function.Therefore, the headshaking during the swimming process is a common problem in the production of biomimetic robotic fish.It cannot be eliminated completely, but the shaking amplitude can be reduced as much as possible [17,18].The shaking center is different depending on the body proportions of the different robotic fish prototypes.Although the locations have nuanced difference, hey are generally distributed on the left and right sides of O 1 which is the connecting point of the head and tail movement joints.Only when the body structure is ideal that the head and tail movement joint proportion is similar to that of a real fish the rotation center could be exact O 1 .When the head weight is greater than the tail movement joints, the center of the whole biomimetic robotic fish moves forward, and the greater weight of the head will reduce more of the head swinging, thus the rotation center which is close to the head is located in front of O 1 .On the contrary, the rotation center is located in behind of O 1 and is close to the tail joint movement.Due to the reality of the headshaking, using Equation (1) to describe and control biomimetic robotic fish will not generate accurate swimming motion as would a real fish.
In order to find a more accurate kinematic model for the biomimetic robotic fish, this paper proposed a new kinematic model f T (x, t), which is based on the traditional kinematic model of biomimetic robotic fish where the headshaking is considered.The significance of establishing a new kinematic model is to restrain the robotic fish headshaking, and then to control the motion of the tail joints in the relative coordinate system (the R 2 coordinate system).Since the movements of all the robotic fish joints are based on the condition that the head is fixed and always points to the direction of motion, the motion indeed takes place in the relative coordinate system R 2 rather than the fixed coordinate system R 1 .It is now defined that the robotic fish head is the rigid connection from the nasal tip to the connection point O 1 of the movement joint and the head.Assuming that the coordinate of the head rotation point O 2 is (m,0), the movement of the head in the R 1 coordinate system can be expressed as a linear equation f H (x, t) = ax + b varying with time.The rotation center of the equation is O 2 , and the slope value a of the equation is equal to the value of taking partial derivative of body It should be noted that, due to the offset of rotation center point in the traditional model, the actual fluctuation starting point is located at point O 2 which is the rotation center, thus, the kinematic model should also be revised correspondingly.Using the equation f b (x, t) to represent the actual kinematic model: Then the kinematics model of the biomimetic robotic fish considering the headshaking is equal to f b (x, t) minus the headshaking equation f H (x, t), as: Substituting Equations ( 2) and (4) to Equation ( 4), one has: The values of c 1 and c 2 are related to the body size, velocity of movement, and the posture of the robotic fish.By adjusting the amplitude of the envelope c 1 , c 2 value, the shaking amplitude of the robotic fish tail motion can be controlled, meanwhile, their values will also affect the body wave amplitude.Through the biological studies we can see that the shaking amplitude of the tail motion joint is 0.075~0.1 times of the body length, and usually the fish wave wavelength is λ ≥ 1L B , so the fish wave number is k = 2π/λ ≤ 2π/L B [19,20].
In this paper, the three-joint biomimetic robotic fish is designed and manufactured as an experimental prototype.Since the key control units are distributed in the robotic fish head, the center of gravity should be moved forward, and the center of shaking should be in front of the connection point.Experiments have been carried out on the prototype, and the shaking center of the fish head is consistent with the theory.The coordinate of the shaking center O 2 is (−0.01,0) ahead of the connection point.The parameters used in this paper are assumed as c 1 = 0.05, c 2 = 0.03, k = 8, ω = −2π/9, m = −0.01.Using the same parameters, we plot a set of curves of the traditional kinematic model f B (x, t) of the biomimetic robotic fish by MATLAB shown by the red dash line in Figure 2a, while the curve cluster of the new kinematic model f T (x, t) is shown in Figure 2a with blue solid line.Figure 2b is a zoom in view of the traditional kinematic model and the new kinematic model curves around convergence point.It can be seen that the starting point of the new kinematic model curve cluster is on the left of the zero point, which is located on the negative axis.The curve ahead of the starting point is a straight line compared with the starting point of the traditional model curve cluster.This is consistent with the previous analysis.
In order to further compare the difference of the performance between the new model and the traditional model, we present the curves in Figure 3a-d, respectively, for t = 2, t = 4, t = 6 and t = 8.One can see that in the case of the same parameters, the new model restrains the curve ahead of the starting point of the fluctuation into a straight line, and the amplitude of each particle in the new model is larger than that of the traditional model.Therefore, the new model makes the motion posture closer to a real fish, and it causes swimming velocity increasing correspondingly since the wave amplitude increases.
Due to technical limitations, robotic fish cannot be infinitely flexible at present, but instead of flexible curves it can be approximated by finite rigid joints.Therefore, the curve fitting method is used.We use numerical approximation method to fit the motion curve of the proposed new kinematic model.The method firstly divides the proposed model body wave motion equation of the biomimetic robotic fish into N movements with time varying as F T (x, i)(i = 0 . . . . . .N).In Figure 4, θ i,j (i = 0...M -1, j = 1...3) is the slip angle of each joint relative to the horizontal line, φ i,j (i = 0...M -1, j = 1...3) is the rotation angle, which the individual joint of the biomimetic robotic fish need to be rotated, that is, the deflection angle of the back joint relative to the front joint.The angle of the joint is achieved by controlling the angle of the steering gear.In order to further compare the difference of the performance between the new model and the traditional model, we present the curves in Figure 3a-d    It can be seen that the use of new models helps to suppress the head of the shock; (c) 6 t = , When 6 t = , the red line is a motion curve using the traditional model, the blue line is a motion curve using the new model.It can be seen that the use of new models helps to suppress the head of the shock; (d) 8 t = , When 8 t = , the red line is a motion curve using the traditional model, the blue line is a motion curve using the new model.It can be seen that the use of new models helps to suppress the head of the shock.(a) t = 2, when t = 2, the red line is a motion curve using the traditional model, the blue line is a motion curve using the new model.It can be seen that the use of new models helps to suppress the head of the shock; (b) t = 4, when t = 4, the red line is a motion curve using the traditional model, the blue line is a motion curve using the new model.It can be seen that the use of new models helps to suppress the head of the shock; (c) t = 6, when t = 6, the red line is a motion curve using the traditional model, the blue line is a motion curve using the new model.It can be seen that the use of new models helps to suppress the head of the shock; (d) t = 8, when t = 8, the red line is a motion curve using the traditional model, the blue line is a motion curve using the new model.It can be seen that the use of new models helps to suppress the head of the shock.

Experiment and Analysis
The above analysis proves the feasibility of the proposed kinematic model in theory, while the proposed model is applied to a three-joint biomimetic robotic fish for experimental verification.Figure 5 shows the physical photo of the three-joint biomimetic robotic fish prototype, which consists of four parts: the fish head, the fish body movement joint 1, the fish body movement joint 2, and the fishtail movement joint 3.
The new kinematic model proposed in this paper is compared with the traditional kinematic model on controlling performances.In the limited experimental conditions available to us but under the same conditions, we only had to change one factor and use 20 sets of experimental data as shown in Tables 1-3. Figure 6 shows the experimental pictures captured using the two kinematic modes.Under the same movement time, cruise experiments were carried out using the two models.The top three pictures in Figure 6 show the motion trajectory of the robotic fish using the traditional motion model, while the following three pictures show that using the new motion model of the robotic fish.Comparing the two sets of pictures, one can see that using the new kinematic model contributes to restraining fish headshaking effectively.Another can be seen from the red line in Figure 6.By adopting the proposed model, the biomimetic robotic fish swimming distance is longer than that of the traditional model at the same time.

Experiment and Analysis
The above analysis proves the feasibility of the proposed kinematic model in theory, while the proposed model is applied to a three-joint biomimetic robotic fish for experimental verification.Figure 5 shows the physical photo of the three-joint biomimetic robotic fish prototype, which consists of four parts: the fish head, the fish body movement joint 1, the fish body movement joint 2, and the fishtail movement joint 3.The new kinematic model proposed in this paper is compared with the traditional kinematic model on controlling performances.In the limited experimental conditions available to us but under the same conditions, we only had to change one factor and use 20 sets of experimental data as shown in Tables 1-3. Figure 6 shows the experimental pictures captured using the two kinematic modes.Under the same movement time, cruise experiments were carried out using the two models.The top three pictures in Figure 6 show the motion trajectory of the robotic fish using the traditional motion model, while the following three pictures show that using the new motion model of the robotic fish.Comparing the two sets of pictures, one can see that using the new kinematic model contributes to restraining fish headshaking effectively.Another can be seen from the red line in Figure 6.By adopting the proposed model, the biomimetic robotic fish swimming distance is longer than that of the traditional model at the same time.It can be seen from Table 1 and Figure 7 that the shaking angle ( ( ) θ °) of the fish head, which uses the new model, is smaller than that of the traditional model at the same swimming frequency ( ( ) f Hz ).When at different frequencies, the greater the frequency is, the greater the shaking angle of the head will be, and the maximum shaking angle is reduced to 86% of the angle of traditional model.Because of the hydrodynamic force acting on the fish head and the force acting on the head of the fish tail, the head sway is reduced.Table 2 and Figure 8 show the time ( ( ) t s ) required to measure the same distance ( ( ) l m ) traveled by the robotic fish when the swimming frequency is the same.It can be seen that the required time for the new model to swim the same distance is less than that of the traditional model.By calculating the velocity ( ( / ) v m s ) of the two equations with the same swimming frequency, the calculated velocity of the new model is 17% higher than that of the traditional model.Because the headshaking head can lead to the head being affected by the water resistance, this can cause a large decline due to the robotic fish swimming slow-this involves fluid mechanics knowledge, and this It can be seen from Table 1 and Figure 7 that the shaking angle (θ( • )) of the fish head, which uses the new model, is smaller than that of the traditional model at the same swimming frequency ( f (Hz)).When at different frequencies, the greater the frequency is, the greater the shaking angle of the head will be, and the maximum shaking angle is reduced to 86% of the angle of traditional model.Because of the hydrodynamic force acting on the fish head and the force acting on the head of the fish tail, the head sway is reduced.Table 2 and Figure 8 show the time (t(s)) required to measure the same distance (l(m)) traveled by the robotic fish when the swimming frequency is the same.It can be seen that the required time for the new model to swim the same distance is less than that of the traditional model.By calculating the velocity (v(m/s)) of the two equations with the same swimming frequency, the calculated velocity of the new model is 17% higher than that of the traditional model.Because the headshaking head can lead to the head being affected by the water resistance, this can cause a large decline due to the robotic fish swimming slow-this involves fluid mechanics knowledge, and this paper did not detail the relevant computational fluid dynamics.However, the experimental results prove that the new model can improve the swimming velocity of the robotic fish effectively.
It can be seen from Table 3 that the power consumption time (T(h)), which uses the new kinematic model, is longer than that of the traditional kinematic model at the same swimming frequency ( f (Hz)).By calculating the average lifetime of the robotic fish, the calculated lifetime of the new kinematic model is 18.2% longer than that of the traditional kinematic model.The above three points result in the conclusion that the theoretical results are not considered in too many practical conditions.

Conclusions
In this paper, the kinematic model of biomimetic robotic fish has been studied, and the experimental results have also been verified.The following conclusions can be drawn: Through the analysis of the biomimetic robotic fish kinematic model, the headshaking factor of the actual biomimetic robotic fish has been taken into account in the motion model, and the traditional model of the biomimetic robotic fish has been further optimized to make a new kinematic model.This model can more accurately describe the biomimetic robotic fish's swimming.After optimizing the traditional kinematic model by introducing the head swinging equation and the swinging center offset, the optimized model has been designed to accurately describe the tail movement of the biomimetic robotic fish and weaken the correlation between the head and the tail, which results in effectively restraining the head swinging.Through the simulation curves of the two models, we can

Conclusions
In this paper, the kinematic model of biomimetic robotic fish has been studied, and the experimental results have also been verified.The following conclusions can be drawn: Through the analysis of the biomimetic robotic fish kinematic model, the headshaking factor of the actual biomimetic robotic fish has been taken into account in the motion model, and the traditional model of the biomimetic robotic fish has been further optimized to make a new kinematic model.This model can more accurately describe the biomimetic robotic fish's swimming.After optimizing the traditional kinematic model by introducing the head swinging equation and the swinging center offset, the optimized model has been designed to accurately describe the tail movement of the biomimetic robotic fish and weaken the correlation between the head and the tail, which results in effectively restraining the head swinging.Through the simulation curves of the two models, we can see that the new kinematic model curve optimizes the headshaking problem, and provides a more optimized fish motion curve for the curve fitting of the joints.The kinematic model has been applied to the three-joint biomimetic robotic as a prototype, and the theoretical analysis has shown that the maximum swinging angle of the biomimetic robotic fish head is reduced to 86%.With the decreasing of the biomimetic robotic fish head swinging, the resistance of the fluid around the biomimetic robotic fish has been reduced and the swimming fluid of the biomimetic robotic has increased.Therefore, the velocity of the biomimetic robotic fish has been calculated under the same swimming frequency by being improved by 17%.The experimental data show that the fish lifetime of the new model is 18.2% more than that of the traditional model.The above is the research results of this paper.In the future, we will make a fluid dynamics analysis of the fish head, and analyze the equations of the force at the head and the swimming speed.

Figure 2 .
Figure 2. The curves of robotic fish.(a) The curves of the traditional kinematic model and the new kinematic model.Among them, the red lines are motion curves using the traditional model and the blue lines are motion curves using the new model; the red lines have been shocked in the interval [−0.2, 0]; (b) The convergence point of the two models is enlarged.Among them, the red lines are motion curves using the traditional model and the blue lines are motion curves using the new model.The coordinate of the new shaking center is ( 0.01,0) − ahead of the connection point.

Figure 2 .
Figure 2. The curves of robotic fish.(a) The curves of the traditional kinematic model and the new kinematic model.Among them, the red lines are motion curves using the traditional model and the blue lines are motion curves using the new model; the red lines have been shocked in the interval [−0.2, 0]; (b) The convergence point of the two models is enlarged.Among them, the red lines are motion curves using the traditional model and the blue lines are motion curves using the new model.The coordinate of the new shaking center is (−0.01,0) ahead of the connection point.

Figure 3 .
Figure 3. Instantaneous curve comparison.(a) 2 t = , When 2 t = , the red line is a motion curve using the traditional model, the blue line is a motion curve using the new model.It can be seen that the use of new models helps to suppress the head of the shock; (b) 4 t = , When 4 t = , the red line is a motion curve using the traditional model, the blue line is a motion curve using the new model.

Figure 3 .
Figure 3. Instantaneous curve comparison.(a)t = 2, when t = 2, the red line is a motion curve using the traditional model, the blue line is a motion curve using the new model.It can be seen that the use of new models helps to suppress the head of the shock; (b) t = 4, when t = 4, the red line is a motion curve using the traditional model, the blue line is a motion curve using the new model.It can be seen that the use of new models helps to suppress the head of the shock; (c) t = 6, when t = 6, the red line is a motion curve using the traditional model, the blue line is a motion curve using the new model.It can be seen that the use of new models helps to suppress the head of the shock; (d) t = 8, when t = 8, the red line is a motion curve using the traditional model, the blue line is a motion curve using the new model.It can be seen that the use of new models helps to suppress the head of the shock.
angle of each joint relative to the horizontal line, angle, which the individual joint of the biomimetic robotic fish need to be rotated, that is, the deflection angle of the back joint relative to the front joint.The angle of the joint is achieved by controlling the angle of the steering gear.

Figure 4 .
Figure 4.The motion curve of biomimetic robotic fish.

Figure 4 .
Figure 4.The motion curve of biomimetic robotic fish.

Figure 6 .
Figure 6.Distance comparison of robotic fish cruise experiments at the same three moments.

Figure 6 .
Figure 6.Distance comparison of robotic fish cruise experiments at the same three moments.

Figure 7 .
Figure 7. Shaking angles comparison of the headshaking experiment's curves at the same swimming frequency.

Figure 7 .
Figure 7. Shaking angles comparison of the headshaking experiment's curves at the same swimming frequency.

Figure 7 .
Shaking angles comparison of the headshaking experiment's curves at the same swimming frequency.

Figure 8 .
Figure 8.The time required to measure the same distance at the same swimming frequency.

Figure 8 .
Figure 8.The time required to measure the same distance at the same swimming frequency.

Table 1 .
Headshaking angle experiments of three-joint biomimetic robotic fish.

Table 2 .
Velocity experiments of three-joint biomimetic robotic fish.

Table 3 .
Power consumption time experiments of three-joint biomimetic robotic fish. (a)