# Virtual Streamline Traction: Formation Cooperative Obstacle Avoidance Based on Dynamical Systems
## 2 Obstacle-Avoidance Formulation
### Trap Areas  
During the creation of obstacle models, overlapping is commonly observed. At the intersection of two obstacles, both \(\Gamma_{k}\) and \(\Gamma_{k+1}\) become 1. Thus, the denominator of the weight Equation (4) becomes 0, which leads to the failure of navigation planning. As depicted in Figure 3, when a USV continues toward the overlapping region of two obstacles, it can easily become ensnared in the \"trap area\" formed by these obstacles. Trap areas are particularly prevalent when constructing models of large-scale obstacles, such as coastal areas and ports. Since these large-scale obstacles often contain multiple smaller obstacles, it is crucial to appropriately fill these trap areas based on the boundary volume of the obstacles to ensure unimpeded navigation. The method for filling these areas is detailed in Figure 4.  
Figure 3: Trap area formed by the boundaries of two obstacles and their common tangent line. The trap-area-filling method effectively addresses all identified trap areas. However, in the expansive maritime environment, obstacles are generally scarce and not overly large, comprising primarily small islands and vessels. Employing the trap-area method might inadvertently enlarge the obstacle volume, leading to deviations from the optimal route. This is particularly problematic for USVs operating at sea, where conditions for replenishing power sources are limited. In such scenarios, adhering to the shortest possible route is paramount. To address these issues, employing a virtual target point is recommended because it offers a solution to the trap-area problems. This approach is illustrated in Figure 5.  
Figure 4: (**a**) Black lines depict shores and islands, while the blue line represents obstacle information generated based on the strength of the echo after radar-sensor scanning. (**b**) The red line represents obstacle information after the effective filling of trap areas using composite polygons based on shores, islands, and radar information. Figure 5: Virtual target point method of avoiding trap areas, (**a**) is the schematic diagram, (**b**) is the flow chart. When obstacles overlap and the heading of the USV points toward the trap area, it becomes crucial to determine the generation of virtual target points. Initially, upon entering the trap warning area, a sector navigation domain is established based on the angular velocity boundary limit, given the current velocity amplitude. A set of virtual target points, \(\mathit{Vir}_{1,2,3,4...p}\), on the arc of the sector navigation domain, is obtained (illustrated by the red arc in Figure 5). The selection of reasonable virtual target points is guided by specific criteria, which are detailed as follows:  
First, drawing inspiration from articles concerning the presence of radar targets within a specified area [32; 33; 34], lines \(l_{1}\) and \(l_{2}\) are constructed perpendicular to the tangent line at the tangent point. Starting from the virtual target point, a ray is projected onto one of these lines, \(l_{1}\) and \(l_{2}\). When the ray intersects both \(l_{1}\) and \(l_{2}\), the virtual target point is considered feasible. Conversely, if the ray only intersects with one of the lines \(l_{1}\) and \(l_{2}\), the virtual target point is considered unfeasible and is therefore excluded from generating the corresponding feasible domain. Second, the optimal virtual target point is determined based on the cost function \(\mathit{Eva}\):  
\[\mathit{Eva}=\lambda_{1}\gamma+\lambda_{2}\chi+\lambda_{3}\mu, \tag{9}\]  
\[\gamma= \begin{cases}\prod\limits_{k=1}^{K}1/\Gamma_{k}(\mathit{Vir}_{p})\, \Gamma_{k}(\mathit{Vir}_{p})>1\\ \qquad\qquad+\infty\qquad\qquad\Gamma_{k}(\mathit{Vir}_{p})\leq 1^{\prime} \end{cases} \]  
\[\chi=\frac{d\big{(}\mathit{Vir}_{p},\xi_{d}\big{)}-\mathsf{mind}\big{(} \mathit{Vir}_{p},\xi_{d}\big{)}}{d_{\max}\big{(}\mathit{Vir}_{p},\xi_{d}\big{)} -\mathsf{mind}\big{(}\mathit{Vir}_{p},\xi_{d}\big{)}},\]  
\[\mu=