1. Introduction
Compared with the medium-term and long-term market, the spot market of electric power mainly includes electricity commodity trading with finer time granularity within a few days before and during the day [
1], which can form a time-of-use electricity price reflecting the real production cost of commodities and represent the actual situation of power supply and demand. Thus, it can improve the timeliness of power resource allocation and play a vital role in the power market system [
2,
3].
With the issuance of the Notice on Carrying out the Pilot Work of Power Spot Market Construction by the National Development and Reform Commission (NDRC), the construction of China’s power spot market has officially started. As of June 2019, the first batch of eight power spot market pilot projects have all started their simulation test run, which indicates that the construction of a power spot market with Chinese characteristics has achieved positive results. Under the background of accelerating the construction of a power spot market, research on how to guide the reasonable decision-making of transaction participants can be conducive to not only achieving the maximum economic benefits of each subject, but also the entire market’s efficient allocation of resources, which can ensure the orderly economic operation of the spot market and has important theoretical significance and practical value [
4,
5,
6].
The spot market transaction mainly includes two kinds of participants: the power generation subject and power consumption subject. As the traditional thermal power units are more involved in the peak load regulation auxiliary service market [
7], the research on spot market decision-making for power generation focuses on renewable energy producers. However, renewable energy generation has the characteristics of being intermittent and uncertain, which leads to the failure of renewable energy generation companies to formulate transaction declaration strategies by the declaration model of conventional power generation enterprises. In view of the above problems, the literature [
8] assumes that wind power generation enterprises are the price receivers in the spot market, and fully considering the uncertainty of the wind turbine (WT) output and clearing price, the optimal output model of wind power plants by using stochastic simulation technology can be constructed. In [
9], based on the study in [
8], a penalty coefficient was introduced to punish the deviation between the real-time market output and daily market declared volume. Taking the maximum total profit as the objective function, a stochastic optimization model of wind power business in the two-stage market was constructed. This model fully considers multiple market stages and uncertain factors, further optimizing the declaration strategy of wind power suppliers.
In addition, with the progress of energy storage technology, a variety of energy storage system (ESS) has been continuously studied to reduce the renewable energy output’s uncertainty. In [
10,
11], by virtue of the ESS’s flexible charging and discharging function, the coupling between the ESS and the wind farm was realized. By establishing the linear affine function between the electricity market price, the wind power predicted output deviation, and the power of the ESS charge and discharge, the stochastic optimization declaration strategy of WT was proposed. In [
12], considering both the randomness of the wind power output and the uncertainty of the spot price, a hybrid power plant’s two-level stochastic optimization model consisting of wind power suppliers and electric vehicles was proposed, which could effectively reduce the bidding risk and increase the profit of the hybrid power plant.
In research on the spot market decision-making of consumers, the main goal is to minimize the purchase cost of the electricity sellers or large users. In [
13], a short-term planning model was proposed to predict the load curve under the real-time electricity price, which fully considers the fluctuation of the user load and market electricity price. A day-ahead decision-making model of the electricity sellers based on stochastic optimization was established. In the study by [
14], based on [
13], the demand response of sensitive users was introduced, considering the uncertainty of the spot price and the consumer behavior of users. The day-ahead market quotation strategy model of selling by the electricity supplier was constructed. In [
15,
16], based on robust optimization and stochastic mixed integer programming, the optimal power purchase decision-making and quotation decision-making models for the day-ahead market of selling by the electricity supplier were proposed.
The above research on the optimization decision of the spot market only involves a single subject and fails to form the link between the generation side and the power consumption side. As the link between the power load and distributed energy in a microgrid integrates multiple system resources, it can simultaneously carry out energy supply and demand response, realizing the efficient allocation of power resources, so it has unique advantages in the process of participating in the spot market. In [
17], aiming at maximizing the real-time market profit of the microgrid, each unit of the microgrid’s bidding strategies were studied under two bidding mechanisms. However, the demand response of the microgrid load was not considered and the users’ potential was not fully explored. In [
18], the price response model of a sensitive load was introduced. Aimed at minimizing the expected net cost, a hybrid stochastic robust optimization model was proposed. However, the penalty cost caused by an unbalanced power in the real-time market of microgrid was ignored, and research on the two-stage market transaction of day-ahead and real-time is lacking. To sum up, there have been a few studies on microgrids participating in spot market transactions, and there are still some deficiencies.
Compared with the existing research, the innovation of this paper lies in the following points. First, in the microgrid spot market decision-making issues, it fully considers the fluctuation of the stochastic micro-source output and spot market electricity price and discusses the economics and reliability of simultaneous optimization on both sides of supply and demand. Second, it employs stochastic simulation technology to transform the optimal scheduling problem into a problem with maximum system revenue under a certain confidence level and also uses the particle swarm optimization (PSO) algorithm to solve it effectively. Third, it optimizes the microgrid scheduling by changing the objective function and constraining the confidence level to meet the decision-makers of different risk preferences.
The rest of this manuscript is organized as follows. In
Section 2, considering the uncertain output of the WT and photovoltaic (PV), a microgrid energy management system integrating wind–PV–load-storage was established, which is the technical basis for building a two-stage scheduling model of a microgrid.
Section 3 discusses the process of the microgrid participating in the spot market, according to the operation rules of China’s power spot market and microgrid construction methods. On this basis, a microgrid two-stage optimal scheduling model based on the stochastic chance constraint was constructed, which takes the predicted power of renewable energy generation and the predicted price of the spot market as random variables. In
Section 4, the stochastic simulation technology is used to deal with the random variables in the model, and then a PSO algorithm suitable for solving this model is proposed.
Section 5 introduces the simulation results, verifies the validity of the model, and discusses the effect of demand side management and confidence level on scheduling results.
Section 6 highlights the main conclusions of this paper.
3. A Two-Stage Scheduling Model of a Microgrid Based on Chance-Constrained Programming in Spot Markets
3.1. The Mechanism of a Microgrid’s Participation in Spot Market Trading
Based on the research on the operation scheme and the simulated trial operation of power spot markets in Guangdong, Zhejiang, and the Western Economic Zone of Inner Mongolia, China’s power spot market operation pilot generally adopts the way of “day-ahead + real-time” for settlement. The day-ahead market starts on the day before the actual delivery of electricity, and power generation enterprises and power users sequentially declare the electricity price curve and the electricity demand curve. The electric power control center shall conduct Market clearing and settle according to the clearing results. The real-time market is the balance of forecasting errors in the day-ahead market, which is carried out before the actual delivery of electricity. The declaration of the market participants is similar to that of the day-ahead market. Finally, the power control center carries out real-time market clearing and settles the deviation power according to the real-time clearing price.
According to the Proposed Measures for Grid-connected Microgrid Construction issued by the State Energy Administration of China, a microgrid can be used as a power selling company with the distribution grid management right to participate in the spot market transactions of electric power. Therefore, the research object is the grid-connected microgrid that participates in the spot market transaction as the seller of electricity.
As the main seller of electricity, the microgrid participates in the spot market transaction including two settlement stages: day-ahead market and real-time market. The day-ahead market will be launched one day in advance, the microgrid will only declare the electricity, not price, and settle the electricity consumption curve according to the clearing result. Based on the actual operation results of the trading day, the real-time market will settle the deviation between the actual electricity consumption and the bid winning curve of the day-ahead market, according to the real-time price.
In addition, the State Energy Administration issued “the regulatory measures for the full purchase of renewable energy power by power grid companies”, which requires power grid companies to purchase all the on-grid power of renewable energy power generation enterprises except for the market trading power, which means that the extra power of new energy used for spontaneous self-use can be sold to power grid companies.
Therefore, the energy interaction between the microgrid and power grid involved in spot market transactions mainly includes the daily market declared power, real-time market deviation power, and on-grid power. At the same time, the microgrid will generate operating costs and electricity sales revenue, which will affect the total revenue. The settlement process of the microgrid participating in spot market transactions is shown in
Figure 2. It is necessary to fully consider the uncertainty of the spot market price and the randomness of the power supply output, and optimize and schedule various adjustable resources in the microgrid to maximize the benefits of participating in the spot market.
3.2. Microgrid Scheduling Model of Day-Ahead Market
3.2.1. Market Clearing Price Forecast
Since the market clearing electricity price can be expressed in the form of an equal time series, the autoregressive AR (p) model is introduced to predict the spot market price. Based on the foreign electricity market transaction data and related scholars’ research as well as the fact that the information criterion function can be used to select the order of the AR (p) model as 1, the clearing electricity price predicted by the day-ahead market can be expressed as:
where
and
are the market clearing electricity prices in the time period of
in the day-ahead market in the current day and the previous day, respectively;
is the average value of the market clearing electricity price in the time period of
in the day-ahead market;
is the autoregressive coefficient; and
is the white noise sequence with a mean of 0 and a variance of
.
3.2.2. Microgrid Day-Ahead Scheduling Model Based on Chance-Constrained Programming
In order to participate in spot market transactions, microgrid needs to consider many uncertain factors to achieve economic scheduling. As an important branch of stochastic programming theory, chance constrained programming allows the optimal scheduling results not to meet the constraints to some extent, but requires the probability of the constraints to be established not less than a certain level of confidence. Thus, we can deal with the random variables in microgrid scheduling by softening the constraints, which can be expressed as follows:
where
and
are the decision variables and the random variables, respectively;
is the objective function;
is the random chance constraint;
is the conventional constraint;
and
are the confidence levels; and
is the expected value of the objective function, that is, the minimum value of the objective function when the probability is not lower than
.
As for the microgrid, the day-ahead optimal scheduling embodies the maximum comprehensive expected income. In other words, the output of each system is optimized to form the optimal power demand curve for each period by accurately forecasting the load and the day-ahead clearing price in order to achieve the maximum profit in the day-ahead market competition. Therefore, the following chance-constrained programming model can be established. The superscript DA of all symbols in the first stage optimization model represents the day-ahead market stage and the superscript RT of all symbols in the second stage optimization model represents the real-time market stage.
(1) The objective function
where
is the market clearing income of the microgrid day-ahead market;
represents the revenue from the electricity sale of the microgrid in the
period (the object of electricity sale is the users);
represents the power purchase expenditure of the microgrid in the day-ahead market in the
period;
represents the proceeds from the sale of the remaining electricity of the microgrid to the grid company in the
period (the object of sale is the grid company);
and
are the users’ electricity price and the predicted response electricity in the time period of
, respectively;
and
are the market clearing electricity price and of the day-ahead market and the microgrid day-ahead declared power in the time period of
, respectively (
is the electricity purchase demand declared by the microgrid in the day-ahead market of the day before the trading day); and
and
are the microgrid on-grid electricity price and the predicted on-grid power in the time period of
, respectively.
(2) Constraints
3.3. The Real-Time Market Microgrid Scheduling Model
In the real-time market stage, penalty fees will be charged for the deviation between the actual purchased electricity in the real-time market and the declared electricity in the day-ahead market in order to encourage users to reasonably declare the day-ahead demand curve and prevent them from making profits by exploiting loopholes in the market rules. Therefore, in the process of participating in the real-time market, microgrids should consider the penalty fee of deviation power in addition to forecasting the electricity prices in order to achieve optimal scheduling. The optimal scheduling model (where the real-time electricity price forecasting methods and the conventional constraints are consistent with the day-ahead scheduling, and will not be described again) can be expressed as:
where
is the real-time market income based on the day-ahead market’s income;
is the deviation electricity penalty fee;
is the actual power consumption after the user participates in the demand response in the time period of
;
is the on-grid energy of the microgrid in the time period of
;
is the actual power purchased by the microgrid in the time period of
;
is the real-time market’s electricity price in the time period of
; and
is the unit electricity penalty fee.
4. The Solving of Model
In the first stage, two kinds of uncertain factors (i.e., clearing price and output of WT in the day-ahead market) are dealt with by using the prediction model and stochastic simulation method. Then, the PSO algorithm was used to find the optimal solution of each unit’s output and the declared electricity quantity in the day-ahead market, and the result was input to the next stage.
The second stage uses the same method to deal with the real-time market price and the output of the random power supply of the microgrid. Taking the optimization result of the first stage and the day-ahead market clearing price as the known quantity, we introduced the penalty cost of the electricity quantity’s deviation. Aimed at the maximum revenue, the PSO was used to obtain the optimal scheduling results of the microgrid in the real-time market. The specific solution methods of the first stage or the second stage are as follows:
4.1. Stochastic Simulation
In view of the existence of chance constraints in the established model, stochastic simulation technology was introduced to process variables, and the steps are as follows:
- (1)
Solve the objective function. (1) Randomly generate mutually independent variables (), according to the probability distribution of random variables in the objective function; (2) calculate a function value ; and (3) set , and the th maximum in is the target value according to the law of large numbers.
- (2)
Test the chance constraint. (1) Set ; (2) randomly generate a variable , according to the probability distribution of random variables in constraint conditions; (3) calculate , and , if it is less than or equal to 0; (4) after repeating steps (2) and (3) for n times, the constraint holds if .
4.2. Particle Swarm Optimization Algorithm
After dealing with random variables, the PSO based on the Monte Carlo simulation was used to solve the model. The specific process is as follows:
- (1)
Initialize data input. Input the deterministic values such as the controllable micro-source, battery cost parameters and load demand as well as confidence level and algorithm control parameters.
- (2)
Population initialization. With the output of WT and PV and the spot electricity price as random variables, random variables are generated from probability distribution to form an initial population in which all particles satisfy the constraint under the constraint condition test and by using the above random simulation technology, and the population position and velocity are initialized.
- (3)
The population target value is obtained as the fitness, and the individual extremum and global extremum are judged based on the fitness.
- (4)
Update the particle position and velocity. Iterative calculation is carried out to generate a new generation of particle swarms. The position and velocity are updated as follows:
where
is the inertia weight;
and
are the velocity and position of the
ith iteration of particle
, respectively;
and
are learning factors;
and
are random numbers between [0, 1]; and
and
are the individual extremum of the
ith iteration of particle
and the global extremum of the population, respectively.
- (5)
Repeat steps (2)–(4) to search for the optimal solution until the maximum iteration numb is reached. Output that optimal solution and the corresponding particle position.
Compared with deterministic programming problem solving, the solution method used in this paper first deals with the uncertain factors in the model. On this basis, the PSO algorithm, which can find the optimal solution in a certain range, was used to solve the model. The flow chart (
Figure 3) of the PSO algorithm combined with stochastic simulation technology can be shown as follows.
4.3. Convergence Test
In this paper, the PSO was improved by stochastic simulation technology to solve the two-stage optimal scheduling model of a microgrid based on chance-constrained programming. The convergence curve of the PSO can be shown in
Figure 4.