Abstract
In this paper, a heading controller based on a self-tuning fuzzy strategy for a robotic dolphin is proposed to improve control accuracy and stability. The structure of the robotic dolphin is introduced and the turning motion is analysed. The analytic model indicates that the turning joint angle can be employed for the heading control. This non-linear model prevents the successful application of traditional model-based controllers. A fuzzy controller is proposed to realize the heading control in our work. It should be mentioned that the traditional fuzzy controller suffers from a distinguished steady-state error, due to the fact that the heading range is relatively large and the fuzzy controller's universe of discourse is fixed. To resolve this problem, a self-tuning mechanism is employed to adjust the input and output scaling factors according to the active working region in pursuit of favourable performance. Experimental results demonstrate the performance of the proposed controller in terms of steady-state error and robustness to interferences.
1. Introduction
In recent decades, extensive efforts have focused on researching unmanned underwater vehicles [1, 2] for marine resource exploitation, ocean exploration and rescue services. The efficient propulsion and good manoeuvrability of marine animals, such as cetaceans and fish, have motivated researchers to take advantage of these properties to create novel advanced underwater vehicles. Against this background, some bio-inspired swimming robots have been developed: robotic fish [3–6], a jellyfish- and butterfly-inspired microrobot [7], and a robotic dolphin. As one kind of cetaceans, dolphins are regarded as one of the best ocean swimmers in that the propulsive efficiency of dolphins can reach up to 0.75–0.9 and the maximum swimming speed is over 11m/s. Moreover, dolphins can also achieve excellent turning manoeuvrability and rotate their bodies with an angular speed of 450°/s with turning radii down to 11–17% of body length (BL) [8].
Attracted by these desired skills, many researchers have focused on developing dolphin-like robots. Fruitful research outcomes have been achieved in the areas of mechatronic design, hydrodynamics analysis and control schemes. Pioneering research in mechatronic design has led to several typical prototypes, including a two-joint robotic dolphin [9, 10], a four-joint pneumatic robotic dolphin [11], a five-joint robotic dolphin with a pair of two-degrees-of-freedom (2-DOF) pectoral fins, a robotic dolphin with a two-motor-driven scotch yoke mechanism [12, 13], and a multi-link robotic dolphin with 3-DOF flippers [14]. Many researchers devote themselves to the hydrodynamics analysis of robotic dolphins, which result in improved control performance. Dogangil
In this paper, a multi-link robotic dolphin with a turning joint is designed to realize the turning motion, which paves the foundation for the heading control. Based on a hydrodynamic model, the turning motion analysis is carried out, which indicates that one can employ the yaw angle of the turning joint to control the heading, while the relationship between these two variables is non-linear. Similar to robotic fish [19, 20], it is very difficult to establish a precise mathematical model, since the heading control of a robotic dolphin involves both hydrodynamics of the fluid environment and dynamics of the robot. In this case, the fuzzy controller provides an effective solution. In this paper, a self-tuning fuzzy heading controller is proposed to mitigate the non-linearity and reject the unexpected disturbances mentioned above.
The rest of this paper is organized as follows. Section 2 introduces the structure of a robotic dolphin; the turning motion is also analysed. Section 3 presents a self-tuning fuzzy heading controller. The experimental results are given in Section 4. Finally, the paper is concluded.
2. Structure of a Robotic Dolphin and Turning Motion Analysis
2.1. Structure of a Robotic Dolphin
In nature, dolphins achieve turning manoeuvre either by flexing the anterior body laterally with a special turning unit, or flapping and rotating flippers to produce a yawing moment. Furthermore, they can simultaneously adopt these two modes to achieve a more agile and swift turning [21]. Inspired by this fact, two methods are usually employed to achieve the turning motion of a robotic dolphin. One is to design a turning mechanism between the anterior body and tail part, while the other is to adopt mechanical flippers to realize turning. Since the second method requires a sophisticated seal of pectoral fins, the former one is adopted in this paper.
An experimental robotic dolphin is given in Fig. 1, while Fig. 1(a) demonstrates the structure of the robot. Joints 1–3, which are driven by servos in the rear part of the robotic dolphin, are used to provide the propelling force. A turning joint located in the middle of the robot is designed to achieve the turning motion. The pitch motion of the robotic dolphin is implemented by a barycentre adjustment mechanism. Besides a GPS and a pressure sensor for the robotic dolphin, an inertial sensor, with its

An experimental robotic dolphin: (a) The diagram of the robotic dolphin's structure; (b) the robotic dolphin prototype
2.2. Turning Motion Analysis
As shown in Fig. 2, a plane coordinate frame
where
When the robotic dolphin turns with a swimming velocity
where
where
where
On the basis of the law of rotation, one may get:
where
where
Hence, the real-time heading angle of the robotic dolphin
where
One can see from (12) that the robotic dolphin's heading
3. Heading Control of a Robotic Dolphin Based on a Self-tuning Fuzzy Strategy
3.1. Heading Control System
Fig. 3 illustrates the developed control system. This system mainly includes a fuzzy controller, a self-tuning mechanism, a servo and an inertial sensor, wherein the sensor is employed to measure the heading

Turning motion analysis of the robotic dolphin

The heading controller of a robotic dolphin based on a self-tuning fuzzy strategy
3.2. Design of the Self-tuning Controller
The inputs of the fuzzy controller are heading error
3.2.1. Membership Function Design
Triangular membership functions with a 50% overlap on neighbours are used for
where NB, NM, NS, ZE, PS, PM and PB are linguistic values, which denote negative large, negative middle, negative small, zero, positive small, positive middle and positive large, respectively.

(a) Membership functions for
3.2.2. Fuzzy Rule Base Design
The rule base reflecting the intelligence of the fuzzy control is responsible for specifying the actions that shall be taken under different situations. Taking advantage of the experimental experience of the robotic dolphin's turning motion, the rule base is obtained as shown in Table 1. Each rule in the rule base has the IF-THEN form. Since position control type is adopted for the fuzzy control, the rule base is established by obeying the following principles:
Rule base of fuzzy controller
When the heading error is positive (negative) large and the error change is positive (negative) large, it indicates that the heading is deviated largely from the target heading and the heading error is rapidly increasing. Thus, the control variable U should be positive (negative) large to eliminate the error as soon as possible.
When the heading error is positive (negative) small or zero and the error change is negative (positive) large, it indicates that, although the current heading is close to the target, the heading error still has the increasing trend because it is reduced excessively. Thus, the control variable U should be negative (positive) small or negative (positive) large, respectively, to prevent overshoot.
3.2.3. Defuzzification
Here, the commonly used centre of gravity defuzzification is adopted:
where
3.2.4. Self-tuning Mechanism
Since the target heading is in a large range (0°∼360°), the fuzzy controller input, including heading error and error change, will vary over a large range. For the regular fuzzy controller, the input and output scaling factors are set according to the entire range and remain unchanged in the whole process. When the heading error is large, the fuzzy controller is able to respond quickly to reduce the error. When the heading error is small, however, the working region is confined to the region of the ZE fuzzy set, which will cause a steady-state error. In this case, a self-tuning mechanism is designed to tune the input scaling factors to expand the working region for improving the input resolution [22]. Accordingly, the output of our controller is changed by tuning the output scaling factor to improve the performance of the controller. Based on these ideas, the self-tuning mechanism adopts the piecewise way to realize the tuning according to the range of the heading error. When the heading error is in a large range, fixed scaling factors are adopted. When the heading error is in a small area, variable scaling factors are designed as follows:
where
Using the above scaling factors, the regularized heading error, error change and output, defined in [-1, 1], can be obtained as:
4. Experimental Results
To verify the rationality of the proposed controller, a series of experiments was conducted in a lake including comparison experiment, anti-interference experiment and heading switching experiment. The parameters of input and output scaling factors and other parameters of the controller are given as:
4.1. Heading Control Experiment Based on a Self-tuning Fuzzy Controller
Fig. 5 depicts the experimental results of heading control with an initial heading of 273° and a target heading of 140°, and the curves of heading and heading error,

The heading control experiment for a robotic dolphin based on a self-tuning fuzzy controller
From the heading curve, one can see that the controller responds quickly to reduce the heading error, and the heading approaches the target direction after 7s. The curves of heading error,
4.2. Contrast Experiment with Regular Fuzzy Control
To further validate the performance of the self-tuning fuzzy controller, the comparative experiment with a regular fuzzy controller was carried out. Since the input and output scaling factors of a regular fuzzy controller is fixed throughout the control process, the self-tuning fuzzy controller becomes a regular fuzzy controller when the threshold of the heading error
Fig. 6 shows the contrast experimental results with the target heading angle of 150°. One can see that both the regular fuzzy controller and fuzzy self-tuning controller can quickly eliminate large errors. However, a distinguished steady-state error within a range of 3° to 8° exists in the regular fuzzy controller (see Fig. 6(a)). This steady-state error cannot be eliminated due to fixed scaling factors of the controller. In contrast, as shown in Fig. 6(b), a better convergence performance can be obtained by our controller due to the self-tuning mechanism.

Results of comparison with regular fuzzy control
4.3. Anti-interference Experiment
Fig. 7 shows the result of an anti-interference experiment with the target heading of 321°. At first, the heading of the robotic dolphin changes rapidly from an initial heading of 144° to the target heading. After 10s, the heading begins to maintain itself in the vicinity of the target heading. A man-made interference is then suddenly imposed on the robotic dolphin, which results in a deviation of about 50° from the target heading. After that, the heading of the robotic dolphin is re-stabilized around the target heading, which indicates the robustness of the proposed self-tuning fuzzy controller.

Results of an anti-interference experiment
4.4. Heading Switching Experiment
The experimental result of heading switching is provided in Fig. 8. In the initial stage, the robotic dolphin swims with a target heading of 330°. After the target heading is reset to 150°, the robotic dolphin responds quickly and steady swimming with the new target heading is achieved after 10s.

Result of a heading switching experiment
5. Conclusion
In this paper, we have developed a fuzzy control method to achieve a robust heading control for a multilink robotic dolphin. The turning motion of a robotic dolphin is analysed. Considering the severe non-linearity in heading control and disturbances due to water waves and turbulences, a self-tuning fuzzy controller is presented to improve the rapid response ability and the steady-state accuracy of the control system. The effectiveness of the proposed method is verified by experiments. In the future, we will conduct hydrodynamics validation based on the deduced turning motion analysis model.
Footnotes
6. Acknowledgements
This work was supported in part by the National Natural Science Foundation of China, under Grants 61421004 and 61473295, and in part by the Beijing Natural Science Foundation, under Grant 4152054. Fei Shen is the corresponding author.
