## 5 Simulations
### FO PI\({}^{\lambda}\)D\({}^{\mu}\) Controller Based on the IPSO Algorithm  
Since the ship's nonlinear model parameters changed with the speed, the calculated FO PI\({}^{\lambda}\)D\({}^{\mu}\) controller parameters could not meet the dynamic changes of the model's parameters. The corresponding nonlinear model's parameter values for ship course control at different speeds are shown in Table 4.  
Figure 12: Course-tracking curves with FO PI\({}^{\lambda}\)D\({}^{\mu}\) controller and PID controller.  
Figure 13: Rudder angle curves with FO PI\({}^{\lambda}\)D\({}^{\mu}\) controller and PID controller.  
In the next stage, the objective was to check the self-adjustment of the controller based on IPSO. The simulation used the Norrbin nonlinear model in Equation (3). The five parameters of the FO PI\({}^{\lambda}\)D\({}^{\mu}\) controller were adjusted using the IPSO algorithm for the ship's course, and the effectiveness of the algorithm was verified by simulation experiments. Following the design step of the FO PI\({}^{\lambda}\)D\({}^{\mu}\) controller, the fitting frequency of the Oustaloup filtering method (\(\omega_{b}\), \(\omega_{k}\)) was [0.001,1000] and \(N=5\). The population size was set to 50. The maximum number of the birds' steps was 50. The particle dimensions were 5, meaning [\(K_{p}\), \(K_{i}\), \(K_{d}\), \(\lambda\), \(\mu\)], and the initial values of \(c_{1}\) and \(c_{2}\) were set at 2. The inertia weight was set to 0.9. Four different control strategies were used for the ship's course, which were the PID controller [37], the PID controller based on the PSO algorithm [9], the FO PI\({}^{\lambda}\)D\({}^{\mu}\) controller based on the GA algorithm [19], and the FO PI\({}^{\lambda}\)D\({}^{\mu}\) controller based on the IPSO algorithm. The ship's speed increased from \(V=19.8\) knots to \(V=24.5\) knots at a constant speed, the maximum rudder angle was restricted from \(-35^{\circ}\) to \(+35^{\circ}\), and the desired course angle was \(30^{\circ}\) when the time was 0-1000 s. The comparison results can be seen in Figures 14 and 15 and Table 5.  
Meanwhile, wind and wave disturbances have been the main causes of yawing of ships when they are sailing at sea. In this design, wind and wave disturbances were introduced into the system, which verified the robustness. The disturbances used white noise to drive a typical second-order oscillation. The wave model [60] obtained under the  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \(V\) (knots) & \(K\) & \(T\) & \(\alpha\) & \(\beta\) \\ \hline
27.1 & 0.2676 & 186.9556 & 10.4915 & 7.5343 \\
26.5 & 0.2617 & 191.1885 & 10.7291 & 8.0578 \\
24.5 & 0.2419 & 206.7958 & 11.6049 & 10.  
effect of a force-six wind is that of Equation (38), and the simulation curve is shown in Figure 16.  
\[h(s)=\frac{0.4198s}{s^{2}+0.3638s+0.3675} \tag{38}\]  
Four different control strategies were used for a ship's course under wind and waves, and the results can be seen in Figures 17 and 18.  
It can be seen from Figures 17 and 18 that the FO PI\({}^{\lambda}\)D\({}^{\mu}\) controller based on the IPSO algorithm had a significantly better control effect than the automatic rudder PID controller, the PID controller based on the PSO algorithm, and the FO PI\({}^{\lambda}\)D\({}^{\mu}\) controller based on a GA algorithm. The FO PI\({}^{\lambda}\)D\({}^{\mu}\) controller based on the IPSO algorithm had the advantages of a small overshoot, short adjustment time, accurate control, and strong wind and wave resistance.  
Figure 16: The output curve of wind and wave disturbances.  
Figure 15: Rudder angle curves without disturbance.