**4.3. Reliability model of the generation units**

0 0 0 <sup>ì</sup> £ <sup>=</sup> <sup>í</sup> <sup>&</sup>gt; <sup>î</sup> *d i i*

For the first hour, this model represents the expectation of the market for each delivery period. However, this expectation should change according to the values that the spot prices take in each sample and the information gathered by a *virtual* market taking place in each particular sample path. If perfect foresight is assumed, each virtual market could calculate without uncertainty the hourly forward price for its particular spot prices sample path simply as:

> ( ) , , <sup>1</sup> 1 <sup>=</sup>

*i i j h FB <sup>S</sup> p p*

( ( )) ( ) , ,, <sup>1</sup> <sup>1</sup>

*d d <sup>i</sup> <sup>i</sup> w h w h <sup>w</sup> i ii*


*h h*

, ,

*<sup>d</sup> <sup>H</sup> <sup>W</sup> <sup>i</sup> w h w j*

*w h w j*


The equation (64) represents a model where any additional information that arrives as the spot price of the particular sample path is different form the forecasted in the first hour is dismissed by the virtual market. Thus, this model is representative of reality only for the first hour of simulation where no additional information could have been gathered by the virtual markets. On the other hand, the equation (66) represents a model where all the additional information is obtained beforehand for each Monte Carlo sample. Likewise, this model is suitable only for the last hour of simulation where all information is already known by the virtual market within each Monte Carlo sample. Finally, the two models can be combined, in order to simulate the forward price dynamics in correlation to the spot prices of each Monte Carlo sample path. In this work, it is assumed that the information gathered by each virtual market grows linearly,

*i*

*H*

*d i*

=

. Then, equations (64)2

*i*

=

*<sup>p</sup> <sup>H</sup>*

1 1

*<sup>d</sup> <sup>i</sup> i i*

×

*H H*

( )

*h*

+

each Monte Carlo sample path.


*H*

( ( ))


= ×

*H h*

*d H i w j*

( )


*h*

1

2 The prices for the first hour in a real market situation should consider the real market prices.

=

å

*i*

*<sup>i</sup> <sup>d</sup> <sup>i</sup> i i j h <sup>w</sup>*

*H WH h*

*p p*

*FC S*

*d i*

*i d*

*H if h H <sup>h</sup>*

*i*

*hif h H* (65)

*H h* (66)

and (66) are combined by a weighted average:

+

(67)

(68)

*B h F*

1

= =

*d i*

å å

*i*

*i*

*<sup>p</sup> <sup>H</sup> <sup>p</sup>*

1

( ( ))


<sup>1</sup> 1

,

1 The assumption that the information is linear with time could be replaced with a more complex information model, such as a function of the cumulated difference between the initial forecasted spot price and the particular spot prices of

*S j h*

*p*

*i*

where:

: delivery period for instrument *i*

augmenting for each hour1

: first hour of delivery period for instrument *i*

112 Dynamic Programming and Bayesian Inference, Concepts and Applications

*Hi*

*H* 0*<sup>i</sup>*

Other relevant source of uncertainty considered is the random failure of the generating units. The stochastic model of generator outages is built considering that the unit can reside in four mutually exclusive states: Operation (required), Reserve (not required), Unavailable (required) and Unavailable (not required), as shown in the diagram of space states in Figure 6 [11].

Figure 6. Four-state stochastic model of the generation units **Figure 6.** Four-state stochastic model of the generation units

particular hour.

the unit is generating or is in stand-by.

**4.4. Risk constraint formulation** 

the objective function (56) becomes:

assumed linear with power output, i.e. marginal costs are constant.

This unit model accounts for the fact that peaking units exhibit higher availability rates. This result is explained by the fact the failure probability is typically very small when the unit is in the stand-by state. A generator is economically called online if its marginal cost of production is below the prevailing spot prices, following the decision model of equation (42). Variable costs of generation are This unit model accounts for the fact that peaking units exhibit higher availability rates. This result is explained by the fact the failure probability is typically very small when the unit is in the stand-by state. A generator is economically called online if its marginal cost of production

The operation-failure cycles of the generating unit are obtained from a chronological Markovian stochastic simulation. For each spot price sample, a time series of power output is synthesized for

1. Based on failure and repair rates defined by the state the unit resided in the previous hour, a random failure is simulated [12]. If a failure is in place, the output power is set to zero for this

2. The dispatch of the unit is simulated, taking into account the marginal cost of generation and the prevailing sample spot price at that time interval. Here perfect foresight of the spot price is

This chronological stochastic model reproduces with accuracy the dynamics involved in failure and repair cycles of generators, giving the possibility to select different failure rates depending on whether

As already mentioned before, the financial decision process can be modeled by means of a MDP. Naming profit *<sup>w</sup> B* for each sample the sum of income, cost and transaction cost over all instruments,

every generation unit. The hourly power output is simulated o following three steps:

assumed in order to decide the dispatch and fulfill the minimal generation times. 3. If dispatched, other unit's technical restrictions are fulfilled, e.g. ramping capabilities.

20

is below the prevailing spot prices, following the decision model of equation (42). Variable costs of generation are assumed linear with power output, i.e. marginal costs are constant.

( ) ( )

=

If *x* is independent of the Monte Carlo sample, the terms inside the summation over all future periods (*t* =2…*n*) are simply the expected profit for the period *t* after a decision *xt*−1→ *xt*. However, the model should take into account that future strategy decisions may be different for each Monte Carlo sample, accounting for adjustments the decision-maker almost certainly

future decision stages will depend on a set of variables *st*, which represent the variables considered by the decision maker in order to adapt the strategy to a particular situation and

( ) ( )

2

1

+ - - + ++ = + é ù ë û *<sup>t</sup> t tt t t tt t t tt t <sup>x</sup>*

The maximization can be solved by a set of recursive maximizations, each one solving only

With this model, the optimization can be decomposed in steps and the dynamic nature of a strategy can be accurately replicated. Despite the fact future trading decisions *xt*=2…*n* are considered and optimized, the practical product of this procedure is the new optimal reba‐ lanced state *xt*=1 starting from the previous trading position *xt*=0. The further trading positions are only optimal given the current information available and should be reconsidered later. Therefore, each new trading position (*xt*=2, *xt*=3, …, *xt*=*n*) should be the product of a similar optimization incorporating the additional market information available immediately before.

The value functions provide the expected continuation value within a state space defined by

solve the optimization problem, are unknown beforehand. It is here that the ADP approach is

3 There are several other decomposition methods, some of which exclude the decision as state space variable defining the value functions in a post-decision state space. These approaches make the step maximization sometimes harder but

3

present advantages such as a state space of fewer dimensions. See for example [2].

introduced to approximate the value and risk functions for the state space.

=


*V xx s B xx s V xx s* (74)

*B xx s B xx s* (73)

*V xx s* (75)

. However, the continuation functions, which are essential to

1 101 1

( ) ( ) ( )

max ( ) 1 , , - é ù ë û *<sup>t</sup> t tt t <sup>x</sup>*

<sup>1</sup> <sup>1</sup> 1 11 ,, ,, max , ,

*t tt t x x <sup>t</sup>*

é ù ê ú + ë û *<sup>t</sup>* å *n*

max , , max , , = ¼


Risk-Constrained Forward Trading Optimization by Stochastic Approximate Dynamic Programming

E E *B x x B x x* (72)

¯ and the decision itself for

http://dx.doi.org/10.5772/57466

115

1 10 1 2

é ù ê ú éù é ù <sup>+</sup> ëû ë û ë û *<sup>t</sup>* å *n*

= ¼

1 2 n

would execute to face specific scenarios. Then, the expected profit *Bt*

1 2 n

Defining the continuation value functions *Vt* as:

the equation (72) becomes:

one decision stage:

the state variables, *xt*, *xt*−1 and *st*

max , max ,

*w wt tt x x <sup>t</sup>*

The operation-failure cycles of the generating unit are obtained from a chronological Marko‐ vian stochastic simulation. For each spot price sample, a time series of power output is synthesized for every generation unit. The hourly power output is simulated o following three steps:


This chronological stochastic model reproduces with accuracy the dynamics involved in failure and repair cycles of generators, giving the possibility to select different failure rates depending on whether the unit is generating or is in stand-by.
