Machine learning methods for on- line predic4on and op4mal resource alloca4on in smart buildings and grids

Size: px
Start display at page:

Download "Machine learning methods for on- line predic4on and op4mal resource alloca4on in smart buildings and grids"

Transcription

1 Machine learning methods for on- line predic4on and op4mal resource alloca4on in smart buildings and grids Madeleine Gibescu Joint work with: Elena Mocanu, Luis Hurtado, Phuong Nguyen Introduction Motivation: flexibility from the built environment Part I: Aggregated demand forecasting with FCRBM Demand forecast based on historical data only Demand forecast with influencing factors in a price-responsive context Part II: MAS for optimal resource allocation Centralized versus decentralized Cooperative versus non-cooperative Conclusions Page 1 1

2 Motivation Motivation: flexibility from the built environment Avoid overloads and voltage problems Improve/maintain comfort, reduce peak demand Forecast electricity demand patterns 2

3 Part I: Aggregated demand forecasting with FCRBM Page 4 Demand Forecas4ng Problem Given a dataset of observations: U is a matrix of influencing factors v is a vector of energy demand Learn a predictive function Goal: Minimize the empirical loss Γ is the set of historical data on demand and influencing factors, Θ are the model parameters 3

4 Demand Forecas4ng Applica4ons Player (TSO, DSO, end-user) Data Methods Various time horizons Different resolutions Electricity Demand Influencing factors Supervised Unsupervised May 18, 2017 PAGE 6 Demand Forecas4ng Applica4ons (A) and (B) Player (TSO, DSO, end-user) Data Methods Various time horizons Different resolutions Electricity demand Influencing factors Supervised Unsupervised Data collection was done on the Danish island Bornholm >50 % electricity consumption comes from renewable energy production Very broad mix of distributed energy resources Approximately 2000 residential consumers 5 minutes resolution May 18, 2017 PAGE 7 4

5 Why Deep Learning? / Electrical Engineering Department - - Electrical Energy Systems Credit: Yahoo Japan, 20 March 2016 May 18, 2017 PAGE 8 History of Deep Learning Restricted Boltzmann Machines Inference rules Total Energy (seen as a cost function) Advantages Unsupervised learning Automatic feature extraction Stochastic models Good generative power E II E I / Electrical Engineering Department - - Electrical Energy Systems May 18, 2017 PAGE 9 5

6 Factored Condi4onal Restricted Boltzmann Machine Deep Learning Restricted Boltzmann Machine Boltzmann Machine w h(i) v(i) RBM Conditional RBM Factored Conditional RBM Output Output Input Input Input May 18, 2017 PAGE 10 Factored Condi4onal Restricted Boltzmann Machine Hidden h t (j) Total energy Class y t (p) v <t (k) Input (historical data) v t (i) Probabilistic inference in FCRBM Visible (prediction) The first-order energy term refer to the interactions between layers and biases. The second order energy term is replaced here with a third order energy function given by the factors interactions with the layers. May 18, 2017 PAGE 11 6

7 Learning & Update Rules in FCRBM Update rule ContrasLve Divergence where: θ = vector of weights W, or biases (A and B) τ = training epoch α = learning rate ρ = momentum γ = weights decay May 18, 2017 PAGE 12 Demand Forecast in a Price- Responsive Context (B) GRBM FCRBM h t (j) Price and Meteorological data v t (i) visible layer hidden layer y t (p) v <t (k) GRBM = Gaussian Restricted Boltzmann Machine -> binary encoding of influencing factors FCRBM = Factored Conditional Restricted Boltzmann Machine May 18, 2017 PAGE 13 7

8 Results Demand Forecas4ng (A) and (B) Electrical demand profile between 1 January 2014 until 25 June 2014 Scenario 1 Scenario 2 Scenario 3 Scenario 4 Scenario 5 Time horizon 5 min 15 min 1 hour 6 hours 1 day Summary of the meteorological and price data correlated with energy consumption, PCC > 0.5. Price RTP Price DA Price HA water vapor temperature global irradiance cloud cover relative humidity.. A May 18, 2017 B PAGE 14 Results Demand Forecas4ng without influencing factors (A) An example of true and predicted aggregated electricity demand for 6 hours ahead, 5 min. resolution Methods: Persistence Support Vector Machine FCRBM MAPE (mean absolute percent error) and confidence intervals ~ 5 months of training data ~ 5 weeks of testing data May 18, 2017 PAGE 15 8

9 Results Demand Forecas4ng with influencing factors (B) Methods: Persistence Support Vector Machine (energy) FCRBM (energy) GRBM+FCRBM (energy, weather) GRBM+FCRBM (energy, price) GRBM+FCRBM (energy, weather, price) MAPE and confidence intervals 2 days of training data 1 day of testing data May 18, 2017 PAGE 16 Part II: MAS for optimal resource allocation Page 17 9

10 Mul4- Agent Systems (MAS) Mapping of sequences of environmental states to ac4ons. While each ac4on affects the state of the environment Source: Xu. X. et al Agent Perception env P Decision P x S * S * Action P x S * A Environment S x A P(S) PAGE 8 18 Op4mal resource alloca4on SG/BEMS Page 19 10

11 A flexibility management system Where Minimize Subject to B = {1,..., B} i Request d i,min B Δ F = F F C C i= 1 s, i Β Offer is the set of buildings, each with its own optimization Minimize W(1- C) + (1 W)( P C ) Subject to Discomfort C C min Weight value Power consumed for comfort PAGE 20 Mul4- agent decision making N- player non- coopera4ve game Centralized noncooperative Q- learning Decentralized noncooperative Extended joint ac4on Decentralized cooperative PAGE

12 Q- learning It is used to find an op4mal ac4on- selec4on policy for any given (finite) Markov Decision Process. Update rule: New value in the matrix Old information Reward for an action Old information α learning rate γ discount factor The consequence of the action Extended joint ac4on learning (ejal) Uses the ac4ons taken by others to modify the agent s policy. The main difference from Q- learning lies in its reward func4on: Reward of building i given its own action and the others Actions of the other agents Flexibility request from grid agent Building action F s Comfort penalty 12

13 Op4mal resource alloca4on in MAS Page 24 Op4mal resource alloca4on Grid overload Note: reductions are in percentage of the initial overload duration. Page 25 13

14 Op4mal resource alloca4on in MAS Comfort Fairness of the games Page 26 Conclusions We proposed FCRBM for demand forecaslng has good generalizalon capabililes; can be used to accommodate large databases. We added GRBM to extract salient features from external informalon and to reduce its dimensionality. We validated our approach on the EcoGrid data and compare its accuracy with persistence and SVM. We proposed ejal for oplmal resource allocalon among buildings, enabling cooperalve yet decentralized behavior. We compared ejal with two benchmark oplmizalon methods: N- player game and Q- learning. Q- learning achieves the most pronounced decrease in overload duralon; ejal achieves the highest average fairness index. / Electrical Energy Systems PAGE 27 May 18,

15 For further reading [1] E. Mocanu, E.M. Larsen, P.H. Nguyen, P. Pinson and M. Gibescu, Demand forecas4ng at low aggrega4on levels using factored condi4onal restricted Boltzmann machine. Proceedings of the 19th Power Systems Computa4on Conference (PSCC), Genova, Italy, [2] L.A. Hurtado- Munoz, P.H. Nguyen, M. Gibescu and I.G. Kamphuis, Mul4- agent systems for demand flexibility management in the built environment. Invited panel presenta4on, IEEE PES General Mee4ng, Boston, USA, [3] L.A. Hurtado- Munoz, "Uncovering Demand Flexibility in Buildings - - A smart grid inter- opera4on framework for the op4misa4on of energy and comfort", Ph.D. Thesis, Eindhoven University of Technology, March Page 28 Thank you. Questions? m.gibescu@tue.nl e.mocanu@tue.nl p.nguyen.hong@tue.nl Financial acknowledgement: Project SG-BEMS, funded by TKI Switch2SmartGrids, NL. Data acknowledgement: EcoGrid (energy and prices), funded by EU-FP7, and DMI (meteo). Page 29 15