Modeling Operation Problem of Micro-grids Considering Economical, Technical and Environmental issues as Mixed-Integer Non-Linear Programming

Reduction of fossil resources, increasing the production of greenhouse gas emissions and demand growth lead to greater use of distributed energy resources in power system especially in distribution networks. Integrating these resources in order to supply local loads creates a new concept called micro-grid. Optimal operation of micro-grid in the specific time period is one of the most important problems of them. In this paper, the operation problem of micro-grids is modeled considering the economical, technical and environmental issues, as well as uncertainties related to loads, wind speed and solar radiation. The resulting model is a Mixed-Integer Non-Linear Programming (MINLP). To demonstrate the effectiveness of the proposed model, Bisheh village in Iran is considered as a case study. The results showed that considering load curtailment costs, the power losses of the main grid, the penalties of pollutant gasses emissions and the elimination of energy subsides will tremendous impacts on the operation of microgrids. Article History: Received March 12, 2016; Received in revised form June 20, 2016; Accepted July 2nd 2016; Available online How to Cite This Article: Salahi, S., and Bahramara, S. (2016) Modeling Operation Problem of Micro-grids Considering Economical, Technical and Environmental issues as Mixed-Integer Non-Linear Programming. Int. Journal of Renewable Energy Development, 5(2), 139-149. http://dx.doi.org/10.14710/ijred.5.2.139-149


Introduction
Nowadays, the power system operators are met with important challenges such as load changes, the rapid growth of energy consumption and geographical expanding of customers. Regarding environmental policy, investors are not willing to establish fossil fuel plants. This causes new challenges in the use of power generation resources for power system planners. In present time, by developing the use of the distributed energy sources, the ability and incentive to shift distribution networks from passive to active is provided. Integrating distributed energy sources to provide a local load has created a new concept called micro-grid. Microgrids can acts in both grid connected and standalone modes. One of the important problems about micro-grids is modeling the optimal operation of them. This problem has been focused by researchers in many papers (Allali et al. 2015;Bahramara et al. 2015;Hatziargyriou et al. 2007;Kanchev et al. 2011;Chen et al. 2011). Baziar et al. (2013) proposed a new probabilistic method based on 2m Point Estimate Method (2m PEM) to consider uncertainties related to load demand forecasting errors, grid bid change and photovoltaic and wind turbines output power variations in the optimal energy management of the micro-girds including different renewable power sources like photovoltaics, wind turbines, micro turbines, fuel cells and storage devices. To minimize the micro-grid operation costs, they are used θ -Particle Swarm Optimization ( θ -PSO) algorithm. Objective function of this article consists of the total cost of thermal unit's production, the cost of power injection from battery to the micro-grid and the cost of power purchased from the main grid. Peik-Herfeh et al. (2013) employed Point Estimate Method (PEM) to model the uncertainty in market price and renewable sources generation. Also, the uncertainty of DGs generation is handled by increasing the amount of required reserve. The goal of the purposed model is to maximize the micro-grid profits. The proposed objective function equals total revenues minus costs. These revenues include the income from sold energy to the main grid and the income from the power losses of the main grid; and the costs include the cost of dispatchable (DG) unit's generation plus the cost of stochastic DG (SG) unit's generation, plus the cost of curtailing loads. The presented model is implemented in GAMS software. Motevasel et al. (2013) proposed an intelligent energy management system (IEMS) for optimal operation of a combined heat and power (CHP) -based micro-grid over a 24-hours. To do so, they are formulated a comprehensive mathematical model for the energy storage system and the economic and environmental objective functions. They are used the modified Bacterial Foraging Optimization (MBFO) algorithm to solve the problem. Also, they are used fuzzy satisfying method to make balance between conflicting objectives (cost and emission). In this paper, the aim is to minimize the cost of operation and the amount of pollution. The operating costs include the cost of generation and maintenance of thermal units, the cost of power purchasing from the main grid, the cost of power charging and discharging of battery, and the cost of purchasing natural gas for auxiliary boiler; and the pollutant function consists of total pollutions released from thermal units, main grid, and auxiliary boiler. Aghaei et al. (2013) presented a new model for optimal operation of a CHP-based micro-grid. The microgrid comprises thermal units, CHP unit, heat unit, and energy storage system. This paper by using the multiobjective optimization method minimized the total operational cost of the micro-grid and total pollutant gasses emissions. The objective function minimizing the operational cost is comprised of the thermal units cost, CHP units, heat units, storage devices, purchased power from the main grid, and load curtailment cost. Also, the objective function of reducing the pollutant emission is comprised pollutant released from thermal units, CHP units, heat units, storage devices, and the main grid. Mohamed et al. (2012) presented a generalized formulation for determining the strategy of optimal operating and the reduction of cost and pollutant emissions of the micro-grids. To solve the environmental-economic problem, the multi-objective optimization is applied. The studied micro-grid in this paper, includes wind turbines, micro turbines, generators, photovoltaic panels, fuel cells and battery. The operating costs of the micro-grid in this paper equals the total operation and maintenance costs of thermal units, start-up cost, the cost of power purchased from the main grid minus revenue power sold to the main grid. They are employed the Multi-objective Mesh Adaptive Direct Search (MOMADS) algorithm to minimize the cost, then compared the results with the results of Multiobjective Sequential Quadratic Programming (MOSQP). The results show the effectiveness of the proposed method to reduce costs, pollution emissions and supplying load. Anvari et al. (2011) used the Adaptive Modified Particle Swarm Optimization algorithm (AMPSO) to optimally operate a hybrid micro-grid consisting of renewable sources/micro-turbine/fuel cell/battery. In this paper, the aim is to minimize the total operation cost and pollutant emissions simultaneously; so the multiobjective optimization is used. The objective function of minimizing operating cost consists of the total operation cost, the start-up/shut-down costs of thermal units, battery cost, power purchased from the main grid; the objective function of minimizing pollutant emissions consists of the total pollution released from thermal units, battery and the main grid. The proposed model is tested over a typical micro-grid. Comparing the results of the proposed model with other evolutionary algorithms like genetic algorithms and particle swarm optimization, indicates the effectiveness of this method. Niknam et al. (2012) used the self-adaptive optimization algorithm based on the gravitational search algorithm (GSA) for energy and operation management (EOM) of micro-grid. Also, the applied 2 m point estimation method for covering uncertainties caused by the load, market prices and the productivity power of wind farms and photovoltaic systems. The goal of the proposed model is minimizing the operation cost of the micro-grid. In this paper, the objective function is equal to the total power generation cost, the start-up and shut-down costs of micro-turbine plus power generation cost, the start-up and shut-down costs of battery plus the cost of power purchased from the main grid. The proposed model is tested over a typical micro-grid comprising a wind turbine, a micro-turbine, photovoltaic panels, fuel cells and batteries. The results approve the effectiveness of the proposed model.
By surveying numerous articles, we found that most of them are overlooked of considering the curtailable loads as a virtual source of power generation in emergencies and the losses of the power purchased from the main grid. Also, none of the articles are not considered penalty for greenhouse gas emissions; so, in this paper, with respect to the defects of introduced models in the past, a new model is presented to minimizing the total operation costs of the micro-grid and its optimal operation. The effectiveness of the presented models is tested over a micro-grid connected to the main grid, already designed in (Salahi et al. 2016) for Bisheh village in Khorramabad city by HOMER ENERGY software.

Problem formulation
To compensate the uncertainties of load consumption and the power generation of renewable resources some extra reserve is modeled in the operation problem of micro-grid. The resulting model is mixed-integer nonlinear programming (MINLP) which is solved by GAMS software.

Objective function
The aim of optimization problem is minimizing the total micro-grid's operation cost in the time horizon of operation (such as 24 hour) Moreover, the optimal values of decision variables including output power of generation units, power exchange with main grid, and charging/discharging power of battery and so on are determined. In fact, the optimal scheduling of MG's resources and optimal decisions to exchange power with main grid are determined to obtain minimum operation cost of MG in its time period. Hence, the objective function written as follows: In equation (1) the first term represents the fuel cost, the start-up and shut-down cost of thermal units, respectively. The second, third and fourth terms are reserve cost, the cost of power purchased from the main grid and load curtailment cost, respectively. The fifth and sixth terms are considered as the penalty of pollutant gasses emissions of thermal units and the main grid. The seventh term represents the total revenue of the microgrid that is obtained from selling power to the main grid and the penalty considered for the losses of the power purchased from the main grid.
The equation (2) is used to calculate the losses of the power purchased from the main grid: Where cu P represents the losses of transformer loading. Since the maximum power purchased from the main grid is considered 100 kW, in this study, the 100 kW transformer is used which has the losses of 1750 W in loading state.
Where A is the amount of curtailable load of the micro-grid that is determined based on the circumstances peculiar to each micro-grid. Since 5% of the load consumption of Bisheh village is associated with industrial loads curtailable in emergencies, in equation (3), A is 5%.

Thermal units' constraints
 Output power limits constraints:  Minimum-up and down time constraints: Coordination constraints: This set of constraints express the relationship between the three binary which are compatible together in the different scenarios:

System constraints
System power balance constraints: Power balance constraint expresses the balance of the total generated power including the generating power of thermal units, wind turbines, photovoltaic panels, the power purchased from the main grid, the curtailed load, and the power discharged from the battery with the total load consumption including the micro-grid's loads, the power charged in the battery, the power sold to the main grid and the power loss of the main grid showed by equation (11).
charge,t export,t loss,t P +W + PV + P + P + P = L + P + P + P , i,t   (11)  Main grid power limits: System spinning reserve capacity: In order to model the uncertainties of renewable sources according to equation (14), a value of stored power is considered as operation reserve.
The last three terms in the right hand side of Equation (15) are the extra reserve added to mitigate the effects of uncertainties in the load, wind power, and solar power forecast (Alabedin 2011).
Equations (16), (18) and (19) indicate the amounts of the reserves provided by thermal units, the main grid and the curtailable loads, respectively.
The limits on cut load: Battery constraints: The allowable amount of charge and discharge of the battery at each time is determined relevant to the battery's feature; at each hour the battery can be set in both charge and discharge status. So, this action is determined by the binary variable Vcht; where it is one is indicates the charging and where it is zero indicates the discharging of the battery at time t.
Equations (21) and (22) indicate the battery charge and discharge limits, respectively.
The charge status of battery SOCt at each planning period changes proportional to the amount of the charge and discharge of the battery and is determined by the following equation:

Case study
To evaluate the effectiveness of the proposed model, a case study is considered (Fig. 1). This micro-grid was earlier designed as connected to the main grid by the authors for Bisheh village which is located near the Khorramabad city and consists of 138 domestic consumers, 7 trade consumers and 10 public consumers including schools, water and sewer room, health home, communication center, television satellite mast, gendarmerie station, Post Bank, Basij base, train station and promenade (Salahi et al. 2016). Load consumption of this village is predicted for 24 hours of a summer day as shown in Fig. 2 (Salahi et al. 2016).  In this micro-grid, are used 3 thermal units with the total capacity of 150 kW, a wind turbine with the nominal capacity of 330 kW, a photovoltaic panel with the nominal capacity of 150 kW, a battery bank with the capacity of 100 kW and a converter with the capacity of 50 kW, for supplying power. The transformer capacity at the point of connection to the main grid is 150 kW.
The data relevant to generated power by wind turbine and generation power of photovoltaic panels in a 24-hour period is obtained from the output data of the simulation of the micro-grid studied in HOMER ENERGY software as Table 1 (Salahi et al. 2016). The amount of pollutant gasses emissions for the main grid according to HOMER ENERGY software data for gases CO2, SO2, NOX are 632, 2.74, 1.34 g/kWh, respectively. Battery charge/discharge efficiency, maximum/minimum charge status of the battery are assumed 0.95, 0.3, and 1, respectively. The spinning reserve requirement is equal to 10% of the load and the price of the reserve is assumed 0.01 $/kWh. The load forecasting error factor ( l α ), the wind forecasting error factor ( w α ) and the solar forecasting error factor ( pv α ) are equal to 0.03, 0.13 and 0.09, respectively (Alabedin 2011). The rates of power exchange with the main grid and the load curtailment cost are as shown in Table 2. The parameters of thermal units are shown in Table  3; for all thermal units minimum down time and minimum up time equals one hour, and specific fuel consumption (SFC) for all units equals to 0.517 m 3 /kWh. The price of the micro-turbine's fuel is assumed 0.2 $/m 3 .
In Table 3 the amount of pollutant gasses emissions for thermal units are considered according to HOMER ENERGY software. A cost is considered as penalty for pollutant gasses emitted by thermal units and the main grid as shown in Table 4.

Table 2
The prices of power exchange with the main grid and load curtailment ($/kWh) (Salahi et al. 2016).

Results and Discussion
To investigate the effects of considering curtailable loads, the losses of the power purchased from the main grid, the penalty of pollutant gasses emissions and the elimination of subsidies on the micro-grid costs, the operation problems for the studied micro-grid have been solved in the following cases and the results are compared:  First case: The optimal operation of the micro-grid regarding the load curtailment, the losses of the power purchased from the main grid and the penalty of pollutant gasses emissions.  Second case: The optimal operation of the microgrid regardless of the load curtailment.  Third case: The optimal operation of the microgrid regardless of the losses of the power purchased from the main grid.  Fourth case: The optimal operation of the microgrid regardless of the penalty of pollutant gasses emissions.  Fifth case: The optimal operation of the micro-grid regarding eliminating subsidies.
Renewable sources produce 2605.754 kW power in all cases by photovoltaic panels and wind turbines. The operation results of the micro-grid in each case are given in the following sections.

The results of the first case
In this case, according to equation (1) and all constraints mentioned in sections 2.2 the optimization problem is solved that obtained results are shown in Fig.  3.
In this case, the thermal units generate the power of 143.148 kW; 166.632 kW of the power required for the micro-grid is purchased from the main grid; 79.718 kW is supplied through the load curtailment, and the battery injects 133 kW to the micro-grid. Also in this case, the micro-grid has the surplus production power of 1334.951 kW sold to the main grid.
In the first case, the micro-grid's consumption load is first supplied by renewable sources, and then by thermal units, the main grid, curtailable loads and battery. During the period, 20, 22 and 24 power is purchased from the main grid. Thermal units had been generating power at 1, 2 and 23 and had been off in other hours whose reason is their generating power cost and also the considered penalties for pollutant gasses emissions by them. Also in this case the battery is charged at 20 and discharged at 14, 17, 19 and 21; regarding the time of charging and discharging of the battery, we find that at 20 that the price of purchasing power from the main grid is cheaper compared to the peak hours, the micro-grid can increase its profitability by purchasing power from the main grid and storing it to be used at other times. Fig. 3 The results of the optimal operation of the micro-grid in first case.

The results of the second case
In this case, in equation (1), the fourth term which is associated with the cost added to micro-grid due to the load curtailment is overlooked; the results of the optimization problem in this case are shown in Fig. 4.
In this case, the thermal units generate the power of 135.796 kW; 313.44 kW of the power required for the micro-grid is purchased from the main grid; the battery injects 266 kW power to the micro-grid. Also in this case, the micro-grid generates the surplus power of 1377.952 kW that is sold to the main grid.

The results of the third case
In this case, loss,t P in the last term of equation (1) which is associated with the income obtained from the losses of the power purchased from the main grid is overlooked; the results of the optimization problem in this case are shown in Fig. 5.
In the third case, the thermal units are off in all hours and do not have power generating, 319.768 kW of the power required for the micro-grid is purchased from the main grid; 78.678 kW is supplied through the load curtailment and the battery injects 553.112 kW power to the micro-grid. Also, in this case, the micro-grid generates the surplus power of 1406.297 kW that is sold to the main grid.

The results of the fourth case
In this case, in equation (1), the fifth and sixth terms which are associated with the penalty of pollutant gasses emissions are overlooked; the results of the optimization problem in this case are shown in Fig. 6.   Fig. 4 The results of the optimal operation of the micro-grid in second case.

Time(h)
PV+WT Thermal units Pimport Pexport Pcutload Pdischarge Pcharge Fig. 6 The results of the optimal operation of the micro-grid in fourth case.
In the fourth case, the thermal units and the main grid are supplied 977.436 kW and 155.29 kW of the power required for the micro-grid, respectively. 69.488 kW of the power required for the micro-grid is supplied by load curtailment and the battery injects 153.872 kW power to the micro-grid. Also, in this case, the micro-grid generates the surplus power of 2168.5 kW that is sold to the main grid.

The results of the fifth case
Regarding that the government in Iran pay subsidy for energy, the prices considered in the first to fourth cases for micro-turbine consumption fuel and power exchange with the main grid all correspond to the present economic condition of Iran. In order to evaluate the effect of eliminating subsidies and increasing the fuel and energy price on the micro-grid operation, in this case, the price of the micro-turbine's fuel is assumed 0.45 / $ m3; that as a result of this increase in fuel price, the cost of power generation by thermal units i C will be 0.146 $/kWh. Also, in this case, the reserve price is assumed 0.06 $/kWh; and the rates of power exchange with the main grid, and load curtailment costs are assumed as shown in Table 5.
The results of the optimization problem in the fifth case are shown in Fig. 7. In this case, the micro-grid without purchasing power from the main grid and only by renewable sources, thermal units, load curtailment and battery is able to provide its required power; as thermal units, curtailable loads and battery supply 1334.805 kW, 60.262 kW, 118.562 kW of the required power of the micro-grid, respectively. Also, in this case, the micro-grid generates the surplus power of 2400 kW that is sold to the main grid.

A Comparison of different cases results
The total cost of the micro-grid operation during 24 hours, the generation value of thermal units, the power exchanged with the main grid and the curtailed load, the charged and discharged power in/from the battery for five studied cases are shown in Table 6. Table 5 The prices of power exchange with the main grid and load curtailment in fifth case ($/kWh).  © IJRED -ISSN: 2252-4940, July 15 th 2016, All rights reserved Fig. 7 The results of the optimal operation of the micro-grid in fifth case.

Table 6
The results of the micro-grid operation in 5 studied cases.  According to Table 6 it is indicated that operating cost in the second case is $0.938 (0.013%) less compared to the first case, suggesting that regardless of the load curtailment, more profit will be gained by the micro-grid. In this case, the thermal units have produced 7.352 kW power less compared to the first case. Also, in this case, the power purchased from the main grid, the power sold to the main grid, the power was charged in the battery and the power discharged from the battery are 146.808, 43.001, 147.368, 133 kW higher compared to the first case, respectively.
Operating cost in the third case is $4.505 (0.061%) less compared to the first case, suggesting that regardless of the losses of the power purchased from the main grid more profit will be gained by the micro-grid. In this case, the curtailable loads are 1.04 kW less involved in the micro-grid's power supplying compared to the first case. In this case, the power purchased from the main grid, the power sold to the main grid, the power charged in the battery and the power discharged from the battery are 153.136, 71.346, 359.792, 420.112 kW higher compared to the first case, respectively.
Operating cost in the fourth case is $36.369 (0.499%) less compared to the first case, suggesting that regardless of the penalty of pollutant gasses emissions, more profit will be gained by the micro-grid. In this case, the total power produced by the thermal units, the power sold to the main grid, the power discharged from the battery are 834.288, 833.549, 20.872 kW higher compared to the first case, respectively. Also, the power purchased from the main grid, and the curtailed loads are 11.342, 10.23 kW less compared to the first case, respectively.
Operating cost in the fifth case is $25.435 (0.349%) less compared to the first case, suggesting that with the elimination of subsidies more benefit will be gained by the micro-grid. In the fifth case, the total power produced by thermal units and the power sold to the main grid are 1191.657 and 1065.049 kW higher compared to the first case, respectively. Also, in this case, the curtailed load, the power charged in the battery and the power discharged from the battery are 19.456, 71.839 and 14.438 kW higher compared to the first case, respectively. In this case, because of the elimination of subsidies and as the power price of the main grid gets real, the micro-grid prefers to supply its required power by its local sources than to purchase it from the main grid.
The charge status of battery during 24 hours for the studied cases is shown in Fig. 8. Looking at Fig. 8, we see that the battery in the fifth case, the hours that the battery is at minimum charge status are less, compared to other cases; and in the first and fourth cases the hours that the battery is at maximum charge status are higher. Carefully looking at Fig. 8, we see that in the fifth case the charge status of battery is more than 0.6 at more hours and it is less than 0.6 at less hours, compared to other cases. Also, in second case, the charge status of battery is more than 0.6 at less hours and it is less than 0.6 at more hours, compared to other cases. In other words, charge status of battery in the fifth and second are at the best and the worst status, compared to other cases, respectively.

Conclusion
In this paper, an optimization model for minimizing the operation costs of micro-grids as mixed-integer nonlinear programming (MINLP) is proposed. The proposed model was applied over a micro-grid connected to the main grid. To investigate the effect of load curtailment, the losses of the power purchased from the main grid, the penalty of pollutant gasses emissions and the elimination of subsidies on the micro-grid, the proposed model was tested in five different cases. The obtained results showed that regardless of load curtailment, the microgrid's costs are increased, and if the power purchased from the main grid is without losses and the penalty of pollutant gasses emissions is not assumed, the microgrid costs will decreased.
Given that in an emergency the load curtailment can be used as a virtual source of power generation, and the power transmission has surely losses, and regarding that by increasing environmental pollutions caused by using fossil fuel, considering penalty for pollutant gasses emissions is a suitable way for reducing the use of fossil fuel, it seems that a comprehensive model for reducing the micro-grid's costs should include imposed costs caused by load curtailment, the power losses of the main grid, and the penalty of pollutant gasses emissions.
With the elimination of energy subsidies and the power exchange at higher prices, and increasing the price of the micro-turbine's fuel, the micro-grid costs will decreased and foundation of the micro-grid would be more effective in this condition. Regarding this matter, it becomes clear that with the elimination of energy subsidies the government can provide conditions for higher profitability of the micro-grids and thus encourage investors to invest in the establishment of the micro-grids.