## 3 Implementation of the OAC-DES
### ANN-Learning  
ANNs are a universal tool for system modeling [35]. During the modeling, the ANN searches for an optimal mapping of the input to the output values. In our case, the main goal of the modeling is to incorporate the aforementioned non-linearity into the modeled system. This non-linearity is recognized during the ANN-learning process in which the proper ANN model is constructed on the basis of known pairs of input and output values. The learned ANN model is then capable of predicting output values according to the unknown input during the ANN-simulation.  
The principle of ANN-learning, launched at the start of each sampling time before (1+1)-DES optimization, is presented in Figure 5, from which it can be seen that the ANN consists of two inputs, \(n\)-neurons in hidden layer \"J\", and one neuron in output layer \"L\". Linear activation functions are used for neurons in both the hidden and output layers [36]. The two inputs enter the ANN-learning block, i.e., the reference current \(i_{r}^{\text{best}}(k)\) and previous actual rotational velocity \(\omega_{a}(k-2)\), while the output value returns the estimated rotational velocity \(\hat{\omega}(k-1)\), where \(k\) denotes the observed sampling time \(T_{sv}\). In the feedback system, the supervisory back-propagation (BPG) learning algorithm is engaged for modifying the weights in the hidden and output layers. Thus, the BPG learning algorithm is guided by decreasing the magnitude of tracking error on the one hand, and the learning pace controlled by two learning rates, i.e., the hidden layer learning rate \(\epsilon_{J}\) and output layer learning rate \(\epsilon_{L}\), on the other hand. The task of the BPG algorithm is to decrease the tracking error as much as possible.  
Practically speaking, we realized that two simple rules apply with regard to BPG learning rates: (1) the higher the learning rates \(\epsilon_{J}\) and \(\epsilon_{L}\), the more rapid the ANN-learning, and (2) divergence and instability may occur when the learning rates are set too high. Additionally, wrong starting weights may have a crucial influence on the stability of the system. Therefore, it is important to start the control process with proven weights found during so-called introductory ANN-learning, as described in detail below.  
Figure 5: Online ANN-learning.  
In summary, two diverse inputs in the ANN guarantee that it is equipped with enough information history for proper modeling. It is particularly important to keep the number of neurons in the input and hidden layers as low as possible. There are two reasons for this: (1) the learning process increases in complexity as the number of neurons increases, and consequently an extra time is needed for back-propagation, which is not suitable for real-time operation, and (2) the momentum problem occurs, whereby the ANN-simulation cannot predict the result properly due to low effect of the best reference current \(\dot{r}_{r}^{best}(k+1)\). By increasing the number of neurons, the variation of \(\dot{\omega}\) is lowered and therefore modeling becomes inaccurate. As a result, choosing the proper number of neurons in the hidden layer is crucial for system stability.