# Three-Dimensional Modeling of a Robotic Fish Based on Real Carp Locomotion
## Three Dimensional Dynamic Model and Motion Equations of the Robotic Fish
### Carp Locomotion  
In this study, forward, turning and ascending-descending swimming patterns are investigated with top- and side-view cameras for 3D records in a 120 cm length, 80 cm width and 60 cm depth test tank to analyze the maneuverability of real carp. The resolution of the high-definition video camera is 1920 \(\times\) 1080 p, the data rate is 19,949 kb/s, the total bit rate is 20,205 kb/s and frame rate is 29 fps, respectively. Stabilized swimming over a distance of 60 cm is selected for testing. Snapshots are also captured and examined by using the Kinovea 8.20 software. The sampling time is set to 0.05 s.  
The main idea for kinematic modeling of the robotic fish is to assume the robotic fish to have a multi-link mechanism. The equivalent model of the robotic fish and description of the one link are given in Figure 1.  
The designed robotic fish consists of five links. We will define \([l_{1},\ldots,l_{i}]\rightarrow(i=1,2,\ldots,N)\) as one body link, three active tail links and one passive oscillating caudal fin link. \(N=5\) is the number of links. \(\theta_{1}\) is the angle of head during swimming, \(\theta_{k}(k=2,3,4)\) is the each active link angle of the  
Figure 1: Kinematic scheme of the robotic fish: (**a**) Equivalent model; (**b**) Description of the one link.  
propulsion mechanism and \(\theta_{5}\) is angle of the caudal fin. \(m_{1}\) is the body mass and each link mass of the propulsion mechanism equals from \(m_{2}\) to \(m_{5}\). \((x_{i}^{g},y_{i}^{g})\) and \((x_{i},y_{i})\) are link coordinates of the center of mass and end points of the link coordinates, respectively. Also, \(\varphi_{i}=\theta_{i}+\theta_{i-1}\) is the orientation angle of the joints in the horizontal plane. It can be seen from Figure 2b that each link is homogeneous and the middle points of the links are regarded as the center of mass. \(a_{i}\) is the distance from joint to center of the link mass and \(\tau_{i}\) is the turning moment of the each joint.  
Motion of a real fish depends on the body-traveling wave. In order to imitate the body-traveling wave, there are two general methods: sine-based joint location or intersection methods [19; 32], and CPGs [21; 33]. In this paper, the improved intersection method with the Big Bang-Big Crunch optimization algorithm, which is also used in our previous work [32], is applied to the link points of the real carp. In this method, locations of links are determined within a scanning area to achieve the minimum error of the fitting body-travelling wave. Thus, optimization criteria is chosen as error of the envelop area with optimum link lengths [32; 34]. In the analysis of the carp, five points are defined to verify optimized link lengths on forward and turning patterns obtained from the top view of the carp. The locations of the points and optimized link lengths on forward and the turning patterns are shown in Figure 2.  
In the experiments, five points are marked on the real fish in order to define link locations according to optimized link lengths of the robotic fish. Locations of the points are tested by applying links between every two points to ensure a minimum area.  
As seen from Figure 2, light blue line is the anterior body, orange, pink and deep blue lines are active links and the green line is the passive caudal fin, respectively.