*4.2. Objective Function*

To optimize FLC, a number of objective functions are explored and the one that produces the best results (which are small speed tracking error and small torque overshoot) is further analyzed. These are *Integral Absolute Error*, *Integral Squared Error*, *Integral Time Absolute Error*, and *Integral Time Squared Error*, represented by Equation (22), where *θ* represents the decision variable vector.

$$\begin{split} f\_{IAE} &= f\_1(\omega\_{\rm{err}}(\boldsymbol{\theta})) = \int\_0^\infty |\omega\_{\rm{err}}(\boldsymbol{\theta})| \, dt \\ f\_{ISE} &= f\_2(\omega\_{\rm{err}}(\boldsymbol{\theta})) = \int\_0^\infty \omega\_{\rm{err}}^2(\boldsymbol{\theta}) \, dt \\ f\_{ITAE} &= f\_3(\omega\_{\rm{err}}(\boldsymbol{\theta})) = \int\_0^\infty |\omega\_{\rm{err}}(\boldsymbol{\theta})| \, t \, dt \\ f\_{ITSE} &= f\_4(\omega\_{\rm{err}}(\boldsymbol{\theta})) = \int\_0^\infty \omega\_{\rm{err}}^2(\boldsymbol{\theta}) \, t \, dt \end{split} \tag{22}$$

*<sup>ω</sup>err*(*θ*) represents the speed tracking error calculated as the difference between speed reference *ω*<sup>∗</sup> *r* and induction machine speed response *<sup>ω</sup>r*(*θ*), as shown in Equation (23). These responses are calculated through Simulink simulation of a drive system, which is shown in Figure 1. In the optimization procedure, the inverter and observer blocks are omitted from the simulation to speed up the computation. The parameters of the induction machine that is controlled are given in Table A1 in Appendix A, along with relevant simulation parameters.

$$
\omega\_{\rm err}(\theta) = \omega\_r^\* - \omega\_r(\theta) \tag{23}
$$

Simulated dynamics of a drive system are shown in Figure 5. It can be seen in Figure 5a that the speed reference is a function that is ramping from 0 to 1432.5 rpm during a 2 s period starting at 0.2 s of the simulation. Nominal load torque of 27 Nm is applied at the 3rd second of the simulation and it is constant till the end of the simulation, as can be seen from Figure 5b. Figure 5c represents the required machine torque profile calculated using Equation (24).

$$T\_c = J \frac{\mathbf{d}}{\mathbf{d}t} \omega\_r^\* + T\_I \tag{24}$$

It can be seen from Figure 5c that torque overshoot can appear at the beginning of ramping (*OS*1) and loading instance (*OS*3), while undershoot can appear at the end of ramping (*OS*2). Total torque overshoot is calculated by Equation (25), and it is used to construct another set of objective functions, represented by Equation (26), where *w* represents a weighing factor.

$$f\_{\rm OS} = |\rm OS1| + |\rm OS2| + |\rm OS3|\tag{25}$$

$$\begin{aligned} f\_{I\text{i}E+OS} &= f\_{\mathbb{5}}(\omega\_{\text{err}}(\theta)) = f\_1(\omega\_{\text{err}}(\theta)) + w \cdot f\_{OS} \\ f\_{I\text{i}S+OS} &= f\_{\mathbb{6}}(\omega\_{\text{err}}(\theta)) = f\_2(\omega\_{\text{err}}(\theta)) + w \cdot f\_{OS} \\ f\_{I\text{ITAE}+OS} &= f\_{\mathbb{7}}(\omega\_{\text{err}}(\theta)) = f\_3(\omega\_{\text{err}}(\theta)) + w \cdot f\_{OS} \\ f\_{I\text{ITSE}+OS} &= f\_8(\omega\_{\text{err}}(\theta)) = f\_4(\omega\_{\text{err}}(\theta)) + w \cdot f\_{OS} \end{aligned} \tag{26}$$

Equation (27) represents the optimal decision variable values *θop<sup>t</sup> i* , obtained by the minimization of the previously formulated objective functions, where *S* represents a constraint on the optimization search area, while index *i* represents the ordinal number of objective functions that was used in the optimization procedure. In the following text, decision variable selection is further explained, along with the imposed constraints.

$$\begin{aligned} \theta\_i^{opt} &= \underset{\theta \in S \subset \mathbb{R}}{\operatorname{argmin}} [f\_i(\omega\_{err}(\theta))]\_\prime \quad i \in [1, 8] \\ S &\in [\theta^{min}, \theta^{max}] \end{aligned} \tag{27}$$

**Figure 5.** Drive dynamics. (**a**) Reference speed commanded to the machine. (**b**) Load torque profile applied to the machine. (**c**) Required torque profile.

## *4.3. Decision Variables*

Fuzzy controller parameters (membership function and output level function parameters, base and gain values) lead to the decision variable vector *θ*, as was previously established by Equation (21) in the previous section. Some simplification measures can be taken to reduce the number of elements in the vector: it can be concluded that the controller must have the same output in absolute value for negative and positive inputs. This means that only membership functions corresponding to positive linguistic values can be defined, and the opposites can be used for the negative counterparts. This reduces the number of decision variables regarding input membership functions from 20 to 10. The same is true for the rule output level functions. Coefficients *aZ*, *bZ* and *cZ* from Equation (19) can be set to zero and only coefficients regarding positive linguistic values can be defined, which reduces the number of variables from 9 to 3. This means that the final vector of decision variables *θ* contains only 17 instead of 33 elements. Table 2 represents the limits of the optimization search area.
