## 3 Results
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multicolumn{2}{c}{**Velocity Model (3)**} & \multicolumn{2}{c}{**Sway Model (4)**} \\ \hline
**Coefficients \(\theta_{1}\)** & **Regressors \(\phi_{1}\)** & **Coefficients \(\theta_{1}\)** & **Regressors \(\phi_{2}\)** \\ \hline
0.0464 & \(u(k-7)\) & \(-29.5814\) & \(\alpha(k-2)^{3}\) \\
0.0508 & \(u(k-3)u(k-4)u(k-9)\) & 0.0208 & \(v(k-3)\) \\
0.9514 & \(v(k-1)\) & 22.8790 & \(\alpha(k-1)\alpha(k-2)\alpha(k-3)\) \\
0.1691 & \(v(k-4)u(k-1)u(k-4)\) & 0.0364 & \(l^{2}\alpha(k-2)\) \\
0.1263 & \(v(k-4)u(k-1)u(k-2)u(k-3)u(k-6)\) & 9.9522 & \(la(k-1)\alpha(k-3)\alpha(k-4)\) \\ \(-\)0.1294 & \(v(k-4)\) & \(-7.8066\) & \(\alpha(k-2)\alpha(k-3)\alpha(k-4)\) \\
0.0608 & \(v(k-4)u(k-5)^{2}\) & 0.4542 & \(\alpha(k-2)\) \\ \(-\)0.1743 & \(v(k-2)v(k-4)^{2}u(k-1)u(k-4)\) & \(-0.0205\) & \(v(k-1)\) \\ \(-\)0.0904 & \(v(k-3)u(k-4)u(k-5)\) & 0.8585 & \(\alpha(k-1)\) \\ \(-\)0.1309 & \(u(k-1)u(k-2)u(k-4)\) & \(-288.7701\) & \(l^{2}a(k-1)^{2}\alpha(k-2)\alpha(k-3)\alpha(k-4)\) \\
0.1115 & \(u(k-4)\) & 33.9964 & \(la(k-1)^{2}\alpha(k-4)\) \\  & & \(-17.9259\) & \(l^{2}\alpha(k-1)^{2}\alpha(k-4)\) \\  & & \(-0.5518\) & \(\alpha(k-4)\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Crane velocity and sway model terms and coefficients. verified with the NMPC-GP control scheme in terms of robustness against rope length and payload mass variation, as well as anti-disturbance performance. The NMPC with the GP-NARX prediction model and the PSO solver, denoted NMPC-GP controller, was tested in experiments carried out with a sample time \(t_{s}=0.1\) s and under the constraints on the control signal in the range \(-8\) V \(\leq u\leq 8\) V. The prediction and control horizon were established as \(N_{P}=20\) and \(N_{c}=5\), respectively, while the swarm size and number of iterations of the PSO were set in the experiments as \(n_{s}=40\) and \(n_{t}=100\), respectively. The error tolerance for the crane and payload positioning was assumed to be \(\pm 0.02\) m; thus, the desired range of magnitude of the residual sway was approximated in the controller as \(\alpha_{a}\approx 0.02/l\) rad. The weighting coefficients \(\lambda_{20}=70\) and \(\lambda_{3}=0.05\) of the fitness function (15) were selected empirically during the experiments. The NMPC algorithm with the PSO solver was implemented using a C-MEX S-function in Matlab R2020. The mean execution time and standard deviation for 100 runs of the NMPC algorithm with the above-mentioned settings were 2.72 and 0.0424 milliseconds, respectively. Three cases of experiments were carried out to investigate the performance and prove the feasibility and effectiveness of the developed control approach in terms of the controller's robustness against rope length and payload mass variation, in the case of an external disturbance affecting the pendulum, and by comparing the NMPC-GP with a linear discrete-time controller. The controller's performance was tested with both the operating points considered during the identification experiments, with rope lengths and payload masses not included in the training data. In Case 1, the experiments were performed for different operating points corresponding to varying rope lengths (\(l\) = {0.8, 1.4, 2.0} m) and payload masses (\(m\) = {10, 30, 50} kg), while the desired set point was \(x_{r}=1\) m. The control performance of the NMPC-GP controller is presented in Table 4 in terms of rise time \(t_{r}\), settling time \(t_{s}\), maximum magnitude of the pendulum oscillation \(\alpha_{max}\), and residual sway \(\alpha_{r}\), which is also converted to linear deviation from an equilibrium point. In addition, Table 4 includes data on the maximum deviation and residual deviation of the rope-suspended payload (\(d_{max}\) and \(d_{r}\), respectively). Figure 5: GP-NARX models’ performance on testing data: 20-step-ahead prediction of crane velocity and payload sway angle at operating points (**a**) \(\{l\) = 1.1 m, \(m\) = 50 kg\(\}\) and (**b**) \(\{l\) = 1.7 m, \(m\) = 10 kg\(\}\).