Day-Ahead Optimal Battery Operation in Islanded Hybrid Energy Systems and Its Impact on Greenhouse Gas Emissions

: This paper proposes a management strategy for the daily operation of an isolated hybrid energy system (HES) using heuristic techniques. Incorporation of heuristic techniques to the optimal scheduling in day-head basis allows us to consider the complex characteristics of a speciﬁc battery energy storage system (BESS) and the associated electronic converter e ﬃ ciency. The proposed approach can determine the discharging time to perform the load peak-shaving in an appropriate manner. A recently proposed version of binary particle swarm optimization (BPSO), which incorporates a time-varying mirrored S-shaped (TVMS) transfer function, is proposed for day-ahead scheduling determination. Day-ahead operation and greenhouse gas (GHG) emissions are studied through di ﬀ erent operating conditions. The complexity of the optimization problem depends on the available wind resource and its relationship with load proﬁle. In this regard, TVMS-BPSO has important capabilities for global exploration and local exploitation, which makes it a powerful technique able to provide a high-quality solution comparable to that obtained from a genetic algorithm. Methodology, J.M.Y.; Supervision, J.S.A.-S. and J.A.D.-N.; Validation, J.M.Y. and J.S.A.-S.; Writing—Original draft, J.M.L.-R. and J.S.A.-S.; Writing—Review & editing, J.A.D.-N.


Introduction
Global warming and other environmental problems are driving the adoption of renewable energy sources at the residential, commercial, and industrial levels. Estimating the impact of climate change on the ecosystem involves the accurate knowledge of the carbon cycle and its associated uncertainty. Calculating cumulative emissions in order to prevent an extreme warming level is a key step to guide the manner in which industrial processes, including power generation, should be carried out. Actions for reducing global warming are adjusted following the threshold of 1.5 or 2 • C as the critical limit in a time interval between the years 2000 and 2050 or 2100. However, depending on the established assumptions and scenarios, the risk of experiencing extreme conditions at the middle of the century could be a realistic prospect [1].
Under these circumstances, many countries have been changing their energy mix from a fossil-fuel based one to a renewable-based one, incorporating wind and solar photovoltaic energies, as well as demand response programs [2]. In addition, financial tools such as mutual funds are also implemented to provide economic support for these technologies [3].
As renewable energies are intrinsically variable, the power system requires a high degree of flexibility to effectively manage the uncertainty introduced by these sources, and this could be achieved by implementing demand side management or by installing any type of energy storage system (ESS).

Literature Review
Management of isolated HES considering the influence of renewable resources and their associated variability has been treated by many authors. In this regard, Li et al. [11] developed a procedure for sizing and management of wind-BESS units. Historical wind power time series is analyzed to estimate the low-frequency component, which is the most prominent one. Using the resulting signal, charging-discharging cycles of BESS are determined considering constant power levels. During the charging period, the power to be provided by the wind-BESS unit is set to the minimum power of low-frequency component within that period. Conversely, power generation is scheduled to the highest power of low-frequency component during discharging periods. In theory, these mechanisms ensure the existence of sequential charging-discharging intervals. However, power dispatch settings could be modified to avoid the charging-discharging cycles at partial level. Other issues related to the wind power forecasting error and BESS lifetime have also been incorporated.
Luo et al. [12] created a model for the operation and sizing of wind-BESS to compensate for the forecasting error. Forecasting error is modeled by using a beta distribution, considering extreme conditions related to pessimistic and optimistic perspectives. BESS dynamic behavior, as well as its lifetime, have been also incorporated.
Mohammadi et al. [13] proposed a day-ahead scheduling model of a microgrid (MG) composed of electrical as well as hydrogen and thermal energy storage technologies. Problem formulation was based on a two-stage stochastic programming approach, while its solution was carried out using an enhanced version of cuckoo optimization algorithm. The high flexibility of the studied configuration Appl. Sci. 2019, 9,5221 3 of 30 results is useful to deal with the fact that thermal and electrical energy consumption are typically not synchronized.
O'Dwyer and Flynn [14] paid special attention to the power system operation on a daily basis, using hourly and sub-hourly time steps, under high renewable energy integration and ESS. According to the reported results, the traditional hourly analysis cannot properly estimate the ramping requirements, the number of starts of conventional generators, as well as the role and potential of ESS on the cycling reduction. Consequently, the interdependence between renewable power curtailment, CO 2 emissions, and the cycling process of thermal units is not accurately described.
Wen et al. [15] presented an enhanced security-constrained unit commitment (SCUC) model, which incorporates BESS to mitigate the negative effects of a sudden contingency and consequently to prevent cascading outages. The methodology was formulated as a two-stage mixed integer programming problem and solved by means of Benders decomposition. The same author in [16] introduced a model based on frequency dynamic constrained unit commitment (UC) able to incorporate wind power uncertainty. Interval optimization approach was combined with mixed integer linear programming (MILP) to determine the appropriate unit schedule.
Nguyen and Crow [17] presented a scheduling model with probabilistic constraints based on stochastic dynamic programming (DP). The proposed BESS-model is inspired by the functioning of conventional fuel-based units. Thus, a detailed cost model was developed considering the electrochemical process of BESS.
Khorramdel et al. [18] proposed a UC model based on cost-benefit analysis, in which a probabilistic analysis based on a here-and-now approach was incorporated. Then, particle swarm optimization (PSO) was implemented in order to minimize total generating costs.
Li et al. [19] developed a framework to quantify the benefits of ESS incorporation to HES. The methodology is based on stochastic UC solved by means of MILP.
Jiang et al. [20] proposed a management model for a residential HES provided by wind generation, micro-combined heat and power generation and smart appliances, enrolled in a real-time pricing (RTP) program. Additionally, optimal behavior of several aggregated HESs is analyzed by means of a day-ahead stochastic economic dispatch (ED) and UC model based on MILP.
Anand and Ramasubbu [21] presented a scheduling model of a system enrolled in a RTP program composed of wind and photovoltaic generation, as well as a microturbine and a fuel cell, based on anti-predatory PSO.
Wu et al. [22] proposed a methodology to solve ED and UC problems using the time-scaling transformation combined with an auxiliary continuous vector.
Dui et al. [23] proposed a two-stage scheduling methodology for BESS performance evaluation. In the first step, UC problem including the effects of thermal and wind generators is solved by means of second-order cone programming. Then, in the second step, the management strategy for BESS is designed and evaluated using a genetic algorithm (GA).
Psarros et al. [24] investigated the operation of HESs using a MILP. BESS sizing is deeply discussed, concluding that this element is a key device for the provision of fast energy reserve. The same author in [25] proposed a model able to consider different time resolutions, based on the combination of model predictive control and MILP.
Ahmadi et al. [26] presented a model for the solution of SCUC including BESS. Aging cost related to BESS operation is incorporated to the objective function. Then, MILP is combined with information-gap decision theory so that the conservatism of the strategy to be implemented can be adjusted by the system operator.
Saleh [27] created and experimentally tested the performance of an energy management system (EMS) based on the solution of UC by Lagrangian relaxation. Thus, control values of permanent magnet generator of the wind turbine and the power-electronic converter are obtained.
Gupta et al. [28] formulated a SCUC model including the effects of BESS in order to compensate the variability of renewable power sources. The mathematical problem is solved by using Benders decomposition, determining the locational marginal price, wind power curtailment, as well as the line contingency.
Alvarez et al. [29] proposed a general purpose ESS model inspired by the behavior of hydraulic reservoirs. Using the results obtained from stochastic dual DP, carried out to determine the long-term energy schedule, the linear model of ESS cost is derived. Finally, stochastic UC, including the aforementioned ESS model, was formulated.
Chen et al. [30] developed a scheduling model based on multi-agent system for the coordination of multiple MGs. Such coordination is carried out by means of the alternating direction method of multipliers, obtaining the optimal energy management of the multiple MGs. Additionally, the negative effects of uncertainty sources are compensated by using day-in rolling.
Tan et al. [31] proposed a dispatch model able to incorporate different operating perspectives related to fuel savings, carbon emissions, power generation costs, amount of renewable energy integrated, and power generation efficiency. Uncertainty of renewable generation and forecasting of carbon-trading price were included by using Monte Carlo simulations, while the associated optimization model was solved by implementing the technique for order preference by similarity to ideal solution combined with Grey relational analysis.
Yiwei et al. [32] presented a scheduling model for a HES based on renewable and thermal generation, as well as cascade hydropower and pumped ESS. The model focuses on the economy and security aspects of system operation. The optimization strategy is divided into three main stages. During the first stage, integer variables are preprocessed using heuristic rules. Then, during the second stage, ED and UC are solved. Finally, during stage three, power system feasibility was evaluated.
Once the literature review has been exposed, describing the state-of-the-art techniques used for day-ahead scheduling, the main contribution and novelty of this work are carefully explained in the next section.

Main Contributions
As can be observed from the presented literature review, a vast family of methodologies has been created, some of them based on heuristic techniques such as GA and PSO, another group inspired by DP, and most of them based on MILP combined with Benders decomposition.
In a general sense, the optimization technique to be selected strongly depends on the characteristics and assumptions of the ESS model, as well as the context (isolated or grid-connected system) and the information available.
To take advantage of the vast family of BESS models, a recently developed version of binary PSO (BPSO), which incorporates a time-varying mirrored S-shaped (TVMS) transfer function, has been adopted in this paper. Consequently, hourly behavior of charging-discharging efficiency as well as the influence of charge controller on battery operation can be effectively incorporated. Additionally, the influence of wind-speed daily profile on battery schedule and GHG emissions is deeply analyzed. The impact of battery operation on the emissions of total hydrocarbons (THC), carbon monoxide (CO), oxides of nitrogen (NO X ), CO 2 , and particulate matter (PM) is investigated.
The remainder of the paper is organized as follows. Section 2 describes the mathematical models of the system configuration under study. Section 3 explains the formulation of the optimization problem and its solution by TVMS-BPSO. Then, problem formulation is tested in Section 4 through a sensitivity analysis based on GA. As TVMS-BPSO is a novel version of BPSO, its performance is compared with GA in Section 5. Finally, conclusions and main findings are discussed in Section 6.

Hybrid Energy System Model
The structure of the HES under analysis is shown in Figure 1. On one hand, the diesel generator represents the controllable power source able to provide energy under any circumstance. Thus, energy not supplied (ENS) is neglected. Due to the fact that the diesel generator has important operating costs related to fuel consumption and overhauling, the incorporation of the wind generator combined with BESS and power converter allows us to reduce the number of operating hours of the diesel unit, reducing the operating costs of the whole system. operating costs related to fuel consumption and overhauling, the incorporation of the wind generator combined with BESS and power converter allows us to reduce the number of operating hours of the diesel unit, reducing the operating costs of the whole system.
Besides the wind generator, BESS, power converter, and diesel generator, the dump load (not shown in Figure 1) allows us to consume all the energy surplus of the system in order to maintain the energy balance. This could occur when BESS reaches its maximum capacity and a high magnitude of wind power is available.
In the next sections, computational models of the wind generator, BESS, and diesel generator will be carefully described.

Wind Generator Model
Wind power generation has been modeled using a typical power curve described according to Equations (1)(2)(3)(4) [33,34]: In this way, the relationship between the wind speed ( ( ) ) at a determined time step ( ) and the corresponding wind power production ( ( ) ) is clearly established. Besides the wind generator, BESS, power converter, and diesel generator, the dump load (not shown in Figure 1) allows us to consume all the energy surplus of the system in order to maintain the energy balance. This could occur when BESS reaches its maximum capacity and a high magnitude of wind power is available.

BESS and Power Converter Models
In the next sections, computational models of the wind generator, BESS, and diesel generator will be carefully described.

Wind Generator Model
Wind power generation has been modeled using a typical power curve described according to Equations (1)-(4) [33,34]: (2) (3) In this way, the relationship between the wind speed (S W(t) ) at a determined time step (t) and the corresponding wind power production (P W(t) ) is clearly established.

BESS and Power Converter Models
BESS is a crucial device for the appropriate operation of HES because it provides operational flexibility to the whole system. The technology chosen in this work is the vanadium redox flow battery (VRFB) due to its easy scalability, which makes it appropriate for large-scale integration. The mathematical model adopted is shown in Equations (5)- (15), and it has been experimentally tested and validated in [35][36][37].
Battery voltage (U B(t) ) and efficiency (η B(t) ) are defined according to charging and discharging processes using Equations (5) and (6), respectively.
During charging process, when battery power (P B(t) ) is positive, battery voltage (U ch B(t) ) is related to the state of charge (SOC) (SOC B(t) ) according to (7), while charging efficiency for voltage (η ch V(t) ) and energy (η ch E(t) ) are related to SOC and battery power as shown in (8) and (9), respectively. Then, global efficiency of charging phenomena (η ch B(t) ) can be estimated using (10).
During discharging process (P B(t) < 0), battery voltage (U dis B(t) ) and SOC are related according to the linear expression shown in (11). Voltage and energy efficiencies (η dis V(t) and η dis E(t) ) depend on battery power and SOC following (12) and (13), respectively. Thus, discharging efficiency (η dis B(t) ) is estimated through the product of these variables (η dis V(t) and η dis E(t) ), as suggested in (14).
Appl. Sci. 2019, 9, 5221 7 of 30 SOC at a determined time interval (t) is defined using (15), which depends on the battery power and efficiency, calculated by following the equations previously described.
Additionally, some operational constrains of VRFB have to be fulfilled. This idea is expressed in (16) for the battery voltage, in (17) for the cell-stack power, and in (18) for SOC: Regarding the behavior of power converter, it has been represented through its variable efficiency shown (19), which allows us to estimate the power according to (20).
Regarding the parameters of the VRFB model previously described in (5)(6)(7)(8)(9)(10)(11)(12)(13)(14)(15), specifically the parameters U a ch − U h ch , U j ch − U n ch , U p ch , U q ch for charging and U a dis − U h dis , U j dis − U m dis for discharging; they can be found in [35][36][37]. Similarly, the parameters P a C and P b C related to the power converter efficiency have been obtained from the experimental data published in [38].

Diesel Generator Model
The diesel generator is in charge of satisfying the load that cannot be provided by the wind generator, the battery bank, or both. In addition, this task has to be done considering the technical constraints of the diesel unit. If only the effect of wind generator needs to be considered, NL is calculated according to (21): On the other hand, if the joint effect of the wind generator and BESS needs to be considered, NL can be defined using (22): As aforementioned, the diesel generator has to supply NL as defined in (21) or (22), fulfilling the constraint (23): To determine the power dispatch of the diesel unit, the parameter P a D is defined according to (24): Appl. Sci. 2019, 9,5221 8 of 30 Then, depending on the value of P a D , diesel generation (P D(t) ), power surplus (P EXC(t) ), and power not supplied (P ENS(t) ) are determined by following (25)(26)(27), respectively, Once the mathematical model of HES has been defined, the optimization technique proposed in this paper will be clearly explained in the next section.

Optimization of Day-Ahead Operation
In this section, the optimization problem and the proposed methodology are carefully described. Section 3.1 pays special attention to the objective function definition, whereas Section 3.2 explains how TVMS transfer function is embedded into BPSO for the daily scheduling of BESS.

Problem Formulation
The focus of this work is on developing a methodology for load peak-shaving to be applied to the management of autonomous HES. In this regard, EMS monitors the state variables of all the elements connected to the point of common coupling ( Figure 1). Then, using this information and the day-ahead forecasts of wind power and load demand, determines how power sources should be dispatched to minimize the operating costs of the system for the corresponding day. Note that the influence of forecasting error on system operation has not been considered in this work.
In a general sense, BESS operation can be defined by means of three different states: charging, discharging, and disconnection. These states can be represented by using integers: charging can be represented as +1, discharging can be represented as −1, whereas 0 represents the battery disconnection.
The goal of the management strategy proposed in this paper consists of finding out the appropriate pattern (charging, discharging, and disconnection) of usage of BESS during the day in order to reduce NL-peak. This is carried out by means of a heuristic optimization algorithm in which each individual or agent is represented as shown in Figure 2. If NL is negative, it means that BESS should be charged in order to store the energy surplus during periods of high wind speed. On the contrary, when NL is positive, it is not evident whether BESS should be discharged or disconnected from HES. Thus, a set of I individuals, who take into account different operational conditions (discharging and disconnection) during different hours, is considered. each individual or agent is represented as shown in Figure 2. If NL is negative, it means that BESS should be charged in order to store the energy surplus during periods of high wind speed. On the contrary, when NL is positive, it is not evident whether BESS should be discharged or disconnected from HES. Thus, a set of individuals, who take into account different operational conditions (discharging and disconnection) during different hours, is considered. The structure of a single individual ( = 1, … , ) at a determined iteration ( ) of the heuristic optimization algorithm can be described according to (28): where each element ( , , ) is an integer between −1 and +1, depending on the time ( ) and NL value ( ( ) ). Similarly, the population or group of agents of the optimization algorithm for iteration can be expressed as a matrix according to (29): Considering a determined individual , the value of its objective function ( ( , ) ) during a determined iteration ( ), which has to be minimized, is calculated according to (30): The structure of a single individual (i = 1, . . . , I) at a determined iteration (k) of the heuristic optimization algorithm can be described according to (28): where each element g (i,t,k) is an integer between −1 and +1, depending on the time (t) and NL value (P N(t) ). Similarly, the population or group of agents of the optimization algorithm for iteration k can be expressed as a matrix according to (29): Considering a determined individual i, the value of its objective function (O (i,k) ) during a determined iteration (k), which has to be minimized, is calculated according to (30): where the pattern P C(i,t,k) corresponds to that obtained from the application of the model previously described in Section 2 (Equation (20)), considering the influence of power converter (P C(i,t,k) = P C(t) ). In other words, P C(i,t,k) is calculated according to (20), the indexes i and k have been introduced to represent the fact that it is calculated for a specific individual (i) during a determined iteration (k). The magnitude presented in (30) does not have any physical meaning. Indeed, this has been taken from previous experience of BESS operating in RTP programs [39], where sold and purchased power all over the day is considered as the optimization variable. Following this analogy, P C(i,t,k) can be considered as the transaction power of BESS (sold and purchased power), whereas P N(t) could be considered as linearly related to the fuel-consumption curve of the diesel generator. In other words, in the analogy with selling and purchasing prices under RTP, the variable P N(t) could be considered as a linear function of fuel-consumption costs.
The main conclusion of this reasoning is that, the hour at which BESS should be discharged, in order to maximize profits from energy trading with the RTP scheme, is exactly the same hour at which BESS should be discharged in order to reduce NL-peak in an autonomous HES.

Optimization by TVMS-BPSO
PSO is an optimization algorithm based on the dynamic behavior of a group of agents interacting with each other. Important variables such as the position (g (i,t,k) ) and velocity (v (i,t,k) ) of each agent (i) are considered during the evolution of the algorithm (k). Using constriction factor approach, the agent velocity can be expressed using (31): where C a PSO and C b PSO are coefficients selected so that the condition (32) is fulfilled, The coefficient ∅ is then used to calculate the factor χ required in (31), Using the coefficient ∅, the convergence of the algorithm can be managed. TVMS transfer function has been recently proposed by Beheshti [40] to improve the capabilities of BPSO. TVMS-BPSO uses two sigmoid functions during the conversion of reals to binaries, and these functions are shown in (34) and (35): where the coefficient σ (k) varies during the algorithm evolution according to (36): Once the variables S a PSO(i,t,k+1) and S b PSO(i,t,k+1) have been calculated, they are evaluated on (37) and (38) to get the binary variables J a PSO(i,t,k+1) and J b PSO(i,t,k+1) , which are a preliminary result of the algorithm.
The definitive result from the conversion of reals to binaries is based on the value of the objective function O a (i,k) and O b i,k obtained from the evaluation of J a PSO(i,t,k+1) and J b PSO(i,t,k+1) previously estimated. Then, the positions to be considered during the next iteration (k + 1) are defined by using (39): Once the principles of TVMS-BPSO have been exposed. The problem of day-ahead BESS scheduling on a daily basis and the TVMS-BPSO performance to solve this problem are analyzed in Sections 4 and 5, respectively.

Testing the Problem Formulation
To evaluate the mathematical formulation previously presented in Section 3.1, the performance of HES of Figure 1 is analyzed using a GA and a typical system with a wind generator of 75 kW (P max W = 75 kW), and the load profile of Figure 3 has been used. Cut-in, rated, and cut-out wind speeds equal to 3, 12, and 25 m/s, respectively, have been assumed. .
Once the principles of TVMS-BPSO have been exposed. The problem of day-ahead BESS scheduling on a daily basis and the TVMS-BPSO performance to solve this problem are analyzed in Sections 4 and 5, respectively.

Testing the Problem Formulation
To evaluate the mathematical formulation previously presented in Section 3.1, the performance of HES of Figure 1 is analyzed using a GA and a typical system with a wind generator of 75 kW ( = 75 kW), and the load profile of Figure 3 has been used. Cut-in, rated, and cut-out wind speeds equal to 3, 12, and 25 m/s, respectively, have been assumed. Regarding the fuel-based generator, a diesel unit of 100 kW ( = 100 kW) with minimum operating power of 50% ( = 50 kW) has been assumed. As the effects of wind generation and BESS management on the reduction of fuel consumption have been deeply studied in the technical literature [41], special attention to the influence of these devices on GHG emissions has been paid in this work. Thus, the GHG-emission measurements published in [42] have been adopted.
During the GA implementation, the initial population is randomly initialized, so that an operator has to be incorporated in order to fix the elements of the matrix ( ) to +1 at those hours at which NL is negative ( Figure 2). Additionally, such operator has to be included after the application of mutation operator.
Regarding the GA parameters, a population with 75 individuals, 100 generations, a crossover rate of 90%, and a mutation rate of 5% were considered.
Wind speed profile has been modeled by using the general purposes profile of (40) [7,10], which depends on the average wind speed ( ), diurnal pattern strength ( ), and the hour of peak wind speed ( ). Regarding the fuel-based generator, a diesel unit of 100 kW (P max D = 100 kW) with minimum operating power of 50% (P min D = 50 kW) has been assumed. As the effects of wind generation and BESS management on the reduction of fuel consumption have been deeply studied in the technical literature [41], special attention to the influence of these devices on GHG emissions has been paid in this work. Thus, the GHG-emission measurements published in [42] have been adopted.
During the GA implementation, the initial population is randomly initialized, so that an operator has to be incorporated in order to fix the elements of the matrix G (k) to +1 at those hours at which NL is negative ( Figure 2). Additionally, such operator has to be included after the application of mutation operator.
Regarding the GA parameters, a population with 75 individuals, 100 generations, a crossover rate of 90%, and a mutation rate of 5% were considered.
Wind speed profile has been modeled by using the general purposes profile of (40) [7,10], which depends on the average wind speed (S a W ), diurnal pattern strength (S b W ), and the hour of peak wind speed (S c W ). The simulation and optimization analysis were implemented in MATLAB ® , using a personal computer with i7-3630QM CPU at 2.4 GHz, 8 GB of memory and a 64-bit operating system.
The previously mentioned cases are carefully discussed in the next subsections.

Case I: Low Wind Speed with Fully Charged Battery
Conditions of low wind speed and fully charged BESS were simulated by considering an average speed of 4 m/s (S a W = 4 m/s) and an initial SOC equal to 85% (SOC B(0) = 0.85). Figure 4 presents the wind speed (left) and wind power (right) obtained from the evaluation of (40) for the aforementioned values of S b W . Because the average speed is close to the cut-in one, high wind speed oscillations (S b W = 0.4) are directly reflected in the wind power profile.
minimum and maximum voltage were assumed as 42 and 56.5 V ( = 42 V and = 56.5 V), respectively. The entire bank is composed of 10 of these batteries connected in parallel.
The simulation and optimization analysis were implemented in MATLAB ® , using a personal computer with i7-3630QM CPU at 2.4 GHz, 8 GB of memory and a 64-bit operating system.
The previously mentioned cases are carefully discussed in the next subsections.

Case I: Low Wind Speed with Fully Charged Battery
Conditions of low wind speed and fully charged BESS were simulated by considering an average speed of 4 m/s ( = 4 m/s) and an initial SOC equal to 85% ( ( ) = 0.85). Figure 4 presents the wind speed (left) and wind power (right) obtained from the evaluation of (40) for the aforementioned values of . Because the average speed is close to the cut-in one, high wind speed oscillations ( = 0.4) are directly reflected in the wind power profile.    Figure 5 shows the GA-convergence, which takes around 20 iterations to establish a near-optimal schedule. and maximum SOC were assumed as 15 and 90% ( = 0.15 and = 0.9), respectively, and minimum and maximum voltage were assumed as 42 and 56.5 V ( = 42 V and = 56.5 V), respectively. The entire bank is composed of 10 of these batteries connected in parallel.
The simulation and optimization analysis were implemented in MATLAB ® , using a personal computer with i7-3630QM CPU at 2.4 GHz, 8 GB of memory and a 64-bit operating system.
The previously mentioned cases are carefully discussed in the next subsections.

Case I: Low Wind Speed with Fully Charged Battery
Conditions of low wind speed and fully charged BESS were simulated by considering an average speed of 4 m/s ( = 4 m/s) and an initial SOC equal to 85% ( ( ) = 0.85). Figure 4 presents the wind speed (left) and wind power (right) obtained from the evaluation of (40) for the aforementioned values of . Because the average speed is close to the cut-in one, high wind speed oscillations ( = 0.4) are directly reflected in the wind power profile.    Figure 6 presents the day-ahead schedule of BESS for this case. As can be observed, BESS remains disconnected during the morning, between t = 1 h and t = 10 h in all cases. Then, BESS is discharged between t = 11 h and t = 15 h for most of the cases, followed by some disconnection periods, so as to be later discharged during the last hours of the day, between t = 20 h and t = 24 h. These resting intervals or periods of battery disconnection allow us to improve the management of the stored energy by moving it towards the NL-peak hours. disconnected during the morning, between = 1 h and = 10 h in all cases. Then, BESS is discharged between = 11 h and = 15 h for most of the cases, followed by some disconnection periods, so as to be later discharged during the last hours of the day, between = 20 h and = 24 h. These resting intervals or periods of battery disconnection allow us to improve the management of the stored energy by moving it towards the NL-peak hours.   (16) and (17) for battery voltage and SOC, respectively.   (22) and (21), respectively. According to these results, the proposed peak-shaving strategy is effective at discharging the energy initially stored on BESS during those hours of high electricity demand.   (16) and (17) for battery voltage and SOC, respectively. be later discharged during the last hours of the day, between = 20 h and = 24 h. These resting intervals or periods of battery disconnection allow us to improve the management of the stored energy by moving it towards the NL-peak hours.   (16) and (17) for battery voltage and SOC, respectively.   (22) and (21), respectively. According to these results, the proposed peak-shaving strategy is effective at discharging the energy initially stored on BESS during those hours of high electricity demand.   (22) and (21), respectively. According to these results, the proposed peak-shaving strategy is effective at discharging the energy initially stored on BESS during those hours of high electricity demand.   Figure 9 (left), it is possible to observe how NL has a convex shape, whereas THC emissions have concave behavior, which clearly suggests that THC emissions could increase as NL is reduced. Regarding the relationship between NL (Figure 8 left) and CO emissions (Figure 9 right), concave behavior of both surfaces is clearly observed, which means that CO emissions can be reduced with the corresponding   Figure 9 (left), it is possible to observe how NL has a convex shape, whereas THC emissions have concave behavior, which clearly suggests that THC emissions could increase as NL is reduced. Regarding the relationship between NL (Figure 8 left) and CO emissions (Figure 9 right), concave behavior of both surfaces is clearly observed, which means that CO emissions can be reduced with the corresponding limitation of the NL to be supplied by diesel generator.   Figure 9 (left), it is possible to observe how NL has a convex shape, whereas THC emissions have concave behavior, which clearly suggests that THC emissions could increase as NL is reduced. Regarding the relationship between NL (Figure 8 left) and CO emissions (Figure 9 right), concave behavior of both surfaces is clearly observed, which means that CO emissions can be reduced with the corresponding limitation of the NL to be supplied by diesel generator.   Figure 11 presents PM emissions. It is possible to observe how all of them slightly increase at the end of the day, due to the fact that BESS management strongly focuses on NL-peak mitigation.   Figure 10 shows NO x (left) and CO 2 (right) emissions, and Figure 11 presents PM emissions. It is possible to observe how all of them slightly increase at the end of the day, due to the fact that BESS management strongly focuses on NL-peak mitigation.    Figure 12 verifies that there is no energy surplus (left) or energy not supplied (right) because renewable generation is very low and the diesel generator is able to supply all electricity demand.    Figure 12 verifies that there is no energy surplus (left) or energy not supplied (right) because renewable generation is very low and the diesel generator is able to supply all electricity demand. Tables 1-4 summarize the daily results related to GHG emissions and diesel generation. By comparing the second columns of Tables 1 and 2, it is possible to observe how THC emissions increase as previously discussed. In the contrary case, a reduction on CO, NOx, CO2, and PM is clearly observed.  Tables 1-4 summarize the daily results related to GHG emissions and diesel generation. By comparing the second columns of Tables 1 and 2, it is possible to observe how THC emissions increase as previously discussed. In the contrary case, a reduction on CO, NO x , CO 2 , and PM is clearly observed.  Table 3 shows the change on GHG emissions based on the results reported in Tables 1 and 2. The increment of THC emissions is between 12.92% and 14.43%, whereas the reduction of CO, NO x , CO 2 , and PM are approximately 51.02%, 20.80%, 12.59%, and 32.92%, respectively. Table 4 shows in bold those hours at which power generation is reduced as a result of BESS incorporation, especially during the peak-load of the afternoon and night.

Case II: High Wind Speed with Empty Battery
In this case, conditions of high wind speed with an empty battery are studied. Specifically, an average wind speed of 14 m/s (S a W = 14 m/s) and an initial SOC of 15% (SOC B(0) = 0.15) are considered. Wind speed and wind power under these conditions are shown in Figure 13, in the left and right sides, respectively, for S b W between 0 and 0.4, as previously specified.    According to the wind power profile (Figure 13 right), rating power is reached in almost all cases, except when a high wind speed oscillation ( S b W → 0.4) is observed, resulting in a wind power reduction during the morning.
GA evolution is shown in Figure 14, where it can be observed how fast the algorithm converges due to the influence of the high wind speed. In other words, in the presence of high wind speed, the energy surplus forces BESS to be charged, limiting the number of possible operational combinations, and consequently speeding up the convergence. GA evolution is shown in Figure 14, where it can be observed how fast the algorithm converges due to the influence of the high wind speed. In other words, in the presence of high wind speed, the energy surplus forces BESS to be charged, limiting the number of possible operational combinations, and consequently speeding up the convergence.  Figure 15, where the battery is charged during the morning in most situations. However, discharging actions are also advised sometimes in the morning, and this is observed when wind generation reduces as a consequence of wind speed profile oscillations. Initially, the battery is empty, so that discharging the battery in this situation does not result in any load satisfaction, because the battery is not able to provide any power. In other words, battery discharge when ( ) = is equivalent to the battery disconnection obtained by setting ( , , ) ⃪0. BESS management is shown in Figure 15, where the battery is charged during the morning in most situations. However, discharging actions are also advised sometimes in the morning, and this is observed when wind generation reduces as a consequence of wind speed profile oscillations. Initially, the battery is empty, so that discharging the battery in this situation does not result in any load satisfaction, because the battery is not able to provide any power. In other words, battery discharge when SOC B(t) = SOC min B is equivalent to the battery disconnection obtained by setting g (i,t,k) ← 0.  Figure 16 shows the results obtained from the simulation of the management signal previously shown in Figure 15. Battery power (Figure 16 left) and SOC (Figure 16 right) are presented, and the battery is charged during the morning and then discharged during the afternoon. The situations of high wind speed oscillations result in a reduction of energy surplus, and consequently less power is available to be used in the peak-shaving process during the afternoon.  Figure 16 shows the results obtained from the simulation of the management signal previously shown in Figure 15. Battery power (Figure 16 left) and SOC (Figure 16 right) are presented, and the battery is charged during the morning and then discharged during the afternoon. The situations of high wind speed oscillations result in a reduction of energy surplus, and consequently less power is available to be used in the peak-shaving process during the afternoon. Figure 16 shows the results obtained from the simulation of the management signal previously shown in Figure 15. Battery power (Figure 16 left) and SOC (Figure 16 right) are presented, and the battery is charged during the morning and then discharged during the afternoon. The situations of high wind speed oscillations result in a reduction of energy surplus, and consequently less power is available to be used in the peak-shaving process during the afternoon.  Figure 17 shows the NL profile depending on if the effects of BESS are considered (left) or not (right), calculated by using (22) and (21), respectively. By comparing these results, it is possible to observe how NL-peak is reduced.   Figure 17 shows the NL profile depending on if the effects of BESS are considered (left) or not (right), calculated by using (22) and (21), respectively. By comparing these results, it is possible to observe how NL-peak is reduced.

BESS management is shown in
shown in Figure 15. Battery power (Figure 16 left) and SOC (Figure 16 right) are presented, and the battery is charged during the morning and then discharged during the afternoon. The situations of high wind speed oscillations result in a reduction of energy surplus, and consequently less power is available to be used in the peak-shaving process during the afternoon.  Figure 17 shows the NL profile depending on if the effects of BESS are considered (left) or not (right), calculated by using (22) and (21), respectively. By comparing these results, it is possible to observe how NL-peak is reduced.  As NL is so low when BESS is incorporated, energy surplus is produced because the diesel generator is forced to operate at its minimum capacity in order to satisfy a very low load. This operating mode produces a fixed amount of GHG emissions. This reasoning can be verified in Figure 18 for THC (left) and CO (right), in Figure 19 for NO X (left) and CO 2 (right), and in Figure 20 for PM. As NL is so low when BESS is incorporated, energy surplus is produced because the diesel generator is forced to operate at its minimum capacity in order to satisfy a very low load. This operating mode produces a fixed amount of GHG emissions. This reasoning can be verified in Figure  18 for THC (left) and CO (right), in Figure 19 for NOX (left) and CO2 (right), and in Figure 20 for PM.      Figure 21 shows the daily profiles of energy surplus (left) and ENS (right), respectively. As wind generation is abundant from the high wind speed, energy excess is observed at almost any time. Conversely, there is no ENS.       Tables 5 and 6 report the cumulative daily values of GHG emissions for different wind speed profiles. Then, the reduction on the emitted pollutants as a consequence of BESS integration is reported in Table 7. Because the diesel generator is operating at its minimum allowed power ( ( ) = ), the reduction of GHG emissions is the same for all the factors considered, up to 12.5%.  Tables 5 and 6 report the cumulative daily values of GHG emissions for different wind speed profiles. Then, the reduction on the emitted pollutants as a consequence of BESS integration is reported in Table 7. Because the diesel generator is operating at its minimum allowed power (P D(t) = P min D ), the reduction of GHG emissions is the same for all the factors considered, up to 12.5%.
To improve understanding of the HES operation, Table 8 presents the output power of the diesel generator with and without considering the BESS operation. In bold are shown those situations where the diesel unit is disconnected, all of them during the first peak between t = 12 h and t = 13 h.   In this case, conditions of extreme wind speed are analyzed by setting the average speed to 24 m/s ( = 24 m/s), while the battery remains empty ( ( ) = 0.15). Figure 22 shows the wind speed (left) and wind power (right) for this case. As wind speed becomes higher than the cut-out speed (25 m/s) for those cases with wind speed oscillation, the wind turbine is taken out of service in order to preserve it. Thus, NL suddenly increases during the afternoon. GA evolution is shown in Figure 23, where a fast convergence is observed due to the fact that the battery has to be charged during the first hours of the day, reducing the number of possible combinations of the optimization problem. GA evolution is shown in Figure 23, where a fast convergence is observed due to the fact that the battery has to be charged during the first hours of the day, reducing the number of possible combinations of the optimization problem. Management signal is shown in Figure 24. According to these results, battery should be charged during the morning. Then, a short resting period is advised so that enough energy is available to be discharged during the peak-load hours. Management signal is shown in Figure 24. According to these results, battery should be charged during the morning. Then, a short resting period is advised so that enough energy is available to be discharged during the peak-load hours. Management signal is shown in Figure 24. According to these results, battery should be charged during the morning. Then, a short resting period is advised so that enough energy is available to be discharged during the peak-load hours. Charging and discharging cycles are represented by means of the battery power and SOC shown in Figure 25 at the left and right sides, respectively.  Charging and discharging cycles are represented by means of the battery power and SOC shown in Figure 25 at the left and right sides, respectively.
Management signal is shown in Figure 24. According to these results, battery should be charged during the morning. Then, a short resting period is advised so that enough energy is available to be discharged during the peak-load hours. Charging and discharging cycles are represented by means of the battery power and SOC shown in Figure 25 at the left and right sides, respectively.  The reduction of NL as a result of BESS integration can be observed at the left side of Figure 26. NL without considering the influence of BESS is presented at the right side of Figure 26, where the increment of load demand during the afternoon can be clearly observed. The reduction of NL as a result of BESS integration can be observed at the left side of Figure 26. NL without considering the influence of BESS is presented at the right side of Figure 26, where the increment of load demand during the afternoon can be clearly observed.   GHG emissions are fully described in Figures 27-29, where the lack of wind generation during the afternoon, as a result of the extremely high wind speed, directly influences the behavior of all emission factors.    GHG emissions are fully described in Figures 27-29, where the lack of wind generation during the afternoon, as a result of the extremely high wind speed, directly influences the behavior of all emission factors.   Energy surplus and ENS are reported in the left and right sides of Figure 30, respectively, where the energy excess is directly related to the operation of the diesel generator during the afternoon. As expected, there is no ENS because the diesel generator is able to supply any value of electricity demand. Energy surplus and ENS are reported in the left and right sides of Figure 30, respectively, where the energy excess is directly related to the operation of the diesel generator during the afternoon. As expected, there is no ENS because the diesel generator is able to supply any value of electricity demand.
Energy surplus and ENS are reported in the left and right sides of Figure 30, respectively, where the energy excess is directly related to the operation of the diesel generator during the afternoon. As expected, there is no ENS because the diesel generator is able to supply any value of electricity demand. Tables 9-12 summarize the GHG emissions and diesel generation for this case. By comparing Tables 9 and 10, it is possible to observe that, in some situations, THC emissions can increase when BESS reduces NL in a considerable manner. Regarding the wind speed oscillation, as increases, wind speed in the hours close to 15 h ( = 15 h) increases to a value higher than cut-out speed (25 m/s), removing the wind power generation. Thus, BESS supplies a part of the required power, but essentially most of it is provided by the diesel generator, increasing even more the emissions of CO, NOx, CO2, and PM to the atmosphere.  Tables 9-12 summarize the GHG emissions and diesel generation for this case. By comparing Tables 9 and 10, it is possible to observe that, in some situations, THC emissions can increase when BESS reduces NL in a considerable manner. Regarding the wind speed oscillation, as S b W increases, wind speed in the hours close to 15 h (S c W = 15 h) increases to a value higher than cut-out speed (25 m/s), removing the wind power generation. Thus, BESS supplies a part of the required power, but essentially most of it is provided by the diesel generator, increasing even more the emissions of CO, NO x , CO 2 , and PM to the atmosphere. In Table 12, it can be observed how the diesel generator reduces its power production or is disconnected. This happens in those hours between t = 12 h and t = 20 h, when BESS has an active role in mitigating NL.
From the sensitivity analysis of Cases I-III, it is possible to conclude that the objective function defined in (30) offers reasonable results in terms of BESS management for peak-shaving. The next section studies the performance of TVMS-BPSO implemented to minimize this already tested objective function.

Performance of TVMS-BPSO
To evaluate the capabilities of TVMS-BPSO presented in Section 3.2 for day-ahead BESS scheduling, the conditions of Case I (low wind speed with fully charged battery) previously described in Section 4.1 have been considered. This case has been chosen because the number of optimization variables to be determined is the highest. Regarding the number of agents and iterations, these have been set equal to the population size and generations of GA previously implemented in Section 4 (75 agents and 100 iterations), and this guarantees a fair comparison between both methods. Other parameters of BPSO have been adjusted as follows; C a PSO = 2.05, C b PSO = 2.05, σ min = 0.1, and σ max = 1. Figures 31-33 show the comparison between GA and TVMS-BPSO for different wind speed profiles, whereas Table 13 shows the value of the objective function. As can be observed, TVMS-BPSO employs global exploration during the first iterations, analyzing solutions with high objective function value. As the algorithm evolves, exploitation has the relevant role of guiding the algorithm to a high quality solution, comparable to that obtained from GA implementation, according to Table 13.  Table 13 shows the value of the objective function. As can be observed, TVMS-BPSO employs global exploration during the first iterations, analyzing solutions with high objective function value. As the algorithm evolves, exploitation has the relevant role of guiding the algorithm to a high quality solution, comparable to that obtained from GA implementation, according to Table  13.     Table 13 shows the value of the objective function. As can be observed, TVMS-BPSO employs global exploration during the first iterations, analyzing solutions with high objective function value. As the algorithm evolves, exploitation has the relevant role of guiding the algorithm to a high quality solution, comparable to that obtained from GA implementation, according to Table  13.

Conclusions and Remarks
The results obtained from the analysis of the aforementioned cases offer us important lessons about the mitigation of GHG emissions by integrating a BESS managed from a purely economic perspective. The proposed approach is based on the solution of an optimization problem in which the number of possible combinations varies with the available wind speed profile.

Conclusions and Remarks
The results obtained from the analysis of the aforementioned cases offer us important lessons about the mitigation of GHG emissions by integrating a BESS managed from a purely economic perspective. The proposed approach is based on the solution of an optimization problem in which the number of possible combinations varies with the available wind speed profile.
As NL becomes negative, the management signal of BESS is directly set to the charging process (g (i,t,k) = +1). In the contrary case, when NL is positive, the optimization approach has to determine whether the BESS should be discharged (g (i,t,k) = −1) or disconnected (g (i,t,k) = 0) to reduce the daily NL-peak.
Let T be the number of hours during which NL is positive (Case I Section 4.1), the number of decision variables to be determined is defined as 2 T . In Case I, the wind speed profile was so low that no energy surplus was observed. However, the initial SOC was high, so that the proposed approach had to determine how to use that stored energy in order to reduce NL-peak. Under these circumstances, T = 24 and the number of possible combinations is 16,777,216. That is why GA and TVMS-BPSO require some iterations to get a near-optimal solution (Figures 5 and 31-33). Conversely, as wind speed increases, as studied in Case II and Case III, energy surplus increases and the number of combinations is reduced, making the management problem easier to solve. This is why an extremely fast convergence is observed in Figures 14 and 23, for Case II and Case III, respectively. With respect to TVMS-BPSO performance, its important capabilities for global exploration and local exploitation offer a high quality solution similar to that obtained from GA implementation (Table 13).
Regarding GHG emissions, the highest reduction was observed in Case I, in which wind power generation was very low, but available energy from BESS was optimally allocated. As Table 3, Table 7, and Table 11 were calculated using the wind-diesel system as reference, Case I presents the highest percentage of reduction. As long as wind speed increases, the diesel generator must be committed to its minimum capacity so that GHG emissions cannot be totally eliminated, and this is important for the optimal sizing of HES. In the presence of an extremely high wind speed, when the wind turbine is disconnected, the reduction of GHG emissions highly depends on how BESS is managed, which can be observed in the results of Case III (Table 11), specifically. Another relevant result is that THC emissions do not always increase with the partial operation of the diesel unit: in Case II, THC emissions were reduced, perhaps because the diesel generator was disconnected in some operational circumstances.  Battery efficiency at time t (V).

SOC B(t)
Battery state of charge at time t. P B(t) Battery power at time t (kW). P C(t) Converter power at time t (kW). P C(i,t,k) Converter power of individual i at time t and iteration k (kW). P L(t) Load demand at time t (kW). P N(t) Net load at time t (kW).

P D(t)
Diesel power at time t (kW). P a D Parameter of diesel power calculation (kW). P EXC(t) Power surplus at time t (kW).

P ENS(t)
Power not supplied at time t (kW).   Objective function values for agent i and iteration k.