## 2 Control Problems Addressed and General Description of the Tool Developed  
The kind of systems that the developed tool address is  
\[ \begin{split}\dot{x}&=f(x)+g(x)u\\ e&=h(x)-r\end{split}  \tag{1}\]  
where \(x\in\mathbb{R}^{n}\); \(u,e\in\mathbb{R}\); \(f:\mathbb{R}^{n}\rightarrow\mathbb{R}^{n}\); \(g:\mathbb{R}^{n}\rightarrow\mathbb{R}^{n}\); \(h:\mathbb{R}^{n}\rightarrow\mathbb{R}\) and \(r\) is a constant. The control objective is to build \(u\) such that \(e\to 0\). The general system described by Expression (1) includes all single input, single output dynamical systems that is in any of the following categories:  
* Can be described by a transfer function
* Linear systems that can be described by \(\dot{x}=Ax+bu\)
* Affine nonlinear systems that is nonlinear system where the control appears in linear form. Such systems includes many chemical process, electrical systems, electronics power converters, electro-mechanical systems systems, etc. As was mentioned on the previous Section, the proposed tool are composed of several parts among which the main if an evolutionary algorithm that only produce controllers with a pre-specified morphology. The here developed tool has other parts including: the software to automatically simulate any SISO nonlinear affine control system, controlled by any controller. These parts of the proposed tool are not described in depth due to the interested reader can examine the source code of the tool included in supplemental material of this work and in ([[https://github.com/control-lab-org/HTSMC](https://github.com/control-lab-org/HTSMC)]([https://github.com/control-lab-org/HTSMC](https://github.com/control-lab-org/HTSMC)) (accessed on 3 July 2023)). Some features of the developed tool are similar to what has been done in [19]; however, is worth noting that in this paper only free software is employed. In the rest of this Section an overview of the proposed EA is presented. Evolutionary algorithms start with the creation of a set of non-optimal potential solutions (the initial generation) and then creating a new set of solutions (a next generation) from the existing one. In control applications, creating the initial generation means to build a set of controllers. The elements of the next generation are derived from the existing generation. By the creation of successive generations, initial controller (elements of the first generation) are modified; terms are added, removed or adjusted through a selection mechanisms and so called genetic operations (GOs). Hopefully, each new generation is somewhat better than the previous one. The process of creating the next generation stop when a near optimal solution is found. In Figure 1, it is depicted the flow diagram of the algorithm; symbols of the figure mean:  
* \(u^{k}=\{u_{1}^{k},u_{2}^{k},\cdots,u_{n}^{k}\}\) is the k-th generation. * \(u_{i}^{k}\) is the i-th element of the k-th generation. * \(F_{i}^{k}\) is the fitness of \(u_{i}^{k}\). * \(J(u_{i}^{k})\) is the cost function evaluated at \(u_{i}^{k}\). * \(G_{o}\) represent the set of genetic operations that take a generation and provides a new one. The algorithm proceed as follows:  
1. Step 1: An initial set of controllers is created at random. This set of controllers is the initial generation \(u^{0}\). 2. Step 2: Each element of a generation is evaluated: \(F_{i}^{k}=J(u_{i}^{k})\). Based on how well an element solves the problem a fitness is assigned to it. 3. Step 3: Examine the stop condition. Such condition should check in someway if a near optimal control has been found. 4. Step 4: If stop condition has not been reached, a next generation is created: \(u^{k+1}=G_{o}(u^{k})\). To this end, selection mechanisms and genetic operations is employed, and the process is repeated from step 2. Figure 1 and previous steps is a general description of the algorithm. However what distinguishes the here proposed algorithm are the process of creation of initial generations, evaluation of controllers and creation of next generation.