## 3 Implementation of the OAC-DES
### Evolutionary Algorithm in OAC-DES
#### 3.2.2 The Proposed (1+1)-DES  
A characteristic of the feedback control system is that it responds to the desired input value (cause) with a measured output value (effect) such that the error tracking value becomes as small as possible. Thus, the response of the system must be instantaneous if we wish to build a purely reactive system. This assumption requires that the decision feedback response takes less than 5 ms. In our study, the decision-making process governing this response is entrusted to the single membered (1+1)-DES. Because we are dealing with a non-linear, single-degree-of-freedom robotic mechanism, we must solve the 1-dimensional optimization problem. Although the question may arise as to why EAs were used for solving such a seemingly trivial problem, it can be asserted that an increase in problem dimension would not have had a crucial influence on the performance of the proposed algorithm. In each generation \(g\), the proposed algorithm maintains two individuals \(\mathbf{x}_{orig}^{(g)}=(x_{orig}^{(g)},\sigma^{(g)})^{T}\) and \(\mathbf{x}_{init}^{(g)}=(x_{init}^{(g)},\sigma_{0})^{T}\). The first individual \(\mathbf{x}_{orig}^{(g)}\) denotes an evolution of the original solution, where the regular mutation step size \(\sigma^{(g)}\) normally decreases in each generation due to the multiplicative process in Equation (3), and thus allows smaller and smaller modifications of the problem variable \(x_{orig}^{(g)}\). The second individual \(\mathbf{x}_{init}^{(g)}\) starts the evolution process using initial mutation step size \(\sigma_{0}\) in each generation anew, and thus allows for larger modifications of the problem variable \(x_{init}^{(g)}\). However, the better of the two individuals according to the fitness function is preserved in the new best solution \(\mathbf{x}_{\text{best}}^{(g)}=(x_{\text{best}^{\prime}}^{(g)},\sigma_{\text{ best}}^{(g)})^{T}\). The effect of using two different individuals in the (1+1)-DES is depicted in Figure 6, from which reactions of the algorithm to the hypothetical step signal can be viewed. Practically speaking, the modifiable regular step sizes \(\sigma^{(g)}\) are used to retain the current level (horizontal step signal) and to move the constant larger, initial ones \(\sigma_{0}\) to a higher/lower signal level (vertical step signal). In summary, the pseudocode of the proposed (1+1)-DES is illustrated in Algorithm 1, from which it can be seen that the proposed algorithm is launched at every sampling time \(T_{sv}\in[1,5]\) ms using the following parameters: desired (reference) velocity \(\omega_{r}(k)\), measured velocity \(\omega_{a}(k-1)\), regular reference current \(i_{r}(k)\) and mutation step size \(\sigma\), respectively. Actually, the last two parameters represent the starting point for the evolutionary search process. In each generation, two individuals \(\mathbf{x}_{orig}\) and \(\mathbf{x}_{init}\) using different search strategies (i.e., different starting mutation step sizes) compete with each other to become the current best solution \(\mathbf{x}_{best}\). Finally, the (1+1)-DES algorithm returns this best solution consisting of the best reference current \(i_{r}^{\text{best}}(k+1)\) and \(\sigma\) as optimized by the (1+1)-DES, and the best velocity \(\hat{\omega}_{best}^{(g+1)}(k)\) as predicted by the ANN. Moreover, the best reference current is put on the control plant, and thus controls the velocity controller. Interestingly, the algorithm consists of two functions: (1) the 'evaluation' implementing Equation (5) and (2) the'mutation' implementing Equation (3). We should emphasize that two fitness function evaluations are launched in each generation. ```
0: Reference \(\omega_{r}(k)\), measured \(\omega_{a}(k-1)\), reference \(i_{r}(k)\) and \(\sigma\).