## 6 Simulations
From Figures 13 and 14, the errors are always kept within a reasonable error margin, indicating that ANFM can adequately learn the \(\psi\rightarrow\delta\) inverse dynamics of ship course control. Through offline learning, the initial values of the center \(C\), width \(\sigma\) and weight matrix \(W\) of each ANFM rule at this point are the corresponding values at the end of offline learning, respectively, as follows  
\[C= \begin{bmatrix}3.9551&43.3226&138.7384&321.2632&304.0374&294.7533\\ 2.9910&42.7975&137.8617&322.2676&305.1702&295.9340\end{bmatrix}  \tag{52}\]  
\[\sigma= \begin{bmatrix}405.39&111.97&269.37&38.477&14.531&26.192\end{bmatrix}  \tag{53}\]  
Figure 14: Root mean squared error in training. Figure 13: Output error in training. \[W= \begin{bmatrix}-562.799&89.394&-156.248&1154.4&46.487&48.629\\ 86.734&-35.134&-75.125&20.336&20.771&21.047\\ -85.027&35.127&-86.289&71.988&-20.496&-20.938\end{bmatrix}  \tag{54}\]  
To further verify the effectiveness of the ANFM structure, the paper then takes the input rudder angle as a sawtooth wave curve, with the rudder angle varying between \([-35^{\circ},35^{\circ}]\). \[\delta(k)=\left\{ \begin{array}{ll}7k/24,&0\leq k<120\\ -7k/24+70,120\leq k<360\\ 7k/24+140,360\leq k\leq 600\end{array} \right. \tag{55}\]  
The preset parameters of ANFM are kept constant and the input sawtooth wave curve is shown in Figure 15 and the simulation results are shown in Figures 16-19. As can be seen from the figure, the number of fuzzy rules gradually increases from 1 to 13 and then is pruned to 7 and saved until the end of the final learning, from which it can be argued that ANFM requires only seven fuzzy rules, or only seven RBF neural units, to describe the inverse dynamics of \(\psi\rightarrow\delta\) after the learning is complete. Through offline learning, the initial values of the center \(C\), width \(\sigma\) and weight matrix \(W\) of each ANFM rule at this point are the corresponding values at the end of offline learning, respectively, as follows  
\[C= \begin{bmatrix}3.9551&40.4649&135.5329&231.7632&304.0374&78.9814&84.1322\\ 2.9910&39.8792&134.6732&231.5733&305.1702&80.3030&85.4312\end{bmatrix}  \tag{56}\]  
\[\sigma= \begin{bmatrix}205.68&103.80&268.51&273.13&111.67&20.016&13.031\end{bmatrix}  \tag{57}\]  
\[W= \begin{bmatrix}-584.013&87.696&-215.734&1280.1&37.295&35.594&43.125\\ 90.3475&-34.491&85.637&-79.283&21.341&21.262&25.173\\ -88.312&34.463&-85.267&75.568&-21.474&-21.387&-25.323\end{bmatrix}  \tag{58}\]  
The parameters of the fractional-order \(\text{PI}^{\lambda}\text{D}^{\mu}\) controller are taken to be: \(K_{p}=0.083\), \(K_{i}=0.02\), \(K_{d}=1.23\), \(\lambda=0.012\), \(\mu=0.93\), learning rate \(\eta=0.04\), and the fractional-order calculus operator fitting frequency range \((\omega_{b},\omega_{h})\) is set to (0.001, 1000), while the weight matrix \(W\) of ANFM is adjusted online by Equation (49). The initial values of the different the center \(C\), width \(\sigma\) and weight matrix \(W\) obtained from the two different input learning  
Figure 19: Root-mean-squared error in training. Figure 18: Output error in training. It can be seen from Figures 20 and 21 and Tables 2 and 3, the ANF-FOPID controller can drive the ship to respond quickly to the desired course angle by first generating a maximum control rudder angle and then gradually reducing it and enabling the ship to accurately track the desired course \(\psi_{d}\). When the desired course angle setting is changed, the control effect has some oscillation, but the actual course of the ship can achieve fast and dynamic tracking with little overshoot. It is shown that the ANF-FOPID controller based on the ANFM offline learning mode can overcome the influence of uncertainty conditions arising from the variation of modeling parameters with speed and achieve satisfactory control results.