## 1 Introduction
The objective function was based on the integral-squared time-squared error (ISTSE) indicator extended by additional penalties for error and control signal changes to limit excessive growth of the optimized values. Such an objective function required the determination of two coefficients using the trial-and-error approach. In [8], the optimal parameters of the state-feedback controller were selected using an artificial bee colony algorithm with a non-trivial objective function. To minimize steady-state oscillations in permanent magnet synchronous motor drive, an additional component related to steady-state oscillations was added. Unfortunately, an additional weighting factor was required to balance the oscillation damping and good step response indicators. The proportional-integral-derivative (PID) controller was automatically tuned in [24]. The objective function was created by determining the required overshoot, minimizing the settling time and steady-state error. In [25], hybrid simulated annealing and manta ray foraging optimization algorithms were used to find the optimal PID controller parameters. The objective function does not utilize standard indicators such as integral absolute error (IAE) or integral-squared error (ISE). It is based on the value of rising time, overshoot, and steady-state error. In [12], the auto-tuning of a multi-resonant current controller is proposed with a nature-inspired optimization algorithm. The objective function was free of additional weighting factors and used the ISE indicator. However, additional requirements, such as a noise-free control signal and a minimal rise time, were determined. The violation function was used to ensure that the chattering would not appear. The second requirement ensured that the rise time would not be less than the predefined value. In such a case, the proposed objective and violation functions do not require additional weighting factors. To solve the constrained optimization problem, [PERSON]'s rule has been utilized [22]. To summarize the previously mentioned and discussed papers, nature-inspired optimization algorithms can be successfully applied to determine control structure parameters. The selection of the optimization algorithm is less important compared to the proper formulation of the objective function. The objective function must be determined for a particular case. In this paper, the methodology of formulating objective functions is presented and proposed in the form of the algorithm supported by an example. The authors discuss different indicators, the formulation of the objective function and the violation function, constraint-handling techniques, and the weighting factor selection process. The novelty of this paper is related to the proposed algorithm describing, step by step, how to apply nature-inspired optimization algorithms to select the optimal control structure parameters. To the best of the authors' knowledge, such an algorithm has not been presented in the literature before. This paper is summarized with case studies in which the objective function is determined and the simulation results are presented. This paper is organized as follows. Section 2 introduces the review of the system response performance indicators: the basic integral performance indicators, the step response indicators, and, finally, the examples of the formulation of additional requirements. The general idea of the application of nature-inspired optimization algorithms for multi-objective constrained optimization problems is presented in Section 3. The proposed methodology for selecting structure parameters using nature-inspired optimization algorithms is described in Section 4. In addition, the in-depth analysis of a simple example is included to provide better readability and understanding of the proposed methodology. Section 5 presents two real-world examples, where the proposed methodology can be applied. Section 6 concludes this study.