Multidispatch for Microgrid including Renewable Energy and Electric Vehicles with Robust Optimization Algorithm

With the deterioration of the environment and the depletion of fossil fuel energy, renewable energy has attracted worldwide attention because of its continuous availability from nature. Despite this continuous availability, the uncertainty of intermittent power is a problem for grid dispatching. This paper reports on a study of the scheduling and optimization of microgrid systems for photovoltaic (PV) power and electric vehicles (EVs). We propose a mathematical model to address the uncertainty of PV output and EV charging behavior, and model scheduling optimization that minimizes the economic and environmental cost of a microgrid system. A semi-infinite dual optimization model is then used to deal with the uncertain variables, which can be solved with a robust optimization algorithm. A numerical case study shows that the security and stability of the solution obtained by robust optimization outperformed that of stochastic optimization.


Introduction
Energy shortages and environmental pollution are now problems that cannot be ignored. To build an environment-friendly and resource-saving society, renewable energy generation such as wind and photovoltaic (PV) power have received increasing attention [1][2][3]. Renewable energy accounted for approximately 18.1% of total final energy consumption in 2017 and was mainly concentrated in the field of electricity generation. According to the "Renewables (2019) Global Status Report" estimate, by the end of 2019 more than 26% of global electricity generation had come from renewable sources [4]. Renewable energy has the advantage of being inexhaustible, but its intermittent and volatile nature poses new challenges to the safe and stable operation of the power grid.
Renewable energy generation is influenced by climate and weather, and is not controlled by human factors. The electricity generation and the electricity consumption cannot match well; there will often be no electricity available at the peak of electricity consumption, or no electricity production surplus at the trough of the situation. With the increasing number of electric vehicles, the two-way energy dispatching between electric vehicles and the power grid provides the solution for renewable energy power generation and large-scale application of electric vehicles. Electric vehicles consume renewable energy when electricity consumption demand is low, and even discharge electricity into the grid when demand is high. Reasonable and flexible scheduling strategies can ensure the coordinated operation of electric vehicles and renewable energy generation.

1.
The uncertainty of PV power output and EV charging behavior is expressed as a set, which contains all possible values of uncertain parameters. The results of robust optimization ensure that the system can run safely and stably even under the worst condition.

2.
In order to take the various practical constraints into consideration, a multi-objective robust scheduling optimization model is proposed to address these constraints. The model is a semi-infinite optimization problem, which is difficult to solve directly. According to the duality theory, the model is transformed into a definite linear programming model, which can be easily solved with Lagrange relaxation algorithm. 3.
By numerical analysis, SO and RO are compared. The results show that RO is higher in cost, while it is more robust than SO. System operators can select appropriate optimization methods in balancing between economy and safety.
Energies 2020, 13, 2813 3 of 15 The paper is organized as follows: the models of PV power output and EV charging behaviors are described in Section 2. Section 3 introduces the multi-objective scheduling system and actual constraints. The theory and application of RO are presented in Section 4. A case study is used in Section 5 to show the performance of the proposed models. Conclusions are drawn in Section 6.

Uncertainty Modeling
In this paper, the microgrid system connected to the main power grid includes PV power stations, microturbines (MTs), diesel engines (DEs), and EVs. The uncertainties of PV output power and EV charging behavior are expressed as a set.

Photovoltaic Output Model
Solar power is the use of battery modules to directly convert solar energy into electricity. Solar energy is an inexhaustible source of clean energy, and a solar PV power station is safe, reliable, and unaffected by the energy crisis. However, it is difficult to accurately predict the power generation of a PV system [18]. Due to the periodicity and randomness of the output of a PV power station, the output is considered as [19] In other words, the uncertainty of the PV can be expressed as [PV l,t +PV l,t , PV l,t +PV l,t ], where PV G l,t is the output of the lth PV power station at period t, PV l,t is the forecasted output of the lth PV power station at period t,PV l,t is the deviation, andPV l,t ,PV l,t are the lower and upper limits ofPV l,t , respectively.

Electric Vehicle Charging Model
The probability of an individual EV traveling a distance d can be represented by the logarithmic normal distribution function [20] where µ and σ are the mean and standard deviation, respectively. According to the traveling distance d of the EV, the remaining capacity can be calculated: where d m is the maximum travel distance. According to [21], the charging start time can be modeled as a normal distribution function with specified parameters, and we represent the time when the EV starts charging as a set.
where T k start is the charging start time of the nth EV, and T k start and T k start are the lower and upper limits, respectively.
Energies 2020, 13, 2813 4 of 15 In this study, we considered that all EV batteries have the same capacity E and the same charging power P c . Thus, the charging end time T k end can be obtained: The total charging power of EVs at each moment is the sum of the charging power of an individual EV: where PEV G k,t is the charging power of the kth EV at period t. In addition, K is the number of EVs dispatched.
The uncertainty of the charging power of the EV is still expressed in the form of a set: where PEV G t is the total charging power of EVs at period t, PEV t is the forecasted value of the charging power of EVs at period t,PEV t is the deviation, andPEV t ,PEV t are its lower and upper limits, respectively.

Multi-Objective Dispatch System
The microgrid system includes PV power stations, MTs, DEs, and EVs. The optimization objective is to minimize total costs, including the cost of operating the microgrid and the cost of environmental protection. In this section, various practical constraints are also considered. The mathematical model is described in Sections 3.1 and 3.2 [22,23].

Objective Function 1: Minimum Operating Cost
The total operating costs include fuel costs for the DEs and MTs; operation and maintenance costs for DEs, MTs, and the PV power station; and transmission costs between the microgrid and the main grid. The battery degradation cost is disregarded [24,25].
where P i,t is the output power of the ith DE at period t, PMT j,t is the output power of the jth MT at period t, PV l,t is the output power of the lth PV power station at period t. C f (·) is the fuel costs of the DEs and MTs [26]; C OM (·) is the operation and maintenance costs of the DE, MTs, and the PV power station [27]; and C grid,t is the cost of transmission between the microgrid and the main power grid.
where c 1 , c 2 , c 3 represent fuel cost parameters of DEs, y is the cost parameter of MTs, η(PMT j,t ) is the work efficiency of the jth MT at period t, K OM is the OM cost parameter, ∆t is scheduling interval, and M t is the price of electricity. The traditional output units and the power transmission process of the grid will cause environmental pollution problems, which incurs the cost of environmental protection. Three important pollutants, sulfur dioxide (SO 2 ), carbon dioxide (CO 2 ), and nitrogen oxide (NO X ), are considered in this paper [26].
where C h is the treatment cost of the hth pollutant; µ p,h is the hth pollutant emission coefficients of the pth type power source including DE, MT, and PV; P p,t is the output power of the pth power source; P grid,t is the transmission power between the microgrid and the main power grid at period t, and µ grid is the pollutant emission coefficients of the main power grid.

Total Cost Function
The objective of the scheduling system proposed in this paper is to minimize the system operating cost and the environmental protection cost. Therefore, the total cost function (C total ) can be expressed by

Power Balance Constraint
Electricity supply and demand should be balanced in the microgrid system: where P load,t is the total load demand at period t.

Generation Capacity Constraints
The output power of DEs and MTs should be within a certain range: where P i,min and P i,max are the lower and upper limits of the power output of the ith DE, respectively. Similarly, PMT j,min and PMT j,max are the lower and upper limits of the power output of the jth MT, respectively.

Ramp Rate Limits
Ramp rate refers to the increase or decrease of output power per unit of time from traditional power sources.
where P i,down and P i,up are the lower and upper limits of the ramp rate of the ith DE, respectively, and P j,down , P j,up are the lower, upper limits of the ramp rate of the jth MT, respectively.

Capacity Constraints of PV
The output of PV is affected by the predicted value at period t.

Constraints of Transmission Capacity
The transmission power between the microgrid and the main grid should not exceed the limit.
where P down and P up are the lower and upper limits, respectively, of the main grid transmitting power.

Charge Constraints of the EV Battery
To slow the aging of the battery, the charging power should not exceed the maximum:

Spinning Reserve Constraint
The spinning reserve constraint is to ensure a reliable power supply: where L t is the spinning reserve rate.

Robust Optimization Algorithm
RO is designed to deal with uncertainty problems. Unlike stochastic optimization, it represents uncertain variables in interval form. It can be said that the uncertainty of variables is fully considered in modeling. The result of RO is the most conservative result. Any value in the set of uncertain variables can be satisfied. Therefore, it is especially suitable for microgrid systems that are very important for security.
RO first models the uncertain variables, then transforms the uncertain variables into deterministic variables according to the robust equal conversion, and finally solves the robust equal conversion model to obtain the robust optimal solution [28,29].

Robust Equal Conversion
On the basis of the sets of uncertainties introduced in Sections 2.1 and 2.2, the spinning reserve constraint (Equation (18)) can be transformed to Energies 2020, 13, 2813 7 of 15 RO deals with uncertain data in the worst-case scenario. The worst-case scenario can be defined as The schedule objective function is monotonically increasing, strictly convex, and differentiable. Its dual problem is also feasible and bounded, and the objective values coincide according to strong duality [19]. Therefore, the dual problem becomes where α t , β t , γ t , δ are the dual coefficients. Then the original spinning reserve constraint is converted to

Robust Economic Dispatch Model
The purpose of this study was to minimize system operating costs and environmental protection costs while meeting the load on the microgrid system: The probability of spinning reserve constraint violated (POV) is expressed as, where Γ t is the number of the uncertain variables. Furthermore, according to literature [29], the robustness of the system can be expressed by Formula (25): where η m,t , ω m,t , J t are the coefficients of POV.

Problem Description
In this study, we verified the validity of the model by selecting a typical grid-connected microgrid in an area where people work. Figure 1 is a diagram of the initial state of the scheduling system. After the simulation of the model built in Section 2, Figure 1  and EV charging-down represent the upper and lower bounds of the charging power of electric vehicles, respectively. As shown in Figure 1, when people come to the work area in the morning, they start charging; the charging behavior is concentrated between 8:00 a.m. and 10:30 a.m. At this time, the demand for electricity in the office area increases, but the output of the PV power station is still relatively low. To compensate for the disordered charging behavior of EVs, DEs have to increase their output, which results in an increase in the total cost of the system. At noon, people have a rest time and the system electricity demand is reduced, but PV power stations have the most output at that time. If there is no electrical equipment to consume the electrical energy, this will cause a discard phenomenon. Therefore, an unoptimized system is neither stable nor economical. charging-up and EV charging-down represent the upper and lower bounds of the charging power of electric vehicles, respectively. As shown in Figure 1, when people come to the work area in the morning, they start charging; the charging behavior is concentrated between 8:00 a.m. and 10:30 a.m. At this time, the demand for electricity in the office area increases, but the output of the PV power station is still relatively low. To compensate for the disordered charging behavior of EVs, DEs have to increase their output, which results in an increase in the total cost of the system. At noon, people have a rest time and the system electricity demand is reduced, but PV power stations have the most output at that time. If there is no electrical equipment to consume the electrical energy, this will cause a discard phenomenon. Therefore, an unoptimized system is neither stable nor economical.

Parameter Setting
In this study, the microgrid consisted of a DE with a maximum output of 1500 kW, two MTs with a maximum power of 250 kW, and two PV power stations with a maximum power of 800 kW. The maximum deviation of actual output and predicted output in the dispatch period was set at ±30% [19]. Additionally, the system considered that 100 EVs participated in the dispatch. We assumed that the battery capacity of the EVs was 60 kWh, the microgrid was connected to the main grid in real time, the microgrid spinning reserve ratio was set at 0.2, and the simulation time was set at 7:00 a.m. to 4 p.m. The simulation time interval was set at 30 min. The detailed parameters of each unit are shown in Table 1 [26]. The electricity price is shown in Figure 2 [26]. The operation and maintenance costs are shown in Table 2, and the environmental treatment cost is shown in Table 3 [26]. The Lagrange relaxation algorithm with faster convergence speed is used to solve the model on MATLAB/CPLEX software.

Parameter Setting
In this study, the microgrid consisted of a DE with a maximum output of 1500 kW, two MTs with a maximum power of 250 kW, and two PV power stations with a maximum power of 800 kW. The maximum deviation of actual output and predicted output in the dispatch period was set at ±30% [19]. Additionally, the system considered that 100 EVs participated in the dispatch. We assumed that the battery capacity of the EVs was 60 kWh, the microgrid was connected to the main grid in real time, the microgrid spinning reserve ratio was set at 0.2, and the simulation time was set at 7:00 a.m. to 4 p.m. The simulation time interval was set at 30 min. The detailed parameters of each unit are shown in Table 1 [26]. The electricity price is shown in Figure 2 [26]. The operation and maintenance costs are shown in Table 2, and the environmental treatment cost is shown in Table 3 [26]. The Lagrange relaxation algorithm with faster convergence speed is used to solve the model on MATLAB/CPLEX software.

Stochastic Optimization
The purpose of this study was to reduce system operating costs and environmental pollution as much as possible while ensuring electricity demand is met. As shown in Figure 3, the EVs are charged at 12:00. That is not the peak period of microgrid power consumption, and although the electricity price of the main grid is higher at this time, the system has enough light energy to be used. Therefore, the renewable energy efficiency can be maximized by the microgrid system. The remaining electricity demand is supplemented by DEs, MTs, and the main grid. However, the system does not consider the uncertainty of PV power output and EV charging behavior, it is less robust, and it operates in a nonoptimal, nonstable state.

Stochastic Optimization
The purpose of this study was to reduce system operating costs and environmental pollution as much as possible while ensuring electricity demand is met. As shown in Figure 3, the EVs are charged at 12:00. That is not the peak period of microgrid power consumption, and although the electricity price of the main grid is higher at this time, the system has enough light energy to be used. Therefore, the renewable energy efficiency can be maximized by the microgrid system. The remaining electricity demand is supplemented by DEs, MTs, and the main grid. However, the system does not consider the uncertainty of PV power output and EV charging behavior, it is less robust, and it operates in a nonoptimal, nonstable state.

Robust Optimization
RO fully considers the uncertainty of the system, and can guarantee stable operation of the system even in a worst-case scenario. The worst-case scenario means the least PV output and the most EV charging. When this happens, the microgrid system must increase the output of the DE to supplement the demand for electricity. Due to the relatively high price of electricity at noon, the microgrid does not purchase electricity from the main grid. Figure 4 shows that the PV output power is fully used, and the EVs are effectively charged at noon to achieve peak load shifting. RO guarantees the stability of the system, but the total cost of the system must increase.  Figure 5 shows the simulation result of RO in a best-case scenario, where PV power generation accounts for a large proportion in the system, and the EV charging capacity is significantly reduced. Because the system is basically self-sufficient, the amount of electricity purchased from the main grid has also dropped markedly.

Robust Optimization
RO fully considers the uncertainty of the system, and can guarantee stable operation of the system even in a worst-case scenario. The worst-case scenario means the least PV output and the most EV charging. When this happens, the microgrid system must increase the output of the DE to supplement the demand for electricity. Due to the relatively high price of electricity at noon, the microgrid does not purchase electricity from the main grid. Figure 4 shows that the PV output power is fully used, and the EVs are effectively charged at noon to achieve peak load shifting. RO guarantees the stability of the system, but the total cost of the system must increase.

Robust Optimization
RO fully considers the uncertainty of the system, and can guarantee stable operation of the system even in a worst-case scenario. The worst-case scenario means the least PV output and the most EV charging. When this happens, the microgrid system must increase the output of the DE to supplement the demand for electricity. Due to the relatively high price of electricity at noon, the microgrid does not purchase electricity from the main grid. Figure 4 shows that the PV output power is fully used, and the EVs are effectively charged at noon to achieve peak load shifting. RO guarantees the stability of the system, but the total cost of the system must increase.  Figure 5 shows the simulation result of RO in a best-case scenario, where PV power generation accounts for a large proportion in the system, and the EV charging capacity is significantly reduced. Because the system is basically self-sufficient, the amount of electricity purchased from the main grid has also dropped markedly.   Figure 5 shows the simulation result of RO in a best-case scenario, where PV power generation accounts for a large proportion in the system, and the EV charging capacity is significantly reduced. Because the system is basically self-sufficient, the amount of electricity purchased from the main grid has also dropped markedly.

Comparison of Stochastic Optimization and Robust Optimization
In the three results, EVs are charged near 12:00 and renewable energy is used preferentially. Compared with SO, RO fully considers the uncertainty of the system and can operate safely even in the worst case. Table 4 shows that in a worst-case scenario the robust-optimized PV output is smaller, but RO meets more EV charging requirements, and the output of the DE as a rotating standby unit also increases. The total system cost is higher than that of the SO. On the contrary, when RO is in a best-case scenario, the PV output greatly increases while the EV charging capacity decreases, so the system reduces the output of the diesel generator and the power purchase from the main grid, which leads to a reduced total system cost.

Conclusions and Discussion
The participation of electric vehicles in microgrid dispatching provides a new solution for grid connection of renewable energy power generation. Finding a method to dispatch the electric vehicle to play its energy storage unit role is a problem that must be solved. An optimal scheduling strategy is very important to the economy, environmental protection, and safety of a microgrid. This paper first analyzes the uncertainty of PV power output and EV charging behavior and expresses this uncertainty in the form of a set. Then, to enhance the economic and environmental benefits of the microgrid, a multi-objective optimization scheduling model is established, and an RO theory is applied to the scheduling model. Finally, the simulation results verify the validity of the proposed model. Compared with SO, RO considers the most conservative situation of the system. The system's economic cost is lowered, and the stable operation of the microgrid system is better guaranteed. The scheduling strategy proposed in this paper is a conservative method, which is suitable for the microgrid system with high security requirements. The case study of this paper can help decisionmakers to find corresponding solutions for different microgrid systems.
Next, the following three aspects of research can be summarized.

Comparison of Stochastic Optimization and Robust Optimization
In the three results, EVs are charged near 12:00 and renewable energy is used preferentially. Compared with SO, RO fully considers the uncertainty of the system and can operate safely even in the worst case. Table 4 shows that in a worst-case scenario the robust-optimized PV output is smaller, but RO meets more EV charging requirements, and the output of the DE as a rotating standby unit also increases. The total system cost is higher than that of the SO. On the contrary, when RO is in a best-case scenario, the PV output greatly increases while the EV charging capacity decreases, so the system reduces the output of the diesel generator and the power purchase from the main grid, which leads to a reduced total system cost.

Conclusions and Discussion
The participation of electric vehicles in microgrid dispatching provides a new solution for grid connection of renewable energy power generation. Finding a method to dispatch the electric vehicle to play its energy storage unit role is a problem that must be solved. An optimal scheduling strategy is very important to the economy, environmental protection, and safety of a microgrid. This paper first analyzes the uncertainty of PV power output and EV charging behavior and expresses this uncertainty in the form of a set. Then, to enhance the economic and environmental benefits of the microgrid, a multi-objective optimization scheduling model is established, and an RO theory is applied to the scheduling model. Finally, the simulation results verify the validity of the proposed model. Compared with SO, RO considers the most conservative situation of the system. The system's economic cost is lowered, and the stable operation of the microgrid system is better guaranteed. The scheduling strategy proposed in this paper is a conservative method, which is suitable for the microgrid system with high security requirements. The case study of this paper can help decision-makers to find corresponding solutions for different microgrid systems.
Next, the following three aspects of research can be summarized.

1.
Robust optimization guarantees the safe and stable operation of the system under the worst conditions, leaving the system in an overly conservative state. Adjustable coefficients can be introduced to adjust the robustness of the system by changing the number of uncertain variables in the system, and to coordinate the relationship between the robustness and economics of the system according to the needs of the actual situation.

2.
On the dispatching problem with electric vehicles, we assume that all electric vehicles are involved in dispatching. Future research can consider the psychological willingness of electric vehicle users to participate in dispatching, and explore the impact of user psychological factors on the total dispatchable power of electric vehicles to make them more in line with actual conditions. 3.
The electric vehicles in this article only charge. As the V2G technology of electric vehicles matures, the way in which electric vehicles participate in dispatching will become more flexible. It can be considered that electric vehicles not only consume photovoltaic power when the photovoltaic output is strong, but also discharge at the peak of electricity consumption, alleviating the pressure on the grid, making the electric vehicle a mobile energy storage unit.  The output of the lth PV power station at period t (kW) PV l,t The forecasted output of the lth PV power station at period t (kW) PV l,t The deviation of the charging power of the EV at period t (kW) PV l,t ,PV l,t The lower and upper limits ofPV l,t (kW) The charging power of the kth EV at period t (kW) PEV G t The total charging power of EVs at period t (kW) PEV t The forecasted value of the charging power of EVs at period t (kW) PEV t The deviation of PEV t (kW) PEV t The lower limits ofPEV t (kW)

PEV t
The upper limits ofPEV t (kW) C. Function parts h(·) The daily traveling distance of an individual EV (%) C f (·) The fuel costs of DEs and MTs (RMB) C OM (·) The operation and maintenance costs of DEs, MTs and PV power station (RMB) C 1 The operating cost (RMB) C 2 The environmental cost (RMB) C total The total cost of system (RMB) C grid,t The cost of transmission between the microgrid and the main power grid (RMB) c 1 ,c 2 ,c 3 The fuel cost parameters of DEs (RMB/kW) y The cost parameter of MTs (RMB/kW) η(·) The work efficiency of MTs (%) C h The treatment cost of the hth pollutant (RMB/kg) µ p,h The hth pollutant emission coefficients of the pth type power source (g/kW) P p,t The output power of the pth power source (kW) P grid,t The transmission power between the microgrid and the main power grid (kW) µ grid The pollutant emission coefficients of the main power grid (g/kW) ∆t Scheduling interval (h) K OM The OM cost parameter (RMB/kW) D. Variables and constants P i,t The output power of the ith DE at period t (kW) PMT j,t The output power of the jth MT at period t (kW) PV l,t The output power of the lth PV power station at period t (kW) P load,t The total load demand at period t (kW) P i,min The lower limits of the power output of the ith DE (kW) P i,max The upper limits of the power output of the ith DE (kW) PMT j,min The lower limits of the power output of the jth MT (kW) PMT j,max The upper limits of the power output of the jth MT (kW) P i,down The lower limits of the ramp rate of the ith DE (kW) P i,up The upper limits of the ramp rate of the ith DE (kW) P j,down The lower limits of the ramp rate of the jth MT (kW) P j, up The upper limits of the ramp rate of the jth MT (kW) P down The lower limits of the main grid transmitting power (kW) P up The upper limits of the main grid transmitting power (kW) M t The price of electricity (RMB/kWh) α t , β t , γ t , δ t Lagrange coefficients η m,t , ω m,t , J t The coefficients of POV L t The spinning reserve rate (%)