Abstract
Fish swimming demonstrates impressive speeds and exceptional characteristics in the fluid environment. The objective of this paper is to mimic undulatory swimming behaviour and its control of a body caudal fin (BCF) carangiform fish in a robotic counterpart. Based on fish biology kinematics study, a 2-level behavior based distributed control scheme is proposed. The high-level control is modeled by robotic fish swimming behavior. It uses a Lighthill (LH) body wave to generate desired joint trajectory patterns. Generated LH body wave is influenced by intrinsic kinematic parameters Tail-beat frequency (TBF) and Caudal amplitude (CA) which can be modulated to change the trajectory pattern. Parameter information is retrieved from a fish memory (cerebellum) inspired brain map. This map stores operating region information on TBF and CA parameters obtained from yellow fin tuna kinematics study. Based on an environment based error feedback signal, robotic fish map selects the right parameters value showing adaptive behaviour. A finite state machine methodology has been used to model this brain-kinematic-map control. The low-level control is implemented using inverse dynamics based computed torque method (CTM) with dynamic PD compensation. It tracks high-level generated and encoded patterns (trajectory) for fish-tail undulation. Three types of parameter adaptation for the two chosen parameters have been shown to successfully emulate robotic fish swimming behavior. Based on the proposed control strategy joint-position and velocity tracking results are discussed. They are found to be satisfactory with error magnitudes within permissible bounds.
Keywords
1. Introduction
Theoretical and experimental fish biology reports vertebrate fish locomotion patterns [1, 2] in fluid environment to be energy efficient. Some researchers [3, 4] have reasoned it by virtue of natural selection which adapts animals for high propulsive efficiency. Biomimicry based innovation in science and technology [4, 5, 6] has attempted to harness the advantages of nature's 3. 8 billion years of evolutionary process for. eg. by developing novel bioinspired propulsion systems. Exploring the swimming patterns in the fishes [7] travelling at surprisingly remarkable speeds, has been the interest of researchers towards the development of bioinspired autonomous underwater vehicles [8, 9, 10] for unmanned underwater surveillance and monitoring. Conventional propeller based locomotion [8, 10] although rendered the initial answers to underwater locomotion but had limitations primarily concerned to efficiency, maneuverability and noise. Bio-harmonized fish-like robots are expected to be quieter, more maneuverable (lesser accidents) and possibly more energy efficient (longer missions) as they try to mimic the biological behaviour of the vertebrates. Various novel actuation mechanisms have been proposed exploiting material property and continuous deformation to mimic the motion of the posterior (caudal) part of aquatic carangiform fish-like robot [5, 6, 30, 39, 53]. One of the vital aspects of biomimetic design while drawing the physical robot structure is its behavioral modelling [11, 12, 55]. This modeling is supported by several dimensions to match the desired behaviour closely. With more interdisciplinary developments modelling neurobiological patterns generated for locomotion behaviour approximation became the prime area of investigation to understand the correlation between animals and animats. Imaizumi [13] investigated control of the phono-taxis behavior of a insect inspired robot. Two main features of the input signals i. e. amplitude and frequency are modified to change this behavior. each of these characteristics were shown to be associated to a specific purpose like reproduction, camouflage etc. Of the two identified parameters, frequency plays more dominant role in auditory reception of these creatures [14] with different frequency range distributions. Suga [15] reports in Mustached bats about neural processing of sound waves in frequency clustered maps taking place at various levels generating doppler shifted echolocation to assist them finding prey, avoid obstacles while flying. Honeybees [16] for energy efficient hovering use a kinematic strategy, using a relatively low stroke amplitude and high wing-beat frequency. Paddlefish electroreceptors [17] were found to be frequency tuned to time varying stimuli to catch their zooplankton prey. Biologists [18, 19] have reported the correlation of maximum swimming speed of carangiform fishes with respect to kinematic patterns of tail beat frequency, tail amplitude and body length. Some of these behavioural characteristic in vertebrate central nervous control systems have been found as a resultant of forward models [20, 21]. These models play a significant role of predicting actions associated to cognitive and behavioral capabilities like generation of rhythmic patterns, modulation of sensory processes [25]. The development of cortical feature maps or brain maps is considered to be among prime organizational principles of this nervous system. These brain maps connected along the nervous system [22] are self organizing in nature and constitute the functio nal building blocks of the brain. Shumway [23] reports weakly electric gymnotiform fish of possessing different feature maps of electroreceptive information along its electrosensory lateral line. Each map with amplitude-modulated signals differed based on the electroreception activity level and factors like field size, sensitivity, rate of adaptation etc. Considering propulsive features [2, 7] of existing fish modes, a novel propulsive mechanism that integrates 2-joint, 3-link body caudal fin (BCF) carangiform fish-like swimming with modular links and fin movements has been proposed [50, 51]. We demonstrated that fishes use an alternative strategy for undulatory swimming (shown in Fig. 1 (a)) across large distances over impressive speed, using combination of kinematic parameters [19, 52] such as caudal amplitude (CA), propulsive wavelength (PW) and tail-beat frequency (TBF). As found in some of the earlier examples, experimental biology studies have shown that nearly every vertebrate sensory system including carangiform fishes consists of multiple brain maps [24]. Each map has many neuron populations with distinct physiological traits and found to handling different sensory kinematic parameters. Two significant parameters that are varied to adapt these signals are their frequency (TBF) and amplitude (CA). These parameters when combined in a unique way result in different body waves physiologically reflected in the overall swimming.

Carangiform Swimming Model
Aquatic vertebrate fish swimming behaviour and its control is characterized by complex rhythmic muscle contraction patterns or gaits [26]. A group of oscillatory neurons termed as central pattern generators (CPG) located in the base of the spine generate the rhythmic patterns leading to locomotion behaviour. Various underwater swimming robots with CPG signals are studied and implemented in many other research papers to obtain different vertebrate swimming behaviors. For robot's periodic movements, these responsible rhythmic patterns are produced by nonlinear oscillators [27]. A CPG for velocity and direction gait modulation is modeled in an amphibious salamander robot by Ijspeert et al. [28]. Further, harmonizing various control surfaces by recombination and modulation of swimming gait parameters is presented [29, 30]. Swimming behaviour is seen to be dominated by kinematic parameters and as a result these have been used as control variables to regulate the speed [29]. Finite state machine (FSM)-based gait transition modeling [29] is used in neurological systems in biology and artificial intelligence research. This is because a state transition is modeled as elementary gait transition. A smooth gait transition of a robotic fish swimming motion using a FSM based method is proposed by Wang [30, 31]. A temporal FSM based gait transition from forward swimming to turning is done by a combination of time and event. Locomotion gait involves event enforcing and synchronization successfully. Braitenberg [32] showed that sophisticated machines can be made to exhibit behaviour similar to neurobiological world using sensors, motors and logic understanding devices. He proposed that there is a share of common properties between the two worlds that can be rightfully exploited to achieve this goal. Different strategies for generating desired behaviour in robots have been proposed by several researchers [33]. Adaptive nonlinear frequency oscillators [31, 34] can tune the intrinsic frequency of the oscillators to the resonant frequency of a compliant robot. The adaptation is more than synchronization as also takes cares of system stability and robustness [27]. Egerstedt [41] has demonstrated a hybrid automaton based behavioral control system for robots. Each node of the finite automata corresponds to a specific robot behavior or kinematic characteristic. For eg. a maneuver automaton [44] for a robot helicopter motion planning was defined and its controllability properties were analysed. The famous Essex robotic fish [33, 45] was one of the earliest to show behaviour-based modeling for bioinspired robots. A hybrid control algorithm was proposed to adapt with dynamic environments but they did not use the concept of fish neurobiology results in the machine. Similar, distributed hybrid control strategies have been implemented for AUVs [42] in a three layer architecture of mission level, task level and behavior level. Supervisory hierarchical control [43] is presented for the intelligence level while coordination of sensing, planning and motion is done parallel in an event driven/timedriven environment. Present work generates modulated body trajectory pattern similar to CPG but it is done without using any nonlinear oscillator model. Similar to CPG, the present model is shown to be useful for robotic fish behavior modeling and locomotion control.
The contributions in the present work are enumerated as following:
A novel fish biology based behaviour in the form of two level distributed control architecture is proposed for a robotic fish underwater vehicle [12, 13].
A high level control policy is defined. Fish kinematics behavior based trajectory patterns are generated and stored in the fish memory map. We mimic similar kinematic map using Lighthill (LH) mathematical model framework using FSM.
A low level control strategy is modeled using Computed Torque Method (CTM) [49, 53] based on inverse dynamic model to analyse trajectory tracking results of undulatory robotic fish caudal tail swimming in fluid environment.
The paper is organized as follows. In Section II, the bio-inspired dynamics modeling [36, 54] of a three link robotic fish is presented. It also discusses the Lighthill's slender body mathematical framework [37] and its integration with the present prototype [50, 51]. Section III investigates DES based brain map and control mechanism generated from it. Section IV formulates robotic fish high level control using LH kinematic parameters based adaptation behavior. Section V presents low level control architecture using CTM for tracking undulatory swimming movements in robotic fish tail. In Section VI, conclusions and directions for future work are discussed.
2. System Model
A submerged rigid body motion would result in nonlinear hydrodynamics forces acting on it by fluid environment. These are complex forces to numerically integrate into a model which has also led to bioinspired modeling technique [54]. Yu et al [30, 31] used Schiehlen method to formulate a cetacean inspired three-dimensional multibody dynamics model. Many researchers have developed Lagrange and Newton based dynamic modeling with innovative schemes of force transmission like using tendon based mechanism or passive components [34] to mimic the tail muscle agility. Robotic fish head is the mobile base and an
In a compact form, unified dynamic equations of motion of robotic fish in earth fixed coordinate (subscript) is expressed as
where ξ=[
where
Here, the body fixed coordinate for robotic fish head and tail are denoted by subscripts
a. Fish Head
Body fixed vector ν and earth fixed vector
where
with
and
b. Caudal tail
The tail-fin
For the two link manipulator the jacobian matrix is given by
Above robotic fish underwater vehicle dynamic equations have been developed in three dimensions for a

SolidWorks model of Robotic fish
2.1 Lighthill Equation and Kinematic parameters
Sir J. Lighthill [5] in his
where
where

Block diagram showing integration of LH Model in the robotic fish kinematics and dynamics model
3. DES based Brain Map and Control Architecture
Brainstem (posterior part of fish brain) adjoining to spinal cord, generates low dimensional signals [25, 40]. Using modulation techniques these low dimensional signals are converted into high dimensional arrangements responsible for muscle harmonized locomotion control. Modulation is facilitated by variation of signal parameter like amplitude, frequency and phase. This encoded information is stored in memory maps. Translating a biology based behavior of a vertebrate fish to a mobile robot is challenging. A subsumption architecture [35] which is a behavior-based approach well supported by ethologists is designed for the higher level control. Behaviors are organized in layers made up of individual FSM shown in Fig. 4 (a) according to a predefined priority of action. This structure has an edge to provide robustness to perturbations, shorter reaction times in a given complex environment. Inspired by this model, the lower level Computed Torque (CTM) control method [53] is integrated with FSM based behaviour model to adapt a real-time dynamic environment with only joint-position sensing capabilities. Different swimming behaviours are shown by the biological fish in response to different stimuli needs arising due to food search, predator escape, successful reproduction etc. Each of these different life motives are supported by kinematic priorities follow actions like straight swimming, turning (C turn, S turn), sudden start/stop and so on. A FSM based model shown of forward swimming behaviour in Fig. 4 (b), is modelled in this paper.

Behaviour architecture using DES model
Kinematic parameter correspond to a stream of information that are stimulated to be combined or modulated across the brain maps to evoke the adaptive behavior in response to a changing stimulus. We emulate these kinematic changes in robotic fish by modulating major kinematic parameters TBF (ω) and CA (
Coordination of the brain-map system can be modeled as a discrete-event system (DES) [38] occurring asynchronously over time. Discrete event system (DES) behaviour of stimuli selection is realized by FSMs [38]. They represent a centralized mathematical behavior model [35]. This DES based brain-map model has been used to design and analyze the synchronization of distinct environment based stimuli corresponding to different major kinematic variables. Lighthill equation has three major identified parameters mentioned earlier. Switching is between two states. Each state is based on a purpose (food, escape etc) and is tagged to a kinematic parameter or a combination of parameters. As the biological species use memory maps in their brain to use a data (pre-recorded) for an upcoming event, we try to realize (mimic) the same mechanism.
3.1 Distance based Priority/Action Selection
Let's take the case where three states

Fish biology based Speed Profile of Robotic Fish

Distance based action selection algorithm
Starts and accelerates at a distance d1 using TBF1 to obtain velocity v1
Maintains for a distance d1 using TBF1 to obtain velocity v2
Retards and stops at distance d2 using TBF3 to obtain velocity v3
3.2 Error based Priority/Action Selection
Here, we have used DES modeled action based on a outer feedback loop error signal (position or velocity). In uncertain environment, this feedback signal coming to the CTM controller is also used by brain map to decide state priority. This approach is environment based as the feedback signal from operational space helps to select a transition to another suitable action state. Each action state as mentioned earlier encodes information of kinematic parameter/s. Therefore we select a change in state only when error bound is greater or less than a given limit to achieve a desired speed profile as depicted in algorithm in Fig. 7.

Error based action selection algorithm
The DES model proposed by Brandin and Wonham [38] have been used in this research work. Plant model is modeled as a DES which specifies the set of states (including initial and outgoing marked states as required), set of events, and transition function of the system. Detailed DES modeling is not presented here due to lack of space. It is also to be noted that the value of kinematic parameters TBF and CA are chosen based on the kinematic experiments [50, 51] whose results are shown in Fig. 8 (a) and Fig. 8 (b) respectively.

Kinematic Experiments with TBF and CA parameters
4. Kinematic Behaviour based High level Control
A generic bio-harmonized control model block used in the present robotic fish is illustrated Fig. 9 while its detailed two level distributed control architecture model is shown in Fig. 10. In vertebrate locomotor system, a higher level behavior control signal (composed of the motor cortex, cerebellum, and basal ganglia) from brain-stem is responsible for modulating periodic patterns [25, 40] according to environmental conditions. A lower-level spinal encoded pattern signal commands the musculoskeletal actuation. Inspired by this fact, we present a bio-inspired distributed control shown in Fig. 10, where inverse dynamics model based CTM strategy is chosen for tracking caudal fin movement as a lower-level controller. This movement when integrated results in overall undulation represented by LH equation propulsive body wavelength.

Block diagram of Brain-map modulated Behaviour Feedback based generic control scheme

Block diagram of distributed control scheme using kinematic parameters based brain-map as high-level and computed torque as low-level control policies
4.1 Tail Beat Frequency (TBF) and Phase Shift
Parameter adaptation is important because TBF, PW, CA play important role in generating thrust for fish created by its undulating body wave. For example using one value of constant TBF will use a level of energy and control signal whereas if the adaptation or modulation concept is brought into place it allows choosing distinct values at different time periods based on environment feedback stimuli. That means lesser energy used for control effort for a given distance. We plan to present it elaborately in future work. Forward swimming velocity (wrt time) increases with the raise of the oscillatory frequency. Further after reaching a peak velocity at given frequency a descending pattern follows. This results shows that efficient swimming speed is achieved only at a given frequency, further increasing to which will result in to a waste of energy. We took three intervals

Kinematic Parameter Adaptation
4.2 Caudal Amplitude Shift
Existing second-order amplitude envelop is chosen to produce three body waves by three distinct values of c1 and c2. In practice, oscillatory-amplitude-based speed control method adjusts transverse movement at a constant oscillating frequency (at λ = 1.4 m and ω = 0.5) to change thrust and swimming speed. Values of these two coefficients are dynamically calculated for present system in accordance with LH model and kinematic study by Dewar [19]. Variation of these parameters affecting forward velocity at a fixed wave length shows an increase in forward velocity with an initial increase and subsequent decrease in the amplitude values. Choice of the amplitude between two speed limits also depend on the tailbeat frequency at a fixed wave length. CA shifts in the adapted (modulated) body wave are shown in Fig. 11 (c).
4.3 Mixed Parameter Shift
This is a more natural realization of biological fish swimming [7] where they use parallel stimuli signals from different brain maps [55] to produce undulating body waveform. Inspired by this bio-mechanism robotic fish adjusts/shifts two brain-map parameters shown in Fig. 11 (d)–(f) for combining CA with phase, TBF with CA, and TBF with phase respectively at different time instants to generate modulated LH body wave. This combination of two or more parameters to be adapted simultaneously is based on feedback error stimuli. In physical sense, this indicates a adjustment in the swimming pattern for desired forward velocity. In Fig. 11 (g) case is shown when the changes are asynchronous i. e. adaptation occurs at different time periods. In Fig. 11 (h) we consider second case dealing with adapting all parameters in one time interval.
5. Low level Control
Cerebellum operates in coherence with other members of the central nervous system to control the low level signals responsible for joint movements. Control of robot dynamics using computational cerebellar models has been investigated to emulate a biological process [46, 47]. The inverse dynamics scheme which is found commonly to control manipulators have been reportedly implemented in cerebellum region of the vertebrates [25, 40]. Inspired by this fact, a nonlinear closed-loop expression given by Equation (3) in terms of the state variables is formulated using Computed torque method (CTM)[48, 49, 53] where the choice of the design parameters is constrained in order to meet the the motion control objective. CTM with dynamic PD compensation is shown in Fig. 10. The tail-actuator laterally undulates [37] using the LH mathematical wave function to produce forward thrust. Based on an inverse kinematics principle, trajectory state variables for the robotic fish are determined. By substituting them in Lagrangian equation, the torque at the 2 body-joints are calculated acting on each servo actuator. The dynamic PD gain matrix structures are appropriately chosen for a globally stable system response. The behavior of the tail-actuator is characterized by the dynamic model representing a set of nonlinear functions dependent on the state variables (joint positions, velocities and accelerations). In CTM, a control law [52] is derived nonlinear in the state variables but which leads to a closed-loop control system composed of a linear differential equation. Considering the given dynamics model of robotic fish [54] mentioned in Equation (3) the state vector representation is given by
where
The control law is expressed as
Representation of the closed loop dynamic equation in the state space form:
where
Above equation reduces to
as
In state vector representation in joint space, the equation is written as
where
In cartesian space, it can be further written as
where φ is the mapping function between joint space (
The project implementation is carried out in MATLAB and Simulink. The system is based on the dSPACE 1102 hardware platform and can be used to implement real time signal acquisition and processing to generate appropriate control signals for the actuation of the robotic fish. The yawaxis servomotor is a Hitec HS-5646WP (11. 3Kg-cm/6 V) used in all the joints. Arduino-Uno with ATMEGA328P coserves with dSPACE system as central processing unit for the robotic fish hardware in loop (HIL) experiments. The robotic fish is 4. 5 kg in weight, 74 cm in length and can achieve a maximum speed of 14. 6 cm/sec with present configuration. The mechanical CAD design and animation has been implemented with the help of the Solidworks (mechanical model), and MATLAB Sim-Mechanics, VRML (3D motion). The NACA airfoil aerodynamic structure has been designed to boost the swimming efficiency by reducing the drag. The closed loop control results with proposed control architecture are discussed here. Angular motion in both joints/links as shown in Fig. 12 (a)–(b) possess a steady state position in short time periods (both joints) after initial actuation signal has been given. When torque signal is applied to the first joint, the first joint oscillates and the second follows it with a delay. Position tracking results depicted in the Fig. 12 (a) and Fig. 12 (b) the command step signal for both joints starts from zero degree to move 30 degrees and return back to its initial position after 2. 4 sec for joint 1 as compared to 3. 1 seconds for joint 2. Joint 2 is shown to display an initial time delay of about 0. 3 sec before catching up with the desired position trajectory. The points of discontinuity have been avoided by excluding them from the tracking algorithm. In Fig. 12 (a), joint 1 shows a small rise time and 11. 2 % overshoot over joint 2 where the steady state error is increased with enhanced settling down time. Corresponding angular velocity tracking depicted in Fig. 12 (c)–(d) also reduces to a satisfactorily stable margin, after the actuators have encountered the given torque generated by desired trajectory angles on the dynamics of the body. The effect of dynamics like inertia distribution and unmodeled parameters play a dominant role in deciding the controller performance of accurate and smooth motion in uncertain environment. Comparing Fig. 12 (c) andFig. 12 (d) joint 1 shows maximum deviation over joint 2 during velocity tracking from reference value denoting a larger settling time. It is reflected in joint torque signals where joint 1 peaks over joint 2 for a very short interval of time shown in Fig. 12 (e). The position error and its rate are kept in an acceptable upper bound (tolerance) by using the inverse dynamics control scheme. Corresponding position tracking error is shown in Fig. 12 (f) for using a dynamic PD compensation scheme [53] and choice of various values of gain matrices, a stable and faster convergence illustrated in Fig. 12 (g)–(h) can be observed. It is inferred that tracking error signal magnitudes are smaller with better convergence rate for each joint under the proposed distributed control scheme. Robotic fish nonlinear controlled path using the above brain map based distributed architecture in three dimensional plane is presented. It moves from point A to B using the proposed bio-inspired distributed control scheme as depicted in Fig. 12 (i). This algorithm is based on the distance travelled between an initial and destination point defined by RoyChowdhury [51]. The path planning using this algorithm would require more optimal parameters in addition to the three major kinematic parameters presented in this research to ensure more efficient robotic fish swimming [54]. Improved PD compensation tuning algorithms and advanced learning control methodology that suits bio-inspired designs will be explored in future. Using the present dynamic model and derived steady kinematic simulation results [50] the closedloop experiments were done for different body motion configurations to emulate the undulation of the robotic fish in fluid environment shown in Fig. 13.

Proposed Bio-inspired Distributed Control scheme Results

Robotic fish Swimming Modes
6. Conclusions
Present research translates biology based swimming behaviour of a vertebrate fish to a mobile robot in a dynamic environment. Fig. 13 shows robotic fish prototype with implementation carried out in MATLAB and Simulink. The built prototype is a 74 cm. long, weighs 4. 5 kg, BCF (Body Caudal Fin) mode 6 DOF bioinspired fish underwater vehicle with a horizontal caudal fin (tail). The yaw-axis servomotor is a Hitec HS-5646WP (11. 3Kg-cm/6 V) used in all the joints. The mechanical CAD design and animation has been implemented with the help of Solidworks and MATLAB VRML. A Lighthill (LH) body wave coupled to robot dynamics is used to generate desired rhythmic pattern using inverse kinematics. Carangiform swimming behaviour is given by LH body wave characterized by Tail-beat frequency (TBF) and Caudal amplitude (CA) parameters. Therefore modulating these parameters means adapting swimming behavior. Identified kinematic parameters TBF and CA values are taken from operating regions to form a biology inspired brain memory map. This map is modeled and controlled using a distributed architecture algorithm implemented in finite state machines. Transition between various states signify parameters shift/adjustment based on feedback error signal. Further, a low level CTM control with PD dynamic compensation policy is developed to track the desired joint trajectories. Joint position and velocity tracking signal shows a satisfactory convergence rate. The position and velocity tracking error magnitude is shown to reach higher values for short interval of time. In future, an advanced and robust control methodology would be adopted for handling the low level control. A better approximation of higher level behaviour design is under investigation to exploit natural dynamics of fish swimming closely.
Footnotes
7. Acknowledgements
This work is presently supported by the Defence Science and Technology Agency (DSTA), under the Ministry of Defence (Singapore), Government of Singapore, under Grant R-263-000-621-232-MINDEF-DSTA for Underwater Vehicle Technology Project STARFISH 2. We would like to thank Mr. Alok Agrawal of Purdue University for key contributions for the mechanical CAD design of Robotic fish. We would acknowledge useful suggestions and feedback given by Mr. Shailabh Suman of Acoustic Research Lab NUS, Dr. Mandar Chitre of Acoustic Research Lab NUS, Dr. Pablo Alvaro Valdivia of Singapore-MIT Alliance for Research and Technology (SMART), Professor Marcelo H. Ang Jr. and Professor Xu Jianxin of Department of Electrical and Computer Engineering.
