# Data-Driven Identification of Crane Dynamics Using Regularized Genetic Programming
## 3 Experiment and Results
### Comparison with NARX-NN and TSF-ARX Models  
The G3P-SR algorithm was compared with the NARX-NN and TSF-ARX models. The number of input delays for both submodels, as well as the number of output delays for the velocity submodel of the NARX-NN (Figure 5), was chosen to be of the same order as that for the G3P-SR. The NARX-NN sway submodel required an additional delay \(\alpha(k-5)\), as the results with only four output delays were unsatisfactory. The structures of NARX-NN with three, four, and five hidden neurons were tested for the velocity model, while, for the sway model, the number of hidden nodes was chosen to be three, five, and six. The appropriate number of input and output delays for the local linear models (7) of the TSF-ARX system (Figure 6) was found using the minimum description length (MDL) criterion implemented in MATLAB's system identification toolbox, which resulted in the velocity and sway models given in (10) and (11), respectively. The coefficients were computed using the linear least squares method at the operating points, and a linear membership function was used to interpolate between the linear models. \[v_{k}+a_{1}^{1}(l,m)v_{k-1}+\dots+a_{4}^{1}(l,m)v_{k-4}=b_{1}^{1}u_{k-4} \tag{10}\]  
\[\alpha_{k}+a_{1}^{2}(l,m)\alpha_{k-1}+\dots+a_{6}^{2}(l,m)\alpha_{k-6}=b_{1}^{ 2}v_{k-1}+b_{2}^{2}v_{k-2} \tag{11}\]  
The model terms and their corresponding coefficients for the sway and velocity model obtained in identification experiments using the G3 PSR are given in Table 8. We notice that the mass of the payload \(m\) and rope length \(l\) appear in only one model term for the velocity as opposed to fourteen model terms for the sway; this is due to the high mechanical impedance of the crane mechanism leading to the payload having a miniscule impact on the velocity of the trolley. All the identification methods presented in this work were trained in a series-parallel configuration, resulting in a 1-step-ahead predictor. The \(k\)-step-ahead predictor was obtained by placing \(k\) number of 1-step-ahead predictors in a series, in which the predicted output \(\hat{y}(k-i-1)\) of the \(i\)th predictor was the input into the \((i+1)\)th predictor, where \(1\leq i<k\). The simulation was obtained by closing the loop and using the measured outputs only as the initial states. The models' performances for the 1-step-, 10-step-, 20-step-ahead predictions and for the simulations evaluated on the testing data using the MSE, as well as the complexity of the models (the number of parameters to be estimated \(P\)), are presented in Table 9.  
The crane velocity model obtained from the G3P-SR algorithm had the lowest complexity, with a total of 24 estimated non-zero parameters, as opposed to the 52, 69, and 86 for the NARX-NN with three, four, and five neurons in the hidden layer, respectively, and 30 for the TSF-ARX. The NARX-NN with five hidden neurons had the best 20-step-ahead prediction accuracy on both test sets at the expense of having 86 parameters in the model, while the G3P-SR algorithm produced the velocity model with the best simulation accuracy on both test sets while also having the least number of parameters in the model. The NARX-NN with five hidden neurons outperformed the TSF-ARX and the remaining NARX-NN models; therefore, it was the only model compared with the G3P-SR model output on the data from experiment 9 in Figure 13 and the data from experiment 10 in Figure 14. The fitness function for the training and validation data for the G3P-SR crane velocity model is shown in Figure 15a. The algorithm seemed to have plateaued at around 100 generations, but the best model was found in the 466 th generation. The semantic diversity computed as the standard deviation of the population at a given generation is shown in Figure 15c. The G3P-SR and TSF-ARX sway models had 23 and 48 parameters, respectively, while the complexity of the NARX-NN model increased from 52 to 103 parameters with the increase in the number of hidden neurons from three to six.