Optimizing Battery Energy Storage System Data in the Presence of Wind Power Plants: A Comparative Study on Evolutionary Algorithms

: This study deals with the optimization of battery energy storage system (BESS) data in terms of significant characteristics of life and efficiency, and their positive impacts on power system efficiency in the presence of wind power plants in a microgrid. To this end, a permanent magnet synchronous generator (PMSG) is used to convert the wind energy by connecting a three-phase dynamic load to the grid. The main novelty of the proposed method is designing a smart backup battery branch to improve the efficiency of the wind farm by maintaining the operating constraints even during the occurrence of harsh faults in the generation section. Additionally, for the first time, the characteristics of the BESS are optimized using nine evolutionary algorithms, including the genetic algorithm (GA), teaching–learning-based optimization (TLBO), particle swarm optimization (PSO), gravitational search algorithm (GSA), artificial bee colony (ABC), differential evolution (DE), grey wolf optimizer (GWO), moth–flame optimization algorithm (MFO), and sine cosine algorithm (SCA), and the results are compared with each other. The simulation results of a case study confirm the robustness of the proposed control strategy for the BESS.


Introduction
Nowadays, there is a positive correlation between increasing the world population and using electricity as a reliable and clean source of energy.Moreover, an ever-growing dependence on the use of energy, especially in the form of electricity, has resulted in some critical problems such as environmental concerns, stability problems, and concerns regarding to the reliability of power systems, which have pushed governments and researchers to find new solutions.Utilizing renewable energy in the form of a microgrid (MG) as an alternative power source is thus recommended.There is a wide variety of renewable energy forms, depending on the site location.Wind energy as a renewable source has significant potential in supplying electricity demands.Wind energy generation can be accessed on about one fourth of the Earth's surface, and wind turbines can theoretically exploit ~59% of this energy.However, this amount is ~50% in real-life conditions [1].
There are various kinds of wind turbines that are used in wind farms.Here, we consider the permanent magnet synchronous generator (PMSG) turbine.In the PMSG, a permanent magnet instead of a coil is responsible for providing an excitation field.The synchronous term is related to the fact that both the rotor and magnetic field rotate at the same speed [2].The most significant advantages of employing a PMSG are the high conversion efficiency and high power density [3].The PMSG has excellent potential for generating electricity in large-scale wind turbines [4].
Wind power is an unpredictable and uncontrollable energy in terms of speed and power density during daytime.These fluctuations generate unsustainable generated electrical power.Such natural wind characteristics will cause problems, mainly related to the stability of the power system.The variable generated power creates an upper limit on the percentage of the total electrical power extracted from wind energy.If wind penetration is <20%, the generated power fluctuations can be mitigated by natural gas plants or other conventional power plants.On the other hand, if this value increases to >20%, then the grid power needs to be smoother and more stable when the electrical power is dispatched [5].The battery energy storage system (BESS) is employed as an effective solution to this challenge.A wide range of the BESS's applications have been studied in [6].
Recently, due to the importance of using BESSs in wind farms, many researchers have focused on this field.Mahmoud et al. [7], a fuzzy-logic-based technique was proposed to control the time of charge/discharge and the parameters of the batteries.Also, this study aimed to apply an adaptive online approach to adjust the economic generation control rules of the microgrid to maintain the secure operation of the network and control the charging cycles of the batteries.Additionally, the particle swarm optimization (PSO), genetic algorithm (GA), and flower pollination algorithms have been employed to solve the economic dispatch problem.Dui, Zhu, and Yao [8] presented a two-stage optimal power-based method in which the BESS was sized, in both wind farms and thermal plants, to reduce the operation costs of wind farms and thermal power plants.Xu et al. [9], by applying the non-grid-connected wind power as a local source of energy production, a hybrid energy storage system (HESS) consisting of batteries and super-capacitors was studied.This paper proposed a multiobjective optimization model to obtain the number of batteries and super-capacitors by using the non-dominated sorting genetic algorithm (NSGA II).Moreover, Meghni et al. [10], have proposed a model consisting of a PMSG in a variable-speed wind turbine (VSWT) and BESS.Also, a fuzzy-based algorithm was developed to obtain the maximum wind power, using a second-order sliding mode control (SOSMC) theory.Wong et al. [11], the whale optimization algorithm (WOA) was considered to optimize the battery energy storage system (BESS) in terms of optimal placement and sizing.The proposed method was applied in two phases; at first, the optimal location and sizing were obtained and, in the second phase, both location and size were simultaneously optimized.In [12], a control strategy based on PSO was proposed to control charge-discharge states and to damp the oscillations of the BESS.Chua et al. [13] presented a fuzzy control algorithm for BESSs to reduce peak demands by predicting the daily load profile and adjusting the power output using the latest state of charge (SOC) and operation time.Additionally, Khalid et al. [14], have introduced a model for obtaining optimal power flow dispatch in a grid-connected wind farm including a BESS.The suggested method helps the power system planners to choose the optimal BESS capacity to maximize the operational profit.Reference [15] proposed four algorithms, including the ant lion optimizer algorithm (ALO), grey wolf optimizer algorithm (GWO), krill herd algorithm (KHA), and Jaya algorithm to minimize the cost of the produced energy.Moreover, three battery technologies, including lead-acid (LA), lithium-ion (Li-ion), and nickel-cadmium (NI-Cd) were considered and the impacts of the lifetime, the depth of discharge (DOD), and the relative costs of different battery technologies were modeled.Additionally, Datta et al. [16], have analyzed the impacts of the BESS on providing primary frequency control to increase the yield of the wind farm.The mentioned BESS consisted of a storage system connected to the DC/AC converter and the required power electronics interfaces.The case study was simulated by DigSILENT/PowerFactory (Gomaringen, Germany) and the results of the system performances were compared, considering the BESS under a single-phase-to-ground fault.As energy storage systems are used to adjust the deviations of the produced power, a methodology to control the imbalances occurring in the wind farm due to the variability of the wind power was proposed by Michiorri et al. [17].This method can suitably size the storage system to obtain an acceptable level of controllability.The proposed method was applied to a real case study in French Guyana.Moreover, Simla et al. [18], were studied some methodologies related to the cooperation of energy storage systems with the wind turbines.The results confirmed a reduction in energy losses.Liu et al. [19], have suggested an approach to optimize the component sizing of the BESS in wind farms with independent system operators.The proposed method consisted of a hybrid energy storage system considering the capacity fading of lithium batteries in the cycle life.Moreover, dynamic programming (DP) was applied to optimize the component sizing of the BESS.Also, the GA and the rule-based method were used for simulation, and the results showed a significant reduction in the capacity degradation and operation cost of energy storage systems.
Martinez-Rico et al. [20], have addressed decreasing the impacts of the unpredictable nature of renewable resources by employing an energy storage system.It was confirmed that the batteries could manage the system by shifting the needed energy and selling it to the consumers at a time when the cost of energy was more expensive than the rest of the day.Additionally, a bidding optimization algorithm was used to improve profitability and minimize the value of battery loss.Also, the impacts of employing the BESS in solving the unpredictable renewable energy behavior problem were detailed by Kocer et al. [21].Furthermore, a review of the improving BESS approaches and their applications were analyzed, and finally, a case study in Turkey, was studied.
Guan Wang et al. [22] proposed a method to decrease the uncertain impacts of energy produced by wind power and photovoltaic cells.Moreover, the time-of-use (TOU) prices and BESS were integrated into the optimal management of a power system in the planning of wind and photovoltaic power plants.Additionally, the Pareto optimal front (POF) was employed to obtain the global solution of simulating an IEEE 30-bus system.Furthermore, Shigenobu et al. [23], have addressed a decision framework for optimal programming of a BESS connected to a distributed generation (DG) with an inverter and voltage control instruments.To be more detailed, a two-step simulation was considered, including the effectiveness of the BESS, which was connected to the smart grid (SG) under fault conditions, and the active SG using LPC (loop power flow controller) was proposed by applying the PSO algorithm to optimize the relevant objectives.
The literature review confirmed that there are few studies related to the optimization of the practical chrematistics of the BESS, especially the state of charge (SOC) and the operation time of the battery.These two parameters are crucial for designing relevant storage systems.Furthermore, BESSs have usually been optimized by applying only one algorithm or control strategy.As there is no further comparison, it is challenging to choose the best characteristics and battery types.
In the present study, the results obtained by applying nine evolutionary algorithms were detailed and compared.Also, the type of the BESS was assumed to be lithium-ion, which can be easily changed to other types due to the flexibility of the proposed model.Also, the relevant constraints of batteries related to the turbine wind speed were considered.This relation is depicted in Figure 1.The main novelties of this study are • Designing an improved control strategy for the BESS of a wind farm, including a PMSG consisting of a backup battery branch in the standby mode; • Optimizing the results of simulating the BESS in the MATLAB environment using nine evolutionary algorithms (GA, teaching-learning-based optimization (TLBO), PSO, gravitational search algorithm (GSA), artificial bee colony (ABC), differential evolution (DE), GWO, moth-flame optimization algorithm (MFO), and sine cosine algorithm (SCA)); and • Comparing the results of the optimization process of the BESS with the results without the optimization procedure.

The Proposed Method
The PMSG of type D shown in Figure 2 was used in the wind farm because it has the best protective effect on whole devices of the power system.In addition, if a fault occurs on the grid side, it will not damage the generator.In the same way, if a fault occurs on the generator side, the transmission line will not be affected.This is because of the power electronic devices that are employed in the proposed wind turbine.The structure of the control strategy for designing the batteries is based on the remaining lifetime of the battery and the value of the depth of discharge (DOD) of each branch.First, the correlation between the SOC and the loss of power of each branch is mentioned as the objective function.Then, by minimizing the loss of power of the BESS, the SOC of each branch will be maximized.
where  is the number of objective functions, the DOD value is considered as a coefficient known as  , which is formulated as Equation ( 12), and  () is defined as the objective function to minimize by using the evolutionary algorithms, and is reformulated as: where  is the number of branches, ( ) is a coefficient obtained from Equation ( 12),  and  are the current magnitudes crossing the ith branch and the internal resistance of the ith branch, respectively.It should be noted that the  is a parameter related to the temperature of each branch of the BESS during the energy storage process; that is why it is considered in the objective function as a coefficient.Since the purpose of the optimization function is to minimize the loss of power of each branch of the BESS, which causes the maximum value of the SOC, the  in Equation ( 1) is considered as the  in Equation ( 2).This makes the objective function more flexible to minimize the power loss of each branch of the BESS independently, which leads to the best global solution for the SOC value of the whole BESS package.There are two significant constraints during the optimization of the objective function, as follow: where  is the BESS power and  is the voltage of the DC-link connected to the BESS pack.By analyzing the connected load to the system and the BESS characteristics, the final objective function, which is based on the SOC and power loss, is derived from Equations ( 5)-( 20) to be optimized with nine evolutionary algorithms.
The generation power of the wind farm when the BESS is connected to the PMSG conforms to the following Equation ( 5): where  is the generated power of the ith PMSG of the wind farm,  is the amount of the stored energy in each BESS pack connected to the PMSG, () is the demand load, and  is the power loss of the whole system.According to Equation ( 7), the  is determined by considering all the Li-ion cells in all branches of the proposed BESS.This value is directly affected by the type of battery cells used in the BESS, as well as the power system losses also added to the mentioned BESS's power loss to obtain the value of  .This equation is defined to mention the power balance by the following constraints: Since a three-phase dynamic load is applied as the demanding load of the system, active power (P) and reactive power (Q) absorbed by the load vary as a function of positive-sequence voltage (V) according to the following equations: 1.
If  >  , P and Q vary as below: 2.
If  <  , the same equations as ( 8) and ( 9) with  =  = 2 (constant impedance load).In these equations, V is the initial positive-sequence voltage; P and Q are the active and reactive powers at the initial voltage, respectively;  and  are the active and reactive coefficients; and T , T , T and T are the time constants.As the proposed model for the BESS relies on the DOD and battery life, there are some remarkable equations to find the remaining battery life and the time that each battery branch can be connected to the DC-link.The following equations are applied to formulate the energy exchange between the BESS and DC-link [5]: in which  is equal to 60 minutes.Also, the value of P is 3.5 MW for 60 minutes.The battery connected to the wind turbine is displayed in Figure 2. The batteries are categorized based on power density, life cycle, and energy density.Hence, the life cycle of a battery and DOD are two important features to distinguish when battery life ends.In this study, these important factors are optimized with nine algorithms.The equivalent model of the proposed battery is illustrated in Figure 3. Generally, lithium-ion batteries need to be replaced after 200 to 1000 charge-discharge cycles [5].This process usually takes at least 4 to 5 years, making this type of battery an economical choice for real conditions.The electrical equivalent of a battery is depicted in Figure 4.The control strategy is planned as a flexible trend, which is based initially on Equation (7).For example, if the rated power of each branch is assumed to be 1 MW, and the result of Equation ( 7) is equal to 3 MW, three branches of the BESS must be connected to the converter, and the standby branch would be offline.Also, the standby branch is designed to stabilize the operation of the wind farm.Especially when a fault or a transient condition occurs in the network, this branch contributes the whole BESS to control and store a percentage of the surplus energy.This prevents the power plant from shutting down in critical conditions by injecting the energy stored in the grid.In other words, the ability of the proposed BESS control strategy leads to keeping the rate of the store and consuming the produced energy at a rather constant profile, which results in the robustness of the proposed BESS in terms of SOC and remaining expected life (REL).Moreover, as transient conditions or different faults may occur in the network, the BESS pack might be exposed to different DOD values during a charge/discharge cycle.That is why it is crucial to consider the calculation of the loss of power of battery branches.It is also worth mentioning that minimizing the power loss is the most important reason for employing the evolutionary algorithms (EAs) in advance.
To be more detailed, the power loss of the battery packs is formulated below: where I(t) is the squared current passing each battery branch of the BESS.Also, as the loss of power of the BESS depends on the BESS temperature constraints, as the temperature of the battery packs increases in different DODs, the losses force the battery packs to release more energy to compensate for the deficiency of the required power of the DC-link.
The EA algorithms are employed to optimize the BESS parameters.The proposed algorithms aim to minimize the power loss of the BESS in different temperature conditions, as well as to minimize the DOD values of each battery branch to increase the efficiency and lifetime of the BESS.Additionally, the values of the final SOC and the remaining expected life (REL) are optimized, and this improves the efficiency of the wind farm.
To formulate the objective function of the problem, the deviations of the temperature of each cell should be considered in the power loss formulation as follows: where T is the instantaneous temperature of the battery cell, and T is the temperature of the battery cell after connecting the BESS to the wind farm, and T is the operating temperature of the battery cell.It should be noted that the value of the α parameter for each cell of the battery branch is selected based on the type of battery cells [24].The current passing through each branch is a function of its SOC as following: where V (SOC) represents the SOC value in the charging/discharging process of the battery branches, and V is the terminal voltage of each branch connected to the DC-link.Moreover, the correlation between the energy stored in the BESS and the SOC of each branch is formulated as: Also, where  is the instantaneous SOC during the charge/discharge process,  is considered as the reference SOC value, and  is the maximum energy stored by considering the backup branch connected to the DC-link.To determine the charge or discharge time of the BESS pack during the power storage process, two binary values are assumed during the optimization procedure as follows: where  and  are the binary parameters that indicate the state of the BESS pack in terms of charging or discharging, respectively.Moreover, when the  is equal to 1, the battery branches are charging and when the  is equal to 1, the battery branches are discharging. and  are the minimum and maximum battery energy storage during the charging and discharging process.Finally, by analyzing the equations, the objective function proposed for minimizing the power loss is a quadratic equation: where α , β , and γ are the parameters regarding the power loss in terms of temperature and DOD deviations of BESS pack i, which are randomly produced during optimizing the objective function to obtain the best global solution.In addition, the values of α , β and γ are varied in the range of [0,1], [0,1], and [0,1.5],respectively.SOC denotes the state of charge of the th BESS pack, and P represents the power loss of the th BESS pack.Accordingly, due to the great changes in the value of the power loss through the test period time (60 minutes), it is recommended that the average of the value of power loss be used to optimize the SOC value.The objective functions are defined as Equations ( 22) and ( 23): By optimizing the mentioned objective function, we minimized the power loss of the BESS to get the maximum SOC of each battery branch of the BESS.
The modified schematic of the open-circuit voltage for each cell of the branches in the BESS is shown in Figure 4 [25].It should be noted that the electro-thermal model is employed in this paper.
A brief explanation of the optimization algorithms consisting of GA, TLBO, GSA, PSO, ABC, DE, GWO, MFO, and SCA is presented.The GSA, TLBO, and PSO algorithms were investigated in detail in our previous study [26].It is also worth mentioning that the objective function obtained from Equation ( 23) was used to optimize the BESS data by applying the suggested algorithms.As an important note, the application of different evolutionary algorithms to various power system optimization problems is a significant challenging issue whose advantages/drawbacks should be discussed and addressed, but the concept is beyond the scope of this research.Interested readers are referred to [27] as an appropriate example of the details of the different subjects in this regard.

The Genetic Algorithm (GA)
The GA is a heuristic evolutionary algorithm based on natural principles to be used as a practical algorithm for hybrid search and optimizing problems.GA can be divided into binary and continuous GA.All the rules of this algorithm are presented in [28,29].

The Artificial Bee Colony (ABC) Algorithm
ABC is a heuristic algorithm originating from honey bees' behavior to intelligently search for locating the nectar in their surroundings [30].It proposes a feeding cycle based on the population, in which individual food locations vary by bees' ability to track and find the positions of the food sources with the highest nectar to formulate the ABC algorithm.Some variables such as population of bees (PB), maximum cycle number (MCN), objective function, and their variables should be defined.The testing functions related to probability, fitness, and optimization are also highlighted as described in [31].

The Differential Evolution (DE) Algorithm
This algorithm consists of five significant steps known as initialization, mutation, recombination, crossover, and selection [32].In the initialization step, the initial value is randomly defined in deterministic areas, including upper and lower limits, to be optimized by the parameters.Additionally, both the mutation and recombination steps aim to generate a population of the number of population (NP) vector trail.The crossover seeks to organize a crossover vector of the parameter value, which is reproduced on two vectors, namely, the initial vector and the mutation vector.The last step, i.e., the selection stage, is used to distinguish the vectors in a way that they can serve as the population for the next iterations [33,34].

The Gravitational Search Algorithm (GSA)
The GSA is one of the most powerful evolutionary algorithms and simulates the behavior of an isolated system of masses based on the Newtonian laws of gravitation and motion in a small sample of masses as an artificial world.The masses obey the law of gravity and the law of motion, as described in [26]; all the formulas of this algorithm are defined in [26].

The Teaching-Learning-Based Optimization (TLBO) Algorithm
This algorithm was introduced in [35].Since then, the TLBO algorithm has been applied as a popular and practical optimization strategy to optimize problems in many engineering fields.The TLBO algorithms were inspired by nature and are originally based on the teacher-student interplay method in a class, which converges to a global solution.The working process of the TLBO consists of two phases: the teacher phase and the learner phase.

The Particle Swarm Optimization (PSO) Algorithm
The PSO is based on the population and uses particles to express possible solutions.The projected position of the ith swarm's particle x and the mentioned particle's velocity v at the (t+1)th iteration are described and updated as the following two equations [36]: where i = 1, …, n and n are the swarm's size, c and c denote the positive constant values (both assumed to be 2), r and r represent random numbers uniformly dispensed in the range [0,1], t is the iteration number, p determines the best former position of the ith particle, and g indicates the best particle among the other particles in the swarm.The best position of the swarm will be selected as the problem's solution.

The Grey Wolf Optimizer (GWO)
The GWO algorithm is based on the leadership hierarchy and hunting mechanism of the grey wolf in nature.Four types of grey wolves, including alpha, beta, omega, and delta, are considered to simulate the leadership hierarchy.Moreover, in this algorithm, searching for prey, encircling the prey, and attacking the prey are assumed as their main steps of hunting.This algorithm is completely detailed in [37].Accordingly, the number of agents is considered to be 6 when setting the algorithm, and the results are validated under the benchmark function, which is defined as F10 in [37].

The Moth-Flame Optimization Algorithm (MFO)
The MFO algorithm is a nature-inspired optimization method obtained from the behavior of the moth fly at night.Transverse orientation is the main inspiration for this optimizer, which is explained in [38].The number of dimensions in this optimization is considered to be 6 for this algorithm, and the benchmark function, which is defined as F8 [38], is applied to validate the results.

The Sine Cosine Algorithm (SCA)
The SCA algorithm is a novel population-based optimization method that creates multiple initial random candidate solutions and makes them fluctuate and converge to the best solution based on the sine and cosine functions [39].The results obtained from optimizing the BESS parameters under the SCA algorithm are validated under the benchmark function, which is defined as F14 in [39].

Case Study Simulation
We selected the proper BESS capacity.If the capacity of the BESS is very small, the process of extra energy storage does not make sense and results in generating more power compared to the rated one.On the other hand, an energy storage system (ESS) with a large capacity may not be affordable for application.There are some important definitions, such as [5]:

•
Cycles of charge and discharge: It determines the battery life.If this amount surpasses the specified number, the rated power is not produced by the battery.In this study, by employing a lithium-ion battery, the life cycle was up to 730 cycles per year [40].

•
Depth of discharge (DOD): The range of the life cycle is wide in terms of the type of lithium-ion batteries.To find the exact life cycle, it is necessary to calculate the accurate battery life.The minimum range of the battery life cycle occurs when operating at high DOD and vice versa.

•
Rate of discharge: It is related to battery life.If the battery is charged or discharged at a higher rate, it can significantly reduce battery life.However, if the battery is used at or below its rated value, it can remarkably increase the battery life.
The proposed model of BESS is depicted in Figure 5, in which the standby battery branch of the BESS is determined by the red block.This design process for BESS was applied to keep the BESS voltage at a value that was very close to the DC-link.For operating the buck-boost converter at high efficiency, the voltage of the BESS branches should be the same as the DC-link ideal voltage.To simulate the BESS impacts on the wind farm, including the PMSG, it was necessary to apply a power trend on the system produced by the wind turbine.This power profile is presented in Figure 6.The rated power of each battery was 1 MW.The difference between the generated power and the reference power determines the amount of power that is precisely used or discharged from the battery.Three lithium-ion batteries were considered.To reduce the total planning cost of the system, only a reserved battery was connected to the system in emergency states.The rated power of the BESS, considering the standby battery, was 4 MW.It is also worth noting that all the battery branches consisted of a group of battery cells connected in a series to raise the voltage capacity.Moreover, the branches were connected in parallel to the battery package (BESS) to increase the total capacity of the BESS.Moreover, the results of optimizing the BESS characteristics were obtained when the wind farm was exposed to a single-phase-to-ground fault.The designed BESS also focused on ending all battery lives at the same time.To satisfy this condition all the DODs of each branch (even the backup branch) should be kept at the same level.This idea was employed during the design of the proposed BESS to prevent cycling currents from being produced between the battery branches during the charge and discharge process.
The proposed model is introduced in Figure 7.This model was developed by designing an efficient BESS system, which was entirely different from that presented in [5].The system can optionally apply both the generated power profile and reference power to consider the wind turbine, according to Figure 6.It should be noted that a sample power profile, considering the parameters of the wind speed and turbine power according to Figure 1, was applied to the wind turbine.Additionally, the sample power profile, which is depicted in Figure 6, was considered during all optimization processes.As well, the optimization process was applied to optimize the characteristics of the BESS pack.

Results and Discussion
All the simulations were conducted in a computer with an Intel Core i7 CPU of 3.1GHz, a RAM of 8 GB, a 64-bit processor in the MATLAB 8.1.0.604 (R2013a) environment.The results were related to optimizing the characteristics of the BESS and comparing them with the results of [5].Accordingly, the values of the wind turbine applied in proposed model is presented at Table 1.Additionally, the PMSG and BESS parameters used were based on Tables 2 and 3, respectively.Moreover, the initial SOC and the life of three batteries connected to the system in parallel were defined differently to test the confirmation of the BESS under severe conditions.The results are given in Table 4.It should also be kept in mind that the obtained results depicted in Table 4 were obtained under the harsh operating condition of a single-phase-to-ground fault in the test study system, as well as a variable three-phase dynamic load.Nonetheless, with decreasing the final SOC, the values of the REL of each branch were still acceptable.Moreover, in fact, the real power systems will rarely be operated continually under these abnormal conditions due to the protection system actions.
During the simulation process, some parameters can affect the results more than the other parameters.In other words, these parameters have a significant role in changing the final results, or the obtained results are more sensitive to their changes during simulating the proposed model.In addition, the internal resistance of each cell of the batteries is the most significant factor affecting both power loss and the SOC.Applying some changes to this parameter results in some undesirable values in power loss, if the changes are not reasonable or are out of the range.To be more detailed, this item determines the type of the battery cells in terms of the electrochemical process.That is why calculating and regulating this parameter should be attentively considered.The operation time of the BESS for 60 minutes is expressed in Table 5.The number of batteries connected to the system for 60 minutes without optimization and the backup branch is presented in Figure 8.As an important note, here the setting parameters for the abovementioned algorithms were detailed.In the GA algorithm, population size, iteration, generation, and time limit were respectively selected equal to 100, 200, 10, and 180.Additionally, the ABC algorithm was programmed in this pattern: the colony size = 6, cycles = 100, error goal = 1e − 20, dimension = 6, lower bound = 50, and upper bond = 100.Moreover, the proposed normalized function of the DE algorithm was assumed as in Equation (15).The parameters for the DE algorithm were assumed as: lower bond = 50, upper bond = 100, variable = 6, population = 10, Nmax = 10, and  = 0.1.
Also, in the GSA algorithm, the gravitational constant function was selected as: The constants assumed to set the function of the GSA algorithm were considered to be 200, 50, 100, 6, 110, and 20 for maximum iteration, lower bond, upper bond, dimension,  , and  , respectively.In addition, the values for the TLBO algorithm were: Ps (number of students) = 2, nd (number of dimensions) = 6, iteration = 100, and ng (number of generations) = 10.
As shown in Figures 12, 13, and 14, the number of batteries connected to the wind farm could be increased up to four.These batteries were sorted into four parallel branches as a unique BESS.All the evolutionary algorithms increased the percentage of the REL and final SOC of the BESS.However, the TLBO and GWO algorithms had a unique advantage in comparison with the other seven algorithms.As shown in Figure 13b and Figure 14a, the optimized BESS under the TLBO and GWO algorithms specified that there was only a short period in which the BESS forced the fourth branch battery to be used in the standby mode.Also, the desired DOD for the proposed BESS, consisting of lithium-ion cells for each branch, was 10% to 20%.Therefore, according to Table 6, the TLBO and GWO algorithms had more impact on increasing the values of both the final SOC and the life of all three batteries, compared with the other five algorithms.Moreover, the parameters optimized by the TLBO and GWO algorithms were the best solutions for satisfying the precondition of the DOD.These specifications made the design of the BESS more economical to be employed in wind farms because the backup branch could be changed to or replaced with another type or another branch due to the sufficient resting time.

Conclusions
A BESS model was proposed to be easily applied to a PMSG wind turbine in the grid-connected mode.In addition, some evolutionary algorithms, namely, the TLBO, PSO, GA, DE, ABC, GSA, GWO, SCA, and MFO algorithms were employed to optimize the BESS characteristics.The presented method had some advantages in comparison with other BESSs, including its ability to increase the REL of the batteries, increase the final SOC of the batteries, and minimize the number of batteries, reducing the costs of the entire system.Also, the analysis of the data confirmed that applying evolutionary algorithms to the BESS led to a better REL and final SOC.Moreover, the results showed that the TLBO and GWO algorithms were among the best algorithms in terms of increasing the REL and final SOC, and minimizing the operation time of the standby battery.This was mainly because the TLBO and GWO algorithms had the appropriate logic and structure for the global solution because of the special method of searching.However, it should be noted that the GWO and TLBO algorithms had some drawbacks, mainly due to the difficulty of parameter setting as well as requiring too much programming.According to Table 8, the run-time of the mentioned algorithms was longer than the other algorithms, in similar conditions.The results also confirmed the operation validity of the proposed BESS under transient and fault conditions.

Figure 2 .
Figure 2. Type D turbine: the variable-speed full power converter connected to the permanent magnet synchronous generator (PMSG).

Figure 3 .
Figure 3.The battery equivalent model in MATLAB.

Figure 4 .
Figure 4.The electrical circuit of the lithium-ion battery.

Figure 5 .
Figure 5.The configuration of the proposed battery energy storage system (BESS).

Figure 6 .
Figure 6.The generated power profile for 60 minutes.

Figure 7 .
Figure 7.The schematic view of the proposed model of the wind turbine with the PMSG connected to the BESS.

Figure 9 .
Figure 9.The numerical comparison between final SOC (%) and REL (%) by applying the evolutionary algorithms for Battery A.

Figure 10 .
Figure 10.The numerical comparison between final SOC (%) and REL (%) by applying the evolutionary algorithms for Battery B.

Figure 11 .Figure 12 .
Figure 11.The numerical comparison between final SOC (%) and REL (%) by applying the evolutionary algorithms for Battery C.

Figure 13 .Figure 14 .
Figure 13.The number of batteries connected to the power system after optimization by considering the standby battery branch during 60 minutes ((a) optimizing with the GA algorithm, (b) optimizing with the TLBO algorithm)

Table 1 .
The values of the parameters of the wind turbine used in the proposed model.

Table 3 .
The BESS data.

Table 4 .
The values of initial and final battery lives.

Table 7 .
The comparison of the energy efficiency parameters under optimization with evolutionary algorithms.

Table 8 .
The run-time of different optimization algorithms in this work.