A comparative study based on the Genetic Algorithm ( GA ) method for the optimal sizing of the standalone photovoltaic system in the Ngoundiane site

We study a sizing method using Artificial Intelligence Techniques (AI) to find the optimal sizes of a standalone photovoltaic system in Ngoundiane, Senegal. The sizing of the PV system is considered here as a mono-objective problem and the Total Life Cycle Cost (TLCC) is the « Objective » function to minimize. Based on some constraints and after 10 simulations, the optimisation gives, as a result, an optimal value of TLCC corresponding to the combination of 225750 WC/8100 Ah. This result show that the method using Genetic Algorithm (GA) increases considerably the photovoltaic capacity compared to the intuitive and numerical methods used in our previous works. The GA method better covers the load demand, with more long time, when compared with those obtained with numerical method. These results confirm that this method is effective and reliable because it allows the design of a PV system that satisfies the load demand of the Ngoundiane site with a lower cost.


Introduction
The non-linear photovoltaic (PV) system characteristic, the transient user load demand and the inconstant PV modules production make the optimization of these kind systems complicated.Therefore, an optimization method, which adapts the energy production with the load demand for a given site, must be applied to guarantee the weakest investment, and an appropriate and full use of resources.An optimization problem is defined by Daud et al. [1], as the maximization or minimization of one or several « Objective » functions, by satisfying some of equality or inequality constraints.Optimization techniques can be categorized in mono-objective and multi-objective techniques.Generally, these methods have two differences.
First, a single solution is available in mono-objective optimization algorithm.Conversely an optimal solution set is found in a multi-objective optimization algorithm, as represented by Pareto front [2].Second, in mono-objective optimization algorithm, the offspring solutions substitute the current solution if it is better.While in the multi-objective optimization techniques, substitution decision is not so simple [2].Several optimization methods and Artificial Intelligence techniques have been recently employed to improve the process of PV system size optimization [3].These techniques provide each one their own features, but the literature indicates that the genetic algorithm has superior features, that make it usual for optimization purposes [4].Their performances for the research of global minima are extremely effective and they are very suitable for optimization problems having a large number of parameters [4].However, they are relatively more difficult to code and they require more time to resolve optimization problems compared to other algorithms [4].Genetic Algorithms are very simple and easy to understand.They don't need complex mathematical knowledges [5].They are widely used in distribution energy system design, because of their ability to treat optimization problems with linear and non-linear cost functions [6].A hybrid optimization technique combining an Artificial Neural Network and Genetic Algorithms (GA) to generate sizing curves of a standalone photovoltaic system gave satisfactory results [7].The GA has been used to identify cell parameters and photovoltaic modules in [8].This approach allowed to efficiently estimate the electrical parameters of PV solar cells and modules.The combination of GA-based techniques and the complete research technique for the design of a standalone photovoltaic / wind hybrid system has also allowed to overcome the limitations of each method [9].A multi-objective optimization technique for sizing a standalone photovoltaic system has been also used to evaluate the sizing parameters (generator sizes, inverter capacity), and to minimize both the TLCC and the Load Dissatisfaction Rate [10].Other works have also allowed to develop a bi-level optimization based on GA that reduces voltage fluctuation caused by penetration through deploying battery energy storage systems (BESS) [11].Results indicate that proposed genetic algorithm is able to make consistent performance decisions that also maximize the fitness of the given objective function [11].
In this paper, we investigate the sizing of a standalone photovoltaic system by using Genetic Algorithms, in Ngoundiane site where the use of solar energy is promising compared to the wind energy source [12].The objective is to find a PV/Battery combination which meet the Ngoundiane site load demand and give a minimal Total Life Cycle Cost (TLCC) with a 1% Loss of Power Supply Probability (LPSP).Available meteorological data and charge profile of Ngoundiane site will be used.In order to show the effectiveness of GA developed, results will be compared with those obtained with the numerical method in [13], through the power supplied by PV source and power demanded by charge.

Description of Genetic Algorithm
Genetic Algorithm is an adaptative kind of heuristic search algorithm based on the concept of natural selection and genetics [5].It mimics the natural behavior of evolution [14] and takes its terminology from the evolutionist model: a population evolves from generation to generation to become more adapted to the environmental constraints.Its individuals characterized by their chromosomes mate and multiply according to the general principle of « Struggle for Life », and mutations sometimes can be observed.Genetic Algorithms are a general and effective mechanism to resolve problems for which: • there is a large number of more or less good solutions; • one has not at its disposal a determinist algorithm to calculate the best solutions; • problem universe is little formalized.
The different stage used in Genetic Algorithms are described by [7], and [8].They are: • initialization: to create an initial random population having N chromosomes set, where each set contains I elements; • selection: to select from the initial population, the chromosomes set which participates in the reproduction process, to produce a new generation.The selection procedure is stochastic, and the selection probability of a particular partner group depends on its accuracy: only the best chromosomes are retained.The selection methods are the elitism model and the classification model.The dominance concept (optimum of Pareto) is a very important strategy used to achieve the replacement in the selection stage; • crossover (reproduction, crossing): this procedure takes two selected chromosomes from the present generation (parents) and crosses it to obtain two individuals for the new generation (offspring).Typically, the two parent chromosomes met at the same crossover point, randomly selected, to get two sub-groups from parents' group.The crossover probability must be very heavy; • mutation: the objective of the mutation is to create new solutions in the neighborhood of the zone represented by a number of two chromosomes by making exchanges in some genes (parameters) in a population, and so to perform a local research, surroundings of the region.A mutation rate between 1% and 20% works well [8].Since Genetic Algorithm is a recursive stochastic operation, it tends to the optimum solution.So, it gives a best solution which is close or equal to the optimum [7].The crossover operator is used for the global research (since it involves great changes in the chromosomes) while mutation is for the local research (with weak changes in the genes) [7].

Optimization problem elaboration
The approach consists in finding the best combination between the total PV array capacity (P PV ) and the one of the storage system (C bat ) which minimizes the Total Life Cycle Cost (TLCC) and satisfies the load demand of the Ngoundiane site.The TLCC is the performance criteria and both PV and storage system capacities are the decision variables.Each parent is represented by a chromosome set having the two parameters: P PV and C bat .
A comparative study based on the Genetic Algorithm (GA) method for the optimal sizing of the standalone photovoltaic system in the Ngoundiane site 3 Crossing the parameters between two parents leads to a new generation, made up of 2 2 individuals (chromosomes).Decision vector (DV) is represented as follows: The function that must be minimized, called «Objective» function or «Fitness» function is the Total Life Cycle Cost computed in [13].It is expressed as: TLCC= C capi,s+ C rep,s+ C M-25 (2) Where C capi,s is the initial capital cost of the system (FCFA * ), it comprises the prices of the system components, civil works, and system design and installation cost, C rep,s refers to the present value of the replacement cost of the system (FCFA), and C M-25 denotes the present value of the maintenance cost of the system (FCFA) for 25 years.We are going to transform this cost into a mathematical function, which depends on two variables.So, all the costs used in the TLCC calculation are expressed according to the PV and storage system capacities.The constants are replaced by their values.Concerning the charge controllers and the inverters costs, one presumes that they are constant and keeps the values obtained in [13].It results in to the following equations: Equations which relate P PV and C bat in [13], lead to the following relations: Since the intuitive sizing method application in the Ngoundiane site [13] has given a total PV capacity equal to 177500W P , we consider that the second condition is not satisfied.In this study, only the first condition is valid.The maximal value of X 1 is equal to 228000W P , while its minimal value is equal to the unitary capacity of the PV module 250 W P .Similarly, the maximal value of X 2 is equal to the batteries capacity found in the intuitive sizing method application in [13], 43200Ah and its minimal value is equal to the unitary capacity of a battery 900Ah.X 1 and X 2 satisfy these conditions: Our previous work [13] showed that X 1 and X 2 are a linear relation.We look for, in this space, the optimal combination between X 1 and X 2 that minimizes Y, by satisfying some constraints that we list below: • average loss of power supply probability which represents the missing energy quantity to fully satisfy load demand, should be equal to 0.01.This condition is expressed by the following equation: • size of population: in each generation, we set the number of individuals equal to 100; • selection: we chose the roulette function which use random numbers for the selection; • reproduction: we maintain the crossover fraction by default 0.8; • mutation: we have chosen a value of 0.2 ; • number of generations: in the most optimizations by genetic algorithms, the number of generations required is less 60 [4].It is fixed to 60 in this study.
The different stage of genetic algorithms developped in this study are shown in figure 1 4

. Results and Discussion
The algorithm has been implemented in the « Optimization» toolbox from the MATLAB software program.We have performed 10 iterations.
In figure 2, we drawn the optimal values of the « Objective » functions according to the different iterations.They vary between a minimal value of .This means that the optimal values obtained for the « Objective » function for the 10 iterations agree.Figure 3 gives the variation of the optimal « Objective » function value according to the generations.We remark from the second generation that the optimal « Objective » function values are practically constant.It is equal to 304380500.1776with an average value of 304380500.3765.However, in figure 4 .These values are close to those obtained at the 9 th iteration.The best combination of PV and storage system capacities which better meet the constraints and minimize the TLCC is obtained at the 9 th iteration: X 1 =P PV =225688.20009Wp ; X 2 =C PV =6401.14329Ah;Y= TLCC=3.208x10 8 FCFA.Since the unitary module capacity is 250W P , the unitary battery capacity is 900Ah, and batteries must be increased to 20% to take into account the depth of discharge.The total PV capacity to install becomes 225750 W P and the necessary storage system capacity is 8100 Ah.The comparison between these results with those obtained with the intuitive and numerical sizing method in our previous work [13] shows an increase of 22% of the PV capacity.However, the storage capacity decreases about 81% and 25% compared to the intuitive [12] and numerical method [13], respectively.Simultaneously the TLCC reduction is 82% and 49% compared to the intuitive and numerical methods.These differences are due to the second constraint, which imposes to the algorithm to always look for a PV capacity, which is capable to meet the daily load requirements and to completely charge the storage device.
In figures 6 and 7, we present the variation of TLCC according to the PV and storage system capacities.We notice that the cost function grows with the increasing of PV and storage capacities.The increase of the PV capacity influences the TLCC.Nevertheless, a strong reduction of the storage batteries restricts the TLCC because of the decreasing of the storage batteries replacement and maintenance costs.Indeed a 25% decrease in the storage capacity permits to reduce the TLCC to 49%.That's the reason why the TLCC decreases despite of the PV capacity raising.However, the reliability level is kept to 0.01.These results confirm those obtained in [15] which show that the increase of the PV capacity can lead to a decrease of the storage system without compromising the system reliability level.Furthermore, the reduction of 78% of the number of the battery banks leads to a significant reduction of the TLCC.

Comparison between the daily power generated by the PV system and the one demanded by load
In this part we use the results obtained with the numerical [13] and genetic algorithm methods to compare the daily power generated by PV system and the daily power demanded by charge.
From the user activities, and energy balance of site, we have defined two kinds of load profile: load profile during the school period and load profile during holiday period.During school period, activities are organized as follow: • from 8 am to 12 am, students are in the classrooms, and employees occupy their offices.During this period, administrative, pedagogic and social buildings are occupied.Load demand is estimated to 59594W.• from 12 am to 3 pm, students return to their rooms and it's the break time for the administrative staff.Load demand strongly falls to 1365W; • from 3 pm to 7 pm, activities start again, and load demand return to about 59594W ; • between 7 pm and 9 pm all activities stop, and load demand falls to 19824W, after 21 pm, load demand reaches 19919W.
During holidays, there are almost no activity in the site: • during the day, we notice a very weak load demand, which assessed to 700 W; • at nightfall, load demand passes to 1645W, and is due to the public lighting in site.The charge profile obtained from these estimates are shown in figures 7 and 8 respectively.

EAI Endorsed Transactions on Energy Web and Information Technologies
Online First

Analysis of energy flow from PV capacity obtained with the numerical sizing method
From PV capacity (177500W P ) obtained with the numerical sizing method [13] and the daily solar power, during the months of December, April, and August, we have determined the variation of the power supplied by PV array [13].The months of December and April correspond respectively to periods with the lower and higher irradiation values in the Bambey zone where Ngoundiane is located.These two months belong to the school year unlike the month of August which belongs to the school holidays and which records important solar irradiation values [12] and [16].

Case 1:
In figure 9, we plot the hourly variations of the power supplied by PV array, and demanded by charge, for a typical day of December (15th), in the Ngoundiane site.In figure 10, we represent the difference between the supplied and demanded power for the same day.From these curves, we observe that for one typical day of December, from 11 am to 2:30 pm, there is a supplied power excess by PV array.Indeed, the supplied power by PV array is high because during this period, the solar power received by the earth reaches its maximum.Moreover, the load demand is poor during this period.The extra energy which can reach 60000W at 12 am, will be used to charge the batteries.For the rest of the day, the power supplied by PV array is deficient for filling the power demanded by charge.During this period, the batteries are strongly solicited to compensate the energy deficit.Since the batteries cannot exceed the allowed minimum level of energy, a LPSP risks to occur.

Case 2:
In figure 11, and figure 12 we represent the hourly variations of the power supplied by PV array, and the power demanded by charge and their difference respectively, at April 15 during the school year in the Ngoundiane site.
In this case, one observes a supplied power excess by PV source from 9:30 am to 3 pm, with a peak that can go up to 65000W, obtained at about 12 pm.For the rest of the day, the power provided with PV source is less than the power demanded by charge.The missing energy during this period is compensated by the storage device which will be less solicited than in the case 1.

Case 3:
During the holidays, for example, August 31 in the day, power demanded by charge is very weak, and power supplied by PV source is enough important as it can be seen in figures 13 and 14.So it is noted a PV overproduction the whole day.The batteries are less in demand during the time where there is an energy PV deficiency compared to the school days.
During this period of the year, the PV system operating will be often stopped in order to reduce the global energy excess.

Analysis of energy flow from PV capacity obtained with the Genetic Algorithm application
We make the same analysis than previously, with the PV capacity obtained with genetic algorithm application which is equal to 225750W p .

Case 4:
The figure 15 represents the hourly variations of the power supplied by PV array and the power demanded by charge, for a typical day, December 15, during the school period in the Ngoundiane site and figure 16 shows their difference.
Here, we remark that there is a surplus of production from 9 am, and values can go up to 75000W at around 12 am.This is due to the high PV capacity, suggested by the Genetic Algorithm.From about 15 pm, power supplied by PV source start to become less important than power demanded

EAI Endorsed Transactions on Energy Web and Information Technologies
Online First by charge.In this case, batteries take over and will be less requested than the first case.

Case 5:
The figure 17 and figure 18 represent the hourly variations of the power supplied by PV array and power demanded by charge and their difference at April 15, in Ngoundiane site respectively.We record that the supplied excess power appears earlier, from 8 am, when compared to the other cases.The supplied power remains above the power demanded by charge until 3:30 pm with a maximum of 86000W at around 12 am.Thus, batteries will sufficiently be filled and will ensure the electricity supply when production becomes small in relation to the load demand, from 3:30 pm to 8 am.Nevertheless, periods of global overproduction may occur, since the excess of production is higher than in the other cases and the storage capacity suggested by the genetic algorithm is less important compared to that given by the numerical method.

Case 6:
The figure 19 and figure 20 illustrate the hourly variations of the power supplied by PV source and the power demanded by charge, and their difference respectively at August 31, in the Ngoundiane site.We observe the same phenomenon than in the third case.
Here, the further power values are more extensive because of the large PV capacity used.
From this analysis, we retain three fundamental points: • at any day, PV system generate its maximal power in the middle of the day; indeed, during this time, the solar power received by the earth reaches its maximum [17].Meanwhile, the power demanded by the charge starts its decreasing.In the beginning and the end of the day, supplied power is null or weak to meet the load requirement.In this case, the batteries take over to supply the missing energy; • for a same PV capacity, PV system better satisfies the load demand in mid-academic year (April) rather than at the beginning (December).Indeed, the mid-academic year for the Ngoundiane site takes place during the months that have the higher solar irradiations; • concerning the two sizing methods, it is noticed that PV capacity obtained with the Genetic Algorithm method displays the larger power values.It covers better the load demand with more time when compared to the numerical method.In the case of PV system obtained with the numerical method, the batteries will be more solicited and lead to a probable lack of energy.In the case of PV system obtained with Genetic Algorithm application, a global excess energy could be observed due to the weakest storage system capacity compared to the numerical sizing method (8100Ah), and to supply power excess which is more important.These results can be compared to those obtained by [7].Indeed, these authors used a numerical method and an artificial neural network-based genetic algorithm (ANN-GA) model for generating the sizing curves of standalone photovoltaic (SAPV) systems.Results of this analysis revealed that the sizing curves estimated by using the ANN-GA presents more accurate results than those obtained by the numerical method.

EAI Endorsed Transactions on Energy Web and Information Technologies
Online First A comparative study based on the Genetic Algorithm (GA) method for the optimal sizing of the standalone photovoltaic system in the Ngoundiane site  A comparative study based on the Genetic Algorithm (GA) method for the optimal sizing of the standalone photovoltaic system in the Ngoundiane site  A comparative study based on the Genetic Algorithm (GA) method for the optimal sizing of the standalone photovoltaic system in the Ngoundiane site

Conclusion
Sizing optimization based on the Genetic Algorithm (GA) of a standalone photovoltaic system in the Ngoundiane site is investigated in this study.Sizing is considered as a mono-objective optimization problem and is solved by using Genetic Algorithm principle.Total Life Cycle Cost (TLCC) was the « Objective » function to minimize.It is transformed into a mathematical function of two variables that are the total PV capacity and total storage system capacity.The developed Genetic Algorithm is implemented using the « Optimization » toolbox from the MATLAB software program.The results are compared with those obtained with the numerical method and they showed that PV/battery combination suggested by genetic algorithm covers better the load demand in the Ngoundiane site and is less expansive, compared to the numerical method.Nevertheless, global excess power can be observed mostly in middle of the day.Furthermore, the tool used to conduct the algorithm is already programmed and this would lead to imprecisions on the results.
FCFA, expressed according to the PV and batteries capacities is given by the following equation: we set Y= TLCC, X 1 = P PV and X 2 = C bat , we obtain the equation below • the daily average energy yielded by the PV array should be able to supply the Ngoundiane site load demand and to charge the storage batteries.This condition is formulated by the following equation: For the algorithm parameters, we expressed the following assumptions: , we have the input vectors values (X 1 and X 2 variables) that give the best « Objective » function values in each generation.Values obtained at the final point are:

Figure 4 .
Figure 4. Input vectors giving the best "Objective" functions value

Figure 6 .
Figure 6.Variation of total life cost according to the total storage system capacity

Figure 7 .Figure 8 .
Figure 7. Daily charge profile for a typical day during the school period

Figure 9 .Figure 10 .
Figure 9. Variation of the power supplied by PV array and demanded by charge, in 15 December, in Ngoundiane site

Figure 11 .
Figure 11.Variation of the supplied and demanded power, in April 15, in Ngoundiane site

Figure 15 .
Figure 15.Variation of the supplied and demanded power, in December 15, in Ngoundiane site

Figure 19 .
Figure 19.Variation of the supplied and demanded power, in August 31, in Ngoundiane site

Figure 20 .
Figure 20.Difference between supplied and demanded power