Risk-constrained optimal bidding strategy for a wind power producer with battery energy storage system using extended mathematical programming

Wind power producers (WPP) in India, currently, are restricted from participating in the short-term energy market due to the uncertainty in their power generation. Consequently, they might lose an excellent opportunity to maximise their revenue. WPPs, with installed BESS and proper risk management, could promisingly participate in the market and minimise the penalty for deviating from the schedule. This paper devises an optimal bidding strategy for a WPP to participate in the day-ahead and real-time energy markets considering the uncertainties present in wind power generation and market electricity price. At the same time, it also aims to minimise the power deviation during real-time delivery. The paper incorporates CVaR as a risk measure and formulates a two-layer stochastic optimisation problem while employing multiple scenarios of the uncertain data. The upper layer of the problem decides the day-ahead offering, while the lower layer deals with the real-time operation. The stochastic problem is further reformulated using extended mathematical programming, which beneﬁts in reducing the mathematical complexity of the problem. Wind power data from an actual wind farm located in Gujarat, India is taken as a test-study. Various potential case-studies are presented to illustrate the effectiveness of the proposed bidding strategy.


INTRODUCTION
Recently, a Green Term-Ahead Market is introduced in India for renewable generators, which offers intraday and day-ahead contingency contracts for trading [1]. This market will not only help in meeting the renewable purchase obligations of various industries and state utilities but also introduce the renewable energy producers to the exchange-based power trading platforms. However, due to their uncertain power production, wind generators in India cannot play in the short-term energy markets in the same way as the conventional generators do. If given a chance, wind power producers (WPP) can boost their revenue by bidding into a day-ahead market (DAM) and the real-time market (RTM) with suitable strategies. These bids represent delivery obligations, and the WPP may be penalised if the delivered energy for a specific duration does not match the scheduled ones. For example, in India, a penalty is imposed on the WPP, if the error between the actual delivery and the scheduled generation is more than 12% [2]. Therefore, the wind farm must ensure to deliver the planned power during the real-time operation. The accuracy of the real-time power delivery can be improved by incorporating energy storage devices such as battery energy storage system (BESS). Hence, enabling WPPs to participate in the market and to maximise their revenue, demands proper planning to deal with the uncertainties, and devise a suitable energy management scheme with optimal charging and discharging of BESS [3]. Thus, the whole operation of WPP participating in short-term market can be formulated as a two-stage optimisation problem where each stage is associated with DA and RT market, respectively. The question of optimising bids made on the DA market can be considered as the problem of maximising the revenue earned from the sale of electricity in DAM [4]. The RT operation of WPP can be constructed as an optimisation problem which maximises the profit from the sale of electricity in RTM while minimising the power deviation during real-time delivery [5]. An electricity market considering only renewable generators as market participants, has been discussed in [6], which attempts to explain the market behaviour under uncertainties arising due to unreliable power production, variability in load, and electricity price. These uncertainties are modelled as various scenarios and can be solved using stochastic programming (SP) [7]. The uncertainties can also be addressed by clustering techniques [8], Markov probabilities [9] or by probabilistic forecast [10]. The authors in [11] determine the hourly power output schedule of a combined wind-battery system consisting of sodium-sulphur battery utilising the probabilistic estimates of the electricity price and the wind power. A market which is restructured to accommodate day-ahead, intraday, and real-time trading is described in [12]. It devises an optimal bidding strategy to maximise the overall profit of the combined wind-storage system by adapting rolling stochastic optimisation. A game theory-based bidding strategy is considered in [13] for oligopolistic DA electricity markets. A day-ahead offering strategy formulated as a bilevel optimisation problem is presented in [14] where one of the levels maximises the overall profit of WPP while the other one deals with the market clearing process.
The uncertainty present in the wind power generation possesses a high risk to the market operation. A risk-measure metric is generally incorporated to quantify the risk, and the stochastic modelling is formulated as optimal portfolio selection based on the available resources [15]. A risk-constrained offering strategy of a hybrid power plant comprising of a WPP, and demand response provider, is discussed in [16] which uses conditional value at risk (CVaR) to limit the risk on profit variability in different trading floors.
In this paper, we address the above problem from the WPPs perspective and assume that the WPP has installed BESS in its capacity. In most of the literature [17], the focus is either on the bidding strategy of a combined WPP-BESS plant (sometimes WPP alone) to participate in the electricity market, or to improve the dispatchability of the plant by reducing the RT power deviation [18]. This paper formulates the bidding strategy of a WPP to participate in two trading floors, namely DA and RT market, in the Indian power market. The two markets operate at the same time-intervals; however, decision making occurs in different instances. This gives a choice to the WPP to optimally allocate its resources to take advantage of the price difference in two markets. At the same time, the strategy also aims to minimise the power deviation during real-time delivery by optimally scheduling the BESS. We incorporate CVaR as a risk measure and formulate a two-layered optimisation problem where the upper layer provides the day-ahead offering while the lower layer deals with the real-time operation. The problem formulation governs the WPP resources to bid in the DA market and RT market optimally. The objective is to maximise the overall revenue from the sale of electricity under the uncertainties present in wind power forecasting and electricity price forecasting. The uncertainties are portrayed as multiple scenarios, and the problem is constructed as stochastic optimisation. The stochastic problem is then reformulated using extended mathematical programming (EMP) which reduces the computational complexity.
The contributions of this paper can be summed up as follows: • It presents a risk-measure based bidding strategy of a combined WPP-BESS plant by optimally utilising its resources to participate in the DA and RT market. It not only maximises the WPP revenue but also improves the WPP dispatchability and minimises the RT power deviation by optimally scheduling the BESS. • The problem is solved using extended mathematical programming, which eases the complexity of the problems and hence reduces the computational time, which is crucial in RT operations. • We have implemented the bidding strategy to operate in the Indian power market and hence fetched the wind power generation data from an actual wind farm located in Gujarat, India. We compared several case-studies to assert the robustness the presented scheme.
The rest of the paper is organised as follows: Section 2 presents the framework of wind energy trading in the Indian power market. Section 3 provides the problem description and mathematical modelling of DA and RT strategies considering the risk-constrained decisions. It also presents the reformulation of the SP into EMP. A case study employing the data from a real wind farm in India is presented in Section 4. The results of the proposed approach are discussed in Section 5, which is followed by the concluding remarks and future directions in Section 6.

FRAMEWORK OF WIND ENERGY TRADING IN INDIAN POWER MARKET
Under the present rules by the Central Electricity Regulatory Commission, only conventional generators are allowed to participate in the short-term markets [19]. WPPs and other renewable energy producers sell their electricity to the distribution companies under long-term power purchase agreements (PPA). These PPAs are generally for 10-15 years, and the tariff rates do not change over the years [20]. Thus, the RE generators may lose a significant fraction of revenue by not participating in competitive markets. This is mostly attributed to the nondispatchable nature of RE sources. From recent studies [21], it is evident that BESS can significantly improve the wind power dispatchability and make the WPP resilient for participation in the electricity market.
A framework for WPPS to participate in energy trading through the short-term market in India has been discussed in [22]. It suggests a two-stage market structure comprising of a DA market which operates one day in advance, and an RT market, which runs very close to real-time. The WPP can offer its bid in the DA market based on the DA forecast. These offerings become delivery obligations after the DA market is cleared. In real-time, the forecast is more accurate, and new information is available, which enables the WPP to participate in RT market The Indian Energy Exchange (IEX) is one of the major power exchanges in India, which offers different trading platforms, including DA, RT, and term-ahead (TA) markets. The RT market in India became operational very recent, and its structure and mechanism are discussed in [23]. Based on this, a two-floor market structure is illustrated in Figure 1 depicting its operational timeline. Thus, we formulate a bidding platform for a WPP, which has its own BESS with sufficient capacity to participate in Indian short-term electricity market under both DA and RT market structures. The WPP offers only the quantity bids and hence is a price-taker. Once the market is cleared, the DA offerings are firm and cannot be modified. RT market operates on a rolling window for every hour throughout the day. The WPP also bids in the RT market incorporating its firm DA offerings. During RT delivery of energy, the WPP must follow the schedule, which includes DA and RT offering. A deviation from the schedule will attract a penalty. In India, the penalty for deviation between the actual and scheduled generation is termed as cost of deviation and is calculated from the absolute error as a function of grid frequency at the particular time instance [24]. Hence, penalties for both positive deviation (over-injection) and negative deviation (under-injection) in RT are considered to be the same. Further, the penalty factor is assumed to be constant for the simplicity of the problem.

PROBLEM DESCRIPTION
We present a methodology to formulate a bidding strategy for a WPP that owns a large wind power installation in the Indian electricity grid. The WPP aims to maximise its revenue by selling electricity generated by its wind turbines in DA and RT market. The bidding decisions are made by minimising the profit riskmeasure. The purpose of WPP participating in the RT market is to make up for the shortfall from its day-ahead commitment. It also reduces the risk of day-ahead trading. As the trading horizons come closer to the real-time process, it would scale down the uncertainties in decision making by WPP and would allow more efficient trading [25]. Based on the price difference in two markets, WPP can offer some of its generations in day-ahead and allocate the rest to the real-time market. However, RTM prices are generally more volatile than that in DAM. Consequently, more dependency on RTM may shrink the profitability of WPP, as there is much risk involved. Thus, it is advisable to have a balance between the profit maximisation and risk-taking. At the same time, WPP also intends to mitigate the deviation between the scheduled and actual power delivery to minimise the penalty imposed by the grid operator. For this purpose, it operates BESS with constraints-based charging and discharging at each interval which also prolongs the life cycle of the battery.

Stochastic optimisation
The WPP suffers several uncertainties during the decision making. These may be due to variations in wind power generation, the volatility of electricity price or rival WPP's offering strategy. Stochastic programming (SP) is used to formulate and solve the problems with uncertain parameters. The unknown parameters can be represented as several scenarios with the probability of occurrence for each scenario [26]. The SP is formulated by assigning some weight to the individual solutions, associated with each of the input scenarios. It then generates a single solution which is best in some sense to all sets of input data. In this paper, we have considered the uncertainties in wind power forecast, DA electricity price forecast and RT electricity price forecast.

Point forecast of wind power and electricity price
Forecasts of the supply and market conditions are keys for decision making. We have utilised a wavelet-based neural network (WNN) algorithm [27,28] to obtain the DA forecast of wind power generation, and electricity price forecast of the DA market as well as the real-time market. The WNN approach first utilises the discrete wavelet transform to decompose the input data by breaking it down in a low-frequency signal (imitating the general trend of the input data) and several high-frequency components (associated with the detailed information of the input data). Then each of the disintegrated signals is processed through individual neural-network (NN) models for training and prediction. The output of each NN model is then combined using inverse wavelet transform to construct the final prediction.

Scenario generation and reduction
The point forecast information is not sufficient to devise the optimal decision making because (a) the parameters are uncertain, and (b) the forecast model is not 100% accurate. Therefore, we need to predict several possible scenarios and probabilities of their occurrence. It is achieved by scenario generation techniques which require to estimate the probability density function (PDF) of the forecasted data. We performed the PDF estimation by using a kernel density estimator, as explained in [29]. Utilising the estimated PDFs for wind power and electricity price, we generate multiple scenarios using Monte-Carlo simulation [30]. Generally, a large number of scenarios are required to depict the uncertainty accurately, which may result in the associated SP problem become intractable. Hence, we need to trim down the number of scenarios to a feasible count while maintaining most of the stochastic information embedded. This is accomplished by minimising the Kantorovich distance between the reduced and the original set as discussed in [31].

Risk-measure
In stochastic programming, where the uncertainty is modelled as a stochastic process, the associated profit or cost is a random variable which is usually represented by a probability distribution. The problem of maximising/minimising the profit is obtained by a decision-making agent from the expected value of the profit. Some of the decisions could lead to the non-negligible probability of occurrence of instances with negative profit or losses. Hence, risk control plays a vital role in formulating stochastic programming models. The uncertainties associated with the stochastic problem may result in particular bidding cases, which offer high profit but might be correlated with high risk. Risk measures are used to quantify the likelihood and size of the potential risk. Therefore, we include a riskmetric which allows WPP to control the risk associated with its offering decisions. Conditional value at risk (CVaR) is one of the risk measures, which in simple terms, is the conditional expectation of the profit for the worst-case scenarios for a provided confidence level. We choose CVaR metric as it is coherent, linear and can easily be integrated with optimisation problems [32].

Decision making sequence
The bidding window for DA market is between 10:00 AM and 12:00 PM of the current day D, during which the bid has to be submitted to the grid operator. The WPP generates multiple DA price scenarios, RT price scenarios, and wind power scenarios using the point forecast and the scenarios are reduced to an appropriate size to limit the complexity of the problem. The reduced scenarios are fed as input data to the day-ahead optimisation model. The WPP decides how much risk it is willing to take by controlling the risk-measure parameter (CVaR in this case). The model provides the results in the form of DA offering for the next day. It also allocates some of the power generations to be offered in real-time. After a few hours, the market-clearing process is completed by the grid operator, and the WPP is notified the same by 06:00 PM. The DA offerings become firm decisions now, which are passed to the real-time optimisation model along with the RT allocation. RT market operates for the next day (D+1) starting from midnight, and the auction window starts between 10:30 PM to 11:00 PM of the current day. During this period, the WPP updates the scenarios with the availability of latest information, estimates the battery operating conditions, and feed the data into the RT optimisation model which in turn provides the RT offerings and battery energy schedules. RT market clears by 11:30 PM, and the participants are notified 15 min before the start of actual delivery at midnight. This operation is repeated every hour until the end of the day is reached. Figure 2 shows the flow of information in each of the market segment.

Mathematical formulation
The objective of the WPP is to maximise its revenue in both the DA and RT markets contemplating the associated risks.

Day-ahead optimisation
The day ahead problem is formulated as a stochastic linear optimisation problem with the following objective functions and constraints: where, subject to: −P rt ≤P da,rt ≥ 0, ∀s where Ξ da = {P da t,s ,P da,rt t,s ,} is the set of all the decision variable in DA. The first two terms in the objective function Equation (1),C da t (s , s da ) and C da,rt t (s , s rt ) are the expected revenues achieved in DA and RT markets, respectively. Here,P da t,s is the day ahead offer of the WPP whileP da,rt t,s is the WPP allocation for RT. Equation (5) restricts the total bidding of the wind farm to the wind power forecast scenarios. Often, the market operator mandates the participant to place a minimum non-zero bid which is ensured by Equation (6). Generally, the quantity bought or sold in the RT market is considerably smaller than that of the DA market. Hence, we put a bound on real-time allocation given by the constraint Equation (7). Note thatP da,rt t,s can take both positive or negative values, meaning WPP could both be seller or buyer in the RT market. This is made possible by WPP offering sell-bids higher than its capacity in the DA market when the price is high so that it could buy from the cheaper RT market, assuming BESS can take care of any power deviation.
The third term in Equation (1), ℂ da is the CVaR which is computed through the constraints Equations (8) and (9). The weighing parameter ∈ [0, ∞) allows a trade-off between the expected revenue and the CVaR and therefore, represents the decision making of the WPP. For β = 0, WPP's approach is risk-neutral in which the decision is indifferent between the choice of scenarios even though the scenario poses a high risk. Increasing β indicates risk-averse decisions meaning the WPP is not willing to take many risks. In such cases, WPP profit decreases and CVaR increases. For sufficiently high β value, CVaR value is also high indicating that the WPP is guaranteed a minimum profit even for the worst-case scenario.

Real-time optimisation
The objective of the real-time problem is to maximise the revenue from the sale of allocated power which was obtained from the DA model. At the same time, it also aims to minimise the deviation between the scheduled (DA and RT offerings) and the actual power delivery utilising optimal charging and discharging of BESS. The optimisation problem is formulated as stochastic quadratic programming as given below: where, subject to: where Ξ rt = {P rt t,s̃,P b t ,Ê b t ,Q b t } is the set of decision variables in RT. The objective function Equation (10) comprises of three terms, where first term, C rt t (s̃, sr t ) is the revenue from sale of electricity in real-time, while the second term, e rt t (s̃) is the sum of squared error between the scheduled and actual power delivery. It might be the case that in order to maximise its revenue from RT electricity sale, the WPP may ignore the penalty for real-time deviation. Hence, rt ∈ (0, 1) is used as a weighting parameter to trade between the two objectives. Increasing rt means WPP is emphasising more on real-time deviation minimisation.
The DA bid-offer obtained from DA optimisation problem is represented by P da t . Similarly, P da,rt t is the RT allocation from the DA problem. The decision variableP rt t,s̃i s the power sold/bought in the RT market which must be less than or equal to the RT power allocation obtained from the DA problem which is represented by Equation (14). Equation (15) restricts the maximum power transaction allowed in the RT market. Equation (16) ensures that the total bidding is not more than the forecasted power. The other decision variableP b t represents the BESS output power. Positive value ofP b t indicates that the battery is discharging while a negative value indicates battery charging. Equations (17), (18) limit the frequent charging/discharging of BESS while Equations (19) and (20) represent the SOC and stored energy of the battery. Equation (21) ensures that the battery energy level at the end of the day reaches that at the beginning of the day so that the next day's operation is not affected. The third term ℂ rt is the CVaR term for RT operation computed through Equations (22) and (23). rt is the parameter for risk-constrained decision making in RT similar to DA problem.

Reformulation using extended mathematical programming
Extended mathematical programming (EMP) reformulates specific complex mathematical models into refined programming classes, which are then solved by sophisticated algorithms. EMP framework is well suited to address stochastic models and optimise CVaR risk measure as recourse models with two-stage programming [33]. EMP is currently implemented only in GAMS, a high-level modelling environment for mathematical optimisation. EMP attempts to solve the two-stage stochastic problem with recourse by building and solving the deterministic equivalent. The detailed study on mathematical formulation of stochastic problem with recourse can be found in [34]. The deterministic equivalent models are defined in GAMS in the traditional way, and additional stochastic information is introduced in the EMP info file. As a result, this helps in presenting complex models in a precise and convenient way. This paper employs EMP for solving both DA and RT problems explained in Section 3.4. The cost functions described in Equations (1) and (10), along with the constraints Equations (5)-(9) and (14)-(23) are written as a two-stage stochastic program using EMP library in GAMS. First of all, the optimal solution of the first stage is obtained with the expected value of the second stage and then in the second stage, and it is decided that which values the uncertain parameters is to be realised. Then, recourse action is taken, and the optimal solution is obtained that maximises the total cost, which is the summation of the first-stage cost and the expected second-stage cost.

Quality metrics for stochastic programming
The performance of the stochastic solution is measured through two quality metrics known as the expected value of perfect information (EVPI) and value of stochastic solution (VSS). EVPI measures the amount that a decision-maker is willing to pay for obtaining perfect and accurate information about the future. On the other hand, VSS is a measure to quantify the benefits of employing a stochastic approach over a deterministic one [26]. Let z P * represents the optimal solution of a two-stage SP with perfect information. This is also known as a wait-and-see solution. Let z s * represent the optimal solution from a stochastic approach with random variables, also known as a here-and-now solution. The deterministic solution, z D * is obtained by replacing the random variables by their average or expected values. Then, the EVPI and VSS for a maximization problem are defined as follows:

CASE STUDY
A 27 MW wind farm located near Lamba town in the state of Gujarat, India, is chosen as test-bed for this study. For the computational purpose, it is assumed that the wind farm owns BESS of 3 MW, 5 MWh capacity which is around 10% of the farm's wind power installed capacity. The DA bidding timeline in this study follows that of IEX. Since, RT market in India started very recently and does not have sufficient data for RT electricity price, both the DA and RT electricity price have been taken from the PJM market [35] for testing the presented algorithm. The data, chosen for this study, range from January 2013 to December 2014. Figure 3 shows the generated and reduced scenarios of DA electricity price, RT electricity price and wind power generation for January 20th, 2013. A total of 1000 scenarios were generated for each variable. The price scenarios (both DA and RT) have been generated considering the Gaussian distribution while wind power scenarios were obtained using Weibull distribution. The number of scenarios is reduced to ten for each of the variables to reduce the model complexity. One can notice that the fluctuation in RT price is much higher than that in DA prices. Though RT price goes higher than the DA price in some instances, it also goes very close to zero, for instance, at third hour. This implies that the RT prices are more volatile than DA prices and more dependence on the RT market may reduce the profit of the WPP. On the other hand, the difference between the maximum and the minimum wind power generation throughout the day is around 8 MW, which is considerably high for a 27 MW wind farm. This indicates the uncertainty in wind power generation which must be dealt very carefully during the problem formulation.
We considered the following cases to evaluate the technoeconomic benefits of the presented approach:  The bids are offered based on the deterministic or point forecast. Based on the results obtained from the optimisation model, the WPP splits its generation capacity to provide some of it in the DA market and the rest of it in the RT market. Since there is no BESS, the WPP is dependent on the accuracy of its DA and RT forecast to minimise the power deviation in real-time. 3. Case 3: WPP owns the BESS, but the DA bidding is based on deterministic forecasts, similar to case 2. In this case, WPP employs BESS to reduce the RT power deviation, and to minimise the penalty. 4. Case 4: In this case, the bidding approach is stochastic. Several scenarios for wind power forecast and electricity price forecast are considered to formulate the DA optimisation problem. CVaR as a risk measure metric is incorporated. Similar to case 2, WPP splits its capacity for DA and RT markets. Since there is no BESS, RT bidding decisions are made on expected values of the forecast. 5. Case 5: WPP owns the BESS, and stochastic bidding is incorporated. The DA decision making is similar to that of case 4. In RT, WPP takes advantage of BESS to minimise the RT deviation and the subsequent penalty.
All the five cases are summarised in Table 1, stating which cases employ BESS and which cases use deterministic or stochastic approach. The error between the actual and the scheduled delivery in real-time is measured in terms of mean absolute percentage error (MAPE) over the 24 h and is given by: where P Sch t = P da t + P rt t is the scheduled power and P del t = P act t + P b t is the actual power delivered.

RESULTS AND DISCUSSIONS
The DA and RT optimisation problems, formulated as LP and QP respectively, have been solved using GAMS 27.3 with MAT-LAB 2019a interface on a Windows-based PC with Intel i7 processor clocked at 3.40 GHz and 8 GB of RAM. The average time taken by the optimisation problem is less than 5 s in all cases.

Performance analysis of stochastic solution
We calculated the net revenue as a sum of revenues from DA and RT problems, described by Equations (1)-(10) and (11)-(23), respectively. z P * denotes the net revenue with perfect information (zero forecast error), z s * is the optimal solution from the stochastic approach, and z D * is obtained by replacing the stochastic problem with a deterministic equivalent. Then,  we calculated EVPI and VSS as discussed in Equations (24) and (25), and is presented in Table 2. It can be apprehended that the WPP has to pay $ 401 in order to obtain the error-free information about the day-ahead. In other words, a low value of EVPI indicates that the forecast error is less in random variables. Similarly, the VSS means that the WPP will gain around $ 171 on opting for a stochastic approach over the deterministic one. In all cases except the base case, WPP is a seller in the DA market while it can both sell or purchase power in the RT market based on whichever market offers a high price. If we examine Figures 3 and 4 together, it is evident that WPP bids for higher power in DA when the price is higher in DA market and bids for negative power in RT when the price is lower in RT market. It can be noted that the DA revenue is much higher and RT revenue is much smaller in case 4 and case 5 (both stochastic) than that in case 2 and case 3 (both deterministic). This is because the stochastic approach effectively manages the WPP resources in both DA and RT market.

Risk analysis
In DA optimisation problem, is the trade-off between the generated revenue and risk taken, and hence, represents the decision of the WPP. Figure 5(a) shows the variation of revenue (profit) and CVaR vs risk. For values close to zero, which means risk-neutral decision, the revenue is high and CVaR value is low. As increases, which implies risk-averse decisions, the revenue decreases and CVaR value increases. For ≥ 50, the DA revenue is minimum at $6995. These are minimum risk conditions that guarantee a profit at least equal to the maximum CVaR value, which is at $ 6788. Figure 5(b) provides the variation between the revenue and CVaR at different values of . This helps in deciding the tradeoff between the two quantities. In our study, we have considered = 10. A similar strategy is applied in RT while dealing with risk where rt is the decision parameter. However, there is another parameter rt (0, 1), which decides the tradeoff between the revenue generated in RT and the deviation error. For a value close to zero, the optimisation problem gives more weight to revenue maximisation and hence, the MAPE is very poor. Conversely, the MAPE improves as the value of rt reaches towards 1. Since there is a penalty imposed for RT deviation, WPP can not choose a small value of rt as the penalty is also high in such instances, as shown in Figure 5(b). Hence the WPP choose a rt value which offers the highest net revenue (penalty subtracted from RT revenue) and lowest MAPE. Bidding offerings, battery scheduling and real-time power delivery of case 5 are displayed in Figure 6. We have considered 1 MW of minimum bidding in DA and 5 MW of RT bidding in RT. It is assumed that the WPP is the seller in the DA market and therefore, cannot buy power in DA. On the other hand, since, RT market is a balancing market, WPP can both sell or purchase the power in RT depending on the electricity price. The bidding scheme is formulated in such a way that the WPP takes advantage of the price differences in two markets. When RT prices are low, for instance, between second and ninth hour in Figure 3, WPP quotes higher sell-bids than the forecasted value in the DA market and plans to purchase that much extra power from the RT market.
Conversely, when DA prices are much lower than the RT prices, WPP quotes minimum sell-bids in the DA market and sells the rest of the power in the RT market. Any deviation in this schedule will be provided by the BESS. The optimisation problem also successfully caters the ramp requirement of the WPP by optimally charging and discharging the battery while maintaining its state of charge (SOC) between 20% and 80%.  The SOC level was assumed to be 50% at the beginning of the day, and the same is maintained by the end of the day so that the next day's operation can be run smoothly. Figure 6(c) shows the RT dispatch, wherein the actual power delivery, which includes wind farm output and BESS discharge closely follows the scheduled power (summation of DA and RT offerings).

CONCLUSION AND FUTURE SCOPES
We presented a bidding strategy for a WPP as a stochastic optimisation problem which is solved using EMP in GAMS environment. EMP automatically reformulate the complex mathematical equations into simpler models which can be solved using well-established solver algorithm. EMP is very suitable for solving various mathematical problem classes, e.g. equilibrium problem, hierarchical optimisation, disjunctive programming, and stochastic programming. It reduces the computational burden and the complexity of the problem, which is solved within seconds. This is very crucial during the real-time operation where extensive data are needed to be processed, and results are expected very fast. Further, we incorporate CVaR as risk-measure optimally bidding for a WPP in the day-ahead market. We also utilised BESS for mitigating the deviation between real-time power delivery and the scheduled power and hence minimising the penalty. Thus, it helps in maintaining the overall load-demand balance.
We employed data from a real wind-farm located in India and undertook several cases where we compared various bidding strategies with and without BESS and incorporating deterministic and stochastic approaches. From our study, we draw the following conclusions.
• Participation in both DA and RT market significantly boost the revenue of a WPP even though it does not employ BESS. • With the inclusion of BESS, real-time power deviation and the penalty for deviation reduces. Hence, revenue drastically increases. • WPP can take advantage of the price difference in the two markets. It may purchase electricity from the RT market when it is cheaper than the DA market and sell in the DA market, hence, gaining more profit.
• Stochastic programming with CVaR as risk-measure allows WPP to make more efficient decisions with proper risk management.
To sum up, we successfully presented a bidding scheme to facilitate a WPP to participate in the short-term electricity market in India. We implemented risk-constrained stochastic problem to maximise WPP's profit and to mitigate the real-time power deviation. This work can be extended for a strategic player in a pool of WPPs and conventional generators, concerning the network power balancing and voltage constraints.   s rt ∕ s rt Probability of occurrence of s rt ∕sr t th RT price scenario.

Constants and Parameters
Δt Time block interval (Δt = 1 hour). α Confidence level used to compute CVaR. rt Parameter to model the trade-off between expected revenue and CVaR in DA/RT. rt Parameter to model the trade-off between expected revenue and power deviation in RT (penalty factor). P w Power production capacity of the wind farm. P da Minimum DA bid specified by the market operator. P rt Maximum limit for power bidding in RT. P b , P b BESS maximum and minimum power limit. Q b , Q b BESS maximum and minimum SOC limit. E b BESS maximum energy capacity. η BESS charging/discharging efficiency.