# An Environmental Perception Framework for Robotic Fish Formation Based on Machine Learning Methods
## 6 Conclusions  
In this work, we construct the models for single robotic fish, the tandem formation and the phalanx formation to predict the inlet flow velocity and judge the spacing between individual platforms in the formation. The results show that the best predictive model of the inlet flow velocity for single fish is calculated by the kinematic pressures monitored by sensors at position \(x=0.35\ L\). The predictive  
\begin{table}
\begin{tabular}{c c c} \hline \(\Delta d\) & **Accuracy Rate of No. 1 Fish** & **Accuracy Rate of No. 2 Fish** \\ \hline
0.3 \(L\) & 100\% & 96\% \\
0.5 \(L\) & 80\% & 88\% \\
0.7 \(L\) & 88\% & 84\% \\
0.9 \(L\) & 92\% & 80\% \\ \hline \end{tabular}
\end{table}
Table 10: The accuracy rate of the judgement models.  
Figure 19: The relationship between \(dy\) and \(p_{i}^{\prime}\) at a certain \(U\).  
models of the inlet flow velocity for the front robotic fish in the tandem formation and two fishes in the phalanx formation are the same as that of single fish calculated by the kinematic pressures at the fish head. The predictive model of the inlet flow velocity for robotic fish at the back in the tandem is calculated by the kinematic pressures monitored by the sensors at position \(x=0.35\ L\), which is different from the best model for single fish. In the tandem formation, only the fish at the back need to know the spacing with the other fish. The spacing is judged by the kinematic pressures monitored by the sensors at position \(x=0.15\ L\). In the phalanx, both fishes need to know the spacing. For the fish on the left, the spacing is judged by the data monitored by the right sensors at position \(x=0.15\ L\). For the right fish, the spacing is judged by the data monitored by the left sensors at position \(x=0.15\ L\). The robotic fishes can know basic environmental information, such as the inlet flow velocity and the spacing between the robotic fish itself and the other fish in the formation through these models. It is useful for maintaining a stable formation to perform more complex tasks without communication. In addition, the results can provide guidance for sensor installation position on the robotic fish surface. In the future, we will further consider more complex formations with more robotic fishes and change the phase difference of fishes swing. We will try to improve the applicability of the predictive and judgement models. To make the simulation closer to reality, we will also consider more control algorithms and cooperate with colleagues who make robots to apply our simulation results to actual robots.  
Conceptualization, C.L. and S.L.; methodology, C.L., S.L. and L.X.; resources, W.Y.; software, L.X.; validation, S.L.; formal analysis, S.L.; investigation, C.L. and S.L.; data curation, S.L.; writing--original draft preparation, S.L.; writing--review and editing, C.L.; and supervision, C.L., L.X. and W.Y. All authors reviewed the manuscript.  
This research was funded by the National Natural Science Foundation of China (Grant Nos. 91648204 and 61802426), Science Challenge Project (Grant Nos. TZ2017002 and TZ2016002), and Natural Science Foundation of Hunan Province of China (No. 2019J50723).  
The authors declare no conflict of interest.  
The following abbreviations are used in this manuscript:  
\begin{tabular}{l l} AUV & Autonomous Underwater Vehicle \\ LLS & lateral line system \\ CFD & Computational Fluid Dynamics \\ ReLU & Rectified Linear Unit \\ \end{tabular}