2. Fuzzy Logic Control (FLC)

Similar to ANNs, the FLC does not need the internal parameter and mathematical model of the system. However, prior knowledge of the relationship between input and output is required. Figure 9 presents the control structure of the FLC. Besides input and output, the typical control structure has four control blocks: fuzzification, rules inferences, rule table, and defuzzification. The rule inference performs the calculation based on the rule table [125,126]. Error *E* and change in error Δ*E* are the usual input signals for the FLC-based MPPT. Equations (14) and (15) present the error and change error input signal calculation.

$$E(k) = \frac{P(k) - P(k-1)}{V(k) - V(k-1)} \text{ or } E(k) = \frac{P(k) - P(k-1)}{I(k) - I(k-1)}\tag{14}$$

$$
\Delta E = E(k) - E(k-1) \tag{15}
$$

After being converted to a linguistic variable, the error and change in error will be used as input variables to the FLC. The FLC provides output signals in the form of a change in voltage (Δ*V*), change in current (Δ*I*), or change in duty cycle (Δ*D*).

**Figure 9.** FLC structure.

3. Particle Swarm Optimization (PSO)

PSO is a population-based search method modeled after the behavior of bird flocks [127]. PSO has been popular to optimize and solve nonlinear problems in the last decade. It works by assigning random initial values to the particles in the boundary limits. The particles represent the duty cycle of the DC–DC converter and are optimization solutions. Particles move around the search space, and its best movement in the initial phase is called *Pbest*. The overall best movement in the subsequent iteration is called *Gbest*. Each particle is represented in the search space by its velocity (*Vi*) and position (*Xi*), and these parameters are updated in each iteration until the best solution is found [128,129]. The particles' velocity and position are updated using Equation (16):

$$\begin{array}{l}V\_i(k+1) = WV\_i(k) + \mathbb{C}\_1 rand\_1 \* (Pbest\_i(k) - X\_i(k)) + \mathbb{C}\_2 rand\_2 \* (Gbest\_i(k) - X\_i(k))\\X\_i(k+1) = X\_i(k) + V\_i(k+1)\end{array} \tag{16}$$

where

*Vi*(*k* + 1) is the particle velocity at k + 1th iteration, *W* is the inertia weight, *Vi*(*k*) is the particle velocity at the kth iteration, *C1* is the acceleration component associated with *Gbest*, *Xi*(*k* + 1) is the particle position at (*k* + 1)th iteration, *Xi*(*k*) is the particle position at the kth iteration,

*C2* is the acceleration component associated with *Pbest*, *rand1* and *rand2* are random numbers from zero to one,

*Gbest* is the best position of all particles, and *Pbest* is the best position of the particle.

The objective function of the PSO optimization is to find the global voltage and power in the P–V characteristics curve. It is started by initializing parameters such as the swarm size (N), maximum iteration, and the voltage and power variable dimension that must be optimized. The global voltage with respect to Equation (16) is given as:

$$\begin{array}{l} X\_i(k) = V\_{\mathcal{S}} = [V\_{\mathcal{S}1'} \; V\_{\mathcal{S}2'} \; V\_{\mathcal{S}3'} \; V\_{\mathcal{S}4} \dots \; V\_{\mathcal{S}j}] \\ j = 1, 2, 3, \dots \dots N \end{array} \tag{17}$$

The best value of voltage and power that the PSO has found so far will be stored in *Pbest,* and the process continues until *Gbest*, the best solution, is found.

The disadvantage of PSO is that since the initial position of the search agent is randomly provided depending on the boundary limit, there is a delay in the convergence. This can sometimes trap the algorithm to settle to local MPP during partial shading conditions [130,131].
