## 3 Approach
### Collision Avoidance Algorithm
#### 3.2.2 VO Algorithm Based on Dynamic Window Algorithm  
After calculating the colliding VO sets by elliptic VO algorithm, the data in the non-VO sets were the optional collision avoidance velocity vectors for the USV. However, due to the constraint of the dynamic performance of the USV, many velocity vectors in the non-VO sets were inaccessible to the USV. The dynamic window algorithm considered the kinematic performance of the USV [20], and only calculated the moving velocity that the USV can reach within a given time window \(\Delta t\), that is, the velocity window \(v_{d}\):  
\[v_{d}=\left\{v\Big{|}v\in\left[v_{c}-\dot{v}\Delta t,v_{c}+\dot{v}\Delta t \right]\right\} \tag{9}\]  
and the angular velocity that can be achieved, that is, the angular velocity window \(\omega_{d}\):  
\[\omega_{d}=\left\{\omega\Big{|}\omega\in\left[\omega_{c}-\dot{\omega}\Delta t,\omega_{c}+\dot{\omega}\Delta t\right]\right\} \tag{10}\]  
In Equation (9), \(v_{c}\) is the current moving speed of the USV and \(\dot{v}\) is the acceleration of the USV. In Equation (10), \(\omega\) is the current angular velocity of the USV and \(\dot{\omega}\) is the angular acceleration of the USV. According to Equation (11), the heading angle that the USV can get within \(\Delta t\) can be calculated:  
\[\theta_{d}=\left\{\partial\Big{|}\partial\in\left[\theta_{h}+\omega_{c} \Delta t-\frac{1}{2}\dot{\omega}\Delta t^{2},\theta_{h}+\omega_{c}\Delta t+ \frac{1}{2}\dot{\omega}\Delta t^{2}\right]\right\} \tag{11}\]  
where \(\theta_{h}\) is the current heading of the USV.  
Through the Equations (9) and (11), \(v_{d}\) and \(\theta_{d}\) can be determined, but the elements in sets of \(v_{d}\) and \(\theta_{d}\) are continuous, which is not conducive to calculation in engineering. Therefore, \(v_{d}\) is discretized into \(M\) speeds and \(\theta_{d}\) is discretized into \(N\) heading directions. Each discretized velocity \(v_{i}\) and heading  
Figure 6: Ellipse tangents.  
\(\theta_{i}\) form a velocity vector \((v_{i},\theta_{i})\), and then there are \(M\times N\) velocity vectors. The set of velocity vectors is called reachable velocity (RV). The velocity vectors satisfying Equation (9) in the RV set will collide with the obstacle. Excluding these velocity vectors from the RV set can obtain a safe set of velocity vectors, called reachable avoidance velocity (RAV):  
\[RAV=\{V|V\in RV,V\
otin VO\} \tag{12}\]  
As shown in Figure 7, the red area is VO area, the intersection of RV and VO is the velocity vector where collision will occur, and the RAV part is the safe velocity vector.  
After obtaining the RAV, it was necessary to select the appropriate velocity vector in the RAV according to the mission requirements. In different missions, there are different selection criteria, and the following evaluation formula was used to select in this mission:  
\[G_{ij}=\frac{1}{\|(v_{c}\cos\theta_{h}-v_{i}\cos\theta_{i},v_{c}\sin\theta_{h }-v_{i}\sin\theta_{i})\|} \tag{13}\]  
where \(v_{c}\) is the current speed of the USV, \(\theta_{h}\) is the current heading of the USV, \((v_{i},\theta_{i})\) is a certain velocity vector in RAV, and \((v_{i},\theta_{i})\), which can maximize \(G_{ij}\), is taken as the velocity vector for the USV to avoid the obstacle. Once a velocity vector is selected, the USV will always travel along this speed vector until there are new dangerous situations or the obstacle is completely avoided.