Stochastic Optimization of Microgrid Participating Day-Ahead Market Operation Strategy with Consideration of Energy Storage System and Demand Response

: More and more attention has been paid to the development of renewable energy in the world. Microgrids with ﬂexible regulation abilities provide an e ﬀ ective way to solve the problem of renewable energy connected to power grids. In this article, an optimization strategy of a microgrid participating in day-ahead market operations considering demand responses is proposed, where the uncertainties of distributed renewable energy generation, electrical load, and day-ahead market prices are taken into account. The results show that, when the microgrid implements the demand response, the operation cost of the microgrid decreases by 4.17%. Meanwhile, the demand response program can transfer the peak load of the high-price period to the low-price period, which reduces the peak valley di ﬀ erence of the load and stabilizes the load curve. Finally, a sensitivity analysis of three factors is carried out, ﬁnding that, with the increase of the demand response adjustable ratio or the maximum capacity of the electrical storage devices, the operation cost of the microgrid decreases, while, with the increase of the demand response cost, the operation cost of the microgrid increases and, ﬁnally, tends to the cost without the demand response. The sensitivity analysis reveals that the demand response cost has a reasonable pricing range to maximize the value of the demand response.


Introduction
The effective use and development of renewable energy has become an important part of the energy development strategy of all countries in the world [1]. According to the statistics released by the International Renewable Energy Agency (IRENA) in 2018, the global renewable energy generation accounts for one-third of the total generation [2]. In 2018, the newly installed capacity of renewable energy in the word was 171GW [3], the year-on-year growth rate was 7.9%, and two-thirds of the new power generation came from renewable energy [3]. However, the renewable energy resources are intermittent by nature [4]. After large-scale integration of renewable energy into the grid, it may not only bring new challenges to the safe and stable operation of the power system but also lead to invalid investment, such as the problem of the abandonment of wind and photovoltaic power generation.
(1) The stochastic optimization model is used to describe the random characteristics of renewable energy output and electricity price. In order to make the model more consistent with the actual operation situation of the microgrid, the fluctuation characteristics of renewable energy output and the uncertainty of electricity price in the day-ahead market are incorporated into the optimal operation model of a microgrid. So, the operation strategy can better avoid market risk and improve the economic performance of a microgrid operation. (2) Energy storage device is introduced in the power supply side of a microgrid, and the demand response contract between the microgrid operator and the user is considered on the demand side. A two-way interaction mode between power supply and demand is constructed in order to integrate energy storage devices and regulable loads into the economic dispatch of a microgrid. (3) Make full use of schedulable resources to ease the uncertainty of intermittent energy generation and promote the consumption of renewable energy.
Remainder of this paper has been organized as follows: Section 2 presents the microgrid model with electrical energy storage and demand response. Section 3 is the introduction of stochastic programming. Section 4 is dedicated to the formulation of stochastic optimization of a microgrid operation. In Section 5, the simulation data, conditions, results, and the discussion of the results have been explored. Finally, the conclusion is in Section 6.

Microgrid Model
A microgrid can contain a variety of devices and technologies, in which information and energy flow among each other. Then, the assumed microgrid model should be defined firstly to clarify the object of the optimization problem. Assumed microgrid model in this article is as shown in Figure 1. As it is clear in this figure, the internal structure of a microgrid, in which the main form of energy flow is electrical energy, includes wind turbine, micro gas turbine, electrical storage device, and electrical demand. Similar to an electrical energy storage device, electrical demand can generate bidirectional energy flow in a microgrid due to the demand response. As a whole, microgrid operators can purchase and sell energy through electrical grid connection points in the electrical market. The microgrid management unit can get the information from all units of the microgrid and electrical market. By processing the information, the microgrid operator makes the optimal operation strategy of the microgrid to get the maximum profit in the electrical market environment. It should be noted that, the electrical market considered in this article is a fully competitive market, in which all market participants are price-takers. Therefore, when the microgrid operators participate in the electrical market, the operation strategy of a microgrid will not affect the market-clearing price of the power market.
Energies 2020, 13, x FOR PEER REVIEW 3 of 15 and the uncertainty of electricity price in the day-ahead market are incorporated into the optimal operation model of a microgrid. So, the operation strategy can better avoid market risk and improve the economic performance of a microgrid operation. (2) Energy storage device is introduced in the power supply side of a microgrid, and the demand response contract between the microgrid operator and the user is considered on the demand side. A two-way interaction mode between power supply and demand is constructed in order to integrate energy storage devices and regulable loads into the economic dispatch of a microgrid. (3) Make full use of schedulable resources to ease the uncertainty of intermittent energy generation and promote the consumption of renewable energy. Remainder of this paper has been organized as follows: Section 2 presents the microgrid model with electrical energy storage and demand response. Section 3 is the introduction of stochastic programming. Section 4 is dedicated to the formulation of stochastic optimization of a microgrid operation. In Section 5, the simulation data, conditions, results, and the discussion of the results have been explored. Finally, the conclusion is in Section 6.

Microgrid Model
A microgrid can contain a variety of devices and technologies, in which information and energy flow among each other. Then, the assumed microgrid model should be defined firstly to clarify the object of the optimization problem. Assumed microgrid model in this article is as shown in Figure 1. As it is clear in this figure, the internal structure of a microgrid, in which the main form of energy flow is electrical energy, includes wind turbine, micro gas turbine, electrical storage device, and electrical demand. Similar to an electrical energy storage device, electrical demand can generate bidirectional energy flow in a microgrid due to the demand response. As a whole, microgrid operators can purchase and sell energy through electrical grid connection points in the electrical market. The microgrid management unit can get the information from all units of the microgrid and electrical market. By processing the information, the microgrid operator makes the optimal operation strategy of the microgrid to get the maximum profit in the electrical market environment. It should be noted that, the electrical market considered in this article is a fully competitive market, in which all market participants are price-takers. Therefore, when the microgrid operators participate in the electrical market, the operation strategy of a microgrid will not affect the market-clearing price of the power market.

Stochastic Programming
Stochastic optimization is an important branch of mathematical optimization, which deals with the optimization problem with random variables in data. The stochastic optimization method can effectively solve the uncertainty problem in the optimization model. This method has been widely used in the optimization fields of the energy system, especially in the electrical power system [37,38]. The description of uncertain factors in stochastic optimization is based on the probability distribution characteristics of them. Results of the stochastic optimization will be scene-based; that is, show the optimal strategy in facing each scene. In this paper, the method is mainly used to reflect the uncertainties of wind turbine output and electrical market price. Considering all scenario sets, the optimal solution is found, which makes the output operation strategy of a microgrid more risk-resistant.

Problem Formulation
In this article, the stochastic optimization of daily scheduling of a microgrid is modeled, which takes into account the forecast curve of hourly power load, hourly wind speed, and day-ahead electrical market price. The reliable and economic operation of the microgrid and the main grid are also considered in the daily scheduling. The details are as follows. The interpretations of symbols of formulas are shown as Table 1.

Objective Function
Stochastic programming method is used to study the optimal operation of a microgrid with energy storage and demand response in this paper. It should be noted that some variables are scenario-based because of the system's uncertainty sources.
The objective function of this paper is to minimize the daily operation cost of the microgrid, which includes the transaction cost of the electrical market, wind power curtailment cost, energy storage operation cost, micro-gas turbine generation cost, and demand response cost. The daily operation time T is divided into 24 periods, where each period t is one hour. The objective function is as follows: where C mg is the total daily operation cost of the microgrid system, ω s demonstrates the probability of scenario s th , C grid is responsible for the transaction cost of the electrical market, C wpc is indicator of the cost of wind power curtailment, C ess accounts for the cost of energy storage operation, C mtg indicates the cost of the micro-gas turbine generation, and C dr presents the cost of the electrical demand response.
where p grid (t, s) is the day-ahead electrical power price at time t and scenario s and P grid (t, s) accounts for the imported electrical power from the main grid at time t and scenario s. When the microgrid operator purchases electricity from the electrical market, the value is positive; otherwise, the value is negative.

The Cost of Wind Power Curtailment
where p wpc is the penalty price of the wind power curtailment.

The Cost of Energy Storage Operation
where p eop is the unit cost of the electrical storage operation. It should be noted that the source of electrical energy obtained by electrical storage cannot be determined when electrical storage is charging power at time t. Therefore, the cost of electrical energy when the electrical storage is charging power at time t cannot be determined by the source of the electrical energy supply. So, this paper introduces opportunity cost to solve this problem. At time t, if the operator decides to charge electrical energy into the electrical storage device, he gives up the revenue of selling it to the electrical market at market price. Thus, this paper considers that the electrical energy cost of P ch (t, s) is p grid (t, s).

The Cost of Micro Gas Turbine Generation
C mtg = p mtg P mtg (t, s)∆t (5) where p mtg is the unit cost of the micro-gas turbine generation.

The Cost of Electrical Demand Response
C dr = p dr (P down (t, s) + P up (t, s))∆t (6) where p dr is the unit cost of the electrical demand response.

Constraints
There are different kinds of constraints that are essential to model the microgrid. These constraints have been demonstrated in the following.

Power Balance
The microgrid system needs to meet the conditions of power balance. The formula is defined as presented in (7): Energies 2020, 13, 1255 6 of 16 In Equation (7), the left side of the equation represents the load, which is adjusted by the demand response program. The right side of the equation represents the output of the main grid and each unit of the microgrid. The left and right sides of the equation must be equal at all times to ensure the power balance of the microgrid.

Exchange Line Capacity between the Microgrid and the Main Grid
When the microgrid operator purchases and sells electrical power from the market, it needs to meet the constraints of the exchange line capacity between the microgrid and the main grid. The formula is as follows: where P min grid and P max grid demonstrate the minimum capacity and maximum capacity of imported power from the main grid.

Wind Farm Constraints
The uncertain output power of wind farms mainly depends on wind speed. The relationship between output power of wind farms and wind speed is studied in Reference [39]. The function relationship is as follows: where v(t, s) is wind speed at time t and scenario s. v c in and v c out represent cut-in and cut-out speeds of wind turbines. v c rated and P w r indicates rated speeds and rated output power of wind turbines. µ wpc presents allowable proportions of abandoned power for wind farms. P max wpc (s) accounts for maximum wind power output at scenario s.

Micro Gas Turbine Constraints
The operation of the micro-gas turbine unit in the microgrid is constrained by the micro-gas turbine's technical conditions. The formulas are as follow.
where P min mtg and P max mtg demonstrate the minimum capacity and maximum capacity of output power from micro-gas turbine. r min mtg and r max mtg represent minimum climbing rates and maximum climbing rates of the micro-gas turbine at time t.

Electrical Storage Constraints
In order to maintain a good operation condition and extend the lifetime of the electrical storage device, the charging and discharging power of the electrical storage should be in a limited range.
Energies 2020, 13, 1255 where P min ess and P max ess demonstrate the minimum capacity and maximum capacity of residual energy of an electrical storage device.
Since the time scale selected in this article is one day, a reasonable initial residual energy E 0 is given in the electrical storage operation scheduling. After one day of charging and discharging operation, the residual energy of electrical storage is still E 0 . This method not only helps to solve the optimization model but also ensures the time continuity of the calculation results. The output operation strategy can let the microgrid operators continuously participate in the electrical market.
where u ch and u dis present electrical storage charging and discharging efficiencies. P loss (t, s) is the power loss of the electrical storage at time t and scenario s. µ loss accounts for the electrical storage loss ratio. Equation (16) models the natural energy loss of the electrical storage device in an actual operation.
where P E ess is the electrical storage capacity. r min E and r max E demonstrate the minimum and maximum allowable electrical storage charging/discharging rates. I ch (t, s) and I dis (t, s) are 0-1 variables, which represent the state of charging and discharging of an electrical storage at time t and scenario s. When I ch (t, s) is 1, it means the electrical storage is in the state of charging. When I ch (t, s) is 0, it means the electrical storage is in the state of noncharging. When I dis (t, s) is 1, it means the electrical storage is in the state of discharging. When I dis (t, s) is 0, it means the electrical storage is in the state of nondischarging. Equation (19) ensures that the electrical storage will not be in the state of charging and discharging at the same time.

Demand Response Constraints
Demand response program can stabilize the load curve and effectively reduce the operation cost of a microgrid [40]. In order to minimize the impact of the demand response on the users' own power consumption behavior, this paper refers to the method proposed by Reference [41]. According to this method law, a total shifted-down load by a user should be equal with the shifted-up amount during the 24 h.
The constraints of the demand response shift-up and shift-down load are as follows: where µ down and µ up are the maximum ratios of shifted-up and shifted-down loads. I down (t, s) and I up (t, s) are 0-1 variables, which represent the state of shifted-up and shifted-down loads by the demand response program at time t and scenario s. When I down (t, s) is 1, it means the load is in the state of shifted-down. When I down (t, s) is 0, it means the load is not in the state of shifted-down. When I up (t, s) is 1, it means the load is in the state of shifted-up. When I up (t, s) is 0, it means the load is not in the state of shifted-up. Equation (23) ensures that the load will not be in the state of shifted-down and shifted-up at the same time.

Simulation Information
In order to show how the demand response affects the operation strategy of the microgrid, three cases are considered in the simulation. The results of the three cases are compared and analyzed in the following part. The specific contents of the three cases are as follows.
Case 1: Without demand response (DR). Case 2: With DR and without DR cost. Case 3: With DR and DR cost.
In the three cases, the uncertain factors such as wind speed, power load, and market price of the day-ahead power are considered. In this paper, a Monte Carlo simulation method is used to generate 400 scenarios, which is needed for stochastic optimization. The wind speed scenarios are generated with the Weibull probability density function. The normal probability density function is used to generate the load and the day-ahead market price scenarios. Finally, by using the method of Reference [42], the number of scenarios is reduced to 20. Figures 2 and 3 show the basic load and day-ahead market price. By taking these values as the average value of the probability density function, where the standard deviation is taken as 10%, the scenarios of the corresponding variables are generated. Parameters required by the Weibull function and other important parameters in the microgrid optimization model are shown in Table 2. This paper uses YALMIP programming language and MATLAB software to solve the model.   up I t s is 0, it means the load is not in the state of shifted-up. Equation (23) ensures that the load will not be in the state of shifted-down and shifted-up at the same time.

Simulation Information
In order to show how the demand response affects the operation strategy of the microgrid, three cases are considered in the simulation. The results of the three cases are compared and analyzed in the following part. The specific contents of the three cases are as follows.
Case 1: Without demand response (DR). Case 2: With DR and without DR cost. Case 3: With DR and DR cost.
In the three cases, the uncertain factors such as wind speed, power load, and market price of the day-ahead power are considered. In this paper, a Monte Carlo simulation method is used to generate 400 scenarios, which is needed for stochastic optimization. The wind speed scenarios are generated with the Weibull probability density function. The normal probability density function is used to generate the load and the day-ahead market price scenarios. Finally, by using the method of Reference [42], the number of scenarios is reduced to 20. Figures 2 and 3 show the basic load and dayahead market price. By taking these values as the average value of the probability density function, where the standard deviation is taken as 10%, the scenarios of the corresponding variables are generated. Parameters required by the Weibull function and other important parameters in the microgrid optimization model are shown in Table 2. This paper uses YALMIP programming language and MATLAB software to solve the model.

Simulation Results and Discussion
The optimized operation cost of a microgrid in different cases is shown in Table 3. In case 1, case 2, and case 3, the optimized operation cost of a microgrid is $386.29, $370.19, and $382.08, respectively. The difference of costs in the three cases shows that the demand response program and the cost of the demand response will affect the optimal operation and, finally, affect the operation cost of the microgrid. When the microgrid implements a free demand response, the operation cost of the microgrid decreases by 4.17%, indicating that, after the demand response is implemented, the load of the microgrid can be adjusted, which can better reduce the risk brought by the price uncertainty in the electricity market and reduce the operation cost of the microgrid. With the cost of demand response in case 3, the operation cost of the microgrid decreased by 1.09%. This shows that the cost of demand response has an impact on the operation of a microgrid. Sensitivity analysis of the demand response cost will be carried out at the end of this section.

Simulation Results and Discussion
The optimized operation cost of a microgrid in different cases is shown in Table 3. In case 1, case 2, and case 3, the optimized operation cost of a microgrid is $386.29, $370.19, and $382.08, respectively. The difference of costs in the three cases shows that the demand response program and the cost of the demand response will affect the optimal operation and, finally, affect the operation cost of the microgrid. When the microgrid implements a free demand response, the operation cost of the microgrid decreases by 4.17%, indicating that, after the demand response is implemented, the load of the microgrid can be adjusted, which can better reduce the risk brought by the price uncertainty in the electricity market and reduce the operation cost of the microgrid. With the cost of demand response in case 3, the operation cost of the microgrid decreased by 1.09%. This shows that the cost of demand response has an impact on the operation of a microgrid. Sensitivity analysis of the demand response cost will be carried out at the end of this section. Displaying the results of all 20 scenarios in this article will take up a lot of space to display the graphs and tables. Therefore, this paper chooses scenario 10 as an example to analyze and discuss the optimized microgrid operation results. Figure 4 shows the transaction electrical power from the main grid in three cases. In the figure, a positive value indicates that the microgrid purchases electrical power from the main grid, and a negative value indicates that the microgrid sells electrical power. In case 1, the microgrid buys less energy from the main grid in the low-price period and sells less energy in the high-price period. Compared with case 1, the transaction between the microgrid and main grid is more active in case 2. More power is purchased in the low-price period and sold in the high-price period under this case. This result shows that the adjustment of the demand response to load will affect the strategy of the microgrid participating in the day-ahead electrical market. From the simulation results, we can see that a microgrid with a demand response will increase the power purchase in a low-price period and the power sale in a high-price period. In this way, the operation benefit of a microgrid can be improved. The effect of the demand response costs on the participation of a microgrid in the day-ahead electricity market is significant. Comparing the result curves of case 2 and case 3, the demand response cost mainly affects the participation of the microgrid in the electricity market during the subpeak period of the electricity price.
Energies 2020, 13, x FOR PEER REVIEW 10 of 15 Displaying the results of all 20 scenarios in this article will take up a lot of space to display the graphs and tables. Therefore, this paper chooses scenario 10 as an example to analyze and discuss the optimized microgrid operation results. Figure 4 shows the transaction electrical power from the main grid in three cases. In the figure, a positive value indicates that the microgrid purchases electrical power from the main grid, and a negative value indicates that the microgrid sells electrical power. In case 1, the microgrid buys less energy from the main grid in the low-price period and sells less energy in the high-price period. Compared with case 1, the transaction between the microgrid and main grid is more active in case 2. More power is purchased in the low-price period and sold in the high-price period under this case. This result shows that the adjustment of the demand response to load will affect the strategy of the microgrid participating in the day-ahead electrical market. From the simulation results, we can see that a microgrid with a demand response will increase the power purchase in a low-price period and the power sale in a high-price period. In this way, the operation benefit of a microgrid can be improved. The effect of the demand response costs on the participation of a microgrid in the dayahead electricity market is significant. Comparing the result curves of case 2 and case 3, the demand response cost mainly affects the participation of the microgrid in the electricity market during the subpeak period of the electricity price.  Figure 5 shows the charging and discharging power of the electrical storage of the microgrid in three cases. The positive value in the figure represents the charging power of the electrical storage devices, and the negative value represents the discharging power. As shown in the figure, in three cases, the charging and discharging strategies of the electrical storage devices of the microgrid are basically the same. From the results of this paper, the demand response has no significant effect on the operation of electrical storage devices of a microgrid. Figure 6 shows the wind farm output.  Figure 5 shows the charging and discharging power of the electrical storage of the microgrid in three cases. The positive value in the figure represents the charging power of the electrical storage devices, and the negative value represents the discharging power. As shown in the figure, in three cases, the charging and discharging strategies of the electrical storage devices of the microgrid are basically the same. From the results of this paper, the demand response has no significant effect on the operation of electrical storage devices of a microgrid. Figure 6 shows the wind farm output.
Energies 2020, 13, x FOR PEER REVIEW 10 of 15 Displaying the results of all 20 scenarios in this article will take up a lot of space to display the graphs and tables. Therefore, this paper chooses scenario 10 as an example to analyze and discuss the optimized microgrid operation results. Figure 4 shows the transaction electrical power from the main grid in three cases. In the figure, a positive value indicates that the microgrid purchases electrical power from the main grid, and a negative value indicates that the microgrid sells electrical power. In case 1, the microgrid buys less energy from the main grid in the low-price period and sells less energy in the high-price period. Compared with case 1, the transaction between the microgrid and main grid is more active in case 2. More power is purchased in the low-price period and sold in the high-price period under this case. This result shows that the adjustment of the demand response to load will affect the strategy of the microgrid participating in the day-ahead electrical market. From the simulation results, we can see that a microgrid with a demand response will increase the power purchase in a low-price period and the power sale in a high-price period. In this way, the operation benefit of a microgrid can be improved. The effect of the demand response costs on the participation of a microgrid in the dayahead electricity market is significant. Comparing the result curves of case 2 and case 3, the demand response cost mainly affects the participation of the microgrid in the electricity market during the subpeak period of the electricity price.  Figure 5 shows the charging and discharging power of the electrical storage of the microgrid in three cases. The positive value in the figure represents the charging power of the electrical storage devices, and the negative value represents the discharging power. As shown in the figure, in three cases, the charging and discharging strategies of the electrical storage devices of the microgrid are basically the same. From the results of this paper, the demand response has no significant effect on the operation of electrical storage devices of a microgrid. Figure 6 shows the wind farm output.   Figure 7 shows the load curve of the microgrid in three cases. As shown in the figure, the demand response program can tap the potential of the demand side of load flexibility. The demand response program transfers the peak load of the high-price period to the low-price period, which reduces the peak valley difference of the load and stabilizes the load curve. Sensitivity analysis of the demand response cost, demand response adjustable ratio, and electrical storage maximum capacity are also carried out in this paper. Figure 8 shows the sensitivity analysis results of the demand response cost. With the increase of the demand response cost, the operation cost of the microgrid also increases and, finally, tends to the cost without the demand response in case 1. This shows that the demand response cost has a reasonable pricing range. For the operators of a microgrid, the high cost will make the demand response lose its economic value and make the operators abandon the use of a demand response to optimize the operation strategy. Figure  9 shows the sensitivity analysis of the demand response adjustable ratio. With the increase of the demand response adjustable ratio, the operation cost of the microgrid decreases. The operation cost of the microgrid in case 2 without the demand response cost decreased more than that in case 3. Figure 10 shows the sensitivity analysis of the maximum capacity of the electrical storage devices. In  Figure 7 shows the load curve of the microgrid in three cases. As shown in the figure, the demand response program can tap the potential of the demand side of load flexibility. The demand response program transfers the peak load of the high-price period to the low-price period, which reduces the peak valley difference of the load and stabilizes the load curve.   Figure 7 shows the load curve of the microgrid in three cases. As shown in the figure, the demand response program can tap the potential of the demand side of load flexibility. The demand response program transfers the peak load of the high-price period to the low-price period, which reduces the peak valley difference of the load and stabilizes the load curve. Sensitivity analysis of the demand response cost, demand response adjustable ratio, and electrical storage maximum capacity are also carried out in this paper. Figure 8 shows the sensitivity analysis results of the demand response cost. With the increase of the demand response cost, the operation cost of the microgrid also increases and, finally, tends to the cost without the demand response in case 1. This shows that the demand response cost has a reasonable pricing range. For the operators of a microgrid, the high cost will make the demand response lose its economic value and make the operators abandon the use of a demand response to optimize the operation strategy. Figure  9 shows the sensitivity analysis of the demand response adjustable ratio. With the increase of the demand response adjustable ratio, the operation cost of the microgrid decreases. The operation cost of the microgrid in case 2 without the demand response cost decreased more than that in case 3. Figure 10 shows the sensitivity analysis of the maximum capacity of the electrical storage devices. In Sensitivity analysis of the demand response cost, demand response adjustable ratio, and electrical storage maximum capacity are also carried out in this paper. Figure 8 shows the sensitivity analysis results of the demand response cost. With the increase of the demand response cost, the operation cost of the microgrid also increases and, finally, tends to the cost without the demand response in case 1. This shows that the demand response cost has a reasonable pricing range. For the operators of a microgrid, the high cost will make the demand response lose its economic value and make the operators abandon the use of a demand response to optimize the operation strategy. Figure 9 shows the sensitivity analysis of the demand response adjustable ratio. With the increase of the demand response adjustable ratio, the operation cost of the microgrid decreases. The operation cost of the microgrid in case 2 without the demand response cost decreased more than that in case 3. Figure 10 shows the sensitivity analysis of the maximum capacity of the electrical storage devices. In the three cases, the operation cost of the microgrid decreases with the increase of the energy storage capacity.
The stochastic optimization method is compared with the conventional deterministic optimization method in this paper. Table 4 shows the operation cost of the microgrid and the rate of abandoned energy from the wind turbine for both methods under three cases in scenario 10. In Table 4, SO and DO represents stochastic optimization and deterministic optimization. µ aw represents the rate of abandoned energy from the wind turbine, which is calculated as follows: t=1 P w (t) (24) As shown in Table 4, the operation cost of the microgrid with the stochastic optimization method is lower than that with deterministic optimization method in all three cases. The rates of the abandoned energies from the wind turbine, which are greater than 0 with the deterministic optimization method, are all 0 with the stochastic optimization method in all three cases. Compared with the above results, we can see that the operation strategy of the microgrid with the stochastic optimization method is not only conducive to the absorption of renewable energy but also can effectively reduce the operation costs of the microgrid.
Energies 2020, 13, x FOR PEER REVIEW 12 of 15 the three cases, the operation cost of the microgrid decreases with the increase of the energy storage capacity. The stochastic optimization method is compared with the conventional deterministic optimization method in this paper. Table 4 shows the operation cost of the microgrid and the rate of abandoned energy from the wind turbine for both methods under three cases in scenario 10. In Table  4, SO and DO represents stochastic optimization and deterministic optimization. aw μ represents the rate of abandoned energy from the wind turbine, which is calculated as follows: As shown in Table 4, the operation cost of the microgrid with the stochastic optimization method is lower than that with deterministic optimization method in all three cases. The rates of the abandoned energies from the wind turbine, which are greater than 0 with the deterministic optimization method, are all 0 with the stochastic optimization method in all three cases. Compared with the above results, we can see that the operation strategy of the microgrid with the stochastic optimization method is not only conducive to the absorption of renewable energy but also can effectively reduce the operation costs of the microgrid.   the three cases, the operation cost of the microgrid decreases with the increase of the energy storage capacity. The stochastic optimization method is compared with the conventional deterministic optimization method in this paper. Table 4 shows the operation cost of the microgrid and the rate of abandoned energy from the wind turbine for both methods under three cases in scenario 10. In Table  4, SO and DO represents stochastic optimization and deterministic optimization. aw μ represents the rate of abandoned energy from the wind turbine, which is calculated as follows: As shown in Table 4, the operation cost of the microgrid with the stochastic optimization method is lower than that with deterministic optimization method in all three cases. The rates of the abandoned energies from the wind turbine, which are greater than 0 with the deterministic optimization method, are all 0 with the stochastic optimization method in all three cases. Compared with the above results, we can see that the operation strategy of the microgrid with the stochastic optimization method is not only conducive to the absorption of renewable energy but also can effectively reduce the operation costs of the microgrid.

Conclusions
This paper puts forward the operation optimization strategy of a microgrid with a micro-gas turbine, wind farm, electrical storage devices, and demand response program to participate in the day-ahead electrical market. The stochastic volatility of the renewable energy output, electrical power price, and load is introduced into the model. The stochastic optimization method is used to solve the model. The results show that, when the microgrid implements the demand response, the operation cost of the microgrid decreases by 4.17%. Meanwhile, the demand response program transfers the peak load of the high-price period to the low-price period, which reduces the peak valley difference of the load and stabilizes the load curve. Finally, a sensitivity analysis of the three factors is carried out. With the increase of the demand response adjustable ratio or the maximum capacity of the electrical storage devices, the operation cost of the microgrid decreases. With the increase of the demand response cost, the operation cost of the microgrid increases and, finally, tends to the cost without the demand response in case 1. This shows that the demand response cost has a reasonable pricing range to maximize the value of the demand response.
In recent years, with the practice and popularization of the combined cooling heating and power (CCHP) microgrid, this research can be extended to study the strategy of the CCHP microgrid participating in the electricity market. A demand response program can be applied to a hot demand and cold demand to study the optimal operation strategy of the CCHP microgrid.

Conclusions
This paper puts forward the operation optimization strategy of a microgrid with a micro-gas turbine, wind farm, electrical storage devices, and demand response program to participate in the day-ahead electrical market. The stochastic volatility of the renewable energy output, electrical power price, and load is introduced into the model. The stochastic optimization method is used to solve the model. The results show that, when the microgrid implements the demand response, the operation cost of the microgrid decreases by 4.17%. Meanwhile, the demand response program transfers the peak load of the high-price period to the low-price period, which reduces the peak valley difference of the load and stabilizes the load curve. Finally, a sensitivity analysis of the three factors is carried out. With the increase of the demand response adjustable ratio or the maximum capacity of the electrical storage devices, the operation cost of the microgrid decreases. With the increase of the demand response cost, the operation cost of the microgrid increases and, finally, tends to the cost without the demand response in case 1. This shows that the demand response cost has a reasonable pricing range to maximize the value of the demand response.
In recent years, with the practice and popularization of the combined cooling heating and power (CCHP) microgrid, this research can be extended to study the strategy of the CCHP microgrid participating in the electricity market. A demand response program can be applied to a hot demand and cold demand to study the optimal operation strategy of the CCHP microgrid.