## 2 Materials and Methods
### Genetic Programming-Based Identification
A context-free grammar \(G\) is the 4-tuple \((S,N,\Sigma,P)\), where \(S\in N\) is the start symbol, \(N\) is a finite set of nonterminalsymbols, \(\Sigma\) is an alphabet of terminal symbols, and \(P\) is the set of production rules of the form \(X\to\beta\), where \(X\in N\) and \(\beta\in(N\cup\Sigma)^{*}\). For identifying the crane system dynamics, the grammar was constructed in such a manner that the model regressors are monomials, thereby resulting in a polynomial NARX model; however, the grammar allows for additional operations on the parameters \(l\) and \(m\), such as division and square root. The grammar, in Backus-Naur form (BNF), is given in Table 1.  
In every generation, new individuals, called offspring, are produced by selecting individuals from the existing population, called parents, that pass through a stochastic variation operator. A total of four different variation operators were used: two binary variation operators, namely, subtree crossover and high-level crossover, and two unitary variation operators, namely, subtree mutation and point mutation. Since every model term is represented by a separate tree, the selection of a parent occurs in two stages. In the first stage, the model is selected from the population by tournament selection, after which a model term is selected from the model to undergo variation. The model term is selected with the probability of selection given by  
\[P=\frac{\exp\overline{\theta}_{i}}{\sum_{i=1}^{M}\exp\overline{\theta}_{i}} \tag{14}\]  
where \(\overline{\theta}_{i}=\frac{\sum_{i=1}^{M}|\theta_{i}|-|\theta_{i}|}{\sum_{i=1 }^{M}|\theta_{i}|}\) is the normalized term coefficient. In both crossover methods, two parents are selected; in subtree crossover, two root nodes of the subtrees are selected, and the subtrees are switched in a manner so that the resulting offspring is syntactically correct. In high-level crossover [47], the selected model terms are switched between the two parents. In both mutational methods, only one parent is selected from the population. Subtree mutation is similar to subtree crossover, but instead of a subtree from a second parent, a new subtree is randomly generated. In point mutation, a single terminal node is changed in a manner so that the resulting offspring is syntactically correct. The genetic programming parameters used for the identification of the overhead crane dynamics are given in Table 2. \begin{table}
\begin{tabular}{l l} \hline \hline \(\langle\text{exp}\rangle\)::= & \(\langle\exp\rangle\) \(|\) \(\langle\text{T}\rangle\) \\ \(\langle\exp\rangle\)::= & \(\times\langle\exp\rangle\langle\exp\rangle\) \(|\) \(\times\langle\exp_{\text{p}}\rangle\langle\exp\rangle\) \(|\) \(\langle\text{T}\rangle\) \\ \(\langle\exp_{\text{p}}\rangle\)::= & \(\times\langle\exp_{\text{p}}\rangle\langle\exp_{\text{p}}\rangle\) \(|\) \(\times\langle\exp_{\text{p}2}\rangle\langle\exp_{\text{p}2}\rangle\) \(|\) \(\surd\langle\exp_{\text{p}}\rangle\) \(|\) \(\langle\text{T}_{\text{p}}\rangle\) \\ \(\langle\text{exp}_{\text{p}2}\rangle\)::= & \(+\langle\exp_{\text{p}2}\rangle\langle\exp_{\text{p}2}\rangle\) \(|\) \(\times\langle\exp_{\text{p}2}\rangle\langle\exp_{\text{p}2}\rangle\) \(|\) \(\surd\langle\exp_{\text{p}2}\rangle\) \(|\) \(\langle\text{T}_{\text{p}}\rangle\) \\ \(\langle\text{T}\rangle\)::= & \(\xi(k-1)|\) \(\cdots\) \(\big{|}\) \(\xi(k-N_{\xi})\) \(\big{|}\) \(y(k-1)|\) \(\cdots\) \(\big{|}\) \(y(k-N_{u})\) \\ \(\langle\text{T}_{\text{p}}\rangle\)::= & \(m\) \(l\) \(l\) \\ \hline \end{tabular}
\end{table} 
Table 1: Grammar used for polynomial NARX models.