APPLICATION OF SWARM BASED OPTIMIZATION ALGORITHMS TO MAXIMIZE OUTPUT ENERGY OF PHOTOVOLTAIC PANELS

Original scientific paper Produced energy of Photovoltaic (PV) cells depends on solar radiation. Thus, the highest share of the solar radiation to the surface of the PVs is essential. This paper presents a new control strategy to maximize the output energy of dual axis sun tracking. In this procedure, the optimal trajectory of the tracking system is determined based on a bounded optimization problem. The optimal tilt and azimuth angles of PV are calculated using swarm based optimization algorithms and an objective function that is suggested based on time dependent solar radiation prediction. This prediction uses the length of a sunbeam’s path through the atmosphere. The proposed approach is simulated by MATLAB software using Bee optimization algorithm and the results are compared with the Differential Evolution (DE), Genetic Algorithm (GA) and fixed panel results. The results show that the proposed method increases the electrical energy production within photovoltaic systems.


Introduction
Since PV systems convert the sunlight into the electricity, so produced power, directly dependent on the sunlight, reaches the surface of the PV. Because the sun moves both throughout the day as well as throughout the year, a solar panel must be able to follow the sun's movement to produce the maximum possible electricity. The amount of it will be highest when the surface of the PV module is aligned with the direction of the sunbeams. This can be achieved by control of the electric drives in the sun tracking system [1]. There are many tracking system designs available including passive and active systems with one or two axes of freedom. The most efficient sun tracking system usually is in the form of dual axis in azimuth/ altitude types [2]. Generally, there are two kinds of control, the closed-loop and the open-loop controlled tracking systems. The closed-loop systems use photo sensors and feedback controllers for positioning the modules. Due to permanent changes for positioning, these systems can spend more energy. The open-loop systems are based on the mathematical algorithms that can provide predefined trajectories for the tracking systems [1,3,4].
Since the position of the Sun can be accurately calculated at any time for any location on the Earth, so these trajectories can be accurately determined. To determine the trajectories, the solar radiation on the earth's surface must be known, which consists of the direct solar radiation and the diffuse solar radiation. In [5] five algorithms for sun position computation are proposed. These algorithms have different accuracy levels, so can be used in a wide range of applications. The algorithms should be optimized to reduce their computational cost.
A methodology for evaluating the output energy with a dual-axis sun tracking system for a photovoltaic system is presented in [6] that used adaptive digital signal processing and control algorithm. This method uses gradient ascent method to compute the optimal position angles iteratively and the Taylor's series approximation. Authors in [7] have an approach to track the movement of the sun by using the direction of the sunlight as orientation and focusing on control of the movement of the solar panel. Also, the PID controller is applied, so the response from the system before and after using the controller totally depends mainly on the dynamics of the solar panel. In [8] the authors presented a new algorithm for the time dependent prediction of available solar radiation in clear sky based on the length of a sunbeam's path through the atmosphere and the statistical data of a Pyranometer measured total and diffuse solar radiation at a given location on the Earth. They applied DE algorithm to solve an optimization problem with goal of the maximization of the electrical energy production, by considering the tracking system consumption.
The developed predictive control algorithm to maximize the photovoltaic system power production has been presented in [9]. They take into account local weather forecast with its uncertainty, thermal behaviour of the panel, and the positioning system energy consumption with its technical constraints. In addition, they use DE algorithm to solve the optimization problem, too. In [10] another predictive controller is designed to make the location of solar panels, which is on the premise of the constraint conditions. This method was implemented in MATLAB/SIMULINK.
Although the mentioned methods have good results, they can be improved by optimization procedures to achieve more accurate tracking and better response, also without using any extra hardware. This paper focuses on maximizing the energy production using Bee Algorithm (BA) [11,12] to find a solution of the nonlinear and bounded optimization problem, because of the speed of convergence and better response of BA compared with other population-based algorithms such as GA and Particle Swarm Optimization and evolutionary strategies [13]. In addition, this algorithm has acceptable results compared to other algorithms in practical problems in photovoltaic systems [14]. The goal is to determine trajectory for the tilt and azimuth angles, which change the position of the considered PV modules in a way to maximize the produced energy in the given time interval.
To do this, we will predict the direct and diffuse solar radiation on the earth's surface, in the form of time dependent functions. They assure the maximum of the possible energy production in the PV system, considering the applied PV system characteristic, predicted solar radiation and the applied optimization method.

Sun positioning calculation
Solar panel needs to be placed where no shadow will fall on it at any time of the day. Additionally, the best tilt angle should be determined based on the geographical location of the panel [2]. Fig. 1 shows the required angles for formulation where, θ z , α s , γ s , γ, β are Zenith Angle, Solar Altitude Angle, Solar Azimuth Angle, panel's azimuth angle and panel's tilt angle, respectively. The total instantaneous solar radiation on a horizontal surface (I h ) is the sum of the direct (I bh ) and the diffuse solar radiation (I dh ) on a horizontal surface [1]. bh dh h The I bh and I dh are dependent on the day of the year, the time of day, the local Standard Meridian, the latitude and longitude, and the weather conditions for the given location. They can be described as the functions of the length of the sunbeam path through the atmosphere (l) for the sunny days. Average extraterrestrial solar radiation (I) in Eq. (2) is calculated over the half-hourly interval Δt, starting with the time t 0 .
where I 0 is constant of solar radiation (I 0 = 1367 w/m 2 ); α is solar altitude angle and e(t) is the eccentricity correction factor that is expressed in the following [1].
where n is the given day number that is counted from the 1 st January. The length of the sun radiation's path inside the atmosphere (l) is shown in Fig. 2 and can be defined by Eq. (4).

Figure 2
Length of the sun radiation path inside the earth atmosphere [5] α sin h l = The "measured" total clearness index K t−meas (l) and the "measured" diffuse clearness index K d−meas (l) , are given as functions of the sunbeams path's through the atmosphere in average half-hourly values for the days with clear skies, during the specific years in [6] and the results showed that the clearness indices K t−meas (l) decrease exponentially with the length of the sunbeam path through the atmosphere l, while K d−meas (l) increases exponentially with l .We use this fact in our paper , so the "measured" clearness indices K t−meas (l) and K d−meas (l) are approximated using the exponential functions K t−cal (l) and K d−cal (l) using Eq. (5), as functions of l [8].
The approximation function parameters consist of the constants A 0 and C 0 , the weighting factors A 1 , A 2 , C 1 , C 2 , and the exponents B 1 , B 2 , D 1 and D 2 and are determined by the root mean square method in Tab. 1 [8].
Thus, I h and I dh are calculated by Eq. (6) for each t 0 and Δt.
Finally, total solar radiation (I C ) can be determined by Eq. (7).
where ρ is the ground reflectance, i is the incident angle of the direct radiation on the tilted surface. The incident angle can be obtained by Eq.
where: a s is the azimuth angle of the sun and α is the solar altitude angle that can be calculated by Eq. (9). L is the latitude angle, δ s is solar declination. h s is hour angle of the sun that is the angle between the half plane determined by the Earth's axis and the zenith (half of the meridian plane) and the half plane determined by the Earth's axis and the given point. The hour angle is usually expressed in time units, with 24 hours corresponding to 360 degrees. t s is local time.
These Eqs. (1) to (10) are used to determine the solar radiation on the PV module surface in each [t 1 , t 2 ].
By knowing the total efficiency of the system (η PV ) and total surface of the panel (A PV ) , the electric energy E PV that is produced in the PV system with sun tracking in the interval t ∈ [t 1 , t 2 ], can be expressed by the integration of the electric power over the day by Eq. (11) [1].
Ideally, the tracker's energy consumption can be considered negligible because the angles trajectories β and γ vary in path that the normal of the PV panel is aligning with the solar radiation. In this research, solar tracker's consumption is considered constant value. Solar System's efficiency is determined by Eq. (12). (12) where E PV is the electrical energy produced within the PV system by sun tracking, E C is the energy consumed within the sun tracking system, while E PF is the electrical energy produced within the fixed panel system without the sun tracking.

Bees optimization algorithm
The Bees Algorithm is a new population-based search algorithm. First was developed in 2005 by Pham and Karaboga [11,12]. The algorithm is based on the behaviour of honey bee colonies. In its basic version, the algorithm performs a kind of neighbourhood search combined with random search and can be used for optimization problems. Bee's behaviours such as searching for food, mating and nest locating have been used by many researchers to solve difficult optimization problems. The Bees Algorithm has a more robust performance than other intelligent optimization methods for complex problems and is very powerful.
A colony of honey bees can extend their searching area over long distances in multiple directions [12]. In the first, scout bees search randomly and then return to the hive and evaluate the different patches depending on their qualities. They put their nectar in the hive and go to the "dance floor" for "waggle dance". This waggle dance is for communication of the information about food locations and the quality rating to other bees. After that, some bees go to the food locations to gather food efficiently and quickly. When returning to the hive, the information will be shared that is still good enough as a food source. More bees go to flower beds with high amounts of nectar. So according to their fitness, they may be visited or are abandoned [12].
Based on aforesaid expressions, for formulation and to make algorithm, we require the following parameters: number of scout bees (n), number of selected sites (m) out of n visited sites, number of best sites (e) out of m selected sites, number of employed bees for best e sites (n ep ), number of employed bees for the other (m−e) selected sites which is (n sp ), Initial size of patches includes site and its neighbourhood and stopping criterion and number of maximum iterations for algorithm (i max ).

Proposed procedure
The method relies on determination of unknown X = [X 1 , X 2 , ..., X D ], that D R X ∈ by minimizing our objective function f(x) [15]. Vector X is associated with m inequality constraints g i (x) ≤ 0 and j = 1,..., D, where D is dimension of the problem, and are lower and upper bound, respectively. G th generated population is expressed by Eq. (13).
Each vector in P G consists of actual parameters of D as follows.
The initial population is generated by random value as specified in Eq. (15).
In this paper, objective function used in the considered maximization procedure is defined as a produced electrical energy of a PV system on a daily sunshine duration time (E net ) which is dependent on the panel's angle in both directions.
where E PV is the net produced electrical energy of the PV system from Eq. (11), E C is energy consumption of the positioning system that we assume constant value; for more details you can refer to [9].
Objective function is optimized by BA. For this aim the vector of parameters X is defined as Eq.
The first two equations force the trajectories β(t) and γ(t) to stay inside the range of the motion of the sun tracking system. The other ones limit the changes in defined ranges. β max , β min , γ max and γ min are the maximum and minimum values of the β and γ angles. Constraint values will be expressed in the following section.
Flowchart of the proposed algorithm is illustrated in Fig. 3. The solution steps for solar tracker application are described as follows. Step 1: Initialize the food source position X (solution population). Determine random initial angles based on upper and lower bounds by Eq. (15).
Step 2: Calculate the nectar amount (fitness). Determine the value of objective function using Eq.
Step 3: Determine Bee Algorithm parameters to use optimization procedure.
Step 5: Send each bee to the defined position.
Step 6: Memorize the best solution.
Step 7: If Cycle= Maximum Iteration, Stop and print result. Otherwise follow Step 2.

Simulation results and discussions
An overall system for simulation has total mass of 193,6 kg in 46° 33'N and 15° 39' E consist of 7 modules 105 W. More details are available in [1]. Active surface of the PV module is 6,531 m 2 . To determine the best angle of β and γ for the panel at any time of the day, proposed Bee optimization algorithm, GA [16] and DE [17] are implemented in MATLAB software to optimize output energy of PV. Fixed panel's angle is considered 24°.

Test Case 1
In first study, the total system efficiency (η) is considered 0,098 with δ s = 20,947°. Sunrise to sunset is assumed from 6 AM to18 PM. The sampling time is 90 minutes, so N value is 9. The constraints for angles are:     Fig. 4 shows optimal azimuth angle that is obtained from proposed Bee algorithm. The results are compared with the DE and GA results. In addition, optimal tilt angles from sunrise to sunset are illustrated in Fig. 5. The results are compared for studied swarm based optimization algorithms and fixed panel. The results could be used as input of solar tracker. Output energy of PV using BA is shown in Fig. 6. Comparison of the result with DE and GA optimization algorithms is depicted, too.
The results show that the output energy of the Bee algorithm with 16 963,8509 W (16,9 kW) is higher than DE algorithm and GA.
Moreover, the proposed algorithm is studied for summer solstice (n = 172, δ s = −23,4°) and winter solstice (n = 355, δ s = 23,45°) to show the ability of the proposed method for using in different conditions. These two times are the bases for solar studies.

Test Case 2
In summer solstice sunrise is at 5:04 and sunset at 20:54. Sunrise to sunset interval is considered from 5AM to 20 PM. Thus N = 11. Convergences of the BA, DE, and GA are shown in Fig. 7. The figure illustrates that GA has higher convergence than the BA and DE; but it is not very important in offline calculation. Fig. 8 shows that tilt angles are obtained in summer solstice for swarm based optimization methods and fixed panel. In addition, azimuth angels are shown in Fig. 9. Comparison of output energy of PV using BA, DE and GA is depicted in Fig.  10. The obtained energy using BA is 14 747,3971 W; whenever output energy using DE and GA are

Test case 3
To understand how the tracking system would operate in other conditions, the simulation was carried out for winter solstice. In winter solstice, sunrise is at 8:37 and sunset at 17:12; thus, Sunrise to sunset period is considered from 8:30 AM to 17:30 PM. The simulation results are shown in Figs. 11 ÷ 13.   In this case, we achieve higher energy by BA that is obvious in Fig. 14. Note that in some angles in test cases, sometimes GA has better convergence, but totally based on both convergence speed and value of the output energy, performance of BA is more considerable.

Conclusion
This paper presented a new method for determining the tilt and azimuth angle trajectories, which assures the maximum energy production in the PV system. Also, it does not require additional sensors. The BA method gives the optimal results for the applied solar radiation prediction and the tracking system model. Generality of our proposed method remains even in the case when the applied tracking system model and the prediction of the solar radiation are replaced with the more advanced ones.
The proposed procedure gives good results for the sunny days and the results show increase in produced electric energy, where the sun tracking trajectories are determined by the proposed method. The optimal trajectories obtained by BA optimization result near 52,86 %, 1,25 % and 1 % increasing in produced energy compared to the fixed position panel, DE optimization method and GA, respectively. The results indicate that the proposed algorithm has good accuracy, high convergence speed and acts smoothly for computing the optimal solution, so can be a good candidate to solve the optimization problems of solar systems especially in positioning system. In addition, the method can be used for different types of solar cells and different number of PV modules.
There is a recommendation for future research in the continuing development of solar tracking systems. In this study we focus on applying new algorithm and we suppose the sun irradiation as constant parameter, for future study it can be developed for the irradiation with its uncertain.