## 3 Proposed Methodology
### Optimization Algorithm  
The optimization process proposed in this study is a complex nonlinear problem that demands significant computation work. To enhance computational efficiency, the optimizer in Figure 4 employs a genetic algorithm that is implemented using the MATLAB Global Optimization Toolbox. Among stochastic global search optimization techniques, genetic algorithms are bio-inspired algorithms that emulate the processes of replication, crossover, and mutation that occur in natural selection and inheritance [28]. These optimization methods are designed to solve complex optimization problems that involve evaluating the cost function using simulation data and simulation-based approaches. GA generates new populations from a previous solution using selection, crossover, mutation, and migration criteria [29]. GA is based on improving the initial population so that, in each iteration, the algorithm achieves the best result. A population is made up of individuals called chromosomes, and each chromosome is encoded as an array of parameters, representing a possible solution. For problems with N dimensions, each chromosome is typically encoded as an array of N elements, where the i-th one is the specific value of the i-th parameter. In the proposed optimization, the chromosome consists of the elements of vector \(\rho\), which can be composed of one, two, or three elements (\(\text{k}_{\text{t}}\), \(\text{k}_{\text{y}}\), and/or \(\text{k}_{\text{0}}\)), depending on the IPC case. Figure 5 shows the GA steps for the proposed optimization. These steps are:  
Figure 5: GA steps: population initialization; computation of individual fitness based on the cost function; selection, which is the process for choosing the best individuals and discarding others; generation of a new population by mating the chosen candidates (crossover) and supplying randomness to the new offspring (mutation); and assessment of the new individuals. Iterations continue until the stopping condition is fulfilled [14]. Initial population: Before optimization, the tuning parameter search range is set manually using a bisection-type procedure, where the range is reduced by eliminating parameter values that cause instability during simulation. The search interval for the gains is [0-0.3] deg/(MN\(\cdot\)m\(\cdot\)s) for integral controllers or [0-2] deg/(MN\(\cdot\)m) for proportional controllers, and the range for the azimuth offset is [0-90] deg. An initial population of 100 individuals is created with parameter values evenly spaced within the defined range; the population size is 200 for the IPC cases with three parameters to be tuned. 2. Fitness assignment: After initialization, every individual in the population or chromosome is assigned a fitness value. When using a simulation-based approach, the fitness value of each member is calculated by running a simulation. The fitness function is equivalent to the cost function J being optimized. 3. Selection: Its purpose is to select the most suitable individuals and pass on their genes to the following generation. This study uses the roulette selection method, which assigns a higher probability of fitness to chromosomes with lower fitness values, making them more likely to be chosen. The fitness probability of the i-th individual is represented by \(\mathrm{P_{i}}=\mathrm{J_{i}}/\sum_{j=1}^{N}\mathrm{J_{j}}\) and its corresponding cumulative fitness probability \(\mathrm{q_{i}}=\sum_{j=1}^{i}\mathrm{P_{j}}\). Subsequently, a selection is made by considering the previous probability value's position in the roulette, represented on a cumulative probability of suitability scale. For this purpose, a pseudo-random number r uniformly distributed over the interval [0, 1] is generated. If \(\mathrm{q_{k-1}}\leq\mathrm{r}\leq\mathrm{q_{k}}\), then the k-th candidate is chosen as a parent. In order to reach the required number of parents, the number r is generated multiple times. The best chromosomes are always retained in the population (elite selection).