# Collision Avoidance Using Finite Control Set Model Predictive Control for Unmanned Surface Vehicle
## 4 Simulation Study and Results
### Collision Avoidance in a Complex Environment  
In this test, in order to simulate an area having enough space for the USV to avoid collisions, the dimensions of the area constructed are 1100 m \(\times\) 1100 m. In Figure 5, the static obstacles are 50 randomly generated circular obstacles, the radius of which is from 10 m to 60 m. The static environment is more complex than practice. The starting point for the USV is marked as a red '+' marker. Considering the fact that it is unreasonable to set the end point of the USV as a point, the end area is set to a red circular region with a radius of 35 m.  
In Figure 5, the whole process of the USV from the starting point to the ending area is guided by the FCS-MPC algorithm according to the dynamics of the USV. Figure 5a,b describes the starting process of the USV. In Figure 5c,d, the USV reduces its speed by taking into account the risk of the region to be passed and accelerates after passing. In Figure 5e,f, in order to achieve reaching of the ending area, the yaw rate of the USV reaches a larger value, and the speed will decrease accordingly due to the influence of motion characteristics. Figure 5g,h describes the process of the USV arriving at the ending area. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Parameter** & **Value** & **Units** \\ \hline \multirow{5}{*}{USV} & Initial speed of USV & 0.0 (0.0) & m/s (kn) \\  & Initial thruster speed & 0.0 & r/min \\  & Maximum thruster speed & 66.7 (4000) & r/s (r/min) \\  & Change rate of thruster speed & 6.7 & r/s\({}^{2}\) \\  & Discrete thruster speed & 1.7 (100) & r/s (r/min) \\  & Initial propulsion angle & 0.0 & \({}^{\circ}\) \\  & Maximum propulsion angle & 30.0 & \({}^{\circ}\) \\  & Change rate of propulsion angle & 5.0 & \({}^{\circ}\)/s \\  & Discrete propulsion angle & 1.0 & \({}^{\circ}\) \\ \hline \multirow{5}{*}{CAS} & Detection area & 250.0 & m \\  & Distance range & 200.0 & m \\ \cline{1-1}  & Prediction horizon & 15.0 & s \\ \cline{1-1}  & Control update interval & 1.0 & s \\ \cline{1-1}  & Weight of evaluation function & (0.70, 1.50, 1.50, 0.50) & – \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Parameter information about the USV and CAS. On the basis of static environment simulation, two dynamic obstacles (circles with a radius of 20 m) are added. The information of dynamic obstacles is as shown in Table 2, and the values of other parameters are consistent with the static environment. In Figure 6, the Number 1 and 2 cyan circles represent Dynamic Obstacles 1 and 2. Dynamic Obstacle 1 enters the detection area and becomes magenta at 39 s. When the time is 55 s, Dynamic Obstacle 1 and the USV form a crossing situation, forcing the USV to decelerate. The USV completely avoids Dynamic Obstacle 1 at 62 s. After 78 s, Dynamic Obstacle 1 leaves the detection area. At 93 s, Dynamic Obstacle 2 is detected by CAS in the detection area. Dynamic Obstacle 2 and USV form a head-on situation. During the time period 93-104 s, USV avoids Dynamic Obstacle 2, and at 174 s, it successfully reaches the ending area. In Figure 6j, the blue solid curve is the track in the dynamic environment, and the blue dashed curve is in the static environment. Table 3 and Figure 7 display the evaluation index and compare the graph of the main parameters between static and dynamic environments. Figure 7a-d shows the control input (thruster speed and command propulsion angle) and state output (the speed and course) of the USV during the whole process. In the two tests, the USV and thruster should adjust their speed according to the risk level under the premise of keeping the maximum speed during sailing time. In addition, the maximum size of the command propulsion angle is 16\({}^{\circ}\) in static and dynamic environments, which is far less than 30\({}^{\circ}\), so the system is stable. Figure 7e shows the computing time of CAS, and the maximum computation time is 0.22 s, far less than the update time of 1.0 s. Figure 7f displays the distance between obstacles and the USV in the distance range.