Master-Slave Collaboration System of Unmanned Surface Vehicle and Robotic Fish

A brief introduction to the master-slave collaboration system of unmanned surface vehicle (USV) and robotic fish, which consists of an upper computer, master and slave is given in this paper. The upper computer set in the control center communicates with the master-slave through the wireless communication network. The master is set on USV. The slave is set on each robotic fish. Because the system adopts the USV as an intermediate station for signal transfer. The underwater detector, namely robotic fish, detect the signal and pass it to the upper machine by the USV, which enhances the power and increases the distance of signal transmission, improves the signal stability and the radius of operation activities of the whole robotic fish due to the close distance between fish and boats so that they can carry out real-time communication.


Introduction
High speed, high efficiency, high disguise, high mobility and strong adaptability of robotic fish make it has an important application and urgent need in military, biological observation, narrow space detection and so on. However, because of its complex working environment, underwater wireless signal transmission is greatly influenced by the water environment. The attenuation degree of information influenced by the environment is very large on the way of returning information, which severely limits the effect of robot fish performing underwater tasks. In order to solve the above problems, we need to design a master-slave cooperation system which is not restricted by water environment and restricted by cables, and can execute long distance and deep depth detection.

Unmanned Surface Vehicle
USV is a kind of water surface ship which does not need crew and has a certain degree of autonomous navigation. It is one of the autonomous marine vehicles [1].It can navigate all kinds of complex sea conditions under the control of a small group of team. USV can carry out marine environmental monitoring, water quality sampling, chart drawing, marine troubleshooting and other tasks by carrying different functional modules [2][3].Under the assistance of high precision sensor and high performance controller, USV has a higher accuracy of navigation relative to the manual operation, so it has outstanding advantages in the designated information collection, charting and other high precision tasks [4], USV has been popular for its superior performance, but at present there are many key technologies need to break through.

Figure 1. LOS algorithm analysis diagram
Line of sight (LOS) guidance [5] is classified as a so-called three-point guidance scheme since it involves a (typically stationary) reference point in addition to the interceptor and the target. The LOS denotation stems from the fact that interceptor is supposed to achieve an intercept by constraining its motion along the line of sight between the reference point and the target. LOS guidance has typically been employed for surface-to-air missiles, often mechanized by a ground station which illuminates the target with a beam that the guided missile is supposed to ride, also known as beam-rider guidance. The LOS guidance principle is illustrated in Figure 1, where the associated velocity command is represented by a vector pointing to the left of the target.

Unmanned Hull Structure
After the establishment of the overall program framework, the simulation debugging was successful, and we conducted a single USV launching trial. Manually controlled the USV through the upper computer, the test results were ideal. Then, debug the other two well.
Next, we began to study the LOS guidance algorithm and studied the principles and formulas involved carefully. In the case of thorough understanding, the algorithm was further programmed. Then, in the same way, we started to research and implement leading-following algorithm. Finally, repeat debugging and improvement. As shown in Figure 2, we have finished 3 initial USV.  With regard to the implementation of environmental monitoring function, taking the camera and temperature sensor as an example, it is better to call the written driver directly. Of course, the environmental detection sensor on USV is flexible, and other sensors can be selected according to actual needs.

Robotic Fish
Based on mechanical electronics, intelligent materials and information technology, this paper studies the hydrodynamic performance of different fish, and designs the mathematical model of the two-joint tail fin propulsion system to replace the traditional high-energy and low-efficiency propeller driven robot fish. Through the research on the mechanism of fish propulsion, Matlab software is used for simulation. And ATMmega128 is the main control chip to realize efficient and flexible motion control. Equipped with wireless WiFi control module and camera module [6][7][8], use NRF2401 to realize underwater video and image transmission [9]; Source code using real-time embedded system uC/OS-II management improve the efficiency of the real-time operational and code of the robotic fish [10]. Modules can be added and removed according to user requirements. Robotic fish can be used in shallow sea topography survey, underwater survey of port engineering construction, shallow water biology environment research, water quality monitoring and pollution monitoring, aquaculture and other scientific research, engineering, production field. This robotic fish simulates body shape of real fish, using 3 d printing for shell of fish, being easy to mass production. The ABS resin material is one of the five synthetic resin [11]. Its impact resistance, heat resistance, low temperature resistance, chemical resistance and excellent electrical properties were very good. Besides, it has easy processing, products good size stability of products and surface gloss. And it is easily degraded with no pollution to the Marine ecological environment. The 3D printing fish body is shown in Figure 3.

Double Joint Steering Gear
After fully studying the movement pattern of tuna and fish body structure, we design the double joint steering tail for propulsion which has similar geometric features. We adopt the Atmega128 as master control chip with high performance and low power consumption AVR8 microprocessor. Advanced RISC structure can achieve forward [12], backward, sudden turn and other flexible movements. And using the principle of hydrodynamics, the floating position is realized by adjusting the swimming position through the pectoral fins, and the control parameters are obtained by MATLAB simulation. The depth of the experiment is 5.2 meters, and the algorithm program designed independently makes the bionic fish automatically cruise according to the trajectory set by the program. The designed fish is shown in Figure 4.

Motion and Control Module
Robotic fish propulsion design principles: Fish behavior researchers believe that the movement of fish has an implicit traveling wave that is propagated from the back of the neck to the tail. The propulsion wave is mainly manifested in the curvature of the spine and muscle tissue. The amplitude is gradually increased from the front to the back, and its propagation speed is greater than that of the fish body, which is called "fish body wave", and its corresponding function is the fish body wave function. The fish body wave curve of the carangoid fish can be seen as the synthesis of the envelope and sinusoid of the fish body. It begins at the center of the inertial force of the fish body and extends to the tailstock. The curve equation can be expressed as: Among them, y body represents the longitudinal displacement of the left and right axis of the fish. The variable x represents the axial displacement in the direction of the head and tail of the fish body. The parameter k represents a multiple of the wavelength ( ). And is the wavelength of the body wave. Coefficient c 1 and c 2 respectively represent a term coefficient and a quadratic coefficient of the amplitude envelope of the fish body wave. The is the wave frequency of the fish body wave ( ). The key point of the bionic robotic fish design is to determine the appropriate fish body wave parameter c 1 , c 2 , k, and so on, so that the robot fish can fit the fish body wave equation (1) well. For this purpose, the time parameter t of the fish body wave curve need to be separated from the function y body by the method of discretization. And the whole fish body wave is divided into two parts: One part is the sequence of spline curve, which has nothing to do with time in a swinging period. The other part is the swing frequency f relating to time, which is the amount of wave motion completed by the entire swing mechanism in unit time. So (2) Among the equation (2), M represents the resolution of the fish body wave, that is, the degree of discretization of the fish body wave, and its upper limit is the highest frequency of the fish body oscillation. i represents a sequence of spline curves in a cycle of motion. In the process of swimming, it can realize the speed control of the whole fish body by changing the oscillation frequency f to achieve different propulsion speeds in the water. The bionic robotic fish prototype based on the above principle is shown in Figure 6.
Speed and azimuth control for PC/ mobile terminal: The PC/ mobile APP is designed to control and debug the robot fish in short distance, and the communication between wireless devices can be realized through WiFi to receive task. It can switch between automatic cruise and manual control mode. Based on PID control principle [13], the direction and Angle control can be used to flexibly deal with all kinds of complicated underwater environments.

Image Acquisition and Positioning System Image acquisition
By camera combined with waterproof lights, color image data of surroundings is obtained and collected. The camera is 6 million pixels image in the fixed time interval. The photo is stored in the SD card taken in the fish body (photo time interval and SD card capacity can be adjusted according to user requirements). Then add the infrared sensors to further ensure the accuracy of the robotic fish on obstacle recognition, and correspond complex environment under the sea flexibly.

Real-time location and communication
The robotic fish selects ATK-S1216F8-BD-V1.1 GPS/ beidou module as the positioning system [14], tracking the location of the bionic fish in real time via communication equipment, and displaying on the map interface. Use NRF2401 single-chip microcomputer as RF transceiver chip. When the robotic fish floating on the surface of the water, fish location information is obtained and the fish can return to the starting position on automatic cruise. At the same time it can transmit image in the SD card to the specified equipment. And effective communication distance is 1000 m in the wide water.

Master-slave Collaboration System
To achieve the purpose in introduction, we connect the unmanned surface vehicle and the robotic fish together to design a master-slave collaboration system. The basic principle of the system is shown as Figure 5. Further, the USV is propelled by a high-speed propeller, and the robotic fish is propelled by a bionic fish tail.
In addition, the robot fish includes fish head, body and tail. And the tail set the drive module and steering gear bionic movement module inside. The body set the focus adjustment module and power management module inside. The head set sensor connection interface module and the core controller module. The dorsal fin of the fish is equipped with a wireless communication module that communicates with the USV.

Working Ways
The software installed in the upper computer of the system includes the real-time control interface of the USV, the control system of the position formation of the USV and the robotic fish and the return information interface.
The USV trajectory control interface sets unmanned boat track and position, the position relationship between fish and unmanned boat and machinery appropriate information, and by the wireless communication module of USV, the unmanned boat receives instruction.
The USV gets the control information of upper machine through the wireless communication module. After processing information, it respectively carry out the control instruction of speed and course of USV, and transmit position information of robotic fish relative to USV and the parameters of sensor setting information of the robotic fish. And then transfer the instruction to set up the robotic fish through wireless communication module.
After receiving the instruction of the USV, the robotic fish will control its speed, floating depth and control the working parameters of the sensors.
After carrying the sensor acquisition signal, the robotic fish give back the signal to USV by the wireless communication module between unmanned and craft robotic fish. USV summary processing corresponding signal and eliminate the error, and transmit the signals through wireless communication module to the information interface of PC. At last PC collects and store corresponding information.

Advantages
Compared with the existing technology, the system has the following beneficial effects: Because we adopt the unmanned boats as a signal transfer between stations, the underwater detector to detect the signal transmits the signal to PC by USV to enhance the signal power of transmission and increase the distance of signal transmission. And robotic fish and USV is in very close distance, the fish in the water and USV can make real time communication. The signal stability and the radius of operation activities of the whole robotic fish are improved.
Because we adopt the underwater biomimetic robotic fish as a carrier of the underwater detection, we can make full use of the flexible and efficient way of movement to improve the ability of probes to adapt to the complex environment in water. The narrow space detection is realized, and the impact on the original biological environment is reduced.
Because we adopt the working mode of multi-robot fish cooperation, it enlarges the area of detector probe and improves the efficiency of the whole work.

Conclusion
In this paper, we study the master-slave collaboration system of unmanned surface vehicle and robotic fish. Underwater robotic fish have low cost of production, small size, compact structure, high stability, and compared with the traditional propeller propulsion, using double joint steering gear as push power to make it more suitable for sea current field environment. Unmanned surface vehicle works longer and has better battery life, which can be used as information receivers. Using the USV to pick up the robotic fish quickly to the designated waters can reduce the energy consumption of robotic fish. By collecting information from robotic fish, it is possible to avoid the disadvantage of USV unable to