# Data-Driven Identification of Crane Dynamics Using Regularized Genetic Programming
## 3 Experiment and Results
### Comparison with MGGP  
To show the efficacy of G3P-SR, a comparison between G3P-SR and MGGP was performed with the MGGP hyperparameters given in Table 6. The G3P-SR algorithm was implemented in Matlab 2021a, and the GPTIPS 2.0 toolbox for Matlab was used to obtain the MGGP model. The models were evaluated for the 1-step ahead, 10-step ahead, 20-step ahead predictors and a simulation run. The model obtained was trained in a series-parallel configuration and, therefore, minimized the 1-step-ahead prediction; while this resulted only in an approximation of \(k\)-step-ahead predictions and simulations, it was faster than training the model in a series configuration, i.e., performing simulation error minimization. A total of 15 runs were performed for the velocity and sway submodels with G3P-SR and MGGP, and the Wilcoxon rank sum test was used to determine if the medians of the RMSE between the G3P-SR and MGGP models were different under the alternative hypothesis. The \(p\)-values for the velocity and sway submodels are given in Table 7, and the boxplots of the RMSE for the 1-step-, 10-step-, and 20-step-ahead predictors on test with operating points \(l=1.7\) m and \(m=10\) kg and \(l=1.1\) m and \(m=50\) kg, denoted as \(T_{1}\) and \(T_{2}\), respectively, for the velocity and sway submodels are given in Figures 10 and 11, respectively, while the boxplot for the number of model terms included in the models is given in Figure 12. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameters** & **Velocity Model** & **Sway Model** \\ \hline Function set & \(\times,+,-,\div,\tanh,\sqrt{,}\) & \(\mid\mid\) & \(\times,+,-,\div,\tanh,\) \\  & & \(\sqrt{,}\sin,\cos,\tan\) \\  & \(u_{k-1},\dots,u_{k-9},\) & \(v_{k-1},\dots,v_{k-8},\) \\ Terminal set & \(v_{k-1},\dots,v_{k-4},\) & \(\alpha_{k-1},\dots,\) & \(\alpha_{k-4},\) \\  & \(m,\,l\) & \(m,\,l\) \\ Population size & & 100 \\ Number of generations & & 500 \\ Initialization & & Ramped Half-and-Half \\ Maximum number of genes & & 50 \\ Maximum tree depth & & 5 \\ Tournament size & & 5 \\ Elitism & & 0.01 \\ Crossover probability & & 0.84 \\ Mutation probability & & 0.14 \\ Direct reproduction & & 0.02 \\ Ephemeral random constant & \([-10,10]\) \\ \hline \hline \end{tabular}
\end{table} 
Table 6: MGGP hyperparameters. \begin{table}
\begin{tabular}{c c c} \hline \hline  & \(l=1.7\) [m], \(m=10\) [kg] & \(l=1.1\) [m], \(m=50\) [kg] \\ \hline \hline
1-step ahead & 1.000 & 0.9097 \\
10-step ahead & 0.6776 & 0.2730 \\
20-step ahead & 0.4274 & 0.3075 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: \(p\)-values given by the Wilcoxon rank sum test. and \(m=50\) kg was not statistically significant, with a \(p\)-value of 0.0512. For the sway submodel, at operating point \(l=1.7\) m and \(m=10\) kg, the MGGP median RMSE for the 1-step, 10-step, and 20-step predictors was 4.00%, 6.41%, and 10.00% higher than the G3P-SR median RMSE, respectively. At operating point \(l=1.1\) m and \(m=50\) kg, the MGGP median RMSE was 9.09%, 14.61%, and 12.40% higher than the G3P-SR median RMSE, respectively. However, the Wilcoxon rank sum test showed that the difference between the MGGP and G3P-SR 10-step and 20-step ahead for operating points \(l=1.7\) m and \(m=10\) kg were not statistically significant, with \(p\)-values of 0.4067 and 0.5615, respectively. The median number of velocity model terms in the G3P-SR and MGGP models was 25 and 47, respectively, while the median number of sway model terms in the G3P-SR and MGGP models was 27 and 49, respectively. The mean run times of the velocity submodel were 11.2 min and 7.5 min for the G3P-SR and MGGP algorithms, respectively. The mean run times of the sway submodel were 10.7 min and 9.2 min for the G3P-SR and MGGP algorithms, respectively. Additionally, the obtained models were simulated, and all G3P-SR models were finite, while the MGGP algorithm produced 3 unstable sway models and 10 unstable velocity models.