*4.4. MIDACO Optimizer*

In this paper, the authors use the MIDACO solver, which stands for "Mixed Integer Distributed Ant Colony Optimization" , which is one of many metaheuristic methods for global optimum search, inspired by nature. It is chosen because it is easy to use and works well with a large number of decision variables and can also work in co-simulation with the Matlab environment. Out of the many settings that the solver offers, it only requires settings for decision variable limits and the start point of the search. Figure 6 represents the co-simulation between Matlab/Simulink and MIDACO that is executed to optimize the fuzzy controller parameters, where *θj* represents the decision variable values of the current evaluation.

**Figure 6.** Co-simulation: MIDACO ←→ Matlab/Simulink.

## **5. Optimization Results**

In this section, the optimization results, obtained by criteria from Equations (22), (25), and (26), are presented. Figure 7 shows the speed and torque responses that are obtained by using only criteria from Equation (22). It can be seen that the dynamics of the drive system have almost no impact on the speed response; in other words, the speed response has only around 0.2 rpm maximum tracking error and a fast settling time, but when observing the torque response, an unacceptable overshoot of around 20 Nm is observed. The reason for the large overshoot is the fact that the speed error is the only criterion for the optimization. To keep it at its lowest value, large control action is required at every instance when the speed diverges from the reference value. Since there is no criterion that would limit or penalize the torque, optimized parameters allow this kind of behavior. An attempt is made to remedy this problem with a multi-objective optimization approach. The first objective is selected as *fISE* from Equation (22) and the second as overshoot from Equation (25).

Figure 8 represents the optimization result in the form of a Pareto front, where the *x*-axis represents the *fISE* value and the *y*-axis represents the total overshoot value.

**Figure 7.** Speed tracking error and torque responses produced by: (**a**) Integral absolute error criterion. (**b**) Integral squared error criterion. (**c**) Integral time absolute error criterion. (**d**) Integral time squared error criterion.

Depending on the application, a range of solutions are available to choose from, and they are represented by the circles in the graph. The green hexagon in the figure is the area of the Pareto front that the optimizer selected a solution from, and Figure 9 represents the system response produced by its parameters.

It can be seen from Figure 9 that the overshoot in the torque response is greatly reduced. To obtain the unique solution that offers the best system response, criteria from Equation (26) are investigated.

**Figure 8.** Pareto front of multi-objective optimization.

**Figure 9.** System response using the solution of the Pareto front.

Figure 10 represents the speed and torque responses of the criteria from Equation (26) with the weighing factor of value 10. It can be seen that the torque overshoot is greatly reduced, while preserving a good speed tracking response.

**Figure 10.** Speed tracking error and torque responses produced by: (**a**) Integral absolute error criterion with overshoot penalization. (**b**) Integral squared error criterion with overshoot penalization. (**c**) Integral time absolute error criterion with overshoot penalization. (**d**) Integral time squared error criterion with overshoot penalization.

To summarize, nine different optimization procedures are conducted for nine different types of objective functions. Table 3 shows relevant metrics for each optimization procedure.


**Table 3.** Optimization results.

It can be seen from the results that single-objective optimizations that utilize objective functions *fISE*+*OS* and *fITSE*+*OS* produce the best results regarding torque overshoot, while keeping the speed tracking error below 1 rpm. Even though they do not differ significantly, the *fISE*+*OS* criterion produces slightly better results, which is why it was chosen to be further investigated. Figure 11 shows the optimized membership functions and Table 4 shows the optimized gain and output level function coefficient values for the *fISE*+*OS* criterion.

**Table 4.** Gain and output level function coefficient values obtained by optimization.


It should be noted that coefficients *aN*, *bN* and *cN* have opposite values to their positive counterparts.

**Figure 11.** Membership functions obtained by optimization.

#### **6. Control System Performance**

In this section, a full simulation with the drive, inverter, and observer is evaluated. Control parameters used for the fuzzy controller are the ones obtained by the *fISE*+*OS* criterion in the optimization procedure. A block diagram of the simulated control method is shown in the Figure 1. From the Figure 12a it can be seen that optimized controller parameters produce grea<sup>t</sup> speed tracking with maximum tracking error of only 2 rpm, but still produce large torque overshoot at the loading instance. By reducing the proportional and integral gain of the fuzzy logic controller, it is possible to adjust the response and remedy this problem. Figure 12b shows the performance of the system with reduced gains—in this case, *KP f* = 500 and *KI f* = 4000. It can be seen that the torque overshoot is greatly improved, while the speed response is slightly affected, but the system still offers a small maximum tracking error of around 10 rpm. In the following section, a comparison with several conventional model predictive control methods will be performed.

**Figure 12.** System performance. (**a**) With original optimized parameters. (**b**) With reduced *KP f* and *KIf*parameters.
