1. Introduction
Finding the extremes of multimodal functions has been a major research problem addressed by many researchers because the performance of most engineering optimization problems is like to that of systems with multimodal functions [
1,
2,
3,
4,
5].
One of these situations is partial shading that occurs in photovoltaic (PV) modules [
6]. Objects interfering with the solar irradiance on the surface of the PV module cause that in the characteristic curve that usually has a single global maximum [
6,
7,
8], there are multiple local maxima [
9,
10,
11]. This situation makes it difficult to implement maximum power point tracking (MPPT) controllers [
12,
13,
14]. All these circumstances cause power losses and therefore inefficient system performance.
In order to solve this problem, the evaluation of numerical optimization methods is proposed to find the global maximum of functions with multiple maximums [
15,
16,
17,
18,
19]. In this investigation, four multimodal evaluation functions were used, which represent extreme situations of partial shading in photovoltaic (PV) modules.
The numerical optimization algorithms are of great interest because they provide a good relationship between complexity and performance. These methods are simpler than more robust techniques such as fuzzy logic [
20], neural networks [
21,
22,
23], among other technologies belonging to soft computing.
In the literature, there are different studies in the field of renewable energies in which the golden section search (GSS) method has been used. The authors in [
24] used this method to simulate the power output of a wind generator and a PV module, in the framework of research of a multiobjective optimization model based on the Pareto principle. In [
25] a solar energy boat was designed, for which the authors used the golden section method to optimize the power consumption of the propeller. The researchers in [
26] proposed a methodology based on a wavelet neural network, to select the location and the calculation of the size of distributed renewable generation. The results obtained were compared with the golden section, in terms of power and energy losses.
Similarly, there are studies that use the simulated annealing (SA) algorithm in the field of renewable energies. It highlights the work done in [
27], in the framework of an investigation to select a suitable location for a wind power plant. The simulated annealing was used to minimize the distance between the method proposed in the research and the existing methods. The authors in [
28] used this algorithm in a hybrid configuration in order to carry out the optimal sizing of a standalone hybrid (solar-wind) system.
In [
15,
16,
29] the authors used the golden section for tracking the MPP of a PV array, for different environmental test conditions. In addition, in [
30,
31] the simulated annealing algorithm was used in MPPT controllers for PV modules considering mismatch conditions and non-uniform environmental conditions.
Therefore, in this work the algorithms of the golden section [
15,
16] and the simulated annealing [
17,
18] were implemented. These algorithms were tested in four different cases, in order to evaluate their performance under the same conditions. Based on this premise, the number of iterations and the computation time of each algorithm were evaluated. The four functions used as a case study emulate the performance of PV modules in partial shading conditions. In this way, with the work done, the following contributions can be highlighted:
Standardization of case studies with neural networks (multilayer perceptron). This provides uniformity when evaluating the performance of each algorithm.
Comparison between two numerical optimization algorithms applied to different evaluation functions that emulate the performance of PV modules for sudden changes in operating conditions.
Implementation of algorithms in C language in order to facilitate future implementation in microcontrollers.
This paper is organized as follows: Functions with multiple maximums are developed in
Section 2.
Section 3 presents the numerical optimization algorithms.
Section 4 corresponds to the results and finally the conclusions are presented in
Section 5.
4. Results and Discussion
The simulations of the algorithms were performed on a personal computer with a 64-bit Fedora 27 Workstation operating system, with Intel ® Core™ i3-3217U CPU @ 1.80 GHz and 4 GB of RAM. The compiler gcc version 7.3.1 20180712 (Red Hat 7.3.1-6) (GCC) was used. The codes were developed in C language and gnuplot was used to make the figures.
4.1. Approximation of the Test Functions with the Neural Network
This section presents the results obtained with the neural networks for the approximation of the evaluation functions generated by Equations (1)–(3).
In
Table 1, it is shown that for most of the approximations the matrix R of the correlation coefficient is 1, which indicates a perfect correlation index, showing the good performance of the neural network.
Furthermore, in
Figure 5, it is observed that the network suitably maps each of the functions. In some inflection points the network rounds a little more because the performance of a module or array of PV modules is simulated, the
x-axis represents the voltage (volts) and the
y-axis the power (watts).
All test functions have different characteristics, in order to evaluate algorithms in changing scenarios.
Table 2 shows the local maxima and the global maximum of each of the test functions, in which it can be established that the algorithms will be subjected to different challenges that emulate extreme operating conditions in the PV modules.
4.2. Results Obtained with Optimization Algorithms
In this section, the results of the optimization algorithms are shown, in terms of the maximum value found, the value evaluated in the function, the computation time and the number of iterations. In addition, a set of figures that show the partial solutions (in blue) and the global value found by the algorithms (in red) are presented. The solid black line is the test function.
4.2.1. Results for Test Function 0
Table 3 shows the performance of the algorithms with the test function 0. The SA algorithm was implemented for initial temperatures of 0.5, 100 and 1000. In general, it can be seen that the algorithms find the global maximum, highlighting that, it has obtained a better computational efficiency with the GSS algorithm with a computation time of 0.189 ms and 9 iterations. In the case of the SA algorithm, it is observed that, with the increase of the initial temperature, the iterations increased from 160 to 900.
In addition, the GSS and SA (T = 0.5) algorithms presented the best error percentages of 0.14% and 0.13% for the component in x, and 0.02% and 0.03% for the component in f(x); with respect to the reference value of the global maximum.
Figure 6 shows the local maximums and the global maximum found by each of the algorithms.
Figure 6c shows that the increase in the initial temperature causes the SA algorithm to perform a more exhaustive search, causing the number of local maxima to increase.
4.2.2. Results for Test Function 1
The results obtained for this case are shown in
Table 4. The GSS algorithm presented a better computational time of 0.178 ms with only 8 iterations. This algorithm had the best error percentage with values of 0.03% and 0.44% for the components in
x and
f(x). It can also be observed that the increase in the initial temperature affects the performance of the SA algorithm, which presented errors of 0.81% and 0.54% (in
x and
f(x)) for T = 100.
Figure 7 shows the results obtained for this case. Variations in the global maximum found by each algorithm can be observed, as well as the increase in the number of iterations when the initial temperature increases.
4.2.3. Results for Test Function 2
For this case, the results obtained are shown in
Table 5. The analysis is similar to that performed for test function 1. The best performance (10 iterations and time of 0.188 ms) and percentage error (0.16% and 0.43%) was obtained with the GSS algorithm (See
Figure 8).
4.2.4. Results for Test Function 3
Table 6 shows the results for test function 3. In this case, the SA algorithm with T = 1000 has the lowest error percentage with values of 0.66% and 0.26% for
x and
f(x). The GSS algorithm again has the best computational time (See
Figure 9).
5. Conclusions
From the results obtained with the neural network, it can be concluded that it is important to have a universal structure to approximate the test functions, since a minimum variation in the computation times is achieved.
The choice of the range for the x-axis is an important factor that must be taken into account for the two algorithms implemented, golden section and simulated annealing. A bad choice of the range causes the algorithms to not find the global maximum.
On the other hand, the versatility of the simulated annealing algorithm is highlighted because the search mechanism can be controlled by adjusting the computational temperature and the cooling rate. The disadvantage is that many more iterations are performed and the search process becomes slower.
Another disadvantage of simulated annealing is that by having a larger group of possible solutions, some solution may be in the tolerance threshold and therefore accepted as the best option.
This research shows that with a single development of the algorithms several functions can be optimized, while with other methods such as neural networks it is necessary to adjust the synaptic weights and the bias. This same problem occurs with fuzzy logic, in which membership functions and fuzzy rules must be adjusted.