A Unified Trading Model Based on Robust Optimization for Day-Ahead and Real-Time Markets with Wind Power Integration

: In a conventional electricity market, trading is conducted based on power forecasts in the day-ahead market, while the power imbalance is regulated in the real-time market, which is a separate trading scheme. With large-scale wind power connected into the power grid, power forecast errors increase in the day-ahead market which lowers the economic efﬁciency of the separate trading scheme. This paper proposes a robust uniﬁed trading model that includes the forecasts of real-time prices and imbalance power into the day-ahead trading scheme. The model is developed based on robust optimization in view of the undeﬁned probability distribution of clearing prices of the real-time market. For the model to be used efﬁciently, an improved quantum-behaved particle swarm algorithm (IQPSO) is presented in the paper based on an in-depth analysis of the limitations of the static character of quantum-behaved particle swarm algorithm (QPSO). Finally, the impacts of associated parameters on the separate trading and uniﬁed trading model are analyzed to verify the superiority of the proposed model and algorithm.


Introduction
In a conventional day-ahead electricity market, in order to obtain the minimum purchase cost, bidding is organized according to the load forecast and security constraints.After the day-ahead market is closed, the real-time market is organized typically within 1 h before the operating hour based on the very short-term load forecast by taking into account the constraints such as power network topology, generators' operation, and so on.Participants can bid their upward regulating power or downward regulating power as well as their prices in the real-time market.Then bids are accepted so that the minimum regulating cost and power balance are ensured for the next period without grid congestions in the real-time market.The above electricity market operational mechanism has been widely used.Similar mechanisms and frameworks have been built in China, where electricity markets are not fully deregulated and the main market participants are conventional generators at present.
With the increasing connection of wind power to the grid, more uncertain factors emerge in the power system, and electricity trading is becoming more complicated [1,2].A number of studies have investigated the impacts of large-scale wind power integration on the day-ahead market [3][4][5][6].In [3], a two-stage stochastic programming model is used to clear the day-ahead market, instead of deterministic models, for handling uncertainties better.The impact of wind power on the day-ahead market prices in the PJM electricity market is examined by using robust economic models and statistical inference [4].Furthermore, the impacts of demand response and wind power on the day-ahead market prices are described in [5,6].The day-ahead scheduling with wind power is presented in [7][8][9].When a large amount of intermittent renewable energy is connected to the grid, the higher ramping capability of dispatchable generation is required.An improved day-ahead scheduling is therefore proposed by taking multiple-period ramping capability into account [7].The authors in [8] demonstrate a chance-constrained stochastic programming model for the day-ahead scheduling, taking into account load forecast errors, stochastic renewable sources, and random outages of the power system components.Robust optimization is suggested in [9] because of the randomness of the wind generation.The above summarized literature focuses on reforming approaches to the day-ahead electricity markets.
On the other hand, for the real-time market, reference [10] optimizes the cost of the dispatchable generators' regulating power and forecast errors of wind power based on the fact that wind speed fits the normal distribution in a short-period.The authors in [11] review advanced typical real-time markets respectively in the North America, Australia, and Europe for integrating renewable energy and demand response in electricity markets.It also explains the classical market architecture which contains the independent day-ahead and real-time markets.In [12], the day-ahead and real-time markets are treated separately; firstly, the day-ahead market is cleared; then the real-time market is modeled on the basis of the day-ahead market clearing results.The analysis indicates that the real-time market is helpful for reducing the uncertainty of wind power and the demand of operating reserves, thereby making power system operation more economical.
In the above literature, electricity trading activities in the day-ahead and real-time markets are considered independent of each other in the power system with high wind power penetration.In the separate trading scheme, energy trading is performed in the day-ahead market according to the difference between the hourly load forecast and wind power forecast to make full use of wind power, while imbalance power is dealt with in the real-time market through real-time prices that are typically different from the day-ahead market prices.Because of the strong randomness of wind power, imbalance power increases greatly in the real-time market, which makes the separate trading scheme not optimal.One possible way of improving the market efficiency is to combine the separate trading activities in the day-ahead and real-time markets into one unified optimum strategy which includes the forecasts of real-time prices and imbalance power into the day-ahead trading scheme.The combination has already been applied in strategic bidding to maximize the benefit of market participants such as virtual power plants , micro-grids, and wind farms [13,14], which did not discuss how to build a unified trading model from the market operators' point of view yet.The authors in [15] establish the day-ahead market clearing model considering the mean adjustment cost of the real-time market, which is calculated based on definite cost coefficients of thermal generators instead of uncertain clearing prices.In [16], a unified market for the day-ahead and real-time markets is proposed for the dispatch strategy of VPP, which utilizes definite real-time prices.In fact, the forecasted real-time prices are uncertain due to the fact that it is difficult to predict real-time prices accurately and obtain their correct probability distribution function since they are always subject to many factors, such as uncontrolled market conditions, balance between supply and demand, flow congestion, and so on [17][18][19].So this optimum strategy may be unrealistic if we use fixed prices in the unified trading model.Moreover, the increase of wind power penetration in a power system will make the performance even worse due to the increased fluctuation of both the imbalance power and the corresponding real-time prices.To improve the unified trading model further, the real-time market price needs to be regarded as a random variable without an explicit probability distribution.Now there are three optimization approaches for dealing with stochastic variables: stochastic optimization, fuzzy optimization, and robust optimization.The stochastic optimization method works only when the variables' probability distribution functions are known a priori, while the fuzzy optimization method needs more information to convert fuzzy problems into clear ones, and the solutions may not be single.Compared to those two, the robust optimization method is effective even when only the interval of a stochastic variable is known rather than its probability distribution function.Although the solution derived via robust optimization is a little conservative, it is a feasible solution no matter how the stochastic variables change.The robust optimization has recently been widely applied in different areas [9,18,20].So this paper proposes a robust optimization-based approach to address the optimality challenge of the unified trading scheme.
The main contributions of this paper are as follows: (1) A unified trading model of the day-ahead and real-time markets based on robust optimization is described considering the uncertainty of the load, wind power, and real-time market price, where the hourly purchase power is regarded as an optimized variable instead of forecast in the day-ahead market.(2) The static character of the quantum-behaved particle swarm algorithm (QPSO) is analyzed to show its limitations in solving the problem and an improved QPSO algorithm (IQPSO) is presented.(3) In order to demonstrate the superiority of the robust unified trading model, we compare it with a separate trading scheme in the day-ahead and real-time markets.Additionally, an analysis is conducted to examine the impacts of several key influencing factors on the trading results, including the robust coefficient, forecast accuracy of wind power, load, and real-time market price.
The rest of the paper is organized as follows.The unified trading scheme is presented in Section 2. The unified trading model based on robust optimization is formulated in Section 3. IQPSO is introduced in Section 4. The numerical results are presented and analyzed in Section 5 and the conclusions are drawn in Section 6.

Scheme of Unified Trading with Wind Power
Wind power forecast accuracy is relatively low because of the randomness and fluctuation of wind power.Given that the short-term forecast error is about 5% to 20% [21], the increasing demand of imbalance power in the real-time market with large-scale wind power is foreseeable.This paper will brush aside the power imbalance caused by reliable factors' change in the power grid, such as accidental outages, generators' forced outages, and so on, to highlight its research emphasis.The power imbalance is taken into account as shown in Equation (1): The load forecast error at time t is presumed to be normally distributed [22], as shown below: The wind power forecast error at time t is also presumed to be normally distributed [23], as shown below: In the separate trading scheme, energy trading is executed in the day-ahead market according to the value is the equivalent load forecast at time t in the day-ahead market, and also equals the purchase power forecast at time t when neglecting power loss.Then in the real-time market, upward regulating power is purchased when the system imbalance power is insufficient at time t (i.e., ∆P r (t) > 0), and downward regulating power is sold when the system imbalance power is excessive at time t (i.e., ∆P r (t) < 0) in order to adopt more wind power.
The above trading scheme does not consider the organic combination of the day-ahead and real-time markets, and the purchase cost is not optimal, nor is the generators' power settlement.In particular, randomness and low forecast accuracy of wind power may generate bigger errors of bidding power at time t based on P f r (t) when plenty of wind power is integrated, which will result in a higher purchase cost during a power shortage or a lower sale revenue during a power surplus in the real-time market.Since there is a higher cost for the separate trading scheme, we can unify the day-ahead and real-time trading into a corporate trading scheme where the purchase power at time t in the day-ahead is P o r (t) which needs to be optimized and is a decision variable rather than P f r (t) in the day-ahead market.For the unified trading scheme, ∆P r (t) is presented as follows: where P o r (t) is the decision variable to be optimized, i.e., the equivalent load, and also equals the purchase power at time t in the day-ahead market when the power loss is omitted.
The probability distribution for ∆P r (t) in the unified trading scheme is: The day-ahead and real-time markets are combined closely through optimizing P o r (t) instead of P f r (t), which will reduce the total trading cost.

Objective Function
Nowadays, there are two types of market price: the Market Clearing Pay (MCP) and Pay As Bid (PAB).This paper clears the unified trading by MCP.
In the day-ahead market, the purchase cost C D is given by: where each time interval is one hour, and hourly power is the numeric equivalent of energy.
The system imbalance power is random due to the randomness of forecast errors of wind power and load in the real-time market.Since market operators cannot estimate the system imbalance power accurately in the day-ahead market, it is hard to predetermine whether the system imbalance power is positive or negative.Alternatively, the purchase cost or sales revenue in the real-time market can be calculated by the probability distribution and expectation of ∆P r (t).
If the system imbalance power is surplus at time t in the real-time market, market operators have to sell the imbalance power that is bought in the day-ahead market.Because market operators have already paid generators according to the clearing prices and energy bids in the day-ahead market, market operators will obtain the revenue R RD through selling the surplus power as shown in Equation (11): Of course, market operators may abandon wind power in the above case.
If the system imbalance power is insufficient at time t in the real-time market, market operators have to purchase the imbalance power.The purchase cost C RU is presented as follows: Generally, the condition ρ + r (t) ≥ ρ d (t) ≥ ρ − r (t) needs to be fulfilled in order to reduce imbalance power in the real-time market [14].β + (t) and ∆P r (t) + have the same probability of occurrence; the probability of occurrence of β − (t) and ∆P r (t) − is also equivalent.
According to Equation (9), we have: where u r (t ; and Φ(x) is a normal distribution function.The objective function of the unified trading model is presented as follows: Although these random variables ρ + r (t) and ρ − r (t) cannot be described by definite probability distributions, their reasonable interval ranges can be determined based on statistical data and forecast results.According to these ranges, ρ + r (t) and ρ − r (t) are modeled as independent, symmetric, and bounded random variables (with unknown distribution) as follows: The two variables take the values respectively in and ρ − r (t) are random variables without the determined probability distribution, we can only construct the model by robust optimization instead of stochastic optimization.
According to Equations ( 11) and ( 20), we have: According to Equations ( 12) and ( 18), we have: As the robust optimization gets its solution in the worst situation, the trading cost function in the real-time market is presented as follows: According to Equations ( 17) and ( 24), the objective function of the unified trading model of the day-ahead and real-time markets is described as follows: The box space based on Equations ( 18)-( 21) will lead to the most conservative solution.Although each parameter may reach its boundary value, in fact, it is almost impossible to reach the respective boundary simultaneously which is decided by the central limit theorem.So an additional constraint is added in Equation ( 26): where each random variable is the same as the forecast value without deviation when Γ = 0.The bigger the Γ, the higher the degree of uncertainty will be.However, theoretically, Γ can take any value, but this paper chooses a more reasonable value in light of the central limit theorem [24].|z + (t)| and |z − (t)| cannot be expressed by determining the probability distributions because ρ + r (t) and ρ − r (t) are random variables without a determined probability distribution.We cannot choose any biased probability distribution function against those random variables without a definite probability distribution.So |z + (t)| and |z − (t)| are presumed to be uniformly distributed in [0, 1].According to the central limit theorem, Γ is calculated as shown in Equation ( 27): If N t = 24, J = 48, and if µ z = 0.5, then According to Equation (25), it is very difficult to solve this model which is a Min-Max optimization problem.Therefore, we use the nonlinear duality theory to convert the maximum optimization problem of the real-time market into the minimum optimization problem.
Based on the nonlinear duality theory, we assume the original problem is: where x = [x 1 , x 2 . . .x n ] is an n-dimensional optimization variable; and g(x) = [g 1 (x), g(x) . . .g m (x)] T are the set of constraints.Its dual problem is: x 2 , ...
According to the deduction, Equation ( 24) can be converted into the standard form of Equation ( 29) as follows: where z + (t) and z − (t) symbolize x.
The partial derivatives with respect to x are deduced according to Equation (29).However, Equation (30) contains the absolute values of z + (t) and z − (t), and we need to introduce the piecewise functions as follows: Furthermore, Equation (30) can be converted into: where According to Equations ( 25) and (32), we have: Now the objective function belongs to the minimum optimization problem.

Constraints
The power balance in the day-ahead market is: The power balance in the real-time market is: The capacity limits of conventional generators in the day-ahead market are expressed as: The capacity limits of conventional generators in the real-time market are expressed as: The ramping rate limits of conventional generation are expressed as: The AC flow constraint is formulated as shown in Equation (40):

QPSO Introduction
The Particle Swarm Optimization (PSO) is characterized as a simple heuristic of a well-balanced mechanism with robust search ability and fast computation, which is widely used to solve power system optimization problems [25,26].However, once it traps in the local optimum, it is hard to break away from the local optimum.In order to improve the global search ability, the quantum-behaved particle swarm optimization algorithm (QPSO) according to quantum mechanics was proposed in 2004 [27].
The state of the particle for QPSO is determined by the wave function.Particles' move can be obtained according to the following Equations: (41) where µ(h) takes a value from [0, 1].If µ(h) > 0.5, then " ±" becomes "+", otherwise it becomes "−".α is the only parameter for QPSO except for the number of iterations and the population size.QPSO has a strong global search ability and a low convergence speed when α is large.When α is small, QPSO has a strong local search ability and a high convergence speed.Particles will move to P i during the search process.QPSO does not need the velocity information of particles.It has simpler evolution equations, less control parameters, faster convergence speed, and a simpler operation than PSO.

IQPSO
Although QPSO is superior to the standard PSO, it does not always guarantee the discovery of globally optimal solutions when the dimensions of a particle are large by the tests.In the next paragraph we will analyze the static character of QPSO and discuss its shortcomings compared to the improved method proposed in this paper.
For simplicity, this paper tests the static character of a particle in one-dimensional space since the multidimensional variable can be formed by multi and independent one-dimensional variables.Some parameters take the following values: mbest = 0, P i = 0, X i (1) = 100, and α = 1.According to Equation (41), we test X i (2) 100,000 times at random and obtain the frequency distribution histogram of X i (2) as shown in Figure 1.
Figure 1 illustrates: (1) The upward search ability of QPSO is limited because the probability of X i (2) > 70 is zero.Meanwhile, the downward search ability of QPSO is limited because the probability of −70 < X i (2) < 0 is zero.There are dead-band searching problems for QPSO and the dead zones vary with the number of iterations.(2) There is a higher convergence speed when the optimal solution is close to the lower boundary because the static character of QPSO is asymmetric on both sides of P i and there is a lower convergence speed when the optimal solution is close to the upper boundary.(3) There are different dead zones for every iteration and a particle needs at least two iterations in order to search the dead-band space, which reduces the search ability and increases the number of iterations when the optimal solution is in the dead-band space.
Since every dimension has dead zones during the iteration of every multi-dimensional particle, the dead zones grow in size and number with the increase of dimensions.The search range of the population is the union of the search ranges of all particles while iterating.When a particle has less dimensions, the dead zones decrease in size and number, which makes it easier to cover the whole search space by the union of the search ranges of all particles, leading to better convergence performance of the algorithm.When the population size remains the same, the increased dimensions of a particle increase dead zones in size and number, which brings about the difficulty in achieving coverage for the whole search space by the union of the search ranges of all particles, causing worse convergence performance of the algorithm.In order to enhance the convergence performance of QPSO, this paper proposes improvements in the static character since it suffers from the above analyzed shortcomings, meeting the following conditions: (1) There is no dead zone.
(2) It is symmetric on both sides of Pi.
(3) There is higher search probability in the neighborhood of Pi to guarantee the local search ability, and there is a certain search probability even if the space is far away from Pi to guarantee the global search ability by mutating.
In summary, in the proposed IQPSO method, Equation (41) is replaced by Equation (44) as follows: Assuming that the same test is applied, the improved frequency distribution histogram of Xi( 2) is shown in Figure 2. It can be seen that, compared to Figure 1, the requirements of the static character are dramatic.

Programming of IQPSO
The contraction-expansion coefficient α affects the convergence performance of QPSO.At the beginning of an iteration process, the algorithm must have the global search ability, and at the end of In order to enhance the convergence performance of QPSO, this paper proposes improvements in the static character since it suffers from the above analyzed shortcomings, meeting the following conditions: (1) There is no dead zone.
(2) It is symmetric on both sides of P i .
(3) There is higher search probability in the neighborhood of P i to guarantee the local search ability, and there is a certain search probability even if the space is far away from P i to guarantee the global search ability by mutating.
In summary, in the proposed IQPSO method, Equation (41) is replaced by Equation (44) as follows: Assuming that the same test is applied, the improved frequency distribution histogram of X i (2) is shown in Figure 2. It can be seen that, compared to Figure 1, the requirements of the static character are dramatic.In order to enhance the convergence performance of QPSO, this paper proposes improvements in the static character since it suffers from the above analyzed shortcomings, meeting the following conditions: (1) There is no dead zone.
(2) It is symmetric on both sides of Pi.
(3) There is higher search probability in the neighborhood of Pi to guarantee the local search ability, and there is a certain search probability even if the space is far away from Pi to guarantee the global search ability by mutating.
In summary, in the proposed IQPSO method, Equation (41) is replaced by Equation (44) as follows: Assuming that the same test is applied, the improved frequency distribution histogram of Xi( 2) is shown in Figure 2. It can be seen that, compared to Figure 1, the requirements of the static character are dramatic.

Programming of IQPSO
The contraction-expansion coefficient α affects the convergence performance of QPSO.At the beginning of an iteration process, the algorithm must have the global search ability, and at the end of

Programming of IQPSO
The contraction-expansion coefficient α affects the convergence performance of QPSO.At the beginning of an iteration process, the algorithm must have the global search ability, and at the end of an iteration process, the algorithm must have the local search ability.To meet this requirement, α changes with the number of iterations as follows [28]: The major steps are described as follows: (1) Some parameters are set such as ε, maxgen, M, and β z .
(2) The population with the dimensions of N t × N j is initialized.
(3) h is set equal to 1.
(4) The fitness value C U (i) of particle i is calculated, according to Equation ( 25).

Test System Data
A numerical case for evaluating the proposed model and algorithm is performed on an IEEE 30-bus system.The thermal generators' parameters are shown in Table 1.Hourly load forecast and wind power forecast are shown in Figure 3 p j (t) = b j (t) + a j (t)P j (t) ($/MW) where b j (t) and a j (t) are shown in Figures 6 and 7, respectively.an iteration process, the algorithm must have the local search ability.To meet this requirement, α changes with the number of iterations as follows [28]: ( ) The major steps are described as follows: (1) Some parameters are set such as ε, maxgen, M, and βz.
(2) The population with the dimensions of Nt × Nj is initialized.
(3) h is set equal to 1.
(4) The fitness value CU(i) of particle i is calculated, according to Equation ( 25).
(5) The best previous personal position Pbesti and the best personal fitness value fPbesti of particle i are obtained, and the global best position Gbest and the global best fitness value fGbest are obtained.( 6) If max[CU(i)] − min[CU(i)] < ε or h = maxgen, it proceeds to step (11), otherwise to step (7).( 7) Pi and mbest are calculated according to Equations ( 42) and ( 43). ( 8) α is calculated according to Equation ( 45).(9) The position of particle i is updated according to Equation (44).( 10) h = h + 1, and then it proceeds to step (4).(11) The global best position Gbest and the global best fitness value fGbest are obtained.

Test System Data
A numerical case for evaluating the proposed model and algorithm is performed on an IEEE 30-bus system.The thermal generators' parameters are shown in Table 1.Hourly load forecast and wind power forecast are shown in Figure 3 where bj(t) and aj(t) are shown in Figures 6 and 7, respectively.

Algorithm Comparison
According to the above robust optimization model and case parameters, the results are shown in Table 2 with a comparison between QPSO and IQPSO.

Comparison of Purchase Power in the Day-Ahead Market for the Unified and Separate Trading
The optimal purchase power schedule for the unified and separate trading schemes in the day-ahead market is shown in Table 3 with IQPSO applied to achieving the optimal solutions.In Table 3, UT is short for the unified trading and ST is short for the separate trading.On the basis of the above parameters, the hourly total purchase power P o r (t) is less when applying UT than the amount P f r (t) when applying ST.

Algorithm Comparison
According to the above robust optimization model and case parameters, the results are shown in Table 2 with a comparison between QPSO and IQPSO.

Algorithm Comparison
According to the above robust optimization model and case parameters, the results are shown in Table 2 with a comparison between QPSO and IQPSO.

Comparison of Purchase Power in the Day-Ahead Market for the Unified and Separate Trading
The optimal purchase power schedule for the unified and separate trading schemes in the day-ahead market is shown in Table 3 with IQPSO applied to achieving the optimal solutions.In Table 3, UT is short for the unified trading and ST is short for the separate trading.On the basis of the above parameters, the hourly total purchase power P o r (t) is less when applying UT than the amount P f r (t) when applying ST.

Comparison of Purchase Power in the Day-Ahead Market for the Unified and Separate Trading
The optimal purchase power schedule for the unified and separate trading schemes in the day-ahead market is shown in Table 3 with IQPSO applied to achieving the optimal solutions.In Table 3, UT is short for the unified trading and ST is short for the separate trading.On the basis of the above parameters, the hourly total purchase power P o r (t) is less when applying UT than the amount P f r (t) when applying ST.

Impact Analysis Price Forecast in the Real-Time Market
The comparison between P o r (t) and P f r (t) in the day-ahead market is further shown in Figure 9 with different prices in the real-time market.

Impact Analysis of Price Forecast in the Real-Time Market
The comparison between P o r (t) and P f r (t) in the day-ahead market is further shown in Figure 9 with different prices in the real-time market.3. Following an increase of the purchase power prices in the real-time market, the re-derived P o r (t) (dashed line) becomes higher than the baseline value P f r (t).While increasing the sale power prices in the real-time market, the re-derived P   As the robust optimization focuses on the worst performance of the real-time market, the total purchase cost of the real-time market will increase when increased er (i.e., the price forecast deviation ratio at time t in the real-time market) makes the purchase environment worse; meanwhile, the total sale revenue of the real-time market will decline so that the purchase power strategies of the day-ahead market are more conservative, which reduces the difference between P f r (t) (solid line with circle ) and P o r (t) (dashed line) when er increases, according to Figure 10.The comparison between P o r (t) (dotted line) and P f r (t) (solid line with dot) is shown in the baseline scenario as explained in Figure 4, where P o r (t) < P f r (t), as seen in Table 3.Following an increase of the purchase power prices in the real-time market, the re-derived P o r (t) (dashed line) becomes higher than the baseline value P f r (t).While increasing the sale power prices in the real-time market, the re-derived P o r (t) (solid line) is lower than P f r (t) and P o r (t) (dotted line).As the robust optimization focuses on the worst performance of the real-time market, the total purchase cost of the real-time market will increase when increased er (i.e., the price forecast deviation ratio at time t in the real-time market) makes the purchase environment worse; meanwhile, the total sale revenue of the real-time market will decline so that the purchase power strategies of the day-ahead market are more conservative, which reduces the difference between P f r (t) (solid line with circle ) and P o r (t) (dashed line) when er increases, according to Figure 10.As the robust optimization focuses on the worst performance of the real-time market, the total purchase cost of the real-time market will increase when increased e r (i.e., the price forecast deviation ratio at time t in the real-time market) makes the purchase environment worse; meanwhile, the total sale revenue of the real-time market will decline so that the purchase power strategies of the day-ahead market are more conservative, which reduces the difference between P f r (t) (solid line with circle ) and P o r (t) (dashed line) when e r increases, according to Figure 10.
The decrease of Γ the confidence level β z and facilitates the better economic environment of the real-time market, which increases the difference between P f r (t) and P o r (t) (dotted line), leaving more power for trading in the real-time market.
According to Figure 9, P o r (t) < P f r (t) when ρ + ru (t) and ρ − rd (t) remain unchanged, showing that the economic environment for selling power is worse than for purchasing power in the real-time market, so that it is necessary to reduce P o r (t) (solid line with star) in order to reduce the sale power in the real-time market with the increase of σ r (t).On the other hand, the power for trading in the real-time market increases because the increase of σ r (t) reduces the accuracy of the purchase power forecast.For these two reasons, the difference between P f r (t) and P o r (t) (solid line with star) increases (i.e., P o r (t) decreases) with the increase of σ r (t), as illustrated in Figure 10.
The impact of Γ on the total purchase power cost is shown in Figure 11, which shows that the total cost of the separate trading scheme (dotted line) is higher than the unified trading scheme (solid line).The decrease of Γ reduces the confidence level βz and facilitates the better economic environment of the real-time market, which increases the difference between P f r (t) and P o r (t) (dotted line), leaving more power for trading in the real-time market.
According to Figure 9, P o r (t) < P f r (t) when ρ + ru (t) and ρ − rd (t) remain unchanged, showing that the economic environment for selling power is worse than for purchasing power in the real-time market, so that it is necessary to reduce P o r (t) (solid line with star) in order to reduce the sale power in the real-time market with the increase of σr(t).On the other hand, the power for trading in the real-time market increases because the increase of σr(t) reduces the accuracy of the purchase power forecast.For these two reasons, the difference between P f r (t) and P o r (t) (solid line with star) increases (i.e., P o r (t) decreases) with the increase of σr(t), as illustrated in Figure 10.
The impact of Γ on the total purchase power cost is shown in Figure 11, which shows that the total cost of the separate trading scheme (dotted line) is higher than the unified trading scheme (solid line).The increase of Γ increases the total costs because the stronger robustness and the higher confidence level βz lead to considering worse scenarios.In addition to that, it can be seen that the growth rate of the total cost of the unified trading becomes slower with the increase of Γ.According to Figure 9, P o r (t) < P f r (t) when ρ + ru (t) and ρ − rd (t) are kept the same as the prices in Figure 4, which shows that a portion of the purchase power is transferred to the real-time market from the day-ahead market, leaving more power to be purchased and less power to be sold in the real-time market.In this case, the impact of ( ) on the total cost is bigger than the impact of ( ) is taken into account in the robust optimization while Γ continues to increase.As mentioned above, the total cost is less affected when the sale power is reduced, resulting in the curve slowing down at the end.In separate trading, the impact of the economic environment for purchasing power on the total cost is the same as that for the selling power because the power forecast errors are symmetrical, which leads to a smoother cost curve.
The total costs are shown in Table 4 when σr is multiplied based on the data in Figure 5 and Γ = 28.1.The increase of Γ increases the total costs because the stronger robustness and the higher confidence level β z lead to considering worse scenarios.In addition to that, it can be seen that the growth rate of the total cost of the unified trading becomes slower with the increase of Γ.According to Figure 9, P o r (t) < P f r (t) when ρ + ru (t) and ρ − rd (t) are kept the same as the prices in Figure 4, which shows that a portion of the purchase power is transferred to the real-time market from the day-ahead market, leaving more power to be purchased and less power to be sold in the real-time market.In this case, the impact of ρ + r (t) on the total cost is bigger than the impact of ρ − r (t).The robust optimization works in the worst case of the real-time market, which will firstly consider the highest ρ + r (t) so that the total cost increases quickly until ρ + r (t) reaches the maximum and then a smaller ρ − r (t) is taken into account in the robust optimization while Γ continues to increase.As mentioned above, the total cost is less affected when the sale power is reduced, resulting in the curve slowing down at the end.
In separate trading, the impact of the economic environment for purchasing power on the total cost is the same as that for the selling power because the power forecast errors are symmetrical, which leads to a smoother cost curve.
The total costs are shown in Table 4 when σ r is multiplied based on the data in Figure 5 and Γ = 28.1.As shown in Table 4, the increase of σ r leads to the increase of both the total cost and the reduction ratio of cost.For the increase of the total cost, this is because the low power forecast accuracy results in more power for trading increases in the real-time market.For the reduction ration of cost, there are two reasons.Firstly, in the separate trading scheme, the energy trading is performed according to P f r (t) and the purchase cost is fixed in the day-ahead market in any case, but the power for trading increases greatly in the real-time market with the increase of σ r , making the total cost of the separate trading increase quickly in light of ρ + r (t) ≥ ρ d (t) ≥ ρ − r (t); Secondly, in the unified trading model, the energy trading is implemented based on P o r (t) in the day-ahead market and the power for trading increases slowly in the real-time market with the increase of σ r , which leads to less cost increase in the unified trading than that in the separate trading.In view of the above analysis, the unified trading model is superior to the separate trading model with the increase of σ r .In particular, the unified trading model is more advantageous when large-scale wind power is integrated into the grid.
The total costs are shown in Table 5 when e r changes and Γ = 28.1.As is seen in Figure 10, the difference between P f r (t) and P o r (t) decreases with the increase of e r , meaning that the total cost of the unified trading is closer to the total cost of the separate trading.Table 5 reports that the unified trading model with robust optimization is less advantageous because the economic environment for purchasing power is worse in the real-time market with the increase of e r .

Conclusions
The day-ahead and real-time markets are combined to form a unified trading scheme with wind power integration in this paper.The robust optimization model is adopted by taking into account the uncertainty of the real-time market prices, load, and wind power, and then IQPSO is proposed to solve the optimization problem.The conclusions are as follows: • The unified trading model based on robust optimization can optimize the purchase power in the day-ahead market and reduce the total cost for the two markets, which shows it is superior to the separate trading model due to large-scale wind power connected into the power systems.

•
It is that the IQPSO has a higher convergence speed and stronger global search ability when compared with the standard QPSO.
In addition, the impact analysis of each parameter is summarized as follows: The strategy of purchasing power in the day-ahead market is directly affected by the real-time price.The optimized purchase power will increase in the day-ahead market with higher purchase power prices and lower sale power prices in the real-time market and vice versa.
The unified trading model is superior when the power forecast errors become greater.
The lower the accuracy of the real-time market prices forecast, the worse the economic environment of the real-time market is.This reduces the economic efficiency of the unified trading model because the purchase strategy in the day-ahead market is more conservative.The economic efficiency of the unified trading model is degraded when the confidence level is higher with the increase of the uncertain operator Γ.We can use the rational value of Γ to improve the economic efficiency as much as possible, following the requirement of the confidence level.
A direction for further research will consider the units' startup and shutdown for the unified trading model and apply algorithms such as PSO, benders decomposition [20,29], genetic algorithm, and so on to solve the above optimization problem with comparisons in terms of the optimality, efficiency, and scalability.
. Purchase and sale power average prices forecast in the real-time market are shown in Figure 4. Standard deviations of hourly load forecast and wind power forecast are shown in Figure 5.According to Equation (27), Γ = 28.1.Other parameters take the following values: e r = 10%, β z = 0.98, maxgen = 2000, and M = 50.The thermal generators' quotation function is given as follows: . Purchase and sale power average prices forecast in the real-time market are shown in Figure 4. Standard deviations of hourly load forecast and wind power forecast are shown in Figure 5.According to Equation (27), Γ = 28.1.Other parameters take the following values: er = 10%, βz = 0.98, maxgen = 2000, and M = 50.The thermal generators' quotation function is given as follows:

Figure 3 .
Figure 3. Hourly load and wind power forecasts.

Figure 3 .
Figure 3. Hourly load and wind power forecasts.

Figure 4 .
Figure 4. Purchase and sale power price forecasts in the real-time market.

Figure 5 .
Figure 5.Standard deviations of the hourly load forecast and wind power forecast.

Figure 4 . 19 Figure 3 .
Figure 4. Purchase and sale power price forecasts in the real-time market.

Figure 4 .
Figure 4. Purchase and sale power price forecasts in the real-time market.

Figure 5 .
Figure 5.Standard deviations of the hourly load forecast and wind power forecast.

Figure 5 .
Figure 5.Standard deviations of the hourly load forecast and wind power forecast.

Figure 3 .
Figure 3. Hourly load and wind power forecasts.

Figure 4 .
Figure 4. Purchase and sale power price forecasts in the real-time market.

Figure 5 .
Figure 5.Standard deviations of the hourly load forecast and wind power forecast.

Figure 8
Figure 8 visualizes the convergence process of QPSO on the left-hand side and IQPSO on the right-hand side.It can be seen that IQPSO has the better global search ability while QPSO is trapped in the local optimum.

Figure 8 .
Figure 8. Convergence curves of the two algorithms (QPSO left IQPSO right)

Figure 8
Figure 8 visualizes the convergence process of QPSO on the left-hand side and IQPSO on the right-hand side.It can be seen that IQPSO has the better global search ability while QPSO is trapped in the local optimum.

Figure 8
Figure 8 visualizes the convergence process of QPSO on the left-hand side and IQPSO on the right-hand side.It can be seen that IQPSO has the better global search ability while QPSO is trapped in the local optimum.

Figure 8 .
Figure 8. Convergence curves of the two algorithms (QPSO left IQPSO right)

Figure 9 .
Figure 9. Impact of real-time prices on P o r (t) in the day-ahead market.
o r (t) (solid line) is lower than P f r (t) and P o r (t) (dotted line).

5. 5 .
Impact of σr, Γ, er P o r (t) in the day-ahead market is shown in Figure 10 when σr, Γ, and er change, respectively.

Figure 10 .
Figure 10.P o r (t) in the day-ahead market when σr, Γ, and er change, respectively.

Figure 9 .
Figure 9. Impact of real-time prices on P o r (t) in the day-ahead market.

5. 5 . 19 5. 4 .
Impact of σ r , Γ, e r P o r (t) in the day-ahead market is shown in Figure 10 when σ r , Γ, and e r change, respectively.Energies 2017, 10, 554 14 of Impact Analysis of Price Forecast in the Real-Time Market The comparison between P o r (t) and P f r (t) in the day-ahead market is further shown in Figure 9 with different prices in the real-time market.

Figure 9 .
Figure 9. Impact of real-time prices on P o r (t) in the day-ahead market.

5. 5 .
Impact of σr, Γ, er P o r (t) in the day-ahead market is shown in Figure 10 when σr, Γ, and er change, respectively.

Figure 10 .
Figure 10.P o r (t) in the day-ahead market when σr, Γ, and er change, respectively.

Figure 10 .
Figure 10.P o r (t) in the day-ahead market when σ r , Γ, and e r change, respectively.

Figure 11 .
Figure 11.The impact of Γ on the total cost.
optimization works in the worst case of the real-time market, which will firstly consider the highest ( )

Figure 11 .
Figure 11.The impact of Γ on the total cost.
The best previous personal position Pbest i and the best personal fitness value fPbest i of particle i are obtained, and the global best position Gbest and the global best fitness value fGbest are obtained.(6) If max[C U

Table 1 .
Parameters of the thermal generators.

Table 1 .
Parameters of the thermal generators.

Table 2 .
Optimal total cost of the two algorithms.

Table 2 .
Optimal total cost of the two algorithms.

Table 2 .
Optimal total cost of the two algorithms.

Table 3 .
Hourly optimal purchase for the unified and separate trading in the day-ahead market (MW).

Table 4 .
The impact σ r on the total costs.

Table 5 .
Impact of e r on the total purchase costs.
Purchase power/sale power price at time t in the real-time market ∆P r (t) + /∆P r (t) − Power shortage/power surplus expectation at time t in the real-time market β + (t)/β − (t) Probability of 'upward regulation'/'downward regulation' at time t in the real-time market u r (t) Difference between purchase power forecast and the optimized purchase power at time t σ r (t) Imbalance power standard deviation in the unified trading scheme at time t C U Total cost of the unified trading z = z + (t), z − (t) Random variables in [-1, 1] µ z Mean value of interval variables z + (t) and z − (t) σ z Standard deviation of interval variables z + (t) and z − (t) Vm/Vn Voltage magnitudes at bus m/bus n of line l θ mn Difference of voltage phase-angle between at bus m and bus n of line l Deviation ratio to the expected price in the real-time market δ + Deviation from the expected price at time t in the real-time market (t), b j (t) Thermal generators' quotation parameters of generator j at time t r (t)/δ − r (t)