1.INTRODUCTION
The traditional power grid supports centralized electrical power generation where the electricity is generated at locations close the source of energy (e.g., hydro dams) and transported to the consumers who are generally located further away from those generation sites. During transmission, a significant portion of the electrical power is lost, as it converts into heat over the conductors. Therefore, it is desired to have generation close to consumption. As the lowcost, renewable energy generation technologies such as, rooftop photovoltaic (PV) panels, small wind turbines are becoming available, distributed generators (DGs) will be widely adopted by smallscale businesses and residential consumers. The penetration level of the DGs in the smart grid is expected to be vast.
The microgrid concept was initially introduced in 2002 in (Lasseter, 2002) to address this challenge in addition to enabling fault isolation. A microgrid is a relatively smallscale, selfcontained, medium/low voltage electric power system (EPS) that houses various distributed energy resources (DERs) in a physically close location. DERs include DGs, controllable loads, smallscale combined heat and power (CHP) units, and distributed storage (DS), such as flywheels, batteries, and plugin hybrid electric vehicles (PHEVs).
The microgrid concept was initially favored for its ability to participate in electricity market and ease of DG handling. Therefore, following the increasing interest in renewable generation in the smart grid, microgrids have become an active field of study. Within the context of the smart grid, the definition of the microgrid is evolving into the smart microgrid (SMG), and information and communication technologies (ICTs) are becoming integrated to load control tasks and being used for energy trading among communities (Shahidehpour, 2010). In the future, SMGs will be able to form electrical communities that take the role of a supplier or a consumer for another SMG, and trade electricity. It is envisioned that SMGs can also form a network to maximize the utilization of renewable energy resources. When renewable energy generators are integrated to the grid, some SMGs will likely have more power capacity than is needed for themselves, and some SMGs will not be able to reach those renewable resources although they are in need of power. For instance, wind generation capacity may be higher in a suburban region than it is downtown. In this case, exporting energy from one SMG to another SMG may increase the utilization of the renewable energy resources in the overall system since in an EPS when generated power is not consumed or stored, it is wasted.
To achieve the best of our knowledge, forming SMGs for participating in long term electricity market has not been considered. In this article, which discusses the applicability of demand response to the smart microgrid; it has been considered the effect of electricity market into smart microgrid optimization.
Wholesale electricity markets make use of the uniform price auction mechanism to administer trade in electricity. This mechanism promotes efficiency by encouraging power producers and consumers to bid their marginal costs and willingness and pay respectively. On the other hand, microgrid are not appreciative to do so, and typically do not participate in these markets. Instead, microgrid is utilized whenever it is accessible in realtime (Rubin, 2010). In many markets (e.g., NYISO, PJM, ISONE), renewable resources are considered as pricetakers, and are settled at realtime prices. Therefore, investigating the performances of electricity markets in conjunction with the expansion of smart microgrid is a key research issue.
Each smart microgrid will attempt to minimize its own cost according to other participants’ bidding behaviors and power systems operating conditions in an electricity market. Therefore a smart microgrid should propose a good bidding strategy in order to minimize the cost. Generally, there are two methods for developing bidding strategies in electricity markets: gamebased and nongame based (David and Wen, 2000) The gamebased method utilizes the game theory (GT) to simulate bidding behaviors of smart microgrids and develop Nash equilibrium bidding strategies for smart microgrids in electricity markets. Game theoretic models are widely used to find producers optimal bidding strategy in electricity market (Chung et al., 2004; Gountis and Bakirtzis, 2004; Moreno, 2002; Niu et al., 2005; Xian et al., 2004). This paper describes an application of Cournot theory to model optimal bidding strategy problem in a competitive electric power industry to improve planning of smart microgrids.
In the rest of the article we first proposed structure of smart microgrids. We then discuss the reliability and uncertainty of Smart microgrids. After that, we present participation of smart microgrids in electricity market and objective function. Then, the advantages of the devloped scheme by the help of illustrative results. Finally, we conclude the article.
2.PROPOSED STRUCTURE OF SMART MICROGRID BASED ON RENEWABLE ENERGY RESOURCES
This section presents a structure for distribution system including Smart Microgrid. This study was performed for the Ekbatan residential complex in Tehran, Iran. Ekbatan has three smart microgrid consist of renewable energy resources (Figure 1). This study presents a novel approach which is applied for optimal sizing and siting of distribution generation in smart microgrids under pool electricity market to reduce cost and power loss of these smart micogrids. The costs include capital cost, replacement cost, operation and maintenance cost, fuel cost, reliability cost, power loss cost and selling and buying electricity cost. Then an objective function with aim to minimizing of total costs has been considered.
Figure 2~Figure 4 show the structure of considered smart microgrids.Figure 3
As it can be seen in Figure 2~Figures 4, the smart microgrid 1, 2 and 3 consist of 6 major components as well as a DC and an AC Bus bars. These components involve wind turbine generators, PV arrays, micro turbine, Fuel cell, battery, electrolyzer, hydrogen storage tank, and DC/AC converter (inverter). The components of these microgrid are somewhat identical to the systems of (Hakimi and Moghaddas Tafreshi, 2009, 2014); so, they are not described in this paper to keep focus on the main issue.
2.1.Smart Microgrid Reliability
By adding output powers of wind turbine and photovoltaic (PV), injected power to the DC bus, generated by renewable sources, is calculated as:(1)
Where , N_{WG}, N_{PV}${n}_{WG}^{fail}$ and ${n}_{PV}^{fail}$ are numbers of installed and failed wind turbine and PV arrays, in that order. Components could be unavailable because of scheduled or forced outages (Billinton and Allan, 1984). In this study, outages of PV arrays, wind turbine generators (WGs), and DC/AC converter are considered. Forced Outage Rate (FOR) of PVs and WGs is assumed to be 4% (Karki and Billinton, 2001). As a result, these components will be accessible with a possibility of 96%. Probability of encountering each condition is calculated through binomial distribution function (Nomura et al., 2005). For example, given ${n}_{WG}^{fail}$ out of total N_{WG} installed WGs, and N_{WG} out of total N_{PV} installed PV arrays are failed, the probability of encountering this state is calculated as follows:(2)
where, A_{WG} and A_{PV} are availabilities of each WG and PV array. Since, other components do not have moving elements and are installed inside, their outage probabilities, in contrast with WGs and PV arrays, are much lesser and therefore negligible. But, it has to be noted that DC/AC converter acting an essential part in providing the demand, and its collapse, in any situation, will result in loss of whole demand. In fact, DC/AC converter is the just single cutset of the system reliability drawing (Billinton and Allan, 1992). Therefore, it is essential to take the outage probability of inverter into reliability calculations of such a system, while its FOR is too little. Simulation results will verify the great power of this element over system’s reliability. On the other hand, it is hard to discover complete studies on reliability of power electronic inverters in literature. in any case, availability of a usual DC/AC converter can be approximately calculated by combining some information given in (Khairil and Javanovic, 2006; Koutroulis et al., 2006; Marchesoni and Savio, 2005).
Regarding above references, the inverter is available with a probability of 99.89%, which is indeed much more reliable than WGs and PV arrays. lastly, probability of failure of ${n}_{WG}^{fail}$ WGs, ${n}_{PV}^{fail}$ PV arrays, and fail inv n inverters out of, in that order, , N_{WG}, N_{PV} and N_{inv} installed components is calculated by the following equation.(3)
Incidentally, failure probabilities of fuel cell, micro turbine, battery, electrolyzer, and hydrogen tank are ignored in this paper. It should be noted that, these components, dissimilar DC/AC converter, do not engage in any single cutset and, so, do not straight reason loss of load.
3.CONCEPTUAL MODELING OF UNCERTAINTY
Modeling wind speed, solar radiation and load time series is an essential part of system planning studies to create artificial wind speed, solar radiation and load time series. Therefore, this paper applies a technique to supply planners with ideal simulation of wind speed, solar radiation and load in addition to complete temporal dependence arrangement based on the copula theory (Haghi et al., 2013; Haghi et al., 2010; Hagspiel et al., 2012). dissimilar conventional autoregressive and Markov chain methods, the recommended technique is wellprepared to deal with nonlinear longmemory temporal dependence and nonGaussian empirical probability distributions of the wind speed and solar radiation.
Copulas present a technique to produce distributions that model correlated multivariate data, especially, at what time there are different universal forms of dependence structures, professionally more than three correlated variables, or variables with dissimilar or practical distribution functions (Nelsen, 2006). Copula methods are accepted in a lot of various areas wherever numerous different correlated factors are necessary to be modeled jointly. The application of copulas in power system problems is relatively new (Gill et al., 2012; Golkar and Haghi, 2011; Haghi and Bina, 2008, 2009; Hagspiela et al., 2011; Mohammadi et al., 2011; Stephen et al., 2011; Westner and Madlener, 2012). Therefore in this paper, Copula method is used to consider uncertainty of wind speed, solar radiation and load time series.
4.PARTICIPATION OF SMART MICROGRID IN THE COMPETITIVE ELECTRICITY MARKET
In this section, we consider the presence of smart microgrids in the competitive electricity market. Therefore it requires methods and strategies to achieve this purpose and we have to bid the price as a price maker in a competitive electricity market. Game theory is used in this study. Considering how fast smart microgrids can buy and sell the energy from/to the distribution grid, smart microgrids can act as a buyer or seller of energy in a grid. In both cases the goal of smart microgrids is to minimize the cost by selling while the profit margin is high and purchase while the grid’s energy is cheap.
In this Paper, the Cournot model is used to describe the game. In the other word, the behavior of market players will follow the Cournot model. Cournot model was chosen due to its characteristics. In this model, the market doesn’t effect on the production value or the purchase of any players in the market, but the players decide themselves the amount of the production and purchase based on their estimation from the other participants’ behavior.
In this paper, the smart microgrids will participate in a longterm electricity market. Electricity market is implemented in distribution grid and the Distribution Network Operator (DNO), as a regulatory body, will regulate interactions between the companies (smart microgrids) to meet the network security (Figure 5). Overall market interactions is in such that, the companies give their offers to DNO based on their own constraints and DNO sorts the purchasing bids from the higher to lower price and the selling bids based on the lower to higher price. These two prices cross on a point called the Market Clearing Price (MCP). Marginal cost plays a significant role for bidding strategies of smart microgrid.
In proposed economic model, it is supposed that smart microgrids operate in the pool competitive framework and market price is determined by marginal cost of the most expensive unit which provides demand.
4.1.Market Clearing Model in Distribution Level
After collecting the biding price from all participants in the market, DNO sorts smart microgrid bids from minimum to maximum price and intersects the supply and demand curves as in Figure 6.
To participate in the market, the microgrid offers the price to the market using the game theory and the Cournot model of imperfect competition. The procedure of price offering will continue until the market reaches an equilibrium which is called the Cournot equilibrium point.
4.2.Modeling Cournot Interaction
In this model, after DNO receives the offering price by the participants and finds the MCP, the MCP multiplies by a factor of nearly one and proposes to the participants. The participants start to optimize their objective function in order to minimize their cost. In the next steps, DNO will provide the participants with the new price using equation (4).
where MCP^{j} is MCP at j^{th} step, MCP^{j}^{1} is MCP at (j1)^{th} step, ${P}_{i}^{j}$ is generation of unit i in j^{th} step, α is demand factor refers to price elasticity in pool market, n is total number of units. After obtaining the equilibrium Cournot point, the evaluated price on the upstream market will compare with the distribution market price. If the distribution market price is less than the upstream market price, the distribution price will be confirmed by DNO. If it is the other way around, DNO will announce the upstream market price as the final price to the participants. In this case, the participants will optimize their objective function base on the input from DNO, and since the marginal cost offered by DNO is less than their offered marginal cost, they will deliver less generated power to the distribution grid and DNO will supply the extra demanded power from the upstream grid.
4.3.Interaction between Market Manager and Smart Microgrids
In this section we discuss about how to calculate the initial MCP and the method to offer the price and power.
As the first step, in order to participate in the market, the participants will inform the DNO about their marginal cost. The DNO will calculate the initial MCP base on the inputted data by the participants. Figure 7 shows the flowchart of proposed model. In the hybrid GT/PSO model, necessary data such as primary MCP are broadcasted by DNO to each smart microgrids. Afterwards each smart microgrid independently optimizes its objective function by PSO to achieve minimum cost while assuming that the other smart microgrids have no bid. The bidding results of each smart microgrids are declared to DNO, including generation quantities. Then, the DNO checks the system constraints. If the bidding results of smart microgrids satisfy system constraints, the DNO will agree to them. If not, the results of smart microgrids will be discarded. In both cases however, the results of all smart microgrids and new MCP are declared by the DNO. At this time, each smart microgrid submits new bid to the DNO again with consideration of other smart microgrids bids. This method is a game theory based on Cournot model. The aforementioned process will be continued iteratively until no player (smart microgrid) changes its bidding strategy. In this state, if system constraints are satisfied, then the program will be successfully terminated at the Cournot equilibrium point.
5.OBJECTIVE FUNCTION
The penetration of renewable energy resources in smart grid is continually growing. Hence, there is a need to investigate the potential benefits and drawbacks of renewable energy resources when integrating renewable energy units in existing networks. The challenge of identifying the optimal sizes and locations has triggered research interest and many studies have been presented in this purpose. Different techniques have been developed to minimize cost for single microgrid components. The novelty of this paper lies in studying the optimal sizing and placement of multiple smart microgrid units under pool electricity market and these smart microgrids participate in a longterm electricity market as a price maker. Demand response of smart appliances (washing machines, dish washer, plugin hybrid electric vehicles, Heating/ cooling systems) is considered in this study (Hakimi and MoghaddasTafreshi, 2012a, 2012b, 2014). The problem to solve is determined the optimal size and location of smart microgrids components.
The objective function of this paper is summation of following cost:

1. Cost of smart microgrid components

2. Cost of loss of load

3. Extra cost of smart appliances

4. Incentive cost for smart appliances

5. Cost of buying/selling electricity from/to distribution grid in electricity market

6. Cost of power loss in smart microgrid
The objective function is defined as follow:(5)
Here, we describe components of objective function.
5.1.Cost of Smart Microgrid Components:
The Net Present Cost (NPC) of each component is defined as:(6)
Where N is the number (unit) or capacity (kW or kg), CC is capital cost ($/unit), RC is cost of replacement ($/unit) and O&M is annual operation and maintenance cost ($/unityr) of the components.(7)
ir is the real interest rate (here 6%) which is a function of nominal interest rate (ir_{nominal}) and annual inflation rate (f).(8)(9)
R is the useful lifetime of the project (here 20 years). L and y are useful lifetime and number of replacement of the component during useful lifetime of the project respectively.
5.2.Cost of Loss of Load:
Cost of electricity interruptions is estimated in different ways. For example, looking at the customer’s willingness to pay for expansion or at production losses at industries affected, or at the level of compensations, which makes shortages acceptable. The values found are similar in all cases: in the range of 540 US$/kWh for industrial users and 212 US$/kWh for domestic users (Prommee and Ongsakul, 2008). Here, cost of customer’s dissatisfaction, caused by loss of load, as used in Prommee and Ongsakul (2008), is assumed to be US$5.6/kWh.
where E[LOE(t)] is the expected value of loss of energy or energy not supplied, at time step t defined by:(12)
Here, Q_{s} is the amount of loss of energy (kWh) when system encounters state s and P_{s} is the probability that system encounters in state s.
5.3.Extra Cost of Smart Appliances:
CC_{SA, n} is extra capital cost of Smart Appliance (SA) n. n is number of smart appliances. In this study we consider smart washing machines, smart dish washer, smart heating/cooling system and PHEV as smart appliance.
In order to make Smart Appliances operational as a demand response resource, we considered two major cost elements (CC_{SA, n}):
AHigher costs of the appliance: Assuming a mass production of smart appliances after a reasonable phase of market introduction, we estimate uniform additional production costs of between 1, 70 EUR and 3, 30 EUR for all appliances for enabling their smart operation.
BAdditional electricity costs due to standby consumption: The ability of smart appliances to respond to signals from the electricity network requires them to be in standby mode, e.g. because the user has set the appliance in a ready to start mode. We have estimated the number of hours of standby operation for each type of appliance and the respective standby energy demand. This results in an increase of the electricity consumption of the appliance between 0.1% and 2%. The additional cost for standby consumption is almost 1.10 EUR per appliance and year.
5.4.Incentive Cost for Smart Appliances
Clearly, the default allocation of the costs and benefits of smart appliances under the current framework does not support the motivation of smart households to invest in the new technology and to use it in a smart way. This means that we need to use adequate incentive mechanisms in order to transfer at least part of the total benefits which smart appliances can bring about.
Here, the consumer is rewarded for enabling his or her appliance to operate in a smart mode for a certain period of time. For example, the consumer loads dishes into the dishwasher, selects a certain point in time when the cycle should be finished and switches the appliance in a ready to start mode. Depending on the duration of the flexibility period until the appliance needs to start its cycle in order to meet the set finish time, a certain payment (Incentive − avl_{n}) can be made to the consumer, irrespective of whether the smart operation of the appliance is actually being used or not. In a variant of this model, a separate premium (Incentive − shift_{n}) could be paid if the appliance is actually used for smart operation.
Incentive_{n} is incentive cost of smart appliance n and calculated as:(13)
5.5.Cost of Buying/Selling Electricity
NPC_{buy} and sell NPC_{sell} are calculated as follow:(14)(15)
MCP_{Final}(t) is MCP at the Cournot equilibrium point in time t. P_{buy}(t) and P_{sell}(t) are buying/selling power from/ to distribution grid in electricity market respectively.
5.6.Loss of Power in Smart Microgrid
Loss of power is calculated as follow:(16)(17)(18)(19)
R is the resistance of the bus impedance matrix, P_{i} and Q_{i} are real and reactive power injection in bus i, V_{i} is the voltage of i^{th} bus, where δ_{i} is angle of the bus i which is the phase angle difference between bus i and reference bus (slack bus).
When considering reactive power of DG into the optimization problems, the modeling of DG can be categorized into four groups: the reactive power is formulated according to the real
power of DG unit (Prommee and Ongsakul, 2008); the output power of DG is taken as the predefined activereactive data pairs (Shedaei, 2008; the reactive power of DG is included as a constraint variable in the optimization problem (AlinejadBeromi et al., 2008; Niknam, 2006); and DG unit is assumed to have fixed power factor (Harrison et al., 2007; Quezada et al., 2006). The last suggestion is chosen in this study, because it is assumed that the power factor of all DG types can be controlled by using advanced control strategies and power electronic interfaces. Reactive power is calculated as:(20)
The Digsilent Power Factory program is used for power flow calculation by the NewtonRaphson method. The Digsilent solves power flow taking into account several simplifying considerations such as the parameters of bus voltage, line current, transformer and line loading, power line or other elements. The optimization problem is subject to the following constraints.(21)(22)(23)(25)
where, ELF is equivalent load factor, θ_{PV} is array’s installation angle, and constraint (24) ensures that the amount of stored energy in the hydrogen tank at the end of first year will be more than its initial amount. N_{TR} (max) is maximum capacity of distribution grid.
Eq. (26) represents the limitation of voltage angles based on system stability. Eq. (27) describes the limitation of magnitude angle for voltage at each bus of system and Eq. (28) represents the limitation of feeders’ current due to power loss and thermal limitation and the last equation indicate that in order to remain security and system stability.
6.SIMULATION RESULTS
In this study, the Ekbatan network is used to investigate the optimum placement and size by including the pool electricity market. The system structure can be seen in Figure 8~ Figure 10.Figure 9
The available data consist of hourly averages of wind speed, recorded at a height of 40 m, vertical and horizontal solar radiation of Ekbatan. The peak load of each bus in Ekbatan is shown in Table 1.
In this section, the cost and components optimal sizing of smart microgrids in competitive electricity market are calculated and the results are compared with while the smart microgrids don’t have any effect in the price of the electricity market and it is just a price taker. In the former, the excess/required power of smart microgrid sells/buys to/from the distribution system based on the upstream market’s MCP. In the competitive electricity market, the price of selling/purchasing to/from the distribution network is determined based on the optimized objective function as well as the final MCP. In this case, when the final MCP increases, the amount of selling energy to the network by smart microgrid will increase, and in contrast, when the final MCP decreases, the smart microgrid purchases more energy from the upstream network. In order to validate the above, the cost of microgrid before and after contribution in the market are compared and shown in Table 2. As can be seen, the cost of smart microgrids decreased after its contribution in the competitive market. The logical selling/ purchasing operation by the smart microgrids in the competitive market is the reason of this decrease. It means that the selling energy to the network by smart microgrids increased in the high MCP condition, and the purchasing is increased in the low MCP condition. As can be seen in Table 2, the amount of cost reduction in smart microgrid 1 is less than the other two smart microgrids due to the high marginal cost of fuel cells in the first smart microgrid compare with other two power generators. Table 3~Table 5 show optimal sizing of smart microgrids components before and after participate in electricity market.Table 4
7.CONCLUSION
This paper presents a new method which is applied for optimal sizing and siting of distribution generation in smart microgrids under pool electricity market to reduce cost and power loss of these smart micogrids. The new idea of this paper is investigation the effect of pool electricity market in optimization of smart microgrids. This study was performed for the Ekbatan residential complex in Tehran, Iran. A gametheoretical (GT) model has been used for bidding strategy of smart microgrids as a pricemaker, in a longterm electricity market. The results show that the proposed method is more effective and has lower cost in finding optimum size and location of distribution generation in smart microgrids.