Optimal Dispatch Strategy of Virtual Power Plant for Day-Ahead Market Framework

: Renewable energy sources prevail as a clean energy source and their penetration in the power sector is increasing day by day due to the growing concern for climate action. However, the intermittent nature of the renewable energy based-power generation questions the grid security, especially when the utilized source is solar radiation or wind ﬂow. The intermittency of the renewable generation can be met by the integration of distributed energy resources. The virtual power plant (VPP) is a new concept which aggregates the capacities of various distributed energy resources, handles controllable and uncontrollable loads, integrates storage devices and empowers participation as an individual power plant in the electricity market. The VPP as an energy management system (EMS) should optimally dispatch the power to its consumers. This research work is proposed to analyze the optimal scheduling of generation in VPP for the day-ahead market framework using the beetle antenna search (BAS) algorithm under various scenarios. A case study is considered for this analysis in which the constituting energy resources include a photovoltaic solar panel (PV), (MT), wind turbine (WT), fuel cell (FC), battery energy storage system (BESS) and controllable loads. The real-time hourly load curves are considered in this work. Three different scenarios are considered for the optimal dispatch of generation in the VPP to analyze the performance of the proposed technique. The uncertainties of the solar irradiation and the wind speed are modeled using the beta distribution method and Weibull distribution method, respectively. The performance of the proposed method is compared with other evolutionary algorithms such as particle swarm optimization (PSO) and the genetic algorithm (GA). Among these above-mentioned algorithms, the proposed BAS algorithm shows the best scheduling with the minimum operating cost of generation.


Introduction
The scheduling problem of distributed energy resources is a major issue in power systems due to different objectives and procedures, and its limitations. Microgrids and virtual power plants (VPPs) are two eminent solutions for the optimal scheduling problem.
Various aspects of VPPs and the microgrid scheduling problem such as solving methods, modeling techniques and uncertainty were discussed in [1]. The VPP integrates various distributed energy resources (DERs), Energy Storage System (ESS), small conventional power plants and controllable loads, so the bidding strategy within the market is necessary to conduct analyses. The strategic bidding equilibrium of virtual power plants in a joint regulation and energy market was analyzed. A bi-level mathematical program was developed for maximizing the profit as well as social welfare maximization of each producer. The bi-level problem was formulated as a mixed-integer linear programming model and the power transmission distribution factors (PTDF) were used for modeling the transmission constraints [2]. The power system can operate most efficiently by optimal energy management. Demand response can play an important role for managing the sources optimally. A detailed review was presented based on the different aggregation technologies of the VPP and developments of demand side resources [3]. The VPP integrates a wide variety of distributed generation resources such as photovoltaic, wind and hydro power plants and can enable the small sources to participate in the wholesale electricity market. The VPP operation can be maximized by optimizing the economic benefits of the system [4]. A fully distributed approach of the VPP was presented for maximizing the economic benefits subjected to line transmission limits, power balance constraints and the local constraints for the distributed energy resources. A distributed VPP dispatch algorithm was developed for this purpose, in which the centralized control system is not needed [5].
The integration of renewable generation such as photovoltaic and wind is highly volatile and leads to the problem of grid security. The control of the generation in a VPP pool leads to reconsidering the dynamic constraints, which makes the system more complex. A time domain simulation was presented for improving the power quality of the VPP, which consists of photovoltaic power, wind power and pumped storage integrated with an islanded grid including a thermal power plant [6]. The VPP aggregates several small-size generators which are situated close to the loads. The quality of power production by the VPP can be improved by optimizing the profit. A VPP model was considered which consists of two Distributed Generator (DGs) loads and a microgrid. The maximization of profit was formulated as a non-linear maximization problem with constraints. GAMS software was used to solve the optimization problem [7]. The VPP can operate with maximum efficiency when its generations are at the utmost condition. The small-scale wind turbine is of great interest in the VPP. To achieve the maximum energy from the wind turbine, two modeless methods were designed such as intelligent and non-linear strategies based on the HCS method. Fuzzy logic control (FLC) was used to implement intelligent Maximum Power Point Tracking (MPPT) due to its ability to cope with the problem related to the conventional methods [8].
The small-scale distributed energy resources can participate in the wholesale electricity market with the VPP concept. The correlated operation of several distributed energy resources implies surplus profit for the VPP. A profit-sharing scheme was developed for the combination of DERs. This scheme can be applied to the VPP dispatching center for reserve markets and energy trading [9].
Although a profit-sharing scheme of distributed energy resources was developed, the authors did not consider the constraints of the DG and energy storage system, which effects the generated power quality. A real-time control strategy was developed for active power dispatch among the units. The optimization problem was solved with the interior-point approach by considering the controllable DG capacity constraints to obtain the balance between demand and generation [10]. The security issues of the future energy supply and the concern about the environment's health have led the research activities on alternative renewable energy systems. The VPP consists of renewable generation such as solar and wind, which are stochastic in nature. Hence, to maintain the grid security, these sources should be combined with dispatchable generation. An economic operation-based load-dispatching algorithm was developed which consists of a forecasting algorithm by the combination of the cascade-forward neural network, empirical mode decomposition and linear model [11]. The main policy of European energy is to supply green energy in an efficient manner. Therefore, distributed generation technologies such as Renewable Energy Source (RES)-based generation with combined heat and power coupled to district heating (CHP-DH) are largely installed. The optimal bidding strategy was investigated for a VPP that uses CHP-DH for meeting the uncertainties of renewable generation. Two-stage stochastic programming was used for modeling the uncertainties [12]. The efficient operation of the VPP is based on the framework of profit maximization. A bi-level optimization model was developed for maximizing the profit of the VPP. This bi-level method was formulated as a mixed-integer linear programming problem and the operation model was verified with the IEEE-118 bus power system [13].
Even if the optimal energy management was developed in this paper using profit maximization, the market strategies of the VPP operation were not considered. Therefore, a bi-level optimal scheduling model was developed which combines both the real-time and day-ahead markets. The hourly scheduling strategy of the VPP was developed for the day-ahead market in the first stage. The second stage dealt with the real-time market operation, where the cost imbalance was minimized. The particle swarm optimization algorithm and commercial solver were used to solve the two-stage scheduling problem [14]. A day-ahead scheduling framework was presented for a VPP, which consists of a mix of generation units in terms of a wind power plant, synchronous distributed generation and storage facilities such as a small pumped storage plant (PSP) and electric vehicles (EVs). The uncertainties of the EV owner behavior, wind generation and market prices were considered using the point estimate method [15].
An optimal day-ahead schedule was developed using a modified scenario-based decision-making method for thermal and electrical energy sources. The uncertainties of intermittent renewable power generation, electrical demand and the market prices were also considered [16]. Optimal scheduling of DERs was presented for a VPP in many studies [17][18][19][20][21]. All of these contribute to solving the prevailing problem of integration of renewable energy sources along with the cost optimization of the VPP.
The use of hybrid energy resources is increasing day by day due to the intermittency of renewable generation and the present economic condition. The optimal scheduling of electric and gas energy resources was developed for a smart home which was provided with a fuel cell-based micro-CHP system. The real coded genetic algorithm was used for attaining the optimal operational cost of the smart home [22]. A new technical-economic dispatch model of the VPP was presented to maximize the profit. The technical-economic dispatch model was developed as a mixed-integer optimization problem. The model was applied to real data from an irrigation system [23]. The stochastic, interval and robust optimization requires complex calculation. Thus, the deterministic and interval optimizations are combined to solve the VPP's dispatch problem [24]. Optimal dispatch of power to the consumers and the grid is necessary for the VPP operation. To maintain the optimal operation, the active power dispatch strategy of the VPP component such as a large-scale wind farm should balance the solver reliability and tracking accuracy. The conventional proportional distribution (PD) strategy for a large-scale wind farm is not adequate for balancing the conflict of the regulation flexibility and the tracking facility. A novel hierarchical active power dispatch strategy was proposed for a larger-scale wind farm based on the fuzzy c-means clustering algorithm and model predictive control method. The developed strategy shows the advantages of eliminating dynamic tracking errors, increasing the distribution flexibility of [25].
Stochastic dispatch in the optimization of a gas-electric VPP (GVPP) was developed which consists of photovoltaic power generation, a wind power plant and a gas turbine as the generating plant [26]. To reduce the losses and generation cost, and to improve the voltage profile in an isolated microgrid, a joint active and reactive power dispatch strategy was developed [27]. The demand side management was accomplished with dynamic economic dispatch (DED) which integrates new modeling for the demand, dynamic load dispatch and advanced metering. The big data technology was adopted to store a huge market and plant data [28]. A bi-level multi-time scale scheduling method was presented to solve the optimal scheduling problem of a multiple-operator virtual power plant. The internal electricity price formation-based bidding equilibrium was presented at the upper level, and the lower level consists of the multi-time scale optimal scheduling method. This method can improve the application range of the virtual power plant along with the reduction in the uncertainty on dispatching results [29]. The power forecasting model was established with a neural network and the clustering algorithm [30]. An optimal dispatch strategy was formulated for the unified electricity market using the fruit fly optimization algorithm. The dispatch strategy aims to earn the maximum profit which includes the retail price, load demand and market price [31].
The multi-objective optimization problem was solved with the fruit fly optimization algorithm [32,33]. The environmental economic dispatch problem was solved with the enhanced non-dominated sorting (ESFOA)-based fruit fly optimization algorithm [34]. The improved fruit fly optimization algorithm was used to solve the non-linear complex optimization problem [35,36]. The load uncertainties were considered and investigated in the virtual power plant environment [37,38].
The detailed literature survey on virtual power plant is presented in the Table 1. A basic scheduling model was presented for maximizing the operating revenue without considering uncertainty. The scheduling model was developed for a virtual energy plant which consists of photovoltaic power generation (PV), wind power plant, combined heat and power generation (CHP), solar collectors, electric boiler.

Robust optimization
The proposed scheduling model can maximize the use of clean energy to obtain economic benefits. [39] An optimal scheduling model was developed for a smart distribution network (SDN) with electric vehicle. This model was used to minimize the operational cost of SDN and emission reduction.

Linear programming
The role of EV in reducing carbon emissions and operational cost minimization was investigated. [40] The operational model was developed for optimal day-ahead thermal and electrical scheduling of VPP.
Mixed-integer linear programming (MILP) The demand response program and inclusion of the energy storage system are considered in this VPP model. Both electrical and thermal plants of VPP are considered in this paper. [41] Optimal scheduling was developed with two-stage robust stochastic programming model.

Mixed-integer linear programming (MILP)
The developed model can be used for hourly unit commitment considering wind uncertainty. [42] A local day-ahead energy market (LDEM) was modeled for the optimal operation of a distributed network.

Stochastic programming
The technical constraints were considered for distribution locational marginal price. [43] The optimal scheduling of distributed energy resources was developed in this paper.

Mixed-integer non-linear programming
The scheduling method can be applied to a very large scale problem. [44] Optimal energy management was developed for VPP in this paper. Linear programming The Imperialist Competitive Algorithm (ICA) used for the optimal energy management of VPP can reduce the operation cost more effectively. [45] A risk-based two-stage stochastic optimization framework was developed to address the optimal energy management of VPP.

Mixed-integer linear programming
Conditional value at risk method was applied for including the risk parameters in the decision-making problem. Moreover, the uncertainties of the renewable generation and market price were also modeled. [46] Customer adoption model was utilized as decision-making tool.

Mixed-integer linear programming
The proposed model of DER-CAM is financially stable and more accurate.

Beetle antenna search algorithm
Higher search accuracy and improves the path planning accuracy for different environments.

Linear programming method
The uncertainty of renewable energy generation was considered for optimal scheduling.

Ref. No. Contribution
Techniques Remarks [51] Offering strategy was developed for VPP in unified electricity market.

Stochastic adaptive robust optimization method
The uncertainty of wind power production and market prices was modeled as decision-making problem. [52] Optimal DA market offering model was developed for VPP.

Four-level robust optimization method
Scenario-based DA price uncertainty, box-like uncertainty set for wind uncertainty and two types of VPP operators, RA (risk-averse) and PS (profit-seeking), were considered.
[53] Optimal bidding strategy was presented for profit maximization of commercial VPP.
Three-stage stochastic bi-level optimization The uncertainty was considered for real-time VPP-W production and VPP-HVAC consumption.
Many research works are available with optimal scheduling of generation in the VPP network [44][45][46]. The grid integration of the VPP was presented with different approaches [54].
Moreover, a combination of stochastic and robust optimization methods was developed [51] in order to increase the profit of the VPP in the unified electricity market. The authors achieved good results, but the convergence time was long and complex calculation was required for most methods. In addition, the market strategies of VPP operation were not considered in most of the literature. In order to bridge the research gap, the optimal dispatch strategy is presented for the day-ahead market using the beetle antenna search algorithm. This algorithm is based on the searching behavior of the longhorn beetles. It incorporates the function of the antenna of the beetle and random searching behavior of the beetle. It is proved to have good performance in solving optimization problems with the advantages of tuning a few parameters and high speed. This algorithm contains a wide searching range with higher accuracy and can maintain less time complexity for multiple mechanisms. Even though there are several advantages, the algorithm has the shortcomings of low precision and fast reaching in local optimum for solving complex problems. The contribution of the paper is as follows:

•
The novelty of this work is the integration of microgrids under the virtual power plant environment and the optimal dispatch of the power to achieve maximum profit.

•
The beetle antenna search algorithm is proposed to solve the problem of the optimal dispatch strategy of the virtual power plant in the day-ahead market environment. • An empirical study of different parameter settings of the BAS algorithm is performed and demonstrates achieving near global optima solutions. • Three different scenarios are considered to check the effectiveness of the proposed method with other methods available in the literature.

•
The proposed method is implemented for the day-ahead market strategy in which some parameters are assumed such as the dynamic pricing of the grid, load on an hourly basis and bids of each generator.
The paper is organized in seven sections. The second section deals with the brief description of the virtual power plant. In the third section, the optimal scheduling problem is formulated for the day-ahead market with three different scenarios. The optimal scheduling problem is solved with the beetle antenna search (BAS) algorithm in the fourth section. The forecasted load data, generation data and the bids of the generator are constituted in the fifth section. The simulation results are discussed in the sixth section, and the overall analysis and conclusions are drawn in the last section.

Virtual Power Plant (VPP)
The VPP can participate in the electricity market as an individual energy generation system. It is a combination of energy storage systems, energy generation units and manageable loads. The VPP purchases power from the grid and charges the energy storage system when the electricity price is lower and supplies the loads by discharging the battery when the electricity price is higher in the market.
Generators used in the VPP are based on renewable energy sources such as PV generation and wind turbines. Due to the intermittent nature of renewable generation, the output power is unpredictable. Therefore, the bids and the grid requirements cannot be met by renewable generation. The aggregation of the power generation resources in the VPP should maintain the network security. Each element of the VPP is tied up with an energy management system (EMS). The power flow between DERs is also controlled by an EMS.
The data from controllable loads, all generating units and storage units connected to the VPP are collected by the EMS. Then, the EMS sends the control signals to each element of the VPP according to the available data. With a bidirectional communication system, the EMS can receive the present status and send a control signal to each unit. Three operating modes exist for the EMS, such as the grid export mode, the grid import mode and the no power exchange mode. The excess power generated from the VPP is fed back to the grid in the grid export mode. The power deficiency of the VPP is met by the grid in the grid import mode.
The controllability and visibility of DERs have been limited to the consumers as they need to be connected through the internet [2]. Now, with the VPP concept, all the DERs are controllable and viable to a wide range of customers, ranging from small to medium renewable sources in the electricity market. The schematic diagram of the VPP is shown in Figure 1.

Market Information and Assumption
The market structure studied is the day-ahead (DA) electricity market. As shown in Figure 2, the dynamic pricings of the grid, load, PV and WT generation are forecasted on an hourly basis. The power scheduling is proposed by the participants for each hour of the coming day before 12 p.m. The spot price is settled and commitments are made for the participants.

Market Information and Assumption
The market structure studied is the day-ahead (DA) electricity market. As shown in Figure 2, the dynamic pricings of the grid, load, PV and WT generation are forecasted on an hourly basis. The power scheduling is proposed by the participants for each hour of the coming day before 12 p.m. The spot price is settled and commitments are made for the participants. The operation of the VPP in the DA market scenario is based on some assumptions. Based on the dynamic pricing of the grid, the VPP dispatches the power to the grid for profit maximization. The second assumption is that the DERs in the VPP are centrally controlled.
In this paper, energy management for the VPP is developed by optimally scheduling the generation and minimizing the generation cost. Moreover, the multi-step offering method can be used by separately calculating the profit for each generation based on resource availability and generation cost. The risk of the profit variation is considered in the problem formulation by the incorporation of uncertainty modeling of PV and WT generation using the beta distribution and Weibull distribution methods. The power imbalance due to the uncertainties of renewable generation can be taken care of by purchasing the power from the grid [53].

Problem Formulation
A case study is shown in Figure 3 to reveal the optimal dispatch strategy of the VPP with the grid. It consists of a PV system, wind turbine, fuel cell, micro-turbine and battery energy storage system, which represents the power trading with the grid and electricity market. The control strategies used in the VPP can be categorized into three types such as direct control, distributed control and hierarchical control. The direct control method is based on centralized control where decisions concerning VPP control are made in a centralized way. In the distributed control method, the decisions for VPP control are made in a fully decentralized way, and in the hierarchical control method, which is also the intermediary between direct and distributed control, decisions are made with some extent of the decision-making ability of the VPP. In this paper, the direct control strategy is used for the optimal co-ordination of DERs and to represent them as a single unit for the market, DSOs and TSOs. The VPP control center will take the request from individual VPP units based on the limitations and preferences of the owner [54]. The cost of generation indicates the sum of the fuel cost of DGs and start-up or shutdown cost [44]. If the power generated by the sources is not enough to meet the demand, the VPP will purchase the power from the grid. The bidding strategy of the VPP with the grid is developed in this paper with the aid of the beetle antenna search (BAS) algorithm using MATLAB. The VPP output depends on the intensity of the solar irradiation and wind speed that depend on environmental factors. These uncertainties create difficulties for energy dispatch. Therefore, the simulation or modeling of the uncertainty is important. The beta distribution and Weibull distribution methods are used in this work for modeling the uncertainties of renewable generation.

Objective Function
The main aims of this work are to maximize the profit of the VPP for the test system considered which consists of generation such as a PV, WT, FC, MT and battery storage system. The problem of determining the profit of the VPP in the DA market can be formulated as shown below: Power output from fuel cell C FC (t) Cost of fuel cell U MT (t) ON/OFF state of micro-turbine P MT (t) Power output from micro-turbine U j (t) ON The constraint of the wind turbine output power for time period t can be represented as: The power output constraint for the fuel cell for time period t can be represented as: The power output constraints for the micro-turbine for time period t can be represented as: The limitation of the solar cell output power in each time period t can be represented as: The limitation of the power output for the utility in each time period t can be represented as: The minimum and maximum limitation of the power exchanged with the grid is expressed in Equation (7) in the revised manuscript. The P Grid Max is calculated on the basis of the total load demand of the microgrid network.
The constraints for storage batteries can be expressed as:

Uncertainty Modeling of Solar Generation
The output power of the PV module can be calculated using the beta pdf method [50]. The output power of a PV module is dependent on the solar irradiance and ambient temperature of the site and module itself. The output power during different states can be easily calculated using beta pdf, once it is generated.
where T cx = temperature of the cell in • C for state x; T Am = ambient temperature in • C; N OT = nominal operating temperature of the cell in • C; S ax = average solar irradiance of state x; P SXP = P PV = power output of the PV module.

Uncertainty Modeling of the Wind Generation
The reserve or penalty cost for wind energy conversion system can be obtained by assuming or finding some known probability distribution function for the wind speed [48]. The characterization of the wind speed is needed for economic dispatch with the Wind Energy Conversion System (WECS). The existing literature on uncertainty modeling of wind generation shows that the wind speed profile follows a Weibull distribution over time. The probability distribution function for the Weibull distribution is denoted as where f u (v) = Weibull distribution for wind speed; v = wind speed; a = scale for wind speed at given location; k 1 = shape factor. After characterizing the uncertain nature of the wind as a random variable, the output power of the WECS can also be modeled as a random variable by transforming from the wind speed to the output power.
where v i , v r , v co = cut-in speed, rated speed, cut-off speed. P w = output power of the WECS during state w.

Risk Factor in Solar and Wind Generation
Solar generation and wind generation are not reliable power supplies. There is the risk of changes in electricity generation due to a lack of sunshine or snow covering solar panels for long periods of time. Similarly, the wind power generations purely depend on the velocity of the wind. In order to overcome these issues and to provide a reliable power supply to the consumer, the new concept of the virtual power plant is introduced. A virtual power plant works remotely to combine a number of independent renewable energy resources from disparate locations into a network that provides reliable power 24/7. Hence the uncertainty in the nature of solar and wind power generations can be solved using the VPP. The consumer will receive a reliable, good quality of power supply.

Beetle Antenna Search Algorithm (BAS Algorithm)
The BAS algorithm is a meta-heuristic search algorithm where the beetle can be compared with a triangle and the antennas of the beetle can be considered as two long sides of the triangle. The line between the triangle is denoted as the movement of the beetles and smell concentration is denoted with blue round shapes. The schematic diagram of the BAS algorithm is shown in Figure 4. The beetle will sense the odor by its two antennas. When the distance between the beetle and the food location changes, the concentration of the smell also changes [47]. By continuously moving and searching for the odor concentration, the beetle can finally arrive at the point of the source. The mathematical modeling for the beetle antenna search (BAS) algorithm can be followed as:

1.
The fitness function is considered here as f (y t ), the y t can be denoted as: where t denotes the no. of iterations.

2.
The beetle orientation is randomized as: where rand(m, 1) denotes the random direction of the beetle, which is the matrix of the (mx1) dimension. → a is the unit vector.

3.
The co-ordinates of the two antennas after each iteration are: where y c , y d = co-ordinates of the right and left antennas, respectively; L = sensing length of the antenna that is decided with step β.
where γ = constant which indicates the decay speed of the search step.

4.
The resultant formula can be achieved by solving the above co-ordinates as where y t is the updated step of the previous step y t−1 . Where ∂ represents the step size of searching. Where sign(.) represents a sign function. f (y c ), f (y d ) represent the fitness values of the left and right sides of y, respectively.
The algorithm consists of the main parts of the local fast search algorithm which can improve the path planning of the beetle. The pseudo code of the algorithm is implemented as follows:

5:
Generate the direction vector unit → a according to Equation (20)  6: Search the variable with two antennas according to Equations (21) and (22)  7: Update the variable according to Equation (24) 8: If f (y t ) < f bst , then f bst = f (y t ), y bst = y t 9: Return y * bst , f * bst

Data Analysis
In the VPP, several local energy sources are connected with others and the utility as well. DGs are extensively used in such network as non-conventional sources (MT, diesel generator, FC) and renewable sources (solar, wind). Storage devices are used to meet the imbalance between generation and demand, in order to reduce the purchase of energy from the grid.
The test system consists of various RESs such as a PV, WT, MT, FC and battery storage system. The single line diagram of the test system is shown in Figure 5. All DG units are assumed to produce only active power at unity p.f. and are to be operated only in electricity mode. The data of the load demand, forecasted generation, maintenance cost, start-up/shut-down cost and market prices are taken from Mohammed Javad Kasaei [44]. The system includes an industrial feeder for supplying the workshop, a commercial feeder for supplying the small office and a residential feeder. A total load of 1695 kW is considered in the literature review for 24 h [44,49], but in this paper, the scheduling is developed only for the commercial loads considered. The optimal scheduling is developed for the test system with the day-ahead market strategy. Three different scenarios are considered for a more detailed explanation of the test system. It is assumed in the first scenario that all the units are in the ON condition and act within their power limitation. In the second scenario, the PV is assumed to be in the OFF condition. The other generations are within their limits. In the third scenario, the MT and FC are assumed to be in the OFF condition. The other generators are working within their limits and the exchange of energy with the utility is also considered in a constrained manner.

Electricity Purchasing Cost
The dynamic pricing of the grid is considered on an hourly basis and is shown in Figure 6. The bidding strategy of the VPP with the grid is dependent on the price rating, that is, when the consumption of energy from the grid is high, the electricity price is less and vice versa.

Demand
The hourly load curves for commercial, residential and industrial loads are available and are integrated into the VPP dispatch model. The load curves for the three types of load are shown in Figure 7.

Cost of Generation and Power Output
The size of distributed generation placed in the microgrid is selected as tabulated in Table 2. We considered the size of the distributed generation and test system from [49] for the sake of comparison of the proposed method. The estimated power output for the PV and WT is taken into account for 24 h. Power generation data of the PV and WT for every scenario are extracted from Figure 8.

Simulation Results
We considered three different scenarios to check the feasibility of the proposed method under different conditions as follows.

Scenarios
Condition I All micro-generations are working II PV is not working, the rest of the generations are working III FC and battery are not working, the rest of the generations are working 6.1. Scenario 1 In Scenario 1, it is assumed that all the units generate electricity and the energy exchange with the utility is based on the demand and dynamic pricing of the utility. Every unit including the grid is assumed to operate within their power limits. The scheduling of power generation for all the generators is shown in Table 3. The optimal parameter setting of BAS algorithm is shown in Table 4. The total cost of generation is compared with various algorithms as tabulated in Table 5. The BAS algorithm shows the best result for all the scenarios. The mean simulation time for this is 5.25 s. The VPP experiences a low demand and the utility selling price is low for the first 6 h. Therefore, the battery is charged during these hours. From the seventh hour, the demand started to increase, which is also reflected in the selling price. Therefore, the storage battery is discharged during these hours to reduce the utility power generation and to satisfy the load. During the first hours of the day (hours 1-7) and the last 7 h, there is no PV generation as the demand is low, as is the the market price. Therefore, the VPP has taken the right decision by decreasing the PV generation during these hours. The scheduling of generation for Scenario 1 is shown in Figure 9. The control strategy for the BAS algorithm can be analyzed using generation of optimal parameters for the BAS algorithm, so it is necessary to carry out an empirical analysis to fine-tune the BAS algorithm. In case 1, the initialization parameter is varied while keeping the step size as constant. In case II, the step size is varied while the initialization parameter is kept constant. It is noted that the best solutions are obtained when initialization is 2 and the step size is 0.5. The control strategy for the BAS algorithm is solved using an empirical study.
The convergence characteristics of the BAS algorithm are compared with other existing algorithms for the considered test system in the case of Scenario 1, as shown in Figure 10. It is clear from the figure that BAS only takes 10 iterations to converge with the best solution. Moreover, the BAS algorithm indicates a stable first convergence with the global searching ability to find the optimal cost. The computational efficiency regarding the simulation time is not compared as the simulation time for other existing algorithms is not available. The optimal DA scheduling strategy is developed for the VPP in this scenario by considering all the available resources. The energy transaction with the grid is developed based on the power purchasing price from the grid. There are few literature studies available with this scheduling strategy that considers both the market strategy and uncertainties of renewable generation.

Scenario 2
In this scenario, the PV is assumed to be in the OFF mode. Table 6 shows the generator scheduling for Scenario 2. Similar to the first scenario, the best optimal power dispatch obtained by using the BAS algorithm along with other algorithms reported in the various studies is shown in Table 7. The maximum power generation is taken from the FC for 24 h due to the comparatively lower bid of the FC, and also because it holds the maximum power level. In the early morning (1-8 h), the demand load is met by the grid as the market price is comparatively low during these hours. During these 8 h, the battery is in a charging state while it is in a discharging state for the next 16 h.  The scheduling of power generation for Scenario 2 is shown in Figure 11. The convergence characteristics of BAS are compared with other existing algorithms for this test system in the case of Scenario 2, as shown in Figure 12. It is clear from the figure that the BAS algorithm only takes 10 iterations to converge with the best solution. Moreover, BAS shows a quick and stable convergence with the global searching ability to find the optimal cost. The computational efficiency regarding the simulation time is not compared as the simulation time is not available for the other algorithms. The optimal DA scheduling strategy is developed for the VPP by considering the unavailability of solar generation. The bidding strategy with the grid is developed based on the power purchasing price from the grid. There are less literature studies with this strategy as it considers both the market strategy and the uncertainty of renewable generation.

Scenario 3
In this scenario, the FC and battery are assumed to be in the OFF mode. The Scenario 3 simulation results are shown in Table 8. The best result of the optimum power dispatch with the beetle antenna search algorithm is presented in Table 9. The generations of all the units are within their limitations and the grid supplies the load for 24 h. For 9-21 h, both the MT and WT are working at their maximum power generation level. Since the bid of these generators is cheaper than the PV, the VPP encountered the load with the MT and WT. In this scenario, the power is purchased from the grid during the first 8 h and the last 9 h when the market price is comparatively low.   5  15  0  30  17  30  0  10  15  0  30  18  30  0  13  15  0  30  19  30  0  15  15  0  30  20  30  0  13  15  0  30  21  30  0  5  15  0  30  22  30  0  0  8  0  30  23  30  0  0  2  0  30  24 21.1 0 0 0.9 0 30 The scheduling of power generation for Scenario 3 is shown in Figure 13. The convergence characteristic of the BAS algorithm is compared with that of the BFOA algorithm for Scenario 3, which is shown in Figure 14. The BAS converges with the best solution in 10 iterations. Moreover, it shows a quick convergence to find the optimal cost. The optimal scheduling strategy for the DA market is shown in this scenario by considering the FC and the battery storage system in the OFF condition. The detailing of the power transaction with the grid is shown by considering the power purchase price from the grid. There is less available literature with this approach.

Effect of Uncertainties on Solar and Wind Generation
The uncertainties due to the renewable energy sources affect the system security as it makes the gap between generation and demand. Therefore, in this paper, the beta distribution method is used for modeling the uncertainties of solar and wind generation [48,49]. The solar generation data with respect to time and different scenarios are shown in Figure 15. The solar generation data considering uncertainties for three different scenarios are shown in Figure 16.  It can be summarized from the graph that due to the uncertainties, the scheduled generation from the PV and WT is less and this can be met by purchasing the power from the grid based on the dynamic pricing of the grid or by paying the penalty to the consumers in the real-time market.
The comparison of different optimization approaches with the meta-heuristic BAS algorithm is shown in Table 10. The comparison of the proposed method is tested with other existing techniques of the deterministic method, stochastic method, robust method, SARO method and HO method is tabulated in the Table 11. The proposed BAS algorithm yields almost the same profit as the hybrid optimization method. This shows that the proposed method can be applied to a large-scale microgrid.

Conclusions
This paper presented an optimal dispatching schedule of a VPP for the day-ahead electricity market. The VPP integrates different renewable and nonrenewable energy sources as well as battery energy storage devices. In this study, the optimization process was carried out by using the BAS algorithm. The simulation results of the VPP using the proposed algorithm were compared with those obtained by using other optimization algorithms. The simulation results proved the high-performance ability of the proposed algorithm to efficiently solve the dispatching problem. The analysis for the optimal dispatch strategy was carried out for the three scenarios. It was found from the scenarios that the grid supplies the lowest amount of power in Scenario 1 when all the power generation sources are in service. For Scenario 1, the grid supplies the power to satisfy the load demand for the first hours when the market price is low. Therefore, the VPP gets the maximum benefit from this scenario. In Scenario 2, the utility supplies the load during the first (1-8) hours, when the market price is low. Meanwhile, in Scenario 3, the utility supplies the load for 24 h regardless of the high market price, and the benefits of the VPP are the lowest in this scenario.
The paper's contribution and key findings can be listed as follows: • The BAS algorithm is used for the optimal energy management of the VPP by reducing the total operating cost of generation. The optimal dispatch results are obtained within the minimum computation time due to its easy and simple computational process.

•
The day-ahead market strategy is considered with three distinct scenarios.

•
The attained results indicate that the VPP has to purchase the lowest amount of energy from the grid when all the generators are in the operating condition. The storage devices are allowed to charge during off-peak hours when there are less demand and discharge during peaks hours. Hence, the VPP can achieve the maximum profit by selling the energy to the grid.
The development of the competitive electricity market requires an optimum model for integrating the renewable-based power generation. The adopted model assists to optimally dispatch the power among the VPP customers and with the grid. With proper scheduling of power generation from renewable energy sources, the VPP can meet the maximum demand for the day-ahead market by minimizing the power purchased from the grid and by promoting more profit to the aggregator using price-based dispatch of the power to the grid. The power trading with the grid is dependent on the profitability of the aggregator and the demand. In all the above scenarios, the renewable sources dispatched the power optimally.

Abbreviations t
Time Interval C Grid (t) Cost of grid C WT (t) Cost of wind turbine C PV (t) Cost of photovoltaic solar generation C FC (t) Cost of fuel cell C MT (t) Cost of micro-turbine C sj (t) Cost of storage unit P Grid (t) Power output from the grid P WT (t) Power output from wind turbine P PV (t) Power output from photovoltaic solar panel P FC (t) Power output from fuel cell P MT (t) Power output from micro-turbine W ESSj (t) Power output from storage unit U WT (t) ON