Compare commits

...

14 commits

Author SHA1 Message Date
Radu C. Martin
a532e541ec Updated README file 2021-07-29 12:11:48 +02:00
Radu C. Martin
0d2782dd4a Added repo README file 2021-07-23 00:21:08 +02:00
Radu C. Martin
e1ce6e8ed6 Don't trigger github action on master push 2021-07-22 22:39:23 +02:00
Radu C. Martin
19e854e02d Added english labels to reference temp graph 2021-07-22 22:14:23 +02:00
Radu C. Martin
721953642c Fixed unconsistent use of acronyms 2021-07-22 22:13:51 +02:00
Radu C. Martin
1e1cc5acd8 Fixed missing reference 2021-07-22 22:10:08 +02:00
Radu C. Martin
ec9660015c Fixed footer spacing 2021-07-22 22:05:15 +02:00
Radu C. Martin
1de057f1eb Added .gitignore file 2021-07-21 11:59:08 +02:00
Radu C. Martin
761c9b5c0d Update compile.yml 2021-07-20 23:25:49 +02:00
Radu C. Martin
217d34613e Fixed workflow for multiple pdfs 2021-07-20 23:18:12 +02:00
Radu C. Martin
f009073d10 Updated github workflow to include slides 2021-07-20 23:09:06 +02:00
Radu C. Martin
2ca4d2c5d3 Added Presentation tex files 2021-07-20 23:07:53 +02:00
Radu C. Martin
74e80594e6 Removed unused section file 2021-07-20 22:57:25 +02:00
Radu C. Martin
ffabe92245 Folder restructure 2021-07-20 22:55:56 +02:00
28 changed files with 1428 additions and 112 deletions

View file

@ -6,7 +6,6 @@ name: CI
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
tags:
- 'v*.*.*'
pull_request:
@ -31,12 +30,18 @@ jobs:
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v2
with:
root_file: main.tex
root_file: |
thesis.tex
slides_clean.tex
slides_notes.tex
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: main.pdf
files: |
thesis.pdf
slides_clean.pdf
slides_notes.pdf
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

291
.gitignore vendored Normal file
View file

@ -0,0 +1,291 @@
## Core latex/pdflatex auxiliary files:
*.aux
*.lof
*.log
*.lot
*.fls
*.out
*.toc
*.fmt
*.fot
*.cb
*.cb2
.*.lb
## Intermediate documents:
*.dvi
*.xdv
*-converted-to.*
# these rules might exclude image files for figures etc.
# *.ps
# *.eps
thesis.pdf
slides_clean.pdf
slides_notes.pdf
*Master_report*.pdf
## Generated if empty string is given at "Please type another file name for output:"
.pdf
## Bibliography auxiliary files (bibtex/biblatex/biber):
*.bbl
*.bcf
*.blg
*-blx.aux
*-blx.bib
*.run.xml
## Build tool auxiliary files:
*.fdb_latexmk
*.synctex
*.synctex(busy)
*.synctex.gz
*.synctex.gz(busy)
*.pdfsync
## Build tool directories for auxiliary files
# latexrun
latex.out/
## Auxiliary and intermediate files from other packages:
# algorithms
*.alg
*.loa
# achemso
acs-*.bib
# amsthm
*.thm
# beamer
*.nav
*.pre
*.snm
*.vrb
# changes
*.soc
# comment
*.cut
# cprotect
*.cpt
# elsarticle (documentclass of Elsevier journals)
*.spl
# endnotes
*.ent
# fixme
*.lox
# feynmf/feynmp
*.mf
*.mp
*.t[1-9]
*.t[1-9][0-9]
*.tfm
#(r)(e)ledmac/(r)(e)ledpar
*.end
*.?end
*.[1-9]
*.[1-9][0-9]
*.[1-9][0-9][0-9]
*.[1-9]R
*.[1-9][0-9]R
*.[1-9][0-9][0-9]R
*.eledsec[1-9]
*.eledsec[1-9]R
*.eledsec[1-9][0-9]
*.eledsec[1-9][0-9]R
*.eledsec[1-9][0-9][0-9]
*.eledsec[1-9][0-9][0-9]R
# glossaries
*.acn
*.acr
*.glg
*.glo
*.gls
*.glsdefs
*.lzo
*.lzs
# uncomment this for glossaries-extra (will ignore makeindex's style files!)
# *.ist
# gnuplottex
*-gnuplottex-*
# gregoriotex
*.gaux
*.glog
*.gtex
# htlatex
*.4ct
*.4tc
*.idv
*.lg
*.trc
*.xref
# hyperref
*.brf
# knitr
*-concordance.tex
# TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files
# *.tikz
*-tikzDictionary
# listings
*.lol
# luatexja-ruby
*.ltjruby
# makeidx
*.idx
*.ilg
*.ind
# minitoc
*.maf
*.mlf
*.mlt
*.mtc[0-9]*
*.slf[0-9]*
*.slt[0-9]*
*.stc[0-9]*
# minted
_minted*
*.pyg
# morewrites
*.mw
# newpax
*.newpax
# nomencl
*.nlg
*.nlo
*.nls
# pax
*.pax
# pdfpcnotes
*.pdfpc
# sagetex
*.sagetex.sage
*.sagetex.py
*.sagetex.scmd
# scrwfile
*.wrt
# sympy
*.sout
*.sympy
sympy-plots-for-*.tex/
# pdfcomment
*.upa
*.upb
# pythontex
*.pytxcode
pythontex-files-*/
# tcolorbox
*.listing
# thmtools
*.loe
# TikZ & PGF
*.dpth
*.md5
*.auxlock
# todonotes
*.tdo
# vhistory
*.hst
*.ver
# easy-todo
*.lod
# xcolor
*.xcp
# xmpincl
*.xmpi
# xindy
*.xdy
# xypic precompiled matrices and outlines
*.xyc
*.xyd
# endfloat
*.ttt
*.fff
# Latexian
TSWLatexianTemp*
## Editors:
# WinEdt
*.bak
*.sav
# Texpad
.texpadtmp
# LyX
*.lyx~
# Kile
*.backup
# gummi
.*.swp
# KBibTeX
*~[0-9]*
# TeXnicCenter
*.tps
# auto folder when using emacs and auctex
./auto/*
*.el
# expex forward references with \gathertags
*-tags.tex
# standalone packages
*.sta
# Makeindex log files
*.lpz
# xwatermark package
*.xwm
# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib
# option is specified. Footnotes are the stored in a file with suffix Notes.bib.
# Uncomment the next line to have this generated file ignored.
#*Notes.bib

View file

@ -1,4 +1,4 @@
$pdf_mode = 1;
@default_files = ('main.tex');
@default_files = ('thesis.tex');
$clean_ext = "bbl run.xml"

View file

@ -1,42 +0,0 @@
\section{Further Research}
Section~\ref{sec:results} has presented and compared the results of a full-year
simulation for a classical \acrshort{gp} model, as well as a few incarnations of
\acrshort{svgp} models. The results show that the \acrshort{svgp} have much
better performance, mainly due to the possibility of updating the model
throughout the year. The \acrshort{svgp} models also present a computational
cost advantage both in training and in evaluation, due to several approximations
shown in Section~\ref{sec:gaussian_processes}.
Focusing on the \acrlong{gp} models, there could be several ways of improving
its performance, as noted previously: a more varied identification dataset and
smart update of a fixed-size data dictionary according to information gain,
could mitigate the present problems.
Using a Sparse \acrshort{gp} without replacing the maximum log likelihood
with the \acrshort{elbo} could improve performance of the \acrshort{gp} model at
the expense of training time.
An additional change that could be made is inclusion of the most amount of prior
information possible through setting a more refined kernel, as well as adding
prior information on all the model hyperparameters when available. This approach
however goes against the "spirit" of black-box approaches, since significant
insight into the physics of the plant is required in order to properly model and
implement this information.
On the \acrshort{svgp} side, several changes could also be proposed, which were
not properly addressed in this work. First, the size of the inducing dataset was
chosen experimentally until it was found to accurately reproduce the manually
collected experimental data. In order to better use the available computational
resources, this value could be found programmatically in a way to minimize
evaluation time, while still providing good performance. Another possibility is
the periodic re-evaluation of this value when new data comes in, since as more
and more data is collected the model becomes more complex, and in general more
inducing locations could be necessary to properly reproduce the training data.
Finally, none of the presented controllers take into account occupancy rates or
adapt to possible changes in the real building, such as adding or removing
furniture, deteriorating insulation and so on. The presented update methods only
deals with adding information on behaviour in different state space regions, i.e
\textit{learning}, and their ability to \textit{adapt} to changes in the actual
plant's behaviour should be further addressed.

217
EESD.cls Normal file
View file

@ -0,0 +1,217 @@
% Mahmoud S. Shaqfa - EESD lab. - EPFL
% Email: mahmoud.shaqfa@epfl.ch
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{EESD}
\LoadClass[aspectratio = 169, 11pt, xcolor={usenames,dvipsnames}]{beamer}
% I used 16:9 aspect ratio of the slides; To get the default (4:3) remove the specifier above in-between the [aspectratio = 169] or simply change the value to 43
% Other possible values are: 1610, 149, 54, 43 and 32.
% \documentclass[aspectratio=1610]{beamer}
% Sets aspect ratio to 16:10, and frame size to 160mm by 100mm.
% 77
% \documentclass[aspectratio=169]{beamer}
% Sets aspect ratio to 16:9, and frame size to 160mm by 90mm.
% \documentclass[aspectratio=149]{beamer}
% Sets aspect ratio to 14:9, and frame size to 140mm by 90mm.
% \documentclass[aspectratio=141]{beamer}
% Sets aspect ratio to 1.41:1, and frame size to 148.5mm by 105mm.
% \documentclass[aspectratio=54]{beamer}
% Sets aspect ratio to 5:4, and frame size to 125mm by 100mm.
% \documentclass[aspectratio=43]{beamer}
% The default aspect ratio and frame size to 128mm by 96mm. You need not specify this option.
% \documentclass[aspectratio=32]{beamer}
% Sets aspect ratio to 3:2, and frame size to 135mm by 90mm.
% ---- My Colors Specifiers ----
\definecolor{mypink}{rgb}{0.97, 0.56, 0.65}
\definecolor{myviolet}{rgb}{0.6, 0.4, 0.8}
\definecolor{myblue}{rgb}{0.61, 0.77, 0.89}
\definecolor{green1}{rgb}{0.00, 0.45, 0.47} % darker green
\definecolor{green2}{rgb}{0.73, 0.88, 0.82} % light green
\definecolor{violet1}{rgb}{0.59, 0.08, 0.39} % darker violet
\definecolor{violet2}{rgb}{0.85, 0.78, 0.85} % light violet
\definecolor{beamerfooter1}{rgb}{0.97, 0.64, 0.60}
\definecolor{beamerfooter2}{rgb}{0.96, 0.46, 0.40}
\definecolor{beamerfooter3}{rgb}{0.93, 0.19, 0.10}
\setbeamercolor*{header color}{fg=white,bg=black}
\setbeamercolor*{footer color1}{fg=black}%,bg=beamerfooter1} % pink
\setbeamercolor*{footer color2}{fg=white}%,bg=beamerfooter2} % dark pink
\setbeamercolor*{footer color3}{fg=white}%,bg=beamerfooter3} % dark red
\setbeamertemplate{blocks}[rounded][shadow=true]
\setbeamercolor{block body}{fg = black, bg = beamerfooter1}
\setbeamercolor{block title}{fg=white, bg=beamerfooter2}
\setbeamercolor{block body example}{fg = black, bg = green2}
\setbeamercolor{block title example}{fg = white, bg = green1}
\setbeamercolor{block body alerted}{fg = black, bg = violet2}
\setbeamercolor{block title alerted}{fg=white, bg=violet1}
\pgfdeclarehorizontalshading[beamerfooter1,beamerfooter2,beamerfooter3]
{beamer@frametitleshade}{\paperheight}{
color(0pt)=(beamerfooter3);
color(0.3333\paperwidth)=(beamerfooter2);
color(1.056\paperwidth)=(beamerfooter1)
}
\setbeamertemplate{frametitle}{\vspace{20pt}\color{beamerfooter3}\textbf\insertframetitle}
% ---- Bibliography Specifiers ----
\setbeamertemplate{bibliography item}[text] % Regular numbering (Formal)
% ---- Itemize Specifier ----
\setbeamertemplate{itemize items}[square]
\setbeamertemplate{enumerate items}[square]
% ---- Frame Title Specifier ----
\addtobeamertemplate{frametitle}{}{\vspace{0pt}} % increase vspace between the title and text
\newcommand{\rom}[1]{\uppercase\expandafter{\romannumeral #1\relax}} % Add Romans numbering
\usecolortheme[named=beamerfooter3]{structure}
\setbeamertemplate{headline}{}
\setlength{\footnotesep}{0.05cm}
% Table of contents size subsections and subsubsections
\setbeamerfont{subsection in toc}{size=\scriptsize}
\setbeamerfont{subsubsection in toc}{size=\scriptsize}
% Table of contents (Enumeration shapes)
\setbeamertemplate{section in toc}[square]
\setbeamertemplate{subsection in toc}[square]
\setbeamertemplate{subsubsection in toc}[square]
\setbeamercovered{transparent} % Transparent Text When Use "Pauses"!
\setbeamertemplate{navigation symbols}%{default}
\logo{\centering\includegraphics[height=1.43cm]{logos169.pdf}\vspace{220pt}}
\addtobeamertemplate{footnote}{}{\vspace{1.5ex}}
% -------- Special frames ---------
\newcommand{\coverpage}[1]{
{
\setbeamertemplate{headline}{
\leavevmode
\hbox{
\begin{beamercolorbox}[wd=1.009\textwidth, ht=2.5ex, dp=1.125ex]{}
\end{beamercolorbox}
}
}
\setbeamertemplate{footline}
{
\leavevmode%
\setbox\beamer@tempbox=\hbox{%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex, center]{footer color3}%
\usebeamerfont{author in head/foot}\hspace{2ex}\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{footer color2}%
% \usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{footer color1}%
\usebeamerfont{title in head/foot}\insertshorttitle{}\hspace*{6em}~~~~~~~~\hspace*{2ex}
\end{beamercolorbox}%
}%
\beamer@tempdim=\ht\beamer@tempbox%
\advance\beamer@tempdim by 4pt%
\begin{pgfpicture}{0pt}{0pt}{\paperwidth}{20pt}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}}
\pgfusepath{clip}
\pgftext[left,base]{\pgfuseshading{beamer@frametitleshade}}
\end{pgfpicture}
\vskip-\beamer@tempdim%
\box\beamer@tempbox%
}%
\setbeamercolor{background canvas}{}
\begin{frame}[t, noframenumbering, allowframebreaks]{}
#1
\end{frame}
}
}
% Define and customize the headline style of slides
\setbeamertemplate{headline}{%
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=1.000\textwidth, ht=2.5ex, dp=1.125ex]{header color}%
\ifx\insertsubsection\empty % no subsection
{{~~}\insertsection}%
\else % subsection exists
\ifx\insertsubsubsection\empty % subsection but no subsubsection
{~\insertsection \textcolor{white}{$~~\bullet$} ~\S~\insertsubsection}%
\else % subsection and subsubsection exist
{~\insertsection \textcolor{white}{$~~\bullet$} ~\S~\insertsubsection \textcolor{white}{$~~\bullet$} ~\S~\insertsubsubsection}%
\fi
\fi
\end{beamercolorbox}%
}
}
\newcommand{\breakingframe}[1]{
{
\setbeamertemplate{footline}
{
\leavevmode%
\setbox\beamer@tempbox=\hbox{%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex, center]{footer color3}%
\usebeamerfont{author in head/foot}\hspace{2ex}\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{footer color2}%
\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{footer color1}%
\usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{6em}~~~~~~~~\hspace*{2ex}
\end{beamercolorbox}%
}%
\beamer@tempdim=\ht\beamer@tempbox%
\advance\beamer@tempdim by 4pt%
\begin{pgfpicture}{0pt}{0pt}{\paperwidth}{20pt}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}}
\pgfusepath{clip}
\pgftext[left,base]{\pgfuseshading{beamer@frametitleshade}}
\end{pgfpicture}
\vskip-\beamer@tempdim%
\box\beamer@tempbox%
}%
\setbeamercolor{background canvas}{bg=beamerfooter1}
\begin{frame}[t, noframenumbering, allowframebreaks]{}
#1
\end{frame}
}
}
\setbeamertemplate{footline}
{
\leavevmode%
\setbox\beamer@tempbox=\hbox{%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex]{footer color3}%
\usebeamerfont{author in head/foot}\hspace{2ex}\insertshortauthor
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{footer color2}%
\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right]{footer color1}%
\usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{2em}
\insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
\end{beamercolorbox}%
}%
\beamer@tempdim=\ht\beamer@tempbox%
\advance\beamer@tempdim by 4pt%
\begin{pgfpicture}{0pt}{0pt}{\paperwidth}{20pt}
\pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}}
\pgfusepath{clip}
\pgftext[left,base]{\pgfuseshading{beamer@frametitleshade}}
\end{pgfpicture}
\vskip-\beamer@tempdim%
\box\beamer@tempbox%
}%

BIN
Images/sia_180_2014_en.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
Plots/SVGP_perf_animation.mkv Executable file

Binary file not shown.

40
README.md Normal file
View file

@ -0,0 +1,40 @@
# Inter-seasonal GP MPC control for buildings
## Report and Presentation slides
This repository contains the code for the report and presentation slides for my
Master Project
> *Inter-seasonal Performance of Gaussian Process-based
> Model Predictive Control of Buildings*
which was done under the supervision of Prof. Colin Jones at the EPFL's
[Automatic Control Laboratory](https://www.epfl.ch/labs/la/)
The main folder structure is as follows:
```shell
└── Thesis
├── Images
├── Plots
└── Sections
```
The `Images` and `Plots` folders contain the figures used in the thesis and are
shared between the report and the presentation. The `Sections` folder contains
the content of documents.
In order to compile the documents, the appropriate main file has to be chosen:
- `thesis.tex` compiles the project report
- `slides_clean.tex` compiles the presentation slides, not including the notes
- `slides_notes.tex` compiles the presentation slides, including the notes on
the right side of the screen.
The resulting presentation pdf contains an embedded video file. It can be played
back using a compatible pdf reader, such as okular or pympress.
---
The presentation is based on the
[beamer template](https://www.overleaf.com/latex/templates/eesd-presentation-latex-template/sfqmhmqxhmjy)
by Mahmoud Shaqfa.

View file

@ -17,12 +17,14 @@ design of these control schemes, as the results could vary greatly from one
implementation to another.
Gaussian Processes have been previously used to model building dynamics, but
they are usually limited by a fixed computational budget. This limits the
approaches that can be taken for identification and update of said models.
Learning \acrshort{gp} models have also been previously used in the context of
autonomous racing cars \cite{kabzanLearningBasedModelPredictive2019}, but there
the Sparse \acrshort{gp} model was built on top of a white-box model and only
responsible for fitting the unmodeled dynamics.
they are usually limited by a fixed computational
budget~\cite{jainLearningControlUsing2018,nghiemDatadrivenDemandResponse2017}.
This limits the approaches that can be taken for identification and update of
said models. Learning \acrfull{gp} models have also been previously used in
the context of autonomous racing cars
\cite{kabzanLearningBasedModelPredictive2019}, but there the Sparse
\acrshort{gp} model was built on top of a white-box model and only responsible
for fitting the unmodeled dynamics.
\subsection{Previous Research}
With the increase in computational power and availability of data over time,
@ -33,7 +35,7 @@ The idea of using Gaussian Processes as regression models for control of dynamic
systems is not new, and has already been explored a number of times. A general
description of their use, along with the necessary theory and some example
implementations is given in~\cite{kocijanModellingControlDynamic2016}.
In~\cite{pleweSupervisoryModelPredictive2020}, a \acrlong{gp} Model with a
In~\cite{pleweSupervisoryModelPredictive2020}, a \acrshort{gp} Model with a
\acrlong{rq} Kernel is used for temperature set point optimization.
Gaussian Processes for building control have also been studied before in the
@ -64,7 +66,7 @@ the original identified model goes further and further into the extrapolated
regions.
This project tries to combine the use of online learning control schemes with
\acrlong{gp} Models through implementing \acrlong{svgp} Models. \acrshort{svgp}s
\acrshort{gp} Models through implementing \acrfull{svgp} Models. \acrshort{svgp}s
provide means of extending the use of \acrshort{gp}s to larger datasets, thus
enabling the periodic re-training of the model to include all the historically
available data.
@ -79,7 +81,7 @@ multiple control schemes using both classical \acrshort{gp}s, as well as
Section~\ref{sec:gaussian_processes} provides the mathematical background for
understanding \acrshort{gp}s, as well as the definition in very broad strokes of
\acrshort{svgp}s and their differences from the classical implementation of
\acrlong{gp}es. This information is later used for comparing their performances
\acrshort{gp}s. This information is later used for comparing their performances
and outlining their respective pros and cons.
Section~\ref{sec:CARNOT} goes into the details of the implementation of the

View file

@ -144,7 +144,7 @@ choices~\cite{kocijanModellingControlDynamic2016}:
\subsubsection*{Squared Exponential Kernel}
This kernel is used when the system to be modelled is assumed to be smooth and
continuous. The basic version of the \acrshort{se} kernel has the following form:
continuous. The basic version of the \acrfull{se} kernel has the following form:
\begin{equation}
k(\mathbf{x}, \mathbf{x'}) = \sigma^2 \exp{\left(- \frac{1}{2}\frac{\norm{\mathbf{x} -
@ -182,7 +182,7 @@ value of the hyperparameters. This is the \acrfull{ard} property.
The \acrfull{rq} Kernel can be interpreted as an infinite sum of \acrshort{se}
kernels with different lengthscales. It has the same smooth behaviour as the
\acrlong{se} Kernel, but can take into account the difference in function
\acrshort{se} Kernel, but can take into account the difference in function
behaviour for large scale vs small scale variations.
\begin{equation}
@ -207,11 +207,11 @@ without inquiring the penalty of inverting the covariance matrix. An overview
and comparison of multiple methods is given
at~\cite{liuUnderstandingComparingScalable2019}.
For the scope of this project, the choice of using the \acrfull{svgp} models has
been made, since it provides a very good balance of scalability, capability,
For the scope of this project, the choice of using the \acrshort{svgp} models
has been made, since it provides a very good balance of scalability, capability,
robustness and controllability~\cite{liuUnderstandingComparingScalable2019}.
The \acrlong{svgp} has been first introduced
The \acrshort{svgp} has been first introduced
by~\textcite{hensmanGaussianProcessesBig2013} as a way to scale the use of
\acrshort{gp}s to large datasets. A detailed explanation on the mathematics of
\acrshort{svgp}s and reasoning behind it is given
@ -264,7 +264,7 @@ In order to solve this problem, the log likelihood equation
classical \acrshort{gp} is replaced with an approximate value, that is
computationally tractable on larger sets of data.
The following derivation of the \acrshort{elbo} is based on the one presented
The following derivation of the \acrfull{elbo} is based on the one presented
in~\cite{yangUnderstandingVariationalLower}.
Assume $X$ to be the observations, and $Z$ the set parameters of the
@ -300,7 +300,7 @@ divergence, which for variational inference takes the following form:
\end{equation}
\vspace{5pt}
where L is the \acrfull{elbo}. Rearranging this equation we get:
where L is the \acrshort{elbo}. Rearranging this equation we get:
\begin{equation}
L = \log{\left(p(X)\right)} - KL\left[q(Z)||p(Z|X)\right]
@ -312,13 +312,13 @@ lower bound of the log probability of observations.
\subsection{Gaussian Process Models for Dynamical
Systems}\label{sec:gp_dynamical_system}
In the context of Dynamical Systems Identification and Control, Gaussian
Processes are used to represent different model structures, ranging from state
space and \acrshort{nfir} structures, to the more complex \acrshort{narx},
\acrshort{noe} and \acrshort{narmax}.
In the context of Dynamical Systems Identification and Control, \acrshort{gp}s
are used to represent different model structures, ranging from state
space and \acrfull{nfir} structures, to the more complex \acrfull{narx},
\acrfull{noe} and \acrfull{narmax}.
The general form of an \acrfull{narx} model is as follows:
The general form of an \acrshort{narx} model is as follows:
\begin{equation}
\hat{y}(k) =

View file

@ -378,7 +378,7 @@ The unit has a typical \acrlong{eer} (\acrshort{eer}, cooling efficiency) of 4.9
maximum cooling capacity of 64.2 kW.
One particularity of this \acrshort{hvac} unit is that during summer, only one
of the two compressors are running. This results in a higher \acrlong{eer}, in
of the two compressors are running. This results in a higher \acrshort{eer}, in
the cases where the full cooling capacity is not required.
\subsubsection*{Ventilation}
@ -504,7 +504,7 @@ it will oscillate between using one or two compressors. Lastly, it is possible
to notice that the \acrshort{hvac} is not turned on during the night, with the
exception of the external fan, which continues running.
\subsubsection{The CARNOT WDB weather data format}\label{sec:CARNOT_WDB}
\subsubsection{The CARNOT Weather Data Bus format}\label{sec:CARNOT_WDB}
For a correct simulation of the building behaviour, CARNOT requires not only the
detailed definition of the building blocks/nodes, but also a very detailed set
@ -514,7 +514,7 @@ sun's position throughout the simulation (zenith and azimuth angles), the
as well as information on the ambient temperature, humidity, precipitation,
pressure, wind speed and direction, etc. A detailed overview of each
measurement necessary for a simulation is given in the CARNOT user
manual~\cite{CARNOTManual}.
manual~\cite{CARNOTManual}. This data structure is known as the \acrfull{wdb}.
In order to compare the CARNOT model's performance to that of the real \pdome,
it is necessary to simulate the CARNOT model under the same set of conditions as
@ -532,17 +532,19 @@ are computed using the Python pvlib
library~\cite{f.holmgrenPvlibPythonPython2018}.
As opposed to the solar angles, which can be computed exactly from the available
information, the Solar Radiation Components (DHI and DNI) have to be estimated
from the available measurements of GHI, zenith angles (Z) and datetime
information. \textcite{erbsEstimationDiffuseRadiation1982} present an empirical
relationship between GHI and the diffuse fraction DF and the ratio of GHI to
extraterrestrial irradiance $K_t$, known as the Erbs model. The DF is then used
to compute DHI and DNI as follows:
information, the Solar Radiation Components (\acrshort{dhi} and \acrshort{dni})
have to be estimated from the available measurements of \acrfull{ghi}, zenith
angles (Z) and datetime information.
\textcite{erbsEstimationDiffuseRadiation1982} present an empirical relationship
between \acrshort{ghi} and the \acrfull{df} and the ratio of \acrshort{ghi} to
extraterrestrial irradiance $K_t$, known as the Erbs model. The \acrshort{df}
is then used to compute \acrshort{dhi} and \acrshort{dni} as follows:
\begin{equation}
\begin{aligned}
\text{DHI} &= \text{DF} \times \text{GHI} \\
\text{DNI} &= \frac{\text{GHI} - \text{DHI}}{\cos{\text{Z}}}
\text{\acrshort{dhi}} &= \text{DF} \times \text{\acrshort{ghi}} \\
\text{\acrshort{dni}} &= \frac{\text{\acrshort{ghi}} -
\text{\acrshort{dhi}}}{\cos{\text{Z}}}
\end{aligned}
\end{equation}

View file

@ -19,7 +19,7 @@ consuming computations in the case of larger number of regressors and more
complex kernel functions.
As described in Section~\ref{sec:gp_dynamical_system}, for the purpose of this
project, the \acrlong{gp} model will be trained using the \acrshort{narx}
project, the \acrshort{gp} model will be trained using the \acrshort{narx}
structure. This already presents an important choice in the selection of
regressors and their respective autoregressive lags.
@ -185,7 +185,7 @@ $l_u = 1$ and $l_y = 3$ with $l_w$ taking the values of either 1, 2 or 3,
depending on the results of further analysis.
As for the case of the \acrlong{svgp}, the results for the classical
As for the case of the \acrshort{svgp}, the results for the classical
\acrshort{gp} (cf. Table~\ref{tab:GP_hyperparameters}) are not necessarily
representative of the relationships between the regressors of the
\acrshort{svgp} model, due to the fact that the dataset used for training is
@ -259,8 +259,8 @@ This performance metric is very useful when training a model whose goal is
solely to minimize the difference between the measured values, and the ones
predicted by the model.
A variant of the \acrshort{mse} is the \acrfull{smse}, which normalizes the
\acrlong{mse} by the variance of the output values of the validation dataset.
A variant of the \acrfull{mse} is the \acrfull{smse}, which normalizes the
\acrshort{mse} by the variance of the output values of the validation dataset.
\begin{equation}\label{eq:smse}
\text{SMSE} = \frac{1}{N}\frac{\sum_{i=1}^N \left(y_i -
@ -403,7 +403,7 @@ the discrepancies.
\subsubsection{Conventional Gaussian Process}
The simulation performance of the three lag combinations chosen for the
classical \acrlong{gp} models has been analyzed, with the results presented in
classical \acrshort{gp} models has been analyzed, with the results presented in
Figures~\ref{fig:GP_113_multistep_validation},~\ref{fig:GP_213_multistep_validation}
and~\ref{fig:GP_313_multistep_validation}. For reference, the one-step ahead
predictions for the training and test datasets are presented in

View file

@ -41,7 +41,7 @@ buildings based on the rolling 48h average outside temperature.
\begin{figure}[ht]
\centering
\includegraphics[width = \textwidth]{Images/sia_180_2014.png}
\includegraphics[width = \textwidth]{Images/sia_180_2014_en.png}
\caption{The SIA 180:2014 norm for residential building
temperatures~\cite{sia180:2014ProtectionThermiqueProtection2014}}
\label{fig:sia_temperature_norm}

View file

@ -48,7 +48,7 @@ the correct amount of data for the weather predictions and to properly generate
the optimization problem, the discrete/continuous transition and vice-versa
happens on the Simulink side. This simplifies the adjustment of the sampling
time, with the downside of harder inclusion of meta-data such as hour of the
day, day of the week, etc.\ in the \acrlong{gp} Model.
day, day of the week, etc.\ in the \acrshort{gp} Model.
The weather prediction is done using the information present in the CARNOT
\acrshort{wdb} object. Since the sampling time and control horizon of the
@ -66,13 +66,13 @@ evaluating a \acrshort{gp} has an algorithmic complexity of $\mathcal{O}(n^3)$.
This means that naive implementations can get too expensive in terms of
computation time very quickly.
In order to have as smallest of a bottleneck as possible when dealing with
\acrshort{gp}s, a very fast implementation of \acrlong{gp} Models was used, in
the form of GPflow~\cite{matthewsGPflowGaussianProcess2017}. It is based on
TensorFlow~\cite{tensorflow2015-whitepaper}, which has very efficient
implementation of all the necessary Linear Algebra operations. Another benefit
of this implementation is the very simple use of any additional computational
resources, such as a GPU, TPU, etc.
In order to have as smallest of a bottleneck as possible when dealing with the
required algebraic operations, a very fast implementation of \acrshort{gp}
Models was used, in the form of GPflow~\cite{matthewsGPflowGaussianProcess2017}.
It is based on TensorFlow~\cite{tensorflow2015-whitepaper}, which has very
efficient implementation of all the necessary Linear Algebra operations. Another
benefit of this implementation is the very simple use of any additional
computational resources, such as a GPU, TPU, etc.
\subsubsection{Classical Gaussian Process training}
@ -158,7 +158,7 @@ Let $w_l$, $u_l$, and $y_l$ be the lengths of the state vector components
$\mathbf{w}$, $\mathbf{u}$, $\mathbf{y}$ (cf. Equation~\ref{eq:components}).
Also, let X be the matrix of all the system states over the optimization horizon
and W be the matrix of the predicted disturbances for all the future steps. The
original \acrlong{ocp} can be rewritten using index notation as:
original \acrshort{ocp} can be rewritten using index notation as:
\begin{subequations}\label{eq:sparse_optimal_control_problem}
\begin{align}

View file

@ -7,7 +7,7 @@ analyzed in this Section have used a sampling time of 15 minutes and a control
horizon of 8 steps.
Section~\ref{sec:GP_results} analyzes the results of a conventional
\acrlong{gp} Model trained on the first five days of gathered data. The model
\acrshort{gp} Model trained on the first five days of gathered data. The model
is then used for the rest of the year, with the goal of tracking the defined
reference temperature.
@ -131,7 +131,7 @@ performance, but are more complex in implementation.
\subsection{Sparse and Variational Gaussian Process}\label{sec:SVGP_results}
The \acrlong{svgp} models are setup in a similar way as described before. The
The \acrshort{svgp} models are setup in a similar way as described before. The
model is first identified using 5 days worth of experimental data collected
using a \acrshort{pi} controller and a random disturbance signal. The difference
lies in the fact than the \acrshort{svgp} model gets re-identified every night
@ -143,7 +143,7 @@ setup performs much better than the initial one. The only large deviations from
the reference temperature are due to cold weather, when the \acrshort{hvac}'s
limited heat capacity is unable to maintain the proper temperature.
Additionnaly, the \acrshort{svgp} controller takes around 250 - 300ms of
computation time for each simulation time, decreasing the computational cost of
computation time for each simulation step, decreasing the computational cost of
the original \acrshort{gp} by a factor of six.
@ -293,7 +293,7 @@ As seen in Figure~\ref{fig:SVGP_evol_importance}, the variance of the
signifies the increase in confidence of the model. The hyperparameters
corresponding to the exogenous inputs --- $w1,1$ and $w1,2$ --- become generally
less important for future predictions over the course of the year, with the
importance of $w1,1$, the \acrlong{ghi}, climbing back up over the last, colder
importance of $w1,1$, the \acrshort{ghi}, climbing back up over the last, colder
months. This might be due to the fact that during the colder months, the
\acrshort{ghi} is the only way for the exogenous inputs to \textit{provide}
additional heat to the system.
@ -361,7 +361,7 @@ simulation data (cf. Figures~\ref{fig:SVGP_96pts_fullyear_simulation}
and~\ref{fig:SVGP_96pts_abserr}) it is very notable that the model performs
almost identically to the one identified in the previous sections. This
highlights one of the practical benefits of the \acrshort{svgp} implementations
compared to the classical \acrlong{gp} -- it is possible to start with a rougher
compared to the classical \acrshort{gp} -- it is possible to start with a rougher
controller trained on less data and refine it over time, reducing the need for
cumbersome and potentially costly initial experiments for gathering data.
@ -473,7 +473,7 @@ models can be deployed with less explicit identification data, but they will
continue to improve over the course of the year, as the building passes through
different regions of the state space and more data is collected.
However, these results do not discredit the use of \acrlong{gp} for employment
However, these results do not discredit the use of \acrshort{gp} for employment
in a multi-seasonal situation. As shown before, given the same amount of data
and ignoring the computational cost, they perform better than the alternative
\acrshort{svgp} models. The bad initial performance could be mitigated by

View file

@ -62,7 +62,7 @@ throughout the year. The \acrshort{svgp} models also present a computational
cost advantage both in training and in evaluation, due to several approximations
shown in Section~\ref{sec:gaussian_processes}.
Focusing on the \acrlong{gp} models, there could be several ways of improving
Focusing on the \acrshort{gp} models, there could be several ways of improving
its performance, as noted previously: a more varied identification dataset and
smart update of a fixed-size data dictionary according to information gain,
could mitigate the present problems.

676
Sections/slides_content.tex Normal file
View file

@ -0,0 +1,676 @@
{
\coverpage{
\titlepage{~}
% To add additional text to the title components
{\newline \small \textit{Supervisor}: Prof. Colin Jones \quad \textit{Assistant}: Manuel Koch \quad
\textit{Expert}: Bratislav Svetozarevic}
\note[item]{Introduction, welcome}
\note[item]{Present yourself and the thesis subject}
\note[item]{Analysis of GP models performance for longer lasting simulations, in
this case a full year}
\note[item]{Discussion of the shortcomngs of classical GP approaches for these
longer experiments and possible solutions}
}
}
\setbeamertemplate{logo}{} % To override the logo from the other slides and delete it completely
% Use smart division for the TOC
\begin{frame}{Outlines}
\begin{multicols}{2}
\tableofcontents
\end{multicols}
\note[item]{The main work consists of two parts: the CARNOT building model serving as
a plant for the simulation, and the definition and analysis of different GP/SVGP
based control schemes}
\note[item]{Starting with a short introduction where the motivation for these new
approaches is presented, followed by the basic ideas of GP models}
\end{frame}
% -----------------------Introduction
\section{Introduction}
\breakingframe{
\begin{textblock*}{3cm}[0.5,0.5](0.5\textwidth, 0.5\textheight)
\Huge\textbf{\textcolor{black}{Introduction}}
\end{textblock*}
}
\subsection{Residential buildings}
\begin{frame}[t]{Residential buildings energy usage}
\begin{itemize}
\item Residential buildings represent more than 25\% of total energy
consumed in the EU \vspace{10pt} \pause
\item Average of 200-300 kWh/year/m$^{2}$ \vspace{10pt} \pause
\item Around 68\% of energy used for heating \vspace{10pt}
\end{itemize}
\note[item]{Residential buildings are a significant part of total energy
consumption in the EU}
\note[item]{Most of that energy is used for heating and ventilation of
buildings}
\note[item]{Additionally, there are increasing energy efficiency demands on
new and existing buildings}
\note[item]{Further improvements can be made by including already existing
buildings into "smart grids"}
\end{frame}
\begin{frame}
\frametitle{Limited information available}
\begin{block}{Existing infrastructure}
Most existing buildings already have in place Heating and Ventilation
Systems:\pause
\vspace{10pt}
\begin{itemize}
\item Limits the amount of available information \vspace{10pt} \pause
\item Restricts the actionable signals to those provided by the existing
HVAC \vspace{10pt}
\end{itemize}
\end{block}
\pause
\begin{block}{Weather forecast}
Predictions of future disturbance values for the MPC also impose
restrictions on usable data.
\end{block}
\note[item]{Polydome only has two temperature measurements}
\note[item]{Existing data lacks information on air humidity}
\note[item]{Existing data lacks information on occupancy\vspace{10pt}}
\note[item]{The only input for the Polydome's HVAC is the setpoint
temperature, thus only indirectly controlling the heat input\vspace{10pt}}
\note[item]{Weather predictions are restricted to outside temperature and
GHI}
\note[item]{This makes the use of other disturbances, such as humidity,
wind speed and direction, DNI, DHI inaccessible}
\end{frame}
\subsection{Black box models}
\begin{frame}
\frametitle{Black-box models}
Data-driven models provide several practical benefits over first-principle
models:
\vspace{10pt}
\begin{itemize}
\item Foregoes complex and potentially expensive physical modelling \vspace{10pt} \pause
\item Same data-driven model structure could be applied to other
situations with less effort \vspace{10pt} \pause
\item Unknown/complex plant elements, such as HVAC behaviour, unknown
material properties , occupancy levels are much easier to include\vspace{10pt} \pause
\end{itemize}
\note[item]{In this context it would be very useful to be able to use
data-driven models as they provide several benetifs over white-box
approaches:}
\note[item]{They forego the complex physical modelling step}
\note[item]{Applying a control scheme using a white-box model requires a
complete identification step, whereas for data-driven models only the
hyperparameters have to be tuned}
\note[item]{For buildings where not all information is readily available,
white-box models can prove infeasible (eg. The Polydome building :D)}
\end{frame}
% ----------------------- Gaussian Process Models
\section{Gaussian Process Models}
\breakingframe{
\begin{textblock*}{13cm}[0.5,0.5](0.7\textwidth, 0.5\textheight)
\Huge\textbf{\textcolor{black}{Gaussian Process Models}}
\end{textblock*}
}
\subsection{Conventional Gaussian Processes}
\begin{frame}
\begin{block}{Definition}
A Gaussian Process is a collection of random variables, any finite
number of which have a joint Gaussian distribution.
\end{block}
\begin{block}{Mathematical formulation}
\begin{equation*}
\begin{aligned}
m(\mathbf{x}) &= \mathbb{E}[f(\mathbf{x})] \\
k(\mathbf{x}, \mathbf{x'}) &= \mathbb{E}[f(\mathbf{x} -
m(\mathbf{x}))(f(\mathbf{x'}) - m(\mathbf{x'}))]
\end{aligned}
\end{equation*}
\end{block}
\note[item]{The formal definition of a Gaussian Process states that it is a
collection of random variables, any finite number of which have a joint
Gaussian distribution.}
\note[item]{Another useful way of thinking of GPs is as a probability distribution, but over functions rather than variables. This is a really useful thing, as often in machine learning what we are trying to do is some form of function approximation. A GP allows us to derive posterior distributions over functions by simply observing variables.}
\end{frame}
\begin{frame}
\frametitle{Benefits}
\begin{itemize}
\item Provide a complete Gaussian distribution for a predicted value
\vspace{10pt} \pause
\item Capture complex system behaviour with less data \vspace{10pt}
\pause
\item Include prior beliefs and impose desired model behaviour
\vspace{10pt} \pause
\begin{itemize}
\item Different kernels can lead to linear, periodic, smooth
functions \vspace{10pt}
\item Combinations of multiple kernel functions can impose
arbitrary behaviour \vspace{10pt}
\item Ability to impose a prior distribution on hyperparameters
before training \vspace{10pt}
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Shortcomings}
\begin{block}{Predicting new values}
\begin{equation*}
\begin{aligned}
\mathbf{f_*} = \mathbb{E}\left(f_*|X, \mathbf{y}, X_*\right) &=
K_*\left(K + \sigma_n^2I\right)^{-1}\mathbf{y} \\
cov(\mathbf{f_*}) &= K_{**} - K_*\left(K +\sigma_n^2I\right)^{-1}K_*^T \\
\end{aligned}
\end{equation*}
\end{block}
\begin{block}{Maximum likelihood}
\begin{equation*}
\log(p(y)) = - \frac{1}{2}\log{\left(
\det{\left(
K + \sigma_n^2I
\right)}
\right)}
- \frac{1}{2}y^T\left(
K + \sigma_n^2I
\right)^{-1}y
- \frac{n}{2}\log{\left(2\pi\right)}
\end{equation*}
\end{block}
\pause
\begin{itemize}
\item $\mathcal{O}(n^3)$ time for evaluation
\item $\mathcal{O}(n^4)$ time for training
\item $\mathcal{O}(n^2)$ space for finished model
\end{itemize}
\note[item]{Both training and evaluation require inversion of the covariance
matrix}
\note[item]{Impractical for embedded computers (slow, little memory)}
\note[item]{Impractical for systems with faster dynamics}
\note[item]{Impractical for complex systems where more data is needed to
capture model behaviour}
\end{frame}
\subsection{Sparse and Variationsl Gaussian Processes}
\begin{frame}
\frametitle{Sparse and Variational Gaussian Processes}
Extension of classical Gaussian Processes for use on larger scale datasets
\pause
\begin{block}{Sparse}
Approximating the full training dataset with a smaller number of points:
\\
\quad \textit{Inducing random variables} $f(X_s)$ at \textit{inducing
locations} $X_s$
\end{block}
\pause
\begin{block}{Variational}
Variational inference uses the \textit{variational
distribution} $q(f, f_s)$ to approximate the true posterior $p(f, f_s|y)$ \\
This approximation leads to the \textit{Evidence Lower Bound} (ELBO), used
for parameter training
\end{block}
\note[item]{Extension of classical GP meant to aleviate its shortcomings}
\note[item]{Inducing random variables are a new set of learnable parameters
trained in such a way to generate the original dataset as close as possible.
They are trained at the same time as the model, and when the original inputs are
evaluated on this new model the outputs should as close as possible ressemble
the original dataset outputs}
\note[item]{With variational inference we approximate the true posterior
distribution of the Gaussian process with the variational distribution}
\note[item]{ELBO approximation allows training of the model on subsets
(minibatches) of the original data}
\end{frame}
% ----------------------- CARNOT Model
\section{CARNOT Model}
\breakingframe{
\begin{textblock*}{13cm}[0.5,0.5](0.7\textwidth, 0.5\textheight)
\Huge\textbf{\textcolor{black}{CARNOT Building Model}}
\end{textblock*}
}
\begin{frame}
\frametitle{Motivation}
\begin{block}{Using CARNOT model as plant}
\vspace{10pt}
\begin{itemize}
\item Much faster than real-time simulations \vspace{10pt}
% allow for easier long-term performance evaluations
\item Reproducible weather/ disturbances \vspace{10pt}
% allows a much more direct comparison of different model
% performances
\end{itemize}
\end{block}
\begin{block}{Using the real Polydome building as basis}
Experimental data already available
\vspace{10pt}
\begin{itemize}
\item Good baseline for comparing the CARNOT model to a real
building \vspace{10pt}
\item Path to easier implementation of same control scheme on the
real Polydome \vspace{10pt}
\end{itemize}
\end{block}
\end{frame}
\subsection{The Polydome building}
\begin{frame}
\frametitle{Geometrical parameters}
% TODO: [CARNOT] Geometrical parameters of the Polydome
\begin{columns}
\begin{column}{0.3\textwidth}
\centering
\includegraphics[height=\textwidth]{Images/google_maps_polydome_skylights.png}
\end{column}
\begin{column}{0.7\textwidth}
\centering
\includegraphics[height=0.45\textwidth]{Images/polydome_streetview_annotated.png}
\end{column}
\end{columns}
\note[item]{Base geometrical dimensions from an architectural journal
article on the Polydome construction:
\begin{itemize}
\item Spherical dome shape with a mostly square base of size 25m $\times$
25m
\item Total building height of around 7 meters
\end{itemize}
}
\note[item]{Confirmation of surface from google maps, as well as
approximation of skylights shape\vspace{10pt}}
\note[item]{Overall building approximated with a spherical dome on top of a
cylindrical stem wall}
\note[item]{Google Street View capture of the Polydome building. An object
of known dimensions is used (HVAC) as a scale and the necessary dimensions
are measured with the Measure Tool in GIMP
\begin{itemize}
\item Steam wall size
\item Dome height
\item Total building height (used for validation of results)
\end{itemize}
}
\end{frame}
\begin{frame}
\begin{block}{Materials used in the Polydome}
\vspace{10pt}
\begin{itemize}
\item Walls are replaced with large, top to bottom windows \vspace{10pt}
\item Roof made of insulation, enclosed by wood on each side
\vspace{10pt}
\item Floor consists of wood, insulation, concrete \vspace{10pt}
\end{itemize}
\end{block}
\pause
\begin{block}{Furniture}
Approximated to a wall made out of \textit{equivalent indoor content
material} with material properties and geometrical dimension to emulate
real furniture.
\end{block}
\note[item]{Materials used in Polydome}
\note[item]{Furniture is an important factor in building thermal inertia. In
this case the existing furniture has been approximated to a wall with
geometrical and material properties to best emulate the real furniture}
\note[item]{Furniture material parameters come from a study on the influence
of furniture content on building thermal inertia and are representative of
an office environment}
\end{frame}
\subsection{CARNOT Model overview}
\begin{frame}
\includegraphics[height=\textheight]{Images/polydome_room_model.pdf}
\note[item]{Four of the five window nodes represent the building walls}
\note[item]{An additional window accounts for the skyboxes on the building
roof\vspace{10pt}}
\note[item]{Roof and floor made out of the appropriate materials}
\note[item]{A wall with the purpose of approximating the furniture content
of the building\vspace{10pt}}
\note[item]{The heat radiator assumed to be ideal}
\end{frame}
% ----------------------- MPC Problem
\section{The MPC Problem}
\breakingframe{
\begin{textblock*}{13cm}[0.5,0.5](0.75\textwidth, 0.5\textheight)
\Huge\textbf{\textcolor{black}{The MPC Problem}}
\end{textblock*}
}
\begin{frame}
\begin{block}{The Optimisation Problem}
\begin{equation*}
\begin{aligned}
& \text{minimize}
& & \sum_{i=0}^{N-1} (\bar{y}_{t+i} - y_{ref, t})^2 \\
& \text{subject to}
& & \bar{y}_{t+i} = K_*K^{-1}\mathbf{x}_{t+i-1} \\
&&& \mathbf{x}_{t+i-1} = \left[\mathbf{w}_{t+i-1},\quad
\mathbf{u}_{t+i-1},\quad \mathbf{y}_{t+i-1}\right]^T \\
\label{eq:components}
&&& u_{t+i} \in \mathcal{U}
\end{aligned}
\end{equation*}
\end{block}
\note[item]{The Problem of tracking a reference temperature subject to:
\begin{itemize}
\item Model constraints
\item Future disturbance inputs
\item Allowed input range (HVAC heating/cooling capacity)
\end{itemize}
}
\note[item]{Choosing this specific optimisation problem allows easier
comparison of different model performances, since they are directly
following the reference temperature}
\end{frame}
\begin{frame}
\frametitle{Reference temperature}
\centering
\includegraphics[height=0.75\textheight]{Images/sia_180_2014.png}
\note[item]{Tracking the mean of the SIA 180:2014 reference temperature
range for residental buildings. It is computed using a rolling window of
the last 48 hours of outside temperature measurement\vspace{10pt}}
\note[item]{Choosing this as a reference temperature provides a more
realistic simulation scenario, as well as allowes to analyse model
performance for a larger range of operating temperatures}
\end{frame}
% ----------------------- Implementation
\section{Implementation}
\breakingframe{
\begin{textblock*}{5cm}[0.5,0.5](0.5\textwidth, 0.5\textheight)
\Huge\textbf{\textcolor{black}{Implementation}}
\end{textblock*}
}
\begin{frame}
\frametitle{Complete diagram}
\centering
\includegraphics[height=0.75\textheight]{Images/setup_diagram.pdf}
\note[item]{The two basic building blocks of the simulation are:
\begin{itemize}
\item The building model and weather prediction built in CARNOT/Simulink
\item The control scheme implemented in Python
\end{itemize}
}
\note[item]{The server starts by implementing a PI controller
tracking the defined reference temperature until enough data has been
collected. At that point the GP model is trained and the server switches to the
MPC controller going forward}
\note[item]{The python server is also responsible of keeping track of when
to re-train the model in the case of adaptive schemes}
\end{frame}
\begin{frame}
\frametitle{Simulink Diagram}
\centering
\includegraphics[height=0.75\textheight]{Images/polydome_python.pdf}
\note[item]{The Simulink model and Python server interface through three
independent TCP/IP sockets, each responsible for tranmission of the control
signal, measurement of the output values and the weather prediction}
\end{frame}
\begin{frame}
\frametitle{GP implementation in Python}
\begin{block}{GP implementation}
\vspace{10pt}
\begin{itemize}
\item GP and SVGPs implemented with GPflow and Tensorflow \vspace{10pt}
\item Optimization Problem implemented with CasADi \vspace{10pt}
\end{itemize}
\end{block}
\begin{block}{Average computation time}
\vspace{10pt}
\begin{itemize}
\item Classical GP optimisation step of around 1-2 s \vspace{10pt}
\item SVGP optimisation step of around 200-300 ms \vspace{10pt}
\end{itemize}
\end{block}
\note[item]{Both libraries provide very efficient implementation of all the
required functions, leading to short computation times}
\end{frame}
% ----------------------- Simulations
\section{Full-year simulations}
\breakingframe{
\begin{textblock*}{13cm}[0.5,0.5](0.75\textwidth, 0.5\textheight)
\Huge\textbf{\textcolor{black}{Full-year simulations}}
\end{textblock*}
}
\begin{frame}
\frametitle{GP implementations}
\begin{block}{GP implementations for full-year simulations}
\vspace{10pt}
\begin{itemize}
\item Classical GP model trained on the five days of identification
data \vspace{10pt}
\item SVGP model trained on five days of identification data
\vspace{10pt}
\item SVGP model trained on one day of identification data
\vspace{10pt}
\item SVGP model trained on a rolling window of five days of
closed-loop operation data \vspace{10pt}
\end{itemize}
\end{block}
\end{frame}
\begin{frame}
\frametitle{Classical GP full year simulation}
\centering
\includegraphics[width=0.85\textwidth]{Plots/4_GP_480pts_12_averageYear_fullyear.pdf}
\note[item]{From the first result it can be seen that the classical GP does
not perform well. It has a very large offset from the start of the
simulation and becomes completely unstable in late summer}
\end{frame}
\begin{frame}
\frametitle{Absolute Error graph}
\centering
\includegraphics[width=\textwidth]{Plots/4_GP_480pts_12_averageYear_abserr.pdf}
\note[item]{A more quantitative analysis shows a maximum absolute error of
aroun 25 degrees C, with the mean over the whole year being 1.33 degrees C}
\end{frame}
\begin{frame}
\frametitle{GP model performance}
\centering
\includegraphics[width=\textwidth]{Plots/4_GP_480pts_12_averageYear_first_model_performance.pdf}
\note[item]{Very good multistep ahead performance in the training region,
the model correctly reproduces learned data}
\note[item]{At step 500 the model is able to correctly predict the heating
of the building to the 22.5 degrees C reference temperature}
\note[item]{Already at step 750, on the ninth day of the simulation, the
model is unable to properly predict building behaviour and settles on a
steady-state prediction error of ~0.75 degrees C.}
\note[item]{Even worse performance at experimental step 1000, where the
steady-state error is around 1.5 degrees C}
\end{frame}
\begin{frame}
\frametitle{Disturbance signal}
\centering
\includegraphics[width=\textwidth]{Plots/Exogenous_inputs_fullyear.pdf}
\note[item]{The weather patterns are representative of Switzerland, with
generally mild winters and temperate summer, but the weather does not remain
constant throughout the year\vspace{10pt}}
\note[item]{Both disturbance inputs, the outside temperature and the global
irradiation are outside the learning dataset region already around the 500
point mark}
\note[item]{This forces the GP model to work in an extrapolated region of
the state space, which it did not see during training. In this situation the
GP model does not perform well\vspace{10pt}}
\note[item]{The window of values for the two disturbance signals keeps
expanding until mid summer, after which both values start decreasing again.
This is useful for training the SVGP models.}
\end{frame}
\begin{frame}
\frametitle{SVGP full year simulation}
\centering
\includegraphics[width=0.85\textwidth]{Plots/1_SVGP_480pts_inf_window_12_averageYear_fullyear.pdf}
\note[item]{Much better performance than the classical GP system}
\note[item]{The only large deviations from the reference temperatures are in
the winter, when the HVAC heat supply is at its limit.}
\note[item]{The constant model updates mean that the model does not have to
extrapolate as far in the unknown regions before new data is added}
\end{frame}
\begin{frame}
\frametitle{Absolute Error graph}
\centering
\includegraphics[width=\textwidth]{Plots/1_SVGP_480pts_inf_window_12_averageYear_abserr.pdf}
\note[item]{Quantitavely a much better result, with a maximum absolute error of
around 1.6 degrees, except the cold days limited by the HVAC power}
\note[item]{An average absolute error over the whole year of ~0.055 degrees
C}
\end{frame}
\begin{frame}
\frametitle{SVGP model performance}
\centering
\movie[width=\textwidth]{
\includegraphics[width=\textwidth]{Plots/1_SVGP_480pts_inf_window_12_averageYear_model_0_performance.pdf}}
{Plots/SVGP_perf_animation.mkv}
\note[item]{Play the simulation movie}
\note[item]{Overall two large families of models. During the first part of
the year, as the range of the weather data gets expanded the predictions get
progressively better. For the second part of the year the range of the data does
not get expanded anymore and the performance of the model becomes noticeably
better}
\note[item]{The multistep prediction performance of the SVGP over the
training region (ie. at 250 steps) starts much worse than that of the
equivalent GP. This could be a sign that more inducing variables are necessary
to properly reproduce the training data}
\end{frame}
\begin{frame}
\frametitle{SVGP one day starting data}
\centering
\includegraphics[width=0.85\textwidth]{Plots/6_SVGP_96pts_inf_window_12_averageYear_fullyear.pdf}
\note[item]{Performance very comparable to that of five days initial model}
\note[item]{This hints at the fact that SVGP models can be deployed using
much less initial training data than traditional GP models, and are still
capable of good performance from learned behaviour}
\end{frame}
\begin{frame}
\frametitle{SVGP five day rolling window}
\centering
\includegraphics[width=0.85\textwidth]{Plots/5_SVGP_480pts_480pts_window_12_averageYear_fullyear.pdf}
\note[item]{Five days worth of initial training data. After five days of
operation, the rolling window of training data does not contain any initial
identification anymore, only closed loop operation data. This information turns
out to be insufficient for learning the plant behaviour and the controller
becomes unstable.}
\note[item]{The additional excitation of the model in turn provides enough
information for the next model to properly capture its behaviour, turning
the controller stable again until the data containing the excitations is too old
again to include in the training set.}
\end{frame}
\begin{frame}
\frametitle{SVGP linear kernel}
\centering
\includegraphics[width=0.85\textwidth]{Plots/10_SVGP_480pts_inf_window_12_averageYear_LinearKernel_fullyear.pdf}
\note[item]{This model is still stable and able to roughly follow the
reference temperature. It has, however poorer performance than the main
model, trained using a Squared Exponential Kernel. This means that the Linear
Kernel is too simplistic for even this situation.}
\end{frame}
% ----------------------- Future work
\section{Future Work}
\breakingframe{
\begin{textblock*}{10cm}[0.5,0.5](0.75\textwidth, 0.5\textheight)
\Huge\textbf{\textcolor{black}{Future work}}
\end{textblock*}
\note[item]{Several situations have not been thoroughly addressed in this
work and could be further investigated, as well as multiple directions for
direct continuation of this project are possible}
}
\begin{frame}
\frametitle{Future work}
\begin{itemize}
\item A more varied initial dataset for the classical Gaussian Process
\vspace{10pt} \pause
\item Smart update of a fixed-size data dictionary according to
information gain \vspace{10pt} \pause
\item Sparse GP wihout the use of variational inference \vspace{10pt}
\pause
\item The size of the inducing variables set can be further optimized
\vspace{10pt} \pause
\item More specialized kernel functions can be very beneficial in the
case of SVGP models
\end{itemize}
\note[item]{Varied initial dataset can be more representative of the
plant operating region over long timespans, improving overall model quality
\vspace{10pt}}
\note[item]{Keeping a dictionary will inevitably aleviate some of the
downsides of using classical Gaussian Processes, at the cost of much more
expensive computations for model update
\vspace{10pt}}
\note[item]{Not using variational inference in the form of the Evidence
Lower Bound can provide a model that better explains the training data, at
the expense of longer training time}
\note[item]{More complex are refined kernel functions can greatly improve
behaviour in the case of SVGP models as they are less capable of capturing
plant dynamics as the classical GP counterpart, given the same training dataset}
\end{frame}
% -----------------------References
% Thank you slide should be here
\breakingframe{
\begin{textblock*}{10cm}(3.2cm,4cm)
\Huge\textbf{\textcolor{black}{Thank you for your attention}}
\end{textblock*}
}
\breakingframe{
\begin{textblock*}{10cm}(3.2cm,4cm)
\Huge\textbf{\textcolor{black}{Questions}}
\end{textblock*}
}
% -----------------------References
\section{Bibliography}
% \begin{frame}[allowframebreaks]{\\References}\vspace{4pt}
\begin{frame}{References}\vspace{4pt}
\tiny{\printbibliography}
\end{frame}
\normalsize

View file

@ -0,0 +1,21 @@
% ---- Add your Meta-data to the PDF (Copyrights Kinda!) ----
\hypersetup{
pdfinfo={
Title={Inter-seasonal Performance of Gaussian
Process-based Model Predictive Control of
Buildings},
Author={Radu C. Martin},
Subject={EPFL - IGM - LA3 Lab},
Keywords={Model Predictive Control, Gaussian Process, Sparse Variational
Gaussian Process}
}
}
\author{Radu C. Martin}
\title[Inter-seasonal Performance of GP-based MPC of Buildings]
{Inter-seasonal Performance of Gaussian Process-based Model Predictive Control of Buildings}
\institute[IGM]{{\'Ecole Polytechnique F\'ed\'erale de Lausanne
(EPFL)}{\newline\newline Institute of Mechanical Engineering (IGM)}}
\subject{Master Thesis Defense}
\date{\today}

BIN
logos169.pdf Normal file

Binary file not shown.

50
slides_clean.tex Normal file
View file

@ -0,0 +1,50 @@
\documentclass{EESD}
% To change the slides size go to EESD.cls file and edit the preamble as explained.
% Important packages to be called
\usepackage{subcaption} % for adding sub-figures
\usepackage{graphicx}
\usepackage{tikz} % for cool graphics and drawings
\usepackage{multimedia} % for embedded multimedia files
\usepackage[final]{pdfpages} % include pdf figures
\usepackage[absolute,overlay]{textpos} % To place the figures by coordinates (x,y) - Beamer doesn't support floats XD
\usepackage{multicol} % To adjust items and stuff automatically in a number of a pre-specified columns
\graphicspath{{Figures/}}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{lipsum} % Just a dummy text generator
\usepackage{hyperref}
% fonts packages
\usepackage{ragged2e} % Justified typesetting
% For References Only
\usepackage[style=authortitle,backend=bibtex]{biblatex}
\addbibresource{references.bib} % Call the references database
\AtBeginBibliography{\tiny} % Specify font size (Size matters)
\renewcommand{\footnotesize}{\tiny}
% For adding code blocks
\usepackage{listings}
\lstset
{
language=[LaTeX]TeX,
breaklines=true,
basicstyle=\tt\scriptsize,
keywordstyle=\color{blue},
identifierstyle=\color{magenta},
commentstyle=\color{red},
rulecolor=\color{black},
numbers=left,
numberstyle=\tiny\color{black},
% framexleftmargin=15pt,
frame = single,
}
\include{Sections/slides_metadata.tex}
\begin{document}
\include{Sections/slides_content.tex}
\end{document}

53
slides_notes.tex Normal file
View file

@ -0,0 +1,53 @@
\documentclass{EESD}
% To change the slides size go to EESD.cls file and edit the preamble as explained.
% Show notes on second screen
\setbeameroption{show notes on second screen=right}
% Important packages to be called
\usepackage{subcaption} % for adding sub-figures
\usepackage{graphicx}
\usepackage{tikz} % for cool graphics and drawings
\usepackage{multimedia} % for embedded multimedia files
\usepackage[final]{pdfpages} % include pdf figures
\usepackage[absolute,overlay]{textpos} % To place the figures by coordinates (x,y) - Beamer doesn't support floats XD
\usepackage{multicol} % To adjust items and stuff automatically in a number of a pre-specified columns
\graphicspath{{Figures/}}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{lipsum} % Just a dummy text generator
\usepackage{hyperref}
% fonts packages
\usepackage{ragged2e} % Justified typesetting
% For References Only
\usepackage[style=authortitle,backend=bibtex]{biblatex}
\addbibresource{references.bib} % Call the references database
\AtBeginBibliography{\tiny} % Specify font size (Size matters)
\renewcommand{\footnotesize}{\tiny}
% For adding code blocks
\usepackage{listings}
\lstset
{
language=[LaTeX]TeX,
breaklines=true,
basicstyle=\tt\scriptsize,
keywordstyle=\color{blue},
identifierstyle=\color{magenta},
commentstyle=\color{red},
rulecolor=\color{black},
numbers=left,
numberstyle=\tiny\color{black},
% framexleftmargin=15pt,
frame = single,
}
\include{Sections/slides_metadata.tex}
\begin{document}
\include{Sections/slides_content.tex}
\end{document}

View file

@ -100,10 +100,11 @@ Model Predictive Control of Buildings}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength\headheight{35pt}
\setlength\footskip{13.6pt}
\setlength\footskip{27pt}
\fancyhf{Inter-seasonal GP MPC control for buildings}
\rhead{\includegraphics[width=2cm]{Logo-EPFL.png}}
\lhead{}
%\renewcommand{\footrulewidth}{0.1pt}
\cfoot{\thepage}
\usepackage[framed,numbered,autolinebreaks,useliterate]{mcode}
@ -121,7 +122,7 @@ Model Predictive Control of Buildings}
\begin{document}
\selectlanguage{english}
\input{00_First_Page.tex}
\input{Sections/00_First_Page.tex}
\tableofcontents
\clearpage
@ -129,16 +130,16 @@ Model Predictive Control of Buildings}
\printnoidxglossary[type=\acronymtype]
\clearpage
\input{10_Introduction.tex}
\input{30_Gaussian_Processes_Background.tex}
\input{40_CARNOT_model.tex}
\input{50_Choice_of_Hyperparameters.tex}
\input{60_The_MPC_Problem.tex}
\input{70_Implementation.tex}
\input{80_Results.tex}
\input{90_Conclusion.tex}
\input{Sections/10_Introduction.tex}
\input{Sections/30_Gaussian_Processes_Background.tex}
\input{Sections/40_CARNOT_model.tex}
\input{Sections/50_Choice_of_Hyperparameters.tex}
\input{Sections/60_The_MPC_Problem.tex}
\input{Sections/70_Implementation.tex}
\input{Sections/80_Results.tex}
\input{Sections/90_Conclusion.tex}
\printbibliography[heading=bibintoc]
\appendix
\input{99A_GP_hyperparameters_validation.tex}
\input{99C_hyperparameters_results.tex}
\input{Sections/99A_GP_hyperparameters_validation.tex}
\input{Sections/99C_hyperparameters_results.tex}
\end{document}