Optimizing layout of wind farm turbines using genetic algorithms in Tehran province, Iran

Installation layout of wind turbines plays a prominent role in the design of every wind farm. Thus, the wind farm layout optimization problem is proposed to maximize the total power output with the minimum cost. In this research, Kahrizak region in Tehran province of Iran is selected as a windy region and its real wind speed data are gleaned. Three different scenarios are also considered, with various number of generations and populations for GA parameters, effective distances, and longitude and latitude distances of turbines from each other. Among these scenarios, the best result is obtained for the one in which the longitudinal distance between turbines is greater than the latitudinal distance. By observing the wind rose of Kahrizak region, it is observed that the dominant wind direction of the region is toward the east and south–east. Therefore, by increasing the longitudinal distance of the turbines from each other, the efficiency can be improved and the turbine layout becomes more realistic. In this case, the efficiency rate and normalized cost of turbines are 89.5% and 37.4, respectively, and also 56 turbines are needed. The amounts of efficiency and power output are very convenient for real wind speed data of a region.


Introduction
Throughout history, fossil fuels were the primary resources for power production. Despite the efforts in increasing government's attention to the development and expansion of renewable energy sources, yet fossil fuels are one of the principal sources of power production [1].
However, there is no doubt that some sophisticated circumstances caused striking limitations for fossil fuel consumers, for instances, finite nature of fossil fuels, rising demand for variety of energy sources, sustainable development, awareness of environmental problems from burning fossil fuels, to name a few. Therefore, many countries are paying extra attention to renewable energies.
Recently, the share of renewable energies in the world's energy portfolio has been constantly increased [2]. Renewable energy resource is often viewed as a good alternative for fossil fuel because of its wide availability and environmentally friendly nature [3]. Although, there are several inexpensive and renewable energy sources in the world, their uses are somewhat low [4]. Among all sources of renewable energies, wind power due to its safety for environment as well as its sustainability, has become more conspicuous in recent years [5]. As the electrical power generated by wind farms is cost-effective, the number of wind farms is noticeably proliferated. Since 1980, from the beginning of wind farms' development, wind power experienced an unprecedented evolution, increased with almost 1500% within the global wind power installation over the last 15 years, in such a way that at the end of 2015, the total installed capacity reached 432 GW [6].
Wind turbine transforms wind power to electrical power. For a specific large area with high wind speed, to increase power production and decrease costs of installation, wind turbines are grouped within a wind farm. The location of the wind farm, the quality of gearbox, and the shape of wind blades are the factors affecting the conversion efficiency [7]. According to Kenway and Martin [8], changing the blade geometry and structural sizes while maintaining a fixed cost and compatibility with the remainder of turbine system can improve the power output of a wind turbine. Besides, reduced cost of producing wind power can be achieved in different ways, for example, site selection, site layout design, predictive maintenance, and optimal control system design [9]. The installation layout of turbines plays an important role in the design of a wind farm. A non-optimal wind farm layout design can lead to lower than expected wind power capture, increased maintenance costs, and so on [10]. By the ability of turbine's rotor rotation, wake zone is extracted, which renders negative influence on other turbines [11]. This wake phenomenon, which is generated by upstream turbines, causes speed reduction for downstream ones. Subsequently, the power generated by downstream turbines is lower than upstream ones. Since conventional wind turbines' layout significantly increases wake effect, optimization of the layout configuration can be a rational strategy to decrease wake effects and also maximize the total power which may be extracted from wind farms. The 'wind farm layout optimization (WFLO)' problem is classified under such type of wind turbine layout problem [12].
A lot of research studies have been carried out related to WFLO. There are two major approaches in layout optimization: grid-based approach, and unrestricted layout approach. Grid-based approach is to divide a wind farm into a set of equal-sized cells and place turbines in the center of these cells, while in unrestricted layout approach, turbines are allowed to be placed in any positions within the wind farm [13]. For example, Grady et al. [14] conducted grid-based approach to place wind turbines in a 2 km × 2 km farm and results showed that it was able to place wind turbines in a defined area where the goals of the optimization were maximizing the power output and reducing the cost of implementation. Bazacliu et al. [15] conducted a study on wind farm layout optimization problem (WFLOP). The objective of their study was to determine the optimal placement of wind turbines within the farm. They used a discrete representation of wind farm so that the farm area was decomposed into a set of cells, where each cell can contain only one wind turbine. In that approach, the expected power production was maximized. Chowdhury et al. [16] presented the unrestricted wind farm layout optimization (UWFLO) that addressed critical aspects of optimal wind farm planning using constrained particle swarm optimization (PSO). Reasonable agreement between the wind farm model and the experimental results were obtained. The complex nonlinear optimization problem presented by the wind farm model was effectively solved. They found that an optimal combination of wind turbines with different rotor diameters could improve the wind farm efficiency. Mora et al. [17] applied an evolutionary algorithm (EA) to maximize the profit obtained during the useful life of a wind farm, taking into account a given initial investment. Chen et al. [18] investigated the effect of using wind turbines with different hub height on power output in a small wind farm. Three different wind conditions were analyzed using nested genetic algorithm. Results showed that power output of the wind farm using different hub heights would be increased even when the total number of wind turbines was the same. Moreover, results showed that different hub heights could also improve cost per unit power of a wind farm. Serrano Gonzalez et al. [19] discussed the optimal wind farm configuration problem and proposed EA to optimize the wind farm layout. The algorithm's optimization process was based on a global wind farm cost model using the initial investment and the present value of the yearly net cash flow during the entire wind farm lifespan. Results showed that the proposed EA was capable of finding the optimum wind farm configuration.
Some other optimization methods have been used for layout optimization of a wind farm. For example, binary particle swarm optimization (BPSO) was used to design optimal wind farm configuration [11]. Ant colony optimization (ACO) algorithm was applied to the design of wind farm layout [20]. Monte Carlo simulation method was used to optimize the layout of a wind farm [21]. Bansal and Farswan [22] presented a solution of WFLO problem using a recent unconventional optimization algorithm, biogeography-based optimization (BBO). Results showed that BBO was capable to outperform conventional methodologies of solving WFLO problem.
This paper attempts to create a GA-based innovative WFLO method taking into account the ability of rotor's 360 rotation against wind direction and considering the following factors: (1) real wind conditions, (2) selection of wind turbine type and its parameters, (3) number of wind turbines needed for a given wind farm, and (4) wind farm shape. The overall objective of this paper is to significantly develop the grid-based approach by: 1. Developing novel GA-based codes to optimize the wind farm layout as well as reduce the cost per unit power. 2. Implementing the newly developed GA-based codes in a given site under real wind conditions with three scenarios, with different number of generations and population, different effective distances, and different longitudinal and latitudinal distances of turbines from each other. 3. Estimating the annual power production of wind farm and its efficiency.

Site description and wind condition
The power output of a wind farm is directly affected by wind condition. Most previous research used simplified wind conditions, including three scenarios of single wind speed and direction, single wind speed and different directions, and different wind speeds (8,12 and 17 m/s) and directions. In this study, real wind data in the Kahrizak region, Tehran province of Iran are used. The data include wind speeds and wind directions for 6 years at 3 h intervals. The detailed information about Kahrizak region is summarized in Table 1. By assessing the wind data of Kahrizak and drawing wind rose of this region ( Fig. 1), it is observed that this region with maximum and average wind speed of 15 and 6 m/s, respectively, has a high potential for establishing wind farm and the dominant wind direction of the region over the 6 years is toward east and south-east. Kahrizak region also has a flat terrain and Earth's topography has a surface roughness property which is considered as a constant number of Z 0 = 0.3. Besides, wind turbines that are used in the wind farm have the same model and characteristics. The wind farm chosen in this study is divided into a set of cells, where each cell can contain only one wind turbine that is located in the center of each cell. Two-dimensional Cartesian coordinate system is used to determine the turbine layout and to obtain the optimal response. To prevent severe and dangerous wind arising  Fig. 1 Wind rose of Kahrizak region from the turbulent flow behind wind turbines, the distance between a turbine and its adjacent turbines is considered.

Cost model
The total cost for installation of a wind farm is modeled in such a way that depends exclusively on the number of installed turbines. To evaluate the installation cost of a wind farm, the equation applied in Mosetti et al. [23] is used in this study (Eq. 1). It is assumed that the non-dimensionalized number of cost/year (normalized cost) for a turbine is one. If a large number of turbines are installed, a maximum cost reduction of 1 3 can be considered for each added turbine. Thus, the total cost/year of the whole wind farm or the normalized cost is computed as follows: where N is the number of turbines installed in the wind farm.

Turbine parameters and wake model
Wind farm efficiency and cost per unit power are mostly affected by the selection of wind turbine type. The electrical power extracted from the wind turbine is influenced by direction, intensity and occurrence probability of the wind. Thus, thrust coefficient, hub height and rotor diameter are effective factors on the extracted power. There are different turbine types with different characteristics and powers. For this study, wind turbine AV 928, a production of Avantis, which is a manufacturer from China, is selected. The characteristic curve of turbine AV 928 under 10% turbulence is shown in Fig. 2. The technical characteristics of the turbine are presented in Table 2. The turbine starts producing power at wind speed of 3 m/s and reaches the maximum produced power of 2500 kW at wind speed of 11.6 m/s. After this point, with increasing wind speed up to 25 m/s, turbine's power output remains constant till the wind speed reaches cutting out wind speed. At higher speeds than 25 m/s, the turbine blades automatically remain inactive to prevent turbine damages.
The following equation shows the relationship between the speed and the turbine's electrical power output considering a quadratic function based on EL-Shimy et al. [24]: where P i is the power output of ith wind turbine, and u i is the wind speed in front of ith wind turbine. When the ith wind turbine is not affected by any wake, u i will be the velocity of the free stream. When the ith wind turbine is affected by a wake, u i will be the wind speed caused by the wake [13].
The wake model used in this study is the one proposed by Jensen (1983) in describing the wind behavior of a wake, as shown in Fig. 3. Assuming that the momentum is conserved in the wake, the wind velocity of a downstream turbine is as follows [25]:   [14] where u is the wind velocity of the downstream turbine, u 0 is the free flow velocity, x is the distance from the upstream turbine, a is the axial induction factor, α is the entrainment constant, and r is the downstream rotor radius. The relationship between r and the turbine radius r r is computed by Eq. (4) [25]: The axial induction factor can be computed by the turbine thrust coefficient C T , which is given by Eq. (5) [14]: where α is the entrainment constant that can be varied, depending on the characteristics of local terrain and weather conditions, and is determined by Eq. (6) [14]: where h represents the hub height, and z 0 is the terrain surface roughness. Assuming that there are multiple wakes, the kinetic energy wastage is equal to sum of the energy defects. Thus, for N downstream turbines, the velocity can be expressed by Eq. (7) [26]: When investigating wind in different directions, it is noted that if wind blows from the right direction, only the last column is subjected to direct wind (Fig. 4a) and if the wind direction is inclined, both the first row and the last column are exposed to direct wind (Fig. 4b).
It is also worth noting that the wake effect varies for different wind angles. An innovative algorithm is developed based on the angle of two turbines from each other and the angle of wind collision with the first turbine (Fig. 5). According to Fig. 5, this pattern is used to determine whether the turbine T is influenced by the wake effect of turbine T 1 . The wake effect generated by the wind blown from turbine T 1 makes angle α with wind direction. On the other hand, two turbines T and T 1 create an angle β with each other. According to Eq. (8), the wake effect of turbine T 1 affects turbine T.
If Eq. (8) is not realized, turbine T will not be influenced by the wake effect of turbine T 1 . To implement this and codify it in MATLAB software, specific items should be considered. Therefore, the terrain is divided into four coordinate intervals, and considered as radians (Fig. 6).
In this study, to determine the small range of wind direction, the interval between 0 and π/2 is selected (0 ≤ angle < π/2) and then generalized to three other intervals. Besides, to determine the turbine affected by the wake of upstream turbine, the wake of the nearest turbine is considered and this assumption is precisely generalized to other ones. The impact criterion of a turbine from the wake of the (8) angle − < < angle + . Fig. 4 Turbines which are exposed to wind's speed and angle. a The last column is exposed to the initial wind speed. b The first row and the last column are exposed to the initial wind speed

Overview of genetic algorithm
Wind farm layout optimization (WFLO) problem is a discrete problem that, due to its complexity, for example, nonuniform wind speeds with variable directions, cannot be solved using classical methods and have to be solved by intelligent algorithms. Among all intelligent algorithms that have been used in WFLO problem, GA is the best one. It is actually the most famous type of evolutionary algorithms due to its specific properties to yield a set of preliminary solutions, search for optimal solution from amongst the proper ones and repeat this process to achieve the optimum solution [27]. GA is a heuristic solution-search or optimization technique, originally motivated by the Darwinian principle of natural genetic and evolution mechanisms observed in nature. GA was first proposed by John Holland [28] as a means of finding good solutions to problems that were otherwise computationally intractable. Holland's Schema Theorem and the related building block hypothesis provided a theoretical and conceptual basis for the design of efficient GA that was successfully applied to a wide range of practical problems in science, engineering and industry [29][30][31][32][33][34]. This algorithm is based on artificial intelligence and is a population-based method which improves the solutions during different iterations and contributes to the evolutionary process of solutions. GA includes following stages: In the first stage, a random set of solutions is created. Each solution is called a chromosome and each chromosome is made of smaller parts named as gene. In GA, these set of solutions are called population. After the formation of each generation, it must be specified to what extent the chromosomes of the next generation are close to optimal solution. This is known as fitness function. The best solutions for each generation could be defined using fitness function. In the next stage, we create a new generation using a series of GA operators. These operators include selection, crossover and mutation. Creation of a new generation is accomplished through reproduction, for which we need parents. The parents are determined from current population by a selection operator. This operator selects the best cases from the chromosomes existing in a population to create a new generation. With the fusion of two chromosomes, a new member will be created. These two genetic chromosomes play the role of the parents and the new member plays the role of the child. The most common types of crossovers contain: onepoint crossover, two-point crossover, and uniform crossover. Mutation operator uses only one parent to make a child. This is realized through slight changes in initial strings of chromosomes. Finally, after the creation of a new generation, we select the best solution (chromosome) of this generation and compare it with best present solution. This process (making generation) continues till the algorithm reaches its final position, e.g., the optimal solution is found or the stopping criterion for the algorithm is brought to an end.

Process of optimization
GA coding is implemented in MATLAB to search the optimal layout of a given wind farm. The coding is sub-divided into several sections as follows: Insert data: in this section, data are introduced as input to the algorithm, e.g., terrain dimensions, wind turbine characteristics, wind characteristics, and the number of turbines.
Problem definition: in this section, objective functions including fitness and cost functions related to this problem are determined (Eq. 10). The fitness function in this study is to optimize the wind farm layout, and the cost function is to minimize the total cost of the produced power. Parameter setting: in this section, parameters related to reproduction, such as population size, max_iter, percentages of children produced by crossover and by mutation are determined.
Initialization: in this section, an empty matrix for individuals (chromosomes) is defined. In this study, as initial population, GA makes a m × n binary matrix including different individuals representing wind farm layouts, where m is the total number of individuals in one generation and n is the length of each individual representing potential positions of wind turbines. The values of m and n are defined at the beginning of optimization. In each individual, 1 means there is a turbine in the cell and 0 means there is no turbine in it. After that, a random solution should be created for the total population. Members of the population are then sorted and ultimately the best solutions are found and saved.
GA main loop: in the main loop of the algorithm, main computations of the algorithm are performed to determine the optimal solution for the problem. In this section, the algorithm generates new children based on crossover and (10) mutation operations. The two operators of crossover and mutation are written as a function in this section. Crossover: this section includes properties related to crossover operator. The present paper applies the singlepoint crossover method and the crossover rate is considered 0.9.
Mutation: this part includes properties related to mutation operator. The present paper applies the mutation method in chromosomes with real variable and the mutation rate is considered 0.1.
Results: results of the algorithm, including the best solution, the best fitness, computation time, figures representing the number of iteration, fitness, etc., are coded in this section. Figure 7 illustrates the flowchart of the methodology followed in this study for solving WFLO problem using genetic algorithm.

Results and discussion
Optimal turbine layout of the studied region is presented using three scenarios: (1) different population and generations, (2) different effective distances, and (3) different

Optimization results with different numbers of population and generations
Layout optimization is performed in MATLAB software for Kahrizak region with three different numbers of generations and population: (1) generation = 500 and population = 250; (2) generation = 500 and population = 500; and (3) generation = 1000 and population = 500. The optimization results based on different generations and population are presented in Table 3. According to Table 3, changes in the number of generations and population do not have a significant impact on wind farm efficiency, but increases the total power. It must be mentioned that wind farm efficiency is defined as the ratio of the total energy extracted by the wind farm having N turbines and N times the energy extracted by an isolated turbine with the same undisturbed wind [23]. Figure 8 shows the visual representation of the optimal layout obtained using three different number of generations and population. As can be seen, three layouts are approximately similar to each other. Considering the turbine's 360° rotation, the turbine dispersion at the outer edge of the wind  farm to its center is logical and justifiable. Convergence diagrams of the GA for three different generations and population are presented in Fig. 9.

Optimization results with different effective distances
In this scenario, the distance between adjacent turbines is changed from 6 to 20 times as much as the average longitudinal and latitudinal distance of turbines from one another. Then, the coding is executed with generations and population of 1000 and 500, respectively. The numerical results are summarized in Table 4. Based on the results, by increasing  is logical. Figure 10 shows the visual representation of the optimal layout obtained for the effective distance 20. Convergence diagram of GA for effective distance 20 is presented in Fig. 11.

Optimization results with different longitudinal and latitudinal distance of turbines from one another
Given equal number of generations and population and changing the distance x and y, the numerical results are as presented in Table 5. Numerical results show that changing the longitudinal distance (x) and latitudinal distance (y) have a positive effect on the wake effect and significant increase of power output obtained from this scenario confirms it. Figure 10 shows the visual representation of the optimal layouts obtained from this scenario. According to Fig. 12, because the dominant wind direction in this region is toward the east and south-east, thus by increasing the longitudinal distance (x) of the turbines from one another, the density of the turbines in the left hand of the upper rows and the right hand of the lower rows is more than the other sides of the wind farm. In fact, by increasing the longitudinal distance of the turbines from each other, the wake effect on the downstream turbines is decreased, which results in higher efficiency. Convergence diagram of GA with different longitudinal and latitudinal distance of the turbines from one another is shown in Fig. 13. According to results from this study, it can be concluded that GA is capable of optimizing the turbine layout so that the energy cost is reduced compared to that of the traditional layout. These results can be confirmed by some similar studies. For example, Pillai et al. [35] conducted a case study wherein they explored the application of a wind farm layout evaluation function and layout optimization framework to Middelgrunden wind farm in Denmark using genetic algorithm. Results showed that this optimization algorithm was capable of identifying layouts with reduced levelized energy cost compared to the existing layout while still considering the specific conditions and constraints of this site and those typical of future projects. In another study, Rajper and Amin [36] conducted a GA-based study to find out the optimal solution for the wind turbine micro-sightings. The site that was under consideration for greener solutions of the problem was Gharo-Sindh, Pakistan. The basic objective of the study was to find the most optimal solution for cost per unit power. Results showed that GA was able to optimize the value of fitness function. Parada et al. [37] proposed an approach to solve the WFLO problem based on a Gaussian wake model using GA. The proposed approach minimized the annual cost of energy of a wind farm. The application

Conclusions
Given the relatively low cost of electrical power generated by wind farms, the number of installed wind farms is increasing every year. The installation layout of turbines plays an important role in the design of a wind farm. Thus, wind farm layout optimization (WFLO) problem is proposed so as to maximize the total power output with minimum cost. This study introduces innovative GA-based codes considering the rotor's 360° rotation ability against the wind direction to make the optimization of wind turbine layout closer to reality. In this study, by selecting the Kahrizak region as a windy region and choosing a turbine named "AV980", three different scenarios, including different numbers of generations and population, different Among three scenarios, the best result is obtained for a scenario wherein the longitudinal distance is greater than the latitudinal distance. By observing the wind rose of Kahrizak region, it is found that the dominant wind direction of the region is toward the east and south-east. Therefore, increasing the longitudinal distance of the turbines from one another will improve the efficiency and also make the turbine layout more realistic in the terrain. In this case, the efficiency and normalized cost of turbines are 89.5% and 37.4, respectively, and also 56 turbines are needed. Total power is computed annually over 10.1 MW. These amounts of efficiency and power output are very suitable based on real data of a region.