Medium and Long-Term Electricity Trading Considering Renewable Energy Participation

The medium and long-term electricity trading approach considering uncertain renewable energy participation is established based on the bi-level model in this paper. The upper-level is designed to maximize the profitability of power generation companies, while the lower-level aims to maximize the social welfare. Afterwards, a hybrid algorithm combining the discrete and continuous particle swarm optimization is proposed to solve the upper-level model, and the nonlinear programming method is used to address the lower-level model. Finally, verification is performed on the improved IEEE 39-bus system, and simulation results demonstrate that the proposed approach could indeed improve the profit of renewable energy as well as increase the social welfare of power generation enterprises.


I. INTRODUCTION
With increasingly prominent energy issues, renewable power generation has received more and more attention. It is expected that by 2050, photovoltaic and wind power generation will be the main part of China's energy resource. However, due to the uncertainty of wind power and photovoltaic power output, the curtailment of wind and photovoltaic power is significant, resulting in serious energy waste [1], [2]. At this stage, China is actively promoting the electricity market reform and encouraging renewable energy to participate in medium and long-term power trading, which can help to accommodate renewable energy and improve the economics and reliability of power systems [3], [4].
At present, a lot of research has been conducted on the power market considering renewable energy integration. The United States, Australia, United Kingdom, Italy, Netherlands, The associate editor coordinating the review of this manuscript and approving it for publication was Jenny Mahoney. and other countries [5], [6] implemented a renewable energy quota system. Literature [7] studied the impact of the US renewable energy quota system on the electricity market. Literature [8], [9] compared the two most widely used renewable energy price mechanisms and fixed on-grid tariff mechanism, and analyzed their advantages and disadvantages. Literature [10], [11] considered renewable energy and power demand-side response in a dynamic market mechanism for guiding users to develop power procurement plans. Literature [10] proposed a random decision model for power retailers under intermittent renewable energy and short-term demand response. Literature [12] used the big data technique to predict renewable energy output and proposed an energy management algorithm for energy internet. Literature [13] established a single auction market model to take into account the impacts of wind power participation on the clearing of electricity markets. In [14], the inaccurate power prediction may lead to inaccurate market price assessment, and authors revealed that the variation of wind power output would have various effects on the price of electricity markets. Literature [15] established a power market equilibrium model with two renewable energy policies simultaneously. A two-layer stochastic optimization model was proposed in [16] to optimize the renewable energy output and declared electricity price for effectively reducing system cost. Literature [17] suggested a series of feasible suggestions for the current power trading policy and power trading mechanism to optimize renewable energy consumption. However, most of the above work focuses on the establishment of equilibrium models, and there are few studies on medium and long-term power trading methods considering renewable energy participation.
Firstly, with the help of sequence operation algorithm for describing the uncertainty of wind power and photovoltaic power output, this paper proposes a medium and long-term power trading approach based on a bi-level model considering renewable energy participation. Then the bi-level model is solved by a hybrid particle swarms algorithm for the upper-level and nonlinear programming method for the lower-level. Finally, the improved IEEE39 node system is used to simulate and verify the validity and rationality of the proposed model and algorithm.

II. MEDIUM AND LONG-TERM ELECTRICITY TRADING
The medium and long-term electricity trading considering renewable energy cancellation is carried out on an annual and monthly basis. In specific, the annual transaction is generally conducted first and then the monthly trading is carried out. Both annual transactions and monthly transactions use centralized bidding.The annual trading is carried out year by year, and reporting data is the trading data for the next year. The monthly transaction is launched on a monthly basis. In combination with the annual transaction results and the power usage of the previous month, the power supply for the next month is pre-judged and a monthly transaction application is submitted. The filing data is the transaction data for the next month.
This medium and long-term power transaction is mainly for power generation enterprises and thermal power generation enterprises, which usually adopt a centralized matching algorithm to clear out. The medium and long-term electricity trading process with renewable energy participation is shown in Figure 1.
The concrete steps are as follows.
Step 1) In the medium and long-term electricity market, the power generation enterprises declare the bid power and bid price according to their own situation, while power users declare the bid power and bid price according to the electricity consumption of the previous stage. However, thermal power generation enterprises also need to report their output quotation, such as the start and repair cost, cold start cost and the constraints of the unit, to the electricity trading institutions. And renewable energy power generation enterprises also need to report their historical power generation data.
Step 2) Based on the information submitted by market members and the power system operation mode, the electricity trading organization constructs the clear model of renewable energy participating in medium and long-term electricity trading.
Step 3) The electricity trading organization adopts a reasonable algorithm to centrally solve the clear model of medium and long-term power transaction considering renewable energy participation.
Step 4) When the results are obtained, the electricity trading organization will feedback the clearing results to each market member through the trading platform, such as the market clear price and clear power amount.
Step 5) Determine whether the power transaction is closed. If no, market members will adjust the declared electricity price according to the clearing result and return to Step.3 to obtain a better market-clearing result.
Step 6) If the power transaction is closed, the power generation company and the power user confirm their transaction and sign a transaction contract.

III. BI-LEVEL PROGRAMMING MODEL
A newly bi-level programming model is proposed in this section. The upper-level is to maximize the profit of power generation enterprises, while the lower-level is to maximize the social welfare. With the premise of ensuring the system reliability, the power generation enterprise can adjust the declared electricity price to maximize its profit by measuring the satisfaction degree of its own income and constraints. VOLUME 8, 2020

A. OBJECTIVE OF UPPER-LEVEL PROGRAM
The maximum profit of the power generation enterprise is the objective of the upper program as follows.
where N C is the number of thermal power units; N SW represents the number of renewable energy generating units; T is the operating cycle; π i,t is the market clearing price of power generation enterprise i at time t; u i,t is the 0-1 variable for the on-off operation state of the unit i during the period t; P i,t is the power output of the unit i during the time period t; π SW ,t is the market clearing price of the renewable power generation enterprise at time t; β SW ,t is a 0-1 variable indicating whether renewable power is considerd at time t;P SW ,t is the total output of wind farm or photovoltaic power station at time t; C G i,t is the price of power generation enterprise i; F(P i,t ) is the output quotation function of the unit i at the time period t; S i,t is the starting cost of the unit i at the time period t; S R i,t is the cost of unit i for providing spare capacity for the period t; C i,t CO 2 is the CO 2 emission cost of the unit i during the period t; a i (> 0), b i and c i are the coefficients of the quotation function of unit i; α i are the start-up and maintenance costs; β i is the cold start cost; X off it is the time of the unit out of service; λ i is the unit cooling rate; c CO 2 is the unit CO 2 cost; e t G,i is the CO 2 emission of the unit i for its power output during the time period t; C D,i is the price for providing unit spare capacity at time period t; R i,t is the spare output at time period t.

B. CONSTRAINTS OF UPPER-LEVEL PROGRAM
The upper-level constraints include system load balance requirement, spinning reserve constraints, system key section power flow constraints, unit climbing constraints, the unit output limit and the continuous on and off time restrictions as follows.
Equation (3) is the system load balance constraint.
Equation (6) is the unit output limit constraint.
Equation (7) is the system key section power flow constraint.
Equation (8) is the unit ramp up and down climbing constraint.
Equation (9) is the power generation restriction constraint of the renewable power generation enterprise.
Equation (10) are unit continuously on and off time constraints.
where r is the system spinning reserve parameter; P i,min and P i,max are the lower and upper output limits of unit i; P up,i is the upward climbing rate of unit i per hour; N is the total number of units; G l→i represents the transfer distribution factor of unit i to line l; N SW is the total number of wind power and photovoltaic generator sets; G l→sw is the transfer distribution factor of wind power or photovoltaic generator set to line l; G l→k represents the transfer distribution factor of node load k to line l; K represents the number of node loads; D k,t is the load of node k at time period t; P l represents the active transmission capacity of section l; P down,i is the downward climbing rate of unit i; P min SW ,t and P max SW ,t represent the upper and lower limits of the renewable energy generator output. T on i and T off i are the minimum continuous on and off time of unit i; y i,t and z i,t are the 0-1 variables for unit i starting or shutting down at time period t.
When conducting an annual transaction, set T to 8760 hours in a year, and use the load forecast data for calculating the next year's results. When conducting monthly transactions, set T to 720 hours with an one-month operating cycle and use load forecasting data for calculating the next month's results. If the annual transaction is participated in advanced of the monthly transaction, the lower limit of the unit output in formula (6) during the monthly transaction needs to be adjusted according to the annual transaction result.

C. OBJECTIVE OF LOWER-LEVEL PROGRAM
The lower-level model is for a clearing energy market, which aims at the maximum social welfare, and the specific objective function is as follows.
where Q G i,t is the unit electricity price quoted by the power generation enterprise i at time t; P i,t is the monthly or annual winning electricity quantity of the thermal power generation enterprise i at time t; Q G sw,t is the unit electricity price quoted by the renewable energy source; P sw,t is the monthly or annual winning electricity quantity of the renewable power generation enterprise; K is the total number of power users participating in the market bidding; Q K k,t is the unit price quoted by the power user i; D k,t is the monthly or annual winning bid of the power user k; d i,t is the coefficient of the bidding price of the power generation enterprise i.

D. CONSTRAINTS OF LOWER-LEVEL PROGRAM
Equations (13) and (14) are the market clearance constraints for conventional generators and renewable energy units.
Equation (15) is the quotation coefficient constraint of the power generation enterprise.
where d min i,t and d max i,t are the upper and lower limits of the quotation coefficient of the power generation enterprise i at time t. This article assumes that the lower and upper limits of the winning bid are 0 and the declared power of each market player.
The above two-level planning model conducts the follow iterative interactions between two layers.
(1) The power output and on-off states of thermal power units, and renewable energy unit output are the decision variables solved in the upper-level model, which are submitted as known input parameters of the lower-level model.
(2) The market clearing prices π i,t and π sw,t are the decision variable solved in the lower-level model, which sets out the price of the buyer and seller after matching. This market clearing price will be returned to the upper-level model as the input parameters.
Based on the above interactive procedures that the upperlevel optimization program solves power output and on-off states of units while the lower-level program optimization optimizes the market clearing price, the two layers are interacted with each other and solved iteratively for the medium and long-term transactions.

IV. UNCERTAINTY TREATMENT OF RENEWABLE ENERGY GENERATION A. UNCERTAINTY MODEL OF WIND POWER OUTPUT
Wind power generation depends mainly on wind speed, which in the monthly study cycle generally conforms to the two-peak Weibull distribution [18], [19]. A two-peak Weibull distribution is used to describe the probability density of wind speed as follows.
where k and c are the shape and scale parameters respectively. Based on the wind speed probability f (v) and wind speedpower curves, the probability density of wind power output is deduced as follows.
where a and b are fitting parameters of wind power curve respectively.

B. UNCERTAINTY MODEL OF PHOTOVOLTAIC POWER OUTPUT
The solar irradiance is usually subject to a Beta, Weibull, Normal, Lognormal and Extreme Value (type I) distribution, then the probability model of photovoltaic power output is deduced according to its relationship with irradiance [20]- [22]. To comprehensively consider the influencing factors, the non-parametric kernel density estimation theory is used to fit the photovoltaic output f (P s ) as follows.
where P s is the output of the photovoltaic, n is the number of samples, h is the bandwidth, and P s,i is the sample of the power ouput of the photovoltaic station.

C. COMPREHENSIVE MODEL OF UNCERTAINTY OF RENEWABLE ENERGY POWER OUTPUT
An improved sequence operation algorithm is used to deal with uncertain wind power and photovoltaic output. Because the probability density function of wind power and photovoltaic power generation output is continuous, the probability density function f (x) will be discretized to get probabilistic sequence F(α) according to the sequence operation algorithm VOLUME 8, 2020 as follows.
where S is discrete stelength; N step is sequence length, N step = X /S , X is the maximum value for the variable. The probabilistic sequence of wind power and photovoltaic outputs are F w (α w ) and F s (α s ), and the probability that the power exceeds the upper limit is reduced to zero. Then new probabilistic sequences F w,new (α w ), F s,new (α s ) and corresponding probability change sequences F w,ch arg e (α w ), F s,ch arg e (α s ) are generated by (21).
Through the integration of wind power and photovoltaic output, a comprehensive model of the total uncertain wind and photovoltaic power outputs can be obtained. Set N x = N w,step + N s,step , then the calculation equation is as (22).
where F s,w (α) is the comprehensive probabilistic sequence for wind power and photovoltaic power output.
In equation (23), the complete description of the summation condition is as follows.
If multiple wind farms and photovoltaic power stations are considered, they could be handled similarly by the sequence operation algorithm.

D. DETERMINATION PROCESSING OF UNCERTAINTY CONSTRAINTS
Since wind power and photovoltaic output are described in probabilistic sequences, the opportunity constraint theory [23]-[25] is used to deal with the wind power and photovoltaic output related constraints, then the equation (3), (4), (7) can be converted into the following forms.
where P LD = K k=1 D k,t G l→k , η 1 is the confidence level to meet load balance, η 2 is the confidence level to meet spinning reserve requirement, η 3 and η 4 are the confidence level for power flow constraints. And they could be converted into formula (28)-(30).
where F s,w,l (α l ) are probabilistic sequence of wind power and photovoltaic power output on line l.

V. ALGORITHM IMPLEMENTATION
In order to solve the proposed bi-level programming model, a hybrid algorithm combining discrete and continuous particle swarm optimization is used to solve the proposed upper-level model, while the nonlinear programming method is used for the lower-level model in the paper. The corresponding flowchart is given in Figure.2 with the main steps detailed as follows.
Step 1) Input network data, initial electricity market clearing price and dynamic parameter of particle swarm algorithm, set the number of iteration k 1 equal to 1.
Step 2) Initialize the position and velocity of the particle swarm, and set the number of population index k 2 equal to 1. Step 3) Update the velocity and position of the particle swarm, and calculate the fitness value of the current particle swarm, and record the optimal load distribution of the unit under the start-stop combination, and the optimal profit of the power generation company.
Step 4) For each particle, the fitness value is compared with the current individual extremum. If it is less than the current individual extremum, the current individual extremum is updated to the fitness value.
Step 5) Determine whether the population has reached the total number of populations. If yes, go to the next step; Otherwise, increase the population by one. And go to Step 3).
Step 6) Update the speed and position of the particle swarm. Determine whether the number of iteration k 2 reaches the number of iterations k 2,max . If iteration k 2 equals to k 2,max , then go to the next step. Otherwise, make the number of iteration k 2 plus 1 and return to Step 3).
Step 7) According to the optimal particle position, computing the optimal load distribution and the profit of the optimal power generation under this start-stop unit commitment scheme. Keep the corresponding control variable value as the initial optimization parameters of the lower-level model.
Step 8) The nonlinear programming function is used to obtain the optimal solution of the lower-level model and the corresponding clearing electricity price of each power generation enterprise, and then the clearing electricity price is returned to the upper model as a known input parameter.
Step 9) Determine whether the termination condition is met. If Yes, go to the end and output the global optimal solution. If No, go to Step 2).

VI. CASE STUDY
The proposed model and method are verified by the IEEE 39-bus system showed in Figure. Table 1 and Table 2.
When solving the medium and long-term electricity trading of renewable energy generator sets, the confidence level for η 2 , η 3 , η 4 is 95% and the load balance confidence level η 1 is 60%. The clearing price of each power generation enterprise is expressed by its average clearing price. Renewable power generation enterprises declare at the lowest declared  electricity price of conventional power generation enterprises to participate in the electricity market clearing.
In order to study the impact of the renewable energy generator input on medium and long-term electricity trading, Table 3 and Table 4 respectively show the clearing results of medium and long-term electricity trading without and with renewable energy generators.
As showed in Tables 3 and 4, the generation cost of an electricity enterprise will change for the different optimization result solved in the upper layer. Each power generation enterprise can adjust the declared electricity price according to its own power generation cost. There is not much correlation between the clearing price of each power generation enterprise and the declared electricity price. In order to obtain  higher profits, each power generation enterprise should choose a better quotation strategy based on its own power generation cost, demand and market conditions. In general, after considering renewable energy generation, the electricity price in the market has been reduced to some extent. Table 5 shows the profits of the two different situations. From Table 5 we can see that after adding renewable energy units, the total profit of power generation enterprises is increased from $ 16547049.93 to $ 23401573.23 (about 23.5%). At the same time, social welfare is also increased from $ 27476400 to $ 28059000. These mean that both the total profit of power generation companies and social welfare will increase if taking account of renewable energy generation to participate in medium and long-term electricity trading.
In order to study the impact of different renewable energy penetration levels on the clearing results of medium and long-term power trading, the penetratio leve is varied from 30% to 70% with an increased step of 10. Then the total profit of power generation enterprises and the total social welfare is correspondingly shown in Figure 4 and Table 6.
As indicated by Figure 4, when the penetration leve of renewable energy generation increases, the total profit and social welfare of power generation companies have increased.
It can be seen from Table 6 that with the increase installation capacity of renewable powe generation, the total amount of renewable power generation outputhas increased significantly, and the proportion of renewable energy output of the system total output has also increased. Therefore, medium  and long-term power transactions considering renewable energy penetration can promote the consumption of renewable energy to a certain extent.

VII. CONCLUSION
The basic transaction procedure of medium and long-term electricity trading considering renewable energy participation is first introduced in this pape, and thena novel bi-level programming model is establishedfor renewable energy participation in the medium and long-term electricity trading. Afterwards, thehybrid particle swarm optimization algorithm is used to solve the upper-level model, and thenonlinear programming method is adopted to solve the lower-level model. imulation results of a modified IEEE39-bus syste demonstrat that the medium and long-term power trading approach with renewable energy participation can promote the consumption of renewable energy on one hand, and increase the social welfare of power generation enterprises on the other hand.