This part includes two parts: (1) Variable-scale chaotic ant colony algorithm, (2) solving SHEPWM nonlinear equations. The application of the chaotic ant colony algorithm in solving SHE nonlinear equation is introduced.

#### 3.1. Variable-scale Chaotic Ant Colony Algorithm

Inspired by the ant food searching behaviors, ACA is proposed by Marco Dorigo et al. [

20]. Ants have great construction and organization abilities by the colony behaviors. The most attractive part of their behavior is how they look for food, and how ants choose the shortest path between their nest and the food sources. When looking for food, initially, ants search around the nest in a random way. While ants walk back and forth between nests and food sources, they leave some chemical pheromone on the ground. The quality of the food source and the length of the path determine the quantity of pheromones. Ants can choose a precise path according to the intensity of pheromone. The concentration of pheromone increased with the number of ants choosing the path. Therefore, the ants can use the pheromone concentration to find the nearest food source [

21,

22].

The optimized function variable can be expressed as a decimal string $d(0),d(1),\dots ,d(l-1)$.

Decoding formula of the node i as follows [

23],

where i is the number of current locating layers, b is the length of strings, n is the dimension of variables.

The process represented by the formula can be shown in

Figure 3.

As seen from

Figure 3, when the ants from one layer to another, they will have ten choices.

When the solution construction is completed, the ants provide feedback to the solutions by depositing pheromones on solution components, for which they use the updating rule in their solution.

Because ants take different routes, local updating pheromone of each ant is different. Locally update the initial pheromone of ants as shown [

23],

where

${\tau}_{ij}$ is the pheromone trail deposited between node

i and

j,

${\tau}_{0}$ is the initial pheromone level, and ρ is the evaporation parameter (

$0<\rho <1$).

Due to the attraction of ants to this path, the pheromone content is the strongest in the best path. At the same time, the pheromones on other paths evaporate in time. When all ants complete a path, by using the following [

23], the global pheromone level is updated.

where

$\alpha $ is the pheromone decay parameter (

$0<\alpha <1$), and

${f}_{best}$ is the function value of global optimal ant.

Using chaotic factor instead of random factor, the efficiency of the stochastic optimization algorithm is improved. The chaotic mapping can be regarded as a non-linear differential equation without any stochastic factors, but its trajectory is completely stochastic and ergodic in the state space. The most common Logistic mapping in this paper is adopted, which can be described as follows [

24],

where

$x$ is a chaotic variable (

$0<x<1$), and

$\mu $ is a constant (

$0<\mu \le 4$).

When the chaotic mapping is used in ACA, the initialization parameter is chaos. Each chaotic parameter corresponds to a path, so there are many paths. Some better paths with the inverse pheromone can be selected. Therefore, in order to speed up convergence, the pheromones of each path are not equal.

The variable-scale chaotic ACA can be described as follows [

23].

- (1)
A chaotic series are embedded into the solutions getting from ACA. After all ants have completed solution construction, the global best ant will be evaluated. The chaos optimization algorithm is used to search within a certain radius of the independent variable of the best ant, and the search radius will be reduced with the iteration. If a better solution is found, it will be decoded into a string of decimal numbers and replaced the best ant.

- (2)
In order to search only nearby the best ant, the interval of chaotic series is transformed from (0, 1) to (−r, r) by a linear transformation. Then, the transformed series are embedded into the solution getting from the best ant, so new series are found.

- (3)
The last is a variable radius problem. By adding the variable-scale algorithm to the chaotic ACA, the search scope can expand at the start stage to avoid getting into local optimum, at the same time, it can narrow the search scope at the later stage, so as to improve the search precision.

The variable-scale formula is used by Sigmoid formula [

23], as follows,

The steps of variable-scale chaotic ACA are as follows,

**Step 1** Initialization. Some parameters of the algorithm are initialized, such as number of ants, number of nodes, the maximum distance for each ant’s tour, maximum iteration, evaporation parameter, pheromone decay parameter, initial pheromone level, etc.

**Step 2** The first position is provided at random.

**Step 3** Select nodes according to the node selection rule.

**Step 4** Local pheromone updating by formula (6).

**Step 5** The value of independent variable is obtained by the formula (5), and the function value is calculated.

**Step 6** The best ant is selected in current iteration. If it is superior to the global best ant, replace it.

**Step 7** Calculate the chaotic searching radius using formula (9).

**Step 8** Chaotic search nearby the global best ant. If a better solution than the global best ant can be found, and replace it.

**Step 9** Global pheromone updating by formula (7).

**Step 10** Return to step 2, do until the best solution is obtained or the maximum iteration is reached, then program stop.

#### 3.2. Solving SHEPWM Nonlinear Equations

The variable-scale chaotic ACA is applied, so as to solve the SHEPWM nonlinear equations in this paper. Compared with the traditional numerical method, it does not need preset initial values of the solutions and can obtain multiple solutions in the same modulation index.

According to Equation (4) can be obtained as follows,

where

${g}_{1}$,

${g}_{2}$,…

${g}_{\mathrm{N}}$ are objective functions.

Let the minimum values of the objective functions tend to zero, and find the optimal switching angles to achieve the purpose of optimization.

According to the objective, the function is defined as follows:

Take g as the objective function to be optimized, the approximate solutions of the Equations (4) can be obtained by using the variable-scale ACA.

In this paper, we take the four angles within the first quarter cycle as an example, (i.e., N = 7), to eliminate 5th, 7th, 11th, 13th, 17th, and 19th harmonics.

Using the above method, a lot of switch angles can be obtained, in which two sets of switching angle tracks within the whole modulation index range are shown in

Figure 4.