1 of 44

Application-Driven Learning:�A Closed-Loop Prediction and Optimization ApproachApplied to Dynamic Reserves and Demand Forecasting

Speaker: Alexandre Street (LAMPS PUC-Rio, Brazil)

Joaquim Dias Garcia (PSR, Brazil)�Tito Homem-de-Mello (UAI, Chile) �Francisco Muñoz (Generadoras de Chile)

March 5th, 2024 - Brazopt 2024, Rio de Janeiro, RJ, Brazil

2 of 44

Motivation: Energy and reserve scheduling in power systems

  • We first make a forecast
    • Demand forecast for energy scheduling
    • ISOs perform this in regular basis: daily, hourly, 5 and 5 mins,
  • Based on that a given forecast an action is planned and implemented
    • Given the demand and renewables point forecast for the next hour
    • Given the net injection deviation point forecast: reserve requirements
    • Generation and reserve schedules are scheduled
  • Given the actual demand, real time adjustments are made
    • There is a cost for the forecast error
    • If the observed demand lies within scheduled energy +/- reserves the cost is low
    • If it lies out of reserves the cost is high

3 of 44

Motivation: ad hoc biasing �(“heuristic forecasts”)

  • Independent system operators knows very well the cost asymmetry and its consequence
  • 2019 Annual Report on Market Issues and Performance of the California ISO (CAISO 2020)
    • “actions include routine upward biasing of the hour-ahead and 15-minute load forecast”
  • The national system operator in Brazil uses an “heuristic forecast” to implement ad hoc load biasing to protect the system against uncertainty unaware decisions (deterministic models)
  • It is easer to change the forecast model than the scheduling model
  • There is no ISO using two-stage stochastic models for various reasons
    • Computational tractability
    • Interpretability
    • Compliance: how selects the scenarios (prices and schedules would change)
    • Difficult to make a probabilistic joint forecast in high dimension

4 of 44

Motivation: Asymmetric costs

Parkour: forecasted targets are biased

 

 

Energy

loss

Serious

injuries

or death

 

5 of 44

Motivation: Asymmetric costs

Weather: forecasted targets are biased

 

 

Extra�weight

Getting�wet�and cold…

6 of 44

Objective

  • To present a new closed-loop framework,
  • named application-driven learning,
  • in which the best point forecasting model is defined according to a given application cost function
  • that can be represented by a two-stage linear program with uncertainty on the right-hand side.

7 of 44

Literature Review: Application-Driven Learning

Using a financial training criterion rather than a prediction criterion

Neural networks (Bengio 1997)

Task-based learning (Donti et al. 2017)

Used stochastic gradient descent with automatic differentiation of QPs

Smart Predict and Optimize (Elmachtoub and Grigas 2017)

Relaxation+convexification with SGD to estimate uncertainty in objective

A bilevel framework (Morales et al. 2020)

Use bilevel optimization with KKT reformulations (Fortuny-Amat and NLP)

8 of 44

Literature Review: Load Forecast/Reserve Sizing

Load, Renewables are key sources of uncertainty

    • Systems must be ready to withstand diverse conditions (Van der Meer et al. 2018)

Reserves (exogenous approach)

    • Used in practice (Ela et al. 2011)
    • More recently: Dynamic reserves (De Vos et al. 2019)

Stochastic optimization (endogenous approach)

    • Uncertainty modelling (Zheng et al. 2014)
    • Computational performance (Aravena and Papavasiliou 2020, Knueven et al. 2020)
    • Market design (Morales et al. 2014, Wang and Hobbs 2015)

9 of 44

The general model: Open-Loop

Uncertainty Forecast

 

 

Policy Planning

 

Cost Assessment

 

 

Model Training

 

 

  • Train Load Forecast and Reserve Model
  • Forecast Loads and Reserve Requirements
  • Plan the Operation
  • Re-Dispatch Resources in Real Time

10 of 44

The general model: Open-Loop

Uncertainty Forecast

 

 

Policy Planning

 

Cost Assessment

 

 

Model Training

 

 

  • Train Load Forecast and Reserve Model
  • Forecast Loads and Reserve Requirements
  • Plan the Operation
  • Re-Dispatch Resources in Real Time

11 of 44

Uncertainty Forecast

 

 

Policy Planning

 

Cost Assessment

 

 

Model Training

 

 

  • Train Load Forecast and Reserve Model
  • Forecast Loads and Reserve Requirements
  • Plan the Operation
  • Re-Dispatch Resources in Real Time

The general model: Open-Loop

12 of 44

The general model: Open-Loop

Uncertainty Forecast

 

 

Policy Planning

 

Cost Assessment

 

 

Model Training

 

 

  • Train Load Forecast and Reserve Model
  • Forecast Loads and Reserve Requirements
  • Plan the Operation
  • Re-Dispatch Resources in Real Time

13 of 44

The general model: Open-Loop

Uncertainty Forecast

 

 

Policy Planning

 

Cost Assessment

 

 

Model Training

 

 

  • Train Load Forecast and Reserve Model
  • Forecast Loads and Reserve Requirements
  • Plan the Operation
  • Re-Dispatch Resources in Real Time

14 of 44

The general model: Open-Loop

Uncertainty Forecast

 

 

Policy Planning

 

Cost Assessment

 

 

Model Training

 

 

  • Train Load Forecast and Reserve Model
  • Forecast Loads and Reserve Requirements
  • Plan the Operation
  • Re-Dispatch Resources in Real Time

15 of 44

The bilevel model: Closed-Loop

  • Train Load Forecast and Reserve Model
  • Forecast Loads and Reserve Requirements
  • Plan the Operation
  • Re-Dispatch Resources in Real Time

Uncertainty Forecast

 

 

Policy Planning

 

Cost Assessment

 

 

Model Training

 

 

16 of 44

The bilevel model: Closed-Loop

Uncertainty Forecast

 

 

Policy Planning

 

Cost Assessment

 

 

Model Training

 

 

  • Train Load Forecast and Reserve Model
  • Forecast Loads and Reserve Requirements
  • Plan the Operation
  • Re-Dispatch Resources in Real Time

17 of 44

The bilevel model: Closed-Loop

Uncertainty Forecast

 

 

Policy Planning

 

Cost Assessment

 

 

Model Training

 

 

  • Train Load Forecast and Reserve Model
  • Forecast Loads and Reserve Requirements
  • Plan the Operation
  • Re-Dispatch Resources in Real Time

18 of 44

The bilevel model: Closed-Loop

  • Train Load Forecast and Reserve Model
  • Forecast Loads and Reserve Requirements
  • Plan the Operation
  • Re-Dispatch Resources in Real Time

Uncertainty Forecast

 

 

Policy Planning

 

Cost Assessment

 

 

Model Training

 

 

19 of 44

The bilevel model: Closed-Loop

  • Train Load Forecast and Reserve Model
  • Forecast Loads and Reserve Requirements
  • Plan the Operation
  • Re-Dispatch Resources in Real Time

Uncertainty Forecast

 

 

Policy Planning

 

Cost Assessment

 

 

Model Training

 

 

20 of 44

The bilevel model: Closed-Loop

  • Train Load Forecast and Reserve Model
  • Forecast Loads and Reserve Requirements
  • Plan the Operation
  • Re-Dispatch Resources in Real Time

Uncertainty Forecast

 

 

Policy Planning

 

Cost Assessment

 

 

Model Training

 

 

21 of 44

Convergence of

  •  

22 of 44

Solution method: MILP

Linear models

KKT based MPEC reformulation

23 of 44

Solution method:�MILP with BilevelJuMP.jl

24 of 44

Solution method: Scalable Heuristic

Uncertainty Forecast

 

 

Policy Planning

 

Cost Assessment

 

 

Model Training

 

 

25 of 44

Solution method: Scalable Heuristic

Uncertainty Forecast

 

 

Policy Planning

 

Cost Assessment

 

 

Model Training

 

 

26 of 44

Solution method: Scalable Heuristic

Uncertainty Forecast

 

 

Policy Planning

 

Cost Assessment

 

 

Model Training

 

 

27 of 44

Solution method: Scalable Heuristic

Uncertainty Forecast

 

 

Policy Planning

 

Cost Assessment

 

 

Model Training

 

 

28 of 44

Solution method: Scalable Heuristic

Uncertainty Forecast

 

 

Policy Planning

 

Cost Assessment

 

 

Model Training

 

 

29 of 44

Application Driven Model for Load and Reserve

 

- Load Balance

- Network Flows

- Zonal Reserve Requirement

- Reserve and Generation�

- Bounds

- Bounds

- Load Balance

- Network Flows

- Generation redispatch

Policy Planning Cost

Generation, Reserve, Shed, Spill

Real Time Cost Assessment

Generation, Reserve, load shed, gen. spillage

 

30 of 44

Application Driven Model for Load and Reserve

31 of 44

Case Study: Data

  • PGLib-OPF: The power grid library for benchmarking ac optimal power flow algorithms (Babaeinejadsarookolaee 2019)
  • https://github.com/power-grid-lib/pglib-opf

  • Forecasting functions used:

32 of 44

Case Study: Method Comparison

  • Single bus systems and limited number of samples
  • MILP X Heuristic

33 of 44

Case Study: Method Comparison

  • One sample with 250 observations

Optimize Load AR(1)�with fixed reserve

Optimize up and down reserve

with fixed load AR(1)

34 of 44

Case Study: Convergence of Objective

  • LS-Ex (red)�Least-Squares load�Exogenous reserves
  • LS-Opt (blue)�Least-Squares load�Optimized reserves
  • Opt-Ex (yellow)�Optimized load�Exogenous reserves
  • Opt-Opt (green)�Optimized load�Optimized reserves

35 of 44

Case Study: Convergence of Objective

  • LS-Ex (red)�Least-Squares load�Exogenous reserves
  • LS-Opt (blue)�Least-Squares load�Optimized reserves
  • Opt-Ex (yellow)�Optimized load�Exogenous reserves
  • Opt-Opt (green)�Optimized load�Optimized reserves

36 of 44

Case Study: Convergence of Objective

  • LS-Ex (red)�Least-Squares load�Exogenous reserves
  • LS-Opt (blue)�Least-Squares load�Optimized reserves
  • Opt-Ex (yellow)�Optimized load�Exogenous reserves
  • Opt-Opt (green)�Optimized load�Optimized reserves

37 of 44

Case Study: Convergence of Out-of-sample Costs

38 of 44

Case Study: Convergence of Out-of-sample Costs

In more detail

39 of 44

Case Study: Convergence of Solution

40 of 44

Case Study: Convergence of Solution

41 of 44

 

42 of 44

Case Study: Large-Scale Optimization

  • Training time limit: 30 minutes
  • In sample scenarios: 600
  • Out of sample scenarios: 10.000
  • Server: 64 cores and 1024 Gb RAM @ PSRCloud

43 of 44

Case Study: Large-Scale Optimization

  • Realistic system 6470-rte (from the previous Section)
  • Real hourly load data from the PJM power system - (EIA 2023)
  • Results: improvements on the LS-Ex benchmark

44 of 44

Conclusions:

  • New framework described
  • Theoretical guarantees
  • Heuristic approximating the bilevel formulation
    • Works well in very large data sets
    • Can be used in practice
  • Optimal load forecasts are BIASED
  • That forecast bias depends on reserves (and should be co-optimized)
  • Method outperformed open-loop framework and ad hoc biasing
    • Provides the scientific basis for actual heuristics used to implement biased forecasts