# Optimal Design of I-PD and PI-D Industrial Controllers Based on Artificial Intelligence Algorithm
## 3 Methods of AIS Algorithm for Industrial Controllers
The _ISE_ corresponds to the antigen, _Ag_, in the parameters of the AIS algorithm. Step 1. Initialization population creates an initial population with controller parameters randomly selected within specified ranges. Each member of the antibody population, _Ab_, represents a set of controller parameters (\(K_{P}\), \(T_{I}\), \(T_{D}\)). Step 2. Affinity: calculating _ISE_ for each antibody by simulating the control system with appropriate controller parameters. This score determines the affinity of each antibody, with lower _ISE_ values indicating a higher affinity. Step 3. Selection: choosing the best solutions, (\(K_{P}\), \(T_{I}\), \(T_{D}\)), based on the minimum value of _ISE_ performance criteria. Step 4-6. Cloning, mutation, and re-selection: cloning selected sets of controller parameters to create multiple copies, and the modification of these clones. Choosing the best solutions, (\(K_{P}\), \(T_{I}\), \(T_{D}\)). Step 8. The population cycle continues until the minimum performance criterion is reached. Step 9. Selecting antibodies with the highest affinity as a set of parameters for the optimal controller, (\(K_{P}\), \(T_{I}\), \(T_{D}\)). Implementation of optimal controller parameters in an industrial control system. Table 1 shows the comparison between the design parameters of an AIS and the definition of the control system. The parameters of the AIS algorithm such as population size, \(N\), mutation probability, \(p_{m}\), proportion of permutations \(d\), cloning multiplier, \(\beta\), affect the variety of solutions and determine the efficiency and accuracy of optimization. The correct setting of these parameters allows you to find the optimal controller parameters. The initial population size in AIS algorithms, \(N\), is an important parameter for optimization. The optimal population size will depend on the specific problem and control law, but there are general strategies that can be used to optimize controllers. It is recommended to start with a moderate population (approximately 30-50 individuals) and adjust this based on the results obtained. This ensures sufficient diversity of solutions while avoiding local minima and maintaining acceptable runtime. A larger population (50-100 or more individuals) allows for more comprehensive exploration and reduces the risk of getting stuck in local minima. Examples of parameters (\(p_{m}\), \(d\), \(\beta\)) for the algorithm:  
1. High probability of mutation and a large proportion of permutations (\(p_{m}\) = 0.7, \(d\) = 0.5, \(\beta\) = 0.5): this can lead to significant changes in the population in each generation. This contributes to a broad exploration of the solution space and allows for a more comprehensive search for an optimal solution, but it may take more time to converge on a single optimal solution. This approach is suitable for complex problems with many local optima. \begin{table}
\begin{tabular}{c c c} \hline \hline
**AIS** & **Control System** & **Definition** \\ \hline \(N\) & & Population size vs. size of controller parameters set \\ \hline \(Ab(x_{i})\) & (\(K_{P}\), \(T_{I}\), \(T_{D}\)) & Antibody population vs. set of controller parameters \\ \hline \(Ag\) & _ISE_ & Antigens vs. _ISE_ \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The relationship between an AIS and a control system. 2. Low probability of mutation and a small proportion of permutations (\(p_{m}=0.2\), \(d=0.2\), \(\beta=0.5\)): the population changes minimally, resulting in fast convergence on a solution. However, the algorithm may get stuck in one of the local optima, limiting its ability to explore other domains of the solution space. This approach might be preferable for problems with well-defined solution spaces or for simpler problems. 3. High cloning multiplier (\(p_{m}=0.5\), \(d=0.3\), \(\beta=0.8\)): this setting causes the algorithm to create many copies of the best solutions. This allows for a thorough exploration of the vicinity of these solutions, which can enhance the accuracy of the optimization process.