# Virtual Streamline Traction: Formation Cooperative Obstacle Avoidance Based on Dynamical Systems
## 4 Disturbance-Based USB Formation Scheme  
### Formation Assembly  
Based on the previously discussed individual USV obstacle avoidance, the virtual guidance structure was integrated to achieve formation assembly, as shown in Figure 6.  
Figure 6 illustrates the assembly strategy. The virtual-structure point (VSP) corresponding to each USV in the formation is taken as the target point in the disturbed flow field. During assembly, the USVs in the formation perceive each other as obstacles according to the hierarchy \(\mathit{USV}_{1}>\mathit{USV}_{2}>\mathit{USV}_{3}\)....... \(>\mathit{USV}_{j}\). In other words, \(\mathit{USV}_{2}\) perceives \(\mathit{USV}_{1}\) as an obstacle, \(\mathit{USV}_{3}\) perceives both \(\mathit{USV}_{2}\) and \(\mathit{USV}_{1}\) as obstacles, and so on. Given the characteristics of the disturbed flow field mentioned in Section 2, this assembly strategy enables SUVs to effectively avoid obstacles and navigate toward their respective formation positions via shorter routes, fulfilling both assembly requirements and addressing concerns of obstacle avoidance and inter-vehicle collision during assembly.  
The virtual structure in a specified direction according to the formation task ensures all USVs are linked through the flow lines of the disturbed flow field. This dynamic formation assembly process, analogous to following guiding threads, facilitates formation navigation while overcoming the rigidity of the virtual structure and significantly enhancing the efficiency of task execution.  
To maintain formation shape, the vector and scalar components of the initial flow field of the individual USV are decoupled. Equation (1) is separated into a velocity vector \(\left[\frac{x_{d}-x_{1}}{d}\quad\frac{y_{d}-y_{1}}{d}\right]^{T}\) and velocity amplitude \(V\) based on the distance to the VSP, as shown in Figure 7.  
The relationship between each vehicle's velocity amplitude and distance to the VSP is expressed as follows:  
\[V=\left\{\begin{array}{cc}V_{\max}&d>d_{vir2}\\ V_{vir}+(V_{\max}-V_{vir1})e^{-\lambda_{vir1}(d_{vir2}-d)}&d_{vir1}<d\leq d_{vir2 }\\ V_{vir}e^{-\lambda_{vir1}(d_{vir1}-d)}&d\leq d_{vir1}\end{array}\right., \tag{10}\]  
where \(V_{\max}\) is the maximum velocity amplitude of the vehicle, \(V_{vir}\) is the preset velocity toward the VSPs (adjusted based on formation-task requirements), \(d_{vir1}\) and \(d_{vir2}\) are distance thresholds, \(d\) is the distance of the USV to the VSP, and \(\lambda_{vir1}\) and \(\lambda_{vir2}\) are constants  
Figure 6: Formation assembly by three USVs in the presence of obstacles.  
Figure 7: Distance relationship between USVs and VSPs.  
for adjusting the velocity amplitude. In Formula (10), we can make the preset values of \(d_{vir1}\) and \(d_{vir2}\) close to each other so that the velocity amplitude can converge faster on the preset speed \(V_{vir}\) and keep the distance \(d\) between the boat and the virtual structure point within the interval of \(d_{vir1}\) and \(d_{vir2}\). In Formula (10), when \(d=d_{vir2}\), \(V=V_{\text{max}}\). When \(d\to d_{vir1}\), \(V\) converges to \(V_{vir}\). When \(d=d_{vir1}\), \(V=V_{vir}\), Formula (10) can be regarded as a monotonically decreasing continuous function. In order to reduce the vibration of the velocity amplitude when it is constrained and affect the sailing effect, once each USV enters the range between \(d_{vir1}\) and \(d_{vir2}\) for the first time, it no longer perceives other USVs as obstacles. This ensures that each USV does not affect the others during formation navigation. After all the USVs enter the range between \(d_{vir1}\) and \(d_{vir2}\), formation assembly transitions to formation navigation.  
In summary, a virtual formation is established by connecting USVs and corresponding VSPs through flow lines generated by disturbing the flow field. Through the convergence of the velocity amplitude, the flow lines are tightened similarly to elastic strings so that the USVs maintain their shape and follow the motion of the virtual formation.