# An Environmental Perception Framework for Robotic Fish Formation Based on Machine Learning Methods
## 1 Introduction
They also provided an algorithm to predict the inlet flow velocity by using the near-body pressure at distributed spatial points. [PERSON] et al. [26] numerically studied the hydrodynamics of AUV at different speeds and analyzed the spatial distribution of the near-body pressure over the whole computational domain. [PERSON] et al. [27] studied the drag variation by choosing two position arrangement of cooperative AUV. [PERSON] [28] presented a comparative assessment of the variation of drag characteristics over cooperative axisymmetric bodies at zero angle of attack. However, these original studies are all based on a single entity or the conventional AUVs formation. In robotic fish formation, the disturbance of flow caused by the swing of fish affect the data measured by sensors. It is necessary to study the perception of robotic fish formation further. Therefore, this paper studies the relationship between the pressure of fish surface and the inlet flow velocity, the spacing between individual members in simple fish formations. To be specific, the main contributions are summarized as follows:  
* We construct the models of basic environment perception for different robotic fish formations. Two specific formations, tandem and phalanx, are discussed in detail. We analyze the hydrodynamic phenomena of through the flow fields, including the wake effects in the tandem formation and the pressure distribution in the phalanx formation. For the tandem formation, the robot swimming in the front will generate flow in the wake, thus the fish swimming downstream will be affected by the unsteady flow. For the phalanx configuration, the effect of the lateral flow oscillating will be considered. * We adopt machine learning methods to generate our models using the simulation results as the sample data. Specifically, the predictive model of the flow velocity is constructed by polynomial fitting and the judgement model of spacing between robotic fish platforms is developed based on the method of neural networks. Our predictive models could reduce the error to 0.4%, and the spacing judgement accuracy could reach at least 80%. * We analyze the data monitored by sensors at different positions and find that sensors located from the head to about one-third point of the front body are more useful, while the data monitored by sensors near the tail is unstable due to the large swing amplitude at the latter part of the fish body. In this study, we present simulations the robotic fish using the open-source software OpenFOAM [29; 30; 31], and construct the mathematical models by the methods of polynomial fitting and neural networks. The rest of the paper is organized as follows. Section 2 describes the kinematic and geometry models of robotic fish, and the CFD numerical method. Section 3 constructs the predictive model of the inlet flow velocity for single robotic fish. Section 4 constructs the predictive models of the inlet flow velocity for different formations separately. Section 5 gives the judgement models of the spacing between individual platforms for different formations separately. Conclusions are drawn in the final section.