Two time scales stochastic dynamic optimization Managing energy - - PowerPoint PPT Presentation

two time scales stochastic dynamic optimization
SMART_READER_LITE
LIVE PREVIEW

Two time scales stochastic dynamic optimization Managing energy - - PowerPoint PPT Presentation

Two time scales stochastic dynamic optimization Managing energy storage investment, aging and operation in microgrids P. Carpentier, J.-Ph. Chancelier, M. De Lara and T. Rigaut EFFICACITY CERMICS, ENPC UMA, ENSTA LISIS, IFSTTAR August 29,


slide-1
SLIDE 1

Two time scales stochastic dynamic optimization

Managing energy storage investment, aging and operation in microgrids

  • P. Carpentier, J.-Ph. Chancelier, M. De Lara

and T. Rigaut EFFICACITY CERMICS, ENPC UMA, ENSTA LISIS, IFSTTAR August 29, 2017

Two time scales SDP August 29, 2017 1 / 39

slide-2
SLIDE 2

Optimization for microgrids with storage Microgrids control architecture is often constituted of multiple levels handling multiple time scales Energy storage management requires to deal with uncertainty and information dynamic We use two time scales stochastic dynamic optimization to model two control levels and their interaction

Two time scales SDP August 29, 2017 2 / 39

slide-3
SLIDE 3

Outline

1

Introduction: Electrical storage management in microgrids Storage control in a microgrid Hierarchical control architecture of microgrids

2

Modeling: Managing intraday arbitrage, aging and renewal Two time scales management: investment/arbitrage Intraday arbitrage problem statement Long term aging/investment problem statement Two time scales stochastic optimization problem

3

Solving: Decomposition method and numerical results Decomposition method Numerical results

Two time scales SDP August 29, 2017 3 / 39

slide-4
SLIDE 4

Outline

1

Introduction: Electrical storage management in microgrids Storage control in a microgrid Hierarchical control architecture of microgrids

2

Modeling: Managing intraday arbitrage, aging and renewal Two time scales management: investment/arbitrage Intraday arbitrage problem statement Long term aging/investment problem statement Two time scales stochastic optimization problem

3

Solving: Decomposition method and numerical results Decomposition method Numerical results

Two time scales SDP August 29, 2017 3 / 39

slide-5
SLIDE 5

Storage control in a microgrid

Two time scales SDP August 29, 2017 3 / 39

slide-6
SLIDE 6

Why storage in a microgrid?

Ensure supply demand balance without wastes or curtailment:

Two time scales SDP August 29, 2017 4 / 39

slide-7
SLIDE 7

Why storage in a microgrid?

Energy tariff arbitrage and ancillary services

Two time scales SDP August 29, 2017 5 / 39

slide-8
SLIDE 8

Why stochastic dynamic optimization?

Price of electricity might be uncertain Demand and production are uncertain

Two time scales SDP August 29, 2017 6 / 39

slide-9
SLIDE 9

Subway station microgrid example

S

D

B E s E l

Two time scales SDP August 29, 2017 7 / 39

slide-10
SLIDE 10

Hierarchical control architecture of microgrids

Two time scales SDP August 29, 2017 7 / 39

slide-11
SLIDE 11

A way to deal with multiple time scales

Multiple control levels Primary Secondary Tertiary To handle multiple time scales

2∆T

2∆T

. . . 2∆t ∆t

∆T

∆T . . . 1 min ∆T

Target

1 s 1 s 1 s ∆t ∆t ∆t Info Info

Tertiary level Secondary level Two time scales SDP August 29, 2017 8 / 39

slide-12
SLIDE 12

Small time scale: voltage stability of the grid

Objective: voltage stability of the grid Time step: 1s Horizon: 1 min Input from superior level: storage input/output energy target every minute Output: effective command for storage every second

Two time scales SDP August 29, 2017 9 / 39

slide-13
SLIDE 13

Medium time scale: intraday energy tariff arbitrage

Objective: energy intraday arbitrage Time step: 1 min Horizon: 24h Input from superior level: storage aging target everyday Output to inferior level: storage input/output energy target every minute

Two time scales SDP August 29, 2017 10 / 39

slide-14
SLIDE 14

Large time scale: long term aging and investments strategy

Objective: storage long term economic profitability Time step: 1 day Horizon: 10 years Output to inferior level: storage aging target every day

SAFT intensium max technical sheet Two time scales SDP August 29, 2017 11 / 39

slide-15
SLIDE 15

Structure of the talk

We focus on medium and large levels interaction to optimize storage: Intraday energy arbitrage Long term aging

SAFT intensium max technical sheet Two time scales SDP August 29, 2017 12 / 39

slide-16
SLIDE 16

Outline

1

Introduction: Electrical storage management in microgrids Storage control in a microgrid Hierarchical control architecture of microgrids

2

Modeling: Managing intraday arbitrage, aging and renewal Two time scales management: investment/arbitrage Intraday arbitrage problem statement Long term aging/investment problem statement Two time scales stochastic optimization problem

3

Solving: Decomposition method and numerical results Decomposition method Numerical results

Two time scales SDP August 29, 2017 12 / 39

slide-17
SLIDE 17

Two time scales management: investment/arbitrage

Two time scales SDP August 29, 2017 12 / 39

slide-18
SLIDE 18

Two time scales

2∆T ∆T . . . D∆T 24h 24h ∆T ∆T

2∆T

M − 1 . . . 2∆t ∆t

∆T

1 min 1 min 1 min ∆t ∆t ∆t Long term aging and renewal Intraday arbitrage

Two time scales SDP August 29, 2017 13 / 39

slide-19
SLIDE 19

We make decisions every minutes m and every day d

Day d, Minute m: How much energy Ud,m do I charge or discharge from my current battery with capacity C d? At the end of Day d should I buy a new battery with capacity Rd?

d, 2 d, 1 d, 0 . . . d, Nt − 1 d, Nt d + 1, 0 ∆t ∆t ∆t

Ud,2 Ud,1 Ud,0 Ud,M−1 Rd

Two time scales SDP August 29, 2017 14 / 39

slide-20
SLIDE 20

Uncertain events occur right after we made our decisions

Day d, end of Minute m: we observe how much intermitent energy W d,m+1 we receive At the end of Day d we observe the batteries cost W d+1 on the market

d, 2 d, 1 d, 0 . . . d, Nt − 1 d, Nt d + 1, 0 ∆t ∆t ∆t Ud,2 Ud,1 Ud,0 Ud,M−1 Rd

W d,3 W d,2 W d,1 W d,M W d+1

Two time scales SDP August 29, 2017 15 / 39

slide-21
SLIDE 21

Decisions and uncertainty impact state variables

Day d, end Minute m: decision Ud,m and realization W d,m+1 change

  • ur battery state of charge Sd,m to Sd,m+1 and our battery state of

health Hd,m to Hd,m+1 At the end of Day d decision Rd change our battery capacity C d to C d+1

d, 2 d, 1 d, 0 . . . d, Nt − 1 d, Nt d + 1, 0 ∆t ∆t ∆t Ud,2 Ud,1 Ud,0 Ud,M−1 Rd

Sd,2, Hd,2 Sd,1, Hd,1 Sd,0, Hd,0 Sd,M−1, Hd,M−1Sd,M, Hd,M

C d+1 W d,3 W d,2 W d,1 W d,M W d+1 Two time scales SDP August 29, 2017 16 / 39

slide-22
SLIDE 22

Intraday arbitrage problem statement

Two time scales SDP August 29, 2017 16 / 39

slide-23
SLIDE 23

Representation of the subway station problem

S

D

B E s E l

Station node D: Demand station E s: From grid to station

⊖: Discharge battery

Subways node B: Braking E l: From grid to battery

⊕: Charge battery

Two time scales SDP August 29, 2017 17 / 39

slide-24
SLIDE 24

Battery state of charge dynamics

For a given charge/discharge strategy U over a day d: Sd,m+1 = Sd,m − 1 ρd U−

d,m ⊖

+ ρcsat(Sd,m, U+

d,m, Bd,m+1)

with sat(x, u, b) = min(Smax − x ρc , max(u, b))

d, 0 . . . d, M − 1 1 min 1 min

Two time scales SDP August 29, 2017 18 / 39

slide-25
SLIDE 25

Battery aging dynamics

For a given charge/discharge strategy U over a day d Hd,m+1 = Hd,m − 1 ρd U−

d,m − ρcsat(Sd,m, U+ d,m, Bd,m+1)

d, 0 . . . d, M 1 min 1 min

Two time scales SDP August 29, 2017 19 / 39

slide-26
SLIDE 26

Every minute we save energy and money

If we have a battery on day d and minute m we save: pe

d,m

  • E s

d,m+1 + E l d,m+1 − Dd,m+1

  • Saved energy
  • pe

d,m is the cost of electricity on day d at minute m

Two time scales SDP August 29, 2017 20 / 39

slide-27
SLIDE 27

Summary of short term/Fast variables model

We call, at day d and minute m, fast state variables: X f

d,m =

Sd,m

Hd,m

  • fast decision variables: Uf

d,m =

  • U−

d,m

U+

d,m

  • fast random variables: W f

d,m =

Bd,m

Dd,m

  • fast cost function: Lf

d,m(X f d,m, Uf d,m, W f d,m+1)

fast dynamics: X f

d,m+1 = F f d,m(X f d,m, Uf d,m, W f d,m+1)

Two time scales SDP August 29, 2017 21 / 39

slide-28
SLIDE 28

Long term aging/investment problem statement

Two time scales SDP August 29, 2017 21 / 39

slide-29
SLIDE 29

We decide our battery purchases at the end of each day

2∆T ∆T . . . NT 24h 24h

Should we replace our battery Cd by buying a new one Rd or not? Cd+1 =

  • Rd, if Rd > 0

f (Cd, Hd,M), otherwise paying renewal cost Pb

dRd at uncertain market prices Pb d

Two time scales SDP August 29, 2017 22 / 39

slide-30
SLIDE 30

Summary of long term/Slow variables model

We call, at day d, slow state variables: X s

d = ( Cd )

slow decision variables: Us

d = ( Rd )

slow random variables: W s

d = ( Pb

d )

slow cost function: Ls

d(X s d, Us d, W s d+1) = Pb dRd

slow dynamics: X s

d+1 = F s d(X s d, Us d, W s d+1)

Two time scales SDP August 29, 2017 23 / 39

slide-31
SLIDE 31

A link between days

The initial ”fast state” at the begining of day d deduces from: X f

d,0 = φd(X s d, X f d−1,M)

The initial ”slow state” at the begining of day d + 1 deduces from all that happened the previous day: X s

d+1 = F s d(X s d, Us d, W s d+1, X f d,0, Uf d,:, W f d,:)

d, 2 d, 1 d, 0 . . . d, Nt − 1 d, Nt d + 1, 0 ∆t ∆t ∆t Uf

d,2

Uf

d,1

Uf

d,0

Uf

d,M−1

Us

d

X f

d,2

X f

d,1

X f

d,0, X s

X f

d,M−1

X f

d,M

Uf

d+1,0

X f

d+1,0, X s d+1

W f

d,3

W f

d,2

W f

d,1

W f

d,M

W s

d+1

Two time scales SDP August 29, 2017 24 / 39

slide-32
SLIDE 32

We formulate a two time scales stochastic optimization problem

Two time scales SDP August 29, 2017 24 / 39

slide-33
SLIDE 33

We minimize fast and slow costs over the long term

min

Xf ,Xs,Uf ,Us E

M−1

  • d=0

M−1

  • m=0

Lf

d,m(X f d,m, Uf d,m, W f d,m+1)

  • + Ls

d(X s d, Us d, W s d+1, X f d,0, Uf d,:, W f d,:)

  • X f

d,m+1 = F f d,m(X f d,m, Uf d,m, W f d,m+1)

X f

d,0 = φd(X s d, X f d−1,M)

X s

d+1 = F s d(X s d, Us d, W s d+1, X f d,0, Uf d,:, W f d,:)

Uf

d,m Fd,m

Us

d Fd,M

Two time scales SDP August 29, 2017 25 / 39

slide-34
SLIDE 34

Stochastic optimal control reformulation

We call X d = (X f

d,0, X s d)

Ud = (Uf

d,:, Us d)

W d = (W f

d−1,:, W s d)

we can reformulate the problem as min

X ,U E

M−1

  • d=0

Ld(X d, Ud, W d+1)

  • X d+1 = Fd(X d, Ud, W d+1)

Uf

d,m Fd,m

Us

d Fd,M

where the non-anticipativity constraints are not standard

Two time scales SDP August 29, 2017 26 / 39

slide-35
SLIDE 35

Information flow model

Fd,m = σ  

W f d′,m′, d′<d, m′≤M+1 W s d′, d′≤d W f d,m′, m′≤m

  = σ

  • previous days fast noises

previous days slow noises current day previous minutes fast noises

  • d, 0

. . . d + 1, 0 Uf

d,2

Uf

d,1

Uf

d,0

Uf

d,M−1

Us

d

X d = (X f

d,0, X s 0)

Uf

d+1,0

X d+1 = (X f

d+1,0, X s d+1)

W f

d,3

W f

d,2

W f

d,1

W f

d,M

W s

d+1

Fd,2 Fd,1 Fd,0 Fd,M−1 Fd,M

W f

d+1,1

Fd+1,0

Two time scales SDP August 29, 2017 27 / 39

slide-36
SLIDE 36

We can write a dynamic programming equation

When the W d are independent

d, 0 . . . d + 1, 0 Uf

d,2

Uf

d,1

Uf

d,0

Uf

d,M−1

Us

d

xd Uf

d+1,0

X d+1 W f

d,3

W f

d,2

W f

d,1

W f

d,M

W s

d+1

Fd,2 Fd,1 Fd,0 Fd,M−1 Fd,M W f

d+1,1

Fd+1,0

Vd(xd) = min

Ud

E

  • Ld(xd, Ud, W d+1) + Vd+1(X d+1))
  • Two time scales SDP

August 29, 2017 28 / 39

slide-37
SLIDE 37

With value functions defined inductively

Every day d, we can define a value function that factorizes as function of the state X d if the W d are independent. Vd(xd) = min

Xd+1,Ud

E

  • Ld(xd, Ud, W d+1) + Vd+1(X d+1)
  • s.t X d+1 = Fd(X d, Ud, W d+1)

Uf

d,m σ(X d, W f d,1:m)

Us

d σ(X d, W f d,1:M)

Ud = (Uf

d,:, Us d)

X d = xd The value of the whole problem being: V0(x0).

Two time scales SDP August 29, 2017 29 / 39

slide-38
SLIDE 38

How to decompose the problem into a daily optimization problem and an intraday optimization problem?

Two time scales SDP August 29, 2017 29 / 39

slide-39
SLIDE 39

Outline

1

Introduction: Electrical storage management in microgrids Storage control in a microgrid Hierarchical control architecture of microgrids

2

Modeling: Managing intraday arbitrage, aging and renewal Two time scales management: investment/arbitrage Intraday arbitrage problem statement Long term aging/investment problem statement Two time scales stochastic optimization problem

3

Solving: Decomposition method and numerical results Decomposition method Numerical results

Two time scales SDP August 29, 2017 29 / 39

slide-40
SLIDE 40

Let’s ”split” the min

Vd(xd) = min

Xd+1

min

Ud

E

  • Ld(xd, Ud, W d+1) + Vd+1(X d+1)
  • s.t X d+1 = Fd(X d, Ud, W d+1)

Uf

d,m σ(X d, W f d,1:m)

Us

d σ(X d, W f d,1:M)

Ud = (Uf

d,:, Us d)

X d = xd

Two time scales SDP August 29, 2017 30 / 39

slide-41
SLIDE 41

Let’s introduce an auxiliary variable

Vd(xd) = min

Y d+1

min

Xd+1

min

Ud

E

  • Ld(xd, Ud, W d+1) + Vd+1(X d+1)
  • s.t X d+1 = Y d+1

Fd(X d, Ud, W d+1) = Y d+1 Uf

d,m σ(X d, W f d,1:m)

Us

d σ(X d, W f d,1:M)

Ud = (Uf

d,:, Us d)

X d = xd Y d+1 σ(X d, W d+1)

Two time scales SDP August 29, 2017 30 / 39

slide-42
SLIDE 42

Let’s ”distribute” the mins

Vd(xd) = min

Y d+1

  • min

Ud

E Ld(xd, Ud, W d+1) + min

Xd+1

E Vd+1(X d+1)

  • s.t X d+1 = Y d+1

Fd(X d, Ud, W d+1) = Y d+1 Uf

d,m σ(X d, W f d,1:m)

Us

d σ(X d, W f d,1:M)

Ud = (Uf

d,:, Us d)

X d = xd Y d+1 σ(X d, W d+1)

Two time scales SDP August 29, 2017 30 / 39

slide-43
SLIDE 43

The intraday arbitrage problem appears

For a given Y d+1 ∈ L0(Ω, F, P), with σ(Y d+1) ⊂ σ(X d, W d+1), φd(xd, [Y d+1]) = min

Ud

E Ld(xd, Ud, W d+1) s.t Fd(X d, Ud, W d+1) = Y d+1 Uf

d,m σ(X d, W f d,1:m)

Us

d σ(X d, W f d,1:M)

Ud = (Uf

d,:, Us d)

X d = xd We use the notation f ([W ]) to emphasize that f ’s domain is L0(Ω, F, P).

This is the intraday arbitrage problem with stochastic final age target!

Two time scales SDP August 29, 2017 31 / 39

slide-44
SLIDE 44

Back to the expression of the daily value functions

As Y d+1 = X d+1 we obtain: Vd(xd) = min

Xd+1

intraday problem

  • φd(xd, [X d+1]) +

expected cost to go

  • EVd+1(X d+1)
  • s.t X d+1 σ(X d, W d+1)

with φd(xd, [X d+1]) = +∞ if X d+1 is an unreachable target for the intraday problem.

Two time scales SDP August 29, 2017 32 / 39

slide-45
SLIDE 45

Significant difficulties remain

Computing φd(xd, [X d+1]) for every X d+1 is very expensive Solving the intraday problem with a stochastic final target is hard (X d+1 σ(X d, W d+1)) Then why is it interesting? We can solve the intraday problem φd with another method (DP, SDDP, SP, PH, MPC) We can exploit the problem periodicity (∀d, φd = φ0) We can simplify measurability (X d+1 σ(X d)) We can exploit value functions monotonicity (relax the coupling constraint Fd(X d, Ud, W d+1) ≥ X d+1) [2]

Two time scales SDP August 29, 2017 33 / 39

slide-46
SLIDE 46

Numerical results

Two time scales SDP August 29, 2017 33 / 39

slide-47
SLIDE 47

Synthetic price of batteries data

Batteries cost stochastic model: synthetic scenarios that approximately coincide with market forecasts

Two time scales SDP August 29, 2017 34 / 39

slide-48
SLIDE 48

Net Present Value

7 years horizon Yearly discount factor = 0.95 10, 000 C b scenarios to model randomness 1 buying/aging decision per month 1 charge/discharge decision every 15 min Constraint: having a battery everytime with at least one cycle a day Objective: maximize expected discounted revenues over 7 years

Two time scales SDP August 29, 2017 35 / 39

slide-49
SLIDE 49

Numerical method: Intraday DP + Extraday DP

We use DP for intraday decisions and DP for daily decisions. Simplifications: Monotonicity Daily periodicity X d+1 σ(X d): We decide aging at the beginning of the day .

Two time scales SDP August 29, 2017 36 / 39

slide-50
SLIDE 50

Results

SDP SDP + SDP Offline comp. time ∞ 1 min + 15 min Simulation comp. time ? [25s,30s] Upper bound ? +128k In Julia with a Core I7, 1.7 Ghz, 8Go ram + 12Go swap SSD

Two time scales SDP August 29, 2017 37 / 39

slide-51
SLIDE 51

1 simulation: cycles

NPV = 80,000 euros

Two time scales SDP August 29, 2017 38 / 39

slide-52
SLIDE 52

Conclusion and ongoing work

Our study leads to the following conclusions: Controlling aging is relevant The method can be used for aging aware intraday control as well as investment management This modeling framework allows to find methods to solve multi time scales problems We are now focusing on Improving risk modelling Improving batteries cost stochastic model Improving aging model with capacity degradation Applying dual decomposition methods

Two time scales SDP August 29, 2017 39 / 39

slide-53
SLIDE 53

References

Pierre Haessig. Dimensionnement et gestion d’un stockage d’´ energie pour l’att´ enuation des incertitudes de production ´ eolienne. PhD thesis, Cachan, Ecole normale sup´ erieure, 2014. Benjamin Heymann, Pierre Martinon, and Fr´ ed´ eric Bonnans. Long term aging : an adaptative weights dynamic programming algorithm. working paper or preprint, July 2016.

Two time scales SDP August 29, 2017 39 / 39